diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..d807c6279 --- /dev/null +++ b/.clang-format @@ -0,0 +1,14 @@ +BasedOnStyle: Google +IndentWidth: 4 +AllowShortFunctionsOnASingleLine: Inline +PointerAlignment: Left +SpaceBeforeParens: Never +SpacesInParentheses: false +MaxEmptyLinesToKeep: 1 +BreakBeforeBraces: Allman +DerivePointerAlignment: true +AlignAfterOpenBracket: Align +BreakConstructorInitializers: BeforeColon +ConstructorInitializerAllOnOneLineOrOnePerLine: true +NamespaceIndentation: All +SortIncludes: true \ No newline at end of file diff --git a/.gitignore b/.gitignore index 87ee8d189..85501469d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,14 @@ Include/Model/COM/NMR_COMVersion.h debug .DS_Store .vscode +TestOutput +nonrootmodels.3mf +SetupWriteRead1.3mf +SetupWriteRead2.3mf +SetupWriteRead3.3mf +SetupWriteRead4.3mf +SetupWriteRead5.3mf +v093reout.3mf +.vs .idea cmake-build-* \ No newline at end of file diff --git a/Autogenerated/Bindings/C/lib3mf.h b/Autogenerated/Bindings/C/lib3mf.h index 80ba9cd19..6253b6f81 100644 --- a/Autogenerated/Bindings/C/lib3mf.h +++ b/Autogenerated/Bindings/C/lib3mf.h @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -575,6 +575,45 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerialsiterator_getcurrentcomposi */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup(Lib3MF_MultiPropertyGroupIterator pMultiPropertyGroupIterator, Lib3MF_MultiPropertyGroup * pResource); +/************************************************************************************************************************* + Class definition for Image3DIterator +**************************************************************************************************************************/ + +/** +* Returns the Image3D the iterator points at. +* +* @param[in] pImage3DIterator - Image3DIterator instance. +* @param[out] pResource - returns the Image3D instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3diterator_getcurrentimage3d(Lib3MF_Image3DIterator pImage3DIterator, Lib3MF_Image3D * pResource); + +/************************************************************************************************************************* + Class definition for FunctionIterator +**************************************************************************************************************************/ + +/** +* Returns the Function the iterator points at. +* +* @param[in] pFunctionIterator - FunctionIterator instance. +* @param[out] pResource - returns the Function instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functioniterator_getcurrentfunction(Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource); + +/************************************************************************************************************************* + Class definition for LevelSetIterator +**************************************************************************************************************************/ + +/** +* Returns the LevelSet the iterator points at. +* +* @param[in] pLevelSetIterator - LevelSetIterator instance. +* @param[out] pResource - returns the MeshObject instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelsetiterator_getcurrentlevelset(Lib3MF_LevelSetIterator pLevelSetIterator, Lib3MF_LevelSet * pResource); + /************************************************************************************************************************* Class definition for MetaData **************************************************************************************************************************/ @@ -834,6 +873,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_ismeshobject(Lib3MF_Object pObject, b */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_iscomponentsobject(Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_islevelsetobject(Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. * @@ -1166,6 +1214,174 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_ismanifoldandoriented(Lib3MF_Mesh */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_beamlattice(Lib3MF_MeshObject pMeshObject, Lib3MF_BeamLattice * pTheBeamLattice); +/** +* Retrieves the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_getvolumedata(Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_setvolumedata(Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData pTheVolumeData); + +/************************************************************************************************************************* + Class definition for LevelSet +**************************************************************************************************************************/ + +/** +* Returns the function that is used as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getfunction(Lib3MF_LevelSet pLevelSet, Lib3MF_Function * pTheFunction); + +/** +* Sets the function to use as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setfunction(Lib3MF_LevelSet pLevelSet, Lib3MF_Function pTheFunction); + +/** +* Returns the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTransform - the transformation matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_gettransform(Lib3MF_LevelSet pLevelSet, sLib3MFTransform * pTransform); + +/** +* Sets the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_settransform(Lib3MF_LevelSet pLevelSet, const sLib3MFTransform * pTransform); + +/** +* Returns the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getchannelname(Lib3MF_LevelSet pLevelSet, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); + +/** +* Sets the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pChannelName - new name of the function output channel +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setchannelname(Lib3MF_LevelSet pLevelSet, const char * pChannelName); + +/** +* Sets the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setminfeaturesize(Lib3MF_LevelSet pLevelSet, Lib3MF_double dMinFeatureSize); + +/** +* Returns the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getminfeaturesize(Lib3MF_LevelSet pLevelSet, Lib3MF_double * pMinFeatureSize); + +/** +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dFallBackValue - fallback value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setfallbackvalue(Lib3MF_LevelSet pLevelSet, Lib3MF_double dFallBackValue); + +/** +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pFallBackValue - fallback value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getfallbackvalue(Lib3MF_LevelSet pLevelSet, Lib3MF_double * pFallBackValue); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setmeshbboxonly(Lib3MF_LevelSet pLevelSet, bool bMeshBBoxOnly); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getmeshbboxonly(Lib3MF_LevelSet pLevelSet, bool * pMeshBBoxOnly); + +/** +* Sets the mesh to use as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setmesh(Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject pTheMesh); + +/** +* Returns the mesh that is used as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getmesh(Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); + +/** +* Retrieves the VolumeData this Object. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheVolumeData - the VolumeData of this Object +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this LevelSet. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData pTheVolumeData); + /************************************************************************************************************************* Class definition for BeamLattice **************************************************************************************************************************/ @@ -1396,784 +1612,3179 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_addbeamset(Lib3MF_BeamLattice pB LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet); /************************************************************************************************************************* - Class definition for Component + Class definition for FunctionReference **************************************************************************************************************************/ /** -* Returns the Resource Instance of the component. +* Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. * -* @param[in] pComponent - Component instance. -* @param[out] pObjectResource - filled with the Resource Instance. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresource(Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getfunctionresourceid(Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 * pUniqueResourceID); /** -* Returns the UniqueResourceID of the component. +* Sets the UniqueResourceID to refer to. * -* @param[in] pComponent - Component instance. -* @param[out] pUniqueResourceID - returns the UniqueResourceID. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nUniqueResourceID - UniqueResourceID of the function * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresourceid(Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setfunctionresourceid(Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 nUniqueResourceID); /** -* returns, whether a component has a UUID and, if true, the component's UUID +* Returns the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[out] pHasUUID - flag whether the component has a UUID -* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) -* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pTransform - the transformation matrix * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getuuid(Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_gettransform(Lib3MF_FunctionReference pFunctionReference, sLib3MFTransform * pTransform); /** -* sets the component's UUID +* Sets the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pTransform - new transformation matrix * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_setuuid(Lib3MF_Component pComponent, const char * pUUID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_settransform(Lib3MF_FunctionReference pFunctionReference, const sLib3MFTransform * pTransform); /** -* Returns, if the component has a different transformation than the identity matrix +* Returns the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_hastransform(Lib3MF_Component pComponent, bool * pHasTransform); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getchannelname(Lib3MF_FunctionReference pFunctionReference, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); /** -* Returns the transformation matrix of the component. +* Sets the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pTransform - filled with the component transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pChannelName - new name of the function output channel * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_gettransform(Lib3MF_Component pComponent, sLib3MFTransform * pTransform); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setchannelname(Lib3MF_FunctionReference pFunctionReference, const char * pChannelName); /** -* Sets the transformation matrix of the component. +* Sets the minimal feature size as a hint for the function evaluator * -* @param[in] pComponent - Component instance. -* @param[in] pTransform - new transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_settransform(Lib3MF_Component pComponent, const sLib3MFTransform * pTransform); - -/************************************************************************************************************************* - Class definition for ComponentsObject -**************************************************************************************************************************/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setminfeaturesize(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dMinFeatureSize); /** -* Adds a new component to a components object. +* Returns the minimal feature size as a hint for the function evaluator * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] pObjectResource - object to add as component. Must not lead to circular references! -* @param[in] pTransform - optional transform matrix for the component. -* @param[out] pComponentInstance - new component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_addcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getminfeaturesize(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pMinFeatureSize); /** -* Retrieves a component from a component object. +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) -* @param[out] pComponentInstance - component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dFallBackValue - fallback value * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setfallbackvalue(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dFallBackValue); /** -* Retrieves a component count of a component object. +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[out] pCount - returns the component count +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pFallBackValue - fallback value * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponentcount(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getfallbackvalue(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pFallBackValue); /************************************************************************************************************************* - Class definition for BeamSet + Class definition for VolumeDataColor **************************************************************************************************************************/ -/** -* Sets a beamset's name string -* -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pName - new name of the beamset. -* @return error code or 0 (success) -*/ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setname(Lib3MF_BeamSet pBeamSet, const char * pName); +/************************************************************************************************************************* + Class definition for MaterialMapping +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for VolumeDataComposite +**************************************************************************************************************************/ /** -* Retrieves a beamset's name string +* Returns the BaseMaterialGroup used within this volume data item * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pBaseMaterialGroupInstance - The BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getname(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getbasematerialgroup(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); /** -* Sets a beamset's identifier string +* Sets the BaseMaterialGroup to use within this volume data item. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pIdentifier - new name of the beamset. +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setidentifier(Lib3MF_BeamSet pBeamSet, const char * pIdentifier); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_setbasematerialgroup(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance); /** -* Retrieves a beamset's identifier string +* Returns the number of material mappings of this VolumeDataComposite element * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) -* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pCount - the number of material mappings. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getidentifier(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmappingcount(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Retrieves the reference count of a beamset +* Returns MaterialMappting with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the reference count +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - Index of the MaterialMapping in question. +* @param[out] pTheMaterialMapping - MaterialMapping used in this element * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Sets the references of a beamset +* Adds a the MaterialMapping * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pTransform - new transformation matrix +* @param[out] pTheMaterialMapping - The new MaterialMapping * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_addmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, const sLib3MFTransform * pTransform, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Retrieves the references of a beamset +* Removes the MaterialMapping with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - The index of the MaterialMapping to be removed. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_removematerialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex); + +/************************************************************************************************************************* + Class definition for VolumeDataProperty +**************************************************************************************************************************/ /** -* Retrieves the ball reference count of a beamset +* Gets the qualified name of this property. * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the ball reference count +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] nPropertyNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pPropertyNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPropertyNameBuffer - buffer of The qualified name of this property., may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_getname(Lib3MF_VolumeDataProperty pVolumeDataProperty, const Lib3MF_uint32 nPropertyNameBufferSize, Lib3MF_uint32* pPropertyNameNeededChars, char * pPropertyNameBuffer); /** -* Sets the ball references of a beamset +* Sets whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setballreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_setisrequired(Lib3MF_VolumeDataProperty pVolumeDataProperty, bool bIsRequired); /** -* Retrieves the ball references of a beamset +* Returns whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[out] pIsRequired - Is this property required to process this 3MF document instance? * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_isrequired(Lib3MF_VolumeDataProperty pVolumeDataProperty, bool * pIsRequired); /************************************************************************************************************************* - Class definition for BaseMaterialGroup + Class definition for VolumeData **************************************************************************************************************************/ /** -* Retrieves the count of base materials in the material group. +* Returns the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[out] pCount - returns the count of base materials. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - filled with the VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getcount(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getcomposite(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* returns all the PropertyIDs of all materials in this group +* Creates a new VolumeDataComposite for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - The new VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getallpropertyids(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_createnewcomposite(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* Adds a new material to the material group +* Removes the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] pName - new name of the base material. -* @param[in] pDisplayColor - Display color of the material -* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_addmaterial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removecomposite(Lib3MF_VolumeData pVolumeData); /** -* Removes a material from the material group. +* Returns the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheColorData - filled with the VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_removematerial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getcolor(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataColor * pTheColorData); /** -* Returns the base material's name +* Creates a new VolumeDataColor for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheColorData - The new VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_createnewcolor(Lib3MF_VolumeData pVolumeData, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataColor * pTheColorData); /** -* Sets a base material's name +* Removes the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pName - new name of the base material. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removecolor(Lib3MF_VolumeData pVolumeData); /** -* Sets a base material's display color. +* Returns the number of VolumeDataProperty * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getpropertycount(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); /** -* Returns a base material's display color. +* Returns the VolumeDataProperty at a given Index * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[out] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be returned. +* @param[out] pTheVolumeDataProperty - the VolumeDataProperty at the given index. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getproperty(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Adds a new VolumeDataProperty from a Function +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pName - the qualified name (namespace+name) of the Property +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheVolumeDataProperty - the newly created VolumeDataProperty. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_addpropertyfromfunction(Lib3MF_VolumeData pVolumeData, const char * pName, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Removes the VolumeDataProperty with a given index +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be removed. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removeproperty(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex); /************************************************************************************************************************* - Class definition for ColorGroup + Class definition for Component **************************************************************************************************************************/ /** -* Retrieves the count of base materials in this Color Group. +* Returns the Resource Instance of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[out] pCount - returns the count of colors within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pObjectResource - filled with the Resource Instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcount(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresource(Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); /** -* returns all the PropertyIDs of all colors within this group +* Returns the UniqueResourceID of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @param[in] pComponent - Component instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getallpropertyids(Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresourceid(Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); /** -* Adds a new value. +* returns, whether a component has a UUID and, if true, the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] pTheColor - The new color -* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pHasUUID - flag whether the component has a UUID +* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) +* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_addcolor(Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getuuid(Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); /** -* Removes a color from the color group. +* sets the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @param[in] pComponent - Component instance. +* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_removecolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_setuuid(Lib3MF_Component pComponent, const char * pUUID); /** -* Sets a color value. +* Returns, if the component has a different transformation than the identity matrix * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[in] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_setcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_hastransform(Lib3MF_Component pComponent, bool * pHasTransform); /** -* Sets a color value. +* Returns the transformation matrix of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[out] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pTransform - filled with the component transformation matrix * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_gettransform(Lib3MF_Component pComponent, sLib3MFTransform * pTransform); + +/** +* Sets the transformation matrix of the component. +* +* @param[in] pComponent - Component instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_settransform(Lib3MF_Component pComponent, const sLib3MFTransform * pTransform); /************************************************************************************************************************* - Class definition for Texture2DGroup + Class definition for ComponentsObject **************************************************************************************************************************/ /** -* Retrieves the count of tex2coords in the Texture2DGroup. +* Adds a new component to a components object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pCount - returns the count of tex2coords. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] pObjectResource - object to add as component. Must not lead to circular references! +* @param[in] pTransform - optional transform matrix for the component. +* @param[out] pComponentInstance - new component instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getcount(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_addcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance); /** -* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* Retrieves a component from a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) +* @param[out] pComponentInstance - component instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getallpropertyids(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); /** -* Adds a new tex2coord to the Texture2DGroup +* Retrieves a component count of a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. -* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[out] pCount - returns the component count * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_addtex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponentcount(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); + +/************************************************************************************************************************* + Class definition for BeamSet +**************************************************************************************************************************/ /** -* Obtains a tex2coord to the Texture2DGroup +* Sets a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. -* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pName - new name of the beamset. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setname(Lib3MF_BeamSet pBeamSet, const char * pName); /** -* Removes a tex2coords from the Texture2DGroup. +* Retrieves a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_removetex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getname(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); /** -* Obtains the texture2D instance of this group. +* Sets a beamset's identifier string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pIdentifier - new name of the beamset. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettexture2d(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setidentifier(Lib3MF_BeamSet pBeamSet, const char * pIdentifier); + +/** +* Retrieves a beamset's identifier string +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getidentifier(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Retrieves the reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the reference count +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the ball reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the ball reference count +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setballreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); + +/** +* Retrieves the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); /************************************************************************************************************************* - Class definition for CompositeMaterials + Class definition for BaseMaterialGroup **************************************************************************************************************************/ /** -* Retrieves the count of Composite-s in the CompositeMaterials. +* Retrieves the count of base materials in the material group. * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pCount - returns the count of Composite-s +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[out] pCount - returns the count of base materials. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcount(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getcount(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); /** -* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* returns all the PropertyIDs of all materials in this group * -* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getallpropertyids(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new material to the material group +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] pName - new name of the base material. +* @param[in] pDisplayColor - Display color of the material +* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_addmaterial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a material from the material group. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_removematerial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); + +/** +* Returns the base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* Sets a base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pName - new name of the base material. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); + +/** +* Sets a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); + +/** +* Returns a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[out] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); + +/************************************************************************************************************************* + Class definition for ColorGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of base materials in this Color Group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[out] pCount - returns the count of colors within this color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcount(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all colors within this group +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getallpropertyids(Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] pTheColor - The new color +* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_addcolor(Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a color from the color group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_removecolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[in] pTheColor - The color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_setcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[out] pTheColor - The color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); + +/************************************************************************************************************************* + Class definition for Texture2DGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of tex2coords in the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pCount - returns the count of tex2coords. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getcount(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getallpropertyids(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_addtex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); + +/** +* Obtains a tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. +* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate); + +/** +* Removes a tex2coords from the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_removetex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); + +/** +* Obtains the texture2D instance of this group. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettexture2d(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); + +/************************************************************************************************************************* + Class definition for CompositeMaterials +**************************************************************************************************************************/ + +/** +* Retrieves the count of Composite-s in the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pCount - returns the count of Composite-s +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcount(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. * @param[in] nPropertyIDsBufferSize - Number of elements in buffer * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. * @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the Composite-Mixing Values in the CompositeMaterials. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getallpropertyids(Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getallpropertyids(Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getbasematerialgroup(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); + +/** +* Adds a new Composite-Mixing Values to the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite +* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_addcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_removecomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); + +/** +* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer); + +/************************************************************************************************************************* + Class definition for MultiPropertyGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the count of MultiProperty-s +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getcount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getallpropertyids(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new MultiProperty to the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. +* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Sets the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_setmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Removes a MultiProperty from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removemultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); + +/** +* Retrieves the number of layers of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the number of layers +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayercount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup +* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); + +/** +* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried +* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer); + +/** +* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removelayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); + +/************************************************************************************************************************* + Class definition for Image3D +**************************************************************************************************************************/ + +/** +* returns the name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of the name of this Image3D, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_getname(Lib3MF_Image3D pImage3D, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* sets a new name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] pName - the new name of this Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_setname(Lib3MF_Image3D pImage3D, const char * pName); + +/** +* Retrieves, if this Image3D is a ImageStack +* +* @param[in] pImage3D - Image3D instance. +* @param[out] pIsImageStack - returns, whether the Image3D is an ImageStack +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_isimagestack(Lib3MF_Image3D pImage3D, bool * pIsImageStack); + +/************************************************************************************************************************* + Class definition for ImageStack +**************************************************************************************************************************/ + +/** +* Retrieves the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pRowCount - number of rows +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getrowcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pRowCount); + +/** +* Sets the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nRowCount - number of rows +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setrowcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nRowCount); + +/** +* Retrieves the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pColumnCount - number of columns +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getcolumncount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pColumnCount); + +/** +* Sets the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nColumnCount - number of columns +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setcolumncount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nColumnCount); + +/** +* Retrieves the number of images in the stack. +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pSheetCount - number of images +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getsheetcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pSheetCount); + +/** +* Retrieves a sheet of the stack. Raises an error if sheet is not set. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getsheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pSheet); + +/** +* Sets a sheet to an existing attachment. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setsheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment pSheet); + +/** +* Creates a new sheet attachment with empty data. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createemptysheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a memory buffer. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] nDataBufferSize - Number of elements in buffer +* @param[in] pDataBuffer - uint8 buffer of binary image data +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createsheetfrombuffer(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a file on disk. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] pFileName - file name to read from +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createsheetfromfile(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, const char * pFileName, Lib3MF_Attachment * pSheet); + +/************************************************************************************************************************* + Class definition for Attachment +**************************************************************************************************************************/ + +/** +* Retrieves an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getpath(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new path of the attachment. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setpath(Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Returns the PackagePart that is this attachment. +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pPackagePart - The PackagePart of this attachment. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_packagepart(Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); + +/** +* Retrieves an attachment's relationship type +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getrelationshiptype(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's relationship type. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new relationship type string. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Writes out the attachment as file. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to write into. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to read from. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pTheReadCallback - Callback to call for reading a data chunk +* @param[in] nStreamSize - number of bytes the callback returns +* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. +* @param[in] pUserData - Userdata that is passed to the callback function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromcallback(Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); + +/** +* Retrieves the size of the attachment stream +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pStreamSize - the stream size +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); + +/** +* Writes out the attachment into a buffer +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); + +/** +* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfrombuffer(Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); + +/************************************************************************************************************************* + Class definition for Texture2D +**************************************************************************************************************************/ + +/** +* Retrieves the attachment located at the path of the texture. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); + +/** +* Sets the texture's package path to the path of the attachment. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pContentType - returns content type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getcontenttype(Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eContentType - new Content Type +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setcontenttype(Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType); + +/** +* Retrieves a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pTileStyleU - returns tilestyle type enum. +* @param[out] pTileStyleV - returns tilestyle type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_gettilestyleuv(Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV); + +/** +* Sets a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eTileStyleU - new tilestyle type enum. +* @param[in] eTileStyleV - new tilestyle type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_settilestyleuv(Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV); + +/** +* Retrieves a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pFilter - returns filter type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getfilter(Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter); + +/** +* Sets a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eFilter - sets new filter type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setfilter(Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter); + +/************************************************************************************************************************* + Class definition for ImplicitPort +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_getidentifier(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_setidentifier(Lib3MF_ImplicitPort pImplicitPort, const char * pIdentifier); + +/** +* Retrieves the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_getdisplayname(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_setdisplayname(Lib3MF_ImplicitPort pImplicitPort, const char * pDisplayName); + +/** +* Sets the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] eImplicitPortType - the type +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_settype(Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType eImplicitPortType); + +/** +* Retrieves the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[out] pImplicitPortType - the type +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_gettype(Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType * pImplicitPortType); + +/** +* Retrieves the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nReferenceBufferSize - size of the buffer (including trailing 0) +* @param[out] pReferenceNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pReferenceBuffer - buffer of the reference, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_getreference(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nReferenceBufferSize, Lib3MF_uint32* pReferenceNeededChars, char * pReferenceBuffer); + +/** +* Sets the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pReference - the reference +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_setreference(Lib3MF_ImplicitPort pImplicitPort, const char * pReference); + +/************************************************************************************************************************* + Class definition for Iterator +**************************************************************************************************************************/ + +/** +* Iterates to the next item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasNext - Iterates to the next item in the list. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_iterator_movenext(Lib3MF_Iterator pIterator, bool * pHasNext); + +/** +* Iterates to the previous item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasPrevious - Iterates to the previous item in the list. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_iterator_moveprevious(Lib3MF_Iterator pIterator, bool * pHasPrevious); + +/** +* Returns the number of items the iterator captures. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pCount - returns the number of items the iterator captures. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_iterator_count(Lib3MF_Iterator pIterator, Lib3MF_uint64 * pCount); + +/************************************************************************************************************************* + Class definition for ImplicitPortIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pImplicitPortIterator - ImplicitPortIterator instance. +* @param[out] pPort - The current element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitportiterator_getcurrent(Lib3MF_ImplicitPortIterator pImplicitPortIterator, Lib3MF_ImplicitPort * pPort); + +/************************************************************************************************************************* + Class definition for ImplicitNode +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getidentifier(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_setidentifier(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier); + +/** +* Retrieves the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getdisplayname(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_setdisplayname(Lib3MF_ImplicitNode pImplicitNode, const char * pDisplayName); + +/** +* Retrieves the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nTagBufferSize - size of the buffer (including trailing 0) +* @param[out] pTagNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pTagBuffer - buffer of the tag, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_gettag(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nTagBufferSize, Lib3MF_uint32* pTagNeededChars, char * pTagBuffer); + +/** +* Sets the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pTag - the tag +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_settag(Lib3MF_ImplicitNode pImplicitNode, const char * pTag); + +/** +* Retrieves the type of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pType - the type of the node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getnodetype(Lib3MF_ImplicitNode pImplicitNode, eLib3MFImplicitNodeType * pType); + +/** +* Add an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[out] pPort - +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_addinput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator for the inputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getinputs(Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Add an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[out] pPort - +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_addoutput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator the outputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getoutputs(Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Retrieves an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_findinput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_findoutput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/** +* Checks if the types of the input and output ports are valid for the node type +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pValid - true, if the types are valid +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_aretypesvalid(Lib3MF_ImplicitNode pImplicitNode, bool * pValid); + +/************************************************************************************************************************* + Class definition for OneInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pInput - the input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_oneinputnode_getinputa(Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves the output +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_oneinputnode_getoutputresult(Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for SinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcSinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcCosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SinhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CoshNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for RoundNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CeilNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FloorNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SignNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FractNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for AbsNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ExpNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LogNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log10Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LengthNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TransposeNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for InverseNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SqrtNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ResourceIdNode +**************************************************************************************************************************/ + +/** +* Sets the Resource that the resourceid attribute of the node will point to +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[in] pResource - the resource +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_resourceidnode_setresource(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource pResource); + +/** +* Retrieves the resource of the node +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pResource - the resource +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_resourceidnode_getresource(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource * pResource); + +/** +* Retrieves the output +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_resourceidnode_getoutputvalue(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for TwoInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pTwoInputNode - TwoInputNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_twoinputnode_getinputb(Lib3MF_TwoInputNode pTwoInputNode, Lib3MF_ImplicitPort * pB); + +/************************************************************************************************************************* + Class definition for AdditionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SubtractionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DivisionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DotNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CrossNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTan2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MatVecMultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MaxNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FmodNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ModNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for PowNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SelectNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_selectnode_getinputb(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pB); + +/** +* Retrieves the third input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pC - the third input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_selectnode_getinputc(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pC); + +/** +* Retrieves the fourth input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pD - the fourth input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_selectnode_getinputd(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pD); + +/************************************************************************************************************************* + Class definition for ClampNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the lower limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMin - the input for the lower limit +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_clampnode_getinputmin(Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMin); + +/** +* Retrieves the input for the upper limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMax - the input for the upper limit +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_clampnode_getinputmax(Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMax); + +/************************************************************************************************************************* + Class definition for ComposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the x component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pX - the input for the x component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getinputx(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the input for the y component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pY - the input for the y component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getinputy(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the input for the z component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pZ - the input for the z component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getinputz(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/** +* Retrieves the output +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getoutputresult(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for VectorFromScalarNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DecomposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pA - the input port for the vector to decompose +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getinputa(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pA); + +/** +* Retrieves the output for the x component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pX - the output for the x component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getoutputx(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the output for the y component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pY - the output for the y component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getoutputy(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the output for the z component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pZ - the output for the z component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getoutputz(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/************************************************************************************************************************* + Class definition for ComposeMatrixNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the element 0 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM00 - the input for the m00 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm00(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM00); + +/** +* Retrieves the input for the element 0 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM01 - the input for the m01 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm01(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM01); + +/** +* Retrieves the input for the element 0 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM02 - the input for the m02 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm02(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM02); + +/** +* Retrieves the input for the element 0 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM03 - the input for the m03 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm03(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM03); + +/** +* Retrieves the input for the element 1 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM10 - the input for the m10 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm10(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM10); + +/** +* Retrieves the input for the element 1 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM11 - the input for the m11 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm11(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM11); + +/** +* Retrieves the input for the element 1 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM12 - the input for the m12 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm12(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM12); + +/** +* Retrieves the input for the element 1 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM13 - the input for the m3 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm13(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM13); + +/** +* Retrieves the input for the element 2 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM20 - the input for the m2 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm20(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM20); + +/** +* Retrieves the input for the element 2 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM21 - +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm21(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM21); + +/** +* Retrieves the input for the element 2 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM22 - the input for the m22 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm22(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM22); + +/** +* Retrieves the input for the element 2 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM23 - the input for the m23 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm23(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM23); + +/** +* Retrieves the input for the element 3 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM30 - the input for the m30 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm30(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM30); + +/** +* Retrieves the input for the element 3 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM31 - the input for the m31 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm31(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM31); + +/** +* Retrieves the input for the element 3 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM32 - the input for the m32 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm32(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM32); + +/** +* Retrieves the input for the element 3 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM33 - the input for the m33 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm33(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM33); + +/** +* Retrieves the output +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getoutputresult(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromRowsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow0 - the input for the first row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputa(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow0); + +/** +* Retrieves the input for the second row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow1 - the input for the second row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputb(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow1); + +/** +* Retrieves the input for the third row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow2 - the input for the third row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputc(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow2); + +/** +* Retrieves the input for the fourth row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow3 - the input for the fourth row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputd(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getoutputresult(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromColumnsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn0 - the input for the first column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputa(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn0); + +/** +* Retrieves the input for the second column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn1 - the input for the second column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputb(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn1); + +/** +* Retrieves the input for the third column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn2 - the input for the third column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputc(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn2); + +/** +* Retrieves the input for the fourth column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn3 - the input for the fourth column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputd(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getoutputresult(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for ConstantNode +**************************************************************************************************************************/ + +/** +* Sets the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[in] dValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constantnode_setconstant(Lib3MF_ConstantNode pConstantNode, Lib3MF_double dValue); + +/** +* Retrieves the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constantnode_getconstant(Lib3MF_ConstantNode pConstantNode, Lib3MF_double * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constantnode_getoutputvalue(Lib3MF_ConstantNode pConstantNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for ConstVecNode +**************************************************************************************************************************/ + +/** +* Sets the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constvecnode_setvector(Lib3MF_ConstVecNode pConstVecNode, const sLib3MFVector * pValue); + +/** +* Retrieves the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constvecnode_getvector(Lib3MF_ConstVecNode pConstVecNode, sLib3MFVector * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pVector - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constvecnode_getoutputvector(Lib3MF_ConstVecNode pConstVecNode, Lib3MF_ImplicitPort * pVector); + +/************************************************************************************************************************* + Class definition for ConstMatNode +**************************************************************************************************************************/ + +/** +* Sets the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constmatnode_setmatrix(Lib3MF_ConstMatNode pConstMatNode, const sLib3MFMatrix4x4 * pValue); + +/** +* Retrieves the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pValue - the matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constmatnode_getmatrix(Lib3MF_ConstMatNode pConstMatNode, sLib3MFMatrix4x4 * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pMatrix - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constmatnode_getoutputmatrix(Lib3MF_ConstMatNode pConstMatNode, Lib3MF_ImplicitPort * pMatrix); + +/************************************************************************************************************************* + Class definition for MeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshnode_getinputmesh(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshnode_getinputpos(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pDistance - the output port for the signed distance to the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshnode_getoutputdistance(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for UnsignedMeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getinputmesh(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getinputpos(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pDistance - the output port for the unsigned distance to the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getoutputdistance(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for FunctionCallNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionCallNode - FunctionCallNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functioncallnode_getinputfunctionid(Lib3MF_FunctionCallNode pFunctionCallNode, Lib3MF_ImplicitPort * pFunction); + +/************************************************************************************************************************* + Class definition for NodeIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pNodeIterator - NodeIterator instance. +* @param[out] pNode - The current element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_nodeiterator_getcurrent(Lib3MF_NodeIterator pNodeIterator, Lib3MF_ImplicitNode * pNode); + +/************************************************************************************************************************* + Class definition for Function +**************************************************************************************************************************/ + +/** +* Retrieves the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_getdisplayname(Lib3MF_Function pFunction, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_setdisplayname(Lib3MF_Function pFunction, const char * pDisplayName); + +/** +* Add an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_addinput(Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the list of inputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_getinputs(Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an input +* +* @param[in] pFunction - Function instance. +* @param[in] pInput - The input to be removed +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_removeinput(Lib3MF_Function pFunction, Lib3MF_ImplicitPort pInput); + +/** +* Add an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_addoutput(Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the outputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_getoutputs(Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an output +* +* @param[in] pFunction - Function instance. +* @param[in] pOutput - The output to be removed +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_removeoutput(Lib3MF_Function pFunction, Lib3MF_ImplicitPort pOutput); + +/** +* Retrieves an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_findinput(Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_findoutput(Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/************************************************************************************************************************* + Class definition for ImplicitFunction +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_getidentifier(Lib3MF_ImplicitFunction pImplicitFunction, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_setidentifier(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier); + +/** +* Add a node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] eNodeType - the type of the node +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addnode(Lib3MF_ImplicitFunction pImplicitFunction, eLib3MFImplicitNodeType eNodeType, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ImplicitNode * pNode); + +/** +* Add a SinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsinnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinNode * pNode); + +/** +* Add a CosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcosnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CosNode * pNode); + +/** +* Add a TanNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addtannode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanNode * pNode); + +/** +* Add a ArcSinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addarcsinnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcSinNode * pNode); + +/** +* Add a ArcCosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addarccosnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcCosNode * pNode); + +/** +* Add a ArcTan2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addarctan2node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcTan2Node * pNode); + +/** +* Add a SinhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsinhnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinhNode * pNode); + +/** +* Add a CoshNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcoshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CoshNode * pNode); + +/** +* Add a TanhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addtanhnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanhNode * pNode); + +/** +* Add a RoundNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addroundnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_RoundNode * pNode); + +/** +* Add a CeilNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addceilnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CeilNode * pNode); + +/** +* Add a FloorNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfloornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FloorNode * pNode); + +/** +* Add a SignNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsignnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SignNode * pNode); + +/** +* Add a FractNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfractnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FractNode * pNode); + +/** +* Add a AbsNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addabsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AbsNode * pNode); + +/** +* Add a ExpNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addexpnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ExpNode * pNode); + +/** +* Add a LogNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlognode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_LogNode * pNode); + +/** +* Add a Log2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlog2node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log2Node * pNode); + +/** +* Add a Log10Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlog10node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log10Node * pNode); + +/** +* Add a LengthNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlengthnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_LengthNode * pNode); + +/** +* Add a TransposeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addtransposenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TransposeNode * pNode); + +/** +* Add a InverseNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_inversenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_InverseNode * pNode); + +/** +* Add a SqrtNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsqrtnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SqrtNode * pNode); + +/** +* Add a ResourceIdNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addresourceidnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ResourceIdNode * pNode); + +/** +* Add an AdditionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addadditionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AdditionNode * pNode); + +/** +* Add a SubtractionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsubtractionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SubtractionNode * pNode); + +/** +* Add a MultiplicationNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmultiplicationnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MultiplicationNode * pNode); + +/** +* Add a DivisionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_adddivisionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_DivisionNode * pNode); + +/** +* Add a DotNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_adddotnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DotNode * pNode); + +/** +* Add a CrossNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcrossnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_CrossNode * pNode); /** -* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* Add a MatVecMultiplicationNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getbasematerialgroup(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmatvecmultiplicationnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatVecMultiplicationNode * pNode); /** -* Adds a new Composite-Mixing Values to the CompositeMaterials. +* Add a MinNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite -* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_addcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addminnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MinNode * pNode); /** -* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* Add a MaxNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_removecomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmaxnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MaxNode * pNode); /** -* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* Add a FmodNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer); - -/************************************************************************************************************************* - Class definition for MultiPropertyGroup -**************************************************************************************************************************/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfmodnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FmodNode * pNode); /** -* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* Add a PowNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the count of MultiProperty-s +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getcount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addpownode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_PowNode * pNode); /** -* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* Add a SelectNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getallpropertyids(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addselectnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SelectNode * pNode); /** -* Adds a new MultiProperty to the MultiPropertyGroup. +* Add a ClampNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. -* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addclampnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ClampNode * pNode); /** -* Sets the PropertyIDs of a MultiProperty. +* Add a ComposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_setmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcomposevectornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeVectorNode * pNode); /** -* Obtains the PropertyIDs of a MultiProperty. +* Add a VectorFromScalar * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addvectorfromscalarnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_VectorFromScalarNode * pNode); /** -* Removes a MultiProperty from this MultiPropertyGroup. +* Add a DecomposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removemultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_adddecomposevectornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DecomposeVectorNode * pNode); /** -* Retrieves the number of layers of this MultiPropertyGroup. +* Add a ComposeMatrixNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the number of layers +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayercount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcomposematrixnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeMatrixNode * pNode); /** -* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* Add a MatrixFromRowsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup -* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmatrixfromrowsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromRowsNode * pNode); /** -* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* Add a MatrixFromColumnsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried -* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmatrixfromcolumnsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromColumnsNode * pNode); /** -* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* Add a ConstantNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removelayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); - -/************************************************************************************************************************* - Class definition for Attachment -**************************************************************************************************************************/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addconstantnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstantNode * pNode); /** -* Retrieves an attachment's package path. This function will be removed in a later release. +* Add a ConstVecNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getpath(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addconstvecnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstVecNode * pNode); /** -* Sets an attachment's package path. This function will be removed in a later release. +* Add a ConstMatNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new path of the attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setpath(Lib3MF_Attachment pAttachment, const char * pPath); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addconstmatnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstMatNode * pNode); /** -* Returns the PackagePart that is this attachment. +* Add a MeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[out] pPackagePart - The PackagePart of this attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_packagepart(Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmeshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MeshNode * pNode); /** -* Retrieves an attachment's relationship type +* Add a UnsignedMeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getrelationshiptype(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addunsignedmeshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); /** -* Sets an attachment's relationship type. +* Add a FunctionCallNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new relationship type string. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attachment pAttachment, const char * pPath); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfunctioncallnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode); /** -* Writes out the attachment as file. +* Retrieves the nodes * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to write into. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[out] pIterator - iterator for the list of nodes * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_getnodes(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_NodeIterator * pIterator); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Removes a node * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to read from. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pNode - The node to be removed * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_removenode(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitNode pNode); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[in] pTheReadCallback - Callback to call for reading a data chunk -* @param[in] nStreamSize - number of bytes the callback returns -* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. -* @param[in] pUserData - Userdata that is passed to the callback function +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - the source port +* @param[in] pTarget - the target port * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromcallback(Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlink(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitPort pSource, Lib3MF_ImplicitPort pTarget); /** -* Retrieves the size of the attachment stream +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[out] pStreamSize - the stream size +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - name of the source port in the format nodename.portname +* @param[in] pTarget - name of the target port in the format nodename.portname * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlinkbynames(Lib3MF_ImplicitFunction pImplicitFunction, const char * pSource, const char * pTarget); /** -* Writes out the attachment into a buffer +* Clears the function * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_clear(Lib3MF_ImplicitFunction pImplicitFunction); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Sorts the nodes topologically * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfrombuffer(Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_sortnodestopologically(Lib3MF_ImplicitFunction pImplicitFunction); /************************************************************************************************************************* - Class definition for Texture2D + Class definition for FunctionFromImage3D **************************************************************************************************************************/ /** -* Retrieves the attachment located at the path of the texture. +* Returns the selected 3D image. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pImage3D - image instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getimage3d(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D * pImage3D); /** -* Sets the texture's package path to the path of the attachment. +* Sets the 3D image of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] pImage3D - image instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setimage3d(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D pImage3D); /** -* Retrieves a texture's content type. +* Sets the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pContentType - returns content type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eFilter - texture filter * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getcontenttype(Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setfilter(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter eFilter); /** -* Retrieves a texture's content type. +* Returns the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eContentType - new Content Type +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pFilter - texture filter * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setcontenttype(Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getfilter(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter * pFilter); /** -* Retrieves a texture's tilestyle type. +* Sets the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pTileStyleU - returns tilestyle type enum. -* @param[out] pTileStyleV - returns tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eTileStyleU - tile style in U +* @param[in] eTileStyleV - tile style in V +* @param[in] eTileStyleW - tile style in W * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_gettilestyleuv(Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_settilestyles(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV, eLib3MFTextureTileStyle eTileStyleW); /** -* Sets a texture's tilestyle type. +* Retrieves the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eTileStyleU - new tilestyle type enum. -* @param[in] eTileStyleV - new tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pTileStyleU - tile style in U +* @param[out] pTileStyleV - tile style in V +* @param[out] pTileStyleW - tile style in W * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_settilestyleuv(Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_gettilestyles(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV, eLib3MFTextureTileStyle * pTileStyleW); /** -* Retrieves a texture's filter type. +* returns the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pFilter - returns filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getfilter(Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getoffset(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pOffset); /** -* Sets a texture's filter type. +* Sets the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eFilter - sets new filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setfilter(Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setoffset(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dOffset); + +/** +* returns the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getscale(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pScale); + +/** +* Sets the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setscale(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dScale); /************************************************************************************************************************* Class definition for BuildItem @@ -3145,6 +5756,16 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getcolorgroupbyid(Lib3MF_Model pModel, */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getlevelsetbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -3283,6 +5904,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getmultipropertygroups(Lib3MF_Model pM */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestacks(Lib3MF_Model pModel, Lib3MF_SliceStackIterator * pResourceIterator); +/** +* creates a resource iterator instance with all image3d resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getimage3ds(Lib3MF_Model pModel, Lib3MF_Image3DIterator * pResourceIterator); + /** * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. * @@ -3292,6 +5922,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestacks(Lib3MF_Model pModel, Li */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_mergetomodel(Lib3MF_Model pModel, Lib3MF_Model * pMergedModelInstance); +/** +* Merges the given model into this model. +* +* @param[in] pModel - Model instance. +* @param[in] pModelInstance - model to be merged +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_mergefrommodel(Lib3MF_Model pModel, Lib3MF_Model pModelInstance); + /** * adds an empty mesh object to the model. * @@ -3377,6 +6016,28 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addcompositematerials(Lib3MF_Model pMo */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addmultipropertygroup(Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance); +/** +* creates a new 3D Image Resource +* +* @param[in] pModel - Model instance. +* @param[in] nColumnCount - the number of columns in each sheet. +* @param[in] nRowCount - the number of rows in each sheet. +* @param[in] nSheetCount - the number of sheets in the image stack. +* @param[out] pInstance - returns the new ImageStack instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addimagestack(Lib3MF_Model pModel, Lib3MF_uint32 nColumnCount, Lib3MF_uint32 nRowCount, Lib3MF_uint32 nSheetCount, Lib3MF_ImageStack * pInstance); + +/** +* finds an ImageStack object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pImageStackInstance - returns the image stack instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getimagestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ImageStack * pImageStackInstance); + /** * adds a build item to the model. * @@ -3528,6 +6189,70 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_setrandomnumbercallback(Lib3MF_Model p */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getkeystore(Lib3MF_Model pModel, Lib3MF_KeyStore * pKeyStore); +/** +* creates a resource iterator for all functions +* +* @param[in] pModel - Model instance. +* @param[out] pTheResourceIterator - returns the resource iterator +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getfunctions(Lib3MF_Model pModel, Lib3MF_FunctionIterator * pTheResourceIterator); + +/** +* adds a function described by nodes to the model +* +* @param[in] pModel - Model instance. +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addimplicitfunction(Lib3MF_Model pModel, Lib3MF_ImplicitFunction * pFunctionInstance); + +/** +* adds a function defined by an image3d to the model +* +* @param[in] pModel - Model instance. +* @param[in] pImage3DInstance - the Image3D-instance used for this function +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addfunctionfromimage3d(Lib3MF_Model pModel, Lib3MF_Image3D pImage3DInstance, Lib3MF_FunctionFromImage3D * pFunctionInstance); + +/** +* adds a volume data resource to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pVolumeDataInstance - returns the new volume data instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addvolumedata(Lib3MF_Model pModel, Lib3MF_VolumeData * pVolumeDataInstance); + +/** +* adds an empty boundary shape object to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pLevelSetInstance - returns the mesh object instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addlevelset(Lib3MF_Model pModel, Lib3MF_LevelSet * pLevelSetInstance); + +/** +* creates a resource iterator instance with all boundary shape resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getlevelsets(Lib3MF_Model pModel, Lib3MF_LevelSetIterator * pResourceIterator); + +/** +* Removes a resource from the model +* +* @param[in] pModel - Model instance. +* @param[in] pResource - The resource to remove +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_removeresource(Lib3MF_Model pModel, Lib3MF_Resource pResource); + /************************************************************************************************************************* Global functions **************************************************************************************************************************/ diff --git a/Autogenerated/Bindings/C/lib3mf_types.h b/Autogenerated/Bindings/C/lib3mf_types.h index 6f2dcf6a4..696aec4eb 100644 --- a/Autogenerated/Bindings/C/lib3mf_types.h +++ b/Autogenerated/Bindings/C/lib3mf_types.h @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -84,8 +84,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 3 -#define LIB3MF_VERSION_MICRO 2 +#define LIB3MF_VERSION_MINOR 4 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -130,13 +130,18 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER 140 /** A progress identifier is unknown */ #define LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT 141 /** An element buffer exceeds its spec limit */ #define LIB3MF_ERROR_INVALIDRESOURCE 142 /** A resource is invalid */ +#define LIB3MF_ERROR_INVALIDLEVELSET 143 /** A level set is invalid */ #define LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE 2000 /** This object type is not valid for beamlattices */ #define LIB3MF_ERROR_INVALIDKEYSTORE 3000 /** The keystore object is invalid */ #define LIB3MF_ERROR_INVALIDKEYSTORECONSUMER 3001 /** The consumer keystore object is invalid */ #define LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND 3002 /** A consumer has not been found */ #define LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND 3003 /** A resource data has not been found */ #define LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED 3004 /** A Key or Conentent encryption callback has not been registered */ -#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key siue is invalid */ +#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key size is invalid */ +#define LIB3MF_ERROR_INCOMPATIBLEPORTTYPES 4000 /** Link could not be added, the port types are incompatible */ +#define LIB3MF_ERROR_GRAPHISCYCLIC 4001 /** The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted. */ +#define LIB3MF_ERROR_INPUTNOTSET 4002 /** The input of a node is not set. */ +#define LIB3MF_ERROR_INVALIDNODECONFIGURATION 4003 /** The selected node configuration is not supported */ /************************************************************************************************************************* Error strings for Lib3MF @@ -181,13 +186,18 @@ inline const char * LIB3MF_GETERRORSTRING (Lib3MFResult nErrorCode) { case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "A progress identifier is unknown"; case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "An element buffer exceeds its spec limit"; case LIB3MF_ERROR_INVALIDRESOURCE: return "A resource is invalid"; + case LIB3MF_ERROR_INVALIDLEVELSET: return "A level set is invalid"; case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "This object type is not valid for beamlattices"; case LIB3MF_ERROR_INVALIDKEYSTORE: return "The keystore object is invalid"; case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "The consumer keystore object is invalid"; case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: return "A consumer has not been found"; case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "A resource data has not been found"; case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "A Key or Conentent encryption callback has not been registered"; - case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key siue is invalid"; + case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key size is invalid"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "Link could not be added, the port types are incompatible"; + case LIB3MF_ERROR_GRAPHISCYCLIC: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case LIB3MF_ERROR_INPUTNOTSET: return "The input of a node is not set."; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "The selected node configuration is not supported"; default: return "unknown error"; } } @@ -212,11 +222,21 @@ typedef Lib3MFHandle Lib3MF_ColorGroupIterator; typedef Lib3MFHandle Lib3MF_Texture2DGroupIterator; typedef Lib3MFHandle Lib3MF_CompositeMaterialsIterator; typedef Lib3MFHandle Lib3MF_MultiPropertyGroupIterator; +typedef Lib3MFHandle Lib3MF_Image3DIterator; +typedef Lib3MFHandle Lib3MF_FunctionIterator; +typedef Lib3MFHandle Lib3MF_LevelSetIterator; typedef Lib3MFHandle Lib3MF_MetaData; typedef Lib3MFHandle Lib3MF_MetaDataGroup; typedef Lib3MFHandle Lib3MF_Object; typedef Lib3MFHandle Lib3MF_MeshObject; +typedef Lib3MFHandle Lib3MF_LevelSet; typedef Lib3MFHandle Lib3MF_BeamLattice; +typedef Lib3MFHandle Lib3MF_FunctionReference; +typedef Lib3MFHandle Lib3MF_VolumeDataColor; +typedef Lib3MFHandle Lib3MF_MaterialMapping; +typedef Lib3MFHandle Lib3MF_VolumeDataComposite; +typedef Lib3MFHandle Lib3MF_VolumeDataProperty; +typedef Lib3MFHandle Lib3MF_VolumeData; typedef Lib3MFHandle Lib3MF_Component; typedef Lib3MFHandle Lib3MF_ComponentsObject; typedef Lib3MFHandle Lib3MF_BeamSet; @@ -225,8 +245,71 @@ typedef Lib3MFHandle Lib3MF_ColorGroup; typedef Lib3MFHandle Lib3MF_Texture2DGroup; typedef Lib3MFHandle Lib3MF_CompositeMaterials; typedef Lib3MFHandle Lib3MF_MultiPropertyGroup; +typedef Lib3MFHandle Lib3MF_Image3D; +typedef Lib3MFHandle Lib3MF_ImageStack; typedef Lib3MFHandle Lib3MF_Attachment; typedef Lib3MFHandle Lib3MF_Texture2D; +typedef Lib3MFHandle Lib3MF_ImplicitPort; +typedef Lib3MFHandle Lib3MF_Iterator; +typedef Lib3MFHandle Lib3MF_ImplicitPortIterator; +typedef Lib3MFHandle Lib3MF_ImplicitNode; +typedef Lib3MFHandle Lib3MF_OneInputNode; +typedef Lib3MFHandle Lib3MF_SinNode; +typedef Lib3MFHandle Lib3MF_CosNode; +typedef Lib3MFHandle Lib3MF_TanNode; +typedef Lib3MFHandle Lib3MF_ArcSinNode; +typedef Lib3MFHandle Lib3MF_ArcCosNode; +typedef Lib3MFHandle Lib3MF_ArcTanNode; +typedef Lib3MFHandle Lib3MF_SinhNode; +typedef Lib3MFHandle Lib3MF_CoshNode; +typedef Lib3MFHandle Lib3MF_TanhNode; +typedef Lib3MFHandle Lib3MF_RoundNode; +typedef Lib3MFHandle Lib3MF_CeilNode; +typedef Lib3MFHandle Lib3MF_FloorNode; +typedef Lib3MFHandle Lib3MF_SignNode; +typedef Lib3MFHandle Lib3MF_FractNode; +typedef Lib3MFHandle Lib3MF_AbsNode; +typedef Lib3MFHandle Lib3MF_ExpNode; +typedef Lib3MFHandle Lib3MF_LogNode; +typedef Lib3MFHandle Lib3MF_Log2Node; +typedef Lib3MFHandle Lib3MF_Log10Node; +typedef Lib3MFHandle Lib3MF_LengthNode; +typedef Lib3MFHandle Lib3MF_TransposeNode; +typedef Lib3MFHandle Lib3MF_InverseNode; +typedef Lib3MFHandle Lib3MF_SqrtNode; +typedef Lib3MFHandle Lib3MF_ResourceIdNode; +typedef Lib3MFHandle Lib3MF_TwoInputNode; +typedef Lib3MFHandle Lib3MF_AdditionNode; +typedef Lib3MFHandle Lib3MF_SubtractionNode; +typedef Lib3MFHandle Lib3MF_MultiplicationNode; +typedef Lib3MFHandle Lib3MF_DivisionNode; +typedef Lib3MFHandle Lib3MF_DotNode; +typedef Lib3MFHandle Lib3MF_CrossNode; +typedef Lib3MFHandle Lib3MF_ArcTan2Node; +typedef Lib3MFHandle Lib3MF_MatVecMultiplicationNode; +typedef Lib3MFHandle Lib3MF_MinNode; +typedef Lib3MFHandle Lib3MF_MaxNode; +typedef Lib3MFHandle Lib3MF_FmodNode; +typedef Lib3MFHandle Lib3MF_ModNode; +typedef Lib3MFHandle Lib3MF_PowNode; +typedef Lib3MFHandle Lib3MF_SelectNode; +typedef Lib3MFHandle Lib3MF_ClampNode; +typedef Lib3MFHandle Lib3MF_ComposeVectorNode; +typedef Lib3MFHandle Lib3MF_VectorFromScalarNode; +typedef Lib3MFHandle Lib3MF_DecomposeVectorNode; +typedef Lib3MFHandle Lib3MF_ComposeMatrixNode; +typedef Lib3MFHandle Lib3MF_MatrixFromRowsNode; +typedef Lib3MFHandle Lib3MF_MatrixFromColumnsNode; +typedef Lib3MFHandle Lib3MF_ConstantNode; +typedef Lib3MFHandle Lib3MF_ConstVecNode; +typedef Lib3MFHandle Lib3MF_ConstMatNode; +typedef Lib3MFHandle Lib3MF_MeshNode; +typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_FunctionCallNode; +typedef Lib3MFHandle Lib3MF_NodeIterator; +typedef Lib3MFHandle Lib3MF_Function; +typedef Lib3MFHandle Lib3MF_ImplicitFunction; +typedef Lib3MFHandle Lib3MF_FunctionFromImage3D; typedef Lib3MFHandle Lib3MF_BuildItem; typedef Lib3MFHandle Lib3MF_BuildItemIterator; typedef Lib3MFHandle Lib3MF_Slice; @@ -305,7 +388,7 @@ typedef enum eLib3MFBeamLatticeClipMode { } eLib3MFBeamLatticeClipMode; typedef enum eLib3MFBeamLatticeBallMode { - eBeamLatticeBallModeNone = 0, + eBeamLatticeBallModeBeamLatticeBallModeNone = 0, eBeamLatticeBallModeMixed = 1, eBeamLatticeBallModeAll = 2 } eLib3MFBeamLatticeBallMode; @@ -343,6 +426,103 @@ typedef enum eLib3MFBlendMethod { eBlendMethodMultiply = 2 } eLib3MFBlendMethod; +typedef enum eLib3MFChannelName { + eChannelNameRed = 0, + eChannelNameGreen = 1, + eChannelNameBlue = 2, + eChannelNameAlpha = 3 +} eLib3MFChannelName; + +typedef enum eLib3MFCompositionMethod { + eCompositionMethodWeightedSum = 0, + eCompositionMethodMultiply = 1, + eCompositionMethodMin = 2, + eCompositionMethodMax = 3, + eCompositionMethodMask = 4 +} eLib3MFCompositionMethod; + +typedef enum eLib3MFCompositionSpace { + eCompositionSpaceRaw = 0, + eCompositionSpaceLinearColor = 1 +} eLib3MFCompositionSpace; + +/** +* enum eLib3MFImplicitNodeType - The type of the node +*/ +typedef enum eLib3MFImplicitNodeType { + eImplicitNodeTypeAddition = 1, /** Adds to values (scalar or vector) */ + eImplicitNodeTypeSubtraction = 2, /** Subtracts two values (scalar or vector) */ + eImplicitNodeTypeMultiplication = 3, /** Multiplies two values (scalar or vector) */ + eImplicitNodeTypeDivision = 4, /** Divides two values (scalar or vector) */ + eImplicitNodeTypeConstant = 5, /** A constant scalar value */ + eImplicitNodeTypeConstVec = 6, /** A constant vector value */ + eImplicitNodeTypeConstMat = 7, /** A constant matrix value */ + eImplicitNodeTypeComposeVector = 8, /** Creates a vector from three scalar values */ + eImplicitNodeTypeDecomposeVector = 9, /** Decomposes a vector into three scalar values */ + eImplicitNodeTypeComposeMatrix = 10, /** Creates a matrix from nine scalar values */ + eImplicitNodeTypeMatrixFromColumns = 11, /** Creates a matrix from three column vector values */ + eImplicitNodeTypeMatrixFromRows = 12, /** Creates a matrix from three row vector values */ + eImplicitNodeTypeDot = 13, /** Calculates the dot product of two vector values */ + eImplicitNodeTypeCross = 14, /** Calculates the cross product of two vector values */ + eImplicitNodeTypeMatVecMultiplication = 15, /** Multiplies a matrix with a vector */ + eImplicitNodeTypeTranspose = 16, /** Transposes a matrix */ + eImplicitNodeTypeInverse = 17, /** Computes the inverse of a matrix */ + eImplicitNodeTypeSinus = 18, /** Calculates the sinus */ + eImplicitNodeTypeCosinus = 19, /** Calculates the cosinus */ + eImplicitNodeTypeTan = 20, /** Calculates the tangent */ + eImplicitNodeTypeArcSin = 21, /** Calculates the arcsinus */ + eImplicitNodeTypeArcCos = 22, /** Calculates the arccosinus */ + eImplicitNodeTypeArcTan = 23, /** Calculates the arctangent */ + eImplicitNodeTypeArcTan2 = 24, /** Calculates the arctangent */ + eImplicitNodeTypeMin = 25, /** Calculates the minimum tow values */ + eImplicitNodeTypeMax = 26, /** Calculates the maximum of two values */ + eImplicitNodeTypeAbs = 27, /** Calcul the absolute value */ + eImplicitNodeTypeFmod = 28, /** Computes the remainder of the divison of the inputs (same behavior as C fmod) */ + eImplicitNodeTypePow = 29, /** Calculates the power A^B */ + eImplicitNodeTypeSqrt = 30, /** Calculates the square root */ + eImplicitNodeTypeExp = 31, /** Exponential function */ + eImplicitNodeTypeLog = 32, /** Natural logarithmus */ + eImplicitNodeTypeLog2 = 33, /** Logarithmus to the base 2 */ + eImplicitNodeTypeLog10 = 34, /** Logarithmus to the base 10 */ + eImplicitNodeTypeSelect = 35, /** If A is less B returns C, else D */ + eImplicitNodeTypeClamp = 36, /** Clamps the input value to min and max */ + eImplicitNodeTypeSinh = 37, /** Calculates the hyperbolic sine */ + eImplicitNodeTypeCosh = 38, /** Calculates the hyperbolic cosine */ + eImplicitNodeTypeTanh = 39, /** Calculates the hyperbolic tangent */ + eImplicitNodeTypeRound = 40, /** Rounds a scalar value to the nearest integer */ + eImplicitNodeTypeCeil = 41, /** Rounds a scalar value up to the nearest integer */ + eImplicitNodeTypeFloor = 42, /** Rounds a scalar value down to the nearest integer */ + eImplicitNodeTypeSign = 43, /** Returns the sign */ + eImplicitNodeTypeFract = 44, /** Returns the fractional part */ + eImplicitNodeTypeFunctionCall = 45, /** Calls a function */ + eImplicitNodeTypeMesh = 46, /** Calculates the signed distance to a mesh */ + eImplicitNodeTypeLength = 47, /** Calculates the length of a vector */ + eImplicitNodeTypeConstResourceID = 48, /** Selects a resource (function, mesh etc.) */ + eImplicitNodeTypeVectorFromScalar = 49, /** Creates a vector from one scalar values */ + eImplicitNodeTypeUnsignedMesh = 50, /** Calculates the unsigned distance to a mesh */ + eImplicitNodeTypeMod = 51 /** Calculates the modulo of two values (same behaviour as glsl mod) */ +} eLib3MFImplicitNodeType; + +/** +* enum eLib3MFImplicitPortType - The type of the port +*/ +typedef enum eLib3MFImplicitPortType { + eImplicitPortTypeScalar = 1, /** Scalar */ + eImplicitPortTypeVector = 2, /** Vector */ + eImplicitPortTypeMatrix = 3, /** 4x4 Matrix */ + eImplicitPortTypeResourceID = 4 /** Resource ID */ +} eLib3MFImplicitPortType; + +/** +* enum eLib3MFImplicitNodeConfiguration - Defines the input and output types of a node +*/ +typedef enum eLib3MFImplicitNodeConfiguration { + eImplicitNodeConfigurationDefault = 1, /** Default */ + eImplicitNodeConfigurationScalarToScalar = 2, /** Scalar -> Scalar */ + eImplicitNodeConfigurationVectorToVector = 3, /** Vector -> Vector */ + eImplicitNodeConfigurationMatrixToMatrix = 4 /** Matrix -> Matrix */ +} eLib3MFImplicitNodeConfiguration; + typedef enum eLib3MFEncryptionAlgorithm { eEncryptionAlgorithmAES256_GCM = 1 /** http://www.w3.org/2009/xmlenc11#aes256-gcm */ } eLib3MFEncryptionAlgorithm; @@ -433,6 +613,36 @@ typedef union { int m_code; } structEnumLib3MFBlendMethod; +typedef union { + eLib3MFChannelName m_enum; + int m_code; +} structEnumLib3MFChannelName; + +typedef union { + eLib3MFCompositionMethod m_enum; + int m_code; +} structEnumLib3MFCompositionMethod; + +typedef union { + eLib3MFCompositionSpace m_enum; + int m_code; +} structEnumLib3MFCompositionSpace; + +typedef union { + eLib3MFImplicitNodeType m_enum; + int m_code; +} structEnumLib3MFImplicitNodeType; + +typedef union { + eLib3MFImplicitPortType m_enum; + int m_code; +} structEnumLib3MFImplicitPortType; + +typedef union { + eLib3MFImplicitNodeConfiguration m_enum; + int m_code; +} structEnumLib3MFImplicitNodeConfiguration; + typedef union { eLib3MFEncryptionAlgorithm m_enum; int m_code; @@ -523,6 +733,14 @@ typedef struct sLib3MFBall { Lib3MF_double m_Radius; } sLib3MFBall; +typedef struct sLib3MFVector { + Lib3MF_double m_Coordinates[3]; +} sLib3MFVector; + +typedef struct sLib3MFMatrix4x4 { + Lib3MF_double m_Field[4][4]; +} sLib3MFMatrix4x4; + #pragma pack () /************************************************************************************************************************* diff --git a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc index e1cec341d..2bef1bdf1 100644 --- a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.cc @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -96,6 +96,9 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup = NULL; pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials = NULL; pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup = NULL; + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = NULL; + pWrapperTable->m_FunctionIterator_GetCurrentFunction = NULL; + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = NULL; pWrapperTable->m_MetaData_GetNameSpace = NULL; pWrapperTable->m_MetaData_SetNameSpace = NULL; pWrapperTable->m_MetaData_GetName = NULL; @@ -121,6 +124,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Object_SetPartNumber = NULL; pWrapperTable->m_Object_IsMeshObject = NULL; pWrapperTable->m_Object_IsComponentsObject = NULL; + pWrapperTable->m_Object_IsLevelSetObject = NULL; pWrapperTable->m_Object_IsValid = NULL; pWrapperTable->m_Object_SetAttachmentAsThumbnail = NULL; pWrapperTable->m_Object_GetThumbnailAttachment = NULL; @@ -155,6 +159,24 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_MeshObject_SetGeometry = NULL; pWrapperTable->m_MeshObject_IsManifoldAndOriented = NULL; pWrapperTable->m_MeshObject_BeamLattice = NULL; + pWrapperTable->m_MeshObject_GetVolumeData = NULL; + pWrapperTable->m_MeshObject_SetVolumeData = NULL; + pWrapperTable->m_LevelSet_GetFunction = NULL; + pWrapperTable->m_LevelSet_SetFunction = NULL; + pWrapperTable->m_LevelSet_GetTransform = NULL; + pWrapperTable->m_LevelSet_SetTransform = NULL; + pWrapperTable->m_LevelSet_GetChannelName = NULL; + pWrapperTable->m_LevelSet_SetChannelName = NULL; + pWrapperTable->m_LevelSet_SetMinFeatureSize = NULL; + pWrapperTable->m_LevelSet_GetMinFeatureSize = NULL; + pWrapperTable->m_LevelSet_SetFallBackValue = NULL; + pWrapperTable->m_LevelSet_GetFallBackValue = NULL; + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = NULL; + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = NULL; + pWrapperTable->m_LevelSet_SetMesh = NULL; + pWrapperTable->m_LevelSet_GetMesh = NULL; + pWrapperTable->m_LevelSet_GetVolumeData = NULL; + pWrapperTable->m_LevelSet_SetVolumeData = NULL; pWrapperTable->m_BeamLattice_GetMinLength = NULL; pWrapperTable->m_BeamLattice_SetMinLength = NULL; pWrapperTable->m_BeamLattice_GetClipping = NULL; @@ -178,6 +200,35 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_BeamLattice_GetBeamSetCount = NULL; pWrapperTable->m_BeamLattice_AddBeamSet = NULL; pWrapperTable->m_BeamLattice_GetBeamSet = NULL; + pWrapperTable->m_FunctionReference_GetFunctionResourceID = NULL; + pWrapperTable->m_FunctionReference_SetFunctionResourceID = NULL; + pWrapperTable->m_FunctionReference_GetTransform = NULL; + pWrapperTable->m_FunctionReference_SetTransform = NULL; + pWrapperTable->m_FunctionReference_GetChannelName = NULL; + pWrapperTable->m_FunctionReference_SetChannelName = NULL; + pWrapperTable->m_FunctionReference_SetMinFeatureSize = NULL; + pWrapperTable->m_FunctionReference_GetMinFeatureSize = NULL; + pWrapperTable->m_FunctionReference_SetFallBackValue = NULL; + pWrapperTable->m_FunctionReference_GetFallBackValue = NULL; + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = NULL; + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = NULL; + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = NULL; + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = NULL; + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = NULL; + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = NULL; + pWrapperTable->m_VolumeDataProperty_GetName = NULL; + pWrapperTable->m_VolumeDataProperty_SetIsRequired = NULL; + pWrapperTable->m_VolumeDataProperty_IsRequired = NULL; + pWrapperTable->m_VolumeData_GetComposite = NULL; + pWrapperTable->m_VolumeData_CreateNewComposite = NULL; + pWrapperTable->m_VolumeData_RemoveComposite = NULL; + pWrapperTable->m_VolumeData_GetColor = NULL; + pWrapperTable->m_VolumeData_CreateNewColor = NULL; + pWrapperTable->m_VolumeData_RemoveColor = NULL; + pWrapperTable->m_VolumeData_GetPropertyCount = NULL; + pWrapperTable->m_VolumeData_GetProperty = NULL; + pWrapperTable->m_VolumeData_AddPropertyFromFunction = NULL; + pWrapperTable->m_VolumeData_RemoveProperty = NULL; pWrapperTable->m_Component_GetObjectResource = NULL; pWrapperTable->m_Component_GetObjectResourceID = NULL; pWrapperTable->m_Component_GetUUID = NULL; @@ -234,6 +285,19 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_MultiPropertyGroup_AddLayer = NULL; pWrapperTable->m_MultiPropertyGroup_GetLayer = NULL; pWrapperTable->m_MultiPropertyGroup_RemoveLayer = NULL; + pWrapperTable->m_Image3D_GetName = NULL; + pWrapperTable->m_Image3D_SetName = NULL; + pWrapperTable->m_Image3D_IsImageStack = NULL; + pWrapperTable->m_ImageStack_GetRowCount = NULL; + pWrapperTable->m_ImageStack_SetRowCount = NULL; + pWrapperTable->m_ImageStack_GetColumnCount = NULL; + pWrapperTable->m_ImageStack_SetColumnCount = NULL; + pWrapperTable->m_ImageStack_GetSheetCount = NULL; + pWrapperTable->m_ImageStack_GetSheet = NULL; + pWrapperTable->m_ImageStack_SetSheet = NULL; + pWrapperTable->m_ImageStack_CreateEmptySheet = NULL; + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = NULL; + pWrapperTable->m_ImageStack_CreateSheetFromFile = NULL; pWrapperTable->m_Attachment_GetPath = NULL; pWrapperTable->m_Attachment_SetPath = NULL; pWrapperTable->m_Attachment_PackagePart = NULL; @@ -253,6 +317,173 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Texture2D_SetTileStyleUV = NULL; pWrapperTable->m_Texture2D_GetFilter = NULL; pWrapperTable->m_Texture2D_SetFilter = NULL; + pWrapperTable->m_ImplicitPort_GetIdentifier = NULL; + pWrapperTable->m_ImplicitPort_SetIdentifier = NULL; + pWrapperTable->m_ImplicitPort_GetDisplayName = NULL; + pWrapperTable->m_ImplicitPort_SetDisplayName = NULL; + pWrapperTable->m_ImplicitPort_SetType = NULL; + pWrapperTable->m_ImplicitPort_GetType = NULL; + pWrapperTable->m_ImplicitPort_GetReference = NULL; + pWrapperTable->m_ImplicitPort_SetReference = NULL; + pWrapperTable->m_Iterator_MoveNext = NULL; + pWrapperTable->m_Iterator_MovePrevious = NULL; + pWrapperTable->m_Iterator_Count = NULL; + pWrapperTable->m_ImplicitPortIterator_GetCurrent = NULL; + pWrapperTable->m_ImplicitNode_GetIdentifier = NULL; + pWrapperTable->m_ImplicitNode_SetIdentifier = NULL; + pWrapperTable->m_ImplicitNode_GetDisplayName = NULL; + pWrapperTable->m_ImplicitNode_SetDisplayName = NULL; + pWrapperTable->m_ImplicitNode_GetTag = NULL; + pWrapperTable->m_ImplicitNode_SetTag = NULL; + pWrapperTable->m_ImplicitNode_GetNodeType = NULL; + pWrapperTable->m_ImplicitNode_AddInput = NULL; + pWrapperTable->m_ImplicitNode_GetInputs = NULL; + pWrapperTable->m_ImplicitNode_AddOutput = NULL; + pWrapperTable->m_ImplicitNode_GetOutputs = NULL; + pWrapperTable->m_ImplicitNode_FindInput = NULL; + pWrapperTable->m_ImplicitNode_FindOutput = NULL; + pWrapperTable->m_ImplicitNode_AreTypesValid = NULL; + pWrapperTable->m_OneInputNode_GetInputA = NULL; + pWrapperTable->m_OneInputNode_GetOutputResult = NULL; + pWrapperTable->m_ResourceIdNode_SetResource = NULL; + pWrapperTable->m_ResourceIdNode_GetResource = NULL; + pWrapperTable->m_ResourceIdNode_GetOutputValue = NULL; + pWrapperTable->m_TwoInputNode_GetInputB = NULL; + pWrapperTable->m_SelectNode_GetInputB = NULL; + pWrapperTable->m_SelectNode_GetInputC = NULL; + pWrapperTable->m_SelectNode_GetInputD = NULL; + pWrapperTable->m_ClampNode_GetInputMin = NULL; + pWrapperTable->m_ClampNode_GetInputMax = NULL; + pWrapperTable->m_ComposeVectorNode_GetInputX = NULL; + pWrapperTable->m_ComposeVectorNode_GetInputY = NULL; + pWrapperTable->m_ComposeVectorNode_GetInputZ = NULL; + pWrapperTable->m_ComposeVectorNode_GetOutputResult = NULL; + pWrapperTable->m_DecomposeVectorNode_GetInputA = NULL; + pWrapperTable->m_DecomposeVectorNode_GetOutputX = NULL; + pWrapperTable->m_DecomposeVectorNode_GetOutputY = NULL; + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputA = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputB = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputC = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputD = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = NULL; + pWrapperTable->m_ConstantNode_SetConstant = NULL; + pWrapperTable->m_ConstantNode_GetConstant = NULL; + pWrapperTable->m_ConstantNode_GetOutputValue = NULL; + pWrapperTable->m_ConstVecNode_SetVector = NULL; + pWrapperTable->m_ConstVecNode_GetVector = NULL; + pWrapperTable->m_ConstVecNode_GetOutputVector = NULL; + pWrapperTable->m_ConstMatNode_SetMatrix = NULL; + pWrapperTable->m_ConstMatNode_GetMatrix = NULL; + pWrapperTable->m_ConstMatNode_GetOutputMatrix = NULL; + pWrapperTable->m_MeshNode_GetInputMesh = NULL; + pWrapperTable->m_MeshNode_GetInputPos = NULL; + pWrapperTable->m_MeshNode_GetOutputDistance = NULL; + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = NULL; + pWrapperTable->m_UnsignedMeshNode_GetInputPos = NULL; + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = NULL; + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = NULL; + pWrapperTable->m_NodeIterator_GetCurrent = NULL; + pWrapperTable->m_Function_GetDisplayName = NULL; + pWrapperTable->m_Function_SetDisplayName = NULL; + pWrapperTable->m_Function_AddInput = NULL; + pWrapperTable->m_Function_GetInputs = NULL; + pWrapperTable->m_Function_RemoveInput = NULL; + pWrapperTable->m_Function_AddOutput = NULL; + pWrapperTable->m_Function_GetOutputs = NULL; + pWrapperTable->m_Function_RemoveOutput = NULL; + pWrapperTable->m_Function_FindInput = NULL; + pWrapperTable->m_Function_FindOutput = NULL; + pWrapperTable->m_ImplicitFunction_GetIdentifier = NULL; + pWrapperTable->m_ImplicitFunction_SetIdentifier = NULL; + pWrapperTable->m_ImplicitFunction_AddNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSinNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCosNode = NULL; + pWrapperTable->m_ImplicitFunction_AddTanNode = NULL; + pWrapperTable->m_ImplicitFunction_AddArcSinNode = NULL; + pWrapperTable->m_ImplicitFunction_AddArcCosNode = NULL; + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = NULL; + pWrapperTable->m_ImplicitFunction_AddSinhNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCoshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddTanhNode = NULL; + pWrapperTable->m_ImplicitFunction_AddRoundNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCeilNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFloorNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSignNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFractNode = NULL; + pWrapperTable->m_ImplicitFunction_AddAbsNode = NULL; + pWrapperTable->m_ImplicitFunction_AddExpNode = NULL; + pWrapperTable->m_ImplicitFunction_AddLogNode = NULL; + pWrapperTable->m_ImplicitFunction_AddLog2Node = NULL; + pWrapperTable->m_ImplicitFunction_AddLog10Node = NULL; + pWrapperTable->m_ImplicitFunction_AddLengthNode = NULL; + pWrapperTable->m_ImplicitFunction_AddTransposeNode = NULL; + pWrapperTable->m_ImplicitFunction_InverseNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSqrtNode = NULL; + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = NULL; + pWrapperTable->m_ImplicitFunction_AddAdditionNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = NULL; + pWrapperTable->m_ImplicitFunction_AddDivisionNode = NULL; + pWrapperTable->m_ImplicitFunction_AddDotNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCrossNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMinNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMaxNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFmodNode = NULL; + pWrapperTable->m_ImplicitFunction_AddPowNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSelectNode = NULL; + pWrapperTable->m_ImplicitFunction_AddClampNode = NULL; + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = NULL; + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = NULL; + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = NULL; + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = NULL; + pWrapperTable->m_ImplicitFunction_AddConstantNode = NULL; + pWrapperTable->m_ImplicitFunction_AddConstVecNode = NULL; + pWrapperTable->m_ImplicitFunction_AddConstMatNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMeshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = NULL; + pWrapperTable->m_ImplicitFunction_GetNodes = NULL; + pWrapperTable->m_ImplicitFunction_RemoveNode = NULL; + pWrapperTable->m_ImplicitFunction_AddLink = NULL; + pWrapperTable->m_ImplicitFunction_AddLinkByNames = NULL; + pWrapperTable->m_ImplicitFunction_Clear = NULL; + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = NULL; + pWrapperTable->m_FunctionFromImage3D_GetImage3D = NULL; + pWrapperTable->m_FunctionFromImage3D_SetImage3D = NULL; + pWrapperTable->m_FunctionFromImage3D_SetFilter = NULL; + pWrapperTable->m_FunctionFromImage3D_GetFilter = NULL; + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = NULL; + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = NULL; + pWrapperTable->m_FunctionFromImage3D_GetOffset = NULL; + pWrapperTable->m_FunctionFromImage3D_SetOffset = NULL; + pWrapperTable->m_FunctionFromImage3D_GetScale = NULL; + pWrapperTable->m_FunctionFromImage3D_SetScale = NULL; pWrapperTable->m_BuildItem_GetObjectResource = NULL; pWrapperTable->m_BuildItem_GetUUID = NULL; pWrapperTable->m_BuildItem_SetUUID = NULL; @@ -347,6 +578,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_GetComponentsObjectByID = NULL; pWrapperTable->m_Model_GetColorGroupByID = NULL; pWrapperTable->m_Model_GetSliceStackByID = NULL; + pWrapperTable->m_Model_GetLevelSetByID = NULL; pWrapperTable->m_Model_GetBuildUUID = NULL; pWrapperTable->m_Model_SetBuildUUID = NULL; pWrapperTable->m_Model_GetBuildItems = NULL; @@ -362,7 +594,9 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_GetCompositeMaterials = NULL; pWrapperTable->m_Model_GetMultiPropertyGroups = NULL; pWrapperTable->m_Model_GetSliceStacks = NULL; + pWrapperTable->m_Model_GetImage3Ds = NULL; pWrapperTable->m_Model_MergeToModel = NULL; + pWrapperTable->m_Model_MergeFromModel = NULL; pWrapperTable->m_Model_AddMeshObject = NULL; pWrapperTable->m_Model_AddComponentsObject = NULL; pWrapperTable->m_Model_AddSliceStack = NULL; @@ -372,6 +606,8 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_AddTexture2DGroup = NULL; pWrapperTable->m_Model_AddCompositeMaterials = NULL; pWrapperTable->m_Model_AddMultiPropertyGroup = NULL; + pWrapperTable->m_Model_AddImageStack = NULL; + pWrapperTable->m_Model_GetImageStackByID = NULL; pWrapperTable->m_Model_AddBuildItem = NULL; pWrapperTable->m_Model_RemoveBuildItem = NULL; pWrapperTable->m_Model_GetMetaDataGroup = NULL; @@ -388,6 +624,13 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_RemoveCustomContentType = NULL; pWrapperTable->m_Model_SetRandomNumberCallback = NULL; pWrapperTable->m_Model_GetKeyStore = NULL; + pWrapperTable->m_Model_GetFunctions = NULL; + pWrapperTable->m_Model_AddImplicitFunction = NULL; + pWrapperTable->m_Model_AddFunctionFromImage3D = NULL; + pWrapperTable->m_Model_AddVolumeData = NULL; + pWrapperTable->m_Model_AddLevelSet = NULL; + pWrapperTable->m_Model_GetLevelSets = NULL; + pWrapperTable->m_Model_RemoveResource = NULL; pWrapperTable->m_GetLibraryVersion = NULL; pWrapperTable->m_GetPrereleaseInformation = NULL; pWrapperTable->m_GetBuildInformation = NULL; @@ -893,6 +1136,33 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = (PLib3MFImage3DIterator_GetCurrentImage3DPtr) GetProcAddress(hLibrary, "lib3mf_image3diterator_getcurrentimage3d"); + #else // _WIN32 + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = (PLib3MFImage3DIterator_GetCurrentImage3DPtr) dlsym(hLibrary, "lib3mf_image3diterator_getcurrentimage3d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3DIterator_GetCurrentImage3D == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionIterator_GetCurrentFunction = (PLib3MFFunctionIterator_GetCurrentFunctionPtr) GetProcAddress(hLibrary, "lib3mf_functioniterator_getcurrentfunction"); + #else // _WIN32 + pWrapperTable->m_FunctionIterator_GetCurrentFunction = (PLib3MFFunctionIterator_GetCurrentFunctionPtr) dlsym(hLibrary, "lib3mf_functioniterator_getcurrentfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionIterator_GetCurrentFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = (PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) GetProcAddress(hLibrary, "lib3mf_levelsetiterator_getcurrentlevelset"); + #else // _WIN32 + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = (PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) dlsym(hLibrary, "lib3mf_levelsetiterator_getcurrentlevelset"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_MetaData_GetNameSpace = (PLib3MFMetaData_GetNameSpacePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getnamespace"); #else // _WIN32 @@ -1118,6 +1388,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Object_IsComponentsObject == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_islevelsetobject"); + #else // _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) dlsym(hLibrary, "lib3mf_object_islevelsetobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_IsLevelSetObject == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Object_IsValid = (PLib3MFObject_IsValidPtr) GetProcAddress(hLibrary, "lib3mf_object_isvalid"); #else // _WIN32 @@ -1424,6 +1703,168 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_MeshObject_BeamLattice == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetVolumeData = (PLib3MFMeshObject_GetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getvolumedata"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetVolumeData = (PLib3MFMeshObject_GetVolumeDataPtr) dlsym(hLibrary, "lib3mf_meshobject_getvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_SetVolumeData = (PLib3MFMeshObject_SetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setvolumedata"); + #else // _WIN32 + pWrapperTable->m_MeshObject_SetVolumeData = (PLib3MFMeshObject_SetVolumeDataPtr) dlsym(hLibrary, "lib3mf_meshobject_setvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_SetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetFunction = (PLib3MFLevelSet_GetFunctionPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getfunction"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetFunction = (PLib3MFLevelSet_GetFunctionPtr) dlsym(hLibrary, "lib3mf_levelset_getfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetFunction = (PLib3MFLevelSet_SetFunctionPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setfunction"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetFunction = (PLib3MFLevelSet_SetFunctionPtr) dlsym(hLibrary, "lib3mf_levelset_setfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetTransform = (PLib3MFLevelSet_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_levelset_gettransform"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetTransform = (PLib3MFLevelSet_GetTransformPtr) dlsym(hLibrary, "lib3mf_levelset_gettransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetTransform = (PLib3MFLevelSet_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_levelset_settransform"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetTransform = (PLib3MFLevelSet_SetTransformPtr) dlsym(hLibrary, "lib3mf_levelset_settransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetChannelName = (PLib3MFLevelSet_GetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getchannelname"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetChannelName = (PLib3MFLevelSet_GetChannelNamePtr) dlsym(hLibrary, "lib3mf_levelset_getchannelname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetChannelName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetChannelName = (PLib3MFLevelSet_SetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setchannelname"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetChannelName = (PLib3MFLevelSet_SetChannelNamePtr) dlsym(hLibrary, "lib3mf_levelset_setchannelname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetChannelName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMinFeatureSize = (PLib3MFLevelSet_SetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setminfeaturesize"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMinFeatureSize = (PLib3MFLevelSet_SetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_levelset_setminfeaturesize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMinFeatureSize == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMinFeatureSize = (PLib3MFLevelSet_GetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getminfeaturesize"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMinFeatureSize = (PLib3MFLevelSet_GetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_levelset_getminfeaturesize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMinFeatureSize == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetFallBackValue = (PLib3MFLevelSet_SetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setfallbackvalue"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetFallBackValue = (PLib3MFLevelSet_SetFallBackValuePtr) dlsym(hLibrary, "lib3mf_levelset_setfallbackvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetFallBackValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetFallBackValue = (PLib3MFLevelSet_GetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getfallbackvalue"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetFallBackValue = (PLib3MFLevelSet_GetFallBackValuePtr) dlsym(hLibrary, "lib3mf_levelset_getfallbackvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetFallBackValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = (PLib3MFLevelSet_SetMeshBBoxOnlyPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setmeshbboxonly"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = (PLib3MFLevelSet_SetMeshBBoxOnlyPtr) dlsym(hLibrary, "lib3mf_levelset_setmeshbboxonly"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMeshBBoxOnly == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = (PLib3MFLevelSet_GetMeshBBoxOnlyPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getmeshbboxonly"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = (PLib3MFLevelSet_GetMeshBBoxOnlyPtr) dlsym(hLibrary, "lib3mf_levelset_getmeshbboxonly"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMeshBBoxOnly == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMesh = (PLib3MFLevelSet_SetMeshPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setmesh"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMesh = (PLib3MFLevelSet_SetMeshPtr) dlsym(hLibrary, "lib3mf_levelset_setmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMesh = (PLib3MFLevelSet_GetMeshPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getmesh"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMesh = (PLib3MFLevelSet_GetMeshPtr) dlsym(hLibrary, "lib3mf_levelset_getmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetVolumeData = (PLib3MFLevelSet_GetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getvolumedata"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetVolumeData = (PLib3MFLevelSet_GetVolumeDataPtr) dlsym(hLibrary, "lib3mf_levelset_getvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetVolumeData = (PLib3MFLevelSet_SetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setvolumedata"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetVolumeData = (PLib3MFLevelSet_SetVolumeDataPtr) dlsym(hLibrary, "lib3mf_levelset_setvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_BeamLattice_GetMinLength = (PLib3MFBeamLattice_GetMinLengthPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getminlength"); #else // _WIN32 @@ -1632,678 +2073,2559 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresource"); + pWrapperTable->m_FunctionReference_GetFunctionResourceID = (PLib3MFFunctionReference_GetFunctionResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getfunctionresourceid"); #else // _WIN32 - pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) dlsym(hLibrary, "lib3mf_component_getobjectresource"); + pWrapperTable->m_FunctionReference_GetFunctionResourceID = (PLib3MFFunctionReference_GetFunctionResourceIDPtr) dlsym(hLibrary, "lib3mf_functionreference_getfunctionresourceid"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetObjectResource == NULL) + if (pWrapperTable->m_FunctionReference_GetFunctionResourceID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresourceid"); + pWrapperTable->m_FunctionReference_SetFunctionResourceID = (PLib3MFFunctionReference_SetFunctionResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setfunctionresourceid"); #else // _WIN32 - pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) dlsym(hLibrary, "lib3mf_component_getobjectresourceid"); + pWrapperTable->m_FunctionReference_SetFunctionResourceID = (PLib3MFFunctionReference_SetFunctionResourceIDPtr) dlsym(hLibrary, "lib3mf_functionreference_setfunctionresourceid"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetObjectResourceID == NULL) + if (pWrapperTable->m_FunctionReference_SetFunctionResourceID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getuuid"); + pWrapperTable->m_FunctionReference_GetTransform = (PLib3MFFunctionReference_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_gettransform"); #else // _WIN32 - pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) dlsym(hLibrary, "lib3mf_component_getuuid"); + pWrapperTable->m_FunctionReference_GetTransform = (PLib3MFFunctionReference_GetTransformPtr) dlsym(hLibrary, "lib3mf_functionreference_gettransform"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetUUID == NULL) + if (pWrapperTable->m_FunctionReference_GetTransform == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_setuuid"); + pWrapperTable->m_FunctionReference_SetTransform = (PLib3MFFunctionReference_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_settransform"); #else // _WIN32 - pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) dlsym(hLibrary, "lib3mf_component_setuuid"); + pWrapperTable->m_FunctionReference_SetTransform = (PLib3MFFunctionReference_SetTransformPtr) dlsym(hLibrary, "lib3mf_functionreference_settransform"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_SetUUID == NULL) + if (pWrapperTable->m_FunctionReference_SetTransform == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_hastransform"); + pWrapperTable->m_FunctionReference_GetChannelName = (PLib3MFFunctionReference_GetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getchannelname"); #else // _WIN32 - pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) dlsym(hLibrary, "lib3mf_component_hastransform"); + pWrapperTable->m_FunctionReference_GetChannelName = (PLib3MFFunctionReference_GetChannelNamePtr) dlsym(hLibrary, "lib3mf_functionreference_getchannelname"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_HasTransform == NULL) + if (pWrapperTable->m_FunctionReference_GetChannelName == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_gettransform"); + pWrapperTable->m_FunctionReference_SetChannelName = (PLib3MFFunctionReference_SetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setchannelname"); #else // _WIN32 - pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) dlsym(hLibrary, "lib3mf_component_gettransform"); + pWrapperTable->m_FunctionReference_SetChannelName = (PLib3MFFunctionReference_SetChannelNamePtr) dlsym(hLibrary, "lib3mf_functionreference_setchannelname"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetTransform == NULL) + if (pWrapperTable->m_FunctionReference_SetChannelName == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_settransform"); + pWrapperTable->m_FunctionReference_SetMinFeatureSize = (PLib3MFFunctionReference_SetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setminfeaturesize"); #else // _WIN32 - pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) dlsym(hLibrary, "lib3mf_component_settransform"); + pWrapperTable->m_FunctionReference_SetMinFeatureSize = (PLib3MFFunctionReference_SetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_functionreference_setminfeaturesize"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_SetTransform == NULL) + if (pWrapperTable->m_FunctionReference_SetMinFeatureSize == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_addcomponent"); + pWrapperTable->m_FunctionReference_GetMinFeatureSize = (PLib3MFFunctionReference_GetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getminfeaturesize"); #else // _WIN32 - pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_addcomponent"); + pWrapperTable->m_FunctionReference_GetMinFeatureSize = (PLib3MFFunctionReference_GetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_functionreference_getminfeaturesize"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_AddComponent == NULL) + if (pWrapperTable->m_FunctionReference_GetMinFeatureSize == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponent"); + pWrapperTable->m_FunctionReference_SetFallBackValue = (PLib3MFFunctionReference_SetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setfallbackvalue"); #else // _WIN32 - pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponent"); + pWrapperTable->m_FunctionReference_SetFallBackValue = (PLib3MFFunctionReference_SetFallBackValuePtr) dlsym(hLibrary, "lib3mf_functionreference_setfallbackvalue"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_GetComponent == NULL) + if (pWrapperTable->m_FunctionReference_SetFallBackValue == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + pWrapperTable->m_FunctionReference_GetFallBackValue = (PLib3MFFunctionReference_GetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getfallbackvalue"); #else // _WIN32 - pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + pWrapperTable->m_FunctionReference_GetFallBackValue = (PLib3MFFunctionReference_GetFallBackValuePtr) dlsym(hLibrary, "lib3mf_functionreference_getfallbackvalue"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_GetComponentCount == NULL) + if (pWrapperTable->m_FunctionReference_GetFallBackValue == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_setname"); + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = (PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getbasematerialgroup"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) dlsym(hLibrary, "lib3mf_beamset_setname"); + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = (PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getbasematerialgroup"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetName == NULL) + if (pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_getname"); + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = (PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_setbasematerialgroup"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) dlsym(hLibrary, "lib3mf_beamset_getname"); + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = (PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_setbasematerialgroup"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetName == NULL) + if (pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = (PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getmaterialmappingcount"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_setidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = (PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getmaterialmappingcount"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetIdentifier == NULL) + if (pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = (PLib3MFVolumeDataComposite_GetMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getmaterialmapping"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_getidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = (PLib3MFVolumeDataComposite_GetMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getmaterialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_GetMaterialMapping == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = (PLib3MFVolumeDataComposite_AddMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_addmaterialmapping"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = (PLib3MFVolumeDataComposite_AddMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_addmaterialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_AddMaterialMapping == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = (PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_removematerialmapping"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = (PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_removematerialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_GetName = (PLib3MFVolumeDataProperty_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_getname"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_GetName = (PLib3MFVolumeDataProperty_GetNamePtr) dlsym(hLibrary, "lib3mf_volumedataproperty_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_SetIsRequired = (PLib3MFVolumeDataProperty_SetIsRequiredPtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_setisrequired"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_SetIsRequired = (PLib3MFVolumeDataProperty_SetIsRequiredPtr) dlsym(hLibrary, "lib3mf_volumedataproperty_setisrequired"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_SetIsRequired == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_IsRequired = (PLib3MFVolumeDataProperty_IsRequiredPtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_isrequired"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_IsRequired = (PLib3MFVolumeDataProperty_IsRequiredPtr) dlsym(hLibrary, "lib3mf_volumedataproperty_isrequired"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_IsRequired == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetComposite = (PLib3MFVolumeData_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getcomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetComposite = (PLib3MFVolumeData_GetCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_getcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_CreateNewComposite = (PLib3MFVolumeData_CreateNewCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_createnewcomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_CreateNewComposite = (PLib3MFVolumeData_CreateNewCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_createnewcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_CreateNewComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveComposite = (PLib3MFVolumeData_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removecomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveComposite = (PLib3MFVolumeData_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_removecomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetColor = (PLib3MFVolumeData_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getcolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetColor = (PLib3MFVolumeData_GetColorPtr) dlsym(hLibrary, "lib3mf_volumedata_getcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_CreateNewColor = (PLib3MFVolumeData_CreateNewColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_createnewcolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_CreateNewColor = (PLib3MFVolumeData_CreateNewColorPtr) dlsym(hLibrary, "lib3mf_volumedata_createnewcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_CreateNewColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveColor = (PLib3MFVolumeData_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removecolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveColor = (PLib3MFVolumeData_RemoveColorPtr) dlsym(hLibrary, "lib3mf_volumedata_removecolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetPropertyCount = (PLib3MFVolumeData_GetPropertyCountPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getpropertycount"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetPropertyCount = (PLib3MFVolumeData_GetPropertyCountPtr) dlsym(hLibrary, "lib3mf_volumedata_getpropertycount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetPropertyCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetProperty = (PLib3MFVolumeData_GetPropertyPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getproperty"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetProperty = (PLib3MFVolumeData_GetPropertyPtr) dlsym(hLibrary, "lib3mf_volumedata_getproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_AddPropertyFromFunction = (PLib3MFVolumeData_AddPropertyFromFunctionPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_addpropertyfromfunction"); + #else // _WIN32 + pWrapperTable->m_VolumeData_AddPropertyFromFunction = (PLib3MFVolumeData_AddPropertyFromFunctionPtr) dlsym(hLibrary, "lib3mf_volumedata_addpropertyfromfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_AddPropertyFromFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveProperty = (PLib3MFVolumeData_RemovePropertyPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removeproperty"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveProperty = (PLib3MFVolumeData_RemovePropertyPtr) dlsym(hLibrary, "lib3mf_volumedata_removeproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresource"); + #else // _WIN32 + pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) dlsym(hLibrary, "lib3mf_component_getobjectresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetObjectResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresourceid"); + #else // _WIN32 + pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) dlsym(hLibrary, "lib3mf_component_getobjectresourceid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetObjectResourceID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getuuid"); + #else // _WIN32 + pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) dlsym(hLibrary, "lib3mf_component_getuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetUUID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_setuuid"); + #else // _WIN32 + pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) dlsym(hLibrary, "lib3mf_component_setuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_SetUUID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_hastransform"); + #else // _WIN32 + pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) dlsym(hLibrary, "lib3mf_component_hastransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_HasTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_gettransform"); + #else // _WIN32 + pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) dlsym(hLibrary, "lib3mf_component_gettransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_settransform"); + #else // _WIN32 + pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) dlsym(hLibrary, "lib3mf_component_settransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_SetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_addcomponent"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_addcomponent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_AddComponent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponent"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_GetComponent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_GetComponentCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_setname"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) dlsym(hLibrary, "lib3mf_beamset_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_getname"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) dlsym(hLibrary, "lib3mf_beamset_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setidentifier"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getidentifier"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferencecount"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getreferencecount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetReferenceCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferencecount"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferencecount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetBallReferenceCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setballreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setballreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetBallReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetBallReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_AddMaterial == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_removematerial"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_removematerial"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_RemoveMaterial == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getname"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setname"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_SetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_SetDisplayColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetDisplayColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_addcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_addcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_AddColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_removecolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_removecolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_RemoveColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_setcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_setcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_SetColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_AddTex2Coord == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetTex2Coord == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_RemoveTex2Coord == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetTexture2D == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcount"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) dlsym(hLibrary, "lib3mf_compositematerials_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_addcomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_addcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_AddComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_removecomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_removecomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_RemoveComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_getcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getcount"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_AddMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_SetMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetLayerCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addlayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addlayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_AddLayer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetLayer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removelayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removelayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_RemoveLayer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_GetName = (PLib3MFImage3D_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_image3d_getname"); + #else // _WIN32 + pWrapperTable->m_Image3D_GetName = (PLib3MFImage3D_GetNamePtr) dlsym(hLibrary, "lib3mf_image3d_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_SetName = (PLib3MFImage3D_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_image3d_setname"); + #else // _WIN32 + pWrapperTable->m_Image3D_SetName = (PLib3MFImage3D_SetNamePtr) dlsym(hLibrary, "lib3mf_image3d_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_SetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_IsImageStack = (PLib3MFImage3D_IsImageStackPtr) GetProcAddress(hLibrary, "lib3mf_image3d_isimagestack"); + #else // _WIN32 + pWrapperTable->m_Image3D_IsImageStack = (PLib3MFImage3D_IsImageStackPtr) dlsym(hLibrary, "lib3mf_image3d_isimagestack"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_IsImageStack == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetRowCount = (PLib3MFImageStack_GetRowCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getrowcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetRowCount = (PLib3MFImageStack_GetRowCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getrowcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetRowCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetRowCount = (PLib3MFImageStack_SetRowCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setrowcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetRowCount = (PLib3MFImageStack_SetRowCountPtr) dlsym(hLibrary, "lib3mf_imagestack_setrowcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetRowCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetColumnCount = (PLib3MFImageStack_GetColumnCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getcolumncount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetColumnCount = (PLib3MFImageStack_GetColumnCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getcolumncount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetColumnCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetColumnCount = (PLib3MFImageStack_SetColumnCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setcolumncount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetColumnCount = (PLib3MFImageStack_SetColumnCountPtr) dlsym(hLibrary, "lib3mf_imagestack_setcolumncount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetColumnCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetSheetCount = (PLib3MFImageStack_GetSheetCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getsheetcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetSheetCount = (PLib3MFImageStack_GetSheetCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getsheetcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetSheetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetSheet = (PLib3MFImageStack_GetSheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getsheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetSheet = (PLib3MFImageStack_GetSheetPtr) dlsym(hLibrary, "lib3mf_imagestack_getsheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetSheet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetSheet = (PLib3MFImageStack_SetSheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setsheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetSheet = (PLib3MFImageStack_SetSheetPtr) dlsym(hLibrary, "lib3mf_imagestack_setsheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetSheet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateEmptySheet = (PLib3MFImageStack_CreateEmptySheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createemptysheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateEmptySheet = (PLib3MFImageStack_CreateEmptySheetPtr) dlsym(hLibrary, "lib3mf_imagestack_createemptysheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateEmptySheet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = (PLib3MFImageStack_CreateSheetFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createsheetfrombuffer"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = (PLib3MFImageStack_CreateSheetFromBufferPtr) dlsym(hLibrary, "lib3mf_imagestack_createsheetfrombuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateSheetFromBuffer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromFile = (PLib3MFImageStack_CreateSheetFromFilePtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createsheetfromfile"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromFile = (PLib3MFImageStack_CreateSheetFromFilePtr) dlsym(hLibrary, "lib3mf_imagestack_createsheetfromfile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateSheetFromFile == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_getpath"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) dlsym(hLibrary, "lib3mf_attachment_getpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetPath == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_setpath"); + #else // _WIN32 + pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) dlsym(hLibrary, "lib3mf_attachment_setpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_SetPath == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) GetProcAddress(hLibrary, "lib3mf_attachment_packagepart"); + #else // _WIN32 + pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) dlsym(hLibrary, "lib3mf_attachment_packagepart"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_PackagePart == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getrelationshiptype"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_getrelationshiptype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetRelationShipType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_setrelationshiptype"); + #else // _WIN32 + pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_setrelationshiptype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_SetRelationShipType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetofile"); + #else // _WIN32 + pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) dlsym(hLibrary, "lib3mf_attachment_writetofile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_WriteToFile == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromfile"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) dlsym(hLibrary, "lib3mf_attachment_readfromfile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromFile == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromcallback"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) dlsym(hLibrary, "lib3mf_attachment_readfromcallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromCallback == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getstreamsize"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) dlsym(hLibrary, "lib3mf_attachment_getstreamsize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetStreamSize == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetobuffer"); + #else // _WIN32 + pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) dlsym(hLibrary, "lib3mf_attachment_writetobuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_WriteToBuffer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfrombuffer"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) dlsym(hLibrary, "lib3mf_attachment_readfrombuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromBuffer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getattachment"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_getattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetAttachment == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setattachment"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_setattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetAttachment == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getcontenttype"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_getcontenttype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetContentType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setcontenttype"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_setcontenttype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetContentType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetTileStyleUV == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_settilestyleuv"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_settilestyleuv"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetTileStyleUV == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getfilter"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_getfilter"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetFilter == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setfilter"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_setfilter"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetFilter == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetIdentifier = (PLib3MFImplicitPort_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetIdentifier = (PLib3MFImplicitPort_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitport_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetIdentifier = (PLib3MFImplicitPort_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetIdentifier = (PLib3MFImplicitPort_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitport_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetDisplayName = (PLib3MFImplicitPort_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetDisplayName = (PLib3MFImplicitPort_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitport_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetDisplayName = (PLib3MFImplicitPort_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetDisplayName = (PLib3MFImplicitPort_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitport_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetType = (PLib3MFImplicitPort_SetTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_settype"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetType = (PLib3MFImplicitPort_SetTypePtr) dlsym(hLibrary, "lib3mf_implicitport_settype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetType = (PLib3MFImplicitPort_GetTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_gettype"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetType = (PLib3MFImplicitPort_GetTypePtr) dlsym(hLibrary, "lib3mf_implicitport_gettype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetReference = (PLib3MFImplicitPort_GetReferencePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getreference"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetReference = (PLib3MFImplicitPort_GetReferencePtr) dlsym(hLibrary, "lib3mf_implicitport_getreference"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetReference == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetReference = (PLib3MFImplicitPort_SetReferencePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setreference"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetReference = (PLib3MFImplicitPort_SetReferencePtr) dlsym(hLibrary, "lib3mf_implicitport_setreference"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetReference == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_MoveNext = (PLib3MFIterator_MoveNextPtr) GetProcAddress(hLibrary, "lib3mf_iterator_movenext"); + #else // _WIN32 + pWrapperTable->m_Iterator_MoveNext = (PLib3MFIterator_MoveNextPtr) dlsym(hLibrary, "lib3mf_iterator_movenext"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_MoveNext == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_MovePrevious = (PLib3MFIterator_MovePreviousPtr) GetProcAddress(hLibrary, "lib3mf_iterator_moveprevious"); + #else // _WIN32 + pWrapperTable->m_Iterator_MovePrevious = (PLib3MFIterator_MovePreviousPtr) dlsym(hLibrary, "lib3mf_iterator_moveprevious"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_MovePrevious == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_Count = (PLib3MFIterator_CountPtr) GetProcAddress(hLibrary, "lib3mf_iterator_count"); + #else // _WIN32 + pWrapperTable->m_Iterator_Count = (PLib3MFIterator_CountPtr) dlsym(hLibrary, "lib3mf_iterator_count"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_Count == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPortIterator_GetCurrent = (PLib3MFImplicitPortIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_implicitportiterator_getcurrent"); + #else // _WIN32 + pWrapperTable->m_ImplicitPortIterator_GetCurrent = (PLib3MFImplicitPortIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_implicitportiterator_getcurrent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPortIterator_GetCurrent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetIdentifier = (PLib3MFImplicitNode_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetIdentifier = (PLib3MFImplicitNode_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitnode_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetIdentifier = (PLib3MFImplicitNode_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetIdentifier = (PLib3MFImplicitNode_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitnode_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetDisplayName = (PLib3MFImplicitNode_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetDisplayName = (PLib3MFImplicitNode_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitnode_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetDisplayName = (PLib3MFImplicitNode_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetDisplayName = (PLib3MFImplicitNode_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitnode_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetTag = (PLib3MFImplicitNode_GetTagPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_gettag"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetTag = (PLib3MFImplicitNode_GetTagPtr) dlsym(hLibrary, "lib3mf_implicitnode_gettag"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetTag == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetTag = (PLib3MFImplicitNode_SetTagPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_settag"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetTag = (PLib3MFImplicitNode_SetTagPtr) dlsym(hLibrary, "lib3mf_implicitnode_settag"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetTag == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetNodeType = (PLib3MFImplicitNode_GetNodeTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getnodetype"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetNodeType = (PLib3MFImplicitNode_GetNodeTypePtr) dlsym(hLibrary, "lib3mf_implicitnode_getnodetype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetNodeType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AddInput = (PLib3MFImplicitNode_AddInputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_addinput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AddInput = (PLib3MFImplicitNode_AddInputPtr) dlsym(hLibrary, "lib3mf_implicitnode_addinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AddInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetInputs = (PLib3MFImplicitNode_GetInputsPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getinputs"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetInputs = (PLib3MFImplicitNode_GetInputsPtr) dlsym(hLibrary, "lib3mf_implicitnode_getinputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetInputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AddOutput = (PLib3MFImplicitNode_AddOutputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_addoutput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AddOutput = (PLib3MFImplicitNode_AddOutputPtr) dlsym(hLibrary, "lib3mf_implicitnode_addoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AddOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetOutputs = (PLib3MFImplicitNode_GetOutputsPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getoutputs"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetOutputs = (PLib3MFImplicitNode_GetOutputsPtr) dlsym(hLibrary, "lib3mf_implicitnode_getoutputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetOutputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_FindInput = (PLib3MFImplicitNode_FindInputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_findinput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_FindInput = (PLib3MFImplicitNode_FindInputPtr) dlsym(hLibrary, "lib3mf_implicitnode_findinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_FindInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_FindOutput = (PLib3MFImplicitNode_FindOutputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_findoutput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_FindOutput = (PLib3MFImplicitNode_FindOutputPtr) dlsym(hLibrary, "lib3mf_implicitnode_findoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_FindOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AreTypesValid = (PLib3MFImplicitNode_AreTypesValidPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_aretypesvalid"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AreTypesValid = (PLib3MFImplicitNode_AreTypesValidPtr) dlsym(hLibrary, "lib3mf_implicitnode_aretypesvalid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AreTypesValid == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_OneInputNode_GetInputA = (PLib3MFOneInputNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_oneinputnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_OneInputNode_GetInputA = (PLib3MFOneInputNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_oneinputnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_OneInputNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_OneInputNode_GetOutputResult = (PLib3MFOneInputNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_oneinputnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_OneInputNode_GetOutputResult = (PLib3MFOneInputNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_oneinputnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_OneInputNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_SetResource = (PLib3MFResourceIdNode_SetResourcePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_setresource"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_SetResource = (PLib3MFResourceIdNode_SetResourcePtr) dlsym(hLibrary, "lib3mf_resourceidnode_setresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_SetResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_GetResource = (PLib3MFResourceIdNode_GetResourcePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_getresource"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_GetResource = (PLib3MFResourceIdNode_GetResourcePtr) dlsym(hLibrary, "lib3mf_resourceidnode_getresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_GetResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_GetOutputValue = (PLib3MFResourceIdNode_GetOutputValuePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_getoutputvalue"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_GetOutputValue = (PLib3MFResourceIdNode_GetOutputValuePtr) dlsym(hLibrary, "lib3mf_resourceidnode_getoutputvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_GetOutputValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_TwoInputNode_GetInputB = (PLib3MFTwoInputNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_twoinputnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_TwoInputNode_GetInputB = (PLib3MFTwoInputNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_twoinputnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_TwoInputNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputB = (PLib3MFSelectNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputB = (PLib3MFSelectNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputC = (PLib3MFSelectNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputC = (PLib3MFSelectNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputC == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputD = (PLib3MFSelectNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputD = (PLib3MFSelectNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputD == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ClampNode_GetInputMin = (PLib3MFClampNode_GetInputMinPtr) GetProcAddress(hLibrary, "lib3mf_clampnode_getinputmin"); + #else // _WIN32 + pWrapperTable->m_ClampNode_GetInputMin = (PLib3MFClampNode_GetInputMinPtr) dlsym(hLibrary, "lib3mf_clampnode_getinputmin"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ClampNode_GetInputMin == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ClampNode_GetInputMax = (PLib3MFClampNode_GetInputMaxPtr) GetProcAddress(hLibrary, "lib3mf_clampnode_getinputmax"); + #else // _WIN32 + pWrapperTable->m_ClampNode_GetInputMax = (PLib3MFClampNode_GetInputMaxPtr) dlsym(hLibrary, "lib3mf_clampnode_getinputmax"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ClampNode_GetInputMax == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputX = (PLib3MFComposeVectorNode_GetInputXPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputx"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputX = (PLib3MFComposeVectorNode_GetInputXPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputx"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputX == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputY = (PLib3MFComposeVectorNode_GetInputYPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputy"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputY = (PLib3MFComposeVectorNode_GetInputYPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputy"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputY == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputZ = (PLib3MFComposeVectorNode_GetInputZPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputz"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputZ = (PLib3MFComposeVectorNode_GetInputZPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputz"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputZ == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetOutputResult = (PLib3MFComposeVectorNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetOutputResult = (PLib3MFComposeVectorNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_composevectornode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetInputA = (PLib3MFDecomposeVectorNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getinputa"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetInputA = (PLib3MFDecomposeVectorNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputX = (PLib3MFDecomposeVectorNode_GetOutputXPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputx"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputX = (PLib3MFDecomposeVectorNode_GetOutputXPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputx"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputX == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputY = (PLib3MFDecomposeVectorNode_GetOutputYPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputy"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputY = (PLib3MFDecomposeVectorNode_GetOutputYPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputy"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputY == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = (PLib3MFDecomposeVectorNode_GetOutputZPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputz"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = (PLib3MFDecomposeVectorNode_GetOutputZPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputz"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputZ == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = (PLib3MFComposeMatrixNode_GetInputM00Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm00"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = (PLib3MFComposeMatrixNode_GetInputM00Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm00"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM00 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = (PLib3MFComposeMatrixNode_GetInputM01Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm01"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = (PLib3MFComposeMatrixNode_GetInputM01Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm01"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM01 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = (PLib3MFComposeMatrixNode_GetInputM02Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm02"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = (PLib3MFComposeMatrixNode_GetInputM02Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm02"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM02 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = (PLib3MFComposeMatrixNode_GetInputM03Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm03"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = (PLib3MFComposeMatrixNode_GetInputM03Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm03"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM03 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = (PLib3MFComposeMatrixNode_GetInputM10Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm10"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = (PLib3MFComposeMatrixNode_GetInputM10Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm10"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM10 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = (PLib3MFComposeMatrixNode_GetInputM11Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm11"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = (PLib3MFComposeMatrixNode_GetInputM11Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm11"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM11 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = (PLib3MFComposeMatrixNode_GetInputM12Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm12"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = (PLib3MFComposeMatrixNode_GetInputM12Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm12"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM12 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = (PLib3MFComposeMatrixNode_GetInputM13Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm13"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = (PLib3MFComposeMatrixNode_GetInputM13Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm13"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM13 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = (PLib3MFComposeMatrixNode_GetInputM20Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm20"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = (PLib3MFComposeMatrixNode_GetInputM20Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm20"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM20 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = (PLib3MFComposeMatrixNode_GetInputM21Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm21"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = (PLib3MFComposeMatrixNode_GetInputM21Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm21"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM21 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = (PLib3MFComposeMatrixNode_GetInputM22Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm22"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = (PLib3MFComposeMatrixNode_GetInputM22Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm22"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM22 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = (PLib3MFComposeMatrixNode_GetInputM23Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm23"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = (PLib3MFComposeMatrixNode_GetInputM23Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm23"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM23 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = (PLib3MFComposeMatrixNode_GetInputM30Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm30"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = (PLib3MFComposeMatrixNode_GetInputM30Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm30"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM30 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = (PLib3MFComposeMatrixNode_GetInputM31Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm31"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = (PLib3MFComposeMatrixNode_GetInputM31Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm31"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM31 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = (PLib3MFComposeMatrixNode_GetInputM32Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm32"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = (PLib3MFComposeMatrixNode_GetInputM32Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm32"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM32 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = (PLib3MFComposeMatrixNode_GetInputM33Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm33"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = (PLib3MFComposeMatrixNode_GetInputM33Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm33"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM33 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = (PLib3MFComposeMatrixNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = (PLib3MFComposeMatrixNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_composematrixnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputA = (PLib3MFMatrixFromRowsNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputA = (PLib3MFMatrixFromRowsNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputB = (PLib3MFMatrixFromRowsNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputB = (PLib3MFMatrixFromRowsNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputC = (PLib3MFMatrixFromRowsNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputC = (PLib3MFMatrixFromRowsNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputC == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputD = (PLib3MFMatrixFromRowsNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputD = (PLib3MFMatrixFromRowsNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputD == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = (PLib3MFMatrixFromRowsNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = (PLib3MFMatrixFromRowsNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = (PLib3MFMatrixFromColumnsNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = (PLib3MFMatrixFromColumnsNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = (PLib3MFMatrixFromColumnsNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = (PLib3MFMatrixFromColumnsNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = (PLib3MFMatrixFromColumnsNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = (PLib3MFMatrixFromColumnsNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputC == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = (PLib3MFMatrixFromColumnsNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = (PLib3MFMatrixFromColumnsNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputD == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = (PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = (PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_SetConstant = (PLib3MFConstantNode_SetConstantPtr) GetProcAddress(hLibrary, "lib3mf_constantnode_setconstant"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_SetConstant = (PLib3MFConstantNode_SetConstantPtr) dlsym(hLibrary, "lib3mf_constantnode_setconstant"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_SetConstant == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_GetConstant = (PLib3MFConstantNode_GetConstantPtr) GetProcAddress(hLibrary, "lib3mf_constantnode_getconstant"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_GetConstant = (PLib3MFConstantNode_GetConstantPtr) dlsym(hLibrary, "lib3mf_constantnode_getconstant"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_GetConstant == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_GetOutputValue = (PLib3MFConstantNode_GetOutputValuePtr) GetProcAddress(hLibrary, "lib3mf_constantnode_getoutputvalue"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_GetOutputValue = (PLib3MFConstantNode_GetOutputValuePtr) dlsym(hLibrary, "lib3mf_constantnode_getoutputvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_GetOutputValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_SetVector = (PLib3MFConstVecNode_SetVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_setvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_SetVector = (PLib3MFConstVecNode_SetVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_setvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_SetVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_GetVector = (PLib3MFConstVecNode_GetVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_getvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_GetVector = (PLib3MFConstVecNode_GetVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_getvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_GetVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_GetOutputVector = (PLib3MFConstVecNode_GetOutputVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_getoutputvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_GetOutputVector = (PLib3MFConstVecNode_GetOutputVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_getoutputvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_GetOutputVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_SetMatrix = (PLib3MFConstMatNode_SetMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_setmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_SetMatrix = (PLib3MFConstMatNode_SetMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_setmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_SetMatrix == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_GetMatrix = (PLib3MFConstMatNode_GetMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_getmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_GetMatrix = (PLib3MFConstMatNode_GetMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_getmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_GetMatrix == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_GetOutputMatrix = (PLib3MFConstMatNode_GetOutputMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_getoutputmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_GetOutputMatrix = (PLib3MFConstMatNode_GetOutputMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_getoutputmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_GetOutputMatrix == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetInputMesh = (PLib3MFMeshNode_GetInputMeshPtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getinputmesh"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetInputMesh = (PLib3MFMeshNode_GetInputMeshPtr) dlsym(hLibrary, "lib3mf_meshnode_getinputmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetInputMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetInputPos = (PLib3MFMeshNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetInputPos = (PLib3MFMeshNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_meshnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetOutputDistance = (PLib3MFMeshNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetOutputDistance = (PLib3MFMeshNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_meshnode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetOutputDistance == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = (PLib3MFUnsignedMeshNode_GetInputMeshPtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getinputmesh"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = (PLib3MFUnsignedMeshNode_GetInputMeshPtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getinputmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetInputMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputPos = (PLib3MFUnsignedMeshNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputPos = (PLib3MFUnsignedMeshNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = (PLib3MFUnsignedMeshNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = (PLib3MFUnsignedMeshNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetOutputDistance == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionCallNode_GetInputFunctionID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NodeIterator_GetCurrent = (PLib3MFNodeIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_nodeiterator_getcurrent"); + #else // _WIN32 + pWrapperTable->m_NodeIterator_GetCurrent = (PLib3MFNodeIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_nodeiterator_getcurrent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NodeIterator_GetCurrent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetDisplayName = (PLib3MFFunction_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_function_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_Function_GetDisplayName = (PLib3MFFunction_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_function_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_SetDisplayName = (PLib3MFFunction_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_function_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_Function_SetDisplayName = (PLib3MFFunction_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_function_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_SetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_AddInput = (PLib3MFFunction_AddInputPtr) GetProcAddress(hLibrary, "lib3mf_function_addinput"); + #else // _WIN32 + pWrapperTable->m_Function_AddInput = (PLib3MFFunction_AddInputPtr) dlsym(hLibrary, "lib3mf_function_addinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_AddInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetInputs = (PLib3MFFunction_GetInputsPtr) GetProcAddress(hLibrary, "lib3mf_function_getinputs"); + #else // _WIN32 + pWrapperTable->m_Function_GetInputs = (PLib3MFFunction_GetInputsPtr) dlsym(hLibrary, "lib3mf_function_getinputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetInputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_RemoveInput = (PLib3MFFunction_RemoveInputPtr) GetProcAddress(hLibrary, "lib3mf_function_removeinput"); + #else // _WIN32 + pWrapperTable->m_Function_RemoveInput = (PLib3MFFunction_RemoveInputPtr) dlsym(hLibrary, "lib3mf_function_removeinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_RemoveInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_AddOutput = (PLib3MFFunction_AddOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_addoutput"); + #else // _WIN32 + pWrapperTable->m_Function_AddOutput = (PLib3MFFunction_AddOutputPtr) dlsym(hLibrary, "lib3mf_function_addoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_AddOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetOutputs = (PLib3MFFunction_GetOutputsPtr) GetProcAddress(hLibrary, "lib3mf_function_getoutputs"); + #else // _WIN32 + pWrapperTable->m_Function_GetOutputs = (PLib3MFFunction_GetOutputsPtr) dlsym(hLibrary, "lib3mf_function_getoutputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetOutputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_RemoveOutput = (PLib3MFFunction_RemoveOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_removeoutput"); + #else // _WIN32 + pWrapperTable->m_Function_RemoveOutput = (PLib3MFFunction_RemoveOutputPtr) dlsym(hLibrary, "lib3mf_function_removeoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_RemoveOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_FindInput = (PLib3MFFunction_FindInputPtr) GetProcAddress(hLibrary, "lib3mf_function_findinput"); + #else // _WIN32 + pWrapperTable->m_Function_FindInput = (PLib3MFFunction_FindInputPtr) dlsym(hLibrary, "lib3mf_function_findinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_FindInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_FindOutput = (PLib3MFFunction_FindOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_findoutput"); + #else // _WIN32 + pWrapperTable->m_Function_FindOutput = (PLib3MFFunction_FindOutputPtr) dlsym(hLibrary, "lib3mf_function_findoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_FindOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_GetIdentifier = (PLib3MFImplicitFunction_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_GetIdentifier = (PLib3MFImplicitFunction_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitfunction_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_SetIdentifier = (PLib3MFImplicitFunction_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_SetIdentifier = (PLib3MFImplicitFunction_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitfunction_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddNode = (PLib3MFImplicitFunction_AddNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddNode = (PLib3MFImplicitFunction_AddNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddSinNode = (PLib3MFImplicitFunction_AddSinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsinnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddSinNode = (PLib3MFImplicitFunction_AddSinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsinnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddSinNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddCosNode = (PLib3MFImplicitFunction_AddCosNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcosnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddCosNode = (PLib3MFImplicitFunction_AddCosNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcosnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddCosNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddTanNode = (PLib3MFImplicitFunction_AddTanNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtannode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddTanNode = (PLib3MFImplicitFunction_AddTanNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtannode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddTanNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcSinNode = (PLib3MFImplicitFunction_AddArcSinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarcsinnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcSinNode = (PLib3MFImplicitFunction_AddArcSinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarcsinnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetIdentifier == NULL) + if (pWrapperTable->m_ImplicitFunction_AddArcSinNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferencecount"); + pWrapperTable->m_ImplicitFunction_AddArcCosNode = (PLib3MFImplicitFunction_AddArcCosNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarccosnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getreferencecount"); + pWrapperTable->m_ImplicitFunction_AddArcCosNode = (PLib3MFImplicitFunction_AddArcCosNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarccosnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetReferenceCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddArcCosNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setreferences"); + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = (PLib3MFImplicitFunction_AddArcTan2NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarctan2node"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setreferences"); + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = (PLib3MFImplicitFunction_AddArcTan2NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarctan2node"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddArcTan2Node == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferences"); + pWrapperTable->m_ImplicitFunction_AddSinhNode = (PLib3MFImplicitFunction_AddSinhNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsinhnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getreferences"); + pWrapperTable->m_ImplicitFunction_AddSinhNode = (PLib3MFImplicitFunction_AddSinhNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsinhnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSinhNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferencecount"); + pWrapperTable->m_ImplicitFunction_AddCoshNode = (PLib3MFImplicitFunction_AddCoshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcoshnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferencecount"); + pWrapperTable->m_ImplicitFunction_AddCoshNode = (PLib3MFImplicitFunction_AddCoshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcoshnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetBallReferenceCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddCoshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setballreferences"); + pWrapperTable->m_ImplicitFunction_AddTanhNode = (PLib3MFImplicitFunction_AddTanhNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtanhnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setballreferences"); + pWrapperTable->m_ImplicitFunction_AddTanhNode = (PLib3MFImplicitFunction_AddTanhNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtanhnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetBallReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddTanhNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferences"); + pWrapperTable->m_ImplicitFunction_AddRoundNode = (PLib3MFImplicitFunction_AddRoundNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addroundnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferences"); + pWrapperTable->m_ImplicitFunction_AddRoundNode = (PLib3MFImplicitFunction_AddRoundNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addroundnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetBallReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddRoundNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddCeilNode = (PLib3MFImplicitFunction_AddCeilNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addceilnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddCeilNode = (PLib3MFImplicitFunction_AddCeilNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addceilnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddCeilNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddFloorNode = (PLib3MFImplicitFunction_AddFloorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfloornode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddFloorNode = (PLib3MFImplicitFunction_AddFloorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfloornode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFloorNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + pWrapperTable->m_ImplicitFunction_AddSignNode = (PLib3MFImplicitFunction_AddSignNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsignnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + pWrapperTable->m_ImplicitFunction_AddSignNode = (PLib3MFImplicitFunction_AddSignNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsignnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_AddMaterial == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSignNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_removematerial"); + pWrapperTable->m_ImplicitFunction_AddFractNode = (PLib3MFImplicitFunction_AddFractNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfractnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_removematerial"); + pWrapperTable->m_ImplicitFunction_AddFractNode = (PLib3MFImplicitFunction_AddFractNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfractnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_RemoveMaterial == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFractNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getname"); + pWrapperTable->m_ImplicitFunction_AddAbsNode = (PLib3MFImplicitFunction_AddAbsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addabsnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getname"); + pWrapperTable->m_ImplicitFunction_AddAbsNode = (PLib3MFImplicitFunction_AddAbsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addabsnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetName == NULL) + if (pWrapperTable->m_ImplicitFunction_AddAbsNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setname"); + pWrapperTable->m_ImplicitFunction_AddExpNode = (PLib3MFImplicitFunction_AddExpNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addexpnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setname"); + pWrapperTable->m_ImplicitFunction_AddExpNode = (PLib3MFImplicitFunction_AddExpNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addexpnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_SetName == NULL) + if (pWrapperTable->m_ImplicitFunction_AddExpNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLogNode = (PLib3MFImplicitFunction_AddLogNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlognode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLogNode = (PLib3MFImplicitFunction_AddLogNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlognode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_SetDisplayColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLogNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLog2Node = (PLib3MFImplicitFunction_AddLog2NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlog2node"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLog2Node = (PLib3MFImplicitFunction_AddLog2NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlog2node"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetDisplayColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLog2Node == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddLog10Node = (PLib3MFImplicitFunction_AddLog10NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlog10node"); #else // _WIN32 - pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddLog10Node = (PLib3MFImplicitFunction_AddLog10NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlog10node"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLog10Node == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddLengthNode = (PLib3MFImplicitFunction_AddLengthNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlengthnode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddLengthNode = (PLib3MFImplicitFunction_AddLengthNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlengthnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLengthNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_addcolor"); + pWrapperTable->m_ImplicitFunction_AddTransposeNode = (PLib3MFImplicitFunction_AddTransposeNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtransposenode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_addcolor"); + pWrapperTable->m_ImplicitFunction_AddTransposeNode = (PLib3MFImplicitFunction_AddTransposeNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtransposenode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_AddColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddTransposeNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_removecolor"); + pWrapperTable->m_ImplicitFunction_InverseNode = (PLib3MFImplicitFunction_InverseNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_inversenode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_removecolor"); + pWrapperTable->m_ImplicitFunction_InverseNode = (PLib3MFImplicitFunction_InverseNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_inversenode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_RemoveColor == NULL) + if (pWrapperTable->m_ImplicitFunction_InverseNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_setcolor"); + pWrapperTable->m_ImplicitFunction_AddSqrtNode = (PLib3MFImplicitFunction_AddSqrtNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsqrtnode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_setcolor"); + pWrapperTable->m_ImplicitFunction_AddSqrtNode = (PLib3MFImplicitFunction_AddSqrtNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsqrtnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_SetColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSqrtNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcolor"); + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = (PLib3MFImplicitFunction_AddResourceIdNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addresourceidnode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcolor"); + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = (PLib3MFImplicitFunction_AddResourceIdNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addresourceidnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddResourceIdNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddAdditionNode = (PLib3MFImplicitFunction_AddAdditionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addadditionnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddAdditionNode = (PLib3MFImplicitFunction_AddAdditionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addadditionnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddAdditionNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = (PLib3MFImplicitFunction_AddSubtractionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsubtractionnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = (PLib3MFImplicitFunction_AddSubtractionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsubtractionnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSubtractionNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = (PLib3MFImplicitFunction_AddMultiplicationNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmultiplicationnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = (PLib3MFImplicitFunction_AddMultiplicationNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmultiplicationnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_AddTex2Coord == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMultiplicationNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + pWrapperTable->m_ImplicitFunction_AddDivisionNode = (PLib3MFImplicitFunction_AddDivisionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddivisionnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + pWrapperTable->m_ImplicitFunction_AddDivisionNode = (PLib3MFImplicitFunction_AddDivisionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddivisionnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetTex2Coord == NULL) + if (pWrapperTable->m_ImplicitFunction_AddDivisionNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + pWrapperTable->m_ImplicitFunction_AddDotNode = (PLib3MFImplicitFunction_AddDotNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddotnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + pWrapperTable->m_ImplicitFunction_AddDotNode = (PLib3MFImplicitFunction_AddDotNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddotnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_RemoveTex2Coord == NULL) + if (pWrapperTable->m_ImplicitFunction_AddDotNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + pWrapperTable->m_ImplicitFunction_AddCrossNode = (PLib3MFImplicitFunction_AddCrossNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcrossnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + pWrapperTable->m_ImplicitFunction_AddCrossNode = (PLib3MFImplicitFunction_AddCrossNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcrossnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetTexture2D == NULL) + if (pWrapperTable->m_ImplicitFunction_AddCrossNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcount"); + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = (PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatvecmultiplicationnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) dlsym(hLibrary, "lib3mf_compositematerials_getcount"); + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = (PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatvecmultiplicationnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddMinNode = (PLib3MFImplicitFunction_AddMinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addminnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddMinNode = (PLib3MFImplicitFunction_AddMinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addminnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMinNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + pWrapperTable->m_ImplicitFunction_AddMaxNode = (PLib3MFImplicitFunction_AddMaxNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmaxnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + pWrapperTable->m_ImplicitFunction_AddMaxNode = (PLib3MFImplicitFunction_AddMaxNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmaxnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMaxNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_addcomposite"); + pWrapperTable->m_ImplicitFunction_AddFmodNode = (PLib3MFImplicitFunction_AddFmodNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfmodnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_addcomposite"); + pWrapperTable->m_ImplicitFunction_AddFmodNode = (PLib3MFImplicitFunction_AddFmodNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfmodnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_AddComposite == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFmodNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_removecomposite"); + pWrapperTable->m_ImplicitFunction_AddPowNode = (PLib3MFImplicitFunction_AddPowNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addpownode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_removecomposite"); + pWrapperTable->m_ImplicitFunction_AddPowNode = (PLib3MFImplicitFunction_AddPowNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addpownode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_RemoveComposite == NULL) + if (pWrapperTable->m_ImplicitFunction_AddPowNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcomposite"); + pWrapperTable->m_ImplicitFunction_AddSelectNode = (PLib3MFImplicitFunction_AddSelectNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addselectnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_getcomposite"); + pWrapperTable->m_ImplicitFunction_AddSelectNode = (PLib3MFImplicitFunction_AddSelectNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addselectnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetComposite == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSelectNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddClampNode = (PLib3MFImplicitFunction_AddClampNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addclampnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddClampNode = (PLib3MFImplicitFunction_AddClampNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addclampnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddClampNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = (PLib3MFImplicitFunction_AddComposeVectorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcomposevectornode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = (PLib3MFImplicitFunction_AddComposeVectorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcomposevectornode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddComposeVectorNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = (PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addvectorfromscalarnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = (PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addvectorfromscalarnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_AddMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = (PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddecomposevectornode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = (PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddecomposevectornode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_SetMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = (PLib3MFImplicitFunction_AddComposeMatrixNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcomposematrixnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = (PLib3MFImplicitFunction_AddComposeMatrixNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcomposematrixnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = (PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatrixfromrowsnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = (PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatrixfromrowsnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = (PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatrixfromcolumnsnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = (PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatrixfromcolumnsnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetLayerCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addlayer"); + pWrapperTable->m_ImplicitFunction_AddConstantNode = (PLib3MFImplicitFunction_AddConstantNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstantnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addlayer"); + pWrapperTable->m_ImplicitFunction_AddConstantNode = (PLib3MFImplicitFunction_AddConstantNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstantnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_AddLayer == NULL) + if (pWrapperTable->m_ImplicitFunction_AddConstantNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayer"); + pWrapperTable->m_ImplicitFunction_AddConstVecNode = (PLib3MFImplicitFunction_AddConstVecNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstvecnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayer"); + pWrapperTable->m_ImplicitFunction_AddConstVecNode = (PLib3MFImplicitFunction_AddConstVecNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstvecnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetLayer == NULL) + if (pWrapperTable->m_ImplicitFunction_AddConstVecNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removelayer"); + pWrapperTable->m_ImplicitFunction_AddConstMatNode = (PLib3MFImplicitFunction_AddConstMatNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstmatnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removelayer"); + pWrapperTable->m_ImplicitFunction_AddConstMatNode = (PLib3MFImplicitFunction_AddConstMatNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstmatnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_RemoveLayer == NULL) + if (pWrapperTable->m_ImplicitFunction_AddConstMatNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_getpath"); + pWrapperTable->m_ImplicitFunction_AddMeshNode = (PLib3MFImplicitFunction_AddMeshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmeshnode"); #else // _WIN32 - pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) dlsym(hLibrary, "lib3mf_attachment_getpath"); + pWrapperTable->m_ImplicitFunction_AddMeshNode = (PLib3MFImplicitFunction_AddMeshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmeshnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetPath == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMeshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_setpath"); + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = (PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addunsignedmeshnode"); #else // _WIN32 - pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) dlsym(hLibrary, "lib3mf_attachment_setpath"); + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = (PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addunsignedmeshnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_SetPath == NULL) + if (pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) GetProcAddress(hLibrary, "lib3mf_attachment_packagepart"); + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); #else // _WIN32 - pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) dlsym(hLibrary, "lib3mf_attachment_packagepart"); + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_PackagePart == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFunctionCallNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getrelationshiptype"); + pWrapperTable->m_ImplicitFunction_GetNodes = (PLib3MFImplicitFunction_GetNodesPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_getnodes"); #else // _WIN32 - pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_getrelationshiptype"); + pWrapperTable->m_ImplicitFunction_GetNodes = (PLib3MFImplicitFunction_GetNodesPtr) dlsym(hLibrary, "lib3mf_implicitfunction_getnodes"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetRelationShipType == NULL) + if (pWrapperTable->m_ImplicitFunction_GetNodes == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_setrelationshiptype"); + pWrapperTable->m_ImplicitFunction_RemoveNode = (PLib3MFImplicitFunction_RemoveNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_removenode"); #else // _WIN32 - pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_setrelationshiptype"); + pWrapperTable->m_ImplicitFunction_RemoveNode = (PLib3MFImplicitFunction_RemoveNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_removenode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_SetRelationShipType == NULL) + if (pWrapperTable->m_ImplicitFunction_RemoveNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetofile"); + pWrapperTable->m_ImplicitFunction_AddLink = (PLib3MFImplicitFunction_AddLinkPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlink"); #else // _WIN32 - pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) dlsym(hLibrary, "lib3mf_attachment_writetofile"); + pWrapperTable->m_ImplicitFunction_AddLink = (PLib3MFImplicitFunction_AddLinkPtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlink"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_WriteToFile == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLink == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromfile"); + pWrapperTable->m_ImplicitFunction_AddLinkByNames = (PLib3MFImplicitFunction_AddLinkByNamesPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlinkbynames"); #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) dlsym(hLibrary, "lib3mf_attachment_readfromfile"); + pWrapperTable->m_ImplicitFunction_AddLinkByNames = (PLib3MFImplicitFunction_AddLinkByNamesPtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlinkbynames"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromFile == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLinkByNames == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromcallback"); + pWrapperTable->m_ImplicitFunction_Clear = (PLib3MFImplicitFunction_ClearPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_clear"); #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) dlsym(hLibrary, "lib3mf_attachment_readfromcallback"); + pWrapperTable->m_ImplicitFunction_Clear = (PLib3MFImplicitFunction_ClearPtr) dlsym(hLibrary, "lib3mf_implicitfunction_clear"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromCallback == NULL) + if (pWrapperTable->m_ImplicitFunction_Clear == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getstreamsize"); + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = (PLib3MFImplicitFunction_SortNodesTopologicallyPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_sortnodestopologically"); #else // _WIN32 - pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) dlsym(hLibrary, "lib3mf_attachment_getstreamsize"); + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = (PLib3MFImplicitFunction_SortNodesTopologicallyPtr) dlsym(hLibrary, "lib3mf_implicitfunction_sortnodestopologically"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetStreamSize == NULL) + if (pWrapperTable->m_ImplicitFunction_SortNodesTopologically == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetobuffer"); + pWrapperTable->m_FunctionFromImage3D_GetImage3D = (PLib3MFFunctionFromImage3D_GetImage3DPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getimage3d"); #else // _WIN32 - pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) dlsym(hLibrary, "lib3mf_attachment_writetobuffer"); + pWrapperTable->m_FunctionFromImage3D_GetImage3D = (PLib3MFFunctionFromImage3D_GetImage3DPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getimage3d"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_WriteToBuffer == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetImage3D == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfrombuffer"); + pWrapperTable->m_FunctionFromImage3D_SetImage3D = (PLib3MFFunctionFromImage3D_SetImage3DPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setimage3d"); #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) dlsym(hLibrary, "lib3mf_attachment_readfrombuffer"); + pWrapperTable->m_FunctionFromImage3D_SetImage3D = (PLib3MFFunctionFromImage3D_SetImage3DPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setimage3d"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromBuffer == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetImage3D == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getattachment"); + pWrapperTable->m_FunctionFromImage3D_SetFilter = (PLib3MFFunctionFromImage3D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setfilter"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_getattachment"); + pWrapperTable->m_FunctionFromImage3D_SetFilter = (PLib3MFFunctionFromImage3D_SetFilterPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setfilter"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetAttachment == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetFilter == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setattachment"); + pWrapperTable->m_FunctionFromImage3D_GetFilter = (PLib3MFFunctionFromImage3D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getfilter"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_setattachment"); + pWrapperTable->m_FunctionFromImage3D_GetFilter = (PLib3MFFunctionFromImage3D_GetFilterPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getfilter"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetAttachment == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetFilter == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getcontenttype"); + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = (PLib3MFFunctionFromImage3D_SetTileStylesPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_settilestyles"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_getcontenttype"); + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = (PLib3MFFunctionFromImage3D_SetTileStylesPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_settilestyles"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetContentType == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetTileStyles == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setcontenttype"); + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = (PLib3MFFunctionFromImage3D_GetTileStylesPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_gettilestyles"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_setcontenttype"); + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = (PLib3MFFunctionFromImage3D_GetTileStylesPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_gettilestyles"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetContentType == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetTileStyles == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_GetOffset = (PLib3MFFunctionFromImage3D_GetOffsetPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getoffset"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_GetOffset = (PLib3MFFunctionFromImage3D_GetOffsetPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getoffset"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetTileStyleUV == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetOffset == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_settilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_SetOffset = (PLib3MFFunctionFromImage3D_SetOffsetPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setoffset"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_settilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_SetOffset = (PLib3MFFunctionFromImage3D_SetOffsetPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setoffset"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetTileStyleUV == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetOffset == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getfilter"); + pWrapperTable->m_FunctionFromImage3D_GetScale = (PLib3MFFunctionFromImage3D_GetScalePtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getscale"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_getfilter"); + pWrapperTable->m_FunctionFromImage3D_GetScale = (PLib3MFFunctionFromImage3D_GetScalePtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getscale"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetFilter == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetScale == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setfilter"); + pWrapperTable->m_FunctionFromImage3D_SetScale = (PLib3MFFunctionFromImage3D_SetScalePtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setscale"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_setfilter"); + pWrapperTable->m_FunctionFromImage3D_SetScale = (PLib3MFFunctionFromImage3D_SetScalePtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setscale"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetFilter == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetScale == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 @@ -3152,6 +5474,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetSliceStackByID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsetbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) dlsym(hLibrary, "lib3mf_model_getlevelsetbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLevelSetByID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_GetBuildUUID = (PLib3MFModel_GetBuildUUIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getbuilduuid"); #else // _WIN32 @@ -3287,6 +5618,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetSliceStacks == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetImage3Ds = (PLib3MFModel_GetImage3DsPtr) GetProcAddress(hLibrary, "lib3mf_model_getimage3ds"); + #else // _WIN32 + pWrapperTable->m_Model_GetImage3Ds = (PLib3MFModel_GetImage3DsPtr) dlsym(hLibrary, "lib3mf_model_getimage3ds"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetImage3Ds == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_MergeToModel = (PLib3MFModel_MergeToModelPtr) GetProcAddress(hLibrary, "lib3mf_model_mergetomodel"); #else // _WIN32 @@ -3296,6 +5636,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_MergeToModel == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_MergeFromModel = (PLib3MFModel_MergeFromModelPtr) GetProcAddress(hLibrary, "lib3mf_model_mergefrommodel"); + #else // _WIN32 + pWrapperTable->m_Model_MergeFromModel = (PLib3MFModel_MergeFromModelPtr) dlsym(hLibrary, "lib3mf_model_mergefrommodel"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_MergeFromModel == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_AddMeshObject = (PLib3MFModel_AddMeshObjectPtr) GetProcAddress(hLibrary, "lib3mf_model_addmeshobject"); #else // _WIN32 @@ -3377,6 +5726,24 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_AddMultiPropertyGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_AddImageStack = (PLib3MFModel_AddImageStackPtr) GetProcAddress(hLibrary, "lib3mf_model_addimagestack"); + #else // _WIN32 + pWrapperTable->m_Model_AddImageStack = (PLib3MFModel_AddImageStackPtr) dlsym(hLibrary, "lib3mf_model_addimagestack"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddImageStack == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetImageStackByID = (PLib3MFModel_GetImageStackByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getimagestackbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetImageStackByID = (PLib3MFModel_GetImageStackByIDPtr) dlsym(hLibrary, "lib3mf_model_getimagestackbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetImageStackByID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_AddBuildItem = (PLib3MFModel_AddBuildItemPtr) GetProcAddress(hLibrary, "lib3mf_model_addbuilditem"); #else // _WIN32 @@ -3521,6 +5888,69 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetKeyStore == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetFunctions = (PLib3MFModel_GetFunctionsPtr) GetProcAddress(hLibrary, "lib3mf_model_getfunctions"); + #else // _WIN32 + pWrapperTable->m_Model_GetFunctions = (PLib3MFModel_GetFunctionsPtr) dlsym(hLibrary, "lib3mf_model_getfunctions"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetFunctions == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddImplicitFunction = (PLib3MFModel_AddImplicitFunctionPtr) GetProcAddress(hLibrary, "lib3mf_model_addimplicitfunction"); + #else // _WIN32 + pWrapperTable->m_Model_AddImplicitFunction = (PLib3MFModel_AddImplicitFunctionPtr) dlsym(hLibrary, "lib3mf_model_addimplicitfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddImplicitFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddFunctionFromImage3D = (PLib3MFModel_AddFunctionFromImage3DPtr) GetProcAddress(hLibrary, "lib3mf_model_addfunctionfromimage3d"); + #else // _WIN32 + pWrapperTable->m_Model_AddFunctionFromImage3D = (PLib3MFModel_AddFunctionFromImage3DPtr) dlsym(hLibrary, "lib3mf_model_addfunctionfromimage3d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddFunctionFromImage3D == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddVolumeData = (PLib3MFModel_AddVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_model_addvolumedata"); + #else // _WIN32 + pWrapperTable->m_Model_AddVolumeData = (PLib3MFModel_AddVolumeDataPtr) dlsym(hLibrary, "lib3mf_model_addvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddLevelSet = (PLib3MFModel_AddLevelSetPtr) GetProcAddress(hLibrary, "lib3mf_model_addlevelset"); + #else // _WIN32 + pWrapperTable->m_Model_AddLevelSet = (PLib3MFModel_AddLevelSetPtr) dlsym(hLibrary, "lib3mf_model_addlevelset"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddLevelSet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetLevelSets = (PLib3MFModel_GetLevelSetsPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsets"); + #else // _WIN32 + pWrapperTable->m_Model_GetLevelSets = (PLib3MFModel_GetLevelSetsPtr) dlsym(hLibrary, "lib3mf_model_getlevelsets"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLevelSets == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_RemoveResource = (PLib3MFModel_RemoveResourcePtr) GetProcAddress(hLibrary, "lib3mf_model_removeresource"); + #else // _WIN32 + pWrapperTable->m_Model_RemoveResource = (PLib3MFModel_RemoveResourcePtr) dlsym(hLibrary, "lib3mf_model_removeresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_RemoveResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_GetLibraryVersion = (PLib3MFGetLibraryVersionPtr) GetProcAddress(hLibrary, "lib3mf_getlibraryversion"); #else // _WIN32 diff --git a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h index 044c754bb..d7fcaf59a 100644 --- a/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/CDynamic/lib3mf_dynamic.h @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -562,6 +562,45 @@ typedef Lib3MFResult (*PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMate */ typedef Lib3MFResult (*PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr) (Lib3MF_MultiPropertyGroupIterator pMultiPropertyGroupIterator, Lib3MF_MultiPropertyGroup * pResource); +/************************************************************************************************************************* + Class definition for Image3DIterator +**************************************************************************************************************************/ + +/** +* Returns the Image3D the iterator points at. +* +* @param[in] pImage3DIterator - Image3DIterator instance. +* @param[out] pResource - returns the Image3D instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3DIterator_GetCurrentImage3DPtr) (Lib3MF_Image3DIterator pImage3DIterator, Lib3MF_Image3D * pResource); + +/************************************************************************************************************************* + Class definition for FunctionIterator +**************************************************************************************************************************/ + +/** +* Returns the Function the iterator points at. +* +* @param[in] pFunctionIterator - FunctionIterator instance. +* @param[out] pResource - returns the Function instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionIterator_GetCurrentFunctionPtr) (Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource); + +/************************************************************************************************************************* + Class definition for LevelSetIterator +**************************************************************************************************************************/ + +/** +* Returns the LevelSet the iterator points at. +* +* @param[in] pLevelSetIterator - LevelSetIterator instance. +* @param[out] pResource - returns the MeshObject instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) (Lib3MF_LevelSetIterator pLevelSetIterator, Lib3MF_LevelSet * pResource); + /************************************************************************************************************************* Class definition for MetaData **************************************************************************************************************************/ @@ -821,6 +860,15 @@ typedef Lib3MFResult (*PLib3MFObject_IsMeshObjectPtr) (Lib3MF_Object pObject, bo */ typedef Lib3MFResult (*PLib3MFObject_IsComponentsObjectPtr) (Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFObject_IsLevelSetObjectPtr) (Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. * @@ -1153,6 +1201,174 @@ typedef Lib3MFResult (*PLib3MFMeshObject_IsManifoldAndOrientedPtr) (Lib3MF_MeshO */ typedef Lib3MFResult (*PLib3MFMeshObject_BeamLatticePtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_BeamLattice * pTheBeamLattice); +/** +* Retrieves the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshObject_GetVolumeDataPtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshObject_SetVolumeDataPtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData pTheVolumeData); + +/************************************************************************************************************************* + Class definition for LevelSet +**************************************************************************************************************************/ + +/** +* Returns the function that is used as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetFunctionPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_Function * pTheFunction); + +/** +* Sets the function to use as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetFunctionPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_Function pTheFunction); + +/** +* Returns the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTransform - the transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetTransformPtr) (Lib3MF_LevelSet pLevelSet, sLib3MFTransform * pTransform); + +/** +* Sets the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetTransformPtr) (Lib3MF_LevelSet pLevelSet, const sLib3MFTransform * pTransform); + +/** +* Returns the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetChannelNamePtr) (Lib3MF_LevelSet pLevelSet, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); + +/** +* Sets the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pChannelName - new name of the function output channel +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetChannelNamePtr) (Lib3MF_LevelSet pLevelSet, const char * pChannelName); + +/** +* Sets the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMinFeatureSizePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double dMinFeatureSize); + +/** +* Returns the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMinFeatureSizePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double * pMinFeatureSize); + +/** +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dFallBackValue - fallback value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetFallBackValuePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double dFallBackValue); + +/** +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pFallBackValue - fallback value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetFallBackValuePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double * pFallBackValue); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshBBoxOnlyPtr) (Lib3MF_LevelSet pLevelSet, bool bMeshBBoxOnly); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshBBoxOnlyPtr) (Lib3MF_LevelSet pLevelSet, bool * pMeshBBoxOnly); + +/** +* Sets the mesh to use as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject pTheMesh); + +/** +* Returns the mesh that is used as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); + +/** +* Retrieves the VolumeData this Object. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheVolumeData - the VolumeData of this Object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this LevelSet. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData pTheVolumeData); + /************************************************************************************************************************* Class definition for BeamLattice **************************************************************************************************************************/ @@ -1383,784 +1599,3179 @@ typedef Lib3MFResult (*PLib3MFBeamLattice_AddBeamSetPtr) (Lib3MF_BeamLattice pBe typedef Lib3MFResult (*PLib3MFBeamLattice_GetBeamSetPtr) (Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet); /************************************************************************************************************************* - Class definition for Component + Class definition for FunctionReference **************************************************************************************************************************/ /** -* Returns the Resource Instance of the component. +* Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. * -* @param[in] pComponent - Component instance. -* @param[out] pObjectResource - filled with the Resource Instance. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourcePtr) (Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetFunctionResourceIDPtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 * pUniqueResourceID); /** -* Returns the UniqueResourceID of the component. +* Sets the UniqueResourceID to refer to. * -* @param[in] pComponent - Component instance. -* @param[out] pUniqueResourceID - returns the UniqueResourceID. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nUniqueResourceID - UniqueResourceID of the function * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourceIDPtr) (Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetFunctionResourceIDPtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 nUniqueResourceID); /** -* returns, whether a component has a UUID and, if true, the component's UUID +* Returns the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[out] pHasUUID - flag whether the component has a UUID -* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) -* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pTransform - the transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetUUIDPtr) (Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetTransformPtr) (Lib3MF_FunctionReference pFunctionReference, sLib3MFTransform * pTransform); /** -* sets the component's UUID +* Sets the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pTransform - new transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_SetUUIDPtr) (Lib3MF_Component pComponent, const char * pUUID); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetTransformPtr) (Lib3MF_FunctionReference pFunctionReference, const sLib3MFTransform * pTransform); /** -* Returns, if the component has a different transformation than the identity matrix +* Returns the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_HasTransformPtr) (Lib3MF_Component pComponent, bool * pHasTransform); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetChannelNamePtr) (Lib3MF_FunctionReference pFunctionReference, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); /** -* Returns the transformation matrix of the component. +* Sets the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pTransform - filled with the component transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pChannelName - new name of the function output channel * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetTransformPtr) (Lib3MF_Component pComponent, sLib3MFTransform * pTransform); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetChannelNamePtr) (Lib3MF_FunctionReference pFunctionReference, const char * pChannelName); /** -* Sets the transformation matrix of the component. +* Sets the minimal feature size as a hint for the function evaluator * -* @param[in] pComponent - Component instance. -* @param[in] pTransform - new transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_SetTransformPtr) (Lib3MF_Component pComponent, const sLib3MFTransform * pTransform); - -/************************************************************************************************************************* - Class definition for ComponentsObject -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFFunctionReference_SetMinFeatureSizePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dMinFeatureSize); /** -* Adds a new component to a components object. +* Returns the minimal feature size as a hint for the function evaluator * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] pObjectResource - object to add as component. Must not lead to circular references! -* @param[in] pTransform - optional transform matrix for the component. -* @param[out] pComponentInstance - new component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_AddComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetMinFeatureSizePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pMinFeatureSize); /** -* Retrieves a component from a component object. +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) -* @param[out] pComponentInstance - component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dFallBackValue - fallback value * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetFallBackValuePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dFallBackValue); /** -* Retrieves a component count of a component object. +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[out] pCount - returns the component count +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pFallBackValue - fallback value * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentCountPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetFallBackValuePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pFallBackValue); /************************************************************************************************************************* - Class definition for BeamSet + Class definition for VolumeDataColor **************************************************************************************************************************/ -/** -* Sets a beamset's name string -* -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pName - new name of the beamset. -* @return error code or 0 (success) -*/ -typedef Lib3MFResult (*PLib3MFBeamSet_SetNamePtr) (Lib3MF_BeamSet pBeamSet, const char * pName); +/************************************************************************************************************************* + Class definition for MaterialMapping +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for VolumeDataComposite +**************************************************************************************************************************/ /** -* Retrieves a beamset's name string +* Returns the BaseMaterialGroup used within this volume data item * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pBaseMaterialGroupInstance - The BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetNamePtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); /** -* Sets a beamset's identifier string +* Sets the BaseMaterialGroup to use within this volume data item. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pIdentifier - new name of the beamset. +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const char * pIdentifier); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance); /** -* Retrieves a beamset's identifier string +* Returns the number of material mappings of this VolumeDataComposite element * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) -* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pCount - the number of material mappings. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Retrieves the reference count of a beamset +* Returns MaterialMappting with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the reference count +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - Index of the MaterialMapping in question. +* @param[out] pTheMaterialMapping - MaterialMapping used in this element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Sets the references of a beamset +* Adds a the MaterialMapping * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pTransform - new transformation matrix +* @param[out] pTheMaterialMapping - The new MaterialMapping * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_AddMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, const sLib3MFTransform * pTransform, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Retrieves the references of a beamset +* Removes the MaterialMapping with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - The index of the MaterialMapping to be removed. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex); + +/************************************************************************************************************************* + Class definition for VolumeDataProperty +**************************************************************************************************************************/ /** -* Retrieves the ball reference count of a beamset +* Gets the qualified name of this property. * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the ball reference count +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] nPropertyNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pPropertyNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPropertyNameBuffer - buffer of The qualified name of this property., may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_GetNamePtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, const Lib3MF_uint32 nPropertyNameBufferSize, Lib3MF_uint32* pPropertyNameNeededChars, char * pPropertyNameBuffer); /** -* Sets the ball references of a beamset +* Sets whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_SetIsRequiredPtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, bool bIsRequired); /** -* Retrieves the ball references of a beamset +* Returns whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[out] pIsRequired - Is this property required to process this 3MF document instance? * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_IsRequiredPtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, bool * pIsRequired); /************************************************************************************************************************* - Class definition for BaseMaterialGroup + Class definition for VolumeData **************************************************************************************************************************/ /** -* Retrieves the count of base materials in the material group. +* Returns the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[out] pCount - returns the count of base materials. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - filled with the VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetCountPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeData_GetCompositePtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* returns all the PropertyIDs of all materials in this group +* Creates a new VolumeDataComposite for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - The new VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFVolumeData_CreateNewCompositePtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* Adds a new material to the material group +* Removes the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] pName - new name of the base material. -* @param[in] pDisplayColor - Display color of the material -* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_AddMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFVolumeData_RemoveCompositePtr) (Lib3MF_VolumeData pVolumeData); /** -* Removes a material from the material group. +* Returns the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheColorData - filled with the VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_RemoveMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFVolumeData_GetColorPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataColor * pTheColorData); /** -* Returns the base material's name +* Creates a new VolumeDataColor for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheColorData - The new VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +typedef Lib3MFResult (*PLib3MFVolumeData_CreateNewColorPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataColor * pTheColorData); /** -* Sets a base material's name +* Removes the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pName - new name of the base material. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); +typedef Lib3MFResult (*PLib3MFVolumeData_RemoveColorPtr) (Lib3MF_VolumeData pVolumeData); /** -* Sets a base material's display color. +* Returns the number of VolumeDataProperty * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyCountPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); /** -* Returns a base material's display color. +* Returns the VolumeDataProperty at a given Index * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[out] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be returned. +* @param[out] pTheVolumeDataProperty - the VolumeDataProperty at the given index. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Adds a new VolumeDataProperty from a Function +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pName - the qualified name (namespace+name) of the Property +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheVolumeDataProperty - the newly created VolumeDataProperty. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFVolumeData_AddPropertyFromFunctionPtr) (Lib3MF_VolumeData pVolumeData, const char * pName, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Removes the VolumeDataProperty with a given index +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFVolumeData_RemovePropertyPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex); /************************************************************************************************************************* - Class definition for ColorGroup + Class definition for Component **************************************************************************************************************************/ /** -* Retrieves the count of base materials in this Color Group. +* Returns the Resource Instance of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[out] pCount - returns the count of colors within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pObjectResource - filled with the Resource Instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetCountPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourcePtr) (Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); /** -* returns all the PropertyIDs of all colors within this group +* Returns the UniqueResourceID of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @param[in] pComponent - Component instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetAllPropertyIDsPtr) (Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourceIDPtr) (Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); /** -* Adds a new value. +* returns, whether a component has a UUID and, if true, the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] pTheColor - The new color -* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pHasUUID - flag whether the component has a UUID +* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) +* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_AddColorPtr) (Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFComponent_GetUUIDPtr) (Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); /** -* Removes a color from the color group. +* sets the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @param[in] pComponent - Component instance. +* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_RemoveColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFComponent_SetUUIDPtr) (Lib3MF_Component pComponent, const char * pUUID); /** -* Sets a color value. +* Returns, if the component has a different transformation than the identity matrix * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[in] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_SetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFComponent_HasTransformPtr) (Lib3MF_Component pComponent, bool * pHasTransform); /** -* Sets a color value. +* Returns the transformation matrix of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[out] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pTransform - filled with the component transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFComponent_GetTransformPtr) (Lib3MF_Component pComponent, sLib3MFTransform * pTransform); + +/** +* Sets the transformation matrix of the component. +* +* @param[in] pComponent - Component instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComponent_SetTransformPtr) (Lib3MF_Component pComponent, const sLib3MFTransform * pTransform); /************************************************************************************************************************* - Class definition for Texture2DGroup + Class definition for ComponentsObject **************************************************************************************************************************/ /** -* Retrieves the count of tex2coords in the Texture2DGroup. +* Adds a new component to a components object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pCount - returns the count of tex2coords. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] pObjectResource - object to add as component. Must not lead to circular references! +* @param[in] pTransform - optional transform matrix for the component. +* @param[out] pComponentInstance - new component instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetCountPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFComponentsObject_AddComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance); /** -* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* Retrieves a component from a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) +* @param[out] pComponentInstance - component instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); /** -* Adds a new tex2coord to the Texture2DGroup +* Retrieves a component count of a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. -* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[out] pCount - returns the component count * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_AddTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentCountPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); + +/************************************************************************************************************************* + Class definition for BeamSet +**************************************************************************************************************************/ /** -* Obtains a tex2coord to the Texture2DGroup +* Sets a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. -* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pName - new name of the beamset. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate); +typedef Lib3MFResult (*PLib3MFBeamSet_SetNamePtr) (Lib3MF_BeamSet pBeamSet, const char * pName); /** -* Removes a tex2coords from the Texture2DGroup. +* Retrieves a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_RemoveTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFBeamSet_GetNamePtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); /** -* Obtains the texture2D instance of this group. +* Sets a beamset's identifier string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pIdentifier - new name of the beamset. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTexture2DPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); +typedef Lib3MFResult (*PLib3MFBeamSet_SetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const char * pIdentifier); + +/** +* Retrieves a beamset's identifier string +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Retrieves the reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the reference count +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_SetReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the ball reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the ball reference count +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_SetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); + +/** +* Retrieves the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); /************************************************************************************************************************* - Class definition for CompositeMaterials + Class definition for BaseMaterialGroup **************************************************************************************************************************/ /** -* Retrieves the count of Composite-s in the CompositeMaterials. +* Retrieves the count of base materials in the material group. * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pCount - returns the count of Composite-s +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[out] pCount - returns the count of base materials. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCountPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetCountPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); /** -* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* returns all the PropertyIDs of all materials in this group * -* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new material to the material group +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] pName - new name of the base material. +* @param[in] pDisplayColor - Display color of the material +* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_AddMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a material from the material group. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_RemoveMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); + +/** +* Returns the base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* Sets a base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pName - new name of the base material. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); + +/** +* Sets a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); + +/** +* Returns a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[out] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); + +/************************************************************************************************************************* + Class definition for ColorGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of base materials in this Color Group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[out] pCount - returns the count of colors within this color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetCountPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all colors within this group +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetAllPropertyIDsPtr) (Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] pTheColor - The new color +* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_AddColorPtr) (Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a color from the color group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_RemoveColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[in] pTheColor - The color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_SetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[out] pTheColor - The color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); + +/************************************************************************************************************************* + Class definition for Texture2DGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of tex2coords in the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pCount - returns the count of tex2coords. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetCountPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_AddTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); + +/** +* Obtains a tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. +* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate); + +/** +* Removes a tex2coords from the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_RemoveTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); + +/** +* Obtains the texture2D instance of this group. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTexture2DPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); + +/************************************************************************************************************************* + Class definition for CompositeMaterials +**************************************************************************************************************************/ + +/** +* Retrieves the count of Composite-s in the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pCount - returns the count of Composite-s +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCountPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. * @param[in] nPropertyIDsBufferSize - Number of elements in buffer * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. * @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the Composite-Mixing Values in the CompositeMaterials. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); + +/** +* Adds a new Composite-Mixing Values to the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite +* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_AddCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_RemoveCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); + +/** +* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer); + +/************************************************************************************************************************* + Class definition for MultiPropertyGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the count of MultiProperty-s +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new MultiProperty to the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. +* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Sets the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Removes a MultiProperty from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); + +/** +* Retrieves the number of layers of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the number of layers +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup +* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); + +/** +* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried +* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer); + +/** +* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); + +/************************************************************************************************************************* + Class definition for Image3D +**************************************************************************************************************************/ + +/** +* returns the name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of the name of this Image3D, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_GetNamePtr) (Lib3MF_Image3D pImage3D, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* sets a new name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] pName - the new name of this Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_SetNamePtr) (Lib3MF_Image3D pImage3D, const char * pName); + +/** +* Retrieves, if this Image3D is a ImageStack +* +* @param[in] pImage3D - Image3D instance. +* @param[out] pIsImageStack - returns, whether the Image3D is an ImageStack +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_IsImageStackPtr) (Lib3MF_Image3D pImage3D, bool * pIsImageStack); + +/************************************************************************************************************************* + Class definition for ImageStack +**************************************************************************************************************************/ + +/** +* Retrieves the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pRowCount - number of rows +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetRowCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pRowCount); + +/** +* Sets the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nRowCount - number of rows +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetRowCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nRowCount); + +/** +* Retrieves the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pColumnCount - number of columns +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetColumnCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pColumnCount); + +/** +* Sets the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nColumnCount - number of columns +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetColumnCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nColumnCount); + +/** +* Retrieves the number of images in the stack. +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pSheetCount - number of images +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetSheetCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pSheetCount); + +/** +* Retrieves a sheet of the stack. Raises an error if sheet is not set. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetSheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pSheet); + +/** +* Sets a sheet to an existing attachment. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetSheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment pSheet); + +/** +* Creates a new sheet attachment with empty data. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateEmptySheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a memory buffer. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] nDataBufferSize - Number of elements in buffer +* @param[in] pDataBuffer - uint8 buffer of binary image data +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateSheetFromBufferPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a file on disk. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] pFileName - file name to read from +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateSheetFromFilePtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, const char * pFileName, Lib3MF_Attachment * pSheet); + +/************************************************************************************************************************* + Class definition for Attachment +**************************************************************************************************************************/ + +/** +* Retrieves an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetPathPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new path of the attachment. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_SetPathPtr) (Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Returns the PackagePart that is this attachment. +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pPackagePart - The PackagePart of this attachment. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_PackagePartPtr) (Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); + +/** +* Retrieves an attachment's relationship type +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's relationship type. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new relationship type string. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Writes out the attachment as file. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to write into. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to read from. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pTheReadCallback - Callback to call for reading a data chunk +* @param[in] nStreamSize - number of bytes the callback returns +* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. +* @param[in] pUserData - Userdata that is passed to the callback function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromCallbackPtr) (Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); + +/** +* Retrieves the size of the attachment stream +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pStreamSize - the stream size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); + +/** +* Writes out the attachment into a buffer +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); + +/** +* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromBufferPtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); + +/************************************************************************************************************************* + Class definition for Texture2D +**************************************************************************************************************************/ + +/** +* Retrieves the attachment located at the path of the texture. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); + +/** +* Sets the texture's package path to the path of the attachment. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pContentType - returns content type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eContentType - new Content Type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType); + +/** +* Retrieves a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pTileStyleU - returns tilestyle type enum. +* @param[out] pTileStyleV - returns tilestyle type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV); + +/** +* Sets a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eTileStyleU - new tilestyle type enum. +* @param[in] eTileStyleV - new tilestyle type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV); + +/** +* Retrieves a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pFilter - returns filter type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter); + +/** +* Sets a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eFilter - sets new filter type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter); + +/************************************************************************************************************************* + Class definition for ImplicitPort +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetIdentifierPtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetIdentifierPtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pIdentifier); + +/** +* Retrieves the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetDisplayNamePtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetDisplayNamePtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pDisplayName); + +/** +* Sets the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] eImplicitPortType - the type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetTypePtr) (Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType eImplicitPortType); + +/** +* Retrieves the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[out] pImplicitPortType - the type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetTypePtr) (Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType * pImplicitPortType); + +/** +* Retrieves the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nReferenceBufferSize - size of the buffer (including trailing 0) +* @param[out] pReferenceNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pReferenceBuffer - buffer of the reference, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetReferencePtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nReferenceBufferSize, Lib3MF_uint32* pReferenceNeededChars, char * pReferenceBuffer); + +/** +* Sets the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pReference - the reference +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetReferencePtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pReference); + +/************************************************************************************************************************* + Class definition for Iterator +**************************************************************************************************************************/ + +/** +* Iterates to the next item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasNext - Iterates to the next item in the list. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_MoveNextPtr) (Lib3MF_Iterator pIterator, bool * pHasNext); + +/** +* Iterates to the previous item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasPrevious - Iterates to the previous item in the list. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_MovePreviousPtr) (Lib3MF_Iterator pIterator, bool * pHasPrevious); + +/** +* Returns the number of items the iterator captures. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pCount - returns the number of items the iterator captures. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_CountPtr) (Lib3MF_Iterator pIterator, Lib3MF_uint64 * pCount); + +/************************************************************************************************************************* + Class definition for ImplicitPortIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pImplicitPortIterator - ImplicitPortIterator instance. +* @param[out] pPort - The current element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPortIterator_GetCurrentPtr) (Lib3MF_ImplicitPortIterator pImplicitPortIterator, Lib3MF_ImplicitPort * pPort); + +/************************************************************************************************************************* + Class definition for ImplicitNode +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetIdentifierPtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetIdentifierPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier); + +/** +* Retrieves the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetDisplayNamePtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetDisplayNamePtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pDisplayName); + +/** +* Retrieves the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nTagBufferSize - size of the buffer (including trailing 0) +* @param[out] pTagNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pTagBuffer - buffer of the tag, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetTagPtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nTagBufferSize, Lib3MF_uint32* pTagNeededChars, char * pTagBuffer); + +/** +* Sets the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pTag - the tag +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetTagPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pTag); + +/** +* Retrieves the type of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pType - the type of the node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetNodeTypePtr) (Lib3MF_ImplicitNode pImplicitNode, eLib3MFImplicitNodeType * pType); + +/** +* Add an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[out] pPort - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AddInputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator for the inputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetInputsPtr) (Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Add an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[out] pPort - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AddOutputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator the outputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetOutputsPtr) (Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Retrieves an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_FindInputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_FindOutputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/** +* Checks if the types of the input and output ports are valid for the node type +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pValid - true, if the types are valid +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AreTypesValidPtr) (Lib3MF_ImplicitNode pImplicitNode, bool * pValid); + +/************************************************************************************************************************* + Class definition for OneInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pInput - the input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFOneInputNode_GetInputAPtr) (Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves the output +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFOneInputNode_GetOutputResultPtr) (Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for SinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcSinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcCosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SinhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CoshNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for RoundNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CeilNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FloorNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SignNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FractNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for AbsNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ExpNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LogNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log10Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LengthNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TransposeNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for InverseNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SqrtNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ResourceIdNode +**************************************************************************************************************************/ + +/** +* Sets the Resource that the resourceid attribute of the node will point to +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[in] pResource - the resource +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_SetResourcePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource pResource); + +/** +* Retrieves the resource of the node +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pResource - the resource +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_GetResourcePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource * pResource); + +/** +* Retrieves the output +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_GetOutputValuePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for TwoInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pTwoInputNode - TwoInputNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTwoInputNode_GetInputBPtr) (Lib3MF_TwoInputNode pTwoInputNode, Lib3MF_ImplicitPort * pB); + +/************************************************************************************************************************* + Class definition for AdditionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SubtractionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DivisionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DotNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CrossNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTan2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MatVecMultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MaxNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FmodNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ModNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for PowNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SelectNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputBPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pB); + +/** +* Retrieves the third input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pC - the third input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputCPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pC); + +/** +* Retrieves the fourth input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pD - the fourth input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputDPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pD); + +/************************************************************************************************************************* + Class definition for ClampNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the lower limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMin - the input for the lower limit +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFClampNode_GetInputMinPtr) (Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMin); + +/** +* Retrieves the input for the upper limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMax - the input for the upper limit +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFClampNode_GetInputMaxPtr) (Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMax); + +/************************************************************************************************************************* + Class definition for ComposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the x component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pX - the input for the x component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputXPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the input for the y component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pY - the input for the y component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputYPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the input for the z component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pZ - the input for the z component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputZPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/** +* Retrieves the output +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetOutputResultPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for VectorFromScalarNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DecomposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pA - the input port for the vector to decompose +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetInputAPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pA); + +/** +* Retrieves the output for the x component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pX - the output for the x component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputXPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the output for the y component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pY - the output for the y component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputYPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the output for the z component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pZ - the output for the z component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputZPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/************************************************************************************************************************* + Class definition for ComposeMatrixNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the element 0 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM00 - the input for the m00 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM00Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM00); + +/** +* Retrieves the input for the element 0 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM01 - the input for the m01 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM01Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM01); + +/** +* Retrieves the input for the element 0 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM02 - the input for the m02 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM02Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM02); + +/** +* Retrieves the input for the element 0 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM03 - the input for the m03 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM03Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM03); + +/** +* Retrieves the input for the element 1 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM10 - the input for the m10 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM10Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM10); + +/** +* Retrieves the input for the element 1 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM11 - the input for the m11 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM11Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM11); + +/** +* Retrieves the input for the element 1 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM12 - the input for the m12 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM12Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM12); + +/** +* Retrieves the input for the element 1 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM13 - the input for the m3 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM13Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM13); + +/** +* Retrieves the input for the element 2 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM20 - the input for the m2 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM20Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM20); + +/** +* Retrieves the input for the element 2 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM21 - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM21Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM21); + +/** +* Retrieves the input for the element 2 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM22 - the input for the m22 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM22Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM22); + +/** +* Retrieves the input for the element 2 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM23 - the input for the m23 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM23Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM23); + +/** +* Retrieves the input for the element 3 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM30 - the input for the m30 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM30Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM30); + +/** +* Retrieves the input for the element 3 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM31 - the input for the m31 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM31Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM31); + +/** +* Retrieves the input for the element 3 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM32 - the input for the m32 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM32Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM32); + +/** +* Retrieves the input for the element 3 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM33 - the input for the m33 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM33Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM33); + +/** +* Retrieves the output +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetOutputResultPtr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromRowsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow0 - the input for the first row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputAPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow0); + +/** +* Retrieves the input for the second row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow1 - the input for the second row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputBPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow1); + +/** +* Retrieves the input for the third row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow2 - the input for the third row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputCPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow2); + +/** +* Retrieves the input for the fourth row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow3 - the input for the fourth row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputDPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetOutputResultPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromColumnsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn0 - the input for the first column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputAPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn0); + +/** +* Retrieves the input for the second column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn1 - the input for the second column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputBPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn1); + +/** +* Retrieves the input for the third column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn2 - the input for the third column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputCPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn2); + +/** +* Retrieves the input for the fourth column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn3 - the input for the fourth column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputDPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for ConstantNode +**************************************************************************************************************************/ + +/** +* Sets the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[in] dValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_SetConstantPtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_double dValue); + +/** +* Retrieves the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_GetConstantPtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_double * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_GetOutputValuePtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for ConstVecNode +**************************************************************************************************************************/ + +/** +* Sets the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_SetVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, const sLib3MFVector * pValue); + +/** +* Retrieves the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_GetVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, sLib3MFVector * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pVector - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_GetOutputVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, Lib3MF_ImplicitPort * pVector); + +/************************************************************************************************************************* + Class definition for ConstMatNode +**************************************************************************************************************************/ + +/** +* Sets the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_SetMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, const sLib3MFMatrix4x4 * pValue); + +/** +* Retrieves the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pValue - the matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_GetMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, sLib3MFMatrix4x4 * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pMatrix - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_GetOutputMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, Lib3MF_ImplicitPort * pMatrix); + +/************************************************************************************************************************* + Class definition for MeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetInputMeshPtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetInputPosPtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pDistance - the output port for the signed distance to the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetOutputDistancePtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for UnsignedMeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputMeshPtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputPosPtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pDistance - the output port for the unsigned distance to the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetOutputDistancePtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for FunctionCallNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionCallNode - FunctionCallNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionCallNode_GetInputFunctionIDPtr) (Lib3MF_FunctionCallNode pFunctionCallNode, Lib3MF_ImplicitPort * pFunction); + +/************************************************************************************************************************* + Class definition for NodeIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pNodeIterator - NodeIterator instance. +* @param[out] pNode - The current element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNodeIterator_GetCurrentPtr) (Lib3MF_NodeIterator pNodeIterator, Lib3MF_ImplicitNode * pNode); + +/************************************************************************************************************************* + Class definition for Function +**************************************************************************************************************************/ + +/** +* Retrieves the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetDisplayNamePtr) (Lib3MF_Function pFunction, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_SetDisplayNamePtr) (Lib3MF_Function pFunction, const char * pDisplayName); + +/** +* Add an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_AddInputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the list of inputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetInputsPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an input +* +* @param[in] pFunction - Function instance. +* @param[in] pInput - The input to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_RemoveInputPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPort pInput); + +/** +* Add an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_AddOutputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the outputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetOutputsPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an output +* +* @param[in] pFunction - Function instance. +* @param[in] pOutput - The output to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_RemoveOutputPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPort pOutput); + +/** +* Retrieves an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_FindInputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_FindOutputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/************************************************************************************************************************* + Class definition for ImplicitFunction +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_GetIdentifierPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_SetIdentifierPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier); + +/** +* Add a node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] eNodeType - the type of the node +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, eLib3MFImplicitNodeType eNodeType, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ImplicitNode * pNode); + +/** +* Add a SinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinNode * pNode); + +/** +* Add a CosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCosNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CosNode * pNode); + +/** +* Add a TanNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTanNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanNode * pNode); + +/** +* Add a ArcSinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcSinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcSinNode * pNode); + +/** +* Add a ArcCosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcCosNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcCosNode * pNode); + +/** +* Add a ArcTan2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcTan2NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcTan2Node * pNode); + +/** +* Add a SinhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSinhNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinhNode * pNode); + +/** +* Add a CoshNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCoshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CoshNode * pNode); + +/** +* Add a TanhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTanhNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanhNode * pNode); + +/** +* Add a RoundNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddRoundNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_RoundNode * pNode); + +/** +* Add a CeilNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCeilNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CeilNode * pNode); + +/** +* Add a FloorNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFloorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FloorNode * pNode); + +/** +* Add a SignNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSignNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SignNode * pNode); + +/** +* Add a FractNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFractNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FractNode * pNode); + +/** +* Add a AbsNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddAbsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AbsNode * pNode); + +/** +* Add a ExpNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddExpNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ExpNode * pNode); + +/** +* Add a LogNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLogNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_LogNode * pNode); + +/** +* Add a Log2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLog2NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log2Node * pNode); + +/** +* Add a Log10Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLog10NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log10Node * pNode); + +/** +* Add a LengthNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLengthNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_LengthNode * pNode); + +/** +* Add a TransposeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTransposeNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TransposeNode * pNode); + +/** +* Add a InverseNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_InverseNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_InverseNode * pNode); + +/** +* Add a SqrtNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSqrtNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SqrtNode * pNode); + +/** +* Add a ResourceIdNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddResourceIdNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ResourceIdNode * pNode); + +/** +* Add an AdditionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddAdditionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AdditionNode * pNode); + +/** +* Add a SubtractionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSubtractionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SubtractionNode * pNode); + +/** +* Add a MultiplicationNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMultiplicationNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MultiplicationNode * pNode); + +/** +* Add a DivisionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDivisionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_DivisionNode * pNode); + +/** +* Add a DotNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDotNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DotNode * pNode); + +/** +* Add a CrossNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCrossNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_CrossNode * pNode); /** -* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* Add a MatVecMultiplicationNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatVecMultiplicationNode * pNode); /** -* Adds a new Composite-Mixing Values to the CompositeMaterials. +* Add a MinNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite -* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_AddCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MinNode * pNode); /** -* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* Add a MaxNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_RemoveCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMaxNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MaxNode * pNode); /** -* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* Add a FmodNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer); - -/************************************************************************************************************************* - Class definition for MultiPropertyGroup -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFmodNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FmodNode * pNode); /** -* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* Add a PowNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the count of MultiProperty-s +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddPowNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_PowNode * pNode); /** -* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* Add a SelectNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSelectNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SelectNode * pNode); /** -* Adds a new MultiProperty to the MultiPropertyGroup. +* Add a ClampNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. -* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddClampNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ClampNode * pNode); /** -* Sets the PropertyIDs of a MultiProperty. +* Add a ComposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddComposeVectorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeVectorNode * pNode); /** -* Obtains the PropertyIDs of a MultiProperty. +* Add a VectorFromScalar * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_VectorFromScalarNode * pNode); /** -* Removes a MultiProperty from this MultiPropertyGroup. +* Add a DecomposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DecomposeVectorNode * pNode); /** -* Retrieves the number of layers of this MultiPropertyGroup. +* Add a ComposeMatrixNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the number of layers +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddComposeMatrixNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeMatrixNode * pNode); /** -* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* Add a MatrixFromRowsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup -* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromRowsNode * pNode); /** -* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* Add a MatrixFromColumnsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried -* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromColumnsNode * pNode); /** -* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* Add a ConstantNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); - -/************************************************************************************************************************* - Class definition for Attachment -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstantNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstantNode * pNode); /** -* Retrieves an attachment's package path. This function will be removed in a later release. +* Add a ConstVecNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetPathPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstVecNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstVecNode * pNode); /** -* Sets an attachment's package path. This function will be removed in a later release. +* Add a ConstMatNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new path of the attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_SetPathPtr) (Lib3MF_Attachment pAttachment, const char * pPath); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstMatNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstMatNode * pNode); /** -* Returns the PackagePart that is this attachment. +* Add a MeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[out] pPackagePart - The PackagePart of this attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_PackagePartPtr) (Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MeshNode * pNode); /** -* Retrieves an attachment's relationship type +* Add a UnsignedMeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); /** -* Sets an attachment's relationship type. +* Add a FunctionCallNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new relationship type string. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const char * pPath); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFunctionCallNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode); /** -* Writes out the attachment as file. +* Retrieves the nodes * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to write into. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[out] pIterator - iterator for the list of nodes * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); +typedef Lib3MFResult (*PLib3MFImplicitFunction_GetNodesPtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_NodeIterator * pIterator); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Removes a node * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to read from. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pNode - The node to be removed * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); +typedef Lib3MFResult (*PLib3MFImplicitFunction_RemoveNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitNode pNode); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[in] pTheReadCallback - Callback to call for reading a data chunk -* @param[in] nStreamSize - number of bytes the callback returns -* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. -* @param[in] pUserData - Userdata that is passed to the callback function +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - the source port +* @param[in] pTarget - the target port * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromCallbackPtr) (Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLinkPtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitPort pSource, Lib3MF_ImplicitPort pTarget); /** -* Retrieves the size of the attachment stream +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[out] pStreamSize - the stream size +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - name of the source port in the format nodename.portname +* @param[in] pTarget - name of the target port in the format nodename.portname * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLinkByNamesPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pSource, const char * pTarget); /** -* Writes out the attachment into a buffer +* Clears the function * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_ClearPtr) (Lib3MF_ImplicitFunction pImplicitFunction); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Sorts the nodes topologically * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromBufferPtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_SortNodesTopologicallyPtr) (Lib3MF_ImplicitFunction pImplicitFunction); /************************************************************************************************************************* - Class definition for Texture2D + Class definition for FunctionFromImage3D **************************************************************************************************************************/ /** -* Retrieves the attachment located at the path of the texture. +* Returns the selected 3D image. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pImage3D - image instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetImage3DPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D * pImage3D); /** -* Sets the texture's package path to the path of the attachment. +* Sets the 3D image of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] pImage3D - image instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetImage3DPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D pImage3D); /** -* Retrieves a texture's content type. +* Sets the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pContentType - returns content type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eFilter - texture filter * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetFilterPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter eFilter); /** -* Retrieves a texture's content type. +* Returns the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eContentType - new Content Type +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pFilter - texture filter * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetFilterPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter * pFilter); /** -* Retrieves a texture's tilestyle type. +* Sets the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pTileStyleU - returns tilestyle type enum. -* @param[out] pTileStyleV - returns tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eTileStyleU - tile style in U +* @param[in] eTileStyleV - tile style in V +* @param[in] eTileStyleW - tile style in W * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetTileStylesPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV, eLib3MFTextureTileStyle eTileStyleW); /** -* Sets a texture's tilestyle type. +* Retrieves the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eTileStyleU - new tilestyle type enum. -* @param[in] eTileStyleV - new tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pTileStyleU - tile style in U +* @param[out] pTileStyleV - tile style in V +* @param[out] pTileStyleW - tile style in W * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetTileStylesPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV, eLib3MFTextureTileStyle * pTileStyleW); /** -* Retrieves a texture's filter type. +* returns the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pFilter - returns filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetOffsetPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pOffset); /** -* Sets a texture's filter type. +* Sets the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eFilter - sets new filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetOffsetPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dOffset); + +/** +* returns the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetScalePtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pScale); + +/** +* Sets the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetScalePtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dScale); /************************************************************************************************************************* Class definition for BuildItem @@ -3132,6 +5743,16 @@ typedef Lib3MFResult (*PLib3MFModel_GetColorGroupByIDPtr) (Lib3MF_Model pModel, */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -3270,6 +5891,15 @@ typedef Lib3MFResult (*PLib3MFModel_GetMultiPropertyGroupsPtr) (Lib3MF_Model pMo */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStacksPtr) (Lib3MF_Model pModel, Lib3MF_SliceStackIterator * pResourceIterator); +/** +* creates a resource iterator instance with all image3d resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetImage3DsPtr) (Lib3MF_Model pModel, Lib3MF_Image3DIterator * pResourceIterator); + /** * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. * @@ -3279,6 +5909,15 @@ typedef Lib3MFResult (*PLib3MFModel_GetSliceStacksPtr) (Lib3MF_Model pModel, Lib */ typedef Lib3MFResult (*PLib3MFModel_MergeToModelPtr) (Lib3MF_Model pModel, Lib3MF_Model * pMergedModelInstance); +/** +* Merges the given model into this model. +* +* @param[in] pModel - Model instance. +* @param[in] pModelInstance - model to be merged +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_MergeFromModelPtr) (Lib3MF_Model pModel, Lib3MF_Model pModelInstance); + /** * adds an empty mesh object to the model. * @@ -3364,6 +6003,28 @@ typedef Lib3MFResult (*PLib3MFModel_AddCompositeMaterialsPtr) (Lib3MF_Model pMod */ typedef Lib3MFResult (*PLib3MFModel_AddMultiPropertyGroupPtr) (Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance); +/** +* creates a new 3D Image Resource +* +* @param[in] pModel - Model instance. +* @param[in] nColumnCount - the number of columns in each sheet. +* @param[in] nRowCount - the number of rows in each sheet. +* @param[in] nSheetCount - the number of sheets in the image stack. +* @param[out] pInstance - returns the new ImageStack instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddImageStackPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nColumnCount, Lib3MF_uint32 nRowCount, Lib3MF_uint32 nSheetCount, Lib3MF_ImageStack * pInstance); + +/** +* finds an ImageStack object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pImageStackInstance - returns the image stack instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetImageStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ImageStack * pImageStackInstance); + /** * adds a build item to the model. * @@ -3515,6 +6176,70 @@ typedef Lib3MFResult (*PLib3MFModel_SetRandomNumberCallbackPtr) (Lib3MF_Model pM */ typedef Lib3MFResult (*PLib3MFModel_GetKeyStorePtr) (Lib3MF_Model pModel, Lib3MF_KeyStore * pKeyStore); +/** +* creates a resource iterator for all functions +* +* @param[in] pModel - Model instance. +* @param[out] pTheResourceIterator - returns the resource iterator +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetFunctionsPtr) (Lib3MF_Model pModel, Lib3MF_FunctionIterator * pTheResourceIterator); + +/** +* adds a function described by nodes to the model +* +* @param[in] pModel - Model instance. +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddImplicitFunctionPtr) (Lib3MF_Model pModel, Lib3MF_ImplicitFunction * pFunctionInstance); + +/** +* adds a function defined by an image3d to the model +* +* @param[in] pModel - Model instance. +* @param[in] pImage3DInstance - the Image3D-instance used for this function +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddFunctionFromImage3DPtr) (Lib3MF_Model pModel, Lib3MF_Image3D pImage3DInstance, Lib3MF_FunctionFromImage3D * pFunctionInstance); + +/** +* adds a volume data resource to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pVolumeDataInstance - returns the new volume data instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddVolumeDataPtr) (Lib3MF_Model pModel, Lib3MF_VolumeData * pVolumeDataInstance); + +/** +* adds an empty boundary shape object to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pLevelSetInstance - returns the mesh object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddLevelSetPtr) (Lib3MF_Model pModel, Lib3MF_LevelSet * pLevelSetInstance); + +/** +* creates a resource iterator instance with all boundary shape resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetsPtr) (Lib3MF_Model pModel, Lib3MF_LevelSetIterator * pResourceIterator); + +/** +* Removes a resource from the model +* +* @param[in] pModel - Model instance. +* @param[in] pResource - The resource to remove +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_RemoveResourcePtr) (Lib3MF_Model pModel, Lib3MF_Resource pResource); + /************************************************************************************************************************* Global functions **************************************************************************************************************************/ @@ -3767,6 +6492,9 @@ typedef struct { PLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupPtr m_Texture2DGroupIterator_GetCurrentTexture2DGroup; PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsPtr m_CompositeMaterialsIterator_GetCurrentCompositeMaterials; PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup; + PLib3MFImage3DIterator_GetCurrentImage3DPtr m_Image3DIterator_GetCurrentImage3D; + PLib3MFFunctionIterator_GetCurrentFunctionPtr m_FunctionIterator_GetCurrentFunction; + PLib3MFLevelSetIterator_GetCurrentLevelSetPtr m_LevelSetIterator_GetCurrentLevelSet; PLib3MFMetaData_GetNameSpacePtr m_MetaData_GetNameSpace; PLib3MFMetaData_SetNameSpacePtr m_MetaData_SetNameSpace; PLib3MFMetaData_GetNamePtr m_MetaData_GetName; @@ -3792,6 +6520,7 @@ typedef struct { PLib3MFObject_SetPartNumberPtr m_Object_SetPartNumber; PLib3MFObject_IsMeshObjectPtr m_Object_IsMeshObject; PLib3MFObject_IsComponentsObjectPtr m_Object_IsComponentsObject; + PLib3MFObject_IsLevelSetObjectPtr m_Object_IsLevelSetObject; PLib3MFObject_IsValidPtr m_Object_IsValid; PLib3MFObject_SetAttachmentAsThumbnailPtr m_Object_SetAttachmentAsThumbnail; PLib3MFObject_GetThumbnailAttachmentPtr m_Object_GetThumbnailAttachment; @@ -3826,6 +6555,24 @@ typedef struct { PLib3MFMeshObject_SetGeometryPtr m_MeshObject_SetGeometry; PLib3MFMeshObject_IsManifoldAndOrientedPtr m_MeshObject_IsManifoldAndOriented; PLib3MFMeshObject_BeamLatticePtr m_MeshObject_BeamLattice; + PLib3MFMeshObject_GetVolumeDataPtr m_MeshObject_GetVolumeData; + PLib3MFMeshObject_SetVolumeDataPtr m_MeshObject_SetVolumeData; + PLib3MFLevelSet_GetFunctionPtr m_LevelSet_GetFunction; + PLib3MFLevelSet_SetFunctionPtr m_LevelSet_SetFunction; + PLib3MFLevelSet_GetTransformPtr m_LevelSet_GetTransform; + PLib3MFLevelSet_SetTransformPtr m_LevelSet_SetTransform; + PLib3MFLevelSet_GetChannelNamePtr m_LevelSet_GetChannelName; + PLib3MFLevelSet_SetChannelNamePtr m_LevelSet_SetChannelName; + PLib3MFLevelSet_SetMinFeatureSizePtr m_LevelSet_SetMinFeatureSize; + PLib3MFLevelSet_GetMinFeatureSizePtr m_LevelSet_GetMinFeatureSize; + PLib3MFLevelSet_SetFallBackValuePtr m_LevelSet_SetFallBackValue; + PLib3MFLevelSet_GetFallBackValuePtr m_LevelSet_GetFallBackValue; + PLib3MFLevelSet_SetMeshBBoxOnlyPtr m_LevelSet_SetMeshBBoxOnly; + PLib3MFLevelSet_GetMeshBBoxOnlyPtr m_LevelSet_GetMeshBBoxOnly; + PLib3MFLevelSet_SetMeshPtr m_LevelSet_SetMesh; + PLib3MFLevelSet_GetMeshPtr m_LevelSet_GetMesh; + PLib3MFLevelSet_GetVolumeDataPtr m_LevelSet_GetVolumeData; + PLib3MFLevelSet_SetVolumeDataPtr m_LevelSet_SetVolumeData; PLib3MFBeamLattice_GetMinLengthPtr m_BeamLattice_GetMinLength; PLib3MFBeamLattice_SetMinLengthPtr m_BeamLattice_SetMinLength; PLib3MFBeamLattice_GetClippingPtr m_BeamLattice_GetClipping; @@ -3849,6 +6596,35 @@ typedef struct { PLib3MFBeamLattice_GetBeamSetCountPtr m_BeamLattice_GetBeamSetCount; PLib3MFBeamLattice_AddBeamSetPtr m_BeamLattice_AddBeamSet; PLib3MFBeamLattice_GetBeamSetPtr m_BeamLattice_GetBeamSet; + PLib3MFFunctionReference_GetFunctionResourceIDPtr m_FunctionReference_GetFunctionResourceID; + PLib3MFFunctionReference_SetFunctionResourceIDPtr m_FunctionReference_SetFunctionResourceID; + PLib3MFFunctionReference_GetTransformPtr m_FunctionReference_GetTransform; + PLib3MFFunctionReference_SetTransformPtr m_FunctionReference_SetTransform; + PLib3MFFunctionReference_GetChannelNamePtr m_FunctionReference_GetChannelName; + PLib3MFFunctionReference_SetChannelNamePtr m_FunctionReference_SetChannelName; + PLib3MFFunctionReference_SetMinFeatureSizePtr m_FunctionReference_SetMinFeatureSize; + PLib3MFFunctionReference_GetMinFeatureSizePtr m_FunctionReference_GetMinFeatureSize; + PLib3MFFunctionReference_SetFallBackValuePtr m_FunctionReference_SetFallBackValue; + PLib3MFFunctionReference_GetFallBackValuePtr m_FunctionReference_GetFallBackValue; + PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr m_VolumeDataComposite_GetBaseMaterialGroup; + PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr m_VolumeDataComposite_SetBaseMaterialGroup; + PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr m_VolumeDataComposite_GetMaterialMappingCount; + PLib3MFVolumeDataComposite_GetMaterialMappingPtr m_VolumeDataComposite_GetMaterialMapping; + PLib3MFVolumeDataComposite_AddMaterialMappingPtr m_VolumeDataComposite_AddMaterialMapping; + PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr m_VolumeDataComposite_RemoveMaterialMapping; + PLib3MFVolumeDataProperty_GetNamePtr m_VolumeDataProperty_GetName; + PLib3MFVolumeDataProperty_SetIsRequiredPtr m_VolumeDataProperty_SetIsRequired; + PLib3MFVolumeDataProperty_IsRequiredPtr m_VolumeDataProperty_IsRequired; + PLib3MFVolumeData_GetCompositePtr m_VolumeData_GetComposite; + PLib3MFVolumeData_CreateNewCompositePtr m_VolumeData_CreateNewComposite; + PLib3MFVolumeData_RemoveCompositePtr m_VolumeData_RemoveComposite; + PLib3MFVolumeData_GetColorPtr m_VolumeData_GetColor; + PLib3MFVolumeData_CreateNewColorPtr m_VolumeData_CreateNewColor; + PLib3MFVolumeData_RemoveColorPtr m_VolumeData_RemoveColor; + PLib3MFVolumeData_GetPropertyCountPtr m_VolumeData_GetPropertyCount; + PLib3MFVolumeData_GetPropertyPtr m_VolumeData_GetProperty; + PLib3MFVolumeData_AddPropertyFromFunctionPtr m_VolumeData_AddPropertyFromFunction; + PLib3MFVolumeData_RemovePropertyPtr m_VolumeData_RemoveProperty; PLib3MFComponent_GetObjectResourcePtr m_Component_GetObjectResource; PLib3MFComponent_GetObjectResourceIDPtr m_Component_GetObjectResourceID; PLib3MFComponent_GetUUIDPtr m_Component_GetUUID; @@ -3905,6 +6681,19 @@ typedef struct { PLib3MFMultiPropertyGroup_AddLayerPtr m_MultiPropertyGroup_AddLayer; PLib3MFMultiPropertyGroup_GetLayerPtr m_MultiPropertyGroup_GetLayer; PLib3MFMultiPropertyGroup_RemoveLayerPtr m_MultiPropertyGroup_RemoveLayer; + PLib3MFImage3D_GetNamePtr m_Image3D_GetName; + PLib3MFImage3D_SetNamePtr m_Image3D_SetName; + PLib3MFImage3D_IsImageStackPtr m_Image3D_IsImageStack; + PLib3MFImageStack_GetRowCountPtr m_ImageStack_GetRowCount; + PLib3MFImageStack_SetRowCountPtr m_ImageStack_SetRowCount; + PLib3MFImageStack_GetColumnCountPtr m_ImageStack_GetColumnCount; + PLib3MFImageStack_SetColumnCountPtr m_ImageStack_SetColumnCount; + PLib3MFImageStack_GetSheetCountPtr m_ImageStack_GetSheetCount; + PLib3MFImageStack_GetSheetPtr m_ImageStack_GetSheet; + PLib3MFImageStack_SetSheetPtr m_ImageStack_SetSheet; + PLib3MFImageStack_CreateEmptySheetPtr m_ImageStack_CreateEmptySheet; + PLib3MFImageStack_CreateSheetFromBufferPtr m_ImageStack_CreateSheetFromBuffer; + PLib3MFImageStack_CreateSheetFromFilePtr m_ImageStack_CreateSheetFromFile; PLib3MFAttachment_GetPathPtr m_Attachment_GetPath; PLib3MFAttachment_SetPathPtr m_Attachment_SetPath; PLib3MFAttachment_PackagePartPtr m_Attachment_PackagePart; @@ -3924,6 +6713,173 @@ typedef struct { PLib3MFTexture2D_SetTileStyleUVPtr m_Texture2D_SetTileStyleUV; PLib3MFTexture2D_GetFilterPtr m_Texture2D_GetFilter; PLib3MFTexture2D_SetFilterPtr m_Texture2D_SetFilter; + PLib3MFImplicitPort_GetIdentifierPtr m_ImplicitPort_GetIdentifier; + PLib3MFImplicitPort_SetIdentifierPtr m_ImplicitPort_SetIdentifier; + PLib3MFImplicitPort_GetDisplayNamePtr m_ImplicitPort_GetDisplayName; + PLib3MFImplicitPort_SetDisplayNamePtr m_ImplicitPort_SetDisplayName; + PLib3MFImplicitPort_SetTypePtr m_ImplicitPort_SetType; + PLib3MFImplicitPort_GetTypePtr m_ImplicitPort_GetType; + PLib3MFImplicitPort_GetReferencePtr m_ImplicitPort_GetReference; + PLib3MFImplicitPort_SetReferencePtr m_ImplicitPort_SetReference; + PLib3MFIterator_MoveNextPtr m_Iterator_MoveNext; + PLib3MFIterator_MovePreviousPtr m_Iterator_MovePrevious; + PLib3MFIterator_CountPtr m_Iterator_Count; + PLib3MFImplicitPortIterator_GetCurrentPtr m_ImplicitPortIterator_GetCurrent; + PLib3MFImplicitNode_GetIdentifierPtr m_ImplicitNode_GetIdentifier; + PLib3MFImplicitNode_SetIdentifierPtr m_ImplicitNode_SetIdentifier; + PLib3MFImplicitNode_GetDisplayNamePtr m_ImplicitNode_GetDisplayName; + PLib3MFImplicitNode_SetDisplayNamePtr m_ImplicitNode_SetDisplayName; + PLib3MFImplicitNode_GetTagPtr m_ImplicitNode_GetTag; + PLib3MFImplicitNode_SetTagPtr m_ImplicitNode_SetTag; + PLib3MFImplicitNode_GetNodeTypePtr m_ImplicitNode_GetNodeType; + PLib3MFImplicitNode_AddInputPtr m_ImplicitNode_AddInput; + PLib3MFImplicitNode_GetInputsPtr m_ImplicitNode_GetInputs; + PLib3MFImplicitNode_AddOutputPtr m_ImplicitNode_AddOutput; + PLib3MFImplicitNode_GetOutputsPtr m_ImplicitNode_GetOutputs; + PLib3MFImplicitNode_FindInputPtr m_ImplicitNode_FindInput; + PLib3MFImplicitNode_FindOutputPtr m_ImplicitNode_FindOutput; + PLib3MFImplicitNode_AreTypesValidPtr m_ImplicitNode_AreTypesValid; + PLib3MFOneInputNode_GetInputAPtr m_OneInputNode_GetInputA; + PLib3MFOneInputNode_GetOutputResultPtr m_OneInputNode_GetOutputResult; + PLib3MFResourceIdNode_SetResourcePtr m_ResourceIdNode_SetResource; + PLib3MFResourceIdNode_GetResourcePtr m_ResourceIdNode_GetResource; + PLib3MFResourceIdNode_GetOutputValuePtr m_ResourceIdNode_GetOutputValue; + PLib3MFTwoInputNode_GetInputBPtr m_TwoInputNode_GetInputB; + PLib3MFSelectNode_GetInputBPtr m_SelectNode_GetInputB; + PLib3MFSelectNode_GetInputCPtr m_SelectNode_GetInputC; + PLib3MFSelectNode_GetInputDPtr m_SelectNode_GetInputD; + PLib3MFClampNode_GetInputMinPtr m_ClampNode_GetInputMin; + PLib3MFClampNode_GetInputMaxPtr m_ClampNode_GetInputMax; + PLib3MFComposeVectorNode_GetInputXPtr m_ComposeVectorNode_GetInputX; + PLib3MFComposeVectorNode_GetInputYPtr m_ComposeVectorNode_GetInputY; + PLib3MFComposeVectorNode_GetInputZPtr m_ComposeVectorNode_GetInputZ; + PLib3MFComposeVectorNode_GetOutputResultPtr m_ComposeVectorNode_GetOutputResult; + PLib3MFDecomposeVectorNode_GetInputAPtr m_DecomposeVectorNode_GetInputA; + PLib3MFDecomposeVectorNode_GetOutputXPtr m_DecomposeVectorNode_GetOutputX; + PLib3MFDecomposeVectorNode_GetOutputYPtr m_DecomposeVectorNode_GetOutputY; + PLib3MFDecomposeVectorNode_GetOutputZPtr m_DecomposeVectorNode_GetOutputZ; + PLib3MFComposeMatrixNode_GetInputM00Ptr m_ComposeMatrixNode_GetInputM00; + PLib3MFComposeMatrixNode_GetInputM01Ptr m_ComposeMatrixNode_GetInputM01; + PLib3MFComposeMatrixNode_GetInputM02Ptr m_ComposeMatrixNode_GetInputM02; + PLib3MFComposeMatrixNode_GetInputM03Ptr m_ComposeMatrixNode_GetInputM03; + PLib3MFComposeMatrixNode_GetInputM10Ptr m_ComposeMatrixNode_GetInputM10; + PLib3MFComposeMatrixNode_GetInputM11Ptr m_ComposeMatrixNode_GetInputM11; + PLib3MFComposeMatrixNode_GetInputM12Ptr m_ComposeMatrixNode_GetInputM12; + PLib3MFComposeMatrixNode_GetInputM13Ptr m_ComposeMatrixNode_GetInputM13; + PLib3MFComposeMatrixNode_GetInputM20Ptr m_ComposeMatrixNode_GetInputM20; + PLib3MFComposeMatrixNode_GetInputM21Ptr m_ComposeMatrixNode_GetInputM21; + PLib3MFComposeMatrixNode_GetInputM22Ptr m_ComposeMatrixNode_GetInputM22; + PLib3MFComposeMatrixNode_GetInputM23Ptr m_ComposeMatrixNode_GetInputM23; + PLib3MFComposeMatrixNode_GetInputM30Ptr m_ComposeMatrixNode_GetInputM30; + PLib3MFComposeMatrixNode_GetInputM31Ptr m_ComposeMatrixNode_GetInputM31; + PLib3MFComposeMatrixNode_GetInputM32Ptr m_ComposeMatrixNode_GetInputM32; + PLib3MFComposeMatrixNode_GetInputM33Ptr m_ComposeMatrixNode_GetInputM33; + PLib3MFComposeMatrixNode_GetOutputResultPtr m_ComposeMatrixNode_GetOutputResult; + PLib3MFMatrixFromRowsNode_GetInputAPtr m_MatrixFromRowsNode_GetInputA; + PLib3MFMatrixFromRowsNode_GetInputBPtr m_MatrixFromRowsNode_GetInputB; + PLib3MFMatrixFromRowsNode_GetInputCPtr m_MatrixFromRowsNode_GetInputC; + PLib3MFMatrixFromRowsNode_GetInputDPtr m_MatrixFromRowsNode_GetInputD; + PLib3MFMatrixFromRowsNode_GetOutputResultPtr m_MatrixFromRowsNode_GetOutputResult; + PLib3MFMatrixFromColumnsNode_GetInputAPtr m_MatrixFromColumnsNode_GetInputA; + PLib3MFMatrixFromColumnsNode_GetInputBPtr m_MatrixFromColumnsNode_GetInputB; + PLib3MFMatrixFromColumnsNode_GetInputCPtr m_MatrixFromColumnsNode_GetInputC; + PLib3MFMatrixFromColumnsNode_GetInputDPtr m_MatrixFromColumnsNode_GetInputD; + PLib3MFMatrixFromColumnsNode_GetOutputResultPtr m_MatrixFromColumnsNode_GetOutputResult; + PLib3MFConstantNode_SetConstantPtr m_ConstantNode_SetConstant; + PLib3MFConstantNode_GetConstantPtr m_ConstantNode_GetConstant; + PLib3MFConstantNode_GetOutputValuePtr m_ConstantNode_GetOutputValue; + PLib3MFConstVecNode_SetVectorPtr m_ConstVecNode_SetVector; + PLib3MFConstVecNode_GetVectorPtr m_ConstVecNode_GetVector; + PLib3MFConstVecNode_GetOutputVectorPtr m_ConstVecNode_GetOutputVector; + PLib3MFConstMatNode_SetMatrixPtr m_ConstMatNode_SetMatrix; + PLib3MFConstMatNode_GetMatrixPtr m_ConstMatNode_GetMatrix; + PLib3MFConstMatNode_GetOutputMatrixPtr m_ConstMatNode_GetOutputMatrix; + PLib3MFMeshNode_GetInputMeshPtr m_MeshNode_GetInputMesh; + PLib3MFMeshNode_GetInputPosPtr m_MeshNode_GetInputPos; + PLib3MFMeshNode_GetOutputDistancePtr m_MeshNode_GetOutputDistance; + PLib3MFUnsignedMeshNode_GetInputMeshPtr m_UnsignedMeshNode_GetInputMesh; + PLib3MFUnsignedMeshNode_GetInputPosPtr m_UnsignedMeshNode_GetInputPos; + PLib3MFUnsignedMeshNode_GetOutputDistancePtr m_UnsignedMeshNode_GetOutputDistance; + PLib3MFFunctionCallNode_GetInputFunctionIDPtr m_FunctionCallNode_GetInputFunctionID; + PLib3MFNodeIterator_GetCurrentPtr m_NodeIterator_GetCurrent; + PLib3MFFunction_GetDisplayNamePtr m_Function_GetDisplayName; + PLib3MFFunction_SetDisplayNamePtr m_Function_SetDisplayName; + PLib3MFFunction_AddInputPtr m_Function_AddInput; + PLib3MFFunction_GetInputsPtr m_Function_GetInputs; + PLib3MFFunction_RemoveInputPtr m_Function_RemoveInput; + PLib3MFFunction_AddOutputPtr m_Function_AddOutput; + PLib3MFFunction_GetOutputsPtr m_Function_GetOutputs; + PLib3MFFunction_RemoveOutputPtr m_Function_RemoveOutput; + PLib3MFFunction_FindInputPtr m_Function_FindInput; + PLib3MFFunction_FindOutputPtr m_Function_FindOutput; + PLib3MFImplicitFunction_GetIdentifierPtr m_ImplicitFunction_GetIdentifier; + PLib3MFImplicitFunction_SetIdentifierPtr m_ImplicitFunction_SetIdentifier; + PLib3MFImplicitFunction_AddNodePtr m_ImplicitFunction_AddNode; + PLib3MFImplicitFunction_AddSinNodePtr m_ImplicitFunction_AddSinNode; + PLib3MFImplicitFunction_AddCosNodePtr m_ImplicitFunction_AddCosNode; + PLib3MFImplicitFunction_AddTanNodePtr m_ImplicitFunction_AddTanNode; + PLib3MFImplicitFunction_AddArcSinNodePtr m_ImplicitFunction_AddArcSinNode; + PLib3MFImplicitFunction_AddArcCosNodePtr m_ImplicitFunction_AddArcCosNode; + PLib3MFImplicitFunction_AddArcTan2NodePtr m_ImplicitFunction_AddArcTan2Node; + PLib3MFImplicitFunction_AddSinhNodePtr m_ImplicitFunction_AddSinhNode; + PLib3MFImplicitFunction_AddCoshNodePtr m_ImplicitFunction_AddCoshNode; + PLib3MFImplicitFunction_AddTanhNodePtr m_ImplicitFunction_AddTanhNode; + PLib3MFImplicitFunction_AddRoundNodePtr m_ImplicitFunction_AddRoundNode; + PLib3MFImplicitFunction_AddCeilNodePtr m_ImplicitFunction_AddCeilNode; + PLib3MFImplicitFunction_AddFloorNodePtr m_ImplicitFunction_AddFloorNode; + PLib3MFImplicitFunction_AddSignNodePtr m_ImplicitFunction_AddSignNode; + PLib3MFImplicitFunction_AddFractNodePtr m_ImplicitFunction_AddFractNode; + PLib3MFImplicitFunction_AddAbsNodePtr m_ImplicitFunction_AddAbsNode; + PLib3MFImplicitFunction_AddExpNodePtr m_ImplicitFunction_AddExpNode; + PLib3MFImplicitFunction_AddLogNodePtr m_ImplicitFunction_AddLogNode; + PLib3MFImplicitFunction_AddLog2NodePtr m_ImplicitFunction_AddLog2Node; + PLib3MFImplicitFunction_AddLog10NodePtr m_ImplicitFunction_AddLog10Node; + PLib3MFImplicitFunction_AddLengthNodePtr m_ImplicitFunction_AddLengthNode; + PLib3MFImplicitFunction_AddTransposeNodePtr m_ImplicitFunction_AddTransposeNode; + PLib3MFImplicitFunction_InverseNodePtr m_ImplicitFunction_InverseNode; + PLib3MFImplicitFunction_AddSqrtNodePtr m_ImplicitFunction_AddSqrtNode; + PLib3MFImplicitFunction_AddResourceIdNodePtr m_ImplicitFunction_AddResourceIdNode; + PLib3MFImplicitFunction_AddAdditionNodePtr m_ImplicitFunction_AddAdditionNode; + PLib3MFImplicitFunction_AddSubtractionNodePtr m_ImplicitFunction_AddSubtractionNode; + PLib3MFImplicitFunction_AddMultiplicationNodePtr m_ImplicitFunction_AddMultiplicationNode; + PLib3MFImplicitFunction_AddDivisionNodePtr m_ImplicitFunction_AddDivisionNode; + PLib3MFImplicitFunction_AddDotNodePtr m_ImplicitFunction_AddDotNode; + PLib3MFImplicitFunction_AddCrossNodePtr m_ImplicitFunction_AddCrossNode; + PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr m_ImplicitFunction_AddMatVecMultiplicationNode; + PLib3MFImplicitFunction_AddMinNodePtr m_ImplicitFunction_AddMinNode; + PLib3MFImplicitFunction_AddMaxNodePtr m_ImplicitFunction_AddMaxNode; + PLib3MFImplicitFunction_AddFmodNodePtr m_ImplicitFunction_AddFmodNode; + PLib3MFImplicitFunction_AddPowNodePtr m_ImplicitFunction_AddPowNode; + PLib3MFImplicitFunction_AddSelectNodePtr m_ImplicitFunction_AddSelectNode; + PLib3MFImplicitFunction_AddClampNodePtr m_ImplicitFunction_AddClampNode; + PLib3MFImplicitFunction_AddComposeVectorNodePtr m_ImplicitFunction_AddComposeVectorNode; + PLib3MFImplicitFunction_AddVectorFromScalarNodePtr m_ImplicitFunction_AddVectorFromScalarNode; + PLib3MFImplicitFunction_AddDecomposeVectorNodePtr m_ImplicitFunction_AddDecomposeVectorNode; + PLib3MFImplicitFunction_AddComposeMatrixNodePtr m_ImplicitFunction_AddComposeMatrixNode; + PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr m_ImplicitFunction_AddMatrixFromRowsNode; + PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr m_ImplicitFunction_AddMatrixFromColumnsNode; + PLib3MFImplicitFunction_AddConstantNodePtr m_ImplicitFunction_AddConstantNode; + PLib3MFImplicitFunction_AddConstVecNodePtr m_ImplicitFunction_AddConstVecNode; + PLib3MFImplicitFunction_AddConstMatNodePtr m_ImplicitFunction_AddConstMatNode; + PLib3MFImplicitFunction_AddMeshNodePtr m_ImplicitFunction_AddMeshNode; + PLib3MFImplicitFunction_AddUnsignedMeshNodePtr m_ImplicitFunction_AddUnsignedMeshNode; + PLib3MFImplicitFunction_AddFunctionCallNodePtr m_ImplicitFunction_AddFunctionCallNode; + PLib3MFImplicitFunction_GetNodesPtr m_ImplicitFunction_GetNodes; + PLib3MFImplicitFunction_RemoveNodePtr m_ImplicitFunction_RemoveNode; + PLib3MFImplicitFunction_AddLinkPtr m_ImplicitFunction_AddLink; + PLib3MFImplicitFunction_AddLinkByNamesPtr m_ImplicitFunction_AddLinkByNames; + PLib3MFImplicitFunction_ClearPtr m_ImplicitFunction_Clear; + PLib3MFImplicitFunction_SortNodesTopologicallyPtr m_ImplicitFunction_SortNodesTopologically; + PLib3MFFunctionFromImage3D_GetImage3DPtr m_FunctionFromImage3D_GetImage3D; + PLib3MFFunctionFromImage3D_SetImage3DPtr m_FunctionFromImage3D_SetImage3D; + PLib3MFFunctionFromImage3D_SetFilterPtr m_FunctionFromImage3D_SetFilter; + PLib3MFFunctionFromImage3D_GetFilterPtr m_FunctionFromImage3D_GetFilter; + PLib3MFFunctionFromImage3D_SetTileStylesPtr m_FunctionFromImage3D_SetTileStyles; + PLib3MFFunctionFromImage3D_GetTileStylesPtr m_FunctionFromImage3D_GetTileStyles; + PLib3MFFunctionFromImage3D_GetOffsetPtr m_FunctionFromImage3D_GetOffset; + PLib3MFFunctionFromImage3D_SetOffsetPtr m_FunctionFromImage3D_SetOffset; + PLib3MFFunctionFromImage3D_GetScalePtr m_FunctionFromImage3D_GetScale; + PLib3MFFunctionFromImage3D_SetScalePtr m_FunctionFromImage3D_SetScale; PLib3MFBuildItem_GetObjectResourcePtr m_BuildItem_GetObjectResource; PLib3MFBuildItem_GetUUIDPtr m_BuildItem_GetUUID; PLib3MFBuildItem_SetUUIDPtr m_BuildItem_SetUUID; @@ -4018,6 +6974,7 @@ typedef struct { PLib3MFModel_GetComponentsObjectByIDPtr m_Model_GetComponentsObjectByID; PLib3MFModel_GetColorGroupByIDPtr m_Model_GetColorGroupByID; PLib3MFModel_GetSliceStackByIDPtr m_Model_GetSliceStackByID; + PLib3MFModel_GetLevelSetByIDPtr m_Model_GetLevelSetByID; PLib3MFModel_GetBuildUUIDPtr m_Model_GetBuildUUID; PLib3MFModel_SetBuildUUIDPtr m_Model_SetBuildUUID; PLib3MFModel_GetBuildItemsPtr m_Model_GetBuildItems; @@ -4033,7 +6990,9 @@ typedef struct { PLib3MFModel_GetCompositeMaterialsPtr m_Model_GetCompositeMaterials; PLib3MFModel_GetMultiPropertyGroupsPtr m_Model_GetMultiPropertyGroups; PLib3MFModel_GetSliceStacksPtr m_Model_GetSliceStacks; + PLib3MFModel_GetImage3DsPtr m_Model_GetImage3Ds; PLib3MFModel_MergeToModelPtr m_Model_MergeToModel; + PLib3MFModel_MergeFromModelPtr m_Model_MergeFromModel; PLib3MFModel_AddMeshObjectPtr m_Model_AddMeshObject; PLib3MFModel_AddComponentsObjectPtr m_Model_AddComponentsObject; PLib3MFModel_AddSliceStackPtr m_Model_AddSliceStack; @@ -4043,6 +7002,8 @@ typedef struct { PLib3MFModel_AddTexture2DGroupPtr m_Model_AddTexture2DGroup; PLib3MFModel_AddCompositeMaterialsPtr m_Model_AddCompositeMaterials; PLib3MFModel_AddMultiPropertyGroupPtr m_Model_AddMultiPropertyGroup; + PLib3MFModel_AddImageStackPtr m_Model_AddImageStack; + PLib3MFModel_GetImageStackByIDPtr m_Model_GetImageStackByID; PLib3MFModel_AddBuildItemPtr m_Model_AddBuildItem; PLib3MFModel_RemoveBuildItemPtr m_Model_RemoveBuildItem; PLib3MFModel_GetMetaDataGroupPtr m_Model_GetMetaDataGroup; @@ -4059,6 +7020,13 @@ typedef struct { PLib3MFModel_RemoveCustomContentTypePtr m_Model_RemoveCustomContentType; PLib3MFModel_SetRandomNumberCallbackPtr m_Model_SetRandomNumberCallback; PLib3MFModel_GetKeyStorePtr m_Model_GetKeyStore; + PLib3MFModel_GetFunctionsPtr m_Model_GetFunctions; + PLib3MFModel_AddImplicitFunctionPtr m_Model_AddImplicitFunction; + PLib3MFModel_AddFunctionFromImage3DPtr m_Model_AddFunctionFromImage3D; + PLib3MFModel_AddVolumeDataPtr m_Model_AddVolumeData; + PLib3MFModel_AddLevelSetPtr m_Model_AddLevelSet; + PLib3MFModel_GetLevelSetsPtr m_Model_GetLevelSets; + PLib3MFModel_RemoveResourcePtr m_Model_RemoveResource; PLib3MFGetLibraryVersionPtr m_GetLibraryVersion; PLib3MFGetPrereleaseInformationPtr m_GetPrereleaseInformation; PLib3MFGetBuildInformationPtr m_GetBuildInformation; diff --git a/Autogenerated/Bindings/CDynamic/lib3mf_types.h b/Autogenerated/Bindings/CDynamic/lib3mf_types.h index 6f2dcf6a4..696aec4eb 100644 --- a/Autogenerated/Bindings/CDynamic/lib3mf_types.h +++ b/Autogenerated/Bindings/CDynamic/lib3mf_types.h @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -84,8 +84,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 3 -#define LIB3MF_VERSION_MICRO 2 +#define LIB3MF_VERSION_MINOR 4 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -130,13 +130,18 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER 140 /** A progress identifier is unknown */ #define LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT 141 /** An element buffer exceeds its spec limit */ #define LIB3MF_ERROR_INVALIDRESOURCE 142 /** A resource is invalid */ +#define LIB3MF_ERROR_INVALIDLEVELSET 143 /** A level set is invalid */ #define LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE 2000 /** This object type is not valid for beamlattices */ #define LIB3MF_ERROR_INVALIDKEYSTORE 3000 /** The keystore object is invalid */ #define LIB3MF_ERROR_INVALIDKEYSTORECONSUMER 3001 /** The consumer keystore object is invalid */ #define LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND 3002 /** A consumer has not been found */ #define LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND 3003 /** A resource data has not been found */ #define LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED 3004 /** A Key or Conentent encryption callback has not been registered */ -#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key siue is invalid */ +#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key size is invalid */ +#define LIB3MF_ERROR_INCOMPATIBLEPORTTYPES 4000 /** Link could not be added, the port types are incompatible */ +#define LIB3MF_ERROR_GRAPHISCYCLIC 4001 /** The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted. */ +#define LIB3MF_ERROR_INPUTNOTSET 4002 /** The input of a node is not set. */ +#define LIB3MF_ERROR_INVALIDNODECONFIGURATION 4003 /** The selected node configuration is not supported */ /************************************************************************************************************************* Error strings for Lib3MF @@ -181,13 +186,18 @@ inline const char * LIB3MF_GETERRORSTRING (Lib3MFResult nErrorCode) { case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "A progress identifier is unknown"; case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "An element buffer exceeds its spec limit"; case LIB3MF_ERROR_INVALIDRESOURCE: return "A resource is invalid"; + case LIB3MF_ERROR_INVALIDLEVELSET: return "A level set is invalid"; case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "This object type is not valid for beamlattices"; case LIB3MF_ERROR_INVALIDKEYSTORE: return "The keystore object is invalid"; case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "The consumer keystore object is invalid"; case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: return "A consumer has not been found"; case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "A resource data has not been found"; case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "A Key or Conentent encryption callback has not been registered"; - case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key siue is invalid"; + case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key size is invalid"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "Link could not be added, the port types are incompatible"; + case LIB3MF_ERROR_GRAPHISCYCLIC: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case LIB3MF_ERROR_INPUTNOTSET: return "The input of a node is not set."; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "The selected node configuration is not supported"; default: return "unknown error"; } } @@ -212,11 +222,21 @@ typedef Lib3MFHandle Lib3MF_ColorGroupIterator; typedef Lib3MFHandle Lib3MF_Texture2DGroupIterator; typedef Lib3MFHandle Lib3MF_CompositeMaterialsIterator; typedef Lib3MFHandle Lib3MF_MultiPropertyGroupIterator; +typedef Lib3MFHandle Lib3MF_Image3DIterator; +typedef Lib3MFHandle Lib3MF_FunctionIterator; +typedef Lib3MFHandle Lib3MF_LevelSetIterator; typedef Lib3MFHandle Lib3MF_MetaData; typedef Lib3MFHandle Lib3MF_MetaDataGroup; typedef Lib3MFHandle Lib3MF_Object; typedef Lib3MFHandle Lib3MF_MeshObject; +typedef Lib3MFHandle Lib3MF_LevelSet; typedef Lib3MFHandle Lib3MF_BeamLattice; +typedef Lib3MFHandle Lib3MF_FunctionReference; +typedef Lib3MFHandle Lib3MF_VolumeDataColor; +typedef Lib3MFHandle Lib3MF_MaterialMapping; +typedef Lib3MFHandle Lib3MF_VolumeDataComposite; +typedef Lib3MFHandle Lib3MF_VolumeDataProperty; +typedef Lib3MFHandle Lib3MF_VolumeData; typedef Lib3MFHandle Lib3MF_Component; typedef Lib3MFHandle Lib3MF_ComponentsObject; typedef Lib3MFHandle Lib3MF_BeamSet; @@ -225,8 +245,71 @@ typedef Lib3MFHandle Lib3MF_ColorGroup; typedef Lib3MFHandle Lib3MF_Texture2DGroup; typedef Lib3MFHandle Lib3MF_CompositeMaterials; typedef Lib3MFHandle Lib3MF_MultiPropertyGroup; +typedef Lib3MFHandle Lib3MF_Image3D; +typedef Lib3MFHandle Lib3MF_ImageStack; typedef Lib3MFHandle Lib3MF_Attachment; typedef Lib3MFHandle Lib3MF_Texture2D; +typedef Lib3MFHandle Lib3MF_ImplicitPort; +typedef Lib3MFHandle Lib3MF_Iterator; +typedef Lib3MFHandle Lib3MF_ImplicitPortIterator; +typedef Lib3MFHandle Lib3MF_ImplicitNode; +typedef Lib3MFHandle Lib3MF_OneInputNode; +typedef Lib3MFHandle Lib3MF_SinNode; +typedef Lib3MFHandle Lib3MF_CosNode; +typedef Lib3MFHandle Lib3MF_TanNode; +typedef Lib3MFHandle Lib3MF_ArcSinNode; +typedef Lib3MFHandle Lib3MF_ArcCosNode; +typedef Lib3MFHandle Lib3MF_ArcTanNode; +typedef Lib3MFHandle Lib3MF_SinhNode; +typedef Lib3MFHandle Lib3MF_CoshNode; +typedef Lib3MFHandle Lib3MF_TanhNode; +typedef Lib3MFHandle Lib3MF_RoundNode; +typedef Lib3MFHandle Lib3MF_CeilNode; +typedef Lib3MFHandle Lib3MF_FloorNode; +typedef Lib3MFHandle Lib3MF_SignNode; +typedef Lib3MFHandle Lib3MF_FractNode; +typedef Lib3MFHandle Lib3MF_AbsNode; +typedef Lib3MFHandle Lib3MF_ExpNode; +typedef Lib3MFHandle Lib3MF_LogNode; +typedef Lib3MFHandle Lib3MF_Log2Node; +typedef Lib3MFHandle Lib3MF_Log10Node; +typedef Lib3MFHandle Lib3MF_LengthNode; +typedef Lib3MFHandle Lib3MF_TransposeNode; +typedef Lib3MFHandle Lib3MF_InverseNode; +typedef Lib3MFHandle Lib3MF_SqrtNode; +typedef Lib3MFHandle Lib3MF_ResourceIdNode; +typedef Lib3MFHandle Lib3MF_TwoInputNode; +typedef Lib3MFHandle Lib3MF_AdditionNode; +typedef Lib3MFHandle Lib3MF_SubtractionNode; +typedef Lib3MFHandle Lib3MF_MultiplicationNode; +typedef Lib3MFHandle Lib3MF_DivisionNode; +typedef Lib3MFHandle Lib3MF_DotNode; +typedef Lib3MFHandle Lib3MF_CrossNode; +typedef Lib3MFHandle Lib3MF_ArcTan2Node; +typedef Lib3MFHandle Lib3MF_MatVecMultiplicationNode; +typedef Lib3MFHandle Lib3MF_MinNode; +typedef Lib3MFHandle Lib3MF_MaxNode; +typedef Lib3MFHandle Lib3MF_FmodNode; +typedef Lib3MFHandle Lib3MF_ModNode; +typedef Lib3MFHandle Lib3MF_PowNode; +typedef Lib3MFHandle Lib3MF_SelectNode; +typedef Lib3MFHandle Lib3MF_ClampNode; +typedef Lib3MFHandle Lib3MF_ComposeVectorNode; +typedef Lib3MFHandle Lib3MF_VectorFromScalarNode; +typedef Lib3MFHandle Lib3MF_DecomposeVectorNode; +typedef Lib3MFHandle Lib3MF_ComposeMatrixNode; +typedef Lib3MFHandle Lib3MF_MatrixFromRowsNode; +typedef Lib3MFHandle Lib3MF_MatrixFromColumnsNode; +typedef Lib3MFHandle Lib3MF_ConstantNode; +typedef Lib3MFHandle Lib3MF_ConstVecNode; +typedef Lib3MFHandle Lib3MF_ConstMatNode; +typedef Lib3MFHandle Lib3MF_MeshNode; +typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_FunctionCallNode; +typedef Lib3MFHandle Lib3MF_NodeIterator; +typedef Lib3MFHandle Lib3MF_Function; +typedef Lib3MFHandle Lib3MF_ImplicitFunction; +typedef Lib3MFHandle Lib3MF_FunctionFromImage3D; typedef Lib3MFHandle Lib3MF_BuildItem; typedef Lib3MFHandle Lib3MF_BuildItemIterator; typedef Lib3MFHandle Lib3MF_Slice; @@ -305,7 +388,7 @@ typedef enum eLib3MFBeamLatticeClipMode { } eLib3MFBeamLatticeClipMode; typedef enum eLib3MFBeamLatticeBallMode { - eBeamLatticeBallModeNone = 0, + eBeamLatticeBallModeBeamLatticeBallModeNone = 0, eBeamLatticeBallModeMixed = 1, eBeamLatticeBallModeAll = 2 } eLib3MFBeamLatticeBallMode; @@ -343,6 +426,103 @@ typedef enum eLib3MFBlendMethod { eBlendMethodMultiply = 2 } eLib3MFBlendMethod; +typedef enum eLib3MFChannelName { + eChannelNameRed = 0, + eChannelNameGreen = 1, + eChannelNameBlue = 2, + eChannelNameAlpha = 3 +} eLib3MFChannelName; + +typedef enum eLib3MFCompositionMethod { + eCompositionMethodWeightedSum = 0, + eCompositionMethodMultiply = 1, + eCompositionMethodMin = 2, + eCompositionMethodMax = 3, + eCompositionMethodMask = 4 +} eLib3MFCompositionMethod; + +typedef enum eLib3MFCompositionSpace { + eCompositionSpaceRaw = 0, + eCompositionSpaceLinearColor = 1 +} eLib3MFCompositionSpace; + +/** +* enum eLib3MFImplicitNodeType - The type of the node +*/ +typedef enum eLib3MFImplicitNodeType { + eImplicitNodeTypeAddition = 1, /** Adds to values (scalar or vector) */ + eImplicitNodeTypeSubtraction = 2, /** Subtracts two values (scalar or vector) */ + eImplicitNodeTypeMultiplication = 3, /** Multiplies two values (scalar or vector) */ + eImplicitNodeTypeDivision = 4, /** Divides two values (scalar or vector) */ + eImplicitNodeTypeConstant = 5, /** A constant scalar value */ + eImplicitNodeTypeConstVec = 6, /** A constant vector value */ + eImplicitNodeTypeConstMat = 7, /** A constant matrix value */ + eImplicitNodeTypeComposeVector = 8, /** Creates a vector from three scalar values */ + eImplicitNodeTypeDecomposeVector = 9, /** Decomposes a vector into three scalar values */ + eImplicitNodeTypeComposeMatrix = 10, /** Creates a matrix from nine scalar values */ + eImplicitNodeTypeMatrixFromColumns = 11, /** Creates a matrix from three column vector values */ + eImplicitNodeTypeMatrixFromRows = 12, /** Creates a matrix from three row vector values */ + eImplicitNodeTypeDot = 13, /** Calculates the dot product of two vector values */ + eImplicitNodeTypeCross = 14, /** Calculates the cross product of two vector values */ + eImplicitNodeTypeMatVecMultiplication = 15, /** Multiplies a matrix with a vector */ + eImplicitNodeTypeTranspose = 16, /** Transposes a matrix */ + eImplicitNodeTypeInverse = 17, /** Computes the inverse of a matrix */ + eImplicitNodeTypeSinus = 18, /** Calculates the sinus */ + eImplicitNodeTypeCosinus = 19, /** Calculates the cosinus */ + eImplicitNodeTypeTan = 20, /** Calculates the tangent */ + eImplicitNodeTypeArcSin = 21, /** Calculates the arcsinus */ + eImplicitNodeTypeArcCos = 22, /** Calculates the arccosinus */ + eImplicitNodeTypeArcTan = 23, /** Calculates the arctangent */ + eImplicitNodeTypeArcTan2 = 24, /** Calculates the arctangent */ + eImplicitNodeTypeMin = 25, /** Calculates the minimum tow values */ + eImplicitNodeTypeMax = 26, /** Calculates the maximum of two values */ + eImplicitNodeTypeAbs = 27, /** Calcul the absolute value */ + eImplicitNodeTypeFmod = 28, /** Computes the remainder of the divison of the inputs (same behavior as C fmod) */ + eImplicitNodeTypePow = 29, /** Calculates the power A^B */ + eImplicitNodeTypeSqrt = 30, /** Calculates the square root */ + eImplicitNodeTypeExp = 31, /** Exponential function */ + eImplicitNodeTypeLog = 32, /** Natural logarithmus */ + eImplicitNodeTypeLog2 = 33, /** Logarithmus to the base 2 */ + eImplicitNodeTypeLog10 = 34, /** Logarithmus to the base 10 */ + eImplicitNodeTypeSelect = 35, /** If A is less B returns C, else D */ + eImplicitNodeTypeClamp = 36, /** Clamps the input value to min and max */ + eImplicitNodeTypeSinh = 37, /** Calculates the hyperbolic sine */ + eImplicitNodeTypeCosh = 38, /** Calculates the hyperbolic cosine */ + eImplicitNodeTypeTanh = 39, /** Calculates the hyperbolic tangent */ + eImplicitNodeTypeRound = 40, /** Rounds a scalar value to the nearest integer */ + eImplicitNodeTypeCeil = 41, /** Rounds a scalar value up to the nearest integer */ + eImplicitNodeTypeFloor = 42, /** Rounds a scalar value down to the nearest integer */ + eImplicitNodeTypeSign = 43, /** Returns the sign */ + eImplicitNodeTypeFract = 44, /** Returns the fractional part */ + eImplicitNodeTypeFunctionCall = 45, /** Calls a function */ + eImplicitNodeTypeMesh = 46, /** Calculates the signed distance to a mesh */ + eImplicitNodeTypeLength = 47, /** Calculates the length of a vector */ + eImplicitNodeTypeConstResourceID = 48, /** Selects a resource (function, mesh etc.) */ + eImplicitNodeTypeVectorFromScalar = 49, /** Creates a vector from one scalar values */ + eImplicitNodeTypeUnsignedMesh = 50, /** Calculates the unsigned distance to a mesh */ + eImplicitNodeTypeMod = 51 /** Calculates the modulo of two values (same behaviour as glsl mod) */ +} eLib3MFImplicitNodeType; + +/** +* enum eLib3MFImplicitPortType - The type of the port +*/ +typedef enum eLib3MFImplicitPortType { + eImplicitPortTypeScalar = 1, /** Scalar */ + eImplicitPortTypeVector = 2, /** Vector */ + eImplicitPortTypeMatrix = 3, /** 4x4 Matrix */ + eImplicitPortTypeResourceID = 4 /** Resource ID */ +} eLib3MFImplicitPortType; + +/** +* enum eLib3MFImplicitNodeConfiguration - Defines the input and output types of a node +*/ +typedef enum eLib3MFImplicitNodeConfiguration { + eImplicitNodeConfigurationDefault = 1, /** Default */ + eImplicitNodeConfigurationScalarToScalar = 2, /** Scalar -> Scalar */ + eImplicitNodeConfigurationVectorToVector = 3, /** Vector -> Vector */ + eImplicitNodeConfigurationMatrixToMatrix = 4 /** Matrix -> Matrix */ +} eLib3MFImplicitNodeConfiguration; + typedef enum eLib3MFEncryptionAlgorithm { eEncryptionAlgorithmAES256_GCM = 1 /** http://www.w3.org/2009/xmlenc11#aes256-gcm */ } eLib3MFEncryptionAlgorithm; @@ -433,6 +613,36 @@ typedef union { int m_code; } structEnumLib3MFBlendMethod; +typedef union { + eLib3MFChannelName m_enum; + int m_code; +} structEnumLib3MFChannelName; + +typedef union { + eLib3MFCompositionMethod m_enum; + int m_code; +} structEnumLib3MFCompositionMethod; + +typedef union { + eLib3MFCompositionSpace m_enum; + int m_code; +} structEnumLib3MFCompositionSpace; + +typedef union { + eLib3MFImplicitNodeType m_enum; + int m_code; +} structEnumLib3MFImplicitNodeType; + +typedef union { + eLib3MFImplicitPortType m_enum; + int m_code; +} structEnumLib3MFImplicitPortType; + +typedef union { + eLib3MFImplicitNodeConfiguration m_enum; + int m_code; +} structEnumLib3MFImplicitNodeConfiguration; + typedef union { eLib3MFEncryptionAlgorithm m_enum; int m_code; @@ -523,6 +733,14 @@ typedef struct sLib3MFBall { Lib3MF_double m_Radius; } sLib3MFBall; +typedef struct sLib3MFVector { + Lib3MF_double m_Coordinates[3]; +} sLib3MFVector; + +typedef struct sLib3MFMatrix4x4 { + Lib3MF_double m_Field[4][4]; +} sLib3MFMatrix4x4; + #pragma pack () /************************************************************************************************************************* diff --git a/Autogenerated/Bindings/CSharp/Lib3MF.cs b/Autogenerated/Bindings/CSharp/Lib3MF.cs index 9caaa404a..7292de8bf 100644 --- a/Autogenerated/Bindings/CSharp/Lib3MF.cs +++ b/Autogenerated/Bindings/CSharp/Lib3MF.cs @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated CSharp file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -101,7 +101,7 @@ public enum eBeamLatticeClipMode { }; public enum eBeamLatticeBallMode { - None = 0, + BeamLatticeBallModeNone = 0, Mixed = 1, All = 2 }; @@ -139,6 +139,94 @@ public enum eBlendMethod { Multiply = 2 }; + public enum eChannelName { + Red = 0, + Green = 1, + Blue = 2, + Alpha = 3 + }; + + public enum eCompositionMethod { + WeightedSum = 0, + Multiply = 1, + Min = 2, + Max = 3, + Mask = 4 + }; + + public enum eCompositionSpace { + Raw = 0, + LinearColor = 1 + }; + + public enum eImplicitNodeType { + Addition = 1, + Subtraction = 2, + Multiplication = 3, + Division = 4, + Constant = 5, + ConstVec = 6, + ConstMat = 7, + ComposeVector = 8, + DecomposeVector = 9, + ComposeMatrix = 10, + MatrixFromColumns = 11, + MatrixFromRows = 12, + Dot = 13, + Cross = 14, + MatVecMultiplication = 15, + Transpose = 16, + Inverse = 17, + Sinus = 18, + Cosinus = 19, + Tan = 20, + ArcSin = 21, + ArcCos = 22, + ArcTan = 23, + ArcTan2 = 24, + Min = 25, + Max = 26, + Abs = 27, + Fmod = 28, + Pow = 29, + Sqrt = 30, + Exp = 31, + Log = 32, + Log2 = 33, + Log10 = 34, + Select = 35, + Clamp = 36, + Sinh = 37, + Cosh = 38, + Tanh = 39, + Round = 40, + Ceil = 41, + Floor = 42, + Sign = 43, + Fract = 44, + FunctionCall = 45, + Mesh = 46, + Length = 47, + ConstResourceID = 48, + VectorFromScalar = 49, + UnsignedMesh = 50, + Mod = 51 + }; + + public enum eImplicitPortType { + Scalar = 1, + Vector = 2, + Matrix = 3, + ResourceID = 4 + }; + + public enum eImplicitNodeConfiguration { + Default = 1, + ScalarToScalar = 2, + VectorToVector = 3, + MatrixToMatrix = 4 + }; + public enum eEncryptionAlgorithm { AES256_GCM = 1 }; @@ -236,6 +324,16 @@ public struct sBall public Double Radius; } + public struct sVector + { + public Double[] Coordinates; + } + + public struct sMatrix4x4 + { + public Double[][] Field; + } + namespace Internal { @@ -322,6 +420,18 @@ public unsafe struct InternalBall [FieldOffset(4)] public Double Radius; } + [StructLayout(LayoutKind.Explicit, Size=24)] + public unsafe struct InternalVector + { + [FieldOffset(0)] public fixed Double Coordinates[3]; + } + + [StructLayout(LayoutKind.Explicit, Size=128)] + public unsafe struct InternalMatrix4x4 + { + [FieldOffset(0)] public fixed Double Field[16]; + } + public class Lib3MFWrapper { @@ -469,6 +579,15 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup (IntPtr Handle, out IntPtr AResource); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_image3diterator_getcurrentimage3d", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Image3DIterator_GetCurrentImage3D (IntPtr Handle, out IntPtr AResource); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functioniterator_getcurrentfunction", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionIterator_GetCurrentFunction (IntPtr Handle, out IntPtr AResource); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelsetiterator_getcurrentlevelset", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSetIterator_GetCurrentLevelSet (IntPtr Handle, out IntPtr AResource); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_metadata_getnamespace", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 MetaData_GetNameSpace (IntPtr Handle, UInt32 sizeNameSpace, out UInt32 neededNameSpace, IntPtr dataNameSpace); @@ -544,6 +663,9 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_object_iscomponentsobject", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Object_IsComponentsObject (IntPtr Handle, out Byte AIsComponentsObject); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_object_islevelsetobject", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Object_IsLevelSetObject (IntPtr Handle, out Byte AIsLevelSetObject); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_object_isvalid", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Object_IsValid (IntPtr Handle, out Byte AIsValid); @@ -646,6 +768,60 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_meshobject_beamlattice", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 MeshObject_BeamLattice (IntPtr Handle, out IntPtr ATheBeamLattice); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_meshobject_getvolumedata", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MeshObject_GetVolumeData (IntPtr Handle, out IntPtr ATheVolumeData); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_meshobject_setvolumedata", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MeshObject_SetVolumeData (IntPtr Handle, IntPtr ATheVolumeData); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_getfunction", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_GetFunction (IntPtr Handle, out IntPtr ATheFunction); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_setfunction", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_SetFunction (IntPtr Handle, IntPtr ATheFunction); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_gettransform", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_GetTransform (IntPtr Handle, out InternalTransform ATransform); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_settransform", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_SetTransform (IntPtr Handle, InternalTransform ATransform); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_getchannelname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_GetChannelName (IntPtr Handle, UInt32 sizeChannelName, out UInt32 neededChannelName, IntPtr dataChannelName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_setchannelname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_SetChannelName (IntPtr Handle, byte[] AChannelName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_setminfeaturesize", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_SetMinFeatureSize (IntPtr Handle, Double AMinFeatureSize); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_getminfeaturesize", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_GetMinFeatureSize (IntPtr Handle, out Double AMinFeatureSize); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_setfallbackvalue", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_SetFallBackValue (IntPtr Handle, Double AFallBackValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_getfallbackvalue", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_GetFallBackValue (IntPtr Handle, out Double AFallBackValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_setmeshbboxonly", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_SetMeshBBoxOnly (IntPtr Handle, Byte AMeshBBoxOnly); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_getmeshbboxonly", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_GetMeshBBoxOnly (IntPtr Handle, out Byte AMeshBBoxOnly); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_setmesh", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_SetMesh (IntPtr Handle, IntPtr ATheMesh); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_getmesh", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_GetMesh (IntPtr Handle, out IntPtr ATheMesh); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_getvolumedata", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_GetVolumeData (IntPtr Handle, out IntPtr ATheVolumeData); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_levelset_setvolumedata", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 LevelSet_SetVolumeData (IntPtr Handle, IntPtr ATheVolumeData); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_beamlattice_getminlength", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 BeamLattice_GetMinLength (IntPtr Handle, out Double AMinLength); @@ -715,6 +891,93 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_beamlattice_getbeamset", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 BeamLattice_GetBeamSet (IntPtr Handle, UInt32 AIndex, out IntPtr ABeamSet); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionreference_getfunctionresourceid", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionReference_GetFunctionResourceID (IntPtr Handle, out UInt32 AUniqueResourceID); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionreference_setfunctionresourceid", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionReference_SetFunctionResourceID (IntPtr Handle, UInt32 AUniqueResourceID); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionreference_gettransform", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionReference_GetTransform (IntPtr Handle, out InternalTransform ATransform); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionreference_settransform", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionReference_SetTransform (IntPtr Handle, InternalTransform ATransform); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionreference_getchannelname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionReference_GetChannelName (IntPtr Handle, UInt32 sizeChannelName, out UInt32 neededChannelName, IntPtr dataChannelName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionreference_setchannelname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionReference_SetChannelName (IntPtr Handle, byte[] AChannelName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionreference_setminfeaturesize", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionReference_SetMinFeatureSize (IntPtr Handle, Double AMinFeatureSize); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionreference_getminfeaturesize", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionReference_GetMinFeatureSize (IntPtr Handle, out Double AMinFeatureSize); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionreference_setfallbackvalue", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionReference_SetFallBackValue (IntPtr Handle, Double AFallBackValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionreference_getfallbackvalue", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionReference_GetFallBackValue (IntPtr Handle, out Double AFallBackValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedatacomposite_getbasematerialgroup", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeDataComposite_GetBaseMaterialGroup (IntPtr Handle, out IntPtr ABaseMaterialGroupInstance); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedatacomposite_setbasematerialgroup", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeDataComposite_SetBaseMaterialGroup (IntPtr Handle, IntPtr ABaseMaterialGroupInstance); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedatacomposite_getmaterialmappingcount", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeDataComposite_GetMaterialMappingCount (IntPtr Handle, out UInt32 ACount); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedatacomposite_getmaterialmapping", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeDataComposite_GetMaterialMapping (IntPtr Handle, UInt32 AIndex, out IntPtr ATheMaterialMapping); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedatacomposite_addmaterialmapping", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeDataComposite_AddMaterialMapping (IntPtr Handle, InternalTransform ATransform, out IntPtr ATheMaterialMapping); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedatacomposite_removematerialmapping", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeDataComposite_RemoveMaterialMapping (IntPtr Handle, UInt32 AIndex); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedataproperty_getname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeDataProperty_GetName (IntPtr Handle, UInt32 sizePropertyName, out UInt32 neededPropertyName, IntPtr dataPropertyName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedataproperty_setisrequired", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeDataProperty_SetIsRequired (IntPtr Handle, Byte AIsRequired); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedataproperty_isrequired", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeDataProperty_IsRequired (IntPtr Handle, out Byte AIsRequired); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedata_getcomposite", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeData_GetComposite (IntPtr Handle, out IntPtr ATheCompositeData); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedata_createnewcomposite", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeData_CreateNewComposite (IntPtr Handle, out IntPtr ATheCompositeData); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedata_removecomposite", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeData_RemoveComposite (IntPtr Handle); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedata_getcolor", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeData_GetColor (IntPtr Handle, out IntPtr ATheColorData); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedata_createnewcolor", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeData_CreateNewColor (IntPtr Handle, IntPtr ATheFunction, out IntPtr ATheColorData); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedata_removecolor", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeData_RemoveColor (IntPtr Handle); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedata_getpropertycount", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeData_GetPropertyCount (IntPtr Handle, out UInt32 ACount); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedata_getproperty", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeData_GetProperty (IntPtr Handle, UInt32 AIndex, out IntPtr ATheVolumeDataProperty); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedata_addpropertyfromfunction", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeData_AddPropertyFromFunction (IntPtr Handle, byte[] AName, IntPtr ATheFunction, out IntPtr ATheVolumeDataProperty); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_volumedata_removeproperty", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 VolumeData_RemoveProperty (IntPtr Handle, UInt32 AIndex); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_component_getobjectresource", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Component_GetObjectResource (IntPtr Handle, out IntPtr AObjectResource); @@ -883,6 +1146,45 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_multipropertygroup_removelayer", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 MultiPropertyGroup_RemoveLayer (IntPtr Handle, UInt32 ALayerIndex); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_image3d_getname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Image3D_GetName (IntPtr Handle, UInt32 sizeName, out UInt32 neededName, IntPtr dataName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_image3d_setname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Image3D_SetName (IntPtr Handle, byte[] AName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_image3d_isimagestack", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Image3D_IsImageStack (IntPtr Handle, out Byte AIsImageStack); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_imagestack_getrowcount", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImageStack_GetRowCount (IntPtr Handle, out UInt32 ARowCount); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_imagestack_setrowcount", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImageStack_SetRowCount (IntPtr Handle, UInt32 ARowCount); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_imagestack_getcolumncount", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImageStack_GetColumnCount (IntPtr Handle, out UInt32 AColumnCount); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_imagestack_setcolumncount", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImageStack_SetColumnCount (IntPtr Handle, UInt32 AColumnCount); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_imagestack_getsheetcount", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImageStack_GetSheetCount (IntPtr Handle, out UInt32 ASheetCount); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_imagestack_getsheet", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImageStack_GetSheet (IntPtr Handle, UInt32 AIndex, out IntPtr ASheet); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_imagestack_setsheet", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImageStack_SetSheet (IntPtr Handle, UInt32 AIndex, IntPtr ASheet); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_imagestack_createemptysheet", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImageStack_CreateEmptySheet (IntPtr Handle, UInt32 AIndex, byte[] APath, out IntPtr ASheet); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_imagestack_createsheetfrombuffer", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImageStack_CreateSheetFromBuffer (IntPtr Handle, UInt32 AIndex, byte[] APath, UInt64 sizeData, IntPtr dataData, out IntPtr ASheet); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_imagestack_createsheetfromfile", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImageStack_CreateSheetFromFile (IntPtr Handle, UInt32 AIndex, byte[] APath, byte[] AFileName, out IntPtr ASheet); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_attachment_getpath", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Attachment_GetPath (IntPtr Handle, UInt32 sizePath, out UInt32 neededPath, IntPtr dataPath); @@ -940,6 +1242,507 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_texture2d_setfilter", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Texture2D_SetFilter (IntPtr Handle, Int32 AFilter); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitport_getidentifier", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitPort_GetIdentifier (IntPtr Handle, UInt32 sizeIdentifier, out UInt32 neededIdentifier, IntPtr dataIdentifier); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitport_setidentifier", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitPort_SetIdentifier (IntPtr Handle, byte[] AIdentifier); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitport_getdisplayname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitPort_GetDisplayName (IntPtr Handle, UInt32 sizeDisplayName, out UInt32 neededDisplayName, IntPtr dataDisplayName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitport_setdisplayname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitPort_SetDisplayName (IntPtr Handle, byte[] ADisplayName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitport_settype", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitPort_SetType (IntPtr Handle, Int32 AImplicitPortType); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitport_gettype", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitPort_GetType (IntPtr Handle, out Int32 AImplicitPortType); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitport_getreference", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitPort_GetReference (IntPtr Handle, UInt32 sizeReference, out UInt32 neededReference, IntPtr dataReference); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitport_setreference", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitPort_SetReference (IntPtr Handle, byte[] AReference); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_iterator_movenext", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Iterator_MoveNext (IntPtr Handle, out Byte AHasNext); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_iterator_moveprevious", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Iterator_MovePrevious (IntPtr Handle, out Byte AHasPrevious); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_iterator_count", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Iterator_Count (IntPtr Handle, out UInt64 ACount); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitportiterator_getcurrent", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitPortIterator_GetCurrent (IntPtr Handle, out IntPtr APort); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_getidentifier", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_GetIdentifier (IntPtr Handle, UInt32 sizeIdentifier, out UInt32 neededIdentifier, IntPtr dataIdentifier); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_setidentifier", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_SetIdentifier (IntPtr Handle, byte[] AIdentifier); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_getdisplayname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_GetDisplayName (IntPtr Handle, UInt32 sizeDisplayName, out UInt32 neededDisplayName, IntPtr dataDisplayName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_setdisplayname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_SetDisplayName (IntPtr Handle, byte[] ADisplayName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_gettag", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_GetTag (IntPtr Handle, UInt32 sizeTag, out UInt32 neededTag, IntPtr dataTag); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_settag", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_SetTag (IntPtr Handle, byte[] ATag); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_getnodetype", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_GetNodeType (IntPtr Handle, out Int32 AType); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_addinput", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_AddInput (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, out IntPtr APort); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_getinputs", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_GetInputs (IntPtr Handle, out IntPtr AIterator); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_addoutput", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_AddOutput (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, out IntPtr APort); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_getoutputs", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_GetOutputs (IntPtr Handle, out IntPtr AIterator); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_findinput", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_FindInput (IntPtr Handle, byte[] AIdentifier, out IntPtr AInput); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_findoutput", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_FindOutput (IntPtr Handle, byte[] AIdentifier, out IntPtr AOutput); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitnode_aretypesvalid", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitNode_AreTypesValid (IntPtr Handle, out Byte AValid); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_oneinputnode_getinputa", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 OneInputNode_GetInputA (IntPtr Handle, out IntPtr AInput); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_oneinputnode_getoutputresult", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 OneInputNode_GetOutputResult (IntPtr Handle, out IntPtr AResult); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_resourceidnode_setresource", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ResourceIdNode_SetResource (IntPtr Handle, IntPtr AResource); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_resourceidnode_getresource", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ResourceIdNode_GetResource (IntPtr Handle, out IntPtr AResource); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_resourceidnode_getoutputvalue", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ResourceIdNode_GetOutputValue (IntPtr Handle, out IntPtr AValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_twoinputnode_getinputb", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 TwoInputNode_GetInputB (IntPtr Handle, out IntPtr AB); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_selectnode_getinputb", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 SelectNode_GetInputB (IntPtr Handle, out IntPtr AB); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_selectnode_getinputc", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 SelectNode_GetInputC (IntPtr Handle, out IntPtr AC); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_selectnode_getinputd", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 SelectNode_GetInputD (IntPtr Handle, out IntPtr AD); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_clampnode_getinputmin", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ClampNode_GetInputMin (IntPtr Handle, out IntPtr AMin); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_clampnode_getinputmax", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ClampNode_GetInputMax (IntPtr Handle, out IntPtr AMax); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composevectornode_getinputx", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeVectorNode_GetInputX (IntPtr Handle, out IntPtr AX); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composevectornode_getinputy", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeVectorNode_GetInputY (IntPtr Handle, out IntPtr AY); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composevectornode_getinputz", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeVectorNode_GetInputZ (IntPtr Handle, out IntPtr AZ); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composevectornode_getoutputresult", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeVectorNode_GetOutputResult (IntPtr Handle, out IntPtr AResult); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_decomposevectornode_getinputa", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 DecomposeVectorNode_GetInputA (IntPtr Handle, out IntPtr AA); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_decomposevectornode_getoutputx", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 DecomposeVectorNode_GetOutputX (IntPtr Handle, out IntPtr AX); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_decomposevectornode_getoutputy", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 DecomposeVectorNode_GetOutputY (IntPtr Handle, out IntPtr AY); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_decomposevectornode_getoutputz", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 DecomposeVectorNode_GetOutputZ (IntPtr Handle, out IntPtr AZ); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm00", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM00 (IntPtr Handle, out IntPtr AM00); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm01", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM01 (IntPtr Handle, out IntPtr AM01); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm02", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM02 (IntPtr Handle, out IntPtr AM02); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm03", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM03 (IntPtr Handle, out IntPtr AM03); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm10", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM10 (IntPtr Handle, out IntPtr AM10); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm11", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM11 (IntPtr Handle, out IntPtr AM11); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm12", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM12 (IntPtr Handle, out IntPtr AM12); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm13", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM13 (IntPtr Handle, out IntPtr AM13); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm20", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM20 (IntPtr Handle, out IntPtr AM20); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm21", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM21 (IntPtr Handle, out IntPtr AM21); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm22", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM22 (IntPtr Handle, out IntPtr AM22); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm23", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM23 (IntPtr Handle, out IntPtr AM23); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm30", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM30 (IntPtr Handle, out IntPtr AM30); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm31", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM31 (IntPtr Handle, out IntPtr AM31); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm32", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM32 (IntPtr Handle, out IntPtr AM32); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getinputm33", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetInputM33 (IntPtr Handle, out IntPtr AM33); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_composematrixnode_getoutputresult", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ComposeMatrixNode_GetOutputResult (IntPtr Handle, out IntPtr AResult); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_matrixfromrowsnode_getinputa", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MatrixFromRowsNode_GetInputA (IntPtr Handle, out IntPtr ARow0); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_matrixfromrowsnode_getinputb", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MatrixFromRowsNode_GetInputB (IntPtr Handle, out IntPtr ARow1); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_matrixfromrowsnode_getinputc", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MatrixFromRowsNode_GetInputC (IntPtr Handle, out IntPtr ARow2); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_matrixfromrowsnode_getinputd", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MatrixFromRowsNode_GetInputD (IntPtr Handle, out IntPtr ARow3); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_matrixfromrowsnode_getoutputresult", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MatrixFromRowsNode_GetOutputResult (IntPtr Handle, out IntPtr AResult); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_matrixfromcolumnsnode_getinputa", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MatrixFromColumnsNode_GetInputA (IntPtr Handle, out IntPtr AColumn0); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_matrixfromcolumnsnode_getinputb", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MatrixFromColumnsNode_GetInputB (IntPtr Handle, out IntPtr AColumn1); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_matrixfromcolumnsnode_getinputc", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MatrixFromColumnsNode_GetInputC (IntPtr Handle, out IntPtr AColumn2); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_matrixfromcolumnsnode_getinputd", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MatrixFromColumnsNode_GetInputD (IntPtr Handle, out IntPtr AColumn3); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_matrixfromcolumnsnode_getoutputresult", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MatrixFromColumnsNode_GetOutputResult (IntPtr Handle, out IntPtr AResult); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_constantnode_setconstant", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ConstantNode_SetConstant (IntPtr Handle, Double AValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_constantnode_getconstant", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ConstantNode_GetConstant (IntPtr Handle, out Double AValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_constantnode_getoutputvalue", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ConstantNode_GetOutputValue (IntPtr Handle, out IntPtr AValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_constvecnode_setvector", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ConstVecNode_SetVector (IntPtr Handle, InternalVector AValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_constvecnode_getvector", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ConstVecNode_GetVector (IntPtr Handle, out InternalVector AValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_constvecnode_getoutputvector", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ConstVecNode_GetOutputVector (IntPtr Handle, out IntPtr AVector); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_constmatnode_setmatrix", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ConstMatNode_SetMatrix (IntPtr Handle, InternalMatrix4x4 AValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_constmatnode_getmatrix", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ConstMatNode_GetMatrix (IntPtr Handle, out InternalMatrix4x4 AValue); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_constmatnode_getoutputmatrix", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ConstMatNode_GetOutputMatrix (IntPtr Handle, out IntPtr AMatrix); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_meshnode_getinputmesh", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MeshNode_GetInputMesh (IntPtr Handle, out IntPtr AMesh); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_meshnode_getinputpos", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MeshNode_GetInputPos (IntPtr Handle, out IntPtr APos); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_meshnode_getoutputdistance", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 MeshNode_GetOutputDistance (IntPtr Handle, out IntPtr ADistance); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_unsignedmeshnode_getinputmesh", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 UnsignedMeshNode_GetInputMesh (IntPtr Handle, out IntPtr AMesh); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_unsignedmeshnode_getinputpos", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 UnsignedMeshNode_GetInputPos (IntPtr Handle, out IntPtr APos); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_unsignedmeshnode_getoutputdistance", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 UnsignedMeshNode_GetOutputDistance (IntPtr Handle, out IntPtr ADistance); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functioncallnode_getinputfunctionid", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionCallNode_GetInputFunctionID (IntPtr Handle, out IntPtr AFunction); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_nodeiterator_getcurrent", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 NodeIterator_GetCurrent (IntPtr Handle, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_function_getdisplayname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Function_GetDisplayName (IntPtr Handle, UInt32 sizeDisplayName, out UInt32 neededDisplayName, IntPtr dataDisplayName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_function_setdisplayname", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Function_SetDisplayName (IntPtr Handle, byte[] ADisplayName); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_function_addinput", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Function_AddInput (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, Int32 AType, out IntPtr APort); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_function_getinputs", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Function_GetInputs (IntPtr Handle, out IntPtr AIterator); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_function_removeinput", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Function_RemoveInput (IntPtr Handle, IntPtr AInput); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_function_addoutput", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Function_AddOutput (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, Int32 AType, out IntPtr APort); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_function_getoutputs", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Function_GetOutputs (IntPtr Handle, out IntPtr AIterator); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_function_removeoutput", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Function_RemoveOutput (IntPtr Handle, IntPtr AOutput); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_function_findinput", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Function_FindInput (IntPtr Handle, byte[] AIdentifier, out IntPtr AInput); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_function_findoutput", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Function_FindOutput (IntPtr Handle, byte[] AIdentifier, out IntPtr AOutput); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_getidentifier", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_GetIdentifier (IntPtr Handle, UInt32 sizeIdentifier, out UInt32 neededIdentifier, IntPtr dataIdentifier); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_setidentifier", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_SetIdentifier (IntPtr Handle, byte[] AIdentifier); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddNode (IntPtr Handle, Int32 ANodeType, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addsinnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddSinNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addcosnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddCosNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addtannode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddTanNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addarcsinnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddArcSinNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addarccosnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddArcCosNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addarctan2node", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddArcTan2Node (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addsinhnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddSinhNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addcoshnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddCoshNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addtanhnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddTanhNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addroundnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddRoundNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addceilnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddCeilNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addfloornode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddFloorNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addsignnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddSignNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addfractnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddFractNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addabsnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddAbsNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addexpnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddExpNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addlognode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddLogNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addlog2node", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddLog2Node (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addlog10node", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddLog10Node (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addlengthnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddLengthNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addtransposenode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddTransposeNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_inversenode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_InverseNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addsqrtnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddSqrtNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addresourceidnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddResourceIdNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addadditionnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddAdditionNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addsubtractionnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddSubtractionNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addmultiplicationnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddMultiplicationNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_adddivisionnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddDivisionNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_adddotnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddDotNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addcrossnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddCrossNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addmatvecmultiplicationnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddMatVecMultiplicationNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addminnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddMinNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addmaxnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddMaxNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addfmodnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddFmodNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addpownode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddPowNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addselectnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddSelectNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addclampnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddClampNode (IntPtr Handle, byte[] AIdentifier, Int32 AConfiguration, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addcomposevectornode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddComposeVectorNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addvectorfromscalarnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddVectorFromScalarNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_adddecomposevectornode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddDecomposeVectorNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addcomposematrixnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddComposeMatrixNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addmatrixfromrowsnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddMatrixFromRowsNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addmatrixfromcolumnsnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddMatrixFromColumnsNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addconstantnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddConstantNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addconstvecnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddConstVecNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addconstmatnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddConstMatNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addmeshnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddMeshNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addunsignedmeshnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddUnsignedMeshNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addfunctioncallnode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddFunctionCallNode (IntPtr Handle, byte[] AIdentifier, byte[] ADisplayName, byte[] ATag, out IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_getnodes", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_GetNodes (IntPtr Handle, out IntPtr AIterator); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_removenode", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_RemoveNode (IntPtr Handle, IntPtr ANode); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addlink", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddLink (IntPtr Handle, IntPtr ASource, IntPtr ATarget); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_addlinkbynames", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_AddLinkByNames (IntPtr Handle, byte[] ASource, byte[] ATarget); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_clear", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_Clear (IntPtr Handle); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_implicitfunction_sortnodestopologically", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 ImplicitFunction_SortNodesTopologically (IntPtr Handle); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionfromimage3d_getimage3d", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionFromImage3D_GetImage3D (IntPtr Handle, out IntPtr AImage3D); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionfromimage3d_setimage3d", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionFromImage3D_SetImage3D (IntPtr Handle, IntPtr AImage3D); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionfromimage3d_setfilter", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionFromImage3D_SetFilter (IntPtr Handle, Int32 AFilter); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionfromimage3d_getfilter", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionFromImage3D_GetFilter (IntPtr Handle, out Int32 AFilter); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionfromimage3d_settilestyles", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionFromImage3D_SetTileStyles (IntPtr Handle, Int32 ATileStyleU, Int32 ATileStyleV, Int32 ATileStyleW); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionfromimage3d_gettilestyles", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionFromImage3D_GetTileStyles (IntPtr Handle, out Int32 ATileStyleU, out Int32 ATileStyleV, out Int32 ATileStyleW); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionfromimage3d_getoffset", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionFromImage3D_GetOffset (IntPtr Handle, out Double AOffset); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionfromimage3d_setoffset", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionFromImage3D_SetOffset (IntPtr Handle, Double AOffset); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionfromimage3d_getscale", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionFromImage3D_GetScale (IntPtr Handle, out Double AScale); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_functionfromimage3d_setscale", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 FunctionFromImage3D_SetScale (IntPtr Handle, Double AScale); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_builditem_getobjectresource", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 BuildItem_GetObjectResource (IntPtr Handle, out IntPtr AObjectResource); @@ -1222,6 +2025,9 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getslicestackbyid", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Model_GetSliceStackByID (IntPtr Handle, UInt32 AUniqueResourceID, out IntPtr ASliceStacInstance); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getlevelsetbyid", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_GetLevelSetByID (IntPtr Handle, UInt32 AUniqueResourceID, out IntPtr ALevelSetObjectInstance); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getbuilduuid", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Model_GetBuildUUID (IntPtr Handle, out Byte AHasUUID, UInt32 sizeUUID, out UInt32 neededUUID, IntPtr dataUUID); @@ -1267,9 +2073,15 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getslicestacks", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Model_GetSliceStacks (IntPtr Handle, out IntPtr AResourceIterator); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getimage3ds", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_GetImage3Ds (IntPtr Handle, out IntPtr AResourceIterator); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_mergetomodel", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Model_MergeToModel (IntPtr Handle, out IntPtr AMergedModelInstance); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_mergefrommodel", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_MergeFromModel (IntPtr Handle, IntPtr AModelInstance); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_addmeshobject", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Model_AddMeshObject (IntPtr Handle, out IntPtr AMeshObjectInstance); @@ -1297,6 +2109,12 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_addmultipropertygroup", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Model_AddMultiPropertyGroup (IntPtr Handle, out IntPtr AMultiPropertyGroupInstance); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_addimagestack", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_AddImageStack (IntPtr Handle, UInt32 AColumnCount, UInt32 ARowCount, UInt32 ASheetCount, out IntPtr AInstance); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getimagestackbyid", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_GetImageStackByID (IntPtr Handle, UInt32 AUniqueResourceID, out IntPtr AImageStackInstance); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_addbuilditem", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Model_AddBuildItem (IntPtr Handle, IntPtr AObject, InternalTransform ATransform, out IntPtr ABuildItemInstance); @@ -1345,6 +2163,27 @@ public class Lib3MFWrapper [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getkeystore", CallingConvention=CallingConvention.Cdecl)] public unsafe extern static Int32 Model_GetKeyStore (IntPtr Handle, out IntPtr AKeyStore); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getfunctions", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_GetFunctions (IntPtr Handle, out IntPtr ATheResourceIterator); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_addimplicitfunction", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_AddImplicitFunction (IntPtr Handle, out IntPtr AFunctionInstance); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_addfunctionfromimage3d", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_AddFunctionFromImage3D (IntPtr Handle, IntPtr AImage3DInstance, out IntPtr AFunctionInstance); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_addvolumedata", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_AddVolumeData (IntPtr Handle, out IntPtr AVolumeDataInstance); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_addlevelset", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_AddLevelSet (IntPtr Handle, out IntPtr ALevelSetInstance); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_getlevelsets", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_GetLevelSets (IntPtr Handle, out IntPtr AResourceIterator); + + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_model_removeresource", CallingConvention=CallingConvention.Cdecl)] + public unsafe extern static Int32 Model_RemoveResource (IntPtr Handle, IntPtr AResource); + [DllImport("lib3mf.dll", EntryPoint = "lib3mf_getlibraryversion", CharSet = CharSet.Ansi, CallingConvention=CallingConvention.Cdecl)] public extern static Int32 GetLibraryVersion (out UInt32 AMajor, out UInt32 AMinor, out UInt32 AMicro); @@ -1667,6 +2506,53 @@ public unsafe static InternalBall convertStructToInternal_Ball (sBall Ball) return intBall; } + public unsafe static sVector convertInternalToStruct_Vector (InternalVector intVector) + { + sVector Vector; + Vector.Coordinates = new Double[3]; + for (int rowIndex = 0; rowIndex < 3; rowIndex++) { + Vector.Coordinates[rowIndex] = intVector.Coordinates[rowIndex]; + } + + return Vector; + } + + public unsafe static InternalVector convertStructToInternal_Vector (sVector Vector) + { + InternalVector intVector; + for (int rowIndex = 0; rowIndex < 3; rowIndex++) { + intVector.Coordinates[rowIndex] = Vector.Coordinates[rowIndex]; + } + + return intVector; + } + + public unsafe static sMatrix4x4 convertInternalToStruct_Matrix4x4 (InternalMatrix4x4 intMatrix4x4) + { + sMatrix4x4 Matrix4x4; + Matrix4x4.Field = new Double[4][]; + for (int colIndex = 0; colIndex < 4; colIndex++) { + Matrix4x4.Field[colIndex] = new Double[4]; + for (int rowIndex = 0; rowIndex < 4; rowIndex++) { + Matrix4x4.Field[colIndex][rowIndex] = intMatrix4x4.Field[colIndex * 4 + rowIndex]; + } + } + + return Matrix4x4; + } + + public unsafe static InternalMatrix4x4 convertStructToInternal_Matrix4x4 (sMatrix4x4 Matrix4x4) + { + InternalMatrix4x4 intMatrix4x4; + for (int colIndex = 0; colIndex < 4; colIndex++) { + for (int rowIndex = 0; rowIndex < 4; rowIndex++) { + intMatrix4x4.Field[colIndex * 4 + rowIndex] = Matrix4x4.Field[colIndex][rowIndex]; + } + } + + return intMatrix4x4; + } + public static void ThrowError(IntPtr Handle, Int32 errorCode) { String sMessage = "Lib3MF Error"; @@ -1726,11 +2612,21 @@ public static T PolymorphicFactory(IntPtr Handle) where T : class case 0x30D55F4DB88FE0CA: Object = new CTexture2DGroupIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroupIterator" case 0xA99CC6C3F70FB6F9: Object = new CCompositeMaterialsIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterialsIterator" case 0xC2BDF5D8CBBDB1F0: Object = new CMultiPropertyGroupIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" + case 0xC4B8EC00A82BF336: Object = new CImage3DIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" + case 0x40E9035363ACE65E: Object = new CFunctionIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" + case 0xA0C005C035D5371D: Object = new CLevelSetIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" case 0xD17716D063DE2C22: Object = new CMetaData(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" case 0x0C3B85369E9B25D3: Object = new CMetaDataGroup(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" case 0x2DA2136F577A779C: Object = new CObject(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Object" case 0x3B3A6DC6EC610497: Object = new CMeshObject(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" + case 0xE8A7D9C192EFD0E2: Object = new CLevelSet(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" case 0x63B3B461B30B4BA5: Object = new CBeamLattice(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" + case 0x4DF17E76926221C2: Object = new CFunctionReference(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" + case 0xD85B5B6143E787E3: Object = new CVolumeDataColor(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" + case 0x241FE6B4817C3FE4: Object = new CMaterialMapping(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MaterialMapping" + case 0x46F1DAC40581B304: Object = new CVolumeDataComposite(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataComposite" + case 0xFC368AA44ACE42DA: Object = new CVolumeDataProperty(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataProperty" + case 0x9200586FB91587A7: Object = new CVolumeData(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeData" case 0x4ECDB6A6F69F2BEB: Object = new CComponent(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Component" case 0x6522CF04EB283FED: Object = new CComponentsObject(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" case 0x30CCDBE90E00B55B: Object = new CBeamSet(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" @@ -1739,8 +2635,71 @@ public static T PolymorphicFactory(IntPtr Handle) where T : class case 0xBC1208397E37055D: Object = new CTexture2DGroup(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroup" case 0xCE16224D688B86F2: Object = new CCompositeMaterials(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" case 0xB989E02E43158FE6: Object = new CMultiPropertyGroup(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" + case 0xBD938FF2D2663D61: Object = new CImage3D(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3D" + case 0x13A2561F0CFB712A: Object = new CImageStack(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ImageStack" case 0x8CE7A1191A63A35D: Object = new CAttachment(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Attachment" case 0xE0441CF976B36319: Object = new CTexture2D(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" + case 0xD5C49B04AF1963CD: Object = new CImplicitPort(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPort" + case 0x52F06268CD098EFE: Object = new CIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Iterator" + case 0xC62268F2D7C7012C: Object = new CImplicitPortIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPortIterator" + case 0xE72592A7725AB29B: Object = new CImplicitNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitNode" + case 0xB19B9FDA94B0A5E7: Object = new COneInputNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::OneInputNode" + case 0xD5AEA50A56306722: Object = new CSinNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::SinNode" + case 0x59BC328F6FB5C5FF: Object = new CCosNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::CosNode" + case 0x2614CC572AF350B7: Object = new CTanNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::TanNode" + case 0xE554C8A7E72AAF4D: Object = new CArcSinNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcSinNode" + case 0x943AF6AE0EFD2B8A: Object = new CArcCosNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcCosNode" + case 0xE47D547615816BAD: Object = new CArcTanNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTanNode" + case 0x3C7756A456F2D089: Object = new CSinhNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::SinhNode" + case 0x4A993F91E1DE256D: Object = new CCoshNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::CoshNode" + case 0xCF077B19B0B78E9D: Object = new CTanhNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::TanhNode" + case 0xD9F5A53C657765AE: Object = new CRoundNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::RoundNode" + case 0x627E211653E11D93: Object = new CCeilNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::CeilNode" + case 0x392A0F4C041D249C: Object = new CFloorNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::FloorNode" + case 0x8A45165E6C9646D7: Object = new CSignNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::SignNode" + case 0x53E62FD67F4D9A65: Object = new CFractNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::FractNode" + case 0x6B641C7060040BE3: Object = new CAbsNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::AbsNode" + case 0x3390243A8E2410F3: Object = new CExpNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ExpNode" + case 0x0070021D73AA89FD: Object = new CLogNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::LogNode" + case 0xE8C0ABF7C5DC7068: Object = new CLog2Node(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Log2Node" + case 0x87740AD53454E0DF: Object = new CLog10Node(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Log10Node" + case 0xD85889E2739A74B1: Object = new CLengthNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::LengthNode" + case 0xA808B7599C158CE6: Object = new CTransposeNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::TransposeNode" + case 0xE8601F66A23A0540: Object = new CInverseNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::InverseNode" + case 0x9F831944A3DE31DA: Object = new CSqrtNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::SqrtNode" + case 0xCA86A77C71CD3FAE: Object = new CResourceIdNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIdNode" + case 0x7DE3951BA4C1064C: Object = new CTwoInputNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::TwoInputNode" + case 0x57A2236998DF5248: Object = new CAdditionNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::AdditionNode" + case 0x6079B12FFF345D02: Object = new CSubtractionNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::SubtractionNode" + case 0xA3C27CF54C2AA76C: Object = new CMultiplicationNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiplicationNode" + case 0xB896B6413C08CF39: Object = new CDivisionNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::DivisionNode" + case 0xFE60932A66375FAD: Object = new CDotNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::DotNode" + case 0x106182D38CA5CFE3: Object = new CCrossNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::CrossNode" + case 0xB6153EF5DE7E5E11: Object = new CArcTan2Node(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTan2Node" + case 0x7570C43B9721D0C0: Object = new CMatVecMultiplicationNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MatVecMultiplicationNode" + case 0x846AFDE9A091E997: Object = new CMinNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MinNode" + case 0x073F910381BF250D: Object = new CMaxNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MaxNode" + case 0x1EF703D298223F2A: Object = new CFmodNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::FmodNode" + case 0xEA57335849379F22: Object = new CModNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ModNode" + case 0x7700AA17CA1AC0F8: Object = new CPowNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::PowNode" + case 0x1127ED71E05A9BD4: Object = new CSelectNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::SelectNode" + case 0x77AF68C971B1485F: Object = new CClampNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ClampNode" + case 0x49C24B8840C01F7E: Object = new CComposeVectorNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeVectorNode" + case 0x2E417B93351375E2: Object = new CVectorFromScalarNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::VectorFromScalarNode" + case 0xCC4F8D561CCE35D4: Object = new CDecomposeVectorNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::DecomposeVectorNode" + case 0x9EF9EB54A53AA40D: Object = new CComposeMatrixNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeMatrixNode" + case 0xD6DFD0A7EB64AC33: Object = new CMatrixFromRowsNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromRowsNode" + case 0x0DCBEAFCF83F3AAC: Object = new CMatrixFromColumnsNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromColumnsNode" + case 0x3F8E5D082F966B1B: Object = new CConstantNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstantNode" + case 0x9C9363B3F708D556: Object = new CConstVecNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstVecNode" + case 0xF85C90EDCE6F90A4: Object = new CConstMatNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" + case 0x53601FD432E3DEF4: Object = new CMeshNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" + case 0x29985A628251A9CD: Object = new CUnsignedMeshNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + case 0x0765C17C952F24E3: Object = new CFunctionCallNode(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" + case 0xFC006BC888CAB4D0: Object = new CNodeIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" + case 0x9EFB2757CA1A5231: Object = new CFunction(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Function" + case 0x6CE54469EEA83BC1: Object = new CImplicitFunction(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitFunction" + case 0x9BD7D3C2026B8CE8: Object = new CFunctionFromImage3D(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionFromImage3D" case 0x68FB2D5FFC4BA12A: Object = new CBuildItem(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItem" case 0xA7D21BD364910860: Object = new CBuildItemIterator(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItemIterator" case 0x2198BCF4D8DF9C40: Object = new CSlice(Handle) as T; break; // First 64 bits of SHA1 of a string: "Lib3MF::Slice" @@ -2309,6 +3268,54 @@ public CMultiPropertyGroup GetCurrentMultiPropertyGroup () } + public class CImage3DIterator : CResourceIterator + { + public CImage3DIterator (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImage3D GetCurrentImage3D () + { + IntPtr newResource = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Image3DIterator_GetCurrentImage3D (Handle, out newResource)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResource); + } + + } + + public class CFunctionIterator : CResourceIterator + { + public CFunctionIterator (IntPtr NewHandle) : base (NewHandle) + { + } + + public CFunction GetCurrentFunction () + { + IntPtr newResource = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.FunctionIterator_GetCurrentFunction (Handle, out newResource)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResource); + } + + } + + public class CLevelSetIterator : CResourceIterator + { + public CLevelSetIterator (IntPtr NewHandle) : base (NewHandle) + { + } + + public CLevelSet GetCurrentLevelSet () + { + IntPtr newResource = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.LevelSetIterator_GetCurrentLevelSet (Handle, out newResource)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResource); + } + + } + public class CMetaData : CBase { public CMetaData (IntPtr NewHandle) : base (NewHandle) @@ -2569,6 +3576,14 @@ public bool IsComponentsObject () return (resultIsComponentsObject != 0); } + public bool IsLevelSetObject () + { + Byte resultIsLevelSetObject = 0; + + CheckError(Internal.Lib3MFWrapper.Object_IsLevelSetObject (Handle, out resultIsLevelSetObject)); + return (resultIsLevelSetObject != 0); + } + public bool IsValid () { Byte resultIsValid = 0; @@ -2883,6 +3898,160 @@ public CBeamLattice BeamLattice () return Internal.Lib3MFWrapper.PolymorphicFactory(newTheBeamLattice); } + public CVolumeData GetVolumeData () + { + IntPtr newTheVolumeData = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MeshObject_GetVolumeData (Handle, out newTheVolumeData)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheVolumeData); + } + + public void SetVolumeData (CVolumeData ATheVolumeData) + { + IntPtr ATheVolumeDataHandle = IntPtr.Zero; + if (ATheVolumeData != null) + ATheVolumeDataHandle = ATheVolumeData.GetHandle(); + + CheckError(Internal.Lib3MFWrapper.MeshObject_SetVolumeData (Handle, ATheVolumeDataHandle)); + } + + } + + public class CLevelSet : CObject + { + public CLevelSet (IntPtr NewHandle) : base (NewHandle) + { + } + + public CFunction GetFunction () + { + IntPtr newTheFunction = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.LevelSet_GetFunction (Handle, out newTheFunction)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheFunction); + } + + public void SetFunction (CFunction ATheFunction) + { + IntPtr ATheFunctionHandle = IntPtr.Zero; + if (ATheFunction != null) + ATheFunctionHandle = ATheFunction.GetHandle(); + + CheckError(Internal.Lib3MFWrapper.LevelSet_SetFunction (Handle, ATheFunctionHandle)); + } + + public sTransform GetTransform () + { + Internal.InternalTransform intresultTransform; + + CheckError(Internal.Lib3MFWrapper.LevelSet_GetTransform (Handle, out intresultTransform)); + return Internal.Lib3MFWrapper.convertInternalToStruct_Transform (intresultTransform); + } + + public void SetTransform (sTransform ATransform) + { + Internal.InternalTransform intTransform = Internal.Lib3MFWrapper.convertStructToInternal_Transform (ATransform); + + CheckError(Internal.Lib3MFWrapper.LevelSet_SetTransform (Handle, intTransform)); + } + + public String GetChannelName () + { + UInt32 sizeChannelName = 0; + UInt32 neededChannelName = 0; + CheckError(Internal.Lib3MFWrapper.LevelSet_GetChannelName (Handle, sizeChannelName, out neededChannelName, IntPtr.Zero)); + sizeChannelName = neededChannelName; + byte[] bytesChannelName = new byte[sizeChannelName]; + GCHandle dataChannelName = GCHandle.Alloc(bytesChannelName, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.LevelSet_GetChannelName (Handle, sizeChannelName, out neededChannelName, dataChannelName.AddrOfPinnedObject())); + dataChannelName.Free(); + return Encoding.UTF8.GetString(bytesChannelName).TrimEnd(char.MinValue); + } + + public void SetChannelName (String AChannelName) + { + byte[] byteChannelName = Encoding.UTF8.GetBytes(AChannelName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.LevelSet_SetChannelName (Handle, byteChannelName)); + } + + public void SetMinFeatureSize (Double AMinFeatureSize) + { + + CheckError(Internal.Lib3MFWrapper.LevelSet_SetMinFeatureSize (Handle, AMinFeatureSize)); + } + + public Double GetMinFeatureSize () + { + Double resultMinFeatureSize = 0; + + CheckError(Internal.Lib3MFWrapper.LevelSet_GetMinFeatureSize (Handle, out resultMinFeatureSize)); + return resultMinFeatureSize; + } + + public void SetFallBackValue (Double AFallBackValue) + { + + CheckError(Internal.Lib3MFWrapper.LevelSet_SetFallBackValue (Handle, AFallBackValue)); + } + + public Double GetFallBackValue () + { + Double resultFallBackValue = 0; + + CheckError(Internal.Lib3MFWrapper.LevelSet_GetFallBackValue (Handle, out resultFallBackValue)); + return resultFallBackValue; + } + + public void SetMeshBBoxOnly (bool AMeshBBoxOnly) + { + + CheckError(Internal.Lib3MFWrapper.LevelSet_SetMeshBBoxOnly (Handle, (Byte)( AMeshBBoxOnly ? 1 : 0 ))); + } + + public bool GetMeshBBoxOnly () + { + Byte resultMeshBBoxOnly = 0; + + CheckError(Internal.Lib3MFWrapper.LevelSet_GetMeshBBoxOnly (Handle, out resultMeshBBoxOnly)); + return (resultMeshBBoxOnly != 0); + } + + public void SetMesh (CMeshObject ATheMesh) + { + IntPtr ATheMeshHandle = IntPtr.Zero; + if (ATheMesh != null) + ATheMeshHandle = ATheMesh.GetHandle(); + + CheckError(Internal.Lib3MFWrapper.LevelSet_SetMesh (Handle, ATheMeshHandle)); + } + + public CMeshObject GetMesh () + { + IntPtr newTheMesh = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.LevelSet_GetMesh (Handle, out newTheMesh)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheMesh); + } + + public CVolumeData GetVolumeData () + { + IntPtr newTheVolumeData = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.LevelSet_GetVolumeData (Handle, out newTheVolumeData)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheVolumeData); + } + + public void SetVolumeData (CVolumeData ATheVolumeData) + { + IntPtr ATheVolumeDataHandle = IntPtr.Zero; + if (ATheVolumeData != null) + ATheVolumeDataHandle = ATheVolumeData.GetHandle(); + + CheckError(Internal.Lib3MFWrapper.LevelSet_SetVolumeData (Handle, ATheVolumeDataHandle)); + } + } public class CBeamLattice : CBase @@ -3093,147 +4262,430 @@ public CBeamSet GetBeamSet (UInt32 AIndex) } - public class CComponent : CBase + public class CFunctionReference : CBase { - public CComponent (IntPtr NewHandle) : base (NewHandle) + public CFunctionReference (IntPtr NewHandle) : base (NewHandle) { } - public CObject GetObjectResource () - { - IntPtr newObjectResource = IntPtr.Zero; - - CheckError(Internal.Lib3MFWrapper.Component_GetObjectResource (Handle, out newObjectResource)); - return Internal.Lib3MFWrapper.PolymorphicFactory(newObjectResource); - } - - public UInt32 GetObjectResourceID () + public UInt32 GetFunctionResourceID () { UInt32 resultUniqueResourceID = 0; - CheckError(Internal.Lib3MFWrapper.Component_GetObjectResourceID (Handle, out resultUniqueResourceID)); + CheckError(Internal.Lib3MFWrapper.FunctionReference_GetFunctionResourceID (Handle, out resultUniqueResourceID)); return resultUniqueResourceID; } - public String GetUUID (out bool AHasUUID) + public void SetFunctionResourceID (UInt32 AUniqueResourceID) { - Byte resultHasUUID = 0; - UInt32 sizeUUID = 0; - UInt32 neededUUID = 0; - CheckError(Internal.Lib3MFWrapper.Component_GetUUID (Handle, out resultHasUUID, sizeUUID, out neededUUID, IntPtr.Zero)); - sizeUUID = neededUUID; - byte[] bytesUUID = new byte[sizeUUID]; - GCHandle dataUUID = GCHandle.Alloc(bytesUUID, GCHandleType.Pinned); - CheckError(Internal.Lib3MFWrapper.Component_GetUUID (Handle, out resultHasUUID, sizeUUID, out neededUUID, dataUUID.AddrOfPinnedObject())); - AHasUUID = (resultHasUUID != 0); - dataUUID.Free(); - return Encoding.UTF8.GetString(bytesUUID).TrimEnd(char.MinValue); + CheckError(Internal.Lib3MFWrapper.FunctionReference_SetFunctionResourceID (Handle, AUniqueResourceID)); } - public void SetUUID (String AUUID) + public sTransform GetTransform () { - byte[] byteUUID = Encoding.UTF8.GetBytes(AUUID + char.MinValue); + Internal.InternalTransform intresultTransform; - CheckError(Internal.Lib3MFWrapper.Component_SetUUID (Handle, byteUUID)); + CheckError(Internal.Lib3MFWrapper.FunctionReference_GetTransform (Handle, out intresultTransform)); + return Internal.Lib3MFWrapper.convertInternalToStruct_Transform (intresultTransform); } - public bool HasTransform () + public void SetTransform (sTransform ATransform) { - Byte resultHasTransform = 0; + Internal.InternalTransform intTransform = Internal.Lib3MFWrapper.convertStructToInternal_Transform (ATransform); - CheckError(Internal.Lib3MFWrapper.Component_HasTransform (Handle, out resultHasTransform)); - return (resultHasTransform != 0); + CheckError(Internal.Lib3MFWrapper.FunctionReference_SetTransform (Handle, intTransform)); } - public sTransform GetTransform () + public String GetChannelName () { - Internal.InternalTransform intresultTransform; + UInt32 sizeChannelName = 0; + UInt32 neededChannelName = 0; + CheckError(Internal.Lib3MFWrapper.FunctionReference_GetChannelName (Handle, sizeChannelName, out neededChannelName, IntPtr.Zero)); + sizeChannelName = neededChannelName; + byte[] bytesChannelName = new byte[sizeChannelName]; + GCHandle dataChannelName = GCHandle.Alloc(bytesChannelName, GCHandleType.Pinned); - CheckError(Internal.Lib3MFWrapper.Component_GetTransform (Handle, out intresultTransform)); - return Internal.Lib3MFWrapper.convertInternalToStruct_Transform (intresultTransform); + CheckError(Internal.Lib3MFWrapper.FunctionReference_GetChannelName (Handle, sizeChannelName, out neededChannelName, dataChannelName.AddrOfPinnedObject())); + dataChannelName.Free(); + return Encoding.UTF8.GetString(bytesChannelName).TrimEnd(char.MinValue); } - public void SetTransform (sTransform ATransform) + public void SetChannelName (String AChannelName) { - Internal.InternalTransform intTransform = Internal.Lib3MFWrapper.convertStructToInternal_Transform (ATransform); + byte[] byteChannelName = Encoding.UTF8.GetBytes(AChannelName + char.MinValue); - CheckError(Internal.Lib3MFWrapper.Component_SetTransform (Handle, intTransform)); + CheckError(Internal.Lib3MFWrapper.FunctionReference_SetChannelName (Handle, byteChannelName)); } - } - - public class CComponentsObject : CObject - { - public CComponentsObject (IntPtr NewHandle) : base (NewHandle) + public void SetMinFeatureSize (Double AMinFeatureSize) { + + CheckError(Internal.Lib3MFWrapper.FunctionReference_SetMinFeatureSize (Handle, AMinFeatureSize)); } - public CComponent AddComponent (CObject AObjectResource, sTransform ATransform) + public Double GetMinFeatureSize () { - IntPtr AObjectResourceHandle = IntPtr.Zero; - if (AObjectResource != null) - AObjectResourceHandle = AObjectResource.GetHandle(); - Internal.InternalTransform intTransform = Internal.Lib3MFWrapper.convertStructToInternal_Transform (ATransform); - IntPtr newComponentInstance = IntPtr.Zero; + Double resultMinFeatureSize = 0; - CheckError(Internal.Lib3MFWrapper.ComponentsObject_AddComponent (Handle, AObjectResourceHandle, intTransform, out newComponentInstance)); - return Internal.Lib3MFWrapper.PolymorphicFactory(newComponentInstance); + CheckError(Internal.Lib3MFWrapper.FunctionReference_GetMinFeatureSize (Handle, out resultMinFeatureSize)); + return resultMinFeatureSize; } - public CComponent GetComponent (UInt32 AIndex) + public void SetFallBackValue (Double AFallBackValue) { - IntPtr newComponentInstance = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.ComponentsObject_GetComponent (Handle, AIndex, out newComponentInstance)); - return Internal.Lib3MFWrapper.PolymorphicFactory(newComponentInstance); + CheckError(Internal.Lib3MFWrapper.FunctionReference_SetFallBackValue (Handle, AFallBackValue)); } - public UInt32 GetComponentCount () + public Double GetFallBackValue () { - UInt32 resultCount = 0; + Double resultFallBackValue = 0; - CheckError(Internal.Lib3MFWrapper.ComponentsObject_GetComponentCount (Handle, out resultCount)); - return resultCount; + CheckError(Internal.Lib3MFWrapper.FunctionReference_GetFallBackValue (Handle, out resultFallBackValue)); + return resultFallBackValue; } } - public class CBeamSet : CBase + public class CVolumeDataColor : CFunctionReference { - public CBeamSet (IntPtr NewHandle) : base (NewHandle) + public CVolumeDataColor (IntPtr NewHandle) : base (NewHandle) { } - public void SetName (String AName) + } + + public class CMaterialMapping : CFunctionReference + { + public CMaterialMapping (IntPtr NewHandle) : base (NewHandle) { - byte[] byteName = Encoding.UTF8.GetBytes(AName + char.MinValue); + } - CheckError(Internal.Lib3MFWrapper.BeamSet_SetName (Handle, byteName)); + } + + public class CVolumeDataComposite : CBase + { + public CVolumeDataComposite (IntPtr NewHandle) : base (NewHandle) + { } - public String GetName () + public CBaseMaterialGroup GetBaseMaterialGroup () { - UInt32 sizeName = 0; - UInt32 neededName = 0; - CheckError(Internal.Lib3MFWrapper.BeamSet_GetName (Handle, sizeName, out neededName, IntPtr.Zero)); - sizeName = neededName; - byte[] bytesName = new byte[sizeName]; - GCHandle dataName = GCHandle.Alloc(bytesName, GCHandleType.Pinned); + IntPtr newBaseMaterialGroupInstance = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.BeamSet_GetName (Handle, sizeName, out neededName, dataName.AddrOfPinnedObject())); - dataName.Free(); - return Encoding.UTF8.GetString(bytesName).TrimEnd(char.MinValue); + CheckError(Internal.Lib3MFWrapper.VolumeDataComposite_GetBaseMaterialGroup (Handle, out newBaseMaterialGroupInstance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newBaseMaterialGroupInstance); } - public void SetIdentifier (String AIdentifier) + public void SetBaseMaterialGroup (CBaseMaterialGroup ABaseMaterialGroupInstance) { - byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + IntPtr ABaseMaterialGroupInstanceHandle = IntPtr.Zero; + if (ABaseMaterialGroupInstance != null) + ABaseMaterialGroupInstanceHandle = ABaseMaterialGroupInstance.GetHandle(); - CheckError(Internal.Lib3MFWrapper.BeamSet_SetIdentifier (Handle, byteIdentifier)); + CheckError(Internal.Lib3MFWrapper.VolumeDataComposite_SetBaseMaterialGroup (Handle, ABaseMaterialGroupInstanceHandle)); } - public String GetIdentifier () + public UInt32 GetMaterialMappingCount () + { + UInt32 resultCount = 0; + + CheckError(Internal.Lib3MFWrapper.VolumeDataComposite_GetMaterialMappingCount (Handle, out resultCount)); + return resultCount; + } + + public CMaterialMapping GetMaterialMapping (UInt32 AIndex) + { + IntPtr newTheMaterialMapping = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.VolumeDataComposite_GetMaterialMapping (Handle, AIndex, out newTheMaterialMapping)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheMaterialMapping); + } + + public CMaterialMapping AddMaterialMapping (sTransform ATransform) + { + Internal.InternalTransform intTransform = Internal.Lib3MFWrapper.convertStructToInternal_Transform (ATransform); + IntPtr newTheMaterialMapping = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.VolumeDataComposite_AddMaterialMapping (Handle, intTransform, out newTheMaterialMapping)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheMaterialMapping); + } + + public void RemoveMaterialMapping (UInt32 AIndex) + { + + CheckError(Internal.Lib3MFWrapper.VolumeDataComposite_RemoveMaterialMapping (Handle, AIndex)); + } + + } + + public class CVolumeDataProperty : CFunctionReference + { + public CVolumeDataProperty (IntPtr NewHandle) : base (NewHandle) + { + } + + public String GetName () + { + UInt32 sizePropertyName = 0; + UInt32 neededPropertyName = 0; + CheckError(Internal.Lib3MFWrapper.VolumeDataProperty_GetName (Handle, sizePropertyName, out neededPropertyName, IntPtr.Zero)); + sizePropertyName = neededPropertyName; + byte[] bytesPropertyName = new byte[sizePropertyName]; + GCHandle dataPropertyName = GCHandle.Alloc(bytesPropertyName, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.VolumeDataProperty_GetName (Handle, sizePropertyName, out neededPropertyName, dataPropertyName.AddrOfPinnedObject())); + dataPropertyName.Free(); + return Encoding.UTF8.GetString(bytesPropertyName).TrimEnd(char.MinValue); + } + + public void SetIsRequired (bool AIsRequired) + { + + CheckError(Internal.Lib3MFWrapper.VolumeDataProperty_SetIsRequired (Handle, (Byte)( AIsRequired ? 1 : 0 ))); + } + + public bool IsRequired () + { + Byte resultIsRequired = 0; + + CheckError(Internal.Lib3MFWrapper.VolumeDataProperty_IsRequired (Handle, out resultIsRequired)); + return (resultIsRequired != 0); + } + + } + + public class CVolumeData : CResource + { + public CVolumeData (IntPtr NewHandle) : base (NewHandle) + { + } + + public CVolumeDataComposite GetComposite () + { + IntPtr newTheCompositeData = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.VolumeData_GetComposite (Handle, out newTheCompositeData)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheCompositeData); + } + + public CVolumeDataComposite CreateNewComposite () + { + IntPtr newTheCompositeData = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.VolumeData_CreateNewComposite (Handle, out newTheCompositeData)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheCompositeData); + } + + public void RemoveComposite () + { + + CheckError(Internal.Lib3MFWrapper.VolumeData_RemoveComposite (Handle)); + } + + public CVolumeDataColor GetColor () + { + IntPtr newTheColorData = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.VolumeData_GetColor (Handle, out newTheColorData)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheColorData); + } + + public CVolumeDataColor CreateNewColor (CFunction ATheFunction) + { + IntPtr ATheFunctionHandle = IntPtr.Zero; + if (ATheFunction != null) + ATheFunctionHandle = ATheFunction.GetHandle(); + IntPtr newTheColorData = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.VolumeData_CreateNewColor (Handle, ATheFunctionHandle, out newTheColorData)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheColorData); + } + + public void RemoveColor () + { + + CheckError(Internal.Lib3MFWrapper.VolumeData_RemoveColor (Handle)); + } + + public UInt32 GetPropertyCount () + { + UInt32 resultCount = 0; + + CheckError(Internal.Lib3MFWrapper.VolumeData_GetPropertyCount (Handle, out resultCount)); + return resultCount; + } + + public CVolumeDataProperty GetProperty (UInt32 AIndex) + { + IntPtr newTheVolumeDataProperty = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.VolumeData_GetProperty (Handle, AIndex, out newTheVolumeDataProperty)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheVolumeDataProperty); + } + + public CVolumeDataProperty AddPropertyFromFunction (String AName, CFunction ATheFunction) + { + byte[] byteName = Encoding.UTF8.GetBytes(AName + char.MinValue); + IntPtr ATheFunctionHandle = IntPtr.Zero; + if (ATheFunction != null) + ATheFunctionHandle = ATheFunction.GetHandle(); + IntPtr newTheVolumeDataProperty = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.VolumeData_AddPropertyFromFunction (Handle, byteName, ATheFunctionHandle, out newTheVolumeDataProperty)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheVolumeDataProperty); + } + + public void RemoveProperty (UInt32 AIndex) + { + + CheckError(Internal.Lib3MFWrapper.VolumeData_RemoveProperty (Handle, AIndex)); + } + + } + + public class CComponent : CBase + { + public CComponent (IntPtr NewHandle) : base (NewHandle) + { + } + + public CObject GetObjectResource () + { + IntPtr newObjectResource = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Component_GetObjectResource (Handle, out newObjectResource)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newObjectResource); + } + + public UInt32 GetObjectResourceID () + { + UInt32 resultUniqueResourceID = 0; + + CheckError(Internal.Lib3MFWrapper.Component_GetObjectResourceID (Handle, out resultUniqueResourceID)); + return resultUniqueResourceID; + } + + public String GetUUID (out bool AHasUUID) + { + Byte resultHasUUID = 0; + UInt32 sizeUUID = 0; + UInt32 neededUUID = 0; + CheckError(Internal.Lib3MFWrapper.Component_GetUUID (Handle, out resultHasUUID, sizeUUID, out neededUUID, IntPtr.Zero)); + sizeUUID = neededUUID; + byte[] bytesUUID = new byte[sizeUUID]; + GCHandle dataUUID = GCHandle.Alloc(bytesUUID, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.Component_GetUUID (Handle, out resultHasUUID, sizeUUID, out neededUUID, dataUUID.AddrOfPinnedObject())); + AHasUUID = (resultHasUUID != 0); + dataUUID.Free(); + return Encoding.UTF8.GetString(bytesUUID).TrimEnd(char.MinValue); + } + + public void SetUUID (String AUUID) + { + byte[] byteUUID = Encoding.UTF8.GetBytes(AUUID + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.Component_SetUUID (Handle, byteUUID)); + } + + public bool HasTransform () + { + Byte resultHasTransform = 0; + + CheckError(Internal.Lib3MFWrapper.Component_HasTransform (Handle, out resultHasTransform)); + return (resultHasTransform != 0); + } + + public sTransform GetTransform () + { + Internal.InternalTransform intresultTransform; + + CheckError(Internal.Lib3MFWrapper.Component_GetTransform (Handle, out intresultTransform)); + return Internal.Lib3MFWrapper.convertInternalToStruct_Transform (intresultTransform); + } + + public void SetTransform (sTransform ATransform) + { + Internal.InternalTransform intTransform = Internal.Lib3MFWrapper.convertStructToInternal_Transform (ATransform); + + CheckError(Internal.Lib3MFWrapper.Component_SetTransform (Handle, intTransform)); + } + + } + + public class CComponentsObject : CObject + { + public CComponentsObject (IntPtr NewHandle) : base (NewHandle) + { + } + + public CComponent AddComponent (CObject AObjectResource, sTransform ATransform) + { + IntPtr AObjectResourceHandle = IntPtr.Zero; + if (AObjectResource != null) + AObjectResourceHandle = AObjectResource.GetHandle(); + Internal.InternalTransform intTransform = Internal.Lib3MFWrapper.convertStructToInternal_Transform (ATransform); + IntPtr newComponentInstance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComponentsObject_AddComponent (Handle, AObjectResourceHandle, intTransform, out newComponentInstance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newComponentInstance); + } + + public CComponent GetComponent (UInt32 AIndex) + { + IntPtr newComponentInstance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComponentsObject_GetComponent (Handle, AIndex, out newComponentInstance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newComponentInstance); + } + + public UInt32 GetComponentCount () + { + UInt32 resultCount = 0; + + CheckError(Internal.Lib3MFWrapper.ComponentsObject_GetComponentCount (Handle, out resultCount)); + return resultCount; + } + + } + + public class CBeamSet : CBase + { + public CBeamSet (IntPtr NewHandle) : base (NewHandle) + { + } + + public void SetName (String AName) + { + byte[] byteName = Encoding.UTF8.GetBytes(AName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.BeamSet_SetName (Handle, byteName)); + } + + public String GetName () + { + UInt32 sizeName = 0; + UInt32 neededName = 0; + CheckError(Internal.Lib3MFWrapper.BeamSet_GetName (Handle, sizeName, out neededName, IntPtr.Zero)); + sizeName = neededName; + byte[] bytesName = new byte[sizeName]; + GCHandle dataName = GCHandle.Alloc(bytesName, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.BeamSet_GetName (Handle, sizeName, out neededName, dataName.AddrOfPinnedObject())); + dataName.Free(); + return Encoding.UTF8.GetString(bytesName).TrimEnd(char.MinValue); + } + + public void SetIdentifier (String AIdentifier) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.BeamSet_SetIdentifier (Handle, byteIdentifier)); + } + + public String GetIdentifier () { UInt32 sizeIdentifier = 0; UInt32 neededIdentifier = 0; @@ -3542,316 +4994,2505 @@ public CBaseMaterialGroup GetBaseMaterialGroup () return Internal.Lib3MFWrapper.PolymorphicFactory(newBaseMaterialGroupInstance); } - public UInt32 AddComposite (sCompositeConstituent[] AComposite) + public UInt32 AddComposite (sCompositeConstituent[] AComposite) + { + Internal.InternalCompositeConstituent[] intdataComposite = new Internal.InternalCompositeConstituent[AComposite.Length]; + for (int index = 0; index < AComposite.Length; index++) + intdataComposite[index] = Internal.Lib3MFWrapper.convertStructToInternal_CompositeConstituent(AComposite[index]); + GCHandle dataComposite = GCHandle.Alloc(intdataComposite, GCHandleType.Pinned); + UInt32 resultPropertyID = 0; + + CheckError(Internal.Lib3MFWrapper.CompositeMaterials_AddComposite (Handle, (UInt64) AComposite.Length, dataComposite.AddrOfPinnedObject(), out resultPropertyID)); + dataComposite.Free (); + return resultPropertyID; + } + + public void RemoveComposite (UInt32 APropertyID) + { + + CheckError(Internal.Lib3MFWrapper.CompositeMaterials_RemoveComposite (Handle, APropertyID)); + } + + public void GetComposite (UInt32 APropertyID, out sCompositeConstituent[] AComposite) + { + UInt64 sizeComposite = 0; + UInt64 neededComposite = 0; + CheckError(Internal.Lib3MFWrapper.CompositeMaterials_GetComposite (Handle, APropertyID, sizeComposite, out neededComposite, IntPtr.Zero)); + sizeComposite = neededComposite; + var arrayComposite = new Internal.InternalCompositeConstituent[sizeComposite]; + GCHandle dataComposite = GCHandle.Alloc(arrayComposite, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.CompositeMaterials_GetComposite (Handle, APropertyID, sizeComposite, out neededComposite, dataComposite.AddrOfPinnedObject())); + dataComposite.Free(); + AComposite = new sCompositeConstituent[sizeComposite]; + for (int index = 0; index < AComposite.Length; index++) + AComposite[index] = Internal.Lib3MFWrapper.convertInternalToStruct_CompositeConstituent(arrayComposite[index]); + } + + } + + public class CMultiPropertyGroup : CResource + { + public CMultiPropertyGroup (IntPtr NewHandle) : base (NewHandle) + { + } + + public UInt32 GetCount () + { + UInt32 resultCount = 0; + + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetCount (Handle, out resultCount)); + return resultCount; + } + + public void GetAllPropertyIDs (out UInt32[] APropertyIDs) + { + UInt64 sizePropertyIDs = 0; + UInt64 neededPropertyIDs = 0; + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetAllPropertyIDs (Handle, sizePropertyIDs, out neededPropertyIDs, IntPtr.Zero)); + sizePropertyIDs = neededPropertyIDs; + APropertyIDs = new UInt32[sizePropertyIDs]; + GCHandle dataPropertyIDs = GCHandle.Alloc(APropertyIDs, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetAllPropertyIDs (Handle, sizePropertyIDs, out neededPropertyIDs, dataPropertyIDs.AddrOfPinnedObject())); + dataPropertyIDs.Free(); + } + + public UInt32 AddMultiProperty (UInt32[] APropertyIDs) + { + GCHandle dataPropertyIDs = GCHandle.Alloc(APropertyIDs, GCHandleType.Pinned); + UInt32 resultPropertyID = 0; + + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_AddMultiProperty (Handle, (UInt64) APropertyIDs.Length, dataPropertyIDs.AddrOfPinnedObject(), out resultPropertyID)); + dataPropertyIDs.Free (); + return resultPropertyID; + } + + public void SetMultiProperty (UInt32 APropertyID, UInt32[] APropertyIDs) + { + GCHandle dataPropertyIDs = GCHandle.Alloc(APropertyIDs, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_SetMultiProperty (Handle, APropertyID, (UInt64) APropertyIDs.Length, dataPropertyIDs.AddrOfPinnedObject())); + dataPropertyIDs.Free (); + } + + public void GetMultiProperty (UInt32 APropertyID, out UInt32[] APropertyIDs) + { + UInt64 sizePropertyIDs = 0; + UInt64 neededPropertyIDs = 0; + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetMultiProperty (Handle, APropertyID, sizePropertyIDs, out neededPropertyIDs, IntPtr.Zero)); + sizePropertyIDs = neededPropertyIDs; + APropertyIDs = new UInt32[sizePropertyIDs]; + GCHandle dataPropertyIDs = GCHandle.Alloc(APropertyIDs, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetMultiProperty (Handle, APropertyID, sizePropertyIDs, out neededPropertyIDs, dataPropertyIDs.AddrOfPinnedObject())); + dataPropertyIDs.Free(); + } + + public void RemoveMultiProperty (UInt32 APropertyID) + { + + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_RemoveMultiProperty (Handle, APropertyID)); + } + + public UInt32 GetLayerCount () + { + UInt32 resultCount = 0; + + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetLayerCount (Handle, out resultCount)); + return resultCount; + } + + public UInt32 AddLayer (sMultiPropertyLayer ATheLayer) + { + Internal.InternalMultiPropertyLayer intTheLayer = Internal.Lib3MFWrapper.convertStructToInternal_MultiPropertyLayer (ATheLayer); + UInt32 resultLayerIndex = 0; + + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_AddLayer (Handle, intTheLayer, out resultLayerIndex)); + return resultLayerIndex; + } + + public sMultiPropertyLayer GetLayer (UInt32 ALayerIndex) + { + Internal.InternalMultiPropertyLayer intresultTheLayer; + + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetLayer (Handle, ALayerIndex, out intresultTheLayer)); + return Internal.Lib3MFWrapper.convertInternalToStruct_MultiPropertyLayer (intresultTheLayer); + } + + public void RemoveLayer (UInt32 ALayerIndex) + { + + CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_RemoveLayer (Handle, ALayerIndex)); + } + + } + + public class CImage3D : CResource + { + public CImage3D (IntPtr NewHandle) : base (NewHandle) + { + } + + public String GetName () + { + UInt32 sizeName = 0; + UInt32 neededName = 0; + CheckError(Internal.Lib3MFWrapper.Image3D_GetName (Handle, sizeName, out neededName, IntPtr.Zero)); + sizeName = neededName; + byte[] bytesName = new byte[sizeName]; + GCHandle dataName = GCHandle.Alloc(bytesName, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.Image3D_GetName (Handle, sizeName, out neededName, dataName.AddrOfPinnedObject())); + dataName.Free(); + return Encoding.UTF8.GetString(bytesName).TrimEnd(char.MinValue); + } + + public void SetName (String AName) + { + byte[] byteName = Encoding.UTF8.GetBytes(AName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.Image3D_SetName (Handle, byteName)); + } + + public bool IsImageStack () + { + Byte resultIsImageStack = 0; + + CheckError(Internal.Lib3MFWrapper.Image3D_IsImageStack (Handle, out resultIsImageStack)); + return (resultIsImageStack != 0); + } + + } + + public class CImageStack : CImage3D + { + public CImageStack (IntPtr NewHandle) : base (NewHandle) + { + } + + public UInt32 GetRowCount () + { + UInt32 resultRowCount = 0; + + CheckError(Internal.Lib3MFWrapper.ImageStack_GetRowCount (Handle, out resultRowCount)); + return resultRowCount; + } + + public void SetRowCount (UInt32 ARowCount) + { + + CheckError(Internal.Lib3MFWrapper.ImageStack_SetRowCount (Handle, ARowCount)); + } + + public UInt32 GetColumnCount () + { + UInt32 resultColumnCount = 0; + + CheckError(Internal.Lib3MFWrapper.ImageStack_GetColumnCount (Handle, out resultColumnCount)); + return resultColumnCount; + } + + public void SetColumnCount (UInt32 AColumnCount) + { + + CheckError(Internal.Lib3MFWrapper.ImageStack_SetColumnCount (Handle, AColumnCount)); + } + + public UInt32 GetSheetCount () + { + UInt32 resultSheetCount = 0; + + CheckError(Internal.Lib3MFWrapper.ImageStack_GetSheetCount (Handle, out resultSheetCount)); + return resultSheetCount; + } + + public CAttachment GetSheet (UInt32 AIndex) + { + IntPtr newSheet = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImageStack_GetSheet (Handle, AIndex, out newSheet)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newSheet); + } + + public void SetSheet (UInt32 AIndex, CAttachment ASheet) + { + IntPtr ASheetHandle = IntPtr.Zero; + if (ASheet != null) + ASheetHandle = ASheet.GetHandle(); + + CheckError(Internal.Lib3MFWrapper.ImageStack_SetSheet (Handle, AIndex, ASheetHandle)); + } + + public CAttachment CreateEmptySheet (UInt32 AIndex, String APath) + { + byte[] bytePath = Encoding.UTF8.GetBytes(APath + char.MinValue); + IntPtr newSheet = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImageStack_CreateEmptySheet (Handle, AIndex, bytePath, out newSheet)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newSheet); + } + + public CAttachment CreateSheetFromBuffer (UInt32 AIndex, String APath, Byte[] AData) + { + byte[] bytePath = Encoding.UTF8.GetBytes(APath + char.MinValue); + GCHandle dataData = GCHandle.Alloc(AData, GCHandleType.Pinned); + IntPtr newSheet = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImageStack_CreateSheetFromBuffer (Handle, AIndex, bytePath, (UInt64) AData.Length, dataData.AddrOfPinnedObject(), out newSheet)); + dataData.Free (); + return Internal.Lib3MFWrapper.PolymorphicFactory(newSheet); + } + + public CAttachment CreateSheetFromFile (UInt32 AIndex, String APath, String AFileName) + { + byte[] bytePath = Encoding.UTF8.GetBytes(APath + char.MinValue); + byte[] byteFileName = Encoding.UTF8.GetBytes(AFileName + char.MinValue); + IntPtr newSheet = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImageStack_CreateSheetFromFile (Handle, AIndex, bytePath, byteFileName, out newSheet)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newSheet); + } + + } + + public class CAttachment : CBase + { + public CAttachment (IntPtr NewHandle) : base (NewHandle) + { + } + + public String GetPath () + { + UInt32 sizePath = 0; + UInt32 neededPath = 0; + CheckError(Internal.Lib3MFWrapper.Attachment_GetPath (Handle, sizePath, out neededPath, IntPtr.Zero)); + sizePath = neededPath; + byte[] bytesPath = new byte[sizePath]; + GCHandle dataPath = GCHandle.Alloc(bytesPath, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.Attachment_GetPath (Handle, sizePath, out neededPath, dataPath.AddrOfPinnedObject())); + dataPath.Free(); + return Encoding.UTF8.GetString(bytesPath).TrimEnd(char.MinValue); + } + + public void SetPath (String APath) + { + byte[] bytePath = Encoding.UTF8.GetBytes(APath + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.Attachment_SetPath (Handle, bytePath)); + } + + public CPackagePart PackagePart () + { + IntPtr newPackagePart = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Attachment_PackagePart (Handle, out newPackagePart)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newPackagePart); + } + + public String GetRelationShipType () + { + UInt32 sizePath = 0; + UInt32 neededPath = 0; + CheckError(Internal.Lib3MFWrapper.Attachment_GetRelationShipType (Handle, sizePath, out neededPath, IntPtr.Zero)); + sizePath = neededPath; + byte[] bytesPath = new byte[sizePath]; + GCHandle dataPath = GCHandle.Alloc(bytesPath, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.Attachment_GetRelationShipType (Handle, sizePath, out neededPath, dataPath.AddrOfPinnedObject())); + dataPath.Free(); + return Encoding.UTF8.GetString(bytesPath).TrimEnd(char.MinValue); + } + + public void SetRelationShipType (String APath) + { + byte[] bytePath = Encoding.UTF8.GetBytes(APath + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.Attachment_SetRelationShipType (Handle, bytePath)); + } + + public void WriteToFile (String AFileName) + { + byte[] byteFileName = Encoding.UTF8.GetBytes(AFileName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.Attachment_WriteToFile (Handle, byteFileName)); + } + + public void ReadFromFile (String AFileName) + { + byte[] byteFileName = Encoding.UTF8.GetBytes(AFileName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.Attachment_ReadFromFile (Handle, byteFileName)); + } + + public void ReadFromCallback (IntPtr ATheReadCallback, UInt64 AStreamSize, IntPtr ATheSeekCallback, UInt64 AUserData) + { + + CheckError(Internal.Lib3MFWrapper.Attachment_ReadFromCallback (Handle, ATheReadCallback, AStreamSize, ATheSeekCallback, AUserData)); + } + + public UInt64 GetStreamSize () + { + UInt64 resultStreamSize = 0; + + CheckError(Internal.Lib3MFWrapper.Attachment_GetStreamSize (Handle, out resultStreamSize)); + return resultStreamSize; + } + + public void WriteToBuffer (out Byte[] ABuffer) + { + UInt64 sizeBuffer = 0; + UInt64 neededBuffer = 0; + CheckError(Internal.Lib3MFWrapper.Attachment_WriteToBuffer (Handle, sizeBuffer, out neededBuffer, IntPtr.Zero)); + sizeBuffer = neededBuffer; + ABuffer = new Byte[sizeBuffer]; + GCHandle dataBuffer = GCHandle.Alloc(ABuffer, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.Attachment_WriteToBuffer (Handle, sizeBuffer, out neededBuffer, dataBuffer.AddrOfPinnedObject())); + dataBuffer.Free(); + } + + public void ReadFromBuffer (Byte[] ABuffer) + { + GCHandle dataBuffer = GCHandle.Alloc(ABuffer, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.Attachment_ReadFromBuffer (Handle, (UInt64) ABuffer.Length, dataBuffer.AddrOfPinnedObject())); + dataBuffer.Free (); + } + + } + + public class CTexture2D : CResource + { + public CTexture2D (IntPtr NewHandle) : base (NewHandle) + { + } + + public CAttachment GetAttachment () + { + IntPtr newAttachment = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Texture2D_GetAttachment (Handle, out newAttachment)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newAttachment); + } + + public void SetAttachment (CAttachment AAttachment) + { + IntPtr AAttachmentHandle = IntPtr.Zero; + if (AAttachment != null) + AAttachmentHandle = AAttachment.GetHandle(); + + CheckError(Internal.Lib3MFWrapper.Texture2D_SetAttachment (Handle, AAttachmentHandle)); + } + + public eTextureType GetContentType () + { + Int32 resultContentType = 0; + + CheckError(Internal.Lib3MFWrapper.Texture2D_GetContentType (Handle, out resultContentType)); + return (eTextureType) (resultContentType); + } + + public void SetContentType (eTextureType AContentType) + { + Int32 enumContentType = (Int32) AContentType; + + CheckError(Internal.Lib3MFWrapper.Texture2D_SetContentType (Handle, enumContentType)); + } + + public void GetTileStyleUV (out eTextureTileStyle ATileStyleU, out eTextureTileStyle ATileStyleV) + { + Int32 resultTileStyleU = 0; + Int32 resultTileStyleV = 0; + + CheckError(Internal.Lib3MFWrapper.Texture2D_GetTileStyleUV (Handle, out resultTileStyleU, out resultTileStyleV)); + ATileStyleU = (eTextureTileStyle) (resultTileStyleU); + ATileStyleV = (eTextureTileStyle) (resultTileStyleV); + } + + public void SetTileStyleUV (eTextureTileStyle ATileStyleU, eTextureTileStyle ATileStyleV) + { + Int32 enumTileStyleU = (Int32) ATileStyleU; + Int32 enumTileStyleV = (Int32) ATileStyleV; + + CheckError(Internal.Lib3MFWrapper.Texture2D_SetTileStyleUV (Handle, enumTileStyleU, enumTileStyleV)); + } + + public eTextureFilter GetFilter () + { + Int32 resultFilter = 0; + + CheckError(Internal.Lib3MFWrapper.Texture2D_GetFilter (Handle, out resultFilter)); + return (eTextureFilter) (resultFilter); + } + + public void SetFilter (eTextureFilter AFilter) + { + Int32 enumFilter = (Int32) AFilter; + + CheckError(Internal.Lib3MFWrapper.Texture2D_SetFilter (Handle, enumFilter)); + } + + } + + public class CImplicitPort : CBase + { + public CImplicitPort (IntPtr NewHandle) : base (NewHandle) + { + } + + public String GetIdentifier () + { + UInt32 sizeIdentifier = 0; + UInt32 neededIdentifier = 0; + CheckError(Internal.Lib3MFWrapper.ImplicitPort_GetIdentifier (Handle, sizeIdentifier, out neededIdentifier, IntPtr.Zero)); + sizeIdentifier = neededIdentifier; + byte[] bytesIdentifier = new byte[sizeIdentifier]; + GCHandle dataIdentifier = GCHandle.Alloc(bytesIdentifier, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.ImplicitPort_GetIdentifier (Handle, sizeIdentifier, out neededIdentifier, dataIdentifier.AddrOfPinnedObject())); + dataIdentifier.Free(); + return Encoding.UTF8.GetString(bytesIdentifier).TrimEnd(char.MinValue); + } + + public void SetIdentifier (String AIdentifier) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.ImplicitPort_SetIdentifier (Handle, byteIdentifier)); + } + + public String GetDisplayName () + { + UInt32 sizeDisplayName = 0; + UInt32 neededDisplayName = 0; + CheckError(Internal.Lib3MFWrapper.ImplicitPort_GetDisplayName (Handle, sizeDisplayName, out neededDisplayName, IntPtr.Zero)); + sizeDisplayName = neededDisplayName; + byte[] bytesDisplayName = new byte[sizeDisplayName]; + GCHandle dataDisplayName = GCHandle.Alloc(bytesDisplayName, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.ImplicitPort_GetDisplayName (Handle, sizeDisplayName, out neededDisplayName, dataDisplayName.AddrOfPinnedObject())); + dataDisplayName.Free(); + return Encoding.UTF8.GetString(bytesDisplayName).TrimEnd(char.MinValue); + } + + public void SetDisplayName (String ADisplayName) + { + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.ImplicitPort_SetDisplayName (Handle, byteDisplayName)); + } + + public void SetType (eImplicitPortType AImplicitPortType) + { + Int32 enumImplicitPortType = (Int32) AImplicitPortType; + + CheckError(Internal.Lib3MFWrapper.ImplicitPort_SetType (Handle, enumImplicitPortType)); + } + + public eImplicitPortType GetType () + { + Int32 resultImplicitPortType = 0; + + CheckError(Internal.Lib3MFWrapper.ImplicitPort_GetType (Handle, out resultImplicitPortType)); + return (eImplicitPortType) (resultImplicitPortType); + } + + public String GetReference () + { + UInt32 sizeReference = 0; + UInt32 neededReference = 0; + CheckError(Internal.Lib3MFWrapper.ImplicitPort_GetReference (Handle, sizeReference, out neededReference, IntPtr.Zero)); + sizeReference = neededReference; + byte[] bytesReference = new byte[sizeReference]; + GCHandle dataReference = GCHandle.Alloc(bytesReference, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.ImplicitPort_GetReference (Handle, sizeReference, out neededReference, dataReference.AddrOfPinnedObject())); + dataReference.Free(); + return Encoding.UTF8.GetString(bytesReference).TrimEnd(char.MinValue); + } + + public void SetReference (String AReference) + { + byte[] byteReference = Encoding.UTF8.GetBytes(AReference + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.ImplicitPort_SetReference (Handle, byteReference)); + } + + } + + public class CIterator : CBase + { + public CIterator (IntPtr NewHandle) : base (NewHandle) + { + } + + public bool MoveNext () + { + Byte resultHasNext = 0; + + CheckError(Internal.Lib3MFWrapper.Iterator_MoveNext (Handle, out resultHasNext)); + return (resultHasNext != 0); + } + + public bool MovePrevious () + { + Byte resultHasPrevious = 0; + + CheckError(Internal.Lib3MFWrapper.Iterator_MovePrevious (Handle, out resultHasPrevious)); + return (resultHasPrevious != 0); + } + + public UInt64 Count () + { + UInt64 resultCount = 0; + + CheckError(Internal.Lib3MFWrapper.Iterator_Count (Handle, out resultCount)); + return resultCount; + } + + } + + public class CImplicitPortIterator : CIterator + { + public CImplicitPortIterator (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetCurrent () + { + IntPtr newPort = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitPortIterator_GetCurrent (Handle, out newPort)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newPort); + } + + } + + public class CImplicitNode : CBase + { + public CImplicitNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public String GetIdentifier () + { + UInt32 sizeIdentifier = 0; + UInt32 neededIdentifier = 0; + CheckError(Internal.Lib3MFWrapper.ImplicitNode_GetIdentifier (Handle, sizeIdentifier, out neededIdentifier, IntPtr.Zero)); + sizeIdentifier = neededIdentifier; + byte[] bytesIdentifier = new byte[sizeIdentifier]; + GCHandle dataIdentifier = GCHandle.Alloc(bytesIdentifier, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_GetIdentifier (Handle, sizeIdentifier, out neededIdentifier, dataIdentifier.AddrOfPinnedObject())); + dataIdentifier.Free(); + return Encoding.UTF8.GetString(bytesIdentifier).TrimEnd(char.MinValue); + } + + public void SetIdentifier (String AIdentifier) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_SetIdentifier (Handle, byteIdentifier)); + } + + public String GetDisplayName () + { + UInt32 sizeDisplayName = 0; + UInt32 neededDisplayName = 0; + CheckError(Internal.Lib3MFWrapper.ImplicitNode_GetDisplayName (Handle, sizeDisplayName, out neededDisplayName, IntPtr.Zero)); + sizeDisplayName = neededDisplayName; + byte[] bytesDisplayName = new byte[sizeDisplayName]; + GCHandle dataDisplayName = GCHandle.Alloc(bytesDisplayName, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_GetDisplayName (Handle, sizeDisplayName, out neededDisplayName, dataDisplayName.AddrOfPinnedObject())); + dataDisplayName.Free(); + return Encoding.UTF8.GetString(bytesDisplayName).TrimEnd(char.MinValue); + } + + public void SetDisplayName (String ADisplayName) + { + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_SetDisplayName (Handle, byteDisplayName)); + } + + public String GetTag () + { + UInt32 sizeTag = 0; + UInt32 neededTag = 0; + CheckError(Internal.Lib3MFWrapper.ImplicitNode_GetTag (Handle, sizeTag, out neededTag, IntPtr.Zero)); + sizeTag = neededTag; + byte[] bytesTag = new byte[sizeTag]; + GCHandle dataTag = GCHandle.Alloc(bytesTag, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_GetTag (Handle, sizeTag, out neededTag, dataTag.AddrOfPinnedObject())); + dataTag.Free(); + return Encoding.UTF8.GetString(bytesTag).TrimEnd(char.MinValue); + } + + public void SetTag (String ATag) + { + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_SetTag (Handle, byteTag)); + } + + public eImplicitNodeType GetNodeType () + { + Int32 resultType = 0; + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_GetNodeType (Handle, out resultType)); + return (eImplicitNodeType) (resultType); + } + + public CImplicitPort AddInput (String AIdentifier, String ADisplayName) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + IntPtr newPort = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_AddInput (Handle, byteIdentifier, byteDisplayName, out newPort)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newPort); + } + + public CImplicitPortIterator GetInputs () + { + IntPtr newIterator = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_GetInputs (Handle, out newIterator)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newIterator); + } + + public CImplicitPort AddOutput (String AIdentifier, String ADisplayName) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + IntPtr newPort = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_AddOutput (Handle, byteIdentifier, byteDisplayName, out newPort)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newPort); + } + + public CImplicitPortIterator GetOutputs () + { + IntPtr newIterator = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_GetOutputs (Handle, out newIterator)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newIterator); + } + + public CImplicitPort FindInput (String AIdentifier) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + IntPtr newInput = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_FindInput (Handle, byteIdentifier, out newInput)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newInput); + } + + public CImplicitPort FindOutput (String AIdentifier) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + IntPtr newOutput = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_FindOutput (Handle, byteIdentifier, out newOutput)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newOutput); + } + + public bool AreTypesValid () + { + Byte resultValid = 0; + + CheckError(Internal.Lib3MFWrapper.ImplicitNode_AreTypesValid (Handle, out resultValid)); + return (resultValid != 0); + } + + } + + public class COneInputNode : CImplicitNode + { + public COneInputNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputA () + { + IntPtr newInput = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.OneInputNode_GetInputA (Handle, out newInput)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newInput); + } + + public CImplicitPort GetOutputResult () + { + IntPtr newResult = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.OneInputNode_GetOutputResult (Handle, out newResult)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResult); + } + + } + + public class CSinNode : COneInputNode + { + public CSinNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CCosNode : COneInputNode + { + public CCosNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CTanNode : COneInputNode + { + public CTanNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CArcSinNode : COneInputNode + { + public CArcSinNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CArcCosNode : COneInputNode + { + public CArcCosNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CArcTanNode : COneInputNode + { + public CArcTanNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CSinhNode : COneInputNode + { + public CSinhNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CCoshNode : COneInputNode + { + public CCoshNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CTanhNode : COneInputNode + { + public CTanhNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CRoundNode : COneInputNode + { + public CRoundNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CCeilNode : COneInputNode + { + public CCeilNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CFloorNode : COneInputNode + { + public CFloorNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CSignNode : COneInputNode + { + public CSignNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CFractNode : COneInputNode + { + public CFractNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CAbsNode : COneInputNode + { + public CAbsNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CExpNode : COneInputNode + { + public CExpNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CLogNode : COneInputNode + { + public CLogNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CLog2Node : COneInputNode + { + public CLog2Node (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CLog10Node : COneInputNode + { + public CLog10Node (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CLengthNode : COneInputNode + { + public CLengthNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CTransposeNode : COneInputNode + { + public CTransposeNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CInverseNode : COneInputNode + { + public CInverseNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CSqrtNode : COneInputNode + { + public CSqrtNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CResourceIdNode : CImplicitNode + { + public CResourceIdNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public void SetResource (CResource AResource) + { + IntPtr AResourceHandle = IntPtr.Zero; + if (AResource != null) + AResourceHandle = AResource.GetHandle(); + + CheckError(Internal.Lib3MFWrapper.ResourceIdNode_SetResource (Handle, AResourceHandle)); + } + + public CResource GetResource () + { + IntPtr newResource = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ResourceIdNode_GetResource (Handle, out newResource)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResource); + } + + public CImplicitPort GetOutputValue () + { + IntPtr newValue = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ResourceIdNode_GetOutputValue (Handle, out newValue)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newValue); + } + + } + + public class CTwoInputNode : COneInputNode + { + public CTwoInputNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputB () + { + IntPtr newB = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.TwoInputNode_GetInputB (Handle, out newB)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newB); + } + + } + + public class CAdditionNode : CTwoInputNode + { + public CAdditionNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CSubtractionNode : CTwoInputNode + { + public CSubtractionNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CMultiplicationNode : CTwoInputNode + { + public CMultiplicationNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CDivisionNode : CTwoInputNode + { + public CDivisionNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CDotNode : CTwoInputNode + { + public CDotNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CCrossNode : CTwoInputNode + { + public CCrossNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CArcTan2Node : CTwoInputNode + { + public CArcTan2Node (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CMatVecMultiplicationNode : CTwoInputNode + { + public CMatVecMultiplicationNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CMinNode : CTwoInputNode + { + public CMinNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CMaxNode : CTwoInputNode + { + public CMaxNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CFmodNode : CTwoInputNode + { + public CFmodNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CModNode : CTwoInputNode + { + public CModNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CPowNode : CTwoInputNode + { + public CPowNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CSelectNode : COneInputNode + { + public CSelectNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputB () + { + IntPtr newB = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.SelectNode_GetInputB (Handle, out newB)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newB); + } + + public CImplicitPort GetInputC () + { + IntPtr newC = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.SelectNode_GetInputC (Handle, out newC)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newC); + } + + public CImplicitPort GetInputD () + { + IntPtr newD = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.SelectNode_GetInputD (Handle, out newD)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newD); + } + + } + + public class CClampNode : COneInputNode + { + public CClampNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputMin () + { + IntPtr newMin = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ClampNode_GetInputMin (Handle, out newMin)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newMin); + } + + public CImplicitPort GetInputMax () + { + IntPtr newMax = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ClampNode_GetInputMax (Handle, out newMax)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newMax); + } + + } + + public class CComposeVectorNode : CImplicitNode + { + public CComposeVectorNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputX () + { + IntPtr newX = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeVectorNode_GetInputX (Handle, out newX)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newX); + } + + public CImplicitPort GetInputY () + { + IntPtr newY = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeVectorNode_GetInputY (Handle, out newY)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newY); + } + + public CImplicitPort GetInputZ () + { + IntPtr newZ = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeVectorNode_GetInputZ (Handle, out newZ)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newZ); + } + + public CImplicitPort GetOutputResult () + { + IntPtr newResult = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeVectorNode_GetOutputResult (Handle, out newResult)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResult); + } + + } + + public class CVectorFromScalarNode : COneInputNode + { + public CVectorFromScalarNode (IntPtr NewHandle) : base (NewHandle) + { + } + + } + + public class CDecomposeVectorNode : CImplicitNode + { + public CDecomposeVectorNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputA () + { + IntPtr newA = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.DecomposeVectorNode_GetInputA (Handle, out newA)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newA); + } + + public CImplicitPort GetOutputX () + { + IntPtr newX = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.DecomposeVectorNode_GetOutputX (Handle, out newX)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newX); + } + + public CImplicitPort GetOutputY () + { + IntPtr newY = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.DecomposeVectorNode_GetOutputY (Handle, out newY)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newY); + } + + public CImplicitPort GetOutputZ () + { + IntPtr newZ = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.DecomposeVectorNode_GetOutputZ (Handle, out newZ)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newZ); + } + + } + + public class CComposeMatrixNode : CImplicitNode + { + public CComposeMatrixNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputM00 () + { + IntPtr newM00 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM00 (Handle, out newM00)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM00); + } + + public CImplicitPort GetInputM01 () + { + IntPtr newM01 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM01 (Handle, out newM01)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM01); + } + + public CImplicitPort GetInputM02 () + { + IntPtr newM02 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM02 (Handle, out newM02)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM02); + } + + public CImplicitPort GetInputM03 () + { + IntPtr newM03 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM03 (Handle, out newM03)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM03); + } + + public CImplicitPort GetInputM10 () + { + IntPtr newM10 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM10 (Handle, out newM10)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM10); + } + + public CImplicitPort GetInputM11 () + { + IntPtr newM11 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM11 (Handle, out newM11)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM11); + } + + public CImplicitPort GetInputM12 () + { + IntPtr newM12 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM12 (Handle, out newM12)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM12); + } + + public CImplicitPort GetInputM13 () + { + IntPtr newM13 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM13 (Handle, out newM13)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM13); + } + + public CImplicitPort GetInputM20 () + { + IntPtr newM20 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM20 (Handle, out newM20)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM20); + } + + public CImplicitPort GetInputM21 () + { + IntPtr newM21 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM21 (Handle, out newM21)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM21); + } + + public CImplicitPort GetInputM22 () + { + IntPtr newM22 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM22 (Handle, out newM22)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM22); + } + + public CImplicitPort GetInputM23 () + { + IntPtr newM23 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM23 (Handle, out newM23)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM23); + } + + public CImplicitPort GetInputM30 () + { + IntPtr newM30 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM30 (Handle, out newM30)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM30); + } + + public CImplicitPort GetInputM31 () + { + IntPtr newM31 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM31 (Handle, out newM31)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM31); + } + + public CImplicitPort GetInputM32 () + { + IntPtr newM32 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM32 (Handle, out newM32)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM32); + } + + public CImplicitPort GetInputM33 () + { + IntPtr newM33 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetInputM33 (Handle, out newM33)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newM33); + } + + public CImplicitPort GetOutputResult () + { + IntPtr newResult = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ComposeMatrixNode_GetOutputResult (Handle, out newResult)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResult); + } + + } + + public class CMatrixFromRowsNode : CImplicitNode + { + public CMatrixFromRowsNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputA () + { + IntPtr newRow0 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MatrixFromRowsNode_GetInputA (Handle, out newRow0)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newRow0); + } + + public CImplicitPort GetInputB () + { + IntPtr newRow1 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MatrixFromRowsNode_GetInputB (Handle, out newRow1)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newRow1); + } + + public CImplicitPort GetInputC () + { + IntPtr newRow2 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MatrixFromRowsNode_GetInputC (Handle, out newRow2)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newRow2); + } + + public CImplicitPort GetInputD () + { + IntPtr newRow3 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MatrixFromRowsNode_GetInputD (Handle, out newRow3)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newRow3); + } + + public CImplicitPort GetOutputResult () + { + IntPtr newResult = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MatrixFromRowsNode_GetOutputResult (Handle, out newResult)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResult); + } + + } + + public class CMatrixFromColumnsNode : CImplicitNode + { + public CMatrixFromColumnsNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputA () + { + IntPtr newColumn0 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MatrixFromColumnsNode_GetInputA (Handle, out newColumn0)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newColumn0); + } + + public CImplicitPort GetInputB () + { + IntPtr newColumn1 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MatrixFromColumnsNode_GetInputB (Handle, out newColumn1)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newColumn1); + } + + public CImplicitPort GetInputC () + { + IntPtr newColumn2 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MatrixFromColumnsNode_GetInputC (Handle, out newColumn2)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newColumn2); + } + + public CImplicitPort GetInputD () + { + IntPtr newColumn3 = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MatrixFromColumnsNode_GetInputD (Handle, out newColumn3)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newColumn3); + } + + public CImplicitPort GetOutputResult () + { + IntPtr newResult = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MatrixFromColumnsNode_GetOutputResult (Handle, out newResult)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResult); + } + + } + + public class CConstantNode : CImplicitNode + { + public CConstantNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public void SetConstant (Double AValue) + { + + CheckError(Internal.Lib3MFWrapper.ConstantNode_SetConstant (Handle, AValue)); + } + + public Double GetConstant () + { + Double resultValue = 0; + + CheckError(Internal.Lib3MFWrapper.ConstantNode_GetConstant (Handle, out resultValue)); + return resultValue; + } + + public CImplicitPort GetOutputValue () + { + IntPtr newValue = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ConstantNode_GetOutputValue (Handle, out newValue)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newValue); + } + + } + + public class CConstVecNode : CImplicitNode + { + public CConstVecNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public void SetVector (sVector AValue) + { + Internal.InternalVector intValue = Internal.Lib3MFWrapper.convertStructToInternal_Vector (AValue); + + CheckError(Internal.Lib3MFWrapper.ConstVecNode_SetVector (Handle, intValue)); + } + + public sVector GetVector () + { + Internal.InternalVector intresultValue; + + CheckError(Internal.Lib3MFWrapper.ConstVecNode_GetVector (Handle, out intresultValue)); + return Internal.Lib3MFWrapper.convertInternalToStruct_Vector (intresultValue); + } + + public CImplicitPort GetOutputVector () + { + IntPtr newVector = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ConstVecNode_GetOutputVector (Handle, out newVector)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newVector); + } + + } + + public class CConstMatNode : CImplicitNode + { + public CConstMatNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public void SetMatrix (sMatrix4x4 AValue) + { + Internal.InternalMatrix4x4 intValue = Internal.Lib3MFWrapper.convertStructToInternal_Matrix4x4 (AValue); + + CheckError(Internal.Lib3MFWrapper.ConstMatNode_SetMatrix (Handle, intValue)); + } + + public sMatrix4x4 GetMatrix () + { + Internal.InternalMatrix4x4 intresultValue; + + CheckError(Internal.Lib3MFWrapper.ConstMatNode_GetMatrix (Handle, out intresultValue)); + return Internal.Lib3MFWrapper.convertInternalToStruct_Matrix4x4 (intresultValue); + } + + public CImplicitPort GetOutputMatrix () + { + IntPtr newMatrix = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ConstMatNode_GetOutputMatrix (Handle, out newMatrix)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newMatrix); + } + + } + + public class CMeshNode : CImplicitNode + { + public CMeshNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputMesh () + { + IntPtr newMesh = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MeshNode_GetInputMesh (Handle, out newMesh)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newMesh); + } + + public CImplicitPort GetInputPos () + { + IntPtr newPos = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MeshNode_GetInputPos (Handle, out newPos)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newPos); + } + + public CImplicitPort GetOutputDistance () + { + IntPtr newDistance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.MeshNode_GetOutputDistance (Handle, out newDistance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newDistance); + } + + } + + public class CUnsignedMeshNode : CImplicitNode + { + public CUnsignedMeshNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputMesh () + { + IntPtr newMesh = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.UnsignedMeshNode_GetInputMesh (Handle, out newMesh)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newMesh); + } + + public CImplicitPort GetInputPos () + { + IntPtr newPos = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.UnsignedMeshNode_GetInputPos (Handle, out newPos)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newPos); + } + + public CImplicitPort GetOutputDistance () + { + IntPtr newDistance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.UnsignedMeshNode_GetOutputDistance (Handle, out newDistance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newDistance); + } + + } + + public class CFunctionCallNode : CImplicitNode + { + public CFunctionCallNode (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitPort GetInputFunctionID () + { + IntPtr newFunction = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.FunctionCallNode_GetInputFunctionID (Handle, out newFunction)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newFunction); + } + + } + + public class CNodeIterator : CIterator + { + public CNodeIterator (IntPtr NewHandle) : base (NewHandle) + { + } + + public CImplicitNode GetCurrent () + { + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.NodeIterator_GetCurrent (Handle, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + } + + public class CFunction : CResource + { + public CFunction (IntPtr NewHandle) : base (NewHandle) + { + } + + public String GetDisplayName () + { + UInt32 sizeDisplayName = 0; + UInt32 neededDisplayName = 0; + CheckError(Internal.Lib3MFWrapper.Function_GetDisplayName (Handle, sizeDisplayName, out neededDisplayName, IntPtr.Zero)); + sizeDisplayName = neededDisplayName; + byte[] bytesDisplayName = new byte[sizeDisplayName]; + GCHandle dataDisplayName = GCHandle.Alloc(bytesDisplayName, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.Function_GetDisplayName (Handle, sizeDisplayName, out neededDisplayName, dataDisplayName.AddrOfPinnedObject())); + dataDisplayName.Free(); + return Encoding.UTF8.GetString(bytesDisplayName).TrimEnd(char.MinValue); + } + + public void SetDisplayName (String ADisplayName) + { + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.Function_SetDisplayName (Handle, byteDisplayName)); + } + + public CImplicitPort AddInput (String AIdentifier, String ADisplayName, eImplicitPortType AType) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + Int32 enumType = (Int32) AType; + IntPtr newPort = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Function_AddInput (Handle, byteIdentifier, byteDisplayName, enumType, out newPort)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newPort); + } + + public CImplicitPortIterator GetInputs () + { + IntPtr newIterator = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Function_GetInputs (Handle, out newIterator)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newIterator); + } + + public void RemoveInput (CImplicitPort AInput) + { + IntPtr AInputHandle = IntPtr.Zero; + if (AInput != null) + AInputHandle = AInput.GetHandle(); + + CheckError(Internal.Lib3MFWrapper.Function_RemoveInput (Handle, AInputHandle)); + } + + public CImplicitPort AddOutput (String AIdentifier, String ADisplayName, eImplicitPortType AType) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + Int32 enumType = (Int32) AType; + IntPtr newPort = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Function_AddOutput (Handle, byteIdentifier, byteDisplayName, enumType, out newPort)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newPort); + } + + public CImplicitPortIterator GetOutputs () + { + IntPtr newIterator = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Function_GetOutputs (Handle, out newIterator)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newIterator); + } + + public void RemoveOutput (CImplicitPort AOutput) + { + IntPtr AOutputHandle = IntPtr.Zero; + if (AOutput != null) + AOutputHandle = AOutput.GetHandle(); + + CheckError(Internal.Lib3MFWrapper.Function_RemoveOutput (Handle, AOutputHandle)); + } + + public CImplicitPort FindInput (String AIdentifier) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + IntPtr newInput = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Function_FindInput (Handle, byteIdentifier, out newInput)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newInput); + } + + public CImplicitPort FindOutput (String AIdentifier) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + IntPtr newOutput = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Function_FindOutput (Handle, byteIdentifier, out newOutput)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newOutput); + } + + } + + public class CImplicitFunction : CFunction + { + public CImplicitFunction (IntPtr NewHandle) : base (NewHandle) + { + } + + public String GetIdentifier () + { + UInt32 sizeIdentifier = 0; + UInt32 neededIdentifier = 0; + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_GetIdentifier (Handle, sizeIdentifier, out neededIdentifier, IntPtr.Zero)); + sizeIdentifier = neededIdentifier; + byte[] bytesIdentifier = new byte[sizeIdentifier]; + GCHandle dataIdentifier = GCHandle.Alloc(bytesIdentifier, GCHandleType.Pinned); + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_GetIdentifier (Handle, sizeIdentifier, out neededIdentifier, dataIdentifier.AddrOfPinnedObject())); + dataIdentifier.Free(); + return Encoding.UTF8.GetString(bytesIdentifier).TrimEnd(char.MinValue); + } + + public void SetIdentifier (String AIdentifier) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_SetIdentifier (Handle, byteIdentifier)); + } + + public CImplicitNode AddNode (eImplicitNodeType ANodeType, String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + Int32 enumNodeType = (Int32) ANodeType; + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddNode (Handle, enumNodeType, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CSinNode AddSinNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddSinNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CCosNode AddCosNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddCosNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CTanNode AddTanNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddTanNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CArcSinNode AddArcSinNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddArcSinNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CArcCosNode AddArcCosNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddArcCosNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CArcTan2Node AddArcTan2Node (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddArcTan2Node (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CSinhNode AddSinhNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddSinhNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CCoshNode AddCoshNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddCoshNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CTanhNode AddTanhNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddTanhNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CRoundNode AddRoundNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddRoundNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CCeilNode AddCeilNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddCeilNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CFloorNode AddFloorNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddFloorNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CSignNode AddSignNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddSignNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CFractNode AddFractNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddFractNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CAbsNode AddAbsNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddAbsNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CExpNode AddExpNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddExpNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CLogNode AddLogNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddLogNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CLog2Node AddLog2Node (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddLog2Node (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CLog10Node AddLog10Node (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddLog10Node (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CLengthNode AddLengthNode (String AIdentifier, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddLengthNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CTransposeNode AddTransposeNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddTransposeNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CInverseNode InverseNode (String AIdentifier, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_InverseNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CSqrtNode AddSqrtNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddSqrtNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CResourceIdNode AddResourceIdNode (String AIdentifier, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddResourceIdNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CAdditionNode AddAdditionNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddAdditionNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CSubtractionNode AddSubtractionNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddSubtractionNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CMultiplicationNode AddMultiplicationNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddMultiplicationNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CDivisionNode AddDivisionNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddDivisionNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CDotNode AddDotNode (String AIdentifier, String ADisplayName, String ATag) + { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddDotNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); + } + + public CCrossNode AddCrossNode (String AIdentifier, String ADisplayName, String ATag) { - Internal.InternalCompositeConstituent[] intdataComposite = new Internal.InternalCompositeConstituent[AComposite.Length]; - for (int index = 0; index < AComposite.Length; index++) - intdataComposite[index] = Internal.Lib3MFWrapper.convertStructToInternal_CompositeConstituent(AComposite[index]); - GCHandle dataComposite = GCHandle.Alloc(intdataComposite, GCHandleType.Pinned); - UInt32 resultPropertyID = 0; + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.CompositeMaterials_AddComposite (Handle, (UInt64) AComposite.Length, dataComposite.AddrOfPinnedObject(), out resultPropertyID)); - dataComposite.Free (); - return resultPropertyID; + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddCrossNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public void RemoveComposite (UInt32 APropertyID) + public CMatVecMultiplicationNode AddMatVecMultiplicationNode (String AIdentifier, String ADisplayName, String ATag) { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.CompositeMaterials_RemoveComposite (Handle, APropertyID)); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddMatVecMultiplicationNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public void GetComposite (UInt32 APropertyID, out sCompositeConstituent[] AComposite) + public CMinNode AddMinNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) { - UInt64 sizeComposite = 0; - UInt64 neededComposite = 0; - CheckError(Internal.Lib3MFWrapper.CompositeMaterials_GetComposite (Handle, APropertyID, sizeComposite, out neededComposite, IntPtr.Zero)); - sizeComposite = neededComposite; - var arrayComposite = new Internal.InternalCompositeConstituent[sizeComposite]; - GCHandle dataComposite = GCHandle.Alloc(arrayComposite, GCHandleType.Pinned); + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.CompositeMaterials_GetComposite (Handle, APropertyID, sizeComposite, out neededComposite, dataComposite.AddrOfPinnedObject())); - dataComposite.Free(); - AComposite = new sCompositeConstituent[sizeComposite]; - for (int index = 0; index < AComposite.Length; index++) - AComposite[index] = Internal.Lib3MFWrapper.convertInternalToStruct_CompositeConstituent(arrayComposite[index]); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddMinNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - } - - public class CMultiPropertyGroup : CResource - { - public CMultiPropertyGroup (IntPtr NewHandle) : base (NewHandle) + public CMaxNode AddMaxNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddMaxNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public UInt32 GetCount () + public CFmodNode AddFmodNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) { - UInt32 resultCount = 0; + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetCount (Handle, out resultCount)); - return resultCount; + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddFmodNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public void GetAllPropertyIDs (out UInt32[] APropertyIDs) + public CPowNode AddPowNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) { - UInt64 sizePropertyIDs = 0; - UInt64 neededPropertyIDs = 0; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetAllPropertyIDs (Handle, sizePropertyIDs, out neededPropertyIDs, IntPtr.Zero)); - sizePropertyIDs = neededPropertyIDs; - APropertyIDs = new UInt32[sizePropertyIDs]; - GCHandle dataPropertyIDs = GCHandle.Alloc(APropertyIDs, GCHandleType.Pinned); + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetAllPropertyIDs (Handle, sizePropertyIDs, out neededPropertyIDs, dataPropertyIDs.AddrOfPinnedObject())); - dataPropertyIDs.Free(); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddPowNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public UInt32 AddMultiProperty (UInt32[] APropertyIDs) + public CSelectNode AddSelectNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) { - GCHandle dataPropertyIDs = GCHandle.Alloc(APropertyIDs, GCHandleType.Pinned); - UInt32 resultPropertyID = 0; + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_AddMultiProperty (Handle, (UInt64) APropertyIDs.Length, dataPropertyIDs.AddrOfPinnedObject(), out resultPropertyID)); - dataPropertyIDs.Free (); - return resultPropertyID; + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddSelectNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public void SetMultiProperty (UInt32 APropertyID, UInt32[] APropertyIDs) + public CClampNode AddClampNode (String AIdentifier, eImplicitNodeConfiguration AConfiguration, String ADisplayName, String ATag) { - GCHandle dataPropertyIDs = GCHandle.Alloc(APropertyIDs, GCHandleType.Pinned); + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + Int32 enumConfiguration = (Int32) AConfiguration; + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_SetMultiProperty (Handle, APropertyID, (UInt64) APropertyIDs.Length, dataPropertyIDs.AddrOfPinnedObject())); - dataPropertyIDs.Free (); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddClampNode (Handle, byteIdentifier, enumConfiguration, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public void GetMultiProperty (UInt32 APropertyID, out UInt32[] APropertyIDs) + public CComposeVectorNode AddComposeVectorNode (String AIdentifier, String ADisplayName, String ATag) { - UInt64 sizePropertyIDs = 0; - UInt64 neededPropertyIDs = 0; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetMultiProperty (Handle, APropertyID, sizePropertyIDs, out neededPropertyIDs, IntPtr.Zero)); - sizePropertyIDs = neededPropertyIDs; - APropertyIDs = new UInt32[sizePropertyIDs]; - GCHandle dataPropertyIDs = GCHandle.Alloc(APropertyIDs, GCHandleType.Pinned); + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetMultiProperty (Handle, APropertyID, sizePropertyIDs, out neededPropertyIDs, dataPropertyIDs.AddrOfPinnedObject())); - dataPropertyIDs.Free(); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddComposeVectorNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public void RemoveMultiProperty (UInt32 APropertyID) + public CVectorFromScalarNode AddVectorFromScalarNode (String AIdentifier, String ADisplayName, String ATag) { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_RemoveMultiProperty (Handle, APropertyID)); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddVectorFromScalarNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public UInt32 GetLayerCount () + public CDecomposeVectorNode AddDecomposeVectorNode (String AIdentifier, String ADisplayName, String ATag) { - UInt32 resultCount = 0; + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetLayerCount (Handle, out resultCount)); - return resultCount; + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddDecomposeVectorNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public UInt32 AddLayer (sMultiPropertyLayer ATheLayer) + public CComposeMatrixNode AddComposeMatrixNode (String AIdentifier, String ADisplayName, String ATag) { - Internal.InternalMultiPropertyLayer intTheLayer = Internal.Lib3MFWrapper.convertStructToInternal_MultiPropertyLayer (ATheLayer); - UInt32 resultLayerIndex = 0; + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_AddLayer (Handle, intTheLayer, out resultLayerIndex)); - return resultLayerIndex; + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddComposeMatrixNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public sMultiPropertyLayer GetLayer (UInt32 ALayerIndex) + public CMatrixFromRowsNode AddMatrixFromRowsNode (String AIdentifier, String ADisplayName, String ATag) { - Internal.InternalMultiPropertyLayer intresultTheLayer; + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_GetLayer (Handle, ALayerIndex, out intresultTheLayer)); - return Internal.Lib3MFWrapper.convertInternalToStruct_MultiPropertyLayer (intresultTheLayer); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddMatrixFromRowsNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public void RemoveLayer (UInt32 ALayerIndex) + public CMatrixFromColumnsNode AddMatrixFromColumnsNode (String AIdentifier, String ADisplayName, String ATag) { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.MultiPropertyGroup_RemoveLayer (Handle, ALayerIndex)); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddMatrixFromColumnsNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - } - - public class CAttachment : CBase - { - public CAttachment (IntPtr NewHandle) : base (NewHandle) + public CConstantNode AddConstantNode (String AIdentifier, String ADisplayName, String ATag) { + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddConstantNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public String GetPath () + public CConstVecNode AddConstVecNode (String AIdentifier, String ADisplayName, String ATag) { - UInt32 sizePath = 0; - UInt32 neededPath = 0; - CheckError(Internal.Lib3MFWrapper.Attachment_GetPath (Handle, sizePath, out neededPath, IntPtr.Zero)); - sizePath = neededPath; - byte[] bytesPath = new byte[sizePath]; - GCHandle dataPath = GCHandle.Alloc(bytesPath, GCHandleType.Pinned); + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.Attachment_GetPath (Handle, sizePath, out neededPath, dataPath.AddrOfPinnedObject())); - dataPath.Free(); - return Encoding.UTF8.GetString(bytesPath).TrimEnd(char.MinValue); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddConstVecNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public void SetPath (String APath) + public CConstMatNode AddConstMatNode (String AIdentifier, String ADisplayName, String ATag) { - byte[] bytePath = Encoding.UTF8.GetBytes(APath + char.MinValue); + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.Attachment_SetPath (Handle, bytePath)); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddConstMatNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public CPackagePart PackagePart () + public CMeshNode AddMeshNode (String AIdentifier, String ADisplayName, String ATag) { - IntPtr newPackagePart = IntPtr.Zero; + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.Attachment_PackagePart (Handle, out newPackagePart)); - return Internal.Lib3MFWrapper.PolymorphicFactory(newPackagePart); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddMeshNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public String GetRelationShipType () + public CUnsignedMeshNode AddUnsignedMeshNode (String AIdentifier, String ADisplayName, String ATag) { - UInt32 sizePath = 0; - UInt32 neededPath = 0; - CheckError(Internal.Lib3MFWrapper.Attachment_GetRelationShipType (Handle, sizePath, out neededPath, IntPtr.Zero)); - sizePath = neededPath; - byte[] bytesPath = new byte[sizePath]; - GCHandle dataPath = GCHandle.Alloc(bytesPath, GCHandleType.Pinned); + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.Attachment_GetRelationShipType (Handle, sizePath, out neededPath, dataPath.AddrOfPinnedObject())); - dataPath.Free(); - return Encoding.UTF8.GetString(bytesPath).TrimEnd(char.MinValue); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddUnsignedMeshNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public void SetRelationShipType (String APath) + public CFunctionCallNode AddFunctionCallNode (String AIdentifier, String ADisplayName, String ATag) { - byte[] bytePath = Encoding.UTF8.GetBytes(APath + char.MinValue); + byte[] byteIdentifier = Encoding.UTF8.GetBytes(AIdentifier + char.MinValue); + byte[] byteDisplayName = Encoding.UTF8.GetBytes(ADisplayName + char.MinValue); + byte[] byteTag = Encoding.UTF8.GetBytes(ATag + char.MinValue); + IntPtr newNode = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.Attachment_SetRelationShipType (Handle, bytePath)); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddFunctionCallNode (Handle, byteIdentifier, byteDisplayName, byteTag, out newNode)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newNode); } - public void WriteToFile (String AFileName) + public CNodeIterator GetNodes () { - byte[] byteFileName = Encoding.UTF8.GetBytes(AFileName + char.MinValue); + IntPtr newIterator = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.Attachment_WriteToFile (Handle, byteFileName)); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_GetNodes (Handle, out newIterator)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newIterator); } - public void ReadFromFile (String AFileName) + public void RemoveNode (CImplicitNode ANode) { - byte[] byteFileName = Encoding.UTF8.GetBytes(AFileName + char.MinValue); + IntPtr ANodeHandle = IntPtr.Zero; + if (ANode != null) + ANodeHandle = ANode.GetHandle(); - CheckError(Internal.Lib3MFWrapper.Attachment_ReadFromFile (Handle, byteFileName)); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_RemoveNode (Handle, ANodeHandle)); } - public void ReadFromCallback (IntPtr ATheReadCallback, UInt64 AStreamSize, IntPtr ATheSeekCallback, UInt64 AUserData) + public void AddLink (CImplicitPort ASource, CImplicitPort ATarget) { + IntPtr ASourceHandle = IntPtr.Zero; + if (ASource != null) + ASourceHandle = ASource.GetHandle(); + IntPtr ATargetHandle = IntPtr.Zero; + if (ATarget != null) + ATargetHandle = ATarget.GetHandle(); - CheckError(Internal.Lib3MFWrapper.Attachment_ReadFromCallback (Handle, ATheReadCallback, AStreamSize, ATheSeekCallback, AUserData)); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddLink (Handle, ASourceHandle, ATargetHandle)); } - public UInt64 GetStreamSize () + public void AddLinkByNames (String ASource, String ATarget) { - UInt64 resultStreamSize = 0; + byte[] byteSource = Encoding.UTF8.GetBytes(ASource + char.MinValue); + byte[] byteTarget = Encoding.UTF8.GetBytes(ATarget + char.MinValue); - CheckError(Internal.Lib3MFWrapper.Attachment_GetStreamSize (Handle, out resultStreamSize)); - return resultStreamSize; + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_AddLinkByNames (Handle, byteSource, byteTarget)); } - public void WriteToBuffer (out Byte[] ABuffer) + public void Clear () { - UInt64 sizeBuffer = 0; - UInt64 neededBuffer = 0; - CheckError(Internal.Lib3MFWrapper.Attachment_WriteToBuffer (Handle, sizeBuffer, out neededBuffer, IntPtr.Zero)); - sizeBuffer = neededBuffer; - ABuffer = new Byte[sizeBuffer]; - GCHandle dataBuffer = GCHandle.Alloc(ABuffer, GCHandleType.Pinned); - CheckError(Internal.Lib3MFWrapper.Attachment_WriteToBuffer (Handle, sizeBuffer, out neededBuffer, dataBuffer.AddrOfPinnedObject())); - dataBuffer.Free(); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_Clear (Handle)); } - public void ReadFromBuffer (Byte[] ABuffer) + public void SortNodesTopologically () { - GCHandle dataBuffer = GCHandle.Alloc(ABuffer, GCHandleType.Pinned); - CheckError(Internal.Lib3MFWrapper.Attachment_ReadFromBuffer (Handle, (UInt64) ABuffer.Length, dataBuffer.AddrOfPinnedObject())); - dataBuffer.Free (); + CheckError(Internal.Lib3MFWrapper.ImplicitFunction_SortNodesTopologically (Handle)); } } - public class CTexture2D : CResource + public class CFunctionFromImage3D : CFunction { - public CTexture2D (IntPtr NewHandle) : base (NewHandle) + public CFunctionFromImage3D (IntPtr NewHandle) : base (NewHandle) { } - public CAttachment GetAttachment () + public CImage3D GetImage3D () { - IntPtr newAttachment = IntPtr.Zero; + IntPtr newImage3D = IntPtr.Zero; - CheckError(Internal.Lib3MFWrapper.Texture2D_GetAttachment (Handle, out newAttachment)); - return Internal.Lib3MFWrapper.PolymorphicFactory(newAttachment); + CheckError(Internal.Lib3MFWrapper.FunctionFromImage3D_GetImage3D (Handle, out newImage3D)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newImage3D); } - public void SetAttachment (CAttachment AAttachment) + public void SetImage3D (CImage3D AImage3D) { - IntPtr AAttachmentHandle = IntPtr.Zero; - if (AAttachment != null) - AAttachmentHandle = AAttachment.GetHandle(); + IntPtr AImage3DHandle = IntPtr.Zero; + if (AImage3D != null) + AImage3DHandle = AImage3D.GetHandle(); - CheckError(Internal.Lib3MFWrapper.Texture2D_SetAttachment (Handle, AAttachmentHandle)); + CheckError(Internal.Lib3MFWrapper.FunctionFromImage3D_SetImage3D (Handle, AImage3DHandle)); } - public eTextureType GetContentType () + public void SetFilter (eTextureFilter AFilter) { - Int32 resultContentType = 0; + Int32 enumFilter = (Int32) AFilter; - CheckError(Internal.Lib3MFWrapper.Texture2D_GetContentType (Handle, out resultContentType)); - return (eTextureType) (resultContentType); + CheckError(Internal.Lib3MFWrapper.FunctionFromImage3D_SetFilter (Handle, enumFilter)); } - public void SetContentType (eTextureType AContentType) + public eTextureFilter GetFilter () { - Int32 enumContentType = (Int32) AContentType; + Int32 resultFilter = 0; - CheckError(Internal.Lib3MFWrapper.Texture2D_SetContentType (Handle, enumContentType)); + CheckError(Internal.Lib3MFWrapper.FunctionFromImage3D_GetFilter (Handle, out resultFilter)); + return (eTextureFilter) (resultFilter); } - public void GetTileStyleUV (out eTextureTileStyle ATileStyleU, out eTextureTileStyle ATileStyleV) + public void SetTileStyles (eTextureTileStyle ATileStyleU, eTextureTileStyle ATileStyleV, eTextureTileStyle ATileStyleW) + { + Int32 enumTileStyleU = (Int32) ATileStyleU; + Int32 enumTileStyleV = (Int32) ATileStyleV; + Int32 enumTileStyleW = (Int32) ATileStyleW; + + CheckError(Internal.Lib3MFWrapper.FunctionFromImage3D_SetTileStyles (Handle, enumTileStyleU, enumTileStyleV, enumTileStyleW)); + } + + public void GetTileStyles (out eTextureTileStyle ATileStyleU, out eTextureTileStyle ATileStyleV, out eTextureTileStyle ATileStyleW) { Int32 resultTileStyleU = 0; Int32 resultTileStyleV = 0; + Int32 resultTileStyleW = 0; - CheckError(Internal.Lib3MFWrapper.Texture2D_GetTileStyleUV (Handle, out resultTileStyleU, out resultTileStyleV)); + CheckError(Internal.Lib3MFWrapper.FunctionFromImage3D_GetTileStyles (Handle, out resultTileStyleU, out resultTileStyleV, out resultTileStyleW)); ATileStyleU = (eTextureTileStyle) (resultTileStyleU); ATileStyleV = (eTextureTileStyle) (resultTileStyleV); + ATileStyleW = (eTextureTileStyle) (resultTileStyleW); } - public void SetTileStyleUV (eTextureTileStyle ATileStyleU, eTextureTileStyle ATileStyleV) + public Double GetOffset () { - Int32 enumTileStyleU = (Int32) ATileStyleU; - Int32 enumTileStyleV = (Int32) ATileStyleV; + Double resultOffset = 0; - CheckError(Internal.Lib3MFWrapper.Texture2D_SetTileStyleUV (Handle, enumTileStyleU, enumTileStyleV)); + CheckError(Internal.Lib3MFWrapper.FunctionFromImage3D_GetOffset (Handle, out resultOffset)); + return resultOffset; } - public eTextureFilter GetFilter () + public void SetOffset (Double AOffset) { - Int32 resultFilter = 0; - CheckError(Internal.Lib3MFWrapper.Texture2D_GetFilter (Handle, out resultFilter)); - return (eTextureFilter) (resultFilter); + CheckError(Internal.Lib3MFWrapper.FunctionFromImage3D_SetOffset (Handle, AOffset)); } - public void SetFilter (eTextureFilter AFilter) + public Double GetScale () { - Int32 enumFilter = (Int32) AFilter; + Double resultScale = 0; - CheckError(Internal.Lib3MFWrapper.Texture2D_SetFilter (Handle, enumFilter)); + CheckError(Internal.Lib3MFWrapper.FunctionFromImage3D_GetScale (Handle, out resultScale)); + return resultScale; + } + + public void SetScale (Double AScale) + { + + CheckError(Internal.Lib3MFWrapper.FunctionFromImage3D_SetScale (Handle, AScale)); } } @@ -4829,6 +8470,14 @@ public CSliceStack GetSliceStackByID (UInt32 AUniqueResourceID) return Internal.Lib3MFWrapper.PolymorphicFactory(newSliceStacInstance); } + public CLevelSet GetLevelSetByID (UInt32 AUniqueResourceID) + { + IntPtr newLevelSetObjectInstance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Model_GetLevelSetByID (Handle, AUniqueResourceID, out newLevelSetObjectInstance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newLevelSetObjectInstance); + } + public String GetBuildUUID (out bool AHasUUID) { Byte resultHasUUID = 0; @@ -4956,6 +8605,14 @@ public CSliceStackIterator GetSliceStacks () return Internal.Lib3MFWrapper.PolymorphicFactory(newResourceIterator); } + public CImage3DIterator GetImage3Ds () + { + IntPtr newResourceIterator = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Model_GetImage3Ds (Handle, out newResourceIterator)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResourceIterator); + } + public CModel MergeToModel () { IntPtr newMergedModelInstance = IntPtr.Zero; @@ -4964,6 +8621,15 @@ public CModel MergeToModel () return Internal.Lib3MFWrapper.PolymorphicFactory(newMergedModelInstance); } + public void MergeFromModel (CModel AModelInstance) + { + IntPtr AModelInstanceHandle = IntPtr.Zero; + if (AModelInstance != null) + AModelInstanceHandle = AModelInstance.GetHandle(); + + CheckError(Internal.Lib3MFWrapper.Model_MergeFromModel (Handle, AModelInstanceHandle)); + } + public CMeshObject AddMeshObject () { IntPtr newMeshObjectInstance = IntPtr.Zero; @@ -5045,6 +8711,22 @@ public CMultiPropertyGroup AddMultiPropertyGroup () return Internal.Lib3MFWrapper.PolymorphicFactory(newMultiPropertyGroupInstance); } + public CImageStack AddImageStack (UInt32 AColumnCount, UInt32 ARowCount, UInt32 ASheetCount) + { + IntPtr newInstance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Model_AddImageStack (Handle, AColumnCount, ARowCount, ASheetCount, out newInstance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newInstance); + } + + public CImageStack GetImageStackByID (UInt32 AUniqueResourceID) + { + IntPtr newImageStackInstance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Model_GetImageStackByID (Handle, AUniqueResourceID, out newImageStackInstance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newImageStackInstance); + } + public CBuildItem AddBuildItem (CObject AObject, sTransform ATransform) { IntPtr AObjectHandle = IntPtr.Zero; @@ -5177,6 +8859,66 @@ public CKeyStore GetKeyStore () return Internal.Lib3MFWrapper.PolymorphicFactory(newKeyStore); } + public CFunctionIterator GetFunctions () + { + IntPtr newTheResourceIterator = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Model_GetFunctions (Handle, out newTheResourceIterator)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newTheResourceIterator); + } + + public CImplicitFunction AddImplicitFunction () + { + IntPtr newFunctionInstance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Model_AddImplicitFunction (Handle, out newFunctionInstance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newFunctionInstance); + } + + public CFunctionFromImage3D AddFunctionFromImage3D (CImage3D AImage3DInstance) + { + IntPtr AImage3DInstanceHandle = IntPtr.Zero; + if (AImage3DInstance != null) + AImage3DInstanceHandle = AImage3DInstance.GetHandle(); + IntPtr newFunctionInstance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Model_AddFunctionFromImage3D (Handle, AImage3DInstanceHandle, out newFunctionInstance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newFunctionInstance); + } + + public CVolumeData AddVolumeData () + { + IntPtr newVolumeDataInstance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Model_AddVolumeData (Handle, out newVolumeDataInstance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newVolumeDataInstance); + } + + public CLevelSet AddLevelSet () + { + IntPtr newLevelSetInstance = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Model_AddLevelSet (Handle, out newLevelSetInstance)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newLevelSetInstance); + } + + public CLevelSetIterator GetLevelSets () + { + IntPtr newResourceIterator = IntPtr.Zero; + + CheckError(Internal.Lib3MFWrapper.Model_GetLevelSets (Handle, out newResourceIterator)); + return Internal.Lib3MFWrapper.PolymorphicFactory(newResourceIterator); + } + + public void RemoveResource (CResource AResource) + { + IntPtr AResourceHandle = IntPtr.Zero; + if (AResource != null) + AResourceHandle = AResource.GetHandle(); + + CheckError(Internal.Lib3MFWrapper.Model_RemoveResource (Handle, AResourceHandle)); + } + } class Wrapper diff --git a/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp b/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp index 44b8273b8..f79071d19 100644 --- a/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp +++ b/Autogenerated/Bindings/Cpp/lib3mf_abi.hpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++-Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -575,6 +575,45 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerialsiterator_getcurrentcomposi */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup(Lib3MF_MultiPropertyGroupIterator pMultiPropertyGroupIterator, Lib3MF_MultiPropertyGroup * pResource); +/************************************************************************************************************************* + Class definition for Image3DIterator +**************************************************************************************************************************/ + +/** +* Returns the Image3D the iterator points at. +* +* @param[in] pImage3DIterator - Image3DIterator instance. +* @param[out] pResource - returns the Image3D instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3diterator_getcurrentimage3d(Lib3MF_Image3DIterator pImage3DIterator, Lib3MF_Image3D * pResource); + +/************************************************************************************************************************* + Class definition for FunctionIterator +**************************************************************************************************************************/ + +/** +* Returns the Function the iterator points at. +* +* @param[in] pFunctionIterator - FunctionIterator instance. +* @param[out] pResource - returns the Function instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functioniterator_getcurrentfunction(Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource); + +/************************************************************************************************************************* + Class definition for LevelSetIterator +**************************************************************************************************************************/ + +/** +* Returns the LevelSet the iterator points at. +* +* @param[in] pLevelSetIterator - LevelSetIterator instance. +* @param[out] pResource - returns the MeshObject instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelsetiterator_getcurrentlevelset(Lib3MF_LevelSetIterator pLevelSetIterator, Lib3MF_LevelSet * pResource); + /************************************************************************************************************************* Class definition for MetaData **************************************************************************************************************************/ @@ -834,6 +873,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_ismeshobject(Lib3MF_Object pObject, b */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_iscomponentsobject(Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_islevelsetobject(Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. * @@ -1166,6 +1214,174 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_ismanifoldandoriented(Lib3MF_Mesh */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_beamlattice(Lib3MF_MeshObject pMeshObject, Lib3MF_BeamLattice * pTheBeamLattice); +/** +* Retrieves the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_getvolumedata(Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_setvolumedata(Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData pTheVolumeData); + +/************************************************************************************************************************* + Class definition for LevelSet +**************************************************************************************************************************/ + +/** +* Returns the function that is used as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getfunction(Lib3MF_LevelSet pLevelSet, Lib3MF_Function * pTheFunction); + +/** +* Sets the function to use as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setfunction(Lib3MF_LevelSet pLevelSet, Lib3MF_Function pTheFunction); + +/** +* Returns the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTransform - the transformation matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_gettransform(Lib3MF_LevelSet pLevelSet, Lib3MF::sTransform * pTransform); + +/** +* Sets the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_settransform(Lib3MF_LevelSet pLevelSet, const Lib3MF::sTransform * pTransform); + +/** +* Returns the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getchannelname(Lib3MF_LevelSet pLevelSet, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); + +/** +* Sets the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pChannelName - new name of the function output channel +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setchannelname(Lib3MF_LevelSet pLevelSet, const char * pChannelName); + +/** +* Sets the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setminfeaturesize(Lib3MF_LevelSet pLevelSet, Lib3MF_double dMinFeatureSize); + +/** +* Returns the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getminfeaturesize(Lib3MF_LevelSet pLevelSet, Lib3MF_double * pMinFeatureSize); + +/** +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dFallBackValue - fallback value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setfallbackvalue(Lib3MF_LevelSet pLevelSet, Lib3MF_double dFallBackValue); + +/** +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pFallBackValue - fallback value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getfallbackvalue(Lib3MF_LevelSet pLevelSet, Lib3MF_double * pFallBackValue); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setmeshbboxonly(Lib3MF_LevelSet pLevelSet, bool bMeshBBoxOnly); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getmeshbboxonly(Lib3MF_LevelSet pLevelSet, bool * pMeshBBoxOnly); + +/** +* Sets the mesh to use as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setmesh(Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject pTheMesh); + +/** +* Returns the mesh that is used as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getmesh(Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); + +/** +* Retrieves the VolumeData this Object. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheVolumeData - the VolumeData of this Object +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this LevelSet. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData pTheVolumeData); + /************************************************************************************************************************* Class definition for BeamLattice **************************************************************************************************************************/ @@ -1396,784 +1612,3179 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_addbeamset(Lib3MF_BeamLattice pB LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet); /************************************************************************************************************************* - Class definition for Component + Class definition for FunctionReference **************************************************************************************************************************/ /** -* Returns the Resource Instance of the component. +* Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. * -* @param[in] pComponent - Component instance. -* @param[out] pObjectResource - filled with the Resource Instance. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresource(Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getfunctionresourceid(Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 * pUniqueResourceID); /** -* Returns the UniqueResourceID of the component. +* Sets the UniqueResourceID to refer to. * -* @param[in] pComponent - Component instance. -* @param[out] pUniqueResourceID - returns the UniqueResourceID. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nUniqueResourceID - UniqueResourceID of the function * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresourceid(Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setfunctionresourceid(Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 nUniqueResourceID); /** -* returns, whether a component has a UUID and, if true, the component's UUID +* Returns the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[out] pHasUUID - flag whether the component has a UUID -* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) -* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pTransform - the transformation matrix * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getuuid(Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_gettransform(Lib3MF_FunctionReference pFunctionReference, Lib3MF::sTransform * pTransform); /** -* sets the component's UUID +* Sets the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pTransform - new transformation matrix * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_setuuid(Lib3MF_Component pComponent, const char * pUUID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_settransform(Lib3MF_FunctionReference pFunctionReference, const Lib3MF::sTransform * pTransform); /** -* Returns, if the component has a different transformation than the identity matrix +* Returns the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_hastransform(Lib3MF_Component pComponent, bool * pHasTransform); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getchannelname(Lib3MF_FunctionReference pFunctionReference, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); /** -* Returns the transformation matrix of the component. +* Sets the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pTransform - filled with the component transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pChannelName - new name of the function output channel * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_gettransform(Lib3MF_Component pComponent, Lib3MF::sTransform * pTransform); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setchannelname(Lib3MF_FunctionReference pFunctionReference, const char * pChannelName); /** -* Sets the transformation matrix of the component. +* Sets the minimal feature size as a hint for the function evaluator * -* @param[in] pComponent - Component instance. -* @param[in] pTransform - new transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_settransform(Lib3MF_Component pComponent, const Lib3MF::sTransform * pTransform); - -/************************************************************************************************************************* - Class definition for ComponentsObject -**************************************************************************************************************************/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setminfeaturesize(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dMinFeatureSize); /** -* Adds a new component to a components object. +* Returns the minimal feature size as a hint for the function evaluator * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] pObjectResource - object to add as component. Must not lead to circular references! -* @param[in] pTransform - optional transform matrix for the component. -* @param[out] pComponentInstance - new component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_addcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const Lib3MF::sTransform * pTransform, Lib3MF_Component * pComponentInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getminfeaturesize(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pMinFeatureSize); /** -* Retrieves a component from a component object. +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) -* @param[out] pComponentInstance - component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dFallBackValue - fallback value * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setfallbackvalue(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dFallBackValue); /** -* Retrieves a component count of a component object. +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[out] pCount - returns the component count +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pFallBackValue - fallback value * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponentcount(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getfallbackvalue(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pFallBackValue); /************************************************************************************************************************* - Class definition for BeamSet + Class definition for VolumeDataColor **************************************************************************************************************************/ -/** -* Sets a beamset's name string -* -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pName - new name of the beamset. -* @return error code or 0 (success) -*/ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setname(Lib3MF_BeamSet pBeamSet, const char * pName); +/************************************************************************************************************************* + Class definition for MaterialMapping +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for VolumeDataComposite +**************************************************************************************************************************/ /** -* Retrieves a beamset's name string +* Returns the BaseMaterialGroup used within this volume data item * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pBaseMaterialGroupInstance - The BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getname(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getbasematerialgroup(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); /** -* Sets a beamset's identifier string +* Sets the BaseMaterialGroup to use within this volume data item. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pIdentifier - new name of the beamset. +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setidentifier(Lib3MF_BeamSet pBeamSet, const char * pIdentifier); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_setbasematerialgroup(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance); /** -* Retrieves a beamset's identifier string +* Returns the number of material mappings of this VolumeDataComposite element * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) -* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pCount - the number of material mappings. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getidentifier(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmappingcount(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Retrieves the reference count of a beamset +* Returns MaterialMappting with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the reference count +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - Index of the MaterialMapping in question. +* @param[out] pTheMaterialMapping - MaterialMapping used in this element * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Sets the references of a beamset +* Adds a the MaterialMapping * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pTransform - new transformation matrix +* @param[out] pTheMaterialMapping - The new MaterialMapping * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_addmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, const Lib3MF::sTransform * pTransform, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Retrieves the references of a beamset +* Removes the MaterialMapping with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - The index of the MaterialMapping to be removed. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_removematerialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex); + +/************************************************************************************************************************* + Class definition for VolumeDataProperty +**************************************************************************************************************************/ /** -* Retrieves the ball reference count of a beamset +* Gets the qualified name of this property. * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the ball reference count +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] nPropertyNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pPropertyNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPropertyNameBuffer - buffer of The qualified name of this property., may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_getname(Lib3MF_VolumeDataProperty pVolumeDataProperty, const Lib3MF_uint32 nPropertyNameBufferSize, Lib3MF_uint32* pPropertyNameNeededChars, char * pPropertyNameBuffer); /** -* Sets the ball references of a beamset +* Sets whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setballreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_setisrequired(Lib3MF_VolumeDataProperty pVolumeDataProperty, bool bIsRequired); /** -* Retrieves the ball references of a beamset +* Returns whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[out] pIsRequired - Is this property required to process this 3MF document instance? * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_isrequired(Lib3MF_VolumeDataProperty pVolumeDataProperty, bool * pIsRequired); /************************************************************************************************************************* - Class definition for BaseMaterialGroup + Class definition for VolumeData **************************************************************************************************************************/ /** -* Retrieves the count of base materials in the material group. +* Returns the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[out] pCount - returns the count of base materials. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - filled with the VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getcount(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getcomposite(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* returns all the PropertyIDs of all materials in this group +* Creates a new VolumeDataComposite for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - The new VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getallpropertyids(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_createnewcomposite(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* Adds a new material to the material group +* Removes the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] pName - new name of the base material. -* @param[in] pDisplayColor - Display color of the material -* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_addmaterial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const Lib3MF::sColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removecomposite(Lib3MF_VolumeData pVolumeData); /** -* Removes a material from the material group. +* Returns the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheColorData - filled with the VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_removematerial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getcolor(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataColor * pTheColorData); /** -* Returns the base material's name +* Creates a new VolumeDataColor for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheColorData - The new VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_createnewcolor(Lib3MF_VolumeData pVolumeData, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataColor * pTheColorData); /** -* Sets a base material's name +* Removes the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pName - new name of the base material. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removecolor(Lib3MF_VolumeData pVolumeData); /** -* Sets a base material's display color. +* Returns the number of VolumeDataProperty * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getpropertycount(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); /** -* Returns a base material's display color. +* Returns the VolumeDataProperty at a given Index * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[out] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be returned. +* @param[out] pTheVolumeDataProperty - the VolumeDataProperty at the given index. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getproperty(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Adds a new VolumeDataProperty from a Function +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pName - the qualified name (namespace+name) of the Property +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheVolumeDataProperty - the newly created VolumeDataProperty. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_addpropertyfromfunction(Lib3MF_VolumeData pVolumeData, const char * pName, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Removes the VolumeDataProperty with a given index +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be removed. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removeproperty(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex); /************************************************************************************************************************* - Class definition for ColorGroup + Class definition for Component **************************************************************************************************************************/ /** -* Retrieves the count of base materials in this Color Group. +* Returns the Resource Instance of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[out] pCount - returns the count of colors within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pObjectResource - filled with the Resource Instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcount(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresource(Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); /** -* returns all the PropertyIDs of all colors within this group +* Returns the UniqueResourceID of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @param[in] pComponent - Component instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getallpropertyids(Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresourceid(Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); /** -* Adds a new value. +* returns, whether a component has a UUID and, if true, the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] pTheColor - The new color -* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pHasUUID - flag whether the component has a UUID +* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) +* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_addcolor(Lib3MF_ColorGroup pColorGroup, const Lib3MF::sColor * pTheColor, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getuuid(Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); /** -* Removes a color from the color group. +* sets the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @param[in] pComponent - Component instance. +* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_removecolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_setuuid(Lib3MF_Component pComponent, const char * pUUID); /** -* Sets a color value. +* Returns, if the component has a different transformation than the identity matrix * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[in] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_setcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_hastransform(Lib3MF_Component pComponent, bool * pHasTransform); /** -* Sets a color value. +* Returns the transformation matrix of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[out] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pTransform - filled with the component transformation matrix * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_gettransform(Lib3MF_Component pComponent, Lib3MF::sTransform * pTransform); + +/** +* Sets the transformation matrix of the component. +* +* @param[in] pComponent - Component instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_settransform(Lib3MF_Component pComponent, const Lib3MF::sTransform * pTransform); /************************************************************************************************************************* - Class definition for Texture2DGroup + Class definition for ComponentsObject **************************************************************************************************************************/ /** -* Retrieves the count of tex2coords in the Texture2DGroup. +* Adds a new component to a components object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pCount - returns the count of tex2coords. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] pObjectResource - object to add as component. Must not lead to circular references! +* @param[in] pTransform - optional transform matrix for the component. +* @param[out] pComponentInstance - new component instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getcount(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_addcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const Lib3MF::sTransform * pTransform, Lib3MF_Component * pComponentInstance); /** -* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* Retrieves a component from a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) +* @param[out] pComponentInstance - component instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getallpropertyids(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); /** -* Adds a new tex2coord to the Texture2DGroup +* Retrieves a component count of a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. -* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[out] pCount - returns the component count * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_addtex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF::sTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponentcount(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); + +/************************************************************************************************************************* + Class definition for BeamSet +**************************************************************************************************************************/ /** -* Obtains a tex2coord to the Texture2DGroup +* Sets a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. -* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pName - new name of the beamset. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sTex2Coord * pUVCoordinate); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setname(Lib3MF_BeamSet pBeamSet, const char * pName); /** -* Removes a tex2coords from the Texture2DGroup. +* Retrieves a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_removetex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getname(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); /** -* Obtains the texture2D instance of this group. +* Sets a beamset's identifier string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pIdentifier - new name of the beamset. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettexture2d(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setidentifier(Lib3MF_BeamSet pBeamSet, const char * pIdentifier); + +/** +* Retrieves a beamset's identifier string +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getidentifier(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Retrieves the reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the reference count +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the ball reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the ball reference count +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setballreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); + +/** +* Retrieves the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); /************************************************************************************************************************* - Class definition for CompositeMaterials + Class definition for BaseMaterialGroup **************************************************************************************************************************/ /** -* Retrieves the count of Composite-s in the CompositeMaterials. +* Retrieves the count of base materials in the material group. * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pCount - returns the count of Composite-s +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[out] pCount - returns the count of base materials. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcount(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getcount(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); /** -* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* returns all the PropertyIDs of all materials in this group * -* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getallpropertyids(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new material to the material group +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] pName - new name of the base material. +* @param[in] pDisplayColor - Display color of the material +* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_addmaterial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const Lib3MF::sColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a material from the material group. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_removematerial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); + +/** +* Returns the base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* Sets a base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pName - new name of the base material. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); + +/** +* Sets a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); + +/** +* Returns a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[out] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); + +/************************************************************************************************************************* + Class definition for ColorGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of base materials in this Color Group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[out] pCount - returns the count of colors within this color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcount(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all colors within this group +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getallpropertyids(Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] pTheColor - The new color +* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_addcolor(Lib3MF_ColorGroup pColorGroup, const Lib3MF::sColor * pTheColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a color from the color group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_removecolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[in] pTheColor - The color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_setcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[out] pTheColor - The color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); + +/************************************************************************************************************************* + Class definition for Texture2DGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of tex2coords in the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pCount - returns the count of tex2coords. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getcount(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getallpropertyids(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_addtex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF::sTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); + +/** +* Obtains a tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. +* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sTex2Coord * pUVCoordinate); + +/** +* Removes a tex2coords from the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_removetex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); + +/** +* Obtains the texture2D instance of this group. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettexture2d(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); + +/************************************************************************************************************************* + Class definition for CompositeMaterials +**************************************************************************************************************************/ + +/** +* Retrieves the count of Composite-s in the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pCount - returns the count of Composite-s +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcount(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. * @param[in] nPropertyIDsBufferSize - Number of elements in buffer * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. * @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the Composite-Mixing Values in the CompositeMaterials. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getallpropertyids(Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getallpropertyids(Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getbasematerialgroup(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); + +/** +* Adds a new Composite-Mixing Values to the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite +* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_addcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const Lib3MF::sCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_removecomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); + +/** +* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, Lib3MF::sCompositeConstituent * pCompositeBuffer); + +/************************************************************************************************************************* + Class definition for MultiPropertyGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the count of MultiProperty-s +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getcount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getallpropertyids(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new MultiProperty to the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. +* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Sets the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_setmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Removes a MultiProperty from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removemultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); + +/** +* Retrieves the number of layers of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the number of layers +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayercount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup +* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF::sMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); + +/** +* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried +* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, Lib3MF::sMultiPropertyLayer * pTheLayer); + +/** +* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removelayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); + +/************************************************************************************************************************* + Class definition for Image3D +**************************************************************************************************************************/ + +/** +* returns the name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of the name of this Image3D, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_getname(Lib3MF_Image3D pImage3D, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* sets a new name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] pName - the new name of this Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_setname(Lib3MF_Image3D pImage3D, const char * pName); + +/** +* Retrieves, if this Image3D is a ImageStack +* +* @param[in] pImage3D - Image3D instance. +* @param[out] pIsImageStack - returns, whether the Image3D is an ImageStack +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_isimagestack(Lib3MF_Image3D pImage3D, bool * pIsImageStack); + +/************************************************************************************************************************* + Class definition for ImageStack +**************************************************************************************************************************/ + +/** +* Retrieves the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pRowCount - number of rows +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getrowcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pRowCount); + +/** +* Sets the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nRowCount - number of rows +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setrowcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nRowCount); + +/** +* Retrieves the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pColumnCount - number of columns +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getcolumncount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pColumnCount); + +/** +* Sets the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nColumnCount - number of columns +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setcolumncount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nColumnCount); + +/** +* Retrieves the number of images in the stack. +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pSheetCount - number of images +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getsheetcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pSheetCount); + +/** +* Retrieves a sheet of the stack. Raises an error if sheet is not set. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getsheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pSheet); + +/** +* Sets a sheet to an existing attachment. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setsheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment pSheet); + +/** +* Creates a new sheet attachment with empty data. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createemptysheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a memory buffer. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] nDataBufferSize - Number of elements in buffer +* @param[in] pDataBuffer - uint8 buffer of binary image data +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createsheetfrombuffer(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a file on disk. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] pFileName - file name to read from +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createsheetfromfile(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, const char * pFileName, Lib3MF_Attachment * pSheet); + +/************************************************************************************************************************* + Class definition for Attachment +**************************************************************************************************************************/ + +/** +* Retrieves an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getpath(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new path of the attachment. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setpath(Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Returns the PackagePart that is this attachment. +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pPackagePart - The PackagePart of this attachment. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_packagepart(Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); + +/** +* Retrieves an attachment's relationship type +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getrelationshiptype(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's relationship type. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new relationship type string. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Writes out the attachment as file. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to write into. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to read from. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pTheReadCallback - Callback to call for reading a data chunk +* @param[in] nStreamSize - number of bytes the callback returns +* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. +* @param[in] pUserData - Userdata that is passed to the callback function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromcallback(Lib3MF_Attachment pAttachment, Lib3MF::ReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MF::SeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); + +/** +* Retrieves the size of the attachment stream +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pStreamSize - the stream size +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); + +/** +* Writes out the attachment into a buffer +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); + +/** +* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfrombuffer(Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); + +/************************************************************************************************************************* + Class definition for Texture2D +**************************************************************************************************************************/ + +/** +* Retrieves the attachment located at the path of the texture. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); + +/** +* Sets the texture's package path to the path of the attachment. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pContentType - returns content type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getcontenttype(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType * pContentType); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eContentType - new Content Type +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setcontenttype(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType eContentType); + +/** +* Retrieves a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pTileStyleU - returns tilestyle type enum. +* @param[out] pTileStyleV - returns tilestyle type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_gettilestyleuv(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle * pTileStyleU, Lib3MF::eTextureTileStyle * pTileStyleV); + +/** +* Sets a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eTileStyleU - new tilestyle type enum. +* @param[in] eTileStyleV - new tilestyle type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_settilestyleuv(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle eTileStyleU, Lib3MF::eTextureTileStyle eTileStyleV); + +/** +* Retrieves a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pFilter - returns filter type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getfilter(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter * pFilter); + +/** +* Sets a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eFilter - sets new filter type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setfilter(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter eFilter); + +/************************************************************************************************************************* + Class definition for ImplicitPort +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_getidentifier(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_setidentifier(Lib3MF_ImplicitPort pImplicitPort, const char * pIdentifier); + +/** +* Retrieves the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_getdisplayname(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_setdisplayname(Lib3MF_ImplicitPort pImplicitPort, const char * pDisplayName); + +/** +* Sets the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] eImplicitPortType - the type +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_settype(Lib3MF_ImplicitPort pImplicitPort, Lib3MF::eImplicitPortType eImplicitPortType); + +/** +* Retrieves the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[out] pImplicitPortType - the type +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_gettype(Lib3MF_ImplicitPort pImplicitPort, Lib3MF::eImplicitPortType * pImplicitPortType); + +/** +* Retrieves the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nReferenceBufferSize - size of the buffer (including trailing 0) +* @param[out] pReferenceNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pReferenceBuffer - buffer of the reference, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_getreference(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nReferenceBufferSize, Lib3MF_uint32* pReferenceNeededChars, char * pReferenceBuffer); + +/** +* Sets the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pReference - the reference +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_setreference(Lib3MF_ImplicitPort pImplicitPort, const char * pReference); + +/************************************************************************************************************************* + Class definition for Iterator +**************************************************************************************************************************/ + +/** +* Iterates to the next item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasNext - Iterates to the next item in the list. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_iterator_movenext(Lib3MF_Iterator pIterator, bool * pHasNext); + +/** +* Iterates to the previous item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasPrevious - Iterates to the previous item in the list. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_iterator_moveprevious(Lib3MF_Iterator pIterator, bool * pHasPrevious); + +/** +* Returns the number of items the iterator captures. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pCount - returns the number of items the iterator captures. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_iterator_count(Lib3MF_Iterator pIterator, Lib3MF_uint64 * pCount); + +/************************************************************************************************************************* + Class definition for ImplicitPortIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pImplicitPortIterator - ImplicitPortIterator instance. +* @param[out] pPort - The current element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitportiterator_getcurrent(Lib3MF_ImplicitPortIterator pImplicitPortIterator, Lib3MF_ImplicitPort * pPort); + +/************************************************************************************************************************* + Class definition for ImplicitNode +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getidentifier(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_setidentifier(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier); + +/** +* Retrieves the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getdisplayname(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_setdisplayname(Lib3MF_ImplicitNode pImplicitNode, const char * pDisplayName); + +/** +* Retrieves the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nTagBufferSize - size of the buffer (including trailing 0) +* @param[out] pTagNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pTagBuffer - buffer of the tag, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_gettag(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nTagBufferSize, Lib3MF_uint32* pTagNeededChars, char * pTagBuffer); + +/** +* Sets the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pTag - the tag +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_settag(Lib3MF_ImplicitNode pImplicitNode, const char * pTag); + +/** +* Retrieves the type of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pType - the type of the node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getnodetype(Lib3MF_ImplicitNode pImplicitNode, Lib3MF::eImplicitNodeType * pType); + +/** +* Add an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[out] pPort - +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_addinput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator for the inputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getinputs(Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Add an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[out] pPort - +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_addoutput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator the outputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getoutputs(Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Retrieves an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_findinput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_findoutput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/** +* Checks if the types of the input and output ports are valid for the node type +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pValid - true, if the types are valid +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_aretypesvalid(Lib3MF_ImplicitNode pImplicitNode, bool * pValid); + +/************************************************************************************************************************* + Class definition for OneInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pInput - the input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_oneinputnode_getinputa(Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves the output +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_oneinputnode_getoutputresult(Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for SinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcSinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcCosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SinhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CoshNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for RoundNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CeilNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FloorNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SignNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FractNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for AbsNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ExpNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LogNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log10Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LengthNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TransposeNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for InverseNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SqrtNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ResourceIdNode +**************************************************************************************************************************/ + +/** +* Sets the Resource that the resourceid attribute of the node will point to +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[in] pResource - the resource +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_resourceidnode_setresource(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource pResource); + +/** +* Retrieves the resource of the node +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pResource - the resource +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_resourceidnode_getresource(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource * pResource); + +/** +* Retrieves the output +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_resourceidnode_getoutputvalue(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for TwoInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pTwoInputNode - TwoInputNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_twoinputnode_getinputb(Lib3MF_TwoInputNode pTwoInputNode, Lib3MF_ImplicitPort * pB); + +/************************************************************************************************************************* + Class definition for AdditionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SubtractionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DivisionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DotNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CrossNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTan2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MatVecMultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MaxNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FmodNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ModNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for PowNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SelectNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_selectnode_getinputb(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pB); + +/** +* Retrieves the third input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pC - the third input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_selectnode_getinputc(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pC); + +/** +* Retrieves the fourth input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pD - the fourth input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_selectnode_getinputd(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pD); + +/************************************************************************************************************************* + Class definition for ClampNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the lower limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMin - the input for the lower limit +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_clampnode_getinputmin(Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMin); + +/** +* Retrieves the input for the upper limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMax - the input for the upper limit +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_clampnode_getinputmax(Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMax); + +/************************************************************************************************************************* + Class definition for ComposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the x component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pX - the input for the x component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getinputx(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the input for the y component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pY - the input for the y component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getinputy(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the input for the z component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pZ - the input for the z component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getinputz(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/** +* Retrieves the output +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getoutputresult(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for VectorFromScalarNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DecomposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pA - the input port for the vector to decompose +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getinputa(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pA); + +/** +* Retrieves the output for the x component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pX - the output for the x component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getoutputx(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the output for the y component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pY - the output for the y component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getoutputy(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the output for the z component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pZ - the output for the z component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getoutputz(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/************************************************************************************************************************* + Class definition for ComposeMatrixNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the element 0 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM00 - the input for the m00 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm00(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM00); + +/** +* Retrieves the input for the element 0 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM01 - the input for the m01 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm01(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM01); + +/** +* Retrieves the input for the element 0 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM02 - the input for the m02 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm02(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM02); + +/** +* Retrieves the input for the element 0 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM03 - the input for the m03 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm03(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM03); + +/** +* Retrieves the input for the element 1 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM10 - the input for the m10 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm10(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM10); + +/** +* Retrieves the input for the element 1 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM11 - the input for the m11 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm11(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM11); + +/** +* Retrieves the input for the element 1 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM12 - the input for the m12 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm12(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM12); + +/** +* Retrieves the input for the element 1 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM13 - the input for the m3 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm13(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM13); + +/** +* Retrieves the input for the element 2 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM20 - the input for the m2 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm20(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM20); + +/** +* Retrieves the input for the element 2 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM21 - +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm21(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM21); + +/** +* Retrieves the input for the element 2 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM22 - the input for the m22 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm22(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM22); + +/** +* Retrieves the input for the element 2 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM23 - the input for the m23 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm23(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM23); + +/** +* Retrieves the input for the element 3 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM30 - the input for the m30 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm30(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM30); + +/** +* Retrieves the input for the element 3 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM31 - the input for the m31 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm31(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM31); + +/** +* Retrieves the input for the element 3 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM32 - the input for the m32 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm32(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM32); + +/** +* Retrieves the input for the element 3 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM33 - the input for the m33 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm33(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM33); + +/** +* Retrieves the output +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getoutputresult(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromRowsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow0 - the input for the first row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputa(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow0); + +/** +* Retrieves the input for the second row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow1 - the input for the second row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputb(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow1); + +/** +* Retrieves the input for the third row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow2 - the input for the third row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputc(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow2); + +/** +* Retrieves the input for the fourth row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow3 - the input for the fourth row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputd(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getoutputresult(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromColumnsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn0 - the input for the first column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputa(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn0); + +/** +* Retrieves the input for the second column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn1 - the input for the second column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputb(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn1); + +/** +* Retrieves the input for the third column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn2 - the input for the third column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputc(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn2); + +/** +* Retrieves the input for the fourth column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn3 - the input for the fourth column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputd(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getoutputresult(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for ConstantNode +**************************************************************************************************************************/ + +/** +* Sets the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[in] dValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constantnode_setconstant(Lib3MF_ConstantNode pConstantNode, Lib3MF_double dValue); + +/** +* Retrieves the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constantnode_getconstant(Lib3MF_ConstantNode pConstantNode, Lib3MF_double * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constantnode_getoutputvalue(Lib3MF_ConstantNode pConstantNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for ConstVecNode +**************************************************************************************************************************/ + +/** +* Sets the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constvecnode_setvector(Lib3MF_ConstVecNode pConstVecNode, const Lib3MF::sVector * pValue); + +/** +* Retrieves the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constvecnode_getvector(Lib3MF_ConstVecNode pConstVecNode, Lib3MF::sVector * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pVector - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constvecnode_getoutputvector(Lib3MF_ConstVecNode pConstVecNode, Lib3MF_ImplicitPort * pVector); + +/************************************************************************************************************************* + Class definition for ConstMatNode +**************************************************************************************************************************/ + +/** +* Sets the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constmatnode_setmatrix(Lib3MF_ConstMatNode pConstMatNode, const Lib3MF::sMatrix4x4 * pValue); + +/** +* Retrieves the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pValue - the matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constmatnode_getmatrix(Lib3MF_ConstMatNode pConstMatNode, Lib3MF::sMatrix4x4 * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pMatrix - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constmatnode_getoutputmatrix(Lib3MF_ConstMatNode pConstMatNode, Lib3MF_ImplicitPort * pMatrix); + +/************************************************************************************************************************* + Class definition for MeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshnode_getinputmesh(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshnode_getinputpos(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pDistance - the output port for the signed distance to the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshnode_getoutputdistance(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for UnsignedMeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getinputmesh(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getinputpos(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pDistance - the output port for the unsigned distance to the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getoutputdistance(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for FunctionCallNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionCallNode - FunctionCallNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functioncallnode_getinputfunctionid(Lib3MF_FunctionCallNode pFunctionCallNode, Lib3MF_ImplicitPort * pFunction); + +/************************************************************************************************************************* + Class definition for NodeIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pNodeIterator - NodeIterator instance. +* @param[out] pNode - The current element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_nodeiterator_getcurrent(Lib3MF_NodeIterator pNodeIterator, Lib3MF_ImplicitNode * pNode); + +/************************************************************************************************************************* + Class definition for Function +**************************************************************************************************************************/ + +/** +* Retrieves the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_getdisplayname(Lib3MF_Function pFunction, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_setdisplayname(Lib3MF_Function pFunction, const char * pDisplayName); + +/** +* Add an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_addinput(Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, Lib3MF::eImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the list of inputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_getinputs(Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an input +* +* @param[in] pFunction - Function instance. +* @param[in] pInput - The input to be removed +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_removeinput(Lib3MF_Function pFunction, Lib3MF_ImplicitPort pInput); + +/** +* Add an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_addoutput(Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, Lib3MF::eImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the outputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_getoutputs(Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an output +* +* @param[in] pFunction - Function instance. +* @param[in] pOutput - The output to be removed +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_removeoutput(Lib3MF_Function pFunction, Lib3MF_ImplicitPort pOutput); + +/** +* Retrieves an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_findinput(Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_findoutput(Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/************************************************************************************************************************* + Class definition for ImplicitFunction +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_getidentifier(Lib3MF_ImplicitFunction pImplicitFunction, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_setidentifier(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier); + +/** +* Add a node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] eNodeType - the type of the node +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addnode(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF::eImplicitNodeType eNodeType, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ImplicitNode * pNode); + +/** +* Add a SinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsinnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinNode * pNode); + +/** +* Add a CosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcosnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CosNode * pNode); + +/** +* Add a TanNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addtannode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanNode * pNode); + +/** +* Add a ArcSinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addarcsinnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcSinNode * pNode); + +/** +* Add a ArcCosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addarccosnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcCosNode * pNode); + +/** +* Add a ArcTan2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addarctan2node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcTan2Node * pNode); + +/** +* Add a SinhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsinhnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinhNode * pNode); + +/** +* Add a CoshNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcoshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CoshNode * pNode); + +/** +* Add a TanhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addtanhnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanhNode * pNode); + +/** +* Add a RoundNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addroundnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_RoundNode * pNode); + +/** +* Add a CeilNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addceilnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CeilNode * pNode); + +/** +* Add a FloorNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfloornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FloorNode * pNode); + +/** +* Add a SignNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsignnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SignNode * pNode); + +/** +* Add a FractNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfractnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FractNode * pNode); + +/** +* Add a AbsNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addabsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AbsNode * pNode); + +/** +* Add a ExpNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addexpnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ExpNode * pNode); + +/** +* Add a LogNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlognode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_LogNode * pNode); + +/** +* Add a Log2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlog2node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log2Node * pNode); + +/** +* Add a Log10Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlog10node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log10Node * pNode); + +/** +* Add a LengthNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlengthnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_LengthNode * pNode); + +/** +* Add a TransposeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addtransposenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TransposeNode * pNode); + +/** +* Add a InverseNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_inversenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_InverseNode * pNode); + +/** +* Add a SqrtNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsqrtnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SqrtNode * pNode); + +/** +* Add a ResourceIdNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addresourceidnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ResourceIdNode * pNode); + +/** +* Add an AdditionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addadditionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AdditionNode * pNode); + +/** +* Add a SubtractionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsubtractionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SubtractionNode * pNode); + +/** +* Add a MultiplicationNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmultiplicationnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MultiplicationNode * pNode); + +/** +* Add a DivisionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_adddivisionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_DivisionNode * pNode); + +/** +* Add a DotNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_adddotnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DotNode * pNode); + +/** +* Add a CrossNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcrossnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_CrossNode * pNode); /** -* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* Add a MatVecMultiplicationNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getbasematerialgroup(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmatvecmultiplicationnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatVecMultiplicationNode * pNode); /** -* Adds a new Composite-Mixing Values to the CompositeMaterials. +* Add a MinNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite -* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_addcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const Lib3MF::sCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addminnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MinNode * pNode); /** -* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* Add a MaxNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_removecomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmaxnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MaxNode * pNode); /** -* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* Add a FmodNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, Lib3MF::sCompositeConstituent * pCompositeBuffer); - -/************************************************************************************************************************* - Class definition for MultiPropertyGroup -**************************************************************************************************************************/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfmodnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FmodNode * pNode); /** -* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* Add a PowNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the count of MultiProperty-s +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getcount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addpownode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_PowNode * pNode); /** -* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* Add a SelectNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getallpropertyids(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addselectnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SelectNode * pNode); /** -* Adds a new MultiProperty to the MultiPropertyGroup. +* Add a ClampNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. -* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addclampnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ClampNode * pNode); /** -* Sets the PropertyIDs of a MultiProperty. +* Add a ComposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_setmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcomposevectornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeVectorNode * pNode); /** -* Obtains the PropertyIDs of a MultiProperty. +* Add a VectorFromScalar * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addvectorfromscalarnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_VectorFromScalarNode * pNode); /** -* Removes a MultiProperty from this MultiPropertyGroup. +* Add a DecomposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removemultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_adddecomposevectornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DecomposeVectorNode * pNode); /** -* Retrieves the number of layers of this MultiPropertyGroup. +* Add a ComposeMatrixNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the number of layers +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayercount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcomposematrixnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeMatrixNode * pNode); /** -* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* Add a MatrixFromRowsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup -* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF::sMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmatrixfromrowsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromRowsNode * pNode); /** -* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* Add a MatrixFromColumnsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried -* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, Lib3MF::sMultiPropertyLayer * pTheLayer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmatrixfromcolumnsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromColumnsNode * pNode); /** -* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* Add a ConstantNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removelayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); - -/************************************************************************************************************************* - Class definition for Attachment -**************************************************************************************************************************/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addconstantnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstantNode * pNode); /** -* Retrieves an attachment's package path. This function will be removed in a later release. +* Add a ConstVecNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getpath(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addconstvecnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstVecNode * pNode); /** -* Sets an attachment's package path. This function will be removed in a later release. +* Add a ConstMatNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new path of the attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setpath(Lib3MF_Attachment pAttachment, const char * pPath); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addconstmatnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstMatNode * pNode); /** -* Returns the PackagePart that is this attachment. +* Add a MeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[out] pPackagePart - The PackagePart of this attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_packagepart(Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmeshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MeshNode * pNode); /** -* Retrieves an attachment's relationship type +* Add a UnsignedMeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getrelationshiptype(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addunsignedmeshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); /** -* Sets an attachment's relationship type. +* Add a FunctionCallNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new relationship type string. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attachment pAttachment, const char * pPath); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfunctioncallnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode); /** -* Writes out the attachment as file. +* Retrieves the nodes * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to write into. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[out] pIterator - iterator for the list of nodes * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_getnodes(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_NodeIterator * pIterator); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Removes a node * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to read from. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pNode - The node to be removed * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_removenode(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitNode pNode); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[in] pTheReadCallback - Callback to call for reading a data chunk -* @param[in] nStreamSize - number of bytes the callback returns -* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. -* @param[in] pUserData - Userdata that is passed to the callback function +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - the source port +* @param[in] pTarget - the target port * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromcallback(Lib3MF_Attachment pAttachment, Lib3MF::ReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MF::SeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlink(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitPort pSource, Lib3MF_ImplicitPort pTarget); /** -* Retrieves the size of the attachment stream +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[out] pStreamSize - the stream size +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - name of the source port in the format nodename.portname +* @param[in] pTarget - name of the target port in the format nodename.portname * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlinkbynames(Lib3MF_ImplicitFunction pImplicitFunction, const char * pSource, const char * pTarget); /** -* Writes out the attachment into a buffer +* Clears the function * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_clear(Lib3MF_ImplicitFunction pImplicitFunction); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Sorts the nodes topologically * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfrombuffer(Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_sortnodestopologically(Lib3MF_ImplicitFunction pImplicitFunction); /************************************************************************************************************************* - Class definition for Texture2D + Class definition for FunctionFromImage3D **************************************************************************************************************************/ /** -* Retrieves the attachment located at the path of the texture. +* Returns the selected 3D image. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pImage3D - image instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getimage3d(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D * pImage3D); /** -* Sets the texture's package path to the path of the attachment. +* Sets the 3D image of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] pImage3D - image instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setimage3d(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D pImage3D); /** -* Retrieves a texture's content type. +* Sets the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pContentType - returns content type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eFilter - texture filter * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getcontenttype(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType * pContentType); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setfilter(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureFilter eFilter); /** -* Retrieves a texture's content type. +* Returns the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eContentType - new Content Type +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pFilter - texture filter * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setcontenttype(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType eContentType); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getfilter(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureFilter * pFilter); /** -* Retrieves a texture's tilestyle type. +* Sets the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pTileStyleU - returns tilestyle type enum. -* @param[out] pTileStyleV - returns tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eTileStyleU - tile style in U +* @param[in] eTileStyleV - tile style in V +* @param[in] eTileStyleW - tile style in W * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_gettilestyleuv(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle * pTileStyleU, Lib3MF::eTextureTileStyle * pTileStyleV); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_settilestyles(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureTileStyle eTileStyleU, Lib3MF::eTextureTileStyle eTileStyleV, Lib3MF::eTextureTileStyle eTileStyleW); /** -* Sets a texture's tilestyle type. +* Retrieves the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eTileStyleU - new tilestyle type enum. -* @param[in] eTileStyleV - new tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pTileStyleU - tile style in U +* @param[out] pTileStyleV - tile style in V +* @param[out] pTileStyleW - tile style in W * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_settilestyleuv(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle eTileStyleU, Lib3MF::eTextureTileStyle eTileStyleV); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_gettilestyles(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureTileStyle * pTileStyleU, Lib3MF::eTextureTileStyle * pTileStyleV, Lib3MF::eTextureTileStyle * pTileStyleW); /** -* Retrieves a texture's filter type. +* returns the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pFilter - returns filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getfilter(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter * pFilter); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getoffset(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pOffset); /** -* Sets a texture's filter type. +* Sets the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eFilter - sets new filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setfilter(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter eFilter); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setoffset(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dOffset); + +/** +* returns the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getscale(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pScale); + +/** +* Sets the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setscale(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dScale); /************************************************************************************************************************* Class definition for BuildItem @@ -3145,6 +5756,16 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getcolorgroupbyid(Lib3MF_Model pModel, */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getlevelsetbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -3283,6 +5904,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getmultipropertygroups(Lib3MF_Model pM */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestacks(Lib3MF_Model pModel, Lib3MF_SliceStackIterator * pResourceIterator); +/** +* creates a resource iterator instance with all image3d resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getimage3ds(Lib3MF_Model pModel, Lib3MF_Image3DIterator * pResourceIterator); + /** * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. * @@ -3292,6 +5922,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestacks(Lib3MF_Model pModel, Li */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_mergetomodel(Lib3MF_Model pModel, Lib3MF_Model * pMergedModelInstance); +/** +* Merges the given model into this model. +* +* @param[in] pModel - Model instance. +* @param[in] pModelInstance - model to be merged +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_mergefrommodel(Lib3MF_Model pModel, Lib3MF_Model pModelInstance); + /** * adds an empty mesh object to the model. * @@ -3377,6 +6016,28 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addcompositematerials(Lib3MF_Model pMo */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addmultipropertygroup(Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance); +/** +* creates a new 3D Image Resource +* +* @param[in] pModel - Model instance. +* @param[in] nColumnCount - the number of columns in each sheet. +* @param[in] nRowCount - the number of rows in each sheet. +* @param[in] nSheetCount - the number of sheets in the image stack. +* @param[out] pInstance - returns the new ImageStack instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addimagestack(Lib3MF_Model pModel, Lib3MF_uint32 nColumnCount, Lib3MF_uint32 nRowCount, Lib3MF_uint32 nSheetCount, Lib3MF_ImageStack * pInstance); + +/** +* finds an ImageStack object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pImageStackInstance - returns the image stack instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getimagestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ImageStack * pImageStackInstance); + /** * adds a build item to the model. * @@ -3528,6 +6189,70 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_setrandomnumbercallback(Lib3MF_Model p */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getkeystore(Lib3MF_Model pModel, Lib3MF_KeyStore * pKeyStore); +/** +* creates a resource iterator for all functions +* +* @param[in] pModel - Model instance. +* @param[out] pTheResourceIterator - returns the resource iterator +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getfunctions(Lib3MF_Model pModel, Lib3MF_FunctionIterator * pTheResourceIterator); + +/** +* adds a function described by nodes to the model +* +* @param[in] pModel - Model instance. +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addimplicitfunction(Lib3MF_Model pModel, Lib3MF_ImplicitFunction * pFunctionInstance); + +/** +* adds a function defined by an image3d to the model +* +* @param[in] pModel - Model instance. +* @param[in] pImage3DInstance - the Image3D-instance used for this function +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addfunctionfromimage3d(Lib3MF_Model pModel, Lib3MF_Image3D pImage3DInstance, Lib3MF_FunctionFromImage3D * pFunctionInstance); + +/** +* adds a volume data resource to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pVolumeDataInstance - returns the new volume data instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addvolumedata(Lib3MF_Model pModel, Lib3MF_VolumeData * pVolumeDataInstance); + +/** +* adds an empty boundary shape object to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pLevelSetInstance - returns the mesh object instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addlevelset(Lib3MF_Model pModel, Lib3MF_LevelSet * pLevelSetInstance); + +/** +* creates a resource iterator instance with all boundary shape resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getlevelsets(Lib3MF_Model pModel, Lib3MF_LevelSetIterator * pResourceIterator); + +/** +* Removes a resource from the model +* +* @param[in] pModel - Model instance. +* @param[in] pResource - The resource to remove +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_removeresource(Lib3MF_Model pModel, Lib3MF_Resource pResource); + /************************************************************************************************************************* Global functions **************************************************************************************************************************/ diff --git a/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp b/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp index c69787d70..3865faa33 100644 --- a/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp +++ b/Autogenerated/Bindings/Cpp/lib3mf_implicit.hpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++-Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -73,11 +73,21 @@ class CColorGroupIterator; class CTexture2DGroupIterator; class CCompositeMaterialsIterator; class CMultiPropertyGroupIterator; +class CImage3DIterator; +class CFunctionIterator; +class CLevelSetIterator; class CMetaData; class CMetaDataGroup; class CObject; class CMeshObject; +class CLevelSet; class CBeamLattice; +class CFunctionReference; +class CVolumeDataColor; +class CMaterialMapping; +class CVolumeDataComposite; +class CVolumeDataProperty; +class CVolumeData; class CComponent; class CComponentsObject; class CBeamSet; @@ -86,8 +96,71 @@ class CColorGroup; class CTexture2DGroup; class CCompositeMaterials; class CMultiPropertyGroup; +class CImage3D; +class CImageStack; class CAttachment; class CTexture2D; +class CImplicitPort; +class CIterator; +class CImplicitPortIterator; +class CImplicitNode; +class COneInputNode; +class CSinNode; +class CCosNode; +class CTanNode; +class CArcSinNode; +class CArcCosNode; +class CArcTanNode; +class CSinhNode; +class CCoshNode; +class CTanhNode; +class CRoundNode; +class CCeilNode; +class CFloorNode; +class CSignNode; +class CFractNode; +class CAbsNode; +class CExpNode; +class CLogNode; +class CLog2Node; +class CLog10Node; +class CLengthNode; +class CTransposeNode; +class CInverseNode; +class CSqrtNode; +class CResourceIdNode; +class CTwoInputNode; +class CAdditionNode; +class CSubtractionNode; +class CMultiplicationNode; +class CDivisionNode; +class CDotNode; +class CCrossNode; +class CArcTan2Node; +class CMatVecMultiplicationNode; +class CMinNode; +class CMaxNode; +class CFmodNode; +class CModNode; +class CPowNode; +class CSelectNode; +class CClampNode; +class CComposeVectorNode; +class CVectorFromScalarNode; +class CDecomposeVectorNode; +class CComposeMatrixNode; +class CMatrixFromRowsNode; +class CMatrixFromColumnsNode; +class CConstantNode; +class CConstVecNode; +class CConstMatNode; +class CMeshNode; +class CUnsignedMeshNode; +class CFunctionCallNode; +class CNodeIterator; +class CFunction; +class CImplicitFunction; +class CFunctionFromImage3D; class CBuildItem; class CBuildItemIterator; class CSlice; @@ -120,11 +193,21 @@ typedef CColorGroupIterator CLib3MFColorGroupIterator; typedef CTexture2DGroupIterator CLib3MFTexture2DGroupIterator; typedef CCompositeMaterialsIterator CLib3MFCompositeMaterialsIterator; typedef CMultiPropertyGroupIterator CLib3MFMultiPropertyGroupIterator; +typedef CImage3DIterator CLib3MFImage3DIterator; +typedef CFunctionIterator CLib3MFFunctionIterator; +typedef CLevelSetIterator CLib3MFLevelSetIterator; typedef CMetaData CLib3MFMetaData; typedef CMetaDataGroup CLib3MFMetaDataGroup; typedef CObject CLib3MFObject; typedef CMeshObject CLib3MFMeshObject; +typedef CLevelSet CLib3MFLevelSet; typedef CBeamLattice CLib3MFBeamLattice; +typedef CFunctionReference CLib3MFFunctionReference; +typedef CVolumeDataColor CLib3MFVolumeDataColor; +typedef CMaterialMapping CLib3MFMaterialMapping; +typedef CVolumeDataComposite CLib3MFVolumeDataComposite; +typedef CVolumeDataProperty CLib3MFVolumeDataProperty; +typedef CVolumeData CLib3MFVolumeData; typedef CComponent CLib3MFComponent; typedef CComponentsObject CLib3MFComponentsObject; typedef CBeamSet CLib3MFBeamSet; @@ -133,8 +216,71 @@ typedef CColorGroup CLib3MFColorGroup; typedef CTexture2DGroup CLib3MFTexture2DGroup; typedef CCompositeMaterials CLib3MFCompositeMaterials; typedef CMultiPropertyGroup CLib3MFMultiPropertyGroup; +typedef CImage3D CLib3MFImage3D; +typedef CImageStack CLib3MFImageStack; typedef CAttachment CLib3MFAttachment; typedef CTexture2D CLib3MFTexture2D; +typedef CImplicitPort CLib3MFImplicitPort; +typedef CIterator CLib3MFIterator; +typedef CImplicitPortIterator CLib3MFImplicitPortIterator; +typedef CImplicitNode CLib3MFImplicitNode; +typedef COneInputNode CLib3MFOneInputNode; +typedef CSinNode CLib3MFSinNode; +typedef CCosNode CLib3MFCosNode; +typedef CTanNode CLib3MFTanNode; +typedef CArcSinNode CLib3MFArcSinNode; +typedef CArcCosNode CLib3MFArcCosNode; +typedef CArcTanNode CLib3MFArcTanNode; +typedef CSinhNode CLib3MFSinhNode; +typedef CCoshNode CLib3MFCoshNode; +typedef CTanhNode CLib3MFTanhNode; +typedef CRoundNode CLib3MFRoundNode; +typedef CCeilNode CLib3MFCeilNode; +typedef CFloorNode CLib3MFFloorNode; +typedef CSignNode CLib3MFSignNode; +typedef CFractNode CLib3MFFractNode; +typedef CAbsNode CLib3MFAbsNode; +typedef CExpNode CLib3MFExpNode; +typedef CLogNode CLib3MFLogNode; +typedef CLog2Node CLib3MFLog2Node; +typedef CLog10Node CLib3MFLog10Node; +typedef CLengthNode CLib3MFLengthNode; +typedef CTransposeNode CLib3MFTransposeNode; +typedef CInverseNode CLib3MFInverseNode; +typedef CSqrtNode CLib3MFSqrtNode; +typedef CResourceIdNode CLib3MFResourceIdNode; +typedef CTwoInputNode CLib3MFTwoInputNode; +typedef CAdditionNode CLib3MFAdditionNode; +typedef CSubtractionNode CLib3MFSubtractionNode; +typedef CMultiplicationNode CLib3MFMultiplicationNode; +typedef CDivisionNode CLib3MFDivisionNode; +typedef CDotNode CLib3MFDotNode; +typedef CCrossNode CLib3MFCrossNode; +typedef CArcTan2Node CLib3MFArcTan2Node; +typedef CMatVecMultiplicationNode CLib3MFMatVecMultiplicationNode; +typedef CMinNode CLib3MFMinNode; +typedef CMaxNode CLib3MFMaxNode; +typedef CFmodNode CLib3MFFmodNode; +typedef CModNode CLib3MFModNode; +typedef CPowNode CLib3MFPowNode; +typedef CSelectNode CLib3MFSelectNode; +typedef CClampNode CLib3MFClampNode; +typedef CComposeVectorNode CLib3MFComposeVectorNode; +typedef CVectorFromScalarNode CLib3MFVectorFromScalarNode; +typedef CDecomposeVectorNode CLib3MFDecomposeVectorNode; +typedef CComposeMatrixNode CLib3MFComposeMatrixNode; +typedef CMatrixFromRowsNode CLib3MFMatrixFromRowsNode; +typedef CMatrixFromColumnsNode CLib3MFMatrixFromColumnsNode; +typedef CConstantNode CLib3MFConstantNode; +typedef CConstVecNode CLib3MFConstVecNode; +typedef CConstMatNode CLib3MFConstMatNode; +typedef CMeshNode CLib3MFMeshNode; +typedef CUnsignedMeshNode CLib3MFUnsignedMeshNode; +typedef CFunctionCallNode CLib3MFFunctionCallNode; +typedef CNodeIterator CLib3MFNodeIterator; +typedef CFunction CLib3MFFunction; +typedef CImplicitFunction CLib3MFImplicitFunction; +typedef CFunctionFromImage3D CLib3MFFunctionFromImage3D; typedef CBuildItem CLib3MFBuildItem; typedef CBuildItemIterator CLib3MFBuildItemIterator; typedef CSlice CLib3MFSlice; @@ -167,11 +313,21 @@ typedef std::shared_ptr PColorGroupIterator; typedef std::shared_ptr PTexture2DGroupIterator; typedef std::shared_ptr PCompositeMaterialsIterator; typedef std::shared_ptr PMultiPropertyGroupIterator; +typedef std::shared_ptr PImage3DIterator; +typedef std::shared_ptr PFunctionIterator; +typedef std::shared_ptr PLevelSetIterator; typedef std::shared_ptr PMetaData; typedef std::shared_ptr PMetaDataGroup; typedef std::shared_ptr PObject; typedef std::shared_ptr PMeshObject; +typedef std::shared_ptr PLevelSet; typedef std::shared_ptr PBeamLattice; +typedef std::shared_ptr PFunctionReference; +typedef std::shared_ptr PVolumeDataColor; +typedef std::shared_ptr PMaterialMapping; +typedef std::shared_ptr PVolumeDataComposite; +typedef std::shared_ptr PVolumeDataProperty; +typedef std::shared_ptr PVolumeData; typedef std::shared_ptr PComponent; typedef std::shared_ptr PComponentsObject; typedef std::shared_ptr PBeamSet; @@ -180,8 +336,71 @@ typedef std::shared_ptr PColorGroup; typedef std::shared_ptr PTexture2DGroup; typedef std::shared_ptr PCompositeMaterials; typedef std::shared_ptr PMultiPropertyGroup; +typedef std::shared_ptr PImage3D; +typedef std::shared_ptr PImageStack; typedef std::shared_ptr PAttachment; typedef std::shared_ptr PTexture2D; +typedef std::shared_ptr PImplicitPort; +typedef std::shared_ptr PIterator; +typedef std::shared_ptr PImplicitPortIterator; +typedef std::shared_ptr PImplicitNode; +typedef std::shared_ptr POneInputNode; +typedef std::shared_ptr PSinNode; +typedef std::shared_ptr PCosNode; +typedef std::shared_ptr PTanNode; +typedef std::shared_ptr PArcSinNode; +typedef std::shared_ptr PArcCosNode; +typedef std::shared_ptr PArcTanNode; +typedef std::shared_ptr PSinhNode; +typedef std::shared_ptr PCoshNode; +typedef std::shared_ptr PTanhNode; +typedef std::shared_ptr PRoundNode; +typedef std::shared_ptr PCeilNode; +typedef std::shared_ptr PFloorNode; +typedef std::shared_ptr PSignNode; +typedef std::shared_ptr PFractNode; +typedef std::shared_ptr PAbsNode; +typedef std::shared_ptr PExpNode; +typedef std::shared_ptr PLogNode; +typedef std::shared_ptr PLog2Node; +typedef std::shared_ptr PLog10Node; +typedef std::shared_ptr PLengthNode; +typedef std::shared_ptr PTransposeNode; +typedef std::shared_ptr PInverseNode; +typedef std::shared_ptr PSqrtNode; +typedef std::shared_ptr PResourceIdNode; +typedef std::shared_ptr PTwoInputNode; +typedef std::shared_ptr PAdditionNode; +typedef std::shared_ptr PSubtractionNode; +typedef std::shared_ptr PMultiplicationNode; +typedef std::shared_ptr PDivisionNode; +typedef std::shared_ptr PDotNode; +typedef std::shared_ptr PCrossNode; +typedef std::shared_ptr PArcTan2Node; +typedef std::shared_ptr PMatVecMultiplicationNode; +typedef std::shared_ptr PMinNode; +typedef std::shared_ptr PMaxNode; +typedef std::shared_ptr PFmodNode; +typedef std::shared_ptr PModNode; +typedef std::shared_ptr PPowNode; +typedef std::shared_ptr PSelectNode; +typedef std::shared_ptr PClampNode; +typedef std::shared_ptr PComposeVectorNode; +typedef std::shared_ptr PVectorFromScalarNode; +typedef std::shared_ptr PDecomposeVectorNode; +typedef std::shared_ptr PComposeMatrixNode; +typedef std::shared_ptr PMatrixFromRowsNode; +typedef std::shared_ptr PMatrixFromColumnsNode; +typedef std::shared_ptr PConstantNode; +typedef std::shared_ptr PConstVecNode; +typedef std::shared_ptr PConstMatNode; +typedef std::shared_ptr PMeshNode; +typedef std::shared_ptr PUnsignedMeshNode; +typedef std::shared_ptr PFunctionCallNode; +typedef std::shared_ptr PNodeIterator; +typedef std::shared_ptr PFunction; +typedef std::shared_ptr PImplicitFunction; +typedef std::shared_ptr PFunctionFromImage3D; typedef std::shared_ptr PBuildItem; typedef std::shared_ptr PBuildItemIterator; typedef std::shared_ptr PSlice; @@ -214,11 +433,21 @@ typedef PColorGroupIterator PLib3MFColorGroupIterator; typedef PTexture2DGroupIterator PLib3MFTexture2DGroupIterator; typedef PCompositeMaterialsIterator PLib3MFCompositeMaterialsIterator; typedef PMultiPropertyGroupIterator PLib3MFMultiPropertyGroupIterator; +typedef PImage3DIterator PLib3MFImage3DIterator; +typedef PFunctionIterator PLib3MFFunctionIterator; +typedef PLevelSetIterator PLib3MFLevelSetIterator; typedef PMetaData PLib3MFMetaData; typedef PMetaDataGroup PLib3MFMetaDataGroup; typedef PObject PLib3MFObject; typedef PMeshObject PLib3MFMeshObject; +typedef PLevelSet PLib3MFLevelSet; typedef PBeamLattice PLib3MFBeamLattice; +typedef PFunctionReference PLib3MFFunctionReference; +typedef PVolumeDataColor PLib3MFVolumeDataColor; +typedef PMaterialMapping PLib3MFMaterialMapping; +typedef PVolumeDataComposite PLib3MFVolumeDataComposite; +typedef PVolumeDataProperty PLib3MFVolumeDataProperty; +typedef PVolumeData PLib3MFVolumeData; typedef PComponent PLib3MFComponent; typedef PComponentsObject PLib3MFComponentsObject; typedef PBeamSet PLib3MFBeamSet; @@ -227,8 +456,71 @@ typedef PColorGroup PLib3MFColorGroup; typedef PTexture2DGroup PLib3MFTexture2DGroup; typedef PCompositeMaterials PLib3MFCompositeMaterials; typedef PMultiPropertyGroup PLib3MFMultiPropertyGroup; +typedef PImage3D PLib3MFImage3D; +typedef PImageStack PLib3MFImageStack; typedef PAttachment PLib3MFAttachment; typedef PTexture2D PLib3MFTexture2D; +typedef PImplicitPort PLib3MFImplicitPort; +typedef PIterator PLib3MFIterator; +typedef PImplicitPortIterator PLib3MFImplicitPortIterator; +typedef PImplicitNode PLib3MFImplicitNode; +typedef POneInputNode PLib3MFOneInputNode; +typedef PSinNode PLib3MFSinNode; +typedef PCosNode PLib3MFCosNode; +typedef PTanNode PLib3MFTanNode; +typedef PArcSinNode PLib3MFArcSinNode; +typedef PArcCosNode PLib3MFArcCosNode; +typedef PArcTanNode PLib3MFArcTanNode; +typedef PSinhNode PLib3MFSinhNode; +typedef PCoshNode PLib3MFCoshNode; +typedef PTanhNode PLib3MFTanhNode; +typedef PRoundNode PLib3MFRoundNode; +typedef PCeilNode PLib3MFCeilNode; +typedef PFloorNode PLib3MFFloorNode; +typedef PSignNode PLib3MFSignNode; +typedef PFractNode PLib3MFFractNode; +typedef PAbsNode PLib3MFAbsNode; +typedef PExpNode PLib3MFExpNode; +typedef PLogNode PLib3MFLogNode; +typedef PLog2Node PLib3MFLog2Node; +typedef PLog10Node PLib3MFLog10Node; +typedef PLengthNode PLib3MFLengthNode; +typedef PTransposeNode PLib3MFTransposeNode; +typedef PInverseNode PLib3MFInverseNode; +typedef PSqrtNode PLib3MFSqrtNode; +typedef PResourceIdNode PLib3MFResourceIdNode; +typedef PTwoInputNode PLib3MFTwoInputNode; +typedef PAdditionNode PLib3MFAdditionNode; +typedef PSubtractionNode PLib3MFSubtractionNode; +typedef PMultiplicationNode PLib3MFMultiplicationNode; +typedef PDivisionNode PLib3MFDivisionNode; +typedef PDotNode PLib3MFDotNode; +typedef PCrossNode PLib3MFCrossNode; +typedef PArcTan2Node PLib3MFArcTan2Node; +typedef PMatVecMultiplicationNode PLib3MFMatVecMultiplicationNode; +typedef PMinNode PLib3MFMinNode; +typedef PMaxNode PLib3MFMaxNode; +typedef PFmodNode PLib3MFFmodNode; +typedef PModNode PLib3MFModNode; +typedef PPowNode PLib3MFPowNode; +typedef PSelectNode PLib3MFSelectNode; +typedef PClampNode PLib3MFClampNode; +typedef PComposeVectorNode PLib3MFComposeVectorNode; +typedef PVectorFromScalarNode PLib3MFVectorFromScalarNode; +typedef PDecomposeVectorNode PLib3MFDecomposeVectorNode; +typedef PComposeMatrixNode PLib3MFComposeMatrixNode; +typedef PMatrixFromRowsNode PLib3MFMatrixFromRowsNode; +typedef PMatrixFromColumnsNode PLib3MFMatrixFromColumnsNode; +typedef PConstantNode PLib3MFConstantNode; +typedef PConstVecNode PLib3MFConstVecNode; +typedef PConstMatNode PLib3MFConstMatNode; +typedef PMeshNode PLib3MFMeshNode; +typedef PUnsignedMeshNode PLib3MFUnsignedMeshNode; +typedef PFunctionCallNode PLib3MFFunctionCallNode; +typedef PNodeIterator PLib3MFNodeIterator; +typedef PFunction PLib3MFFunction; +typedef PImplicitFunction PLib3MFImplicitFunction; +typedef PFunctionFromImage3D PLib3MFFunctionFromImage3D; typedef PBuildItem PLib3MFBuildItem; typedef PBuildItemIterator PLib3MFBuildItemIterator; typedef PSlice PLib3MFSlice; @@ -355,6 +647,7 @@ class ELib3MFException : public std::exception { case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "UNKOWNPROGRESSIDENTIFIER"; case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "ELEMENTCOUNTEXCEEDSLIMIT"; case LIB3MF_ERROR_INVALIDRESOURCE: return "INVALIDRESOURCE"; + case LIB3MF_ERROR_INVALIDLEVELSET: return "INVALIDLEVELSET"; case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "BEAMLATTICE_INVALID_OBJECTTYPE"; case LIB3MF_ERROR_INVALIDKEYSTORE: return "INVALIDKEYSTORE"; case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "INVALIDKEYSTORECONSUMER"; @@ -362,6 +655,10 @@ class ELib3MFException : public std::exception { case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "KEYSTORERESOURCEDATANOTFOUND"; case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "SECURECONTEXTNOTREGISTERED"; case LIB3MF_ERROR_INVALIDKEYSIZE: return "INVALIDKEYSIZE"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "INCOMPATIBLEPORTTYPES"; + case LIB3MF_ERROR_GRAPHISCYCLIC: return "GRAPHISCYCLIC"; + case LIB3MF_ERROR_INPUTNOTSET: return "INPUTNOTSET"; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "INVALIDNODECONFIGURATION"; } return "UNKNOWN"; } @@ -406,13 +703,18 @@ class ELib3MFException : public std::exception { case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "A progress identifier is unknown"; case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "An element buffer exceeds its spec limit"; case LIB3MF_ERROR_INVALIDRESOURCE: return "A resource is invalid"; + case LIB3MF_ERROR_INVALIDLEVELSET: return "A level set is invalid"; case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "This object type is not valid for beamlattices"; case LIB3MF_ERROR_INVALIDKEYSTORE: return "The keystore object is invalid"; case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "The consumer keystore object is invalid"; case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: return "A consumer has not been found"; case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "A resource data has not been found"; case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "A Key or Conentent encryption callback has not been registered"; - case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key siue is invalid"; + case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key size is invalid"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "Link could not be added, the port types are incompatible"; + case LIB3MF_ERROR_GRAPHISCYCLIC: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case LIB3MF_ERROR_INPUTNOTSET: return "The input of a node is not set."; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "The selected node configuration is not supported"; } return "unknown error"; } @@ -537,11 +839,21 @@ class CWrapper { friend class CTexture2DGroupIterator; friend class CCompositeMaterialsIterator; friend class CMultiPropertyGroupIterator; + friend class CImage3DIterator; + friend class CFunctionIterator; + friend class CLevelSetIterator; friend class CMetaData; friend class CMetaDataGroup; friend class CObject; friend class CMeshObject; + friend class CLevelSet; friend class CBeamLattice; + friend class CFunctionReference; + friend class CVolumeDataColor; + friend class CMaterialMapping; + friend class CVolumeDataComposite; + friend class CVolumeDataProperty; + friend class CVolumeData; friend class CComponent; friend class CComponentsObject; friend class CBeamSet; @@ -550,8 +862,71 @@ class CWrapper { friend class CTexture2DGroup; friend class CCompositeMaterials; friend class CMultiPropertyGroup; + friend class CImage3D; + friend class CImageStack; friend class CAttachment; friend class CTexture2D; + friend class CImplicitPort; + friend class CIterator; + friend class CImplicitPortIterator; + friend class CImplicitNode; + friend class COneInputNode; + friend class CSinNode; + friend class CCosNode; + friend class CTanNode; + friend class CArcSinNode; + friend class CArcCosNode; + friend class CArcTanNode; + friend class CSinhNode; + friend class CCoshNode; + friend class CTanhNode; + friend class CRoundNode; + friend class CCeilNode; + friend class CFloorNode; + friend class CSignNode; + friend class CFractNode; + friend class CAbsNode; + friend class CExpNode; + friend class CLogNode; + friend class CLog2Node; + friend class CLog10Node; + friend class CLengthNode; + friend class CTransposeNode; + friend class CInverseNode; + friend class CSqrtNode; + friend class CResourceIdNode; + friend class CTwoInputNode; + friend class CAdditionNode; + friend class CSubtractionNode; + friend class CMultiplicationNode; + friend class CDivisionNode; + friend class CDotNode; + friend class CCrossNode; + friend class CArcTan2Node; + friend class CMatVecMultiplicationNode; + friend class CMinNode; + friend class CMaxNode; + friend class CFmodNode; + friend class CModNode; + friend class CPowNode; + friend class CSelectNode; + friend class CClampNode; + friend class CComposeVectorNode; + friend class CVectorFromScalarNode; + friend class CDecomposeVectorNode; + friend class CComposeMatrixNode; + friend class CMatrixFromRowsNode; + friend class CMatrixFromColumnsNode; + friend class CConstantNode; + friend class CConstVecNode; + friend class CConstMatNode; + friend class CMeshNode; + friend class CUnsignedMeshNode; + friend class CFunctionCallNode; + friend class CNodeIterator; + friend class CFunction; + friend class CImplicitFunction; + friend class CFunctionFromImage3D; friend class CBuildItem; friend class CBuildItemIterator; friend class CSlice; @@ -911,6 +1286,57 @@ class CMultiPropertyGroupIterator : public CResourceIterator { inline PMultiPropertyGroup GetCurrentMultiPropertyGroup(); }; +/************************************************************************************************************************* + Class CImage3DIterator +**************************************************************************************************************************/ +class CImage3DIterator : public CResourceIterator { +public: + + /** + * CImage3DIterator::CImage3DIterator - Constructor for Image3DIterator class. + */ + CImage3DIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResourceIterator(pWrapper, pHandle) + { + } + + inline PImage3D GetCurrentImage3D(); +}; + +/************************************************************************************************************************* + Class CFunctionIterator +**************************************************************************************************************************/ +class CFunctionIterator : public CResourceIterator { +public: + + /** + * CFunctionIterator::CFunctionIterator - Constructor for FunctionIterator class. + */ + CFunctionIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResourceIterator(pWrapper, pHandle) + { + } + + inline PFunction GetCurrentFunction(); +}; + +/************************************************************************************************************************* + Class CLevelSetIterator +**************************************************************************************************************************/ +class CLevelSetIterator : public CResourceIterator { +public: + + /** + * CLevelSetIterator::CLevelSetIterator - Constructor for LevelSetIterator class. + */ + CLevelSetIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResourceIterator(pWrapper, pHandle) + { + } + + inline PLevelSet GetCurrentLevelSet(); +}; + /************************************************************************************************************************* Class CMetaData **************************************************************************************************************************/ @@ -982,6 +1408,7 @@ class CObject : public CResource { inline void SetPartNumber(const std::string & sPartNumber); inline bool IsMeshObject(); inline bool IsComponentsObject(); + inline bool IsLevelSetObject(); inline bool IsValid(); inline void SetAttachmentAsThumbnail(classParam pAttachment); inline PAttachment GetThumbnailAttachment(); @@ -1032,6 +1459,40 @@ class CMeshObject : public CObject { inline void SetGeometry(const CInputVector & VerticesBuffer, const CInputVector & IndicesBuffer); inline bool IsManifoldAndOriented(); inline PBeamLattice BeamLattice(); + inline PVolumeData GetVolumeData(); + inline void SetVolumeData(classParam pTheVolumeData); +}; + +/************************************************************************************************************************* + Class CLevelSet +**************************************************************************************************************************/ +class CLevelSet : public CObject { +public: + + /** + * CLevelSet::CLevelSet - Constructor for LevelSet class. + */ + CLevelSet(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CObject(pWrapper, pHandle) + { + } + + inline PFunction GetFunction(); + inline void SetFunction(classParam pTheFunction); + inline sTransform GetTransform(); + inline void SetTransform(const sTransform & Transform); + inline std::string GetChannelName(); + inline void SetChannelName(const std::string & sChannelName); + inline void SetMinFeatureSize(const Lib3MF_double dMinFeatureSize); + inline Lib3MF_double GetMinFeatureSize(); + inline void SetFallBackValue(const Lib3MF_double dFallBackValue); + inline Lib3MF_double GetFallBackValue(); + inline void SetMeshBBoxOnly(const bool bMeshBBoxOnly); + inline bool GetMeshBBoxOnly(); + inline void SetMesh(classParam pTheMesh); + inline PMeshObject GetMesh(); + inline PVolumeData GetVolumeData(); + inline void SetVolumeData(classParam pTheVolumeData); }; /************************************************************************************************************************* @@ -1073,6 +1534,131 @@ class CBeamLattice : public CBase { inline PBeamSet GetBeamSet(const Lib3MF_uint32 nIndex); }; +/************************************************************************************************************************* + Class CFunctionReference +**************************************************************************************************************************/ +class CFunctionReference : public CBase { +public: + + /** + * CFunctionReference::CFunctionReference - Constructor for FunctionReference class. + */ + CFunctionReference(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline Lib3MF_uint32 GetFunctionResourceID(); + inline void SetFunctionResourceID(const Lib3MF_uint32 nUniqueResourceID); + inline sTransform GetTransform(); + inline void SetTransform(const sTransform & Transform); + inline std::string GetChannelName(); + inline void SetChannelName(const std::string & sChannelName); + inline void SetMinFeatureSize(const Lib3MF_double dMinFeatureSize); + inline Lib3MF_double GetMinFeatureSize(); + inline void SetFallBackValue(const Lib3MF_double dFallBackValue); + inline Lib3MF_double GetFallBackValue(); +}; + +/************************************************************************************************************************* + Class CVolumeDataColor +**************************************************************************************************************************/ +class CVolumeDataColor : public CFunctionReference { +public: + + /** + * CVolumeDataColor::CVolumeDataColor - Constructor for VolumeDataColor class. + */ + CVolumeDataColor(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CFunctionReference(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CMaterialMapping +**************************************************************************************************************************/ +class CMaterialMapping : public CFunctionReference { +public: + + /** + * CMaterialMapping::CMaterialMapping - Constructor for MaterialMapping class. + */ + CMaterialMapping(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CFunctionReference(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CVolumeDataComposite +**************************************************************************************************************************/ +class CVolumeDataComposite : public CBase { +public: + + /** + * CVolumeDataComposite::CVolumeDataComposite - Constructor for VolumeDataComposite class. + */ + CVolumeDataComposite(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PBaseMaterialGroup GetBaseMaterialGroup(); + inline void SetBaseMaterialGroup(classParam pBaseMaterialGroupInstance); + inline Lib3MF_uint32 GetMaterialMappingCount(); + inline PMaterialMapping GetMaterialMapping(const Lib3MF_uint32 nIndex); + inline PMaterialMapping AddMaterialMapping(const sTransform & Transform); + inline void RemoveMaterialMapping(const Lib3MF_uint32 nIndex); +}; + +/************************************************************************************************************************* + Class CVolumeDataProperty +**************************************************************************************************************************/ +class CVolumeDataProperty : public CFunctionReference { +public: + + /** + * CVolumeDataProperty::CVolumeDataProperty - Constructor for VolumeDataProperty class. + */ + CVolumeDataProperty(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CFunctionReference(pWrapper, pHandle) + { + } + + inline std::string GetName(); + inline void SetIsRequired(const bool bIsRequired); + inline bool IsRequired(); +}; + +/************************************************************************************************************************* + Class CVolumeData +**************************************************************************************************************************/ +class CVolumeData : public CResource { +public: + + /** + * CVolumeData::CVolumeData - Constructor for VolumeData class. + */ + CVolumeData(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResource(pWrapper, pHandle) + { + } + + inline PVolumeDataComposite GetComposite(); + inline PVolumeDataComposite CreateNewComposite(); + inline void RemoveComposite(); + inline PVolumeDataColor GetColor(); + inline PVolumeDataColor CreateNewColor(classParam pTheFunction); + inline void RemoveColor(); + inline Lib3MF_uint32 GetPropertyCount(); + inline PVolumeDataProperty GetProperty(const Lib3MF_uint32 nIndex); + inline PVolumeDataProperty AddPropertyFromFunction(const std::string & sName, classParam pTheFunction); + inline void RemoveProperty(const Lib3MF_uint32 nIndex); +}; + /************************************************************************************************************************* Class CComponent **************************************************************************************************************************/ @@ -1257,6 +1843,51 @@ class CMultiPropertyGroup : public CResource { inline void RemoveLayer(const Lib3MF_uint32 nLayerIndex); }; +/************************************************************************************************************************* + Class CImage3D +**************************************************************************************************************************/ +class CImage3D : public CResource { +public: + + /** + * CImage3D::CImage3D - Constructor for Image3D class. + */ + CImage3D(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResource(pWrapper, pHandle) + { + } + + inline std::string GetName(); + inline void SetName(const std::string & sName); + inline bool IsImageStack(); +}; + +/************************************************************************************************************************* + Class CImageStack +**************************************************************************************************************************/ +class CImageStack : public CImage3D { +public: + + /** + * CImageStack::CImageStack - Constructor for ImageStack class. + */ + CImageStack(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImage3D(pWrapper, pHandle) + { + } + + inline Lib3MF_uint32 GetRowCount(); + inline void SetRowCount(const Lib3MF_uint32 nRowCount); + inline Lib3MF_uint32 GetColumnCount(); + inline void SetColumnCount(const Lib3MF_uint32 nColumnCount); + inline Lib3MF_uint32 GetSheetCount(); + inline PAttachment GetSheet(const Lib3MF_uint32 nIndex); + inline void SetSheet(const Lib3MF_uint32 nIndex, classParam pSheet); + inline PAttachment CreateEmptySheet(const Lib3MF_uint32 nIndex, const std::string & sPath); + inline PAttachment CreateSheetFromBuffer(const Lib3MF_uint32 nIndex, const std::string & sPath, const CInputVector & DataBuffer); + inline PAttachment CreateSheetFromFile(const Lib3MF_uint32 nIndex, const std::string & sPath, const std::string & sFileName); +}; + /************************************************************************************************************************* Class CAttachment **************************************************************************************************************************/ @@ -1309,1019 +1940,5124 @@ class CTexture2D : public CResource { }; /************************************************************************************************************************* - Class CBuildItem + Class CImplicitPort **************************************************************************************************************************/ -class CBuildItem : public CBase { +class CImplicitPort : public CBase { public: /** - * CBuildItem::CBuildItem - Constructor for BuildItem class. + * CImplicitPort::CImplicitPort - Constructor for ImplicitPort class. */ - CBuildItem(CWrapper* pWrapper, Lib3MFHandle pHandle) + CImplicitPort(CWrapper* pWrapper, Lib3MFHandle pHandle) : CBase(pWrapper, pHandle) { } - inline PObject GetObjectResource(); - inline std::string GetUUID(bool & bHasUUID); - inline void SetUUID(const std::string & sUUID); - inline Lib3MF_uint32 GetObjectResourceID(); - inline bool HasObjectTransform(); - inline sTransform GetObjectTransform(); - inline void SetObjectTransform(const sTransform & Transform); - inline std::string GetPartNumber(); - inline void SetPartNumber(const std::string & sSetPartnumber); - inline PMetaDataGroup GetMetaDataGroup(); - inline sBox GetOutbox(); + inline std::string GetIdentifier(); + inline void SetIdentifier(const std::string & sIdentifier); + inline std::string GetDisplayName(); + inline void SetDisplayName(const std::string & sDisplayName); + inline void SetType(const eImplicitPortType eImplicitPortType); + inline eImplicitPortType GetType(); + inline std::string GetReference(); + inline void SetReference(const std::string & sReference); }; /************************************************************************************************************************* - Class CBuildItemIterator + Class CIterator **************************************************************************************************************************/ -class CBuildItemIterator : public CBase { +class CIterator : public CBase { public: /** - * CBuildItemIterator::CBuildItemIterator - Constructor for BuildItemIterator class. + * CIterator::CIterator - Constructor for Iterator class. */ - CBuildItemIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + CIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) : CBase(pWrapper, pHandle) { } inline bool MoveNext(); inline bool MovePrevious(); - inline PBuildItem GetCurrent(); - inline PBuildItemIterator Clone(); inline Lib3MF_uint64 Count(); }; /************************************************************************************************************************* - Class CSlice + Class CImplicitPortIterator **************************************************************************************************************************/ -class CSlice : public CBase { +class CImplicitPortIterator : public CIterator { public: /** - * CSlice::CSlice - Constructor for Slice class. + * CImplicitPortIterator::CImplicitPortIterator - Constructor for ImplicitPortIterator class. */ - CSlice(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CImplicitPortIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CIterator(pWrapper, pHandle) { } - inline void SetVertices(const CInputVector & VerticesBuffer); - inline void GetVertices(std::vector & VerticesBuffer); - inline Lib3MF_uint64 GetVertexCount(); - inline Lib3MF_uint64 AddPolygon(const CInputVector & IndicesBuffer); - inline Lib3MF_uint64 GetPolygonCount(); - inline void SetPolygonIndices(const Lib3MF_uint64 nIndex, const CInputVector & IndicesBuffer); - inline void GetPolygonIndices(const Lib3MF_uint64 nIndex, std::vector & IndicesBuffer); - inline Lib3MF_uint64 GetPolygonIndexCount(const Lib3MF_uint64 nIndex); - inline Lib3MF_double GetZTop(); + inline PImplicitPort GetCurrent(); }; /************************************************************************************************************************* - Class CSliceStack + Class CImplicitNode **************************************************************************************************************************/ -class CSliceStack : public CResource { +class CImplicitNode : public CBase { public: /** - * CSliceStack::CSliceStack - Constructor for SliceStack class. + * CImplicitNode::CImplicitNode - Constructor for ImplicitNode class. */ - CSliceStack(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CResource(pWrapper, pHandle) + CImplicitNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) { } - inline Lib3MF_double GetBottomZ(); - inline Lib3MF_uint64 GetSliceCount(); - inline PSlice GetSlice(const Lib3MF_uint64 nSliceIndex); - inline PSlice AddSlice(const Lib3MF_double dZTop); - inline Lib3MF_uint64 GetSliceRefCount(); - inline void AddSliceStackReference(classParam pTheSliceStack); - inline PSliceStack GetSliceStackReference(const Lib3MF_uint64 nSliceRefIndex); - inline void CollapseSliceReferences(); - inline void SetOwnPath(const std::string & sPath); - inline std::string GetOwnPath(); + inline std::string GetIdentifier(); + inline void SetIdentifier(const std::string & sIdentifier); + inline std::string GetDisplayName(); + inline void SetDisplayName(const std::string & sDisplayName); + inline std::string GetTag(); + inline void SetTag(const std::string & sTag); + inline eImplicitNodeType GetNodeType(); + inline PImplicitPort AddInput(const std::string & sIdentifier, const std::string & sDisplayName); + inline PImplicitPortIterator GetInputs(); + inline PImplicitPort AddOutput(const std::string & sIdentifier, const std::string & sDisplayName); + inline PImplicitPortIterator GetOutputs(); + inline PImplicitPort FindInput(const std::string & sIdentifier); + inline PImplicitPort FindOutput(const std::string & sIdentifier); + inline bool AreTypesValid(); }; /************************************************************************************************************************* - Class CConsumer + Class COneInputNode **************************************************************************************************************************/ -class CConsumer : public CBase { +class COneInputNode : public CImplicitNode { public: /** - * CConsumer::CConsumer - Constructor for Consumer class. + * COneInputNode::COneInputNode - Constructor for OneInputNode class. */ - CConsumer(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + COneInputNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) { } - inline std::string GetConsumerID(); - inline std::string GetKeyID(); - inline std::string GetKeyValue(); + inline PImplicitPort GetInputA(); + inline PImplicitPort GetOutputResult(); }; /************************************************************************************************************************* - Class CAccessRight + Class CSinNode **************************************************************************************************************************/ -class CAccessRight : public CBase { +class CSinNode : public COneInputNode { public: /** - * CAccessRight::CAccessRight - Constructor for AccessRight class. + * CSinNode::CSinNode - Constructor for SinNode class. */ - CAccessRight(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CSinNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline PConsumer GetConsumer(); - inline eWrappingAlgorithm GetWrappingAlgorithm(); - inline eMgfAlgorithm GetMgfAlgorithm(); - inline eDigestMethod GetDigestMethod(); }; /************************************************************************************************************************* - Class CContentEncryptionParams + Class CCosNode **************************************************************************************************************************/ -class CContentEncryptionParams : public CBase { +class CCosNode : public COneInputNode { public: /** - * CContentEncryptionParams::CContentEncryptionParams - Constructor for ContentEncryptionParams class. + * CCosNode::CCosNode - Constructor for CosNode class. */ - CContentEncryptionParams(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CCosNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline eEncryptionAlgorithm GetEncryptionAlgorithm(); - inline void GetKey(std::vector & ByteDataBuffer); - inline void GetInitializationVector(std::vector & ByteDataBuffer); - inline void GetAuthenticationTag(std::vector & ByteDataBuffer); - inline void SetAuthenticationTag(const CInputVector & ByteDataBuffer); - inline void GetAdditionalAuthenticationData(std::vector & ByteDataBuffer); - inline Lib3MF_uint64 GetDescriptor(); - inline std::string GetKeyUUID(); }; /************************************************************************************************************************* - Class CResourceData + Class CTanNode **************************************************************************************************************************/ -class CResourceData : public CBase { +class CTanNode : public COneInputNode { public: /** - * CResourceData::CResourceData - Constructor for ResourceData class. + * CTanNode::CTanNode - Constructor for TanNode class. */ - CResourceData(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CTanNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline PPackagePart GetPath(); - inline eEncryptionAlgorithm GetEncryptionAlgorithm(); - inline eCompression GetCompression(); - inline void GetAdditionalAuthenticationData(std::vector & ByteDataBuffer); }; /************************************************************************************************************************* - Class CResourceDataGroup + Class CArcSinNode **************************************************************************************************************************/ -class CResourceDataGroup : public CBase { +class CArcSinNode : public COneInputNode { public: /** - * CResourceDataGroup::CResourceDataGroup - Constructor for ResourceDataGroup class. + * CArcSinNode::CArcSinNode - Constructor for ArcSinNode class. */ - CResourceDataGroup(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CArcSinNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline std::string GetKeyUUID(); - inline PAccessRight AddAccessRight(classParam pConsumer, const eWrappingAlgorithm eWrappingAlgorithm, const eMgfAlgorithm eMgfAlgorithm, const eDigestMethod eDigestMethod); - inline PAccessRight FindAccessRightByConsumer(classParam pConsumer); - inline void RemoveAccessRight(classParam pConsumer); }; /************************************************************************************************************************* - Class CKeyStore + Class CArcCosNode **************************************************************************************************************************/ -class CKeyStore : public CBase { +class CArcCosNode : public COneInputNode { public: /** - * CKeyStore::CKeyStore - Constructor for KeyStore class. + * CArcCosNode::CArcCosNode - Constructor for ArcCosNode class. */ - CKeyStore(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CArcCosNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline PConsumer AddConsumer(const std::string & sConsumerID, const std::string & sKeyID, const std::string & sKeyValue); - inline Lib3MF_uint64 GetConsumerCount(); - inline PConsumer GetConsumer(const Lib3MF_uint64 nConsumerIndex); - inline void RemoveConsumer(classParam pConsumer); - inline PConsumer FindConsumer(const std::string & sConsumerID); - inline Lib3MF_uint64 GetResourceDataGroupCount(); - inline PResourceDataGroup AddResourceDataGroup(); - inline PResourceDataGroup GetResourceDataGroup(const Lib3MF_uint64 nResourceDataIndex); - inline void RemoveResourceDataGroup(classParam pResourceDataGroup); - inline PResourceDataGroup FindResourceDataGroup(classParam pPartPath); - inline PResourceData AddResourceData(classParam pResourceDataGroup, classParam pPartPath, const eEncryptionAlgorithm eAlgorithm, const eCompression eCompression, const CInputVector & AdditionalAuthenticationDataBuffer); - inline void RemoveResourceData(classParam pResourceData); - inline PResourceData FindResourceData(classParam pResourcePath); - inline Lib3MF_uint64 GetResourceDataCount(); - inline PResourceData GetResourceData(const Lib3MF_uint64 nResourceDataIndex); - inline std::string GetUUID(bool & bHasUUID); - inline void SetUUID(const std::string & sUUID); }; /************************************************************************************************************************* - Class CModel + Class CArcTanNode **************************************************************************************************************************/ -class CModel : public CBase { +class CArcTanNode : public COneInputNode { public: /** - * CModel::CModel - Constructor for Model class. + * CArcTanNode::CArcTanNode - Constructor for ArcTanNode class. */ - CModel(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CArcTanNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline PPackagePart RootModelPart(); - inline PPackagePart FindOrCreatePackagePart(const std::string & sAbsolutePath); - inline void SetUnit(const eModelUnit eUnit); - inline eModelUnit GetUnit(); - inline std::string GetLanguage(); - inline void SetLanguage(const std::string & sLanguage); - inline PWriter QueryWriter(const std::string & sWriterClass); - inline PReader QueryReader(const std::string & sReaderClass); - inline PResource GetResourceByID(const Lib3MF_uint32 nUniqueResourceID); - inline PTexture2D GetTexture2DByID(const Lib3MF_uint32 nUniqueResourceID); - inline ePropertyType GetPropertyTypeByID(const Lib3MF_uint32 nUniqueResourceID); - inline PBaseMaterialGroup GetBaseMaterialGroupByID(const Lib3MF_uint32 nUniqueResourceID); - inline PTexture2DGroup GetTexture2DGroupByID(const Lib3MF_uint32 nUniqueResourceID); - inline PCompositeMaterials GetCompositeMaterialsByID(const Lib3MF_uint32 nUniqueResourceID); - inline PMultiPropertyGroup GetMultiPropertyGroupByID(const Lib3MF_uint32 nUniqueResourceID); - inline PMeshObject GetMeshObjectByID(const Lib3MF_uint32 nUniqueResourceID); - inline PComponentsObject GetComponentsObjectByID(const Lib3MF_uint32 nUniqueResourceID); - inline PColorGroup GetColorGroupByID(const Lib3MF_uint32 nUniqueResourceID); - inline PSliceStack GetSliceStackByID(const Lib3MF_uint32 nUniqueResourceID); - inline std::string GetBuildUUID(bool & bHasUUID); - inline void SetBuildUUID(const std::string & sUUID); - inline PBuildItemIterator GetBuildItems(); - inline sBox GetOutbox(); - inline PResourceIterator GetResources(); - inline PObjectIterator GetObjects(); - inline PMeshObjectIterator GetMeshObjects(); - inline PComponentsObjectIterator GetComponentsObjects(); - inline PTexture2DIterator GetTexture2Ds(); - inline PBaseMaterialGroupIterator GetBaseMaterialGroups(); - inline PColorGroupIterator GetColorGroups(); - inline PTexture2DGroupIterator GetTexture2DGroups(); - inline PCompositeMaterialsIterator GetCompositeMaterials(); - inline PMultiPropertyGroupIterator GetMultiPropertyGroups(); - inline PSliceStackIterator GetSliceStacks(); - inline PModel MergeToModel(); - inline PMeshObject AddMeshObject(); - inline PComponentsObject AddComponentsObject(); - inline PSliceStack AddSliceStack(const Lib3MF_double dZBottom); - inline PTexture2D AddTexture2DFromAttachment(classParam pTextureAttachment); - inline PBaseMaterialGroup AddBaseMaterialGroup(); - inline PColorGroup AddColorGroup(); - inline PTexture2DGroup AddTexture2DGroup(classParam pTexture2DInstance); - inline PCompositeMaterials AddCompositeMaterials(classParam pBaseMaterialGroupInstance); - inline PMultiPropertyGroup AddMultiPropertyGroup(); - inline PBuildItem AddBuildItem(classParam pObject, const sTransform & Transform); - inline void RemoveBuildItem(classParam pBuildItemInstance); - inline PMetaDataGroup GetMetaDataGroup(); - inline PAttachment AddAttachment(const std::string & sURI, const std::string & sRelationShipType); - inline void RemoveAttachment(classParam pAttachmentInstance); - inline PAttachment GetAttachment(const Lib3MF_uint32 nIndex); - inline PAttachment FindAttachment(const std::string & sURI); - inline Lib3MF_uint32 GetAttachmentCount(); - inline bool HasPackageThumbnailAttachment(); - inline PAttachment CreatePackageThumbnailAttachment(); - inline PAttachment GetPackageThumbnailAttachment(); - inline void RemovePackageThumbnailAttachment(); - inline void AddCustomContentType(const std::string & sExtension, const std::string & sContentType); - inline void RemoveCustomContentType(const std::string & sExtension); - inline void SetRandomNumberCallback(const RandomNumberCallback pTheCallback, const Lib3MF_pvoid pUserData); - inline PKeyStore GetKeyStore(); }; - + /************************************************************************************************************************* - RTTI: Polymorphic Factory implementation + Class CSinhNode **************************************************************************************************************************/ - -/** -* IMPORTANT: PolymorphicFactory method should not be used by application directly. -* It's designed to be used on Lib3MFHandle object only once. -* If it's used on any existing object as a form of dynamic cast then -* CWrapper::AcquireInstance(CBase object) must be called after instantiating new object. -* This is important to keep reference count matching between application and library sides. -*/ -inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) -{ - Lib3MF_uint64 resultClassTypeId = 0; - CheckError(nullptr, lib3mf_base_classtypeid(pHandle, &resultClassTypeId)); - switch(resultClassTypeId) { - case 0x856632D0BAF1D8B7UL: return new CBase(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Base" - case 0xE76F642F363FD7E9UL: return new CWriter(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Writer" - case 0x2D86831DA59FBE72UL: return new CReader(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Reader" - case 0x0E55A826D377483EUL: return new CPackagePart(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::PackagePart" - case 0xDFE3889D1B269CBBUL: return new CResource(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Resource" - case 0x460F3515E2621DBEUL: return new CResourceIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIterator" - case 0x69684DB99FA813F6UL: return new CSliceStackIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStackIterator" - case 0xDE92510BD2112288UL: return new CObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ObjectIterator" - case 0xF4196034E2B9FDE6UL: return new CMeshObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObjectIterator" - case 0x564DE4217ED7614AUL: return new CComponentsObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObjectIterator" - case 0x4BD32B4870FFC03BUL: return new CTexture2DIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DIterator" - case 0x65E6EDD9362C79CBUL: return new CBaseMaterialGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroupIterator" - case 0x10274A1757C729C0UL: return new CColorGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroupIterator" - case 0x30D55F4DB88FE0CAUL: return new CTexture2DGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroupIterator" - case 0xA99CC6C3F70FB6F9UL: return new CCompositeMaterialsIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterialsIterator" - case 0xC2BDF5D8CBBDB1F0UL: return new CMultiPropertyGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" - case 0xD17716D063DE2C22UL: return new CMetaData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" - case 0x0C3B85369E9B25D3UL: return new CMetaDataGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" - case 0x2DA2136F577A779CUL: return new CObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Object" - case 0x3B3A6DC6EC610497UL: return new CMeshObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" - case 0x63B3B461B30B4BA5UL: return new CBeamLattice(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" - case 0x4ECDB6A6F69F2BEBUL: return new CComponent(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Component" - case 0x6522CF04EB283FEDUL: return new CComponentsObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" - case 0x30CCDBE90E00B55BUL: return new CBeamSet(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" - case 0xB27D4656E16609FAUL: return new CBaseMaterialGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroup" - case 0xD085FB2E49CDB5B1UL: return new CColorGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroup" - case 0xBC1208397E37055DUL: return new CTexture2DGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroup" - case 0xCE16224D688B86F2UL: return new CCompositeMaterials(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" - case 0xB989E02E43158FE6UL: return new CMultiPropertyGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" - case 0x8CE7A1191A63A35DUL: return new CAttachment(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Attachment" - case 0xE0441CF976B36319UL: return new CTexture2D(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" - case 0x68FB2D5FFC4BA12AUL: return new CBuildItem(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItem" - case 0xA7D21BD364910860UL: return new CBuildItemIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItemIterator" - case 0x2198BCF4D8DF9C40UL: return new CSlice(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Slice" - case 0x6594B031B6096238UL: return new CSliceStack(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStack" - case 0xD9E46D5E6D8118EEUL: return new CConsumer(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Consumer" - case 0x385C42FC5609498AUL: return new CAccessRight(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::AccessRight" - case 0x7FB36B91D4CE4671UL: return new CContentEncryptionParams(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ContentEncryptionParams" - case 0x1A47A5E258E22EF9UL: return new CResourceData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceData" - case 0xD59067227E428AA4UL: return new CResourceDataGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceDataGroup" - case 0x1CC9E0CC082253C6UL: return new CKeyStore(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::KeyStore" - case 0x5A8164ECEDB03F09UL: return new CModel(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Model" +class CSinhNode : public COneInputNode { +public: + + /** + * CSinhNode::CSinhNode - Constructor for SinhNode class. + */ + CSinhNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CCoshNode +**************************************************************************************************************************/ +class CCoshNode : public COneInputNode { +public: + + /** + * CCoshNode::CCoshNode - Constructor for CoshNode class. + */ + CCoshNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CTanhNode +**************************************************************************************************************************/ +class CTanhNode : public COneInputNode { +public: + + /** + * CTanhNode::CTanhNode - Constructor for TanhNode class. + */ + CTanhNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CRoundNode +**************************************************************************************************************************/ +class CRoundNode : public COneInputNode { +public: + + /** + * CRoundNode::CRoundNode - Constructor for RoundNode class. + */ + CRoundNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CCeilNode +**************************************************************************************************************************/ +class CCeilNode : public COneInputNode { +public: + + /** + * CCeilNode::CCeilNode - Constructor for CeilNode class. + */ + CCeilNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CFloorNode +**************************************************************************************************************************/ +class CFloorNode : public COneInputNode { +public: + + /** + * CFloorNode::CFloorNode - Constructor for FloorNode class. + */ + CFloorNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CSignNode +**************************************************************************************************************************/ +class CSignNode : public COneInputNode { +public: + + /** + * CSignNode::CSignNode - Constructor for SignNode class. + */ + CSignNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CFractNode +**************************************************************************************************************************/ +class CFractNode : public COneInputNode { +public: + + /** + * CFractNode::CFractNode - Constructor for FractNode class. + */ + CFractNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CAbsNode +**************************************************************************************************************************/ +class CAbsNode : public COneInputNode { +public: + + /** + * CAbsNode::CAbsNode - Constructor for AbsNode class. + */ + CAbsNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CExpNode +**************************************************************************************************************************/ +class CExpNode : public COneInputNode { +public: + + /** + * CExpNode::CExpNode - Constructor for ExpNode class. + */ + CExpNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CLogNode +**************************************************************************************************************************/ +class CLogNode : public COneInputNode { +public: + + /** + * CLogNode::CLogNode - Constructor for LogNode class. + */ + CLogNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CLog2Node +**************************************************************************************************************************/ +class CLog2Node : public COneInputNode { +public: + + /** + * CLog2Node::CLog2Node - Constructor for Log2Node class. + */ + CLog2Node(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CLog10Node +**************************************************************************************************************************/ +class CLog10Node : public COneInputNode { +public: + + /** + * CLog10Node::CLog10Node - Constructor for Log10Node class. + */ + CLog10Node(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CLengthNode +**************************************************************************************************************************/ +class CLengthNode : public COneInputNode { +public: + + /** + * CLengthNode::CLengthNode - Constructor for LengthNode class. + */ + CLengthNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CTransposeNode +**************************************************************************************************************************/ +class CTransposeNode : public COneInputNode { +public: + + /** + * CTransposeNode::CTransposeNode - Constructor for TransposeNode class. + */ + CTransposeNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CInverseNode +**************************************************************************************************************************/ +class CInverseNode : public COneInputNode { +public: + + /** + * CInverseNode::CInverseNode - Constructor for InverseNode class. + */ + CInverseNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CSqrtNode +**************************************************************************************************************************/ +class CSqrtNode : public COneInputNode { +public: + + /** + * CSqrtNode::CSqrtNode - Constructor for SqrtNode class. + */ + CSqrtNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CResourceIdNode +**************************************************************************************************************************/ +class CResourceIdNode : public CImplicitNode { +public: + + /** + * CResourceIdNode::CResourceIdNode - Constructor for ResourceIdNode class. + */ + CResourceIdNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline void SetResource(classParam pResource); + inline PResource GetResource(); + inline PImplicitPort GetOutputValue(); +}; + +/************************************************************************************************************************* + Class CTwoInputNode +**************************************************************************************************************************/ +class CTwoInputNode : public COneInputNode { +public: + + /** + * CTwoInputNode::CTwoInputNode - Constructor for TwoInputNode class. + */ + CTwoInputNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputB(); +}; + +/************************************************************************************************************************* + Class CAdditionNode +**************************************************************************************************************************/ +class CAdditionNode : public CTwoInputNode { +public: + + /** + * CAdditionNode::CAdditionNode - Constructor for AdditionNode class. + */ + CAdditionNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CSubtractionNode +**************************************************************************************************************************/ +class CSubtractionNode : public CTwoInputNode { +public: + + /** + * CSubtractionNode::CSubtractionNode - Constructor for SubtractionNode class. + */ + CSubtractionNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CMultiplicationNode +**************************************************************************************************************************/ +class CMultiplicationNode : public CTwoInputNode { +public: + + /** + * CMultiplicationNode::CMultiplicationNode - Constructor for MultiplicationNode class. + */ + CMultiplicationNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CDivisionNode +**************************************************************************************************************************/ +class CDivisionNode : public CTwoInputNode { +public: + + /** + * CDivisionNode::CDivisionNode - Constructor for DivisionNode class. + */ + CDivisionNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CDotNode +**************************************************************************************************************************/ +class CDotNode : public CTwoInputNode { +public: + + /** + * CDotNode::CDotNode - Constructor for DotNode class. + */ + CDotNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CCrossNode +**************************************************************************************************************************/ +class CCrossNode : public CTwoInputNode { +public: + + /** + * CCrossNode::CCrossNode - Constructor for CrossNode class. + */ + CCrossNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CArcTan2Node +**************************************************************************************************************************/ +class CArcTan2Node : public CTwoInputNode { +public: + + /** + * CArcTan2Node::CArcTan2Node - Constructor for ArcTan2Node class. + */ + CArcTan2Node(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CMatVecMultiplicationNode +**************************************************************************************************************************/ +class CMatVecMultiplicationNode : public CTwoInputNode { +public: + + /** + * CMatVecMultiplicationNode::CMatVecMultiplicationNode - Constructor for MatVecMultiplicationNode class. + */ + CMatVecMultiplicationNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CMinNode +**************************************************************************************************************************/ +class CMinNode : public CTwoInputNode { +public: + + /** + * CMinNode::CMinNode - Constructor for MinNode class. + */ + CMinNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CMaxNode +**************************************************************************************************************************/ +class CMaxNode : public CTwoInputNode { +public: + + /** + * CMaxNode::CMaxNode - Constructor for MaxNode class. + */ + CMaxNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CFmodNode +**************************************************************************************************************************/ +class CFmodNode : public CTwoInputNode { +public: + + /** + * CFmodNode::CFmodNode - Constructor for FmodNode class. + */ + CFmodNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CModNode +**************************************************************************************************************************/ +class CModNode : public CTwoInputNode { +public: + + /** + * CModNode::CModNode - Constructor for ModNode class. + */ + CModNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CPowNode +**************************************************************************************************************************/ +class CPowNode : public CTwoInputNode { +public: + + /** + * CPowNode::CPowNode - Constructor for PowNode class. + */ + CPowNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CSelectNode +**************************************************************************************************************************/ +class CSelectNode : public COneInputNode { +public: + + /** + * CSelectNode::CSelectNode - Constructor for SelectNode class. + */ + CSelectNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputB(); + inline PImplicitPort GetInputC(); + inline PImplicitPort GetInputD(); +}; + +/************************************************************************************************************************* + Class CClampNode +**************************************************************************************************************************/ +class CClampNode : public COneInputNode { +public: + + /** + * CClampNode::CClampNode - Constructor for ClampNode class. + */ + CClampNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputMin(); + inline PImplicitPort GetInputMax(); +}; + +/************************************************************************************************************************* + Class CComposeVectorNode +**************************************************************************************************************************/ +class CComposeVectorNode : public CImplicitNode { +public: + + /** + * CComposeVectorNode::CComposeVectorNode - Constructor for ComposeVectorNode class. + */ + CComposeVectorNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputX(); + inline PImplicitPort GetInputY(); + inline PImplicitPort GetInputZ(); + inline PImplicitPort GetOutputResult(); +}; + +/************************************************************************************************************************* + Class CVectorFromScalarNode +**************************************************************************************************************************/ +class CVectorFromScalarNode : public COneInputNode { +public: + + /** + * CVectorFromScalarNode::CVectorFromScalarNode - Constructor for VectorFromScalarNode class. + */ + CVectorFromScalarNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CDecomposeVectorNode +**************************************************************************************************************************/ +class CDecomposeVectorNode : public CImplicitNode { +public: + + /** + * CDecomposeVectorNode::CDecomposeVectorNode - Constructor for DecomposeVectorNode class. + */ + CDecomposeVectorNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputA(); + inline PImplicitPort GetOutputX(); + inline PImplicitPort GetOutputY(); + inline PImplicitPort GetOutputZ(); +}; + +/************************************************************************************************************************* + Class CComposeMatrixNode +**************************************************************************************************************************/ +class CComposeMatrixNode : public CImplicitNode { +public: + + /** + * CComposeMatrixNode::CComposeMatrixNode - Constructor for ComposeMatrixNode class. + */ + CComposeMatrixNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputM00(); + inline PImplicitPort GetInputM01(); + inline PImplicitPort GetInputM02(); + inline PImplicitPort GetInputM03(); + inline PImplicitPort GetInputM10(); + inline PImplicitPort GetInputM11(); + inline PImplicitPort GetInputM12(); + inline PImplicitPort GetInputM13(); + inline PImplicitPort GetInputM20(); + inline PImplicitPort GetInputM21(); + inline PImplicitPort GetInputM22(); + inline PImplicitPort GetInputM23(); + inline PImplicitPort GetInputM30(); + inline PImplicitPort GetInputM31(); + inline PImplicitPort GetInputM32(); + inline PImplicitPort GetInputM33(); + inline PImplicitPort GetOutputResult(); +}; + +/************************************************************************************************************************* + Class CMatrixFromRowsNode +**************************************************************************************************************************/ +class CMatrixFromRowsNode : public CImplicitNode { +public: + + /** + * CMatrixFromRowsNode::CMatrixFromRowsNode - Constructor for MatrixFromRowsNode class. + */ + CMatrixFromRowsNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputA(); + inline PImplicitPort GetInputB(); + inline PImplicitPort GetInputC(); + inline PImplicitPort GetInputD(); + inline PImplicitPort GetOutputResult(); +}; + +/************************************************************************************************************************* + Class CMatrixFromColumnsNode +**************************************************************************************************************************/ +class CMatrixFromColumnsNode : public CImplicitNode { +public: + + /** + * CMatrixFromColumnsNode::CMatrixFromColumnsNode - Constructor for MatrixFromColumnsNode class. + */ + CMatrixFromColumnsNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputA(); + inline PImplicitPort GetInputB(); + inline PImplicitPort GetInputC(); + inline PImplicitPort GetInputD(); + inline PImplicitPort GetOutputResult(); +}; + +/************************************************************************************************************************* + Class CConstantNode +**************************************************************************************************************************/ +class CConstantNode : public CImplicitNode { +public: + + /** + * CConstantNode::CConstantNode - Constructor for ConstantNode class. + */ + CConstantNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline void SetConstant(const Lib3MF_double dValue); + inline Lib3MF_double GetConstant(); + inline PImplicitPort GetOutputValue(); +}; + +/************************************************************************************************************************* + Class CConstVecNode +**************************************************************************************************************************/ +class CConstVecNode : public CImplicitNode { +public: + + /** + * CConstVecNode::CConstVecNode - Constructor for ConstVecNode class. + */ + CConstVecNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline void SetVector(const sVector & Value); + inline sVector GetVector(); + inline PImplicitPort GetOutputVector(); +}; + +/************************************************************************************************************************* + Class CConstMatNode +**************************************************************************************************************************/ +class CConstMatNode : public CImplicitNode { +public: + + /** + * CConstMatNode::CConstMatNode - Constructor for ConstMatNode class. + */ + CConstMatNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline void SetMatrix(const sMatrix4x4 & Value); + inline sMatrix4x4 GetMatrix(); + inline PImplicitPort GetOutputMatrix(); +}; + +/************************************************************************************************************************* + Class CMeshNode +**************************************************************************************************************************/ +class CMeshNode : public CImplicitNode { +public: + + /** + * CMeshNode::CMeshNode - Constructor for MeshNode class. + */ + CMeshNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputMesh(); + inline PImplicitPort GetInputPos(); + inline PImplicitPort GetOutputDistance(); +}; + +/************************************************************************************************************************* + Class CUnsignedMeshNode +**************************************************************************************************************************/ +class CUnsignedMeshNode : public CImplicitNode { +public: + + /** + * CUnsignedMeshNode::CUnsignedMeshNode - Constructor for UnsignedMeshNode class. + */ + CUnsignedMeshNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputMesh(); + inline PImplicitPort GetInputPos(); + inline PImplicitPort GetOutputDistance(); +}; + +/************************************************************************************************************************* + Class CFunctionCallNode +**************************************************************************************************************************/ +class CFunctionCallNode : public CImplicitNode { +public: + + /** + * CFunctionCallNode::CFunctionCallNode - Constructor for FunctionCallNode class. + */ + CFunctionCallNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputFunctionID(); +}; + +/************************************************************************************************************************* + Class CNodeIterator +**************************************************************************************************************************/ +class CNodeIterator : public CIterator { +public: + + /** + * CNodeIterator::CNodeIterator - Constructor for NodeIterator class. + */ + CNodeIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CIterator(pWrapper, pHandle) + { + } + + inline PImplicitNode GetCurrent(); +}; + +/************************************************************************************************************************* + Class CFunction +**************************************************************************************************************************/ +class CFunction : public CResource { +public: + + /** + * CFunction::CFunction - Constructor for Function class. + */ + CFunction(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResource(pWrapper, pHandle) + { + } + + inline std::string GetDisplayName(); + inline void SetDisplayName(const std::string & sDisplayName); + inline PImplicitPort AddInput(const std::string & sIdentifier, const std::string & sDisplayName, const eImplicitPortType eType); + inline PImplicitPortIterator GetInputs(); + inline void RemoveInput(classParam pInput); + inline PImplicitPort AddOutput(const std::string & sIdentifier, const std::string & sDisplayName, const eImplicitPortType eType); + inline PImplicitPortIterator GetOutputs(); + inline void RemoveOutput(classParam pOutput); + inline PImplicitPort FindInput(const std::string & sIdentifier); + inline PImplicitPort FindOutput(const std::string & sIdentifier); +}; + +/************************************************************************************************************************* + Class CImplicitFunction +**************************************************************************************************************************/ +class CImplicitFunction : public CFunction { +public: + + /** + * CImplicitFunction::CImplicitFunction - Constructor for ImplicitFunction class. + */ + CImplicitFunction(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CFunction(pWrapper, pHandle) + { + } + + inline std::string GetIdentifier(); + inline void SetIdentifier(const std::string & sIdentifier); + inline PImplicitNode AddNode(const eImplicitNodeType eNodeType, const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PSinNode AddSinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PCosNode AddCosNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PTanNode AddTanNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PArcSinNode AddArcSinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PArcCosNode AddArcCosNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PArcTan2Node AddArcTan2Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PSinhNode AddSinhNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PCoshNode AddCoshNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PTanhNode AddTanhNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PRoundNode AddRoundNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PCeilNode AddCeilNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PFloorNode AddFloorNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PSignNode AddSignNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PFractNode AddFractNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PAbsNode AddAbsNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PExpNode AddExpNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PLogNode AddLogNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PLog2Node AddLog2Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PLog10Node AddLog10Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PLengthNode AddLengthNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PTransposeNode AddTransposeNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PInverseNode InverseNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PSqrtNode AddSqrtNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PResourceIdNode AddResourceIdNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PAdditionNode AddAdditionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PSubtractionNode AddSubtractionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PMultiplicationNode AddMultiplicationNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PDivisionNode AddDivisionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PDotNode AddDotNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PCrossNode AddCrossNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PMatVecMultiplicationNode AddMatVecMultiplicationNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PMinNode AddMinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PMaxNode AddMaxNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PFmodNode AddFmodNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PPowNode AddPowNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PSelectNode AddSelectNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PClampNode AddClampNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PComposeVectorNode AddComposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PVectorFromScalarNode AddVectorFromScalarNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PDecomposeVectorNode AddDecomposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PComposeMatrixNode AddComposeMatrixNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PMatrixFromRowsNode AddMatrixFromRowsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PMatrixFromColumnsNode AddMatrixFromColumnsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PConstantNode AddConstantNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PConstVecNode AddConstVecNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PConstMatNode AddConstMatNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PMeshNode AddMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PUnsignedMeshNode AddUnsignedMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PFunctionCallNode AddFunctionCallNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PNodeIterator GetNodes(); + inline void RemoveNode(classParam pNode); + inline void AddLink(classParam pSource, classParam pTarget); + inline void AddLinkByNames(const std::string & sSource, const std::string & sTarget); + inline void Clear(); + inline void SortNodesTopologically(); +}; + +/************************************************************************************************************************* + Class CFunctionFromImage3D +**************************************************************************************************************************/ +class CFunctionFromImage3D : public CFunction { +public: + + /** + * CFunctionFromImage3D::CFunctionFromImage3D - Constructor for FunctionFromImage3D class. + */ + CFunctionFromImage3D(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CFunction(pWrapper, pHandle) + { + } + + inline PImage3D GetImage3D(); + inline void SetImage3D(classParam pImage3D); + inline void SetFilter(const eTextureFilter eFilter); + inline eTextureFilter GetFilter(); + inline void SetTileStyles(const eTextureTileStyle eTileStyleU, const eTextureTileStyle eTileStyleV, const eTextureTileStyle eTileStyleW); + inline void GetTileStyles(eTextureTileStyle & eTileStyleU, eTextureTileStyle & eTileStyleV, eTextureTileStyle & eTileStyleW); + inline Lib3MF_double GetOffset(); + inline void SetOffset(const Lib3MF_double dOffset); + inline Lib3MF_double GetScale(); + inline void SetScale(const Lib3MF_double dScale); +}; + +/************************************************************************************************************************* + Class CBuildItem +**************************************************************************************************************************/ +class CBuildItem : public CBase { +public: + + /** + * CBuildItem::CBuildItem - Constructor for BuildItem class. + */ + CBuildItem(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PObject GetObjectResource(); + inline std::string GetUUID(bool & bHasUUID); + inline void SetUUID(const std::string & sUUID); + inline Lib3MF_uint32 GetObjectResourceID(); + inline bool HasObjectTransform(); + inline sTransform GetObjectTransform(); + inline void SetObjectTransform(const sTransform & Transform); + inline std::string GetPartNumber(); + inline void SetPartNumber(const std::string & sSetPartnumber); + inline PMetaDataGroup GetMetaDataGroup(); + inline sBox GetOutbox(); +}; + +/************************************************************************************************************************* + Class CBuildItemIterator +**************************************************************************************************************************/ +class CBuildItemIterator : public CBase { +public: + + /** + * CBuildItemIterator::CBuildItemIterator - Constructor for BuildItemIterator class. + */ + CBuildItemIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline bool MoveNext(); + inline bool MovePrevious(); + inline PBuildItem GetCurrent(); + inline PBuildItemIterator Clone(); + inline Lib3MF_uint64 Count(); +}; + +/************************************************************************************************************************* + Class CSlice +**************************************************************************************************************************/ +class CSlice : public CBase { +public: + + /** + * CSlice::CSlice - Constructor for Slice class. + */ + CSlice(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline void SetVertices(const CInputVector & VerticesBuffer); + inline void GetVertices(std::vector & VerticesBuffer); + inline Lib3MF_uint64 GetVertexCount(); + inline Lib3MF_uint64 AddPolygon(const CInputVector & IndicesBuffer); + inline Lib3MF_uint64 GetPolygonCount(); + inline void SetPolygonIndices(const Lib3MF_uint64 nIndex, const CInputVector & IndicesBuffer); + inline void GetPolygonIndices(const Lib3MF_uint64 nIndex, std::vector & IndicesBuffer); + inline Lib3MF_uint64 GetPolygonIndexCount(const Lib3MF_uint64 nIndex); + inline Lib3MF_double GetZTop(); +}; + +/************************************************************************************************************************* + Class CSliceStack +**************************************************************************************************************************/ +class CSliceStack : public CResource { +public: + + /** + * CSliceStack::CSliceStack - Constructor for SliceStack class. + */ + CSliceStack(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResource(pWrapper, pHandle) + { + } + + inline Lib3MF_double GetBottomZ(); + inline Lib3MF_uint64 GetSliceCount(); + inline PSlice GetSlice(const Lib3MF_uint64 nSliceIndex); + inline PSlice AddSlice(const Lib3MF_double dZTop); + inline Lib3MF_uint64 GetSliceRefCount(); + inline void AddSliceStackReference(classParam pTheSliceStack); + inline PSliceStack GetSliceStackReference(const Lib3MF_uint64 nSliceRefIndex); + inline void CollapseSliceReferences(); + inline void SetOwnPath(const std::string & sPath); + inline std::string GetOwnPath(); +}; + +/************************************************************************************************************************* + Class CConsumer +**************************************************************************************************************************/ +class CConsumer : public CBase { +public: + + /** + * CConsumer::CConsumer - Constructor for Consumer class. + */ + CConsumer(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline std::string GetConsumerID(); + inline std::string GetKeyID(); + inline std::string GetKeyValue(); +}; + +/************************************************************************************************************************* + Class CAccessRight +**************************************************************************************************************************/ +class CAccessRight : public CBase { +public: + + /** + * CAccessRight::CAccessRight - Constructor for AccessRight class. + */ + CAccessRight(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PConsumer GetConsumer(); + inline eWrappingAlgorithm GetWrappingAlgorithm(); + inline eMgfAlgorithm GetMgfAlgorithm(); + inline eDigestMethod GetDigestMethod(); +}; + +/************************************************************************************************************************* + Class CContentEncryptionParams +**************************************************************************************************************************/ +class CContentEncryptionParams : public CBase { +public: + + /** + * CContentEncryptionParams::CContentEncryptionParams - Constructor for ContentEncryptionParams class. + */ + CContentEncryptionParams(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline eEncryptionAlgorithm GetEncryptionAlgorithm(); + inline void GetKey(std::vector & ByteDataBuffer); + inline void GetInitializationVector(std::vector & ByteDataBuffer); + inline void GetAuthenticationTag(std::vector & ByteDataBuffer); + inline void SetAuthenticationTag(const CInputVector & ByteDataBuffer); + inline void GetAdditionalAuthenticationData(std::vector & ByteDataBuffer); + inline Lib3MF_uint64 GetDescriptor(); + inline std::string GetKeyUUID(); +}; + +/************************************************************************************************************************* + Class CResourceData +**************************************************************************************************************************/ +class CResourceData : public CBase { +public: + + /** + * CResourceData::CResourceData - Constructor for ResourceData class. + */ + CResourceData(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PPackagePart GetPath(); + inline eEncryptionAlgorithm GetEncryptionAlgorithm(); + inline eCompression GetCompression(); + inline void GetAdditionalAuthenticationData(std::vector & ByteDataBuffer); +}; + +/************************************************************************************************************************* + Class CResourceDataGroup +**************************************************************************************************************************/ +class CResourceDataGroup : public CBase { +public: + + /** + * CResourceDataGroup::CResourceDataGroup - Constructor for ResourceDataGroup class. + */ + CResourceDataGroup(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline std::string GetKeyUUID(); + inline PAccessRight AddAccessRight(classParam pConsumer, const eWrappingAlgorithm eWrappingAlgorithm, const eMgfAlgorithm eMgfAlgorithm, const eDigestMethod eDigestMethod); + inline PAccessRight FindAccessRightByConsumer(classParam pConsumer); + inline void RemoveAccessRight(classParam pConsumer); +}; + +/************************************************************************************************************************* + Class CKeyStore +**************************************************************************************************************************/ +class CKeyStore : public CBase { +public: + + /** + * CKeyStore::CKeyStore - Constructor for KeyStore class. + */ + CKeyStore(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PConsumer AddConsumer(const std::string & sConsumerID, const std::string & sKeyID, const std::string & sKeyValue); + inline Lib3MF_uint64 GetConsumerCount(); + inline PConsumer GetConsumer(const Lib3MF_uint64 nConsumerIndex); + inline void RemoveConsumer(classParam pConsumer); + inline PConsumer FindConsumer(const std::string & sConsumerID); + inline Lib3MF_uint64 GetResourceDataGroupCount(); + inline PResourceDataGroup AddResourceDataGroup(); + inline PResourceDataGroup GetResourceDataGroup(const Lib3MF_uint64 nResourceDataIndex); + inline void RemoveResourceDataGroup(classParam pResourceDataGroup); + inline PResourceDataGroup FindResourceDataGroup(classParam pPartPath); + inline PResourceData AddResourceData(classParam pResourceDataGroup, classParam pPartPath, const eEncryptionAlgorithm eAlgorithm, const eCompression eCompression, const CInputVector & AdditionalAuthenticationDataBuffer); + inline void RemoveResourceData(classParam pResourceData); + inline PResourceData FindResourceData(classParam pResourcePath); + inline Lib3MF_uint64 GetResourceDataCount(); + inline PResourceData GetResourceData(const Lib3MF_uint64 nResourceDataIndex); + inline std::string GetUUID(bool & bHasUUID); + inline void SetUUID(const std::string & sUUID); +}; + +/************************************************************************************************************************* + Class CModel +**************************************************************************************************************************/ +class CModel : public CBase { +public: + + /** + * CModel::CModel - Constructor for Model class. + */ + CModel(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PPackagePart RootModelPart(); + inline PPackagePart FindOrCreatePackagePart(const std::string & sAbsolutePath); + inline void SetUnit(const eModelUnit eUnit); + inline eModelUnit GetUnit(); + inline std::string GetLanguage(); + inline void SetLanguage(const std::string & sLanguage); + inline PWriter QueryWriter(const std::string & sWriterClass); + inline PReader QueryReader(const std::string & sReaderClass); + inline PResource GetResourceByID(const Lib3MF_uint32 nUniqueResourceID); + inline PTexture2D GetTexture2DByID(const Lib3MF_uint32 nUniqueResourceID); + inline ePropertyType GetPropertyTypeByID(const Lib3MF_uint32 nUniqueResourceID); + inline PBaseMaterialGroup GetBaseMaterialGroupByID(const Lib3MF_uint32 nUniqueResourceID); + inline PTexture2DGroup GetTexture2DGroupByID(const Lib3MF_uint32 nUniqueResourceID); + inline PCompositeMaterials GetCompositeMaterialsByID(const Lib3MF_uint32 nUniqueResourceID); + inline PMultiPropertyGroup GetMultiPropertyGroupByID(const Lib3MF_uint32 nUniqueResourceID); + inline PMeshObject GetMeshObjectByID(const Lib3MF_uint32 nUniqueResourceID); + inline PComponentsObject GetComponentsObjectByID(const Lib3MF_uint32 nUniqueResourceID); + inline PColorGroup GetColorGroupByID(const Lib3MF_uint32 nUniqueResourceID); + inline PSliceStack GetSliceStackByID(const Lib3MF_uint32 nUniqueResourceID); + inline PLevelSet GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID); + inline std::string GetBuildUUID(bool & bHasUUID); + inline void SetBuildUUID(const std::string & sUUID); + inline PBuildItemIterator GetBuildItems(); + inline sBox GetOutbox(); + inline PResourceIterator GetResources(); + inline PObjectIterator GetObjects(); + inline PMeshObjectIterator GetMeshObjects(); + inline PComponentsObjectIterator GetComponentsObjects(); + inline PTexture2DIterator GetTexture2Ds(); + inline PBaseMaterialGroupIterator GetBaseMaterialGroups(); + inline PColorGroupIterator GetColorGroups(); + inline PTexture2DGroupIterator GetTexture2DGroups(); + inline PCompositeMaterialsIterator GetCompositeMaterials(); + inline PMultiPropertyGroupIterator GetMultiPropertyGroups(); + inline PSliceStackIterator GetSliceStacks(); + inline PImage3DIterator GetImage3Ds(); + inline PModel MergeToModel(); + inline void MergeFromModel(classParam pModelInstance); + inline PMeshObject AddMeshObject(); + inline PComponentsObject AddComponentsObject(); + inline PSliceStack AddSliceStack(const Lib3MF_double dZBottom); + inline PTexture2D AddTexture2DFromAttachment(classParam pTextureAttachment); + inline PBaseMaterialGroup AddBaseMaterialGroup(); + inline PColorGroup AddColorGroup(); + inline PTexture2DGroup AddTexture2DGroup(classParam pTexture2DInstance); + inline PCompositeMaterials AddCompositeMaterials(classParam pBaseMaterialGroupInstance); + inline PMultiPropertyGroup AddMultiPropertyGroup(); + inline PImageStack AddImageStack(const Lib3MF_uint32 nColumnCount, const Lib3MF_uint32 nRowCount, const Lib3MF_uint32 nSheetCount); + inline PImageStack GetImageStackByID(const Lib3MF_uint32 nUniqueResourceID); + inline PBuildItem AddBuildItem(classParam pObject, const sTransform & Transform); + inline void RemoveBuildItem(classParam pBuildItemInstance); + inline PMetaDataGroup GetMetaDataGroup(); + inline PAttachment AddAttachment(const std::string & sURI, const std::string & sRelationShipType); + inline void RemoveAttachment(classParam pAttachmentInstance); + inline PAttachment GetAttachment(const Lib3MF_uint32 nIndex); + inline PAttachment FindAttachment(const std::string & sURI); + inline Lib3MF_uint32 GetAttachmentCount(); + inline bool HasPackageThumbnailAttachment(); + inline PAttachment CreatePackageThumbnailAttachment(); + inline PAttachment GetPackageThumbnailAttachment(); + inline void RemovePackageThumbnailAttachment(); + inline void AddCustomContentType(const std::string & sExtension, const std::string & sContentType); + inline void RemoveCustomContentType(const std::string & sExtension); + inline void SetRandomNumberCallback(const RandomNumberCallback pTheCallback, const Lib3MF_pvoid pUserData); + inline PKeyStore GetKeyStore(); + inline PFunctionIterator GetFunctions(); + inline PImplicitFunction AddImplicitFunction(); + inline PFunctionFromImage3D AddFunctionFromImage3D(classParam pImage3DInstance); + inline PVolumeData AddVolumeData(); + inline PLevelSet AddLevelSet(); + inline PLevelSetIterator GetLevelSets(); + inline void RemoveResource(classParam pResource); +}; + +/************************************************************************************************************************* + RTTI: Polymorphic Factory implementation +**************************************************************************************************************************/ + +/** +* IMPORTANT: PolymorphicFactory method should not be used by application directly. +* It's designed to be used on Lib3MFHandle object only once. +* If it's used on any existing object as a form of dynamic cast then +* CWrapper::AcquireInstance(CBase object) must be called after instantiating new object. +* This is important to keep reference count matching between application and library sides. +*/ +inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) +{ + Lib3MF_uint64 resultClassTypeId = 0; + CheckError(nullptr, lib3mf_base_classtypeid(pHandle, &resultClassTypeId)); + switch(resultClassTypeId) { + case 0x856632D0BAF1D8B7UL: return new CBase(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Base" + case 0xE76F642F363FD7E9UL: return new CWriter(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Writer" + case 0x2D86831DA59FBE72UL: return new CReader(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Reader" + case 0x0E55A826D377483EUL: return new CPackagePart(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::PackagePart" + case 0xDFE3889D1B269CBBUL: return new CResource(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Resource" + case 0x460F3515E2621DBEUL: return new CResourceIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIterator" + case 0x69684DB99FA813F6UL: return new CSliceStackIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStackIterator" + case 0xDE92510BD2112288UL: return new CObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ObjectIterator" + case 0xF4196034E2B9FDE6UL: return new CMeshObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObjectIterator" + case 0x564DE4217ED7614AUL: return new CComponentsObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObjectIterator" + case 0x4BD32B4870FFC03BUL: return new CTexture2DIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DIterator" + case 0x65E6EDD9362C79CBUL: return new CBaseMaterialGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroupIterator" + case 0x10274A1757C729C0UL: return new CColorGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroupIterator" + case 0x30D55F4DB88FE0CAUL: return new CTexture2DGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroupIterator" + case 0xA99CC6C3F70FB6F9UL: return new CCompositeMaterialsIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterialsIterator" + case 0xC2BDF5D8CBBDB1F0UL: return new CMultiPropertyGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" + case 0xC4B8EC00A82BF336UL: return new CImage3DIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" + case 0x40E9035363ACE65EUL: return new CFunctionIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" + case 0xA0C005C035D5371DUL: return new CLevelSetIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + case 0xD17716D063DE2C22UL: return new CMetaData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" + case 0x0C3B85369E9B25D3UL: return new CMetaDataGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" + case 0x2DA2136F577A779CUL: return new CObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Object" + case 0x3B3A6DC6EC610497UL: return new CMeshObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" + case 0xE8A7D9C192EFD0E2UL: return new CLevelSet(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + case 0x63B3B461B30B4BA5UL: return new CBeamLattice(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" + case 0x4DF17E76926221C2UL: return new CFunctionReference(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" + case 0xD85B5B6143E787E3UL: return new CVolumeDataColor(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" + case 0x241FE6B4817C3FE4UL: return new CMaterialMapping(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MaterialMapping" + case 0x46F1DAC40581B304UL: return new CVolumeDataComposite(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataComposite" + case 0xFC368AA44ACE42DAUL: return new CVolumeDataProperty(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataProperty" + case 0x9200586FB91587A7UL: return new CVolumeData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeData" + case 0x4ECDB6A6F69F2BEBUL: return new CComponent(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Component" + case 0x6522CF04EB283FEDUL: return new CComponentsObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" + case 0x30CCDBE90E00B55BUL: return new CBeamSet(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" + case 0xB27D4656E16609FAUL: return new CBaseMaterialGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroup" + case 0xD085FB2E49CDB5B1UL: return new CColorGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroup" + case 0xBC1208397E37055DUL: return new CTexture2DGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroup" + case 0xCE16224D688B86F2UL: return new CCompositeMaterials(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" + case 0xB989E02E43158FE6UL: return new CMultiPropertyGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" + case 0xBD938FF2D2663D61UL: return new CImage3D(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3D" + case 0x13A2561F0CFB712AUL: return new CImageStack(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImageStack" + case 0x8CE7A1191A63A35DUL: return new CAttachment(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Attachment" + case 0xE0441CF976B36319UL: return new CTexture2D(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" + case 0xD5C49B04AF1963CDUL: return new CImplicitPort(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPort" + case 0x52F06268CD098EFEUL: return new CIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Iterator" + case 0xC62268F2D7C7012CUL: return new CImplicitPortIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPortIterator" + case 0xE72592A7725AB29BUL: return new CImplicitNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitNode" + case 0xB19B9FDA94B0A5E7UL: return new COneInputNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::OneInputNode" + case 0xD5AEA50A56306722UL: return new CSinNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SinNode" + case 0x59BC328F6FB5C5FFUL: return new CCosNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CosNode" + case 0x2614CC572AF350B7UL: return new CTanNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::TanNode" + case 0xE554C8A7E72AAF4DUL: return new CArcSinNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcSinNode" + case 0x943AF6AE0EFD2B8AUL: return new CArcCosNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcCosNode" + case 0xE47D547615816BADUL: return new CArcTanNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTanNode" + case 0x3C7756A456F2D089UL: return new CSinhNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SinhNode" + case 0x4A993F91E1DE256DUL: return new CCoshNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CoshNode" + case 0xCF077B19B0B78E9DUL: return new CTanhNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::TanhNode" + case 0xD9F5A53C657765AEUL: return new CRoundNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::RoundNode" + case 0x627E211653E11D93UL: return new CCeilNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CeilNode" + case 0x392A0F4C041D249CUL: return new CFloorNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FloorNode" + case 0x8A45165E6C9646D7UL: return new CSignNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SignNode" + case 0x53E62FD67F4D9A65UL: return new CFractNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FractNode" + case 0x6B641C7060040BE3UL: return new CAbsNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::AbsNode" + case 0x3390243A8E2410F3UL: return new CExpNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ExpNode" + case 0x0070021D73AA89FDUL: return new CLogNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LogNode" + case 0xE8C0ABF7C5DC7068UL: return new CLog2Node(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Log2Node" + case 0x87740AD53454E0DFUL: return new CLog10Node(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Log10Node" + case 0xD85889E2739A74B1UL: return new CLengthNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LengthNode" + case 0xA808B7599C158CE6UL: return new CTransposeNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::TransposeNode" + case 0xE8601F66A23A0540UL: return new CInverseNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::InverseNode" + case 0x9F831944A3DE31DAUL: return new CSqrtNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SqrtNode" + case 0xCA86A77C71CD3FAEUL: return new CResourceIdNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIdNode" + case 0x7DE3951BA4C1064CUL: return new CTwoInputNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::TwoInputNode" + case 0x57A2236998DF5248UL: return new CAdditionNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::AdditionNode" + case 0x6079B12FFF345D02UL: return new CSubtractionNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SubtractionNode" + case 0xA3C27CF54C2AA76CUL: return new CMultiplicationNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiplicationNode" + case 0xB896B6413C08CF39UL: return new CDivisionNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::DivisionNode" + case 0xFE60932A66375FADUL: return new CDotNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::DotNode" + case 0x106182D38CA5CFE3UL: return new CCrossNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CrossNode" + case 0xB6153EF5DE7E5E11UL: return new CArcTan2Node(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTan2Node" + case 0x7570C43B9721D0C0UL: return new CMatVecMultiplicationNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatVecMultiplicationNode" + case 0x846AFDE9A091E997UL: return new CMinNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MinNode" + case 0x073F910381BF250DUL: return new CMaxNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MaxNode" + case 0x1EF703D298223F2AUL: return new CFmodNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FmodNode" + case 0xEA57335849379F22UL: return new CModNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ModNode" + case 0x7700AA17CA1AC0F8UL: return new CPowNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::PowNode" + case 0x1127ED71E05A9BD4UL: return new CSelectNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SelectNode" + case 0x77AF68C971B1485FUL: return new CClampNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ClampNode" + case 0x49C24B8840C01F7EUL: return new CComposeVectorNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeVectorNode" + case 0x2E417B93351375E2UL: return new CVectorFromScalarNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VectorFromScalarNode" + case 0xCC4F8D561CCE35D4UL: return new CDecomposeVectorNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::DecomposeVectorNode" + case 0x9EF9EB54A53AA40DUL: return new CComposeMatrixNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeMatrixNode" + case 0xD6DFD0A7EB64AC33UL: return new CMatrixFromRowsNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromRowsNode" + case 0x0DCBEAFCF83F3AACUL: return new CMatrixFromColumnsNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromColumnsNode" + case 0x3F8E5D082F966B1BUL: return new CConstantNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstantNode" + case 0x9C9363B3F708D556UL: return new CConstVecNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstVecNode" + case 0xF85C90EDCE6F90A4UL: return new CConstMatNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" + case 0x53601FD432E3DEF4UL: return new CMeshNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" + case 0x29985A628251A9CDUL: return new CUnsignedMeshNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + case 0x0765C17C952F24E3UL: return new CFunctionCallNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" + case 0xFC006BC888CAB4D0UL: return new CNodeIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" + case 0x9EFB2757CA1A5231UL: return new CFunction(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Function" + case 0x6CE54469EEA83BC1UL: return new CImplicitFunction(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitFunction" + case 0x9BD7D3C2026B8CE8UL: return new CFunctionFromImage3D(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionFromImage3D" + case 0x68FB2D5FFC4BA12AUL: return new CBuildItem(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItem" + case 0xA7D21BD364910860UL: return new CBuildItemIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItemIterator" + case 0x2198BCF4D8DF9C40UL: return new CSlice(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Slice" + case 0x6594B031B6096238UL: return new CSliceStack(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStack" + case 0xD9E46D5E6D8118EEUL: return new CConsumer(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Consumer" + case 0x385C42FC5609498AUL: return new CAccessRight(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::AccessRight" + case 0x7FB36B91D4CE4671UL: return new CContentEncryptionParams(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ContentEncryptionParams" + case 0x1A47A5E258E22EF9UL: return new CResourceData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceData" + case 0xD59067227E428AA4UL: return new CResourceDataGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceDataGroup" + case 0x1CC9E0CC082253C6UL: return new CKeyStore(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::KeyStore" + case 0x5A8164ECEDB03F09UL: return new CModel(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Model" + } + return new CBase(this, pHandle); +} + + /** + * CWrapper::GetLibraryVersion - retrieves the binary version of this library. + * @param[out] nMajor - returns the major version of this library + * @param[out] nMinor - returns the minor version of this library + * @param[out] nMicro - returns the micro version of this library + */ + inline void CWrapper::GetLibraryVersion(Lib3MF_uint32 & nMajor, Lib3MF_uint32 & nMinor, Lib3MF_uint32 & nMicro) + { + CheckError(nullptr,lib3mf_getlibraryversion(&nMajor, &nMinor, &nMicro)); + } + + /** + * CWrapper::GetPrereleaseInformation - retrieves prerelease information of this library. + * @return Does the library provide prerelease version? + * @param[out] sPrereleaseInfo - retrieves prerelease information of this library. + */ + inline bool CWrapper::GetPrereleaseInformation(std::string & sPrereleaseInfo) + { + bool resultHasPrereleaseInfo = 0; + Lib3MF_uint32 bytesNeededPrereleaseInfo = 0; + Lib3MF_uint32 bytesWrittenPrereleaseInfo = 0; + CheckError(nullptr,lib3mf_getprereleaseinformation(&resultHasPrereleaseInfo, 0, &bytesNeededPrereleaseInfo, nullptr)); + std::vector bufferPrereleaseInfo(bytesNeededPrereleaseInfo); + CheckError(nullptr,lib3mf_getprereleaseinformation(&resultHasPrereleaseInfo, bytesNeededPrereleaseInfo, &bytesWrittenPrereleaseInfo, &bufferPrereleaseInfo[0])); + sPrereleaseInfo = std::string(&bufferPrereleaseInfo[0]); + + return resultHasPrereleaseInfo; + } + + /** + * CWrapper::GetBuildInformation - retrieves build information of this library. + * @return Does the library provide build version? + * @param[out] sBuildInformation - retrieves build information of this library. + */ + inline bool CWrapper::GetBuildInformation(std::string & sBuildInformation) + { + bool resultHasBuildInfo = 0; + Lib3MF_uint32 bytesNeededBuildInformation = 0; + Lib3MF_uint32 bytesWrittenBuildInformation = 0; + CheckError(nullptr,lib3mf_getbuildinformation(&resultHasBuildInfo, 0, &bytesNeededBuildInformation, nullptr)); + std::vector bufferBuildInformation(bytesNeededBuildInformation); + CheckError(nullptr,lib3mf_getbuildinformation(&resultHasBuildInfo, bytesNeededBuildInformation, &bytesWrittenBuildInformation, &bufferBuildInformation[0])); + sBuildInformation = std::string(&bufferBuildInformation[0]); + + return resultHasBuildInfo; + } + + /** + * CWrapper::GetSpecificationVersion - retrieves whether a specification is supported, and if so, which version. + * @param[in] sSpecificationURL - URL of extension to check + * @param[out] bIsSupported - returns whether this specification is supported + * @param[out] nMajor - returns the major version of the extension (if IsSupported) + * @param[out] nMinor - returns the minor version of the extension (if IsSupported) + * @param[out] nMicro - returns the micro version of the extension (if IsSupported) + */ + inline void CWrapper::GetSpecificationVersion(const std::string & sSpecificationURL, bool & bIsSupported, Lib3MF_uint32 & nMajor, Lib3MF_uint32 & nMinor, Lib3MF_uint32 & nMicro) + { + CheckError(nullptr,lib3mf_getspecificationversion(sSpecificationURL.c_str(), &bIsSupported, &nMajor, &nMinor, &nMicro)); + } + + /** + * CWrapper::CreateModel - creates an empty model instance. + * @return returns an empty model instance + */ + inline PModel CWrapper::CreateModel() + { + Lib3MFHandle hModel = nullptr; + CheckError(nullptr,lib3mf_createmodel(&hModel)); + + if (!hModel) { + CheckError(nullptr,LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(this->polymorphicFactory(hModel))); + } + + /** + * CWrapper::Release - releases shared ownership of an object instance + * @param[in] pInstance - the object instance to release + */ + inline void CWrapper::Release(classParam pInstance) + { + Lib3MFHandle hInstance = pInstance.GetHandle(); + CheckError(nullptr,lib3mf_release(hInstance)); + } + + /** + * CWrapper::Acquire - acquires shared ownership of an object instance + * @param[in] pInstance - the object instance to acquire + */ + inline void CWrapper::Acquire(classParam pInstance) + { + Lib3MFHandle hInstance = pInstance.GetHandle(); + CheckError(nullptr,lib3mf_acquire(hInstance)); + } + + /** + * CWrapper::SetJournal - Sets the journal file path + * @param[in] sJournalPath - File name of the journal file + */ + inline void CWrapper::SetJournal(const std::string & sJournalPath) + { + CheckError(nullptr,lib3mf_setjournal(sJournalPath.c_str())); + } + + /** + * CWrapper::GetLastError - Retrieves the last error string of an instance + * @param[in] pInstance - Object where the error occured. + * @param[out] sLastErrorString - Last Error String + * @return Returns if the instance has a last error. + */ + inline bool CWrapper::GetLastError(classParam pInstance, std::string & sLastErrorString) + { + Lib3MFHandle hInstance = pInstance.GetHandle(); + Lib3MF_uint32 bytesNeededLastErrorString = 0; + Lib3MF_uint32 bytesWrittenLastErrorString = 0; + bool resultHasLastError = 0; + CheckError(nullptr,lib3mf_getlasterror(hInstance, 0, &bytesNeededLastErrorString, nullptr, &resultHasLastError)); + std::vector bufferLastErrorString(bytesNeededLastErrorString); + CheckError(nullptr,lib3mf_getlasterror(hInstance, bytesNeededLastErrorString, &bytesWrittenLastErrorString, &bufferLastErrorString[0], &resultHasLastError)); + sLastErrorString = std::string(&bufferLastErrorString[0]); + + return resultHasLastError; + } + + /** + * CWrapper::GetSymbolLookupMethod - Returns the address of the SymbolLookupMethod + * @return Address of the SymbolAddressMethod + */ + inline Lib3MF_pvoid CWrapper::GetSymbolLookupMethod() + { + Lib3MF_pvoid resultSymbolLookupMethod = 0; + CheckError(nullptr,lib3mf_getsymbollookupmethod(&resultSymbolLookupMethod)); + + return resultSymbolLookupMethod; + } + + /** + * CWrapper::RetrieveProgressMessage - Return an English text for a progress identifier.|Note: this is the only function you can call from your callback function. + * @param[in] eTheProgressIdentifier - the progress identifier that is passed to the callback function + * @param[out] sProgressMessage - English text for the progress identifier + */ + inline void CWrapper::RetrieveProgressMessage(const eProgressIdentifier eTheProgressIdentifier, std::string & sProgressMessage) + { + Lib3MF_uint32 bytesNeededProgressMessage = 0; + Lib3MF_uint32 bytesWrittenProgressMessage = 0; + CheckError(nullptr,lib3mf_retrieveprogressmessage(eTheProgressIdentifier, 0, &bytesNeededProgressMessage, nullptr)); + std::vector bufferProgressMessage(bytesNeededProgressMessage); + CheckError(nullptr,lib3mf_retrieveprogressmessage(eTheProgressIdentifier, bytesNeededProgressMessage, &bytesWrittenProgressMessage, &bufferProgressMessage[0])); + sProgressMessage = std::string(&bufferProgressMessage[0]); + } + + /** + * CWrapper::RGBAToColor - Creates a Color from uint8 RGBA values + * @param[in] nRed - Red value of color (0-255) + * @param[in] nGreen - Green value of color (0-255) + * @param[in] nBlue - Blue value of color (0-255) + * @param[in] nAlpha - Alpha value of color (0-255) + * @return Assembled color + */ + inline sColor CWrapper::RGBAToColor(const Lib3MF_uint8 nRed, const Lib3MF_uint8 nGreen, const Lib3MF_uint8 nBlue, const Lib3MF_uint8 nAlpha) + { + sColor resultTheColor; + CheckError(nullptr,lib3mf_rgbatocolor(nRed, nGreen, nBlue, nAlpha, &resultTheColor)); + + return resultTheColor; + } + + /** + * CWrapper::FloatRGBAToColor - Creates a Color from uint8 RGBA values + * @param[in] fRed - Red value of color (0-1) + * @param[in] fGreen - Green value of color (0-1) + * @param[in] fBlue - Blue value of color (0-1) + * @param[in] fAlpha - Alpha value of color (0-1) + * @return Assembled color + */ + inline sColor CWrapper::FloatRGBAToColor(const Lib3MF_single fRed, const Lib3MF_single fGreen, const Lib3MF_single fBlue, const Lib3MF_single fAlpha) + { + sColor resultTheColor; + CheckError(nullptr,lib3mf_floatrgbatocolor(fRed, fGreen, fBlue, fAlpha, &resultTheColor)); + + return resultTheColor; + } + + /** + * CWrapper::ColorToRGBA - Calculates uint8-RGBA-values from a Color + * @param[in] TheColor - Color to handle + * @param[out] nRed - Red value of color (0-255) + * @param[out] nGreen - Green value of color (0-255) + * @param[out] nBlue - Blue value of color (0-255) + * @param[out] nAlpha - Alpha value of color (0-255) + */ + inline void CWrapper::ColorToRGBA(const sColor & TheColor, Lib3MF_uint8 & nRed, Lib3MF_uint8 & nGreen, Lib3MF_uint8 & nBlue, Lib3MF_uint8 & nAlpha) + { + CheckError(nullptr,lib3mf_colortorgba(&TheColor, &nRed, &nGreen, &nBlue, &nAlpha)); + } + + /** + * CWrapper::ColorToFloatRGBA - Calculates float-RGBA-values from a Color + * @param[in] TheColor - Color to handle + * @param[out] fRed - Red value of color (0-1) + * @param[out] fGreen - Green value of color (0-1) + * @param[out] fBlue - Blue value of color (0-1) + * @param[out] fAlpha - Alpha value of color (0-1) + */ + inline void CWrapper::ColorToFloatRGBA(const sColor & TheColor, Lib3MF_single & fRed, Lib3MF_single & fGreen, Lib3MF_single & fBlue, Lib3MF_single & fAlpha) + { + CheckError(nullptr,lib3mf_colortofloatrgba(&TheColor, &fRed, &fGreen, &fBlue, &fAlpha)); + } + + /** + * CWrapper::GetIdentityTransform - Creates an identity transform + * @return Transformation matrix. + */ + inline sTransform CWrapper::GetIdentityTransform() + { + sTransform resultTransform; + CheckError(nullptr,lib3mf_getidentitytransform(&resultTransform)); + + return resultTransform; + } + + /** + * CWrapper::GetUniformScaleTransform - Creates a uniform scale transform + * @param[in] fFactor - Factor in X, Y and Z + * @return Transformation matrix. + */ + inline sTransform CWrapper::GetUniformScaleTransform(const Lib3MF_single fFactor) + { + sTransform resultTransform; + CheckError(nullptr,lib3mf_getuniformscaletransform(fFactor, &resultTransform)); + + return resultTransform; + } + + /** + * CWrapper::GetScaleTransform - Creates a scale transform + * @param[in] fFactorX - Factor in X + * @param[in] fFactorY - Factor in Y + * @param[in] fFactorZ - Factor in Z + * @return Transformation matrix. + */ + inline sTransform CWrapper::GetScaleTransform(const Lib3MF_single fFactorX, const Lib3MF_single fFactorY, const Lib3MF_single fFactorZ) + { + sTransform resultTransform; + CheckError(nullptr,lib3mf_getscaletransform(fFactorX, fFactorY, fFactorZ, &resultTransform)); + + return resultTransform; + } + + /** + * CWrapper::GetTranslationTransform - Creates an translation transform + * @param[in] fVectorX - Translation in X + * @param[in] fVectorY - Translation in Y + * @param[in] fVectorZ - Translation in Z + * @return Transformation matrix. + */ + inline sTransform CWrapper::GetTranslationTransform(const Lib3MF_single fVectorX, const Lib3MF_single fVectorY, const Lib3MF_single fVectorZ) + { + sTransform resultTransform; + CheckError(nullptr,lib3mf_gettranslationtransform(fVectorX, fVectorY, fVectorZ, &resultTransform)); + + return resultTransform; + } + + inline void CWrapper::CheckError(CBase * pBaseClass, Lib3MFResult nResult) + { + if (nResult != 0) { + std::string sErrorMessage; + if (pBaseClass != nullptr) { + GetLastError(pBaseClass, sErrorMessage); + } + throw ELib3MFException(nResult, sErrorMessage); + } + } + + + + /** + * Method definitions for class CBase + */ + + /** + * CBase::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 CBase::ClassTypeId() + { + Lib3MF_uint64 resultClassTypeId = 0; + CheckError(lib3mf_base_classtypeid(m_pHandle, &resultClassTypeId)); + + return resultClassTypeId; + } + + /** + * Method definitions for class CWriter + */ + + /** + * CWriter::WriteToFile - Writes out the model as file. The file type is specified by the Model Writer class. + * @param[in] sFilename - Filename to write into + */ + void CWriter::WriteToFile(const std::string & sFilename) + { + CheckError(lib3mf_writer_writetofile(m_pHandle, sFilename.c_str())); + } + + /** + * CWriter::GetStreamSize - Retrieves the size of the full 3MF file stream. + * @return the stream size + */ + Lib3MF_uint64 CWriter::GetStreamSize() + { + Lib3MF_uint64 resultStreamSize = 0; + CheckError(lib3mf_writer_getstreamsize(m_pHandle, &resultStreamSize)); + + return resultStreamSize; + } + + /** + * CWriter::WriteToBuffer - Writes out the 3MF file into a memory buffer + * @param[out] BufferBuffer - buffer to write into + */ + void CWriter::WriteToBuffer(std::vector & BufferBuffer) + { + Lib3MF_uint64 elementsNeededBuffer = 0; + Lib3MF_uint64 elementsWrittenBuffer = 0; + CheckError(lib3mf_writer_writetobuffer(m_pHandle, 0, &elementsNeededBuffer, nullptr)); + BufferBuffer.resize((size_t) elementsNeededBuffer); + CheckError(lib3mf_writer_writetobuffer(m_pHandle, elementsNeededBuffer, &elementsWrittenBuffer, BufferBuffer.data())); + } + + /** + * CWriter::WriteToCallback - Writes out the model and passes the data to a provided callback function. The file type is specified by the Model Writer class. + * @param[in] pTheWriteCallback - Callback to call for writing a data chunk + * @param[in] pTheSeekCallback - Callback to call for seeking in the stream + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CWriter::WriteToCallback(const WriteCallback pTheWriteCallback, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) + { + CheckError(lib3mf_writer_writetocallback(m_pHandle, pTheWriteCallback, pTheSeekCallback, pUserData)); + } + + /** + * CWriter::SetProgressCallback - Set the progress callback for calls to this writer + * @param[in] pProgressCallback - pointer to the callback function. + * @param[in] pUserData - pointer to arbitrary user data that is passed without modification to the callback. + */ + void CWriter::SetProgressCallback(const ProgressCallback pProgressCallback, const Lib3MF_pvoid pUserData) + { + CheckError(lib3mf_writer_setprogresscallback(m_pHandle, pProgressCallback, pUserData)); + } + + /** + * CWriter::GetDecimalPrecision - Returns the number of digits after the decimal point to be written in each vertex coordinate-value. + * @return The number of digits to be written in each vertex coordinate-value after the decimal point. + */ + Lib3MF_uint32 CWriter::GetDecimalPrecision() + { + Lib3MF_uint32 resultDecimalPrecision = 0; + CheckError(lib3mf_writer_getdecimalprecision(m_pHandle, &resultDecimalPrecision)); + + return resultDecimalPrecision; + } + + /** + * CWriter::SetDecimalPrecision - Sets the number of digits after the decimal point to be written in each vertex coordinate-value. + * @param[in] nDecimalPrecision - The number of digits to be written in each vertex coordinate-value after the decimal point. + */ + void CWriter::SetDecimalPrecision(const Lib3MF_uint32 nDecimalPrecision) + { + CheckError(lib3mf_writer_setdecimalprecision(m_pHandle, nDecimalPrecision)); + } + + /** + * CWriter::SetStrictModeActive - Activates (deactivates) the strict mode of the reader. + * @param[in] bStrictModeActive - flag whether strict mode is active or not. + */ + void CWriter::SetStrictModeActive(const bool bStrictModeActive) + { + CheckError(lib3mf_writer_setstrictmodeactive(m_pHandle, bStrictModeActive)); + } + + /** + * CWriter::GetStrictModeActive - Queries whether the strict mode of the reader is active or not + * @return returns flag whether strict mode is active or not. + */ + bool CWriter::GetStrictModeActive() + { + bool resultStrictModeActive = 0; + CheckError(lib3mf_writer_getstrictmodeactive(m_pHandle, &resultStrictModeActive)); + + return resultStrictModeActive; + } + + /** + * CWriter::GetWarning - Returns Warning and Error Information of the read process + * @param[in] nIndex - Index of the Warning. Valid values are 0 to WarningCount - 1 + * @param[out] nErrorCode - filled with the error code of the warning + * @return the message of the warning + */ + std::string CWriter::GetWarning(const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode) + { + Lib3MF_uint32 bytesNeededWarning = 0; + Lib3MF_uint32 bytesWrittenWarning = 0; + CheckError(lib3mf_writer_getwarning(m_pHandle, nIndex, &nErrorCode, 0, &bytesNeededWarning, nullptr)); + std::vector bufferWarning(bytesNeededWarning); + CheckError(lib3mf_writer_getwarning(m_pHandle, nIndex, &nErrorCode, bytesNeededWarning, &bytesWrittenWarning, &bufferWarning[0])); + + return std::string(&bufferWarning[0]); + } + + /** + * CWriter::GetWarningCount - Returns Warning and Error Count of the read process + * @return filled with the count of the occurred warnings. + */ + Lib3MF_uint32 CWriter::GetWarningCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_writer_getwarningcount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * CWriter::AddKeyWrappingCallback - Registers a callback to deal with data key encryption/decryption from keystore + * @param[in] sConsumerID - The ConsumerID to register for + * @param[in] pTheCallback - The callback to be callede for wrapping and encryption key + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CWriter::AddKeyWrappingCallback(const std::string & sConsumerID, const KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData) + { + CheckError(lib3mf_writer_addkeywrappingcallback(m_pHandle, sConsumerID.c_str(), pTheCallback, pUserData)); + } + + /** + * CWriter::SetContentEncryptionCallback - Registers a callback to deal with encryption of content + * @param[in] pTheCallback - The callback used to encrypt content + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CWriter::SetContentEncryptionCallback(const ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData) + { + CheckError(lib3mf_writer_setcontentencryptioncallback(m_pHandle, pTheCallback, pUserData)); + } + + /** + * Method definitions for class CReader + */ + + /** + * CReader::ReadFromFile - Reads a model from a file. The file type is specified by the Model Reader class + * @param[in] sFilename - Filename to read from + */ + void CReader::ReadFromFile(const std::string & sFilename) + { + CheckError(lib3mf_reader_readfromfile(m_pHandle, sFilename.c_str())); + } + + /** + * CReader::ReadFromBuffer - Reads a model from a memory buffer. + * @param[in] BufferBuffer - Buffer to read from + */ + void CReader::ReadFromBuffer(const CInputVector & BufferBuffer) + { + CheckError(lib3mf_reader_readfrombuffer(m_pHandle, (Lib3MF_uint64)BufferBuffer.size(), BufferBuffer.data())); + } + + /** + * CReader::ReadFromCallback - Reads a model and from the data provided by a callback function + * @param[in] pTheReadCallback - Callback to call for reading a data chunk + * @param[in] nStreamSize - number of bytes the callback returns + * @param[in] pTheSeekCallback - Callback to call for seeking in the stream. + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CReader::ReadFromCallback(const ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) + { + CheckError(lib3mf_reader_readfromcallback(m_pHandle, pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData)); + } + + /** + * CReader::SetProgressCallback - Set the progress callback for calls to this writer + * @param[in] pProgressCallback - pointer to the callback function. + * @param[in] pUserData - pointer to arbitrary user data that is passed without modification to the callback. + */ + void CReader::SetProgressCallback(const ProgressCallback pProgressCallback, const Lib3MF_pvoid pUserData) + { + CheckError(lib3mf_reader_setprogresscallback(m_pHandle, pProgressCallback, pUserData)); + } + + /** + * CReader::AddRelationToRead - Adds a relationship type which shall be read as attachment in memory while loading + * @param[in] sRelationShipType - String of the relationship type + */ + void CReader::AddRelationToRead(const std::string & sRelationShipType) + { + CheckError(lib3mf_reader_addrelationtoread(m_pHandle, sRelationShipType.c_str())); + } + + /** + * CReader::RemoveRelationToRead - Removes a relationship type which shall be read as attachment in memory while loading + * @param[in] sRelationShipType - String of the relationship type + */ + void CReader::RemoveRelationToRead(const std::string & sRelationShipType) + { + CheckError(lib3mf_reader_removerelationtoread(m_pHandle, sRelationShipType.c_str())); + } + + /** + * CReader::SetStrictModeActive - Activates (deactivates) the strict mode of the reader. + * @param[in] bStrictModeActive - flag whether strict mode is active or not. + */ + void CReader::SetStrictModeActive(const bool bStrictModeActive) + { + CheckError(lib3mf_reader_setstrictmodeactive(m_pHandle, bStrictModeActive)); + } + + /** + * CReader::GetStrictModeActive - Queries whether the strict mode of the reader is active or not + * @return returns flag whether strict mode is active or not. + */ + bool CReader::GetStrictModeActive() + { + bool resultStrictModeActive = 0; + CheckError(lib3mf_reader_getstrictmodeactive(m_pHandle, &resultStrictModeActive)); + + return resultStrictModeActive; + } + + /** + * CReader::GetWarning - Returns Warning and Error Information of the read process + * @param[in] nIndex - Index of the Warning. Valid values are 0 to WarningCount - 1 + * @param[out] nErrorCode - filled with the error code of the warning + * @return the message of the warning + */ + std::string CReader::GetWarning(const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode) + { + Lib3MF_uint32 bytesNeededWarning = 0; + Lib3MF_uint32 bytesWrittenWarning = 0; + CheckError(lib3mf_reader_getwarning(m_pHandle, nIndex, &nErrorCode, 0, &bytesNeededWarning, nullptr)); + std::vector bufferWarning(bytesNeededWarning); + CheckError(lib3mf_reader_getwarning(m_pHandle, nIndex, &nErrorCode, bytesNeededWarning, &bytesWrittenWarning, &bufferWarning[0])); + + return std::string(&bufferWarning[0]); + } + + /** + * CReader::GetWarningCount - Returns Warning and Error Count of the read process + * @return filled with the count of the occurred warnings. + */ + Lib3MF_uint32 CReader::GetWarningCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_reader_getwarningcount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * CReader::AddKeyWrappingCallback - Registers a callback to deal with key wrapping mechanism from keystore + * @param[in] sConsumerID - The ConsumerID to register for + * @param[in] pTheCallback - The callback used to decrypt data key + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CReader::AddKeyWrappingCallback(const std::string & sConsumerID, const KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData) + { + CheckError(lib3mf_reader_addkeywrappingcallback(m_pHandle, sConsumerID.c_str(), pTheCallback, pUserData)); + } + + /** + * CReader::SetContentEncryptionCallback - Registers a callback to deal with encryption of content + * @param[in] pTheCallback - The callback used to encrypt content + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CReader::SetContentEncryptionCallback(const ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData) + { + CheckError(lib3mf_reader_setcontentencryptioncallback(m_pHandle, pTheCallback, pUserData)); + } + + /** + * Method definitions for class CPackagePart + */ + + /** + * CPackagePart::GetPath - Returns the absolute path of this PackagePart. + * @return Returns the absolute path of this PackagePart + */ + std::string CPackagePart::GetPath() + { + Lib3MF_uint32 bytesNeededPath = 0; + Lib3MF_uint32 bytesWrittenPath = 0; + CheckError(lib3mf_packagepart_getpath(m_pHandle, 0, &bytesNeededPath, nullptr)); + std::vector bufferPath(bytesNeededPath); + CheckError(lib3mf_packagepart_getpath(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); + + return std::string(&bufferPath[0]); + } + + /** + * CPackagePart::SetPath - Sets the absolute path of this PackagePart. + * @param[in] sPath - Sets the absolute path of this PackagePart. + */ + void CPackagePart::SetPath(const std::string & sPath) + { + CheckError(lib3mf_packagepart_setpath(m_pHandle, sPath.c_str())); + } + + /** + * Method definitions for class CResource + */ + + /** + * CResource::GetResourceID - Retrieves the unique id of this resource within a package. This function will be removed in a later release in favor of GetUniqueResourceID + * @return Retrieves the unique id of this resource within a package. + */ + Lib3MF_uint32 CResource::GetResourceID() + { + Lib3MF_uint32 resultUniqueResourceID = 0; + CheckError(lib3mf_resource_getresourceid(m_pHandle, &resultUniqueResourceID)); + + return resultUniqueResourceID; + } + + /** + * CResource::GetUniqueResourceID - Retrieves the unique id of this resource within a package. + * @return Retrieves the unique id of this resource within a package. + */ + Lib3MF_uint32 CResource::GetUniqueResourceID() + { + Lib3MF_uint32 resultUniqueResourceID = 0; + CheckError(lib3mf_resource_getuniqueresourceid(m_pHandle, &resultUniqueResourceID)); + + return resultUniqueResourceID; + } + + /** + * CResource::PackagePart - Returns the PackagePart within which this resource resides + * @return the PackagePart within which this resource resides. + */ + PPackagePart CResource::PackagePart() + { + Lib3MFHandle hPackagePart = nullptr; + CheckError(lib3mf_resource_packagepart(m_pHandle, &hPackagePart)); + + if (!hPackagePart) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPackagePart))); + } + + /** + * CResource::SetPackagePart - Sets the new PackagePart within which this resource resides + * @param[in] pPackagePart - the new PackagePart within which this resource resides. + */ + void CResource::SetPackagePart(classParam pPackagePart) + { + Lib3MFHandle hPackagePart = pPackagePart.GetHandle(); + CheckError(lib3mf_resource_setpackagepart(m_pHandle, hPackagePart)); + } + + /** + * CResource::GetModelResourceID - Retrieves the id of this resource within a model. + * @return Retrieves the id of this resource within a model. + */ + Lib3MF_uint32 CResource::GetModelResourceID() + { + Lib3MF_uint32 resultModelResourceId = 0; + CheckError(lib3mf_resource_getmodelresourceid(m_pHandle, &resultModelResourceId)); + + return resultModelResourceId; + } + + /** + * Method definitions for class CResourceIterator + */ + + /** + * CResourceIterator::MoveNext - Iterates to the next resource in the list. + * @return Iterates to the next resource in the list. + */ + bool CResourceIterator::MoveNext() + { + bool resultHasNext = 0; + CheckError(lib3mf_resourceiterator_movenext(m_pHandle, &resultHasNext)); + + return resultHasNext; + } + + /** + * CResourceIterator::MovePrevious - Iterates to the previous resource in the list. + * @return Iterates to the previous resource in the list. + */ + bool CResourceIterator::MovePrevious() + { + bool resultHasPrevious = 0; + CheckError(lib3mf_resourceiterator_moveprevious(m_pHandle, &resultHasPrevious)); + + return resultHasPrevious; + } + + /** + * CResourceIterator::GetCurrent - Returns the resource the iterator points at. + * @return returns the resource instance. + */ + PResource CResourceIterator::GetCurrent() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_resourceiterator_getcurrent(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * CResourceIterator::Clone - Creates a new resource iterator with the same resource list. + * @return returns the cloned Iterator instance + */ + PResourceIterator CResourceIterator::Clone() + { + Lib3MFHandle hOutResourceIterator = nullptr; + CheckError(lib3mf_resourceiterator_clone(m_pHandle, &hOutResourceIterator)); + + if (!hOutResourceIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hOutResourceIterator))); + } + + /** + * CResourceIterator::Count - Returns the number of resoucres the iterator captures. + * @return returns the number of resoucres the iterator captures. + */ + Lib3MF_uint64 CResourceIterator::Count() + { + Lib3MF_uint64 resultCount = 0; + CheckError(lib3mf_resourceiterator_count(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * Method definitions for class CSliceStackIterator + */ + + /** + * CSliceStackIterator::GetCurrentSliceStack - Returns the SliceStack the iterator points at. + * @return returns the SliceStack instance. + */ + PSliceStack CSliceStackIterator::GetCurrentSliceStack() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_slicestackiterator_getcurrentslicestack(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CObjectIterator + */ + + /** + * CObjectIterator::GetCurrentObject - Returns the Object the iterator points at. + * @return returns the Object instance. + */ + PObject CObjectIterator::GetCurrentObject() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_objectiterator_getcurrentobject(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CMeshObjectIterator + */ + + /** + * CMeshObjectIterator::GetCurrentMeshObject - Returns the MeshObject the iterator points at. + * @return returns the MeshObject instance. + */ + PMeshObject CMeshObjectIterator::GetCurrentMeshObject() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_meshobjectiterator_getcurrentmeshobject(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CComponentsObjectIterator + */ + + /** + * CComponentsObjectIterator::GetCurrentComponentsObject - Returns the ComponentsObject the iterator points at. + * @return returns the ComponentsObject instance. + */ + PComponentsObject CComponentsObjectIterator::GetCurrentComponentsObject() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_componentsobjectiterator_getcurrentcomponentsobject(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CTexture2DIterator + */ + + /** + * CTexture2DIterator::GetCurrentTexture2D - Returns the Texture2D the iterator points at. + * @return returns the Texture2D instance. + */ + PTexture2D CTexture2DIterator::GetCurrentTexture2D() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_texture2diterator_getcurrenttexture2d(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CBaseMaterialGroupIterator + */ + + /** + * CBaseMaterialGroupIterator::GetCurrentBaseMaterialGroup - Returns the MaterialGroup the iterator points at. + * @return returns the BaseMaterialGroup instance. + */ + PBaseMaterialGroup CBaseMaterialGroupIterator::GetCurrentBaseMaterialGroup() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CColorGroupIterator + */ + + /** + * CColorGroupIterator::GetCurrentColorGroup - Returns the ColorGroup the iterator points at. + * @return returns the ColorGroup instance. + */ + PColorGroup CColorGroupIterator::GetCurrentColorGroup() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_colorgroupiterator_getcurrentcolorgroup(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CTexture2DGroupIterator + */ + + /** + * CTexture2DGroupIterator::GetCurrentTexture2DGroup - Returns the Texture2DGroup the iterator points at. + * @return returns the Texture2DGroup instance. + */ + PTexture2DGroup CTexture2DGroupIterator::GetCurrentTexture2DGroup() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CCompositeMaterialsIterator + */ + + /** + * CCompositeMaterialsIterator::GetCurrentCompositeMaterials - Returns the CompositeMaterials the iterator points at. + * @return returns the CompositeMaterials instance. + */ + PCompositeMaterials CCompositeMaterialsIterator::GetCurrentCompositeMaterials() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_compositematerialsiterator_getcurrentcompositematerials(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CMultiPropertyGroupIterator + */ + + /** + * CMultiPropertyGroupIterator::GetCurrentMultiPropertyGroup - Returns the MultiPropertyGroup the iterator points at. + * @return returns the MultiPropertyGroup instance. + */ + PMultiPropertyGroup CMultiPropertyGroupIterator::GetCurrentMultiPropertyGroup() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CImage3DIterator + */ + + /** + * CImage3DIterator::GetCurrentImage3D - Returns the Image3D the iterator points at. + * @return returns the Image3D instance. + */ + PImage3D CImage3DIterator::GetCurrentImage3D() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_image3diterator_getcurrentimage3d(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CFunctionIterator + */ + + /** + * CFunctionIterator::GetCurrentFunction - Returns the Function the iterator points at. + * @return returns the Function instance. + */ + PFunction CFunctionIterator::GetCurrentFunction() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_functioniterator_getcurrentfunction(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CLevelSetIterator + */ + + /** + * CLevelSetIterator::GetCurrentLevelSet - Returns the LevelSet the iterator points at. + * @return returns the MeshObject instance. + */ + PLevelSet CLevelSetIterator::GetCurrentLevelSet() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_levelsetiterator_getcurrentlevelset(m_pHandle, &hResource)); + + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CMetaData + */ + + /** + * CMetaData::GetNameSpace - returns the namespace URL of the metadata + * @return the namespace URL of the metadata + */ + std::string CMetaData::GetNameSpace() + { + Lib3MF_uint32 bytesNeededNameSpace = 0; + Lib3MF_uint32 bytesWrittenNameSpace = 0; + CheckError(lib3mf_metadata_getnamespace(m_pHandle, 0, &bytesNeededNameSpace, nullptr)); + std::vector bufferNameSpace(bytesNeededNameSpace); + CheckError(lib3mf_metadata_getnamespace(m_pHandle, bytesNeededNameSpace, &bytesWrittenNameSpace, &bufferNameSpace[0])); + + return std::string(&bufferNameSpace[0]); + } + + /** + * CMetaData::SetNameSpace - sets a new namespace URL of the metadata + * @param[in] sNameSpace - the new namespace URL of the metadata + */ + void CMetaData::SetNameSpace(const std::string & sNameSpace) + { + CheckError(lib3mf_metadata_setnamespace(m_pHandle, sNameSpace.c_str())); + } + + /** + * CMetaData::GetName - returns the name of a metadata + * @return the name of the metadata + */ + std::string CMetaData::GetName() + { + Lib3MF_uint32 bytesNeededName = 0; + Lib3MF_uint32 bytesWrittenName = 0; + CheckError(lib3mf_metadata_getname(m_pHandle, 0, &bytesNeededName, nullptr)); + std::vector bufferName(bytesNeededName); + CheckError(lib3mf_metadata_getname(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); + + return std::string(&bufferName[0]); + } + + /** + * CMetaData::SetName - sets a new name of a metadata + * @param[in] sName - the new name of the metadata + */ + void CMetaData::SetName(const std::string & sName) + { + CheckError(lib3mf_metadata_setname(m_pHandle, sName.c_str())); + } + + /** + * CMetaData::GetKey - returns the (namespace+name) of a metadata + * @return the key (namespace+name) of the metadata + */ + std::string CMetaData::GetKey() + { + Lib3MF_uint32 bytesNeededKey = 0; + Lib3MF_uint32 bytesWrittenKey = 0; + CheckError(lib3mf_metadata_getkey(m_pHandle, 0, &bytesNeededKey, nullptr)); + std::vector bufferKey(bytesNeededKey); + CheckError(lib3mf_metadata_getkey(m_pHandle, bytesNeededKey, &bytesWrittenKey, &bufferKey[0])); + + return std::string(&bufferKey[0]); + } + + /** + * CMetaData::GetMustPreserve - returns, whether a metadata must be preserved + * @return returns, whether a metadata must be preserved + */ + bool CMetaData::GetMustPreserve() + { + bool resultMustPreserve = 0; + CheckError(lib3mf_metadata_getmustpreserve(m_pHandle, &resultMustPreserve)); + + return resultMustPreserve; + } + + /** + * CMetaData::SetMustPreserve - sets whether a metadata must be preserved + * @param[in] bMustPreserve - a new value whether a metadata must be preserved + */ + void CMetaData::SetMustPreserve(const bool bMustPreserve) + { + CheckError(lib3mf_metadata_setmustpreserve(m_pHandle, bMustPreserve)); + } + + /** + * CMetaData::GetType - returns the type of a metadata + * @return the type of the metadata + */ + std::string CMetaData::GetType() + { + Lib3MF_uint32 bytesNeededType = 0; + Lib3MF_uint32 bytesWrittenType = 0; + CheckError(lib3mf_metadata_gettype(m_pHandle, 0, &bytesNeededType, nullptr)); + std::vector bufferType(bytesNeededType); + CheckError(lib3mf_metadata_gettype(m_pHandle, bytesNeededType, &bytesWrittenType, &bufferType[0])); + + return std::string(&bufferType[0]); + } + + /** + * CMetaData::SetType - sets a new type of a metadata. This must be a simple XML type + * @param[in] sType - a new type of the metadata + */ + void CMetaData::SetType(const std::string & sType) + { + CheckError(lib3mf_metadata_settype(m_pHandle, sType.c_str())); + } + + /** + * CMetaData::GetValue - returns the value of the metadata + * @return the value of the metadata + */ + std::string CMetaData::GetValue() + { + Lib3MF_uint32 bytesNeededValue = 0; + Lib3MF_uint32 bytesWrittenValue = 0; + CheckError(lib3mf_metadata_getvalue(m_pHandle, 0, &bytesNeededValue, nullptr)); + std::vector bufferValue(bytesNeededValue); + CheckError(lib3mf_metadata_getvalue(m_pHandle, bytesNeededValue, &bytesWrittenValue, &bufferValue[0])); + + return std::string(&bufferValue[0]); + } + + /** + * CMetaData::SetValue - sets a new value of the metadata + * @param[in] sValue - a new value of the metadata + */ + void CMetaData::SetValue(const std::string & sValue) + { + CheckError(lib3mf_metadata_setvalue(m_pHandle, sValue.c_str())); + } + + /** + * Method definitions for class CMetaDataGroup + */ + + /** + * CMetaDataGroup::GetMetaDataCount - returns the number of metadata in this metadatagroup + * @return returns the number metadata + */ + Lib3MF_uint32 CMetaDataGroup::GetMetaDataCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_metadatagroup_getmetadatacount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * CMetaDataGroup::GetMetaData - returns a metadata value within this metadatagroup + * @param[in] nIndex - Index of the Metadata. + * @return an instance of the metadata + */ + PMetaData CMetaDataGroup::GetMetaData(const Lib3MF_uint32 nIndex) + { + Lib3MFHandle hMetaData = nullptr; + CheckError(lib3mf_metadatagroup_getmetadata(m_pHandle, nIndex, &hMetaData)); + + if (!hMetaData) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); + } + + /** + * CMetaDataGroup::GetMetaDataByKey - returns a metadata value within this metadatagroup + * @param[in] sNameSpace - the namespace of the metadata + * @param[in] sName - the name of the Metadata + * @return an instance of the metadata + */ + PMetaData CMetaDataGroup::GetMetaDataByKey(const std::string & sNameSpace, const std::string & sName) + { + Lib3MFHandle hMetaData = nullptr; + CheckError(lib3mf_metadatagroup_getmetadatabykey(m_pHandle, sNameSpace.c_str(), sName.c_str(), &hMetaData)); + + if (!hMetaData) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); + } + + /** + * CMetaDataGroup::RemoveMetaDataByIndex - removes metadata by index from the model. + * @param[in] nIndex - Index of the metadata to remove + */ + void CMetaDataGroup::RemoveMetaDataByIndex(const Lib3MF_uint32 nIndex) + { + CheckError(lib3mf_metadatagroup_removemetadatabyindex(m_pHandle, nIndex)); + } + + /** + * CMetaDataGroup::RemoveMetaData - removes metadata from the model. + * @param[in] pTheMetaData - The metadata to remove + */ + void CMetaDataGroup::RemoveMetaData(classParam pTheMetaData) + { + Lib3MFHandle hTheMetaData = pTheMetaData.GetHandle(); + CheckError(lib3mf_metadatagroup_removemetadata(m_pHandle, hTheMetaData)); + } + + /** + * CMetaDataGroup::AddMetaData - adds a new metadata to this metadatagroup + * @param[in] sNameSpace - the namespace of the metadata + * @param[in] sName - the name of the metadata + * @param[in] sValue - the value of the metadata + * @param[in] sType - the type of the metadata + * @param[in] bMustPreserve - shuold the metadata be preserved + * @return a new instance of the metadata + */ + PMetaData CMetaDataGroup::AddMetaData(const std::string & sNameSpace, const std::string & sName, const std::string & sValue, const std::string & sType, const bool bMustPreserve) + { + Lib3MFHandle hMetaData = nullptr; + CheckError(lib3mf_metadatagroup_addmetadata(m_pHandle, sNameSpace.c_str(), sName.c_str(), sValue.c_str(), sType.c_str(), bMustPreserve, &hMetaData)); + + if (!hMetaData) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); + } + + /** + * Method definitions for class CObject + */ + + /** + * CObject::GetType - Retrieves an object's type + * @return returns object type enum. + */ + eObjectType CObject::GetType() + { + eObjectType resultObjectType = (eObjectType) 0; + CheckError(lib3mf_object_gettype(m_pHandle, &resultObjectType)); + + return resultObjectType; + } + + /** + * CObject::SetType - Sets an object's type + * @param[in] eObjectType - object type enum. + */ + void CObject::SetType(const eObjectType eObjectType) + { + CheckError(lib3mf_object_settype(m_pHandle, eObjectType)); + } + + /** + * CObject::GetName - Retrieves an object's name + * @return returns object name. + */ + std::string CObject::GetName() + { + Lib3MF_uint32 bytesNeededName = 0; + Lib3MF_uint32 bytesWrittenName = 0; + CheckError(lib3mf_object_getname(m_pHandle, 0, &bytesNeededName, nullptr)); + std::vector bufferName(bytesNeededName); + CheckError(lib3mf_object_getname(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); + + return std::string(&bufferName[0]); + } + + /** + * CObject::SetName - Sets an object's name string + * @param[in] sName - new object name. + */ + void CObject::SetName(const std::string & sName) + { + CheckError(lib3mf_object_setname(m_pHandle, sName.c_str())); + } + + /** + * CObject::GetPartNumber - Retrieves an object's part number + * @return returns object part number. + */ + std::string CObject::GetPartNumber() + { + Lib3MF_uint32 bytesNeededPartNumber = 0; + Lib3MF_uint32 bytesWrittenPartNumber = 0; + CheckError(lib3mf_object_getpartnumber(m_pHandle, 0, &bytesNeededPartNumber, nullptr)); + std::vector bufferPartNumber(bytesNeededPartNumber); + CheckError(lib3mf_object_getpartnumber(m_pHandle, bytesNeededPartNumber, &bytesWrittenPartNumber, &bufferPartNumber[0])); + + return std::string(&bufferPartNumber[0]); + } + + /** + * CObject::SetPartNumber - Sets an objects partnumber string + * @param[in] sPartNumber - new object part number. + */ + void CObject::SetPartNumber(const std::string & sPartNumber) + { + CheckError(lib3mf_object_setpartnumber(m_pHandle, sPartNumber.c_str())); + } + + /** + * CObject::IsMeshObject - Retrieves, if an object is a mesh object + * @return returns, whether the object is a mesh object + */ + bool CObject::IsMeshObject() + { + bool resultIsMeshObject = 0; + CheckError(lib3mf_object_ismeshobject(m_pHandle, &resultIsMeshObject)); + + return resultIsMeshObject; + } + + /** + * CObject::IsComponentsObject - Retrieves, if an object is a components object + * @return returns, whether the object is a components object + */ + bool CObject::IsComponentsObject() + { + bool resultIsComponentsObject = 0; + CheckError(lib3mf_object_iscomponentsobject(m_pHandle, &resultIsComponentsObject)); + + return resultIsComponentsObject; + } + + /** + * CObject::IsLevelSetObject - Retrieves, if an object is a level set object + * @return returns, whether the object is a level set object + */ + bool CObject::IsLevelSetObject() + { + bool resultIsLevelSetObject = 0; + CheckError(lib3mf_object_islevelsetobject(m_pHandle, &resultIsLevelSetObject)); + + return resultIsLevelSetObject; + } + + /** + * CObject::IsValid - Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. + * @return returns whether the object is a valid object description + */ + bool CObject::IsValid() + { + bool resultIsValid = 0; + CheckError(lib3mf_object_isvalid(m_pHandle, &resultIsValid)); + + return resultIsValid; + } + + /** + * CObject::SetAttachmentAsThumbnail - Use an existing attachment as thumbnail for this object + * @param[in] pAttachment - Instance of a new or the existing thumbnailattachment object. + */ + void CObject::SetAttachmentAsThumbnail(classParam pAttachment) + { + Lib3MFHandle hAttachment = pAttachment.GetHandle(); + CheckError(lib3mf_object_setattachmentasthumbnail(m_pHandle, hAttachment)); + } + + /** + * CObject::GetThumbnailAttachment - Get the attachment containing the object thumbnail. + * @return Instance of the thumbnailattachment object or NULL. + */ + PAttachment CObject::GetThumbnailAttachment() + { + Lib3MFHandle hAttachment = nullptr; + CheckError(lib3mf_object_getthumbnailattachment(m_pHandle, &hAttachment)); + + if (hAttachment) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hAttachment))); + } else { + return nullptr; + } + } + + /** + * CObject::ClearThumbnailAttachment - Clears the attachment. The attachment instance is not removed from the package. + */ + void CObject::ClearThumbnailAttachment() + { + CheckError(lib3mf_object_clearthumbnailattachment(m_pHandle)); + } + + /** + * CObject::GetOutbox - Returns the outbox of a build item + * @return Outbox of this build item + */ + sBox CObject::GetOutbox() + { + sBox resultOutbox; + CheckError(lib3mf_object_getoutbox(m_pHandle, &resultOutbox)); + + return resultOutbox; + } + + /** + * CObject::GetUUID - Retrieves an object's uuid string (see production extension specification) + * @param[out] bHasUUID - flag whether the build item has a UUID + * @return returns object uuid. + */ + std::string CObject::GetUUID(bool & bHasUUID) + { + Lib3MF_uint32 bytesNeededUUID = 0; + Lib3MF_uint32 bytesWrittenUUID = 0; + CheckError(lib3mf_object_getuuid(m_pHandle, &bHasUUID, 0, &bytesNeededUUID, nullptr)); + std::vector bufferUUID(bytesNeededUUID); + CheckError(lib3mf_object_getuuid(m_pHandle, &bHasUUID, bytesNeededUUID, &bytesWrittenUUID, &bufferUUID[0])); + + return std::string(&bufferUUID[0]); + } + + /** + * CObject::SetUUID - Sets a build object's uuid string (see production extension specification) + * @param[in] sUUID - new object uuid string. + */ + void CObject::SetUUID(const std::string & sUUID) + { + CheckError(lib3mf_object_setuuid(m_pHandle, sUUID.c_str())); + } + + /** + * CObject::GetMetaDataGroup - Returns the metadatagroup of this object + * @return returns an Instance of the metadatagroup of this object + */ + PMetaDataGroup CObject::GetMetaDataGroup() + { + Lib3MFHandle hMetaDataGroup = nullptr; + CheckError(lib3mf_object_getmetadatagroup(m_pHandle, &hMetaDataGroup)); + + if (!hMetaDataGroup) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaDataGroup))); + } + + /** + * CObject::SetSlicesMeshResolution - set the meshresolution of the mesh object + * @param[in] eMeshResolution - meshresolution of this object + */ + void CObject::SetSlicesMeshResolution(const eSlicesMeshResolution eMeshResolution) + { + CheckError(lib3mf_object_setslicesmeshresolution(m_pHandle, eMeshResolution)); + } + + /** + * CObject::GetSlicesMeshResolution - get the meshresolution of the mesh object + * @return meshresolution of this object + */ + eSlicesMeshResolution CObject::GetSlicesMeshResolution() + { + eSlicesMeshResolution resultMeshResolution = (eSlicesMeshResolution) 0; + CheckError(lib3mf_object_getslicesmeshresolution(m_pHandle, &resultMeshResolution)); + + return resultMeshResolution; + } + + /** + * CObject::HasSlices - returns whether the Object has a slice stack. If Recursive is true, also checks whether any references object has a slice stack + * @param[in] bRecursive - check also all referenced objects? + * @return does the object have a slice stack? + */ + bool CObject::HasSlices(const bool bRecursive) + { + bool resultHasSlices = 0; + CheckError(lib3mf_object_hasslices(m_pHandle, bRecursive, &resultHasSlices)); + + return resultHasSlices; + } + + /** + * CObject::ClearSliceStack - unlinks the attached slicestack from this object. If no slice stack is attached, do noting. + */ + void CObject::ClearSliceStack() + { + CheckError(lib3mf_object_clearslicestack(m_pHandle)); + } + + /** + * CObject::GetSliceStack - get the Slicestack attached to the object + * @return returns the slicestack instance + */ + PSliceStack CObject::GetSliceStack() + { + Lib3MFHandle hSliceStackInstance = nullptr; + CheckError(lib3mf_object_getslicestack(m_pHandle, &hSliceStackInstance)); + + if (!hSliceStackInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSliceStackInstance))); + } + + /** + * CObject::AssignSliceStack - assigns a slicestack to the object + * @param[in] pSliceStackInstance - the new slice stack of this Object + */ + void CObject::AssignSliceStack(classParam pSliceStackInstance) + { + Lib3MFHandle hSliceStackInstance = pSliceStackInstance.GetHandle(); + CheckError(lib3mf_object_assignslicestack(m_pHandle, hSliceStackInstance)); + } + + /** + * Method definitions for class CMeshObject + */ + + /** + * CMeshObject::GetVertexCount - Returns the vertex count of a mesh object. + * @return filled with the vertex count. + */ + Lib3MF_uint32 CMeshObject::GetVertexCount() + { + Lib3MF_uint32 resultVertexCount = 0; + CheckError(lib3mf_meshobject_getvertexcount(m_pHandle, &resultVertexCount)); + + return resultVertexCount; + } + + /** + * CMeshObject::GetTriangleCount - Returns the triangle count of a mesh object. + * @return filled with the triangle count. + */ + Lib3MF_uint32 CMeshObject::GetTriangleCount() + { + Lib3MF_uint32 resultVertexCount = 0; + CheckError(lib3mf_meshobject_gettrianglecount(m_pHandle, &resultVertexCount)); + + return resultVertexCount; + } + + /** + * CMeshObject::GetVertex - Returns the vertex count of a mesh object. + * @param[in] nIndex - Index of the vertex (0 to vertexcount - 1) + * @return filled with the vertex coordinates. + */ + sPosition CMeshObject::GetVertex(const Lib3MF_uint32 nIndex) + { + sPosition resultCoordinates; + CheckError(lib3mf_meshobject_getvertex(m_pHandle, nIndex, &resultCoordinates)); + + return resultCoordinates; + } + + /** + * CMeshObject::SetVertex - Sets the coordinates of a single vertex of a mesh object + * @param[in] nIndex - Index of the vertex (0 to vertexcount - 1) + * @param[in] Coordinates - contains the vertex coordinates. + */ + void CMeshObject::SetVertex(const Lib3MF_uint32 nIndex, const sPosition & Coordinates) + { + CheckError(lib3mf_meshobject_setvertex(m_pHandle, nIndex, &Coordinates)); + } + + /** + * CMeshObject::AddVertex - Adds a single vertex to a mesh object + * @param[in] Coordinates - contains the vertex coordinates. + * @return Index of the new vertex + */ + Lib3MF_uint32 CMeshObject::AddVertex(const sPosition & Coordinates) + { + Lib3MF_uint32 resultNewIndex = 0; + CheckError(lib3mf_meshobject_addvertex(m_pHandle, &Coordinates, &resultNewIndex)); + + return resultNewIndex; + } + + /** + * CMeshObject::GetVertices - Obtains all vertex positions of a mesh object + * @param[out] VerticesBuffer - contains the vertex coordinates. + */ + void CMeshObject::GetVertices(std::vector & VerticesBuffer) + { + Lib3MF_uint64 elementsNeededVertices = 0; + Lib3MF_uint64 elementsWrittenVertices = 0; + CheckError(lib3mf_meshobject_getvertices(m_pHandle, 0, &elementsNeededVertices, nullptr)); + VerticesBuffer.resize((size_t) elementsNeededVertices); + CheckError(lib3mf_meshobject_getvertices(m_pHandle, elementsNeededVertices, &elementsWrittenVertices, VerticesBuffer.data())); + } + + /** + * CMeshObject::GetTriangle - Returns indices of a single triangle of a mesh object. + * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) + * @return filled with the triangle indices. + */ + sTriangle CMeshObject::GetTriangle(const Lib3MF_uint32 nIndex) + { + sTriangle resultIndices; + CheckError(lib3mf_meshobject_gettriangle(m_pHandle, nIndex, &resultIndices)); + + return resultIndices; + } + + /** + * CMeshObject::SetTriangle - Sets the indices of a single triangle of a mesh object. + * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) + * @param[in] Indices - contains the triangle indices. + */ + void CMeshObject::SetTriangle(const Lib3MF_uint32 nIndex, const sTriangle & Indices) + { + CheckError(lib3mf_meshobject_settriangle(m_pHandle, nIndex, &Indices)); + } + + /** + * CMeshObject::AddTriangle - Adds a single triangle to a mesh object + * @param[in] Indices - contains the triangle indices. + * @return Index of the new triangle + */ + Lib3MF_uint32 CMeshObject::AddTriangle(const sTriangle & Indices) + { + Lib3MF_uint32 resultNewIndex = 0; + CheckError(lib3mf_meshobject_addtriangle(m_pHandle, &Indices, &resultNewIndex)); + + return resultNewIndex; + } + + /** + * CMeshObject::GetTriangleIndices - Get all triangles of a mesh object + * @param[out] IndicesBuffer - contains the triangle indices. + */ + void CMeshObject::GetTriangleIndices(std::vector & IndicesBuffer) + { + Lib3MF_uint64 elementsNeededIndices = 0; + Lib3MF_uint64 elementsWrittenIndices = 0; + CheckError(lib3mf_meshobject_gettriangleindices(m_pHandle, 0, &elementsNeededIndices, nullptr)); + IndicesBuffer.resize((size_t) elementsNeededIndices); + CheckError(lib3mf_meshobject_gettriangleindices(m_pHandle, elementsNeededIndices, &elementsWrittenIndices, IndicesBuffer.data())); + } + + /** + * CMeshObject::SetObjectLevelProperty - Sets the property at the object-level of the mesh object. + * @param[in] nUniqueResourceID - the object-level Property UniqueResourceID. + * @param[in] nPropertyID - the object-level PropertyID. + */ + void CMeshObject::SetObjectLevelProperty(const Lib3MF_uint32 nUniqueResourceID, const Lib3MF_uint32 nPropertyID) + { + CheckError(lib3mf_meshobject_setobjectlevelproperty(m_pHandle, nUniqueResourceID, nPropertyID)); + } + + /** + * CMeshObject::GetObjectLevelProperty - Gets the property at the object-level of the mesh object. + * @param[out] nUniqueResourceID - the object-level Property UniqueResourceID. + * @param[out] nPropertyID - the object-level PropertyID. + * @return Has an object-level property been specified? + */ + bool CMeshObject::GetObjectLevelProperty(Lib3MF_uint32 & nUniqueResourceID, Lib3MF_uint32 & nPropertyID) + { + bool resultHasObjectLevelProperty = 0; + CheckError(lib3mf_meshobject_getobjectlevelproperty(m_pHandle, &nUniqueResourceID, &nPropertyID, &resultHasObjectLevelProperty)); + + return resultHasObjectLevelProperty; + } + + /** + * CMeshObject::SetTriangleProperties - Sets the properties of a single triangle of a mesh object. + * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) + * @param[in] Properties - contains the triangle properties. + */ + void CMeshObject::SetTriangleProperties(const Lib3MF_uint32 nIndex, const sTriangleProperties & Properties) + { + CheckError(lib3mf_meshobject_settriangleproperties(m_pHandle, nIndex, &Properties)); + } + + /** + * CMeshObject::GetTriangleProperties - Gets the properties of a single triangle of a mesh object. + * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) + * @param[out] Property - returns the triangle properties. + */ + void CMeshObject::GetTriangleProperties(const Lib3MF_uint32 nIndex, sTriangleProperties & Property) + { + CheckError(lib3mf_meshobject_gettriangleproperties(m_pHandle, nIndex, &Property)); + } + + /** + * CMeshObject::SetAllTriangleProperties - Sets the properties of all triangles of a mesh object. Sets the object level property to the first entry of the passed triangle properties, if not yet specified. + * @param[in] PropertiesArrayBuffer - contains the triangle properties array. Must have trianglecount elements. + */ + void CMeshObject::SetAllTriangleProperties(const CInputVector & PropertiesArrayBuffer) + { + CheckError(lib3mf_meshobject_setalltriangleproperties(m_pHandle, (Lib3MF_uint64)PropertiesArrayBuffer.size(), PropertiesArrayBuffer.data())); + } + + /** + * CMeshObject::GetAllTriangleProperties - Gets the properties of all triangles of a mesh object. + * @param[out] PropertiesArrayBuffer - returns the triangle properties array. Must have trianglecount elements. + */ + void CMeshObject::GetAllTriangleProperties(std::vector & PropertiesArrayBuffer) + { + Lib3MF_uint64 elementsNeededPropertiesArray = 0; + Lib3MF_uint64 elementsWrittenPropertiesArray = 0; + CheckError(lib3mf_meshobject_getalltriangleproperties(m_pHandle, 0, &elementsNeededPropertiesArray, nullptr)); + PropertiesArrayBuffer.resize((size_t) elementsNeededPropertiesArray); + CheckError(lib3mf_meshobject_getalltriangleproperties(m_pHandle, elementsNeededPropertiesArray, &elementsWrittenPropertiesArray, PropertiesArrayBuffer.data())); + } + + /** + * CMeshObject::ClearAllProperties - Clears all properties of this mesh object (triangle and object-level). + */ + void CMeshObject::ClearAllProperties() + { + CheckError(lib3mf_meshobject_clearallproperties(m_pHandle)); + } + + /** + * CMeshObject::SetGeometry - Set all triangles of a mesh object + * @param[in] VerticesBuffer - contains the positions. + * @param[in] IndicesBuffer - contains the triangle indices. + */ + void CMeshObject::SetGeometry(const CInputVector & VerticesBuffer, const CInputVector & IndicesBuffer) + { + CheckError(lib3mf_meshobject_setgeometry(m_pHandle, (Lib3MF_uint64)VerticesBuffer.size(), VerticesBuffer.data(), (Lib3MF_uint64)IndicesBuffer.size(), IndicesBuffer.data())); + } + + /** + * CMeshObject::IsManifoldAndOriented - Retrieves, if an object describes a topologically oriented and manifold mesh, according to the core spec. + * @return returns, if the object is oriented and manifold. + */ + bool CMeshObject::IsManifoldAndOriented() + { + bool resultIsManifoldAndOriented = 0; + CheckError(lib3mf_meshobject_ismanifoldandoriented(m_pHandle, &resultIsManifoldAndOriented)); + + return resultIsManifoldAndOriented; + } + + /** + * CMeshObject::BeamLattice - Retrieves the BeamLattice within this MeshObject. + * @return the BeamLattice within this MeshObject + */ + PBeamLattice CMeshObject::BeamLattice() + { + Lib3MFHandle hTheBeamLattice = nullptr; + CheckError(lib3mf_meshobject_beamlattice(m_pHandle, &hTheBeamLattice)); + + if (!hTheBeamLattice) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheBeamLattice))); + } + + /** + * CMeshObject::GetVolumeData - Retrieves the VolumeData of this MeshObject. + * @return the VolumeData of this MeshObject + */ + PVolumeData CMeshObject::GetVolumeData() + { + Lib3MFHandle hTheVolumeData = nullptr; + CheckError(lib3mf_meshobject_getvolumedata(m_pHandle, &hTheVolumeData)); + + if (hTheVolumeData) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheVolumeData))); + } else { + return nullptr; + } + } + + /** + * CMeshObject::SetVolumeData - Sets the VolumeData of this MeshObject. + * @param[in] pTheVolumeData - the VolumeData of this MeshObject + */ + void CMeshObject::SetVolumeData(classParam pTheVolumeData) + { + Lib3MFHandle hTheVolumeData = pTheVolumeData.GetHandle(); + CheckError(lib3mf_meshobject_setvolumedata(m_pHandle, hTheVolumeData)); + } + + /** + * Method definitions for class CLevelSet + */ + + /** + * CLevelSet::GetFunction - Returns the function that is used as boundary shape. + * @return the function to use as boundary shape + */ + PFunction CLevelSet::GetFunction() + { + Lib3MFHandle hTheFunction = nullptr; + CheckError(lib3mf_levelset_getfunction(m_pHandle, &hTheFunction)); + + if (hTheFunction) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheFunction))); + } else { + return nullptr; + } + } + + /** + * CLevelSet::SetFunction - Sets the function to use as boundary shape. + * @param[in] pTheFunction - the function to use as boundary shape + */ + void CLevelSet::SetFunction(classParam pTheFunction) + { + Lib3MFHandle hTheFunction = pTheFunction.GetHandle(); + CheckError(lib3mf_levelset_setfunction(m_pHandle, hTheFunction)); + } + + /** + * CLevelSet::GetTransform - Returns the transformation matrix into the coordinate system of the referenced Function. + * @return the transformation matrix + */ + sTransform CLevelSet::GetTransform() + { + sTransform resultTransform; + CheckError(lib3mf_levelset_gettransform(m_pHandle, &resultTransform)); + + return resultTransform; + } + + /** + * CLevelSet::SetTransform - Sets the transformation matrix into the coordinate system of the referenced Function. + * @param[in] Transform - new transformation matrix + */ + void CLevelSet::SetTransform(const sTransform & Transform) + { + CheckError(lib3mf_levelset_settransform(m_pHandle, &Transform)); + } + + /** + * CLevelSet::GetChannelName - Returns the name of the function output channel to use. + * @return the name of the function output channel + */ + std::string CLevelSet::GetChannelName() + { + Lib3MF_uint32 bytesNeededChannelName = 0; + Lib3MF_uint32 bytesWrittenChannelName = 0; + CheckError(lib3mf_levelset_getchannelname(m_pHandle, 0, &bytesNeededChannelName, nullptr)); + std::vector bufferChannelName(bytesNeededChannelName); + CheckError(lib3mf_levelset_getchannelname(m_pHandle, bytesNeededChannelName, &bytesWrittenChannelName, &bufferChannelName[0])); + + return std::string(&bufferChannelName[0]); + } + + /** + * CLevelSet::SetChannelName - Sets the name of the function output channel to use. + * @param[in] sChannelName - new name of the function output channel + */ + void CLevelSet::SetChannelName(const std::string & sChannelName) + { + CheckError(lib3mf_levelset_setchannelname(m_pHandle, sChannelName.c_str())); + } + + /** + * CLevelSet::SetMinFeatureSize - Sets the minimal feature size as a hint for the function evaluator + * @param[in] dMinFeatureSize - minimal feature size + */ + void CLevelSet::SetMinFeatureSize(const Lib3MF_double dMinFeatureSize) + { + CheckError(lib3mf_levelset_setminfeaturesize(m_pHandle, dMinFeatureSize)); + } + + /** + * CLevelSet::GetMinFeatureSize - Returns the minimal feature size as a hint for the function evaluator + * @return minimal feature size + */ + Lib3MF_double CLevelSet::GetMinFeatureSize() + { + Lib3MF_double resultMinFeatureSize = 0; + CheckError(lib3mf_levelset_getminfeaturesize(m_pHandle, &resultMinFeatureSize)); + + return resultMinFeatureSize; + } + + /** + * CLevelSet::SetFallBackValue - Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @param[in] dFallBackValue - fallback value + */ + void CLevelSet::SetFallBackValue(const Lib3MF_double dFallBackValue) + { + CheckError(lib3mf_levelset_setfallbackvalue(m_pHandle, dFallBackValue)); + } + + /** + * CLevelSet::GetFallBackValue - Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @return fallback value + */ + Lib3MF_double CLevelSet::GetFallBackValue() + { + Lib3MF_double resultFallBackValue = 0; + CheckError(lib3mf_levelset_getfallbackvalue(m_pHandle, &resultFallBackValue)); + + return resultFallBackValue; + } + + /** + * CLevelSet::SetMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + * @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + */ + void CLevelSet::SetMeshBBoxOnly(const bool bMeshBBoxOnly) + { + CheckError(lib3mf_levelset_setmeshbboxonly(m_pHandle, bMeshBBoxOnly)); + } + + /** + * CLevelSet::GetMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + * @return If set only the bounding box of the mesh is intersected with the boundary + */ + bool CLevelSet::GetMeshBBoxOnly() + { + bool resultMeshBBoxOnly = 0; + CheckError(lib3mf_levelset_getmeshbboxonly(m_pHandle, &resultMeshBBoxOnly)); + + return resultMeshBBoxOnly; + } + + /** + * CLevelSet::SetMesh - Sets the mesh to use as evaluation domain + * @param[in] pTheMesh - The mesh + */ + void CLevelSet::SetMesh(classParam pTheMesh) + { + Lib3MFHandle hTheMesh = pTheMesh.GetHandle(); + CheckError(lib3mf_levelset_setmesh(m_pHandle, hTheMesh)); + } + + /** + * CLevelSet::GetMesh - Returns the mesh that is used as evaluation domain + * @return The mesh + */ + PMeshObject CLevelSet::GetMesh() + { + Lib3MFHandle hTheMesh = nullptr; + CheckError(lib3mf_levelset_getmesh(m_pHandle, &hTheMesh)); + + if (hTheMesh) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheMesh))); + } else { + return nullptr; + } + } + + /** + * CLevelSet::GetVolumeData - Retrieves the VolumeData this Object. + * @return the VolumeData of this Object + */ + PVolumeData CLevelSet::GetVolumeData() + { + Lib3MFHandle hTheVolumeData = nullptr; + CheckError(lib3mf_levelset_getvolumedata(m_pHandle, &hTheVolumeData)); + + if (hTheVolumeData) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheVolumeData))); + } else { + return nullptr; + } + } + + /** + * CLevelSet::SetVolumeData - Sets the VolumeData of this LevelSet. + * @param[in] pTheVolumeData - the VolumeData of this MeshObject + */ + void CLevelSet::SetVolumeData(classParam pTheVolumeData) + { + Lib3MFHandle hTheVolumeData = pTheVolumeData.GetHandle(); + CheckError(lib3mf_levelset_setvolumedata(m_pHandle, hTheVolumeData)); + } + + /** + * Method definitions for class CBeamLattice + */ + + /** + * CBeamLattice::GetMinLength - Returns the minimal length of beams for the beamlattice. + * @return minimal length of beams for the beamlattice + */ + Lib3MF_double CBeamLattice::GetMinLength() + { + Lib3MF_double resultMinLength = 0; + CheckError(lib3mf_beamlattice_getminlength(m_pHandle, &resultMinLength)); + + return resultMinLength; + } + + /** + * CBeamLattice::SetMinLength - Sets the minimal length of beams for the beamlattice. + * @param[in] dMinLength - minimal length of beams for the beamlattice + */ + void CBeamLattice::SetMinLength(const Lib3MF_double dMinLength) + { + CheckError(lib3mf_beamlattice_setminlength(m_pHandle, dMinLength)); + } + + /** + * CBeamLattice::GetClipping - Returns the clipping mode and the clipping-mesh for the beamlattice of this mesh. + * @param[out] eClipMode - contains the clip mode of this mesh + * @param[out] nUniqueResourceID - filled with the UniqueResourceID of the clipping mesh-object or an undefined value if pClipMode is MODELBEAMLATTICECLIPMODE_NONE + */ + void CBeamLattice::GetClipping(eBeamLatticeClipMode & eClipMode, Lib3MF_uint32 & nUniqueResourceID) + { + CheckError(lib3mf_beamlattice_getclipping(m_pHandle, &eClipMode, &nUniqueResourceID)); + } + + /** + * CBeamLattice::SetClipping - Sets the clipping mode and the clipping-mesh for the beamlattice of this mesh. + * @param[in] eClipMode - contains the clip mode of this mesh + * @param[in] nUniqueResourceID - the UniqueResourceID of the clipping mesh-object. This mesh-object has to be defined before setting the Clipping. + */ + void CBeamLattice::SetClipping(const eBeamLatticeClipMode eClipMode, const Lib3MF_uint32 nUniqueResourceID) + { + CheckError(lib3mf_beamlattice_setclipping(m_pHandle, eClipMode, nUniqueResourceID)); + } + + /** + * CBeamLattice::GetRepresentation - Returns the representation-mesh for the beamlattice of this mesh. + * @return flag whether the beamlattice has a representation mesh. + * @param[out] nUniqueResourceID - filled with the UniqueResourceID of the clipping mesh-object. + */ + bool CBeamLattice::GetRepresentation(Lib3MF_uint32 & nUniqueResourceID) + { + bool resultHasRepresentation = 0; + CheckError(lib3mf_beamlattice_getrepresentation(m_pHandle, &resultHasRepresentation, &nUniqueResourceID)); + + return resultHasRepresentation; + } + + /** + * CBeamLattice::SetRepresentation - Sets the representation-mesh for the beamlattice of this mesh. + * @param[in] nUniqueResourceID - the UniqueResourceID of the representation mesh-object. This mesh-object has to be defined before setting the representation. + */ + void CBeamLattice::SetRepresentation(const Lib3MF_uint32 nUniqueResourceID) + { + CheckError(lib3mf_beamlattice_setrepresentation(m_pHandle, nUniqueResourceID)); + } + + /** + * CBeamLattice::GetBallOptions - Returns the ball mode and the default ball radius for the beamlattice of this mesh. + * @param[out] eBallMode - contains the ball mode of this mesh + * @param[out] dBallRadius - default ball radius of balls for the beamlattice + */ + void CBeamLattice::GetBallOptions(eBeamLatticeBallMode & eBallMode, Lib3MF_double & dBallRadius) + { + CheckError(lib3mf_beamlattice_getballoptions(m_pHandle, &eBallMode, &dBallRadius)); + } + + /** + * CBeamLattice::SetBallOptions - Sets the ball mode and thedefault ball radius for the beamlattice. + * @param[in] eBallMode - contains the ball mode of this mesh + * @param[in] dBallRadius - default ball radius of balls for the beamlattice + */ + void CBeamLattice::SetBallOptions(const eBeamLatticeBallMode eBallMode, const Lib3MF_double dBallRadius) + { + CheckError(lib3mf_beamlattice_setballoptions(m_pHandle, eBallMode, dBallRadius)); + } + + /** + * CBeamLattice::GetBeamCount - Returns the beam count of a mesh object. + * @return filled with the beam count. + */ + Lib3MF_uint32 CBeamLattice::GetBeamCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_beamlattice_getbeamcount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * CBeamLattice::GetBeam - Returns indices, radii and capmodes of a single beam of a mesh object. + * @param[in] nIndex - Index of the beam (0 to beamcount - 1). + * @return filled with the beam indices, radii and capmodes. + */ + sBeam CBeamLattice::GetBeam(const Lib3MF_uint32 nIndex) + { + sBeam resultBeamInfo; + CheckError(lib3mf_beamlattice_getbeam(m_pHandle, nIndex, &resultBeamInfo)); + + return resultBeamInfo; + } + + /** + * CBeamLattice::AddBeam - Adds a single beam to a mesh object. + * @param[in] BeamInfo - contains the node indices, radii and capmodes. + * @return filled with the new Index of the beam. + */ + Lib3MF_uint32 CBeamLattice::AddBeam(const sBeam & BeamInfo) + { + Lib3MF_uint32 resultIndex = 0; + CheckError(lib3mf_beamlattice_addbeam(m_pHandle, &BeamInfo, &resultIndex)); + + return resultIndex; + } + + /** + * CBeamLattice::SetBeam - Sets the indices, radii and capmodes of a single beam of a mesh object. + * @param[in] nIndex - Index of the beam (0 to beamcount - 1). + * @param[in] BeamInfo - filled with the beam indices, radii and capmodes. + */ + void CBeamLattice::SetBeam(const Lib3MF_uint32 nIndex, const sBeam & BeamInfo) + { + CheckError(lib3mf_beamlattice_setbeam(m_pHandle, nIndex, &BeamInfo)); + } + + /** + * CBeamLattice::SetBeams - Sets all beam indices, radii and capmodes of a mesh object. + * @param[in] BeamInfoBuffer - contains information of a number of beams + */ + void CBeamLattice::SetBeams(const CInputVector & BeamInfoBuffer) + { + CheckError(lib3mf_beamlattice_setbeams(m_pHandle, (Lib3MF_uint64)BeamInfoBuffer.size(), BeamInfoBuffer.data())); + } + + /** + * CBeamLattice::GetBeams - obtains all beam indices, radii and capmodes of a mesh object. + * @param[out] BeamInfoBuffer - contains information of all beams + */ + void CBeamLattice::GetBeams(std::vector & BeamInfoBuffer) + { + Lib3MF_uint64 elementsNeededBeamInfo = 0; + Lib3MF_uint64 elementsWrittenBeamInfo = 0; + CheckError(lib3mf_beamlattice_getbeams(m_pHandle, 0, &elementsNeededBeamInfo, nullptr)); + BeamInfoBuffer.resize((size_t) elementsNeededBeamInfo); + CheckError(lib3mf_beamlattice_getbeams(m_pHandle, elementsNeededBeamInfo, &elementsWrittenBeamInfo, BeamInfoBuffer.data())); + } + + /** + * CBeamLattice::GetBallCount - Returns the ball count of a mesh object. + * @return filled with the ball count. + */ + Lib3MF_uint32 CBeamLattice::GetBallCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_beamlattice_getballcount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * CBeamLattice::GetBall - Returns index and radius of a single ball of a mesh object. + * @param[in] nIndex - Index of the ball (0 to ballcount - 1). + * @return filled with the ball node index and radius. + */ + sBall CBeamLattice::GetBall(const Lib3MF_uint32 nIndex) + { + sBall resultBallInfo; + CheckError(lib3mf_beamlattice_getball(m_pHandle, nIndex, &resultBallInfo)); + + return resultBallInfo; + } + + /** + * CBeamLattice::AddBall - Adds a single ball to a mesh object. + * @param[in] BallInfo - contains the node index and radius. + * @return filled with the new Index of the ball. + */ + Lib3MF_uint32 CBeamLattice::AddBall(const sBall & BallInfo) + { + Lib3MF_uint32 resultIndex = 0; + CheckError(lib3mf_beamlattice_addball(m_pHandle, &BallInfo, &resultIndex)); + + return resultIndex; + } + + /** + * CBeamLattice::SetBall - Sets the index and radius of a single ball of a mesh object. + * @param[in] nIndex - Index of the ball (0 to ballcount - 1). + * @param[in] BallInfo - filled with the ball node index and radius. + */ + void CBeamLattice::SetBall(const Lib3MF_uint32 nIndex, const sBall & BallInfo) + { + CheckError(lib3mf_beamlattice_setball(m_pHandle, nIndex, &BallInfo)); + } + + /** + * CBeamLattice::SetBalls - Sets all ball indices and radii of a mesh object. + * @param[in] BallInfoBuffer - contains information of a number of balls + */ + void CBeamLattice::SetBalls(const CInputVector & BallInfoBuffer) + { + CheckError(lib3mf_beamlattice_setballs(m_pHandle, (Lib3MF_uint64)BallInfoBuffer.size(), BallInfoBuffer.data())); + } + + /** + * CBeamLattice::GetBalls - obtains all ball indices and radii of a mesh object. + * @param[out] BallInfoBuffer - contains information of all balls + */ + void CBeamLattice::GetBalls(std::vector & BallInfoBuffer) + { + Lib3MF_uint64 elementsNeededBallInfo = 0; + Lib3MF_uint64 elementsWrittenBallInfo = 0; + CheckError(lib3mf_beamlattice_getballs(m_pHandle, 0, &elementsNeededBallInfo, nullptr)); + BallInfoBuffer.resize((size_t) elementsNeededBallInfo); + CheckError(lib3mf_beamlattice_getballs(m_pHandle, elementsNeededBallInfo, &elementsWrittenBallInfo, BallInfoBuffer.data())); + } + + /** + * CBeamLattice::GetBeamSetCount - Returns the number of beamsets of a mesh object. + * @return filled with the beamset count. + */ + Lib3MF_uint32 CBeamLattice::GetBeamSetCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_beamlattice_getbeamsetcount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * CBeamLattice::AddBeamSet - Adds an empty beamset to a mesh object + * @return the new beamset + */ + PBeamSet CBeamLattice::AddBeamSet() + { + Lib3MFHandle hBeamSet = nullptr; + CheckError(lib3mf_beamlattice_addbeamset(m_pHandle, &hBeamSet)); + + if (!hBeamSet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBeamSet))); + } + + /** + * CBeamLattice::GetBeamSet - Returns a beamset of a mesh object + * @param[in] nIndex - index of the requested beamset (0 ... beamsetcount-1). + * @return the requested beamset + */ + PBeamSet CBeamLattice::GetBeamSet(const Lib3MF_uint32 nIndex) + { + Lib3MFHandle hBeamSet = nullptr; + CheckError(lib3mf_beamlattice_getbeamset(m_pHandle, nIndex, &hBeamSet)); + + if (!hBeamSet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBeamSet))); + } + + /** + * Method definitions for class CFunctionReference + */ + + /** + * CFunctionReference::GetFunctionResourceID - Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. + * @return returns the UniqueResourceID. + */ + Lib3MF_uint32 CFunctionReference::GetFunctionResourceID() + { + Lib3MF_uint32 resultUniqueResourceID = 0; + CheckError(lib3mf_functionreference_getfunctionresourceid(m_pHandle, &resultUniqueResourceID)); + + return resultUniqueResourceID; + } + + /** + * CFunctionReference::SetFunctionResourceID - Sets the UniqueResourceID to refer to. + * @param[in] nUniqueResourceID - UniqueResourceID of the function + */ + void CFunctionReference::SetFunctionResourceID(const Lib3MF_uint32 nUniqueResourceID) + { + CheckError(lib3mf_functionreference_setfunctionresourceid(m_pHandle, nUniqueResourceID)); + } + + /** + * CFunctionReference::GetTransform - Returns the transformation matrix into the coordinate system of the referenced Function. + * @return the transformation matrix + */ + sTransform CFunctionReference::GetTransform() + { + sTransform resultTransform; + CheckError(lib3mf_functionreference_gettransform(m_pHandle, &resultTransform)); + + return resultTransform; + } + + /** + * CFunctionReference::SetTransform - Sets the transformation matrix into the coordinate system of the referenced Function. + * @param[in] Transform - new transformation matrix + */ + void CFunctionReference::SetTransform(const sTransform & Transform) + { + CheckError(lib3mf_functionreference_settransform(m_pHandle, &Transform)); + } + + /** + * CFunctionReference::GetChannelName - Returns the name of the function output channel to use. + * @return the name of the function output channel + */ + std::string CFunctionReference::GetChannelName() + { + Lib3MF_uint32 bytesNeededChannelName = 0; + Lib3MF_uint32 bytesWrittenChannelName = 0; + CheckError(lib3mf_functionreference_getchannelname(m_pHandle, 0, &bytesNeededChannelName, nullptr)); + std::vector bufferChannelName(bytesNeededChannelName); + CheckError(lib3mf_functionreference_getchannelname(m_pHandle, bytesNeededChannelName, &bytesWrittenChannelName, &bufferChannelName[0])); + + return std::string(&bufferChannelName[0]); + } + + /** + * CFunctionReference::SetChannelName - Sets the name of the function output channel to use. + * @param[in] sChannelName - new name of the function output channel + */ + void CFunctionReference::SetChannelName(const std::string & sChannelName) + { + CheckError(lib3mf_functionreference_setchannelname(m_pHandle, sChannelName.c_str())); + } + + /** + * CFunctionReference::SetMinFeatureSize - Sets the minimal feature size as a hint for the function evaluator + * @param[in] dMinFeatureSize - minimal feature size + */ + void CFunctionReference::SetMinFeatureSize(const Lib3MF_double dMinFeatureSize) + { + CheckError(lib3mf_functionreference_setminfeaturesize(m_pHandle, dMinFeatureSize)); + } + + /** + * CFunctionReference::GetMinFeatureSize - Returns the minimal feature size as a hint for the function evaluator + * @return minimal feature size + */ + Lib3MF_double CFunctionReference::GetMinFeatureSize() + { + Lib3MF_double resultMinFeatureSize = 0; + CheckError(lib3mf_functionreference_getminfeaturesize(m_pHandle, &resultMinFeatureSize)); + + return resultMinFeatureSize; + } + + /** + * CFunctionReference::SetFallBackValue - Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @param[in] dFallBackValue - fallback value + */ + void CFunctionReference::SetFallBackValue(const Lib3MF_double dFallBackValue) + { + CheckError(lib3mf_functionreference_setfallbackvalue(m_pHandle, dFallBackValue)); + } + + /** + * CFunctionReference::GetFallBackValue - Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @return fallback value + */ + Lib3MF_double CFunctionReference::GetFallBackValue() + { + Lib3MF_double resultFallBackValue = 0; + CheckError(lib3mf_functionreference_getfallbackvalue(m_pHandle, &resultFallBackValue)); + + return resultFallBackValue; + } + + /** + * Method definitions for class CVolumeDataColor + */ + + /** + * Method definitions for class CMaterialMapping + */ + + /** + * Method definitions for class CVolumeDataComposite + */ + + /** + * CVolumeDataComposite::GetBaseMaterialGroup - Returns the BaseMaterialGroup used within this volume data item + * @return The BaseMaterialGroup instance of this VolumeDataComposite element + */ + PBaseMaterialGroup CVolumeDataComposite::GetBaseMaterialGroup() + { + Lib3MFHandle hBaseMaterialGroupInstance = nullptr; + CheckError(lib3mf_volumedatacomposite_getbasematerialgroup(m_pHandle, &hBaseMaterialGroupInstance)); + + if (!hBaseMaterialGroupInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBaseMaterialGroupInstance))); + } + + /** + * CVolumeDataComposite::SetBaseMaterialGroup - Sets the BaseMaterialGroup to use within this volume data item. + * @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element + */ + void CVolumeDataComposite::SetBaseMaterialGroup(classParam pBaseMaterialGroupInstance) + { + Lib3MFHandle hBaseMaterialGroupInstance = pBaseMaterialGroupInstance.GetHandle(); + CheckError(lib3mf_volumedatacomposite_setbasematerialgroup(m_pHandle, hBaseMaterialGroupInstance)); + } + + /** + * CVolumeDataComposite::GetMaterialMappingCount - Returns the number of material mappings of this VolumeDataComposite element + * @return the number of material mappings. + */ + Lib3MF_uint32 CVolumeDataComposite::GetMaterialMappingCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_volumedatacomposite_getmaterialmappingcount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * CVolumeDataComposite::GetMaterialMapping - Returns MaterialMappting with given index + * @param[in] nIndex - Index of the MaterialMapping in question. + * @return MaterialMapping used in this element + */ + PMaterialMapping CVolumeDataComposite::GetMaterialMapping(const Lib3MF_uint32 nIndex) + { + Lib3MFHandle hTheMaterialMapping = nullptr; + CheckError(lib3mf_volumedatacomposite_getmaterialmapping(m_pHandle, nIndex, &hTheMaterialMapping)); + + if (!hTheMaterialMapping) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheMaterialMapping))); + } + + /** + * CVolumeDataComposite::AddMaterialMapping - Adds a the MaterialMapping + * @param[in] Transform - new transformation matrix + * @return The new MaterialMapping + */ + PMaterialMapping CVolumeDataComposite::AddMaterialMapping(const sTransform & Transform) + { + Lib3MFHandle hTheMaterialMapping = nullptr; + CheckError(lib3mf_volumedatacomposite_addmaterialmapping(m_pHandle, &Transform, &hTheMaterialMapping)); + + if (!hTheMaterialMapping) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheMaterialMapping))); + } + + /** + * CVolumeDataComposite::RemoveMaterialMapping - Removes the MaterialMapping with given index + * @param[in] nIndex - The index of the MaterialMapping to be removed. + */ + void CVolumeDataComposite::RemoveMaterialMapping(const Lib3MF_uint32 nIndex) + { + CheckError(lib3mf_volumedatacomposite_removematerialmapping(m_pHandle, nIndex)); + } + + /** + * Method definitions for class CVolumeDataProperty + */ + + /** + * CVolumeDataProperty::GetName - Gets the qualified name of this property. + * @return The qualified name of this property. + */ + std::string CVolumeDataProperty::GetName() + { + Lib3MF_uint32 bytesNeededPropertyName = 0; + Lib3MF_uint32 bytesWrittenPropertyName = 0; + CheckError(lib3mf_volumedataproperty_getname(m_pHandle, 0, &bytesNeededPropertyName, nullptr)); + std::vector bufferPropertyName(bytesNeededPropertyName); + CheckError(lib3mf_volumedataproperty_getname(m_pHandle, bytesNeededPropertyName, &bytesWrittenPropertyName, &bufferPropertyName[0])); + + return std::string(&bufferPropertyName[0]); + } + + /** + * CVolumeDataProperty::SetIsRequired - Sets whether this property is required to process this 3MF document instance. + * @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. + */ + void CVolumeDataProperty::SetIsRequired(const bool bIsRequired) + { + CheckError(lib3mf_volumedataproperty_setisrequired(m_pHandle, bIsRequired)); + } + + /** + * CVolumeDataProperty::IsRequired - Returns whether this property is required to process this 3MF document instance. + * @return Is this property required to process this 3MF document instance? + */ + bool CVolumeDataProperty::IsRequired() + { + bool resultIsRequired = 0; + CheckError(lib3mf_volumedataproperty_isrequired(m_pHandle, &resultIsRequired)); + + return resultIsRequired; + } + + /** + * Method definitions for class CVolumeData + */ + + /** + * CVolumeData::GetComposite - Returns the VolumeDataComposite of this VolumeData instance + * @return filled with the VolumeDataComposite of this VolumeData instance. + */ + PVolumeDataComposite CVolumeData::GetComposite() + { + Lib3MFHandle hTheCompositeData = nullptr; + CheckError(lib3mf_volumedata_getcomposite(m_pHandle, &hTheCompositeData)); + + if (hTheCompositeData) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheCompositeData))); + } else { + return nullptr; + } + } + + /** + * CVolumeData::CreateNewComposite - Creates a new VolumeDataComposite for this VolumeData instance + * @return The new VolumeDataComposite of this VolumeData instance. + */ + PVolumeDataComposite CVolumeData::CreateNewComposite() + { + Lib3MFHandle hTheCompositeData = nullptr; + CheckError(lib3mf_volumedata_createnewcomposite(m_pHandle, &hTheCompositeData)); + + if (!hTheCompositeData) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheCompositeData))); + } + + /** + * CVolumeData::RemoveComposite - Removes the VolumeDataComposite of this VolumeData instance + */ + void CVolumeData::RemoveComposite() + { + CheckError(lib3mf_volumedata_removecomposite(m_pHandle)); + } + + /** + * CVolumeData::GetColor - Returns the VolumeDataColor of this VolumeData instance + * @return filled with the VolumeDataColor of this VolumeData instance. + */ + PVolumeDataColor CVolumeData::GetColor() + { + Lib3MFHandle hTheColorData = nullptr; + CheckError(lib3mf_volumedata_getcolor(m_pHandle, &hTheColorData)); + + if (hTheColorData) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheColorData))); + } else { + return nullptr; + } + } + + /** + * CVolumeData::CreateNewColor - Creates a new VolumeDataColor for this VolumeData instance + * @param[in] pTheFunction - Function used in this element + * @return The new VolumeDataColor of this VolumeData instance. + */ + PVolumeDataColor CVolumeData::CreateNewColor(classParam pTheFunction) + { + Lib3MFHandle hTheFunction = pTheFunction.GetHandle(); + Lib3MFHandle hTheColorData = nullptr; + CheckError(lib3mf_volumedata_createnewcolor(m_pHandle, hTheFunction, &hTheColorData)); + + if (!hTheColorData) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheColorData))); + } + + /** + * CVolumeData::RemoveColor - Removes the VolumeDataColor of this VolumeData instance + */ + void CVolumeData::RemoveColor() + { + CheckError(lib3mf_volumedata_removecolor(m_pHandle)); + } + + /** + * CVolumeData::GetPropertyCount - Returns the number of VolumeDataProperty + * @return the number of VolumeDataProperty-elements within this VolumdeData + */ + Lib3MF_uint32 CVolumeData::GetPropertyCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_volumedata_getpropertycount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * CVolumeData::GetProperty - Returns the VolumeDataProperty at a given Index + * @param[in] nIndex - the index of the VolumeDataProperty to be returned. + * @return the VolumeDataProperty at the given index. + */ + PVolumeDataProperty CVolumeData::GetProperty(const Lib3MF_uint32 nIndex) + { + Lib3MFHandle hTheVolumeDataProperty = nullptr; + CheckError(lib3mf_volumedata_getproperty(m_pHandle, nIndex, &hTheVolumeDataProperty)); + + if (!hTheVolumeDataProperty) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheVolumeDataProperty))); + } + + /** + * CVolumeData::AddPropertyFromFunction - Adds a new VolumeDataProperty from a Function + * @param[in] sName - the qualified name (namespace+name) of the Property + * @param[in] pTheFunction - Function used in this element + * @return the newly created VolumeDataProperty. + */ + PVolumeDataProperty CVolumeData::AddPropertyFromFunction(const std::string & sName, classParam pTheFunction) + { + Lib3MFHandle hTheFunction = pTheFunction.GetHandle(); + Lib3MFHandle hTheVolumeDataProperty = nullptr; + CheckError(lib3mf_volumedata_addpropertyfromfunction(m_pHandle, sName.c_str(), hTheFunction, &hTheVolumeDataProperty)); + + if (!hTheVolumeDataProperty) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheVolumeDataProperty))); + } + + /** + * CVolumeData::RemoveProperty - Removes the VolumeDataProperty with a given index + * @param[in] nIndex - the index of the VolumeDataProperty to be removed. + */ + void CVolumeData::RemoveProperty(const Lib3MF_uint32 nIndex) + { + CheckError(lib3mf_volumedata_removeproperty(m_pHandle, nIndex)); + } + + /** + * Method definitions for class CComponent + */ + + /** + * CComponent::GetObjectResource - Returns the Resource Instance of the component. + * @return filled with the Resource Instance. + */ + PObject CComponent::GetObjectResource() + { + Lib3MFHandle hObjectResource = nullptr; + CheckError(lib3mf_component_getobjectresource(m_pHandle, &hObjectResource)); + + if (!hObjectResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hObjectResource))); + } + + /** + * CComponent::GetObjectResourceID - Returns the UniqueResourceID of the component. + * @return returns the UniqueResourceID. + */ + Lib3MF_uint32 CComponent::GetObjectResourceID() + { + Lib3MF_uint32 resultUniqueResourceID = 0; + CheckError(lib3mf_component_getobjectresourceid(m_pHandle, &resultUniqueResourceID)); + + return resultUniqueResourceID; + } + + /** + * CComponent::GetUUID - returns, whether a component has a UUID and, if true, the component's UUID + * @param[out] bHasUUID - flag whether the component has a UUID + * @return the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + std::string CComponent::GetUUID(bool & bHasUUID) + { + Lib3MF_uint32 bytesNeededUUID = 0; + Lib3MF_uint32 bytesWrittenUUID = 0; + CheckError(lib3mf_component_getuuid(m_pHandle, &bHasUUID, 0, &bytesNeededUUID, nullptr)); + std::vector bufferUUID(bytesNeededUUID); + CheckError(lib3mf_component_getuuid(m_pHandle, &bHasUUID, bytesNeededUUID, &bytesWrittenUUID, &bufferUUID[0])); + + return std::string(&bufferUUID[0]); + } + + /** + * CComponent::SetUUID - sets the component's UUID + * @param[in] sUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + void CComponent::SetUUID(const std::string & sUUID) + { + CheckError(lib3mf_component_setuuid(m_pHandle, sUUID.c_str())); + } + + /** + * CComponent::HasTransform - Returns, if the component has a different transformation than the identity matrix + * @return if true is returned, the transformation is not equal than the identity + */ + bool CComponent::HasTransform() + { + bool resultHasTransform = 0; + CheckError(lib3mf_component_hastransform(m_pHandle, &resultHasTransform)); + + return resultHasTransform; + } + + /** + * CComponent::GetTransform - Returns the transformation matrix of the component. + * @return filled with the component transformation matrix + */ + sTransform CComponent::GetTransform() + { + sTransform resultTransform; + CheckError(lib3mf_component_gettransform(m_pHandle, &resultTransform)); + + return resultTransform; + } + + /** + * CComponent::SetTransform - Sets the transformation matrix of the component. + * @param[in] Transform - new transformation matrix + */ + void CComponent::SetTransform(const sTransform & Transform) + { + CheckError(lib3mf_component_settransform(m_pHandle, &Transform)); + } + + /** + * Method definitions for class CComponentsObject + */ + + /** + * CComponentsObject::AddComponent - Adds a new component to a components object. + * @param[in] pObjectResource - object to add as component. Must not lead to circular references! + * @param[in] Transform - optional transform matrix for the component. + * @return new component instance + */ + PComponent CComponentsObject::AddComponent(classParam pObjectResource, const sTransform & Transform) + { + Lib3MFHandle hObjectResource = pObjectResource.GetHandle(); + Lib3MFHandle hComponentInstance = nullptr; + CheckError(lib3mf_componentsobject_addcomponent(m_pHandle, hObjectResource, &Transform, &hComponentInstance)); + + if (!hComponentInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hComponentInstance))); + } + + /** + * CComponentsObject::GetComponent - Retrieves a component from a component object. + * @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) + * @return component instance + */ + PComponent CComponentsObject::GetComponent(const Lib3MF_uint32 nIndex) + { + Lib3MFHandle hComponentInstance = nullptr; + CheckError(lib3mf_componentsobject_getcomponent(m_pHandle, nIndex, &hComponentInstance)); + + if (!hComponentInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hComponentInstance))); + } + + /** + * CComponentsObject::GetComponentCount - Retrieves a component count of a component object. + * @return returns the component count + */ + Lib3MF_uint32 CComponentsObject::GetComponentCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_componentsobject_getcomponentcount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * Method definitions for class CBeamSet + */ + + /** + * CBeamSet::SetName - Sets a beamset's name string + * @param[in] sName - new name of the beamset. + */ + void CBeamSet::SetName(const std::string & sName) + { + CheckError(lib3mf_beamset_setname(m_pHandle, sName.c_str())); + } + + /** + * CBeamSet::GetName - Retrieves a beamset's name string + * @return returns the name of the beamset. + */ + std::string CBeamSet::GetName() + { + Lib3MF_uint32 bytesNeededName = 0; + Lib3MF_uint32 bytesWrittenName = 0; + CheckError(lib3mf_beamset_getname(m_pHandle, 0, &bytesNeededName, nullptr)); + std::vector bufferName(bytesNeededName); + CheckError(lib3mf_beamset_getname(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); + + return std::string(&bufferName[0]); + } + + /** + * CBeamSet::SetIdentifier - Sets a beamset's identifier string + * @param[in] sIdentifier - new name of the beamset. + */ + void CBeamSet::SetIdentifier(const std::string & sIdentifier) + { + CheckError(lib3mf_beamset_setidentifier(m_pHandle, sIdentifier.c_str())); + } + + /** + * CBeamSet::GetIdentifier - Retrieves a beamset's identifier string + * @return returns the identifier of the beamset. + */ + std::string CBeamSet::GetIdentifier() + { + Lib3MF_uint32 bytesNeededIdentifier = 0; + Lib3MF_uint32 bytesWrittenIdentifier = 0; + CheckError(lib3mf_beamset_getidentifier(m_pHandle, 0, &bytesNeededIdentifier, nullptr)); + std::vector bufferIdentifier(bytesNeededIdentifier); + CheckError(lib3mf_beamset_getidentifier(m_pHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0])); + + return std::string(&bufferIdentifier[0]); + } + + /** + * CBeamSet::GetReferenceCount - Retrieves the reference count of a beamset + * @return returns the reference count + */ + Lib3MF_uint32 CBeamSet::GetReferenceCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_beamset_getreferencecount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * CBeamSet::SetReferences - Sets the references of a beamset + * @param[in] ReferencesBuffer - the new indices of all beams in this beamset + */ + void CBeamSet::SetReferences(const CInputVector & ReferencesBuffer) + { + CheckError(lib3mf_beamset_setreferences(m_pHandle, (Lib3MF_uint64)ReferencesBuffer.size(), ReferencesBuffer.data())); + } + + /** + * CBeamSet::GetReferences - Retrieves the references of a beamset + * @param[out] ReferencesBuffer - retrieves the indices of all beams in this beamset + */ + void CBeamSet::GetReferences(std::vector & ReferencesBuffer) + { + Lib3MF_uint64 elementsNeededReferences = 0; + Lib3MF_uint64 elementsWrittenReferences = 0; + CheckError(lib3mf_beamset_getreferences(m_pHandle, 0, &elementsNeededReferences, nullptr)); + ReferencesBuffer.resize((size_t) elementsNeededReferences); + CheckError(lib3mf_beamset_getreferences(m_pHandle, elementsNeededReferences, &elementsWrittenReferences, ReferencesBuffer.data())); + } + + /** + * CBeamSet::GetBallReferenceCount - Retrieves the ball reference count of a beamset + * @return returns the ball reference count + */ + Lib3MF_uint32 CBeamSet::GetBallReferenceCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_beamset_getballreferencecount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * CBeamSet::SetBallReferences - Sets the ball references of a beamset + * @param[in] BallReferencesBuffer - the new indices of all balls in this beamset + */ + void CBeamSet::SetBallReferences(const CInputVector & BallReferencesBuffer) + { + CheckError(lib3mf_beamset_setballreferences(m_pHandle, (Lib3MF_uint64)BallReferencesBuffer.size(), BallReferencesBuffer.data())); + } + + /** + * CBeamSet::GetBallReferences - Retrieves the ball references of a beamset + * @param[out] BallReferencesBuffer - retrieves the indices of all balls in this beamset + */ + void CBeamSet::GetBallReferences(std::vector & BallReferencesBuffer) + { + Lib3MF_uint64 elementsNeededBallReferences = 0; + Lib3MF_uint64 elementsWrittenBallReferences = 0; + CheckError(lib3mf_beamset_getballreferences(m_pHandle, 0, &elementsNeededBallReferences, nullptr)); + BallReferencesBuffer.resize((size_t) elementsNeededBallReferences); + CheckError(lib3mf_beamset_getballreferences(m_pHandle, elementsNeededBallReferences, &elementsWrittenBallReferences, BallReferencesBuffer.data())); + } + + /** + * Method definitions for class CBaseMaterialGroup + */ + + /** + * CBaseMaterialGroup::GetCount - Retrieves the count of base materials in the material group. + * @return returns the count of base materials. + */ + Lib3MF_uint32 CBaseMaterialGroup::GetCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_basematerialgroup_getcount(m_pHandle, &resultCount)); + + return resultCount; } - return new CBase(this, pHandle); -} /** - * CWrapper::GetLibraryVersion - retrieves the binary version of this library. - * @param[out] nMajor - returns the major version of this library - * @param[out] nMinor - returns the minor version of this library - * @param[out] nMicro - returns the micro version of this library + * CBaseMaterialGroup::GetAllPropertyIDs - returns all the PropertyIDs of all materials in this group + * @param[out] PropertyIDsBuffer - PropertyID of the material in the material group. */ - inline void CWrapper::GetLibraryVersion(Lib3MF_uint32 & nMajor, Lib3MF_uint32 & nMinor, Lib3MF_uint32 & nMicro) + void CBaseMaterialGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) { - CheckError(nullptr,lib3mf_getlibraryversion(&nMajor, &nMinor, &nMicro)); + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(lib3mf_basematerialgroup_getallpropertyids(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(lib3mf_basematerialgroup_getallpropertyids(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); } /** - * CWrapper::GetPrereleaseInformation - retrieves prerelease information of this library. - * @return Does the library provide prerelease version? - * @param[out] sPrereleaseInfo - retrieves prerelease information of this library. + * CBaseMaterialGroup::AddMaterial - Adds a new material to the material group + * @param[in] sName - new name of the base material. + * @param[in] DisplayColor - Display color of the material + * @return returns new PropertyID of the new material in the material group. */ - inline bool CWrapper::GetPrereleaseInformation(std::string & sPrereleaseInfo) + Lib3MF_uint32 CBaseMaterialGroup::AddMaterial(const std::string & sName, const sColor & DisplayColor) { - bool resultHasPrereleaseInfo = 0; - Lib3MF_uint32 bytesNeededPrereleaseInfo = 0; - Lib3MF_uint32 bytesWrittenPrereleaseInfo = 0; - CheckError(nullptr,lib3mf_getprereleaseinformation(&resultHasPrereleaseInfo, 0, &bytesNeededPrereleaseInfo, nullptr)); - std::vector bufferPrereleaseInfo(bytesNeededPrereleaseInfo); - CheckError(nullptr,lib3mf_getprereleaseinformation(&resultHasPrereleaseInfo, bytesNeededPrereleaseInfo, &bytesWrittenPrereleaseInfo, &bufferPrereleaseInfo[0])); - sPrereleaseInfo = std::string(&bufferPrereleaseInfo[0]); + Lib3MF_uint32 resultPropertyID = 0; + CheckError(lib3mf_basematerialgroup_addmaterial(m_pHandle, sName.c_str(), &DisplayColor, &resultPropertyID)); - return resultHasPrereleaseInfo; + return resultPropertyID; } /** - * CWrapper::GetBuildInformation - retrieves build information of this library. - * @return Does the library provide build version? - * @param[out] sBuildInformation - retrieves build information of this library. + * CBaseMaterialGroup::RemoveMaterial - Removes a material from the material group. + * @param[in] nPropertyID - PropertyID of the material in the material group. */ - inline bool CWrapper::GetBuildInformation(std::string & sBuildInformation) + void CBaseMaterialGroup::RemoveMaterial(const Lib3MF_uint32 nPropertyID) { - bool resultHasBuildInfo = 0; - Lib3MF_uint32 bytesNeededBuildInformation = 0; - Lib3MF_uint32 bytesWrittenBuildInformation = 0; - CheckError(nullptr,lib3mf_getbuildinformation(&resultHasBuildInfo, 0, &bytesNeededBuildInformation, nullptr)); - std::vector bufferBuildInformation(bytesNeededBuildInformation); - CheckError(nullptr,lib3mf_getbuildinformation(&resultHasBuildInfo, bytesNeededBuildInformation, &bytesWrittenBuildInformation, &bufferBuildInformation[0])); - sBuildInformation = std::string(&bufferBuildInformation[0]); - - return resultHasBuildInfo; + CheckError(lib3mf_basematerialgroup_removematerial(m_pHandle, nPropertyID)); } /** - * CWrapper::GetSpecificationVersion - retrieves whether a specification is supported, and if so, which version. - * @param[in] sSpecificationURL - URL of extension to check - * @param[out] bIsSupported - returns whether this specification is supported - * @param[out] nMajor - returns the major version of the extension (if IsSupported) - * @param[out] nMinor - returns the minor version of the extension (if IsSupported) - * @param[out] nMicro - returns the micro version of the extension (if IsSupported) + * CBaseMaterialGroup::GetName - Returns the base material's name + * @param[in] nPropertyID - PropertyID of the material in the material group. + * @return returns the name of the base material. */ - inline void CWrapper::GetSpecificationVersion(const std::string & sSpecificationURL, bool & bIsSupported, Lib3MF_uint32 & nMajor, Lib3MF_uint32 & nMinor, Lib3MF_uint32 & nMicro) + std::string CBaseMaterialGroup::GetName(const Lib3MF_uint32 nPropertyID) { - CheckError(nullptr,lib3mf_getspecificationversion(sSpecificationURL.c_str(), &bIsSupported, &nMajor, &nMinor, &nMicro)); + Lib3MF_uint32 bytesNeededName = 0; + Lib3MF_uint32 bytesWrittenName = 0; + CheckError(lib3mf_basematerialgroup_getname(m_pHandle, nPropertyID, 0, &bytesNeededName, nullptr)); + std::vector bufferName(bytesNeededName); + CheckError(lib3mf_basematerialgroup_getname(m_pHandle, nPropertyID, bytesNeededName, &bytesWrittenName, &bufferName[0])); + + return std::string(&bufferName[0]); } /** - * CWrapper::CreateModel - creates an empty model instance. - * @return returns an empty model instance + * CBaseMaterialGroup::SetName - Sets a base material's name + * @param[in] nPropertyID - PropertyID of the material in the material group. + * @param[in] sName - new name of the base material. */ - inline PModel CWrapper::CreateModel() + void CBaseMaterialGroup::SetName(const Lib3MF_uint32 nPropertyID, const std::string & sName) { - Lib3MFHandle hModel = nullptr; - CheckError(nullptr,lib3mf_createmodel(&hModel)); - - if (!hModel) { - CheckError(nullptr,LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(this->polymorphicFactory(hModel))); + CheckError(lib3mf_basematerialgroup_setname(m_pHandle, nPropertyID, sName.c_str())); } /** - * CWrapper::Release - releases shared ownership of an object instance - * @param[in] pInstance - the object instance to release + * CBaseMaterialGroup::SetDisplayColor - Sets a base material's display color. + * @param[in] nPropertyID - PropertyID of the material in the material group. + * @param[in] TheColor - The base material's display color */ - inline void CWrapper::Release(classParam pInstance) + void CBaseMaterialGroup::SetDisplayColor(const Lib3MF_uint32 nPropertyID, const sColor & TheColor) { - Lib3MFHandle hInstance = pInstance.GetHandle(); - CheckError(nullptr,lib3mf_release(hInstance)); + CheckError(lib3mf_basematerialgroup_setdisplaycolor(m_pHandle, nPropertyID, &TheColor)); } /** - * CWrapper::Acquire - acquires shared ownership of an object instance - * @param[in] pInstance - the object instance to acquire + * CBaseMaterialGroup::GetDisplayColor - Returns a base material's display color. + * @param[in] nPropertyID - PropertyID of the material in the material group. + * @return The base material's display color */ - inline void CWrapper::Acquire(classParam pInstance) + sColor CBaseMaterialGroup::GetDisplayColor(const Lib3MF_uint32 nPropertyID) { - Lib3MFHandle hInstance = pInstance.GetHandle(); - CheckError(nullptr,lib3mf_acquire(hInstance)); + sColor resultTheColor; + CheckError(lib3mf_basematerialgroup_getdisplaycolor(m_pHandle, nPropertyID, &resultTheColor)); + + return resultTheColor; } /** - * CWrapper::SetJournal - Sets the journal file path - * @param[in] sJournalPath - File name of the journal file + * Method definitions for class CColorGroup + */ + + /** + * CColorGroup::GetCount - Retrieves the count of base materials in this Color Group. + * @return returns the count of colors within this color group. */ - inline void CWrapper::SetJournal(const std::string & sJournalPath) + Lib3MF_uint32 CColorGroup::GetCount() { - CheckError(nullptr,lib3mf_setjournal(sJournalPath.c_str())); + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_colorgroup_getcount(m_pHandle, &resultCount)); + + return resultCount; } /** - * CWrapper::GetLastError - Retrieves the last error string of an instance - * @param[in] pInstance - Object where the error occured. - * @param[out] sLastErrorString - Last Error String - * @return Returns if the instance has a last error. + * CColorGroup::GetAllPropertyIDs - returns all the PropertyIDs of all colors within this group + * @param[out] PropertyIDsBuffer - PropertyID of the color in the color group. */ - inline bool CWrapper::GetLastError(classParam pInstance, std::string & sLastErrorString) + void CColorGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) { - Lib3MFHandle hInstance = pInstance.GetHandle(); - Lib3MF_uint32 bytesNeededLastErrorString = 0; - Lib3MF_uint32 bytesWrittenLastErrorString = 0; - bool resultHasLastError = 0; - CheckError(nullptr,lib3mf_getlasterror(hInstance, 0, &bytesNeededLastErrorString, nullptr, &resultHasLastError)); - std::vector bufferLastErrorString(bytesNeededLastErrorString); - CheckError(nullptr,lib3mf_getlasterror(hInstance, bytesNeededLastErrorString, &bytesWrittenLastErrorString, &bufferLastErrorString[0], &resultHasLastError)); - sLastErrorString = std::string(&bufferLastErrorString[0]); - - return resultHasLastError; + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(lib3mf_colorgroup_getallpropertyids(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(lib3mf_colorgroup_getallpropertyids(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); } /** - * CWrapper::GetSymbolLookupMethod - Returns the address of the SymbolLookupMethod - * @return Address of the SymbolAddressMethod + * CColorGroup::AddColor - Adds a new value. + * @param[in] TheColor - The new color + * @return PropertyID of the new color within this color group. */ - inline Lib3MF_pvoid CWrapper::GetSymbolLookupMethod() + Lib3MF_uint32 CColorGroup::AddColor(const sColor & TheColor) { - Lib3MF_pvoid resultSymbolLookupMethod = 0; - CheckError(nullptr,lib3mf_getsymbollookupmethod(&resultSymbolLookupMethod)); + Lib3MF_uint32 resultPropertyID = 0; + CheckError(lib3mf_colorgroup_addcolor(m_pHandle, &TheColor, &resultPropertyID)); - return resultSymbolLookupMethod; + return resultPropertyID; } /** - * CWrapper::RetrieveProgressMessage - Return an English text for a progress identifier.|Note: this is the only function you can call from your callback function. - * @param[in] eTheProgressIdentifier - the progress identifier that is passed to the callback function - * @param[out] sProgressMessage - English text for the progress identifier + * CColorGroup::RemoveColor - Removes a color from the color group. + * @param[in] nPropertyID - PropertyID of the color to be removed from the color group. */ - inline void CWrapper::RetrieveProgressMessage(const eProgressIdentifier eTheProgressIdentifier, std::string & sProgressMessage) + void CColorGroup::RemoveColor(const Lib3MF_uint32 nPropertyID) { - Lib3MF_uint32 bytesNeededProgressMessage = 0; - Lib3MF_uint32 bytesWrittenProgressMessage = 0; - CheckError(nullptr,lib3mf_retrieveprogressmessage(eTheProgressIdentifier, 0, &bytesNeededProgressMessage, nullptr)); - std::vector bufferProgressMessage(bytesNeededProgressMessage); - CheckError(nullptr,lib3mf_retrieveprogressmessage(eTheProgressIdentifier, bytesNeededProgressMessage, &bytesWrittenProgressMessage, &bufferProgressMessage[0])); - sProgressMessage = std::string(&bufferProgressMessage[0]); + CheckError(lib3mf_colorgroup_removecolor(m_pHandle, nPropertyID)); } /** - * CWrapper::RGBAToColor - Creates a Color from uint8 RGBA values - * @param[in] nRed - Red value of color (0-255) - * @param[in] nGreen - Green value of color (0-255) - * @param[in] nBlue - Blue value of color (0-255) - * @param[in] nAlpha - Alpha value of color (0-255) - * @return Assembled color + * CColorGroup::SetColor - Sets a color value. + * @param[in] nPropertyID - PropertyID of a color within this color group. + * @param[in] TheColor - The color */ - inline sColor CWrapper::RGBAToColor(const Lib3MF_uint8 nRed, const Lib3MF_uint8 nGreen, const Lib3MF_uint8 nBlue, const Lib3MF_uint8 nAlpha) + void CColorGroup::SetColor(const Lib3MF_uint32 nPropertyID, const sColor & TheColor) { - sColor resultTheColor; - CheckError(nullptr,lib3mf_rgbatocolor(nRed, nGreen, nBlue, nAlpha, &resultTheColor)); - - return resultTheColor; + CheckError(lib3mf_colorgroup_setcolor(m_pHandle, nPropertyID, &TheColor)); } /** - * CWrapper::FloatRGBAToColor - Creates a Color from uint8 RGBA values - * @param[in] fRed - Red value of color (0-1) - * @param[in] fGreen - Green value of color (0-1) - * @param[in] fBlue - Blue value of color (0-1) - * @param[in] fAlpha - Alpha value of color (0-1) - * @return Assembled color + * CColorGroup::GetColor - Sets a color value. + * @param[in] nPropertyID - PropertyID of a color within this color group. + * @return The color */ - inline sColor CWrapper::FloatRGBAToColor(const Lib3MF_single fRed, const Lib3MF_single fGreen, const Lib3MF_single fBlue, const Lib3MF_single fAlpha) + sColor CColorGroup::GetColor(const Lib3MF_uint32 nPropertyID) { sColor resultTheColor; - CheckError(nullptr,lib3mf_floatrgbatocolor(fRed, fGreen, fBlue, fAlpha, &resultTheColor)); + CheckError(lib3mf_colorgroup_getcolor(m_pHandle, nPropertyID, &resultTheColor)); return resultTheColor; } /** - * CWrapper::ColorToRGBA - Calculates uint8-RGBA-values from a Color - * @param[in] TheColor - Color to handle - * @param[out] nRed - Red value of color (0-255) - * @param[out] nGreen - Green value of color (0-255) - * @param[out] nBlue - Blue value of color (0-255) - * @param[out] nAlpha - Alpha value of color (0-255) + * Method definitions for class CTexture2DGroup + */ + + /** + * CTexture2DGroup::GetCount - Retrieves the count of tex2coords in the Texture2DGroup. + * @return returns the count of tex2coords. */ - inline void CWrapper::ColorToRGBA(const sColor & TheColor, Lib3MF_uint8 & nRed, Lib3MF_uint8 & nGreen, Lib3MF_uint8 & nBlue, Lib3MF_uint8 & nAlpha) + Lib3MF_uint32 CTexture2DGroup::GetCount() { - CheckError(nullptr,lib3mf_colortorgba(&TheColor, &nRed, &nGreen, &nBlue, &nAlpha)); + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_texture2dgroup_getcount(m_pHandle, &resultCount)); + + return resultCount; } /** - * CWrapper::ColorToFloatRGBA - Calculates float-RGBA-values from a Color - * @param[in] TheColor - Color to handle - * @param[out] fRed - Red value of color (0-1) - * @param[out] fGreen - Green value of color (0-1) - * @param[out] fBlue - Blue value of color (0-1) - * @param[out] fAlpha - Alpha value of color (0-1) + * CTexture2DGroup::GetAllPropertyIDs - returns all the PropertyIDs of all tex2coords in this Texture2DGroup + * @param[out] PropertyIDsBuffer - PropertyID of the tex2coords in the Texture2DGroup. */ - inline void CWrapper::ColorToFloatRGBA(const sColor & TheColor, Lib3MF_single & fRed, Lib3MF_single & fGreen, Lib3MF_single & fBlue, Lib3MF_single & fAlpha) + void CTexture2DGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) { - CheckError(nullptr,lib3mf_colortofloatrgba(&TheColor, &fRed, &fGreen, &fBlue, &fAlpha)); + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(lib3mf_texture2dgroup_getallpropertyids(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(lib3mf_texture2dgroup_getallpropertyids(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); } /** - * CWrapper::GetIdentityTransform - Creates an identity transform - * @return Transformation matrix. + * CTexture2DGroup::AddTex2Coord - Adds a new tex2coord to the Texture2DGroup + * @param[in] UVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. + * @return returns new PropertyID of the new tex2coord in the Texture2DGroup. */ - inline sTransform CWrapper::GetIdentityTransform() + Lib3MF_uint32 CTexture2DGroup::AddTex2Coord(const sTex2Coord & UVCoordinate) { - sTransform resultTransform; - CheckError(nullptr,lib3mf_getidentitytransform(&resultTransform)); + Lib3MF_uint32 resultPropertyID = 0; + CheckError(lib3mf_texture2dgroup_addtex2coord(m_pHandle, &UVCoordinate, &resultPropertyID)); - return resultTransform; + return resultPropertyID; } /** - * CWrapper::GetUniformScaleTransform - Creates a uniform scale transform - * @param[in] fFactor - Factor in X, Y and Z - * @return Transformation matrix. + * CTexture2DGroup::GetTex2Coord - Obtains a tex2coord to the Texture2DGroup + * @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. + * @return The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. */ - inline sTransform CWrapper::GetUniformScaleTransform(const Lib3MF_single fFactor) + sTex2Coord CTexture2DGroup::GetTex2Coord(const Lib3MF_uint32 nPropertyID) { - sTransform resultTransform; - CheckError(nullptr,lib3mf_getuniformscaletransform(fFactor, &resultTransform)); + sTex2Coord resultUVCoordinate; + CheckError(lib3mf_texture2dgroup_gettex2coord(m_pHandle, nPropertyID, &resultUVCoordinate)); - return resultTransform; + return resultUVCoordinate; } /** - * CWrapper::GetScaleTransform - Creates a scale transform - * @param[in] fFactorX - Factor in X - * @param[in] fFactorY - Factor in Y - * @param[in] fFactorZ - Factor in Z - * @return Transformation matrix. + * CTexture2DGroup::RemoveTex2Coord - Removes a tex2coords from the Texture2DGroup. + * @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. */ - inline sTransform CWrapper::GetScaleTransform(const Lib3MF_single fFactorX, const Lib3MF_single fFactorY, const Lib3MF_single fFactorZ) + void CTexture2DGroup::RemoveTex2Coord(const Lib3MF_uint32 nPropertyID) { - sTransform resultTransform; - CheckError(nullptr,lib3mf_getscaletransform(fFactorX, fFactorY, fFactorZ, &resultTransform)); - - return resultTransform; + CheckError(lib3mf_texture2dgroup_removetex2coord(m_pHandle, nPropertyID)); } /** - * CWrapper::GetTranslationTransform - Creates an translation transform - * @param[in] fVectorX - Translation in X - * @param[in] fVectorY - Translation in Y - * @param[in] fVectorZ - Translation in Z - * @return Transformation matrix. + * CTexture2DGroup::GetTexture2D - Obtains the texture2D instance of this group. + * @return the texture2D instance of this group. */ - inline sTransform CWrapper::GetTranslationTransform(const Lib3MF_single fVectorX, const Lib3MF_single fVectorY, const Lib3MF_single fVectorZ) + PTexture2D CTexture2DGroup::GetTexture2D() { - sTransform resultTransform; - CheckError(nullptr,lib3mf_gettranslationtransform(fVectorX, fVectorY, fVectorZ, &resultTransform)); + Lib3MFHandle hTexture2DInstance = nullptr; + CheckError(lib3mf_texture2dgroup_gettexture2d(m_pHandle, &hTexture2DInstance)); - return resultTransform; - } - - inline void CWrapper::CheckError(CBase * pBaseClass, Lib3MFResult nResult) - { - if (nResult != 0) { - std::string sErrorMessage; - if (pBaseClass != nullptr) { - GetLastError(pBaseClass, sErrorMessage); - } - throw ELib3MFException(nResult, sErrorMessage); + if (!hTexture2DInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTexture2DInstance))); } - - /** - * Method definitions for class CBase + * Method definitions for class CCompositeMaterials */ /** - * CBase::ClassTypeId - Get Class Type Id - * @return Class type as a 64 bits integer + * CCompositeMaterials::GetCount - Retrieves the count of Composite-s in the CompositeMaterials. + * @return returns the count of Composite-s */ - Lib3MF_uint64 CBase::ClassTypeId() + Lib3MF_uint32 CCompositeMaterials::GetCount() { - Lib3MF_uint64 resultClassTypeId = 0; - CheckError(lib3mf_base_classtypeid(m_pHandle, &resultClassTypeId)); + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_compositematerials_getcount(m_pHandle, &resultCount)); - return resultClassTypeId; + return resultCount; } /** - * Method definitions for class CWriter - */ + * CCompositeMaterials::GetAllPropertyIDs - returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials + * @param[out] PropertyIDsBuffer - PropertyID of the Composite-Mixing Values in the CompositeMaterials. + */ + void CCompositeMaterials::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + { + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(lib3mf_compositematerials_getallpropertyids(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(lib3mf_compositematerials_getallpropertyids(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + } /** - * CWriter::WriteToFile - Writes out the model as file. The file type is specified by the Model Writer class. - * @param[in] sFilename - Filename to write into + * CCompositeMaterials::GetBaseMaterialGroup - Obtains the BaseMaterialGroup instance of this CompositeMaterials. + * @return returns the BaseMaterialGroup instance of this CompositeMaterials */ - void CWriter::WriteToFile(const std::string & sFilename) + PBaseMaterialGroup CCompositeMaterials::GetBaseMaterialGroup() { - CheckError(lib3mf_writer_writetofile(m_pHandle, sFilename.c_str())); + Lib3MFHandle hBaseMaterialGroupInstance = nullptr; + CheckError(lib3mf_compositematerials_getbasematerialgroup(m_pHandle, &hBaseMaterialGroupInstance)); + + if (!hBaseMaterialGroupInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBaseMaterialGroupInstance))); } /** - * CWriter::GetStreamSize - Retrieves the size of the full 3MF file stream. - * @return the stream size + * CCompositeMaterials::AddComposite - Adds a new Composite-Mixing Values to the CompositeMaterials. + * @param[in] CompositeBuffer - The Composite Constituents to be added as composite + * @return returns new PropertyID of the new Composite in the CompositeMaterials. */ - Lib3MF_uint64 CWriter::GetStreamSize() + Lib3MF_uint32 CCompositeMaterials::AddComposite(const CInputVector & CompositeBuffer) { - Lib3MF_uint64 resultStreamSize = 0; - CheckError(lib3mf_writer_getstreamsize(m_pHandle, &resultStreamSize)); + Lib3MF_uint32 resultPropertyID = 0; + CheckError(lib3mf_compositematerials_addcomposite(m_pHandle, (Lib3MF_uint64)CompositeBuffer.size(), CompositeBuffer.data(), &resultPropertyID)); - return resultStreamSize; + return resultPropertyID; } /** - * CWriter::WriteToBuffer - Writes out the 3MF file into a memory buffer - * @param[out] BufferBuffer - buffer to write into + * CCompositeMaterials::RemoveComposite - Removes a Composite-Maxing Ratio from the CompositeMaterials. + * @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. */ - void CWriter::WriteToBuffer(std::vector & BufferBuffer) + void CCompositeMaterials::RemoveComposite(const Lib3MF_uint32 nPropertyID) { - Lib3MF_uint64 elementsNeededBuffer = 0; - Lib3MF_uint64 elementsWrittenBuffer = 0; - CheckError(lib3mf_writer_writetobuffer(m_pHandle, 0, &elementsNeededBuffer, nullptr)); - BufferBuffer.resize((size_t) elementsNeededBuffer); - CheckError(lib3mf_writer_writetobuffer(m_pHandle, elementsNeededBuffer, &elementsWrittenBuffer, BufferBuffer.data())); + CheckError(lib3mf_compositematerials_removecomposite(m_pHandle, nPropertyID)); } /** - * CWriter::WriteToCallback - Writes out the model and passes the data to a provided callback function. The file type is specified by the Model Writer class. - * @param[in] pTheWriteCallback - Callback to call for writing a data chunk - * @param[in] pTheSeekCallback - Callback to call for seeking in the stream - * @param[in] pUserData - Userdata that is passed to the callback function + * CCompositeMaterials::GetComposite - Obtains a Composite-Maxing Ratio of this CompositeMaterials. + * @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. + * @param[out] CompositeBuffer - The Composite-Mixing Values with the given PropertyID */ - void CWriter::WriteToCallback(const WriteCallback pTheWriteCallback, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) + void CCompositeMaterials::GetComposite(const Lib3MF_uint32 nPropertyID, std::vector & CompositeBuffer) { - CheckError(lib3mf_writer_writetocallback(m_pHandle, pTheWriteCallback, pTheSeekCallback, pUserData)); + Lib3MF_uint64 elementsNeededComposite = 0; + Lib3MF_uint64 elementsWrittenComposite = 0; + CheckError(lib3mf_compositematerials_getcomposite(m_pHandle, nPropertyID, 0, &elementsNeededComposite, nullptr)); + CompositeBuffer.resize((size_t) elementsNeededComposite); + CheckError(lib3mf_compositematerials_getcomposite(m_pHandle, nPropertyID, elementsNeededComposite, &elementsWrittenComposite, CompositeBuffer.data())); } /** - * CWriter::SetProgressCallback - Set the progress callback for calls to this writer - * @param[in] pProgressCallback - pointer to the callback function. - * @param[in] pUserData - pointer to arbitrary user data that is passed without modification to the callback. + * Method definitions for class CMultiPropertyGroup + */ + + /** + * CMultiPropertyGroup::GetCount - Retrieves the count of MultiProperty-s in the MultiPropertyGroup. + * @return returns the count of MultiProperty-s */ - void CWriter::SetProgressCallback(const ProgressCallback pProgressCallback, const Lib3MF_pvoid pUserData) + Lib3MF_uint32 CMultiPropertyGroup::GetCount() { - CheckError(lib3mf_writer_setprogresscallback(m_pHandle, pProgressCallback, pUserData)); + Lib3MF_uint32 resultCount = 0; + CheckError(lib3mf_multipropertygroup_getcount(m_pHandle, &resultCount)); + + return resultCount; } /** - * CWriter::GetDecimalPrecision - Returns the number of digits after the decimal point to be written in each vertex coordinate-value. - * @return The number of digits to be written in each vertex coordinate-value after the decimal point. + * CMultiPropertyGroup::GetAllPropertyIDs - returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup + * @param[out] PropertyIDsBuffer - PropertyID of the MultiProperty-s in the MultiPropertyGroup. */ - Lib3MF_uint32 CWriter::GetDecimalPrecision() + void CMultiPropertyGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) { - Lib3MF_uint32 resultDecimalPrecision = 0; - CheckError(lib3mf_writer_getdecimalprecision(m_pHandle, &resultDecimalPrecision)); - - return resultDecimalPrecision; + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(lib3mf_multipropertygroup_getallpropertyids(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(lib3mf_multipropertygroup_getallpropertyids(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); } /** - * CWriter::SetDecimalPrecision - Sets the number of digits after the decimal point to be written in each vertex coordinate-value. - * @param[in] nDecimalPrecision - The number of digits to be written in each vertex coordinate-value after the decimal point. + * CMultiPropertyGroup::AddMultiProperty - Adds a new MultiProperty to the MultiPropertyGroup. + * @param[in] PropertyIDsBuffer - The PropertyIDs of the new MultiProperty. + * @return returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. */ - void CWriter::SetDecimalPrecision(const Lib3MF_uint32 nDecimalPrecision) + Lib3MF_uint32 CMultiPropertyGroup::AddMultiProperty(const CInputVector & PropertyIDsBuffer) { - CheckError(lib3mf_writer_setdecimalprecision(m_pHandle, nDecimalPrecision)); + Lib3MF_uint32 resultPropertyID = 0; + CheckError(lib3mf_multipropertygroup_addmultiproperty(m_pHandle, (Lib3MF_uint64)PropertyIDsBuffer.size(), PropertyIDsBuffer.data(), &resultPropertyID)); + + return resultPropertyID; } /** - * CWriter::SetStrictModeActive - Activates (deactivates) the strict mode of the reader. - * @param[in] bStrictModeActive - flag whether strict mode is active or not. + * CMultiPropertyGroup::SetMultiProperty - Sets the PropertyIDs of a MultiProperty. + * @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. + * @param[in] PropertyIDsBuffer - The new PropertyIDs of the MultiProperty */ - void CWriter::SetStrictModeActive(const bool bStrictModeActive) + void CMultiPropertyGroup::SetMultiProperty(const Lib3MF_uint32 nPropertyID, const CInputVector & PropertyIDsBuffer) { - CheckError(lib3mf_writer_setstrictmodeactive(m_pHandle, bStrictModeActive)); + CheckError(lib3mf_multipropertygroup_setmultiproperty(m_pHandle, nPropertyID, (Lib3MF_uint64)PropertyIDsBuffer.size(), PropertyIDsBuffer.data())); } /** - * CWriter::GetStrictModeActive - Queries whether the strict mode of the reader is active or not - * @return returns flag whether strict mode is active or not. + * CMultiPropertyGroup::GetMultiProperty - Obtains the PropertyIDs of a MultiProperty. + * @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. + * @param[out] PropertyIDsBuffer - The PropertyIDs of the MultiProperty */ - bool CWriter::GetStrictModeActive() + void CMultiPropertyGroup::GetMultiProperty(const Lib3MF_uint32 nPropertyID, std::vector & PropertyIDsBuffer) { - bool resultStrictModeActive = 0; - CheckError(lib3mf_writer_getstrictmodeactive(m_pHandle, &resultStrictModeActive)); - - return resultStrictModeActive; + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(lib3mf_multipropertygroup_getmultiproperty(m_pHandle, nPropertyID, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(lib3mf_multipropertygroup_getmultiproperty(m_pHandle, nPropertyID, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); } /** - * CWriter::GetWarning - Returns Warning and Error Information of the read process - * @param[in] nIndex - Index of the Warning. Valid values are 0 to WarningCount - 1 - * @param[out] nErrorCode - filled with the error code of the warning - * @return the message of the warning + * CMultiPropertyGroup::RemoveMultiProperty - Removes a MultiProperty from this MultiPropertyGroup. + * @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. */ - std::string CWriter::GetWarning(const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode) + void CMultiPropertyGroup::RemoveMultiProperty(const Lib3MF_uint32 nPropertyID) { - Lib3MF_uint32 bytesNeededWarning = 0; - Lib3MF_uint32 bytesWrittenWarning = 0; - CheckError(lib3mf_writer_getwarning(m_pHandle, nIndex, &nErrorCode, 0, &bytesNeededWarning, nullptr)); - std::vector bufferWarning(bytesNeededWarning); - CheckError(lib3mf_writer_getwarning(m_pHandle, nIndex, &nErrorCode, bytesNeededWarning, &bytesWrittenWarning, &bufferWarning[0])); - - return std::string(&bufferWarning[0]); + CheckError(lib3mf_multipropertygroup_removemultiproperty(m_pHandle, nPropertyID)); } /** - * CWriter::GetWarningCount - Returns Warning and Error Count of the read process - * @return filled with the count of the occurred warnings. + * CMultiPropertyGroup::GetLayerCount - Retrieves the number of layers of this MultiPropertyGroup. + * @return returns the number of layers */ - Lib3MF_uint32 CWriter::GetWarningCount() + Lib3MF_uint32 CMultiPropertyGroup::GetLayerCount() { Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_writer_getwarningcount(m_pHandle, &resultCount)); + CheckError(lib3mf_multipropertygroup_getlayercount(m_pHandle, &resultCount)); return resultCount; } /** - * CWriter::AddKeyWrappingCallback - Registers a callback to deal with data key encryption/decryption from keystore - * @param[in] sConsumerID - The ConsumerID to register for - * @param[in] pTheCallback - The callback to be callede for wrapping and encryption key - * @param[in] pUserData - Userdata that is passed to the callback function + * CMultiPropertyGroup::AddLayer - Adds a MultiPropertyLayer to this MultiPropertyGroup. + * @param[in] TheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup + * @return returns the index of this MultiPropertyLayer */ - void CWriter::AddKeyWrappingCallback(const std::string & sConsumerID, const KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData) + Lib3MF_uint32 CMultiPropertyGroup::AddLayer(const sMultiPropertyLayer & TheLayer) { - CheckError(lib3mf_writer_addkeywrappingcallback(m_pHandle, sConsumerID.c_str(), pTheCallback, pUserData)); + Lib3MF_uint32 resultLayerIndex = 0; + CheckError(lib3mf_multipropertygroup_addlayer(m_pHandle, &TheLayer, &resultLayerIndex)); + + return resultLayerIndex; + } + + /** + * CMultiPropertyGroup::GetLayer - Obtains a MultiPropertyLayer of this MultiPropertyGroup. + * @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried + * @return The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup + */ + sMultiPropertyLayer CMultiPropertyGroup::GetLayer(const Lib3MF_uint32 nLayerIndex) + { + sMultiPropertyLayer resultTheLayer; + CheckError(lib3mf_multipropertygroup_getlayer(m_pHandle, nLayerIndex, &resultTheLayer)); + + return resultTheLayer; } /** - * CWriter::SetContentEncryptionCallback - Registers a callback to deal with encryption of content - * @param[in] pTheCallback - The callback used to encrypt content - * @param[in] pUserData - Userdata that is passed to the callback function + * CMultiPropertyGroup::RemoveLayer - Removes a MultiPropertyLayer from this MultiPropertyGroup. + * @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed */ - void CWriter::SetContentEncryptionCallback(const ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData) + void CMultiPropertyGroup::RemoveLayer(const Lib3MF_uint32 nLayerIndex) { - CheckError(lib3mf_writer_setcontentencryptioncallback(m_pHandle, pTheCallback, pUserData)); + CheckError(lib3mf_multipropertygroup_removelayer(m_pHandle, nLayerIndex)); } /** - * Method definitions for class CReader + * Method definitions for class CImage3D */ /** - * CReader::ReadFromFile - Reads a model from a file. The file type is specified by the Model Reader class - * @param[in] sFilename - Filename to read from + * CImage3D::GetName - returns the name of this Image3D + * @return the name of this Image3D */ - void CReader::ReadFromFile(const std::string & sFilename) + std::string CImage3D::GetName() { - CheckError(lib3mf_reader_readfromfile(m_pHandle, sFilename.c_str())); + Lib3MF_uint32 bytesNeededName = 0; + Lib3MF_uint32 bytesWrittenName = 0; + CheckError(lib3mf_image3d_getname(m_pHandle, 0, &bytesNeededName, nullptr)); + std::vector bufferName(bytesNeededName); + CheckError(lib3mf_image3d_getname(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); + + return std::string(&bufferName[0]); } /** - * CReader::ReadFromBuffer - Reads a model from a memory buffer. - * @param[in] BufferBuffer - Buffer to read from + * CImage3D::SetName - sets a new name of this Image3D + * @param[in] sName - the new name of this Image3D */ - void CReader::ReadFromBuffer(const CInputVector & BufferBuffer) + void CImage3D::SetName(const std::string & sName) { - CheckError(lib3mf_reader_readfrombuffer(m_pHandle, (Lib3MF_uint64)BufferBuffer.size(), BufferBuffer.data())); + CheckError(lib3mf_image3d_setname(m_pHandle, sName.c_str())); } /** - * CReader::ReadFromCallback - Reads a model and from the data provided by a callback function - * @param[in] pTheReadCallback - Callback to call for reading a data chunk - * @param[in] nStreamSize - number of bytes the callback returns - * @param[in] pTheSeekCallback - Callback to call for seeking in the stream. - * @param[in] pUserData - Userdata that is passed to the callback function + * CImage3D::IsImageStack - Retrieves, if this Image3D is a ImageStack + * @return returns, whether the Image3D is an ImageStack */ - void CReader::ReadFromCallback(const ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) + bool CImage3D::IsImageStack() { - CheckError(lib3mf_reader_readfromcallback(m_pHandle, pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData)); + bool resultIsImageStack = 0; + CheckError(lib3mf_image3d_isimagestack(m_pHandle, &resultIsImageStack)); + + return resultIsImageStack; } /** - * CReader::SetProgressCallback - Set the progress callback for calls to this writer - * @param[in] pProgressCallback - pointer to the callback function. - * @param[in] pUserData - pointer to arbitrary user data that is passed without modification to the callback. - */ - void CReader::SetProgressCallback(const ProgressCallback pProgressCallback, const Lib3MF_pvoid pUserData) - { - CheckError(lib3mf_reader_setprogresscallback(m_pHandle, pProgressCallback, pUserData)); - } + * Method definitions for class CImageStack + */ /** - * CReader::AddRelationToRead - Adds a relationship type which shall be read as attachment in memory while loading - * @param[in] sRelationShipType - String of the relationship type + * CImageStack::GetRowCount - Retrieves the number of rows in each image of this image3d + * @return number of rows */ - void CReader::AddRelationToRead(const std::string & sRelationShipType) + Lib3MF_uint32 CImageStack::GetRowCount() { - CheckError(lib3mf_reader_addrelationtoread(m_pHandle, sRelationShipType.c_str())); + Lib3MF_uint32 resultRowCount = 0; + CheckError(lib3mf_imagestack_getrowcount(m_pHandle, &resultRowCount)); + + return resultRowCount; } /** - * CReader::RemoveRelationToRead - Removes a relationship type which shall be read as attachment in memory while loading - * @param[in] sRelationShipType - String of the relationship type + * CImageStack::SetRowCount - Sets the number of rows in each image of this image3d + * @param[in] nRowCount - number of rows */ - void CReader::RemoveRelationToRead(const std::string & sRelationShipType) + void CImageStack::SetRowCount(const Lib3MF_uint32 nRowCount) { - CheckError(lib3mf_reader_removerelationtoread(m_pHandle, sRelationShipType.c_str())); + CheckError(lib3mf_imagestack_setrowcount(m_pHandle, nRowCount)); } /** - * CReader::SetStrictModeActive - Activates (deactivates) the strict mode of the reader. - * @param[in] bStrictModeActive - flag whether strict mode is active or not. + * CImageStack::GetColumnCount - Retrieves the number of columns in each image of this image3d + * @return number of columns */ - void CReader::SetStrictModeActive(const bool bStrictModeActive) + Lib3MF_uint32 CImageStack::GetColumnCount() { - CheckError(lib3mf_reader_setstrictmodeactive(m_pHandle, bStrictModeActive)); + Lib3MF_uint32 resultColumnCount = 0; + CheckError(lib3mf_imagestack_getcolumncount(m_pHandle, &resultColumnCount)); + + return resultColumnCount; } /** - * CReader::GetStrictModeActive - Queries whether the strict mode of the reader is active or not - * @return returns flag whether strict mode is active or not. + * CImageStack::SetColumnCount - Sets the number of columns in each image of this image3d + * @param[in] nColumnCount - number of columns */ - bool CReader::GetStrictModeActive() + void CImageStack::SetColumnCount(const Lib3MF_uint32 nColumnCount) { - bool resultStrictModeActive = 0; - CheckError(lib3mf_reader_getstrictmodeactive(m_pHandle, &resultStrictModeActive)); - - return resultStrictModeActive; + CheckError(lib3mf_imagestack_setcolumncount(m_pHandle, nColumnCount)); } /** - * CReader::GetWarning - Returns Warning and Error Information of the read process - * @param[in] nIndex - Index of the Warning. Valid values are 0 to WarningCount - 1 - * @param[out] nErrorCode - filled with the error code of the warning - * @return the message of the warning + * CImageStack::GetSheetCount - Retrieves the number of images in the stack. + * @return number of images */ - std::string CReader::GetWarning(const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode) + Lib3MF_uint32 CImageStack::GetSheetCount() { - Lib3MF_uint32 bytesNeededWarning = 0; - Lib3MF_uint32 bytesWrittenWarning = 0; - CheckError(lib3mf_reader_getwarning(m_pHandle, nIndex, &nErrorCode, 0, &bytesNeededWarning, nullptr)); - std::vector bufferWarning(bytesNeededWarning); - CheckError(lib3mf_reader_getwarning(m_pHandle, nIndex, &nErrorCode, bytesNeededWarning, &bytesWrittenWarning, &bufferWarning[0])); + Lib3MF_uint32 resultSheetCount = 0; + CheckError(lib3mf_imagestack_getsheetcount(m_pHandle, &resultSheetCount)); - return std::string(&bufferWarning[0]); + return resultSheetCount; } /** - * CReader::GetWarningCount - Returns Warning and Error Count of the read process - * @return filled with the count of the occurred warnings. + * CImageStack::GetSheet - Retrieves a sheet of the stack. Raises an error if sheet is not set. + * @param[in] nIndex - index of the image (0-based) + * @return attachment containing the image */ - Lib3MF_uint32 CReader::GetWarningCount() + PAttachment CImageStack::GetSheet(const Lib3MF_uint32 nIndex) { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_reader_getwarningcount(m_pHandle, &resultCount)); + Lib3MFHandle hSheet = nullptr; + CheckError(lib3mf_imagestack_getsheet(m_pHandle, nIndex, &hSheet)); - return resultCount; + if (!hSheet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSheet))); } /** - * CReader::AddKeyWrappingCallback - Registers a callback to deal with key wrapping mechanism from keystore - * @param[in] sConsumerID - The ConsumerID to register for - * @param[in] pTheCallback - The callback used to decrypt data key - * @param[in] pUserData - Userdata that is passed to the callback function + * CImageStack::SetSheet - Sets a sheet to an existing attachment. + * @param[in] nIndex - index of the image (0-based) + * @param[in] pSheet - attachment containing the image */ - void CReader::AddKeyWrappingCallback(const std::string & sConsumerID, const KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData) + void CImageStack::SetSheet(const Lib3MF_uint32 nIndex, classParam pSheet) { - CheckError(lib3mf_reader_addkeywrappingcallback(m_pHandle, sConsumerID.c_str(), pTheCallback, pUserData)); + Lib3MFHandle hSheet = pSheet.GetHandle(); + CheckError(lib3mf_imagestack_setsheet(m_pHandle, nIndex, hSheet)); } /** - * CReader::SetContentEncryptionCallback - Registers a callback to deal with encryption of content - * @param[in] pTheCallback - The callback used to encrypt content - * @param[in] pUserData - Userdata that is passed to the callback function + * CImageStack::CreateEmptySheet - Creates a new sheet attachment with empty data. + * @param[in] nIndex - index of the image (0-based) + * @param[in] sPath - path of part in the package + * @return attachment containing the image */ - void CReader::SetContentEncryptionCallback(const ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData) + PAttachment CImageStack::CreateEmptySheet(const Lib3MF_uint32 nIndex, const std::string & sPath) { - CheckError(lib3mf_reader_setcontentencryptioncallback(m_pHandle, pTheCallback, pUserData)); + Lib3MFHandle hSheet = nullptr; + CheckError(lib3mf_imagestack_createemptysheet(m_pHandle, nIndex, sPath.c_str(), &hSheet)); + + if (!hSheet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSheet))); } /** - * Method definitions for class CPackagePart - */ - - /** - * CPackagePart::GetPath - Returns the absolute path of this PackagePart. - * @return Returns the absolute path of this PackagePart + * CImageStack::CreateSheetFromBuffer - Creates a new sheet attachment from a memory buffer. + * @param[in] nIndex - index of the image (0-based) + * @param[in] sPath - path of part in the package + * @param[in] DataBuffer - binary image data + * @return attachment containing the image */ - std::string CPackagePart::GetPath() + PAttachment CImageStack::CreateSheetFromBuffer(const Lib3MF_uint32 nIndex, const std::string & sPath, const CInputVector & DataBuffer) { - Lib3MF_uint32 bytesNeededPath = 0; - Lib3MF_uint32 bytesWrittenPath = 0; - CheckError(lib3mf_packagepart_getpath(m_pHandle, 0, &bytesNeededPath, nullptr)); - std::vector bufferPath(bytesNeededPath); - CheckError(lib3mf_packagepart_getpath(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); + Lib3MFHandle hSheet = nullptr; + CheckError(lib3mf_imagestack_createsheetfrombuffer(m_pHandle, nIndex, sPath.c_str(), (Lib3MF_uint64)DataBuffer.size(), DataBuffer.data(), &hSheet)); - return std::string(&bufferPath[0]); + if (!hSheet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSheet))); } /** - * CPackagePart::SetPath - Sets the absolute path of this PackagePart. - * @param[in] sPath - Sets the absolute path of this PackagePart. + * CImageStack::CreateSheetFromFile - Creates a new sheet attachment from a file on disk. + * @param[in] nIndex - index of the image (0-based) + * @param[in] sPath - path of part in the package + * @param[in] sFileName - file name to read from + * @return attachment containing the image */ - void CPackagePart::SetPath(const std::string & sPath) + PAttachment CImageStack::CreateSheetFromFile(const Lib3MF_uint32 nIndex, const std::string & sPath, const std::string & sFileName) { - CheckError(lib3mf_packagepart_setpath(m_pHandle, sPath.c_str())); + Lib3MFHandle hSheet = nullptr; + CheckError(lib3mf_imagestack_createsheetfromfile(m_pHandle, nIndex, sPath.c_str(), sFileName.c_str(), &hSheet)); + + if (!hSheet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSheet))); } /** - * Method definitions for class CResource + * Method definitions for class CAttachment */ /** - * CResource::GetResourceID - Retrieves the unique id of this resource within a package. This function will be removed in a later release in favor of GetUniqueResourceID - * @return Retrieves the unique id of this resource within a package. + * CAttachment::GetPath - Retrieves an attachment's package path. This function will be removed in a later release. + * @return returns the attachment's package path string */ - Lib3MF_uint32 CResource::GetResourceID() + std::string CAttachment::GetPath() { - Lib3MF_uint32 resultUniqueResourceID = 0; - CheckError(lib3mf_resource_getresourceid(m_pHandle, &resultUniqueResourceID)); + Lib3MF_uint32 bytesNeededPath = 0; + Lib3MF_uint32 bytesWrittenPath = 0; + CheckError(lib3mf_attachment_getpath(m_pHandle, 0, &bytesNeededPath, nullptr)); + std::vector bufferPath(bytesNeededPath); + CheckError(lib3mf_attachment_getpath(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); - return resultUniqueResourceID; + return std::string(&bufferPath[0]); } /** - * CResource::GetUniqueResourceID - Retrieves the unique id of this resource within a package. - * @return Retrieves the unique id of this resource within a package. + * CAttachment::SetPath - Sets an attachment's package path. This function will be removed in a later release. + * @param[in] sPath - new path of the attachment. */ - Lib3MF_uint32 CResource::GetUniqueResourceID() + void CAttachment::SetPath(const std::string & sPath) { - Lib3MF_uint32 resultUniqueResourceID = 0; - CheckError(lib3mf_resource_getuniqueresourceid(m_pHandle, &resultUniqueResourceID)); - - return resultUniqueResourceID; + CheckError(lib3mf_attachment_setpath(m_pHandle, sPath.c_str())); } /** - * CResource::PackagePart - Returns the PackagePart within which this resource resides - * @return the PackagePart within which this resource resides. + * CAttachment::PackagePart - Returns the PackagePart that is this attachment. + * @return The PackagePart of this attachment. */ - PPackagePart CResource::PackagePart() + PPackagePart CAttachment::PackagePart() { Lib3MFHandle hPackagePart = nullptr; - CheckError(lib3mf_resource_packagepart(m_pHandle, &hPackagePart)); + CheckError(lib3mf_attachment_packagepart(m_pHandle, &hPackagePart)); if (!hPackagePart) { CheckError(LIB3MF_ERROR_INVALIDPARAM); @@ -2330,2215 +7066,2949 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CResource::SetPackagePart - Sets the new PackagePart within which this resource resides - * @param[in] pPackagePart - the new PackagePart within which this resource resides. + * CAttachment::GetRelationShipType - Retrieves an attachment's relationship type + * @return returns the attachment's package relationship type string */ - void CResource::SetPackagePart(classParam pPackagePart) + std::string CAttachment::GetRelationShipType() { - Lib3MFHandle hPackagePart = pPackagePart.GetHandle(); - CheckError(lib3mf_resource_setpackagepart(m_pHandle, hPackagePart)); + Lib3MF_uint32 bytesNeededPath = 0; + Lib3MF_uint32 bytesWrittenPath = 0; + CheckError(lib3mf_attachment_getrelationshiptype(m_pHandle, 0, &bytesNeededPath, nullptr)); + std::vector bufferPath(bytesNeededPath); + CheckError(lib3mf_attachment_getrelationshiptype(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); + + return std::string(&bufferPath[0]); } /** - * CResource::GetModelResourceID - Retrieves the id of this resource within a model. - * @return Retrieves the id of this resource within a model. + * CAttachment::SetRelationShipType - Sets an attachment's relationship type. + * @param[in] sPath - new relationship type string. */ - Lib3MF_uint32 CResource::GetModelResourceID() + void CAttachment::SetRelationShipType(const std::string & sPath) { - Lib3MF_uint32 resultModelResourceId = 0; - CheckError(lib3mf_resource_getmodelresourceid(m_pHandle, &resultModelResourceId)); - - return resultModelResourceId; + CheckError(lib3mf_attachment_setrelationshiptype(m_pHandle, sPath.c_str())); } /** - * Method definitions for class CResourceIterator - */ + * CAttachment::WriteToFile - Writes out the attachment as file. + * @param[in] sFileName - file to write into. + */ + void CAttachment::WriteToFile(const std::string & sFileName) + { + CheckError(lib3mf_attachment_writetofile(m_pHandle, sFileName.c_str())); + } /** - * CResourceIterator::MoveNext - Iterates to the next resource in the list. - * @return Iterates to the next resource in the list. + * CAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * @param[in] sFileName - file to read from. */ - bool CResourceIterator::MoveNext() + void CAttachment::ReadFromFile(const std::string & sFileName) { - bool resultHasNext = 0; - CheckError(lib3mf_resourceiterator_movenext(m_pHandle, &resultHasNext)); - - return resultHasNext; + CheckError(lib3mf_attachment_readfromfile(m_pHandle, sFileName.c_str())); } /** - * CResourceIterator::MovePrevious - Iterates to the previous resource in the list. - * @return Iterates to the previous resource in the list. + * CAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * @param[in] pTheReadCallback - Callback to call for reading a data chunk + * @param[in] nStreamSize - number of bytes the callback returns + * @param[in] pTheSeekCallback - Callback to call for seeking in the stream. + * @param[in] pUserData - Userdata that is passed to the callback function */ - bool CResourceIterator::MovePrevious() + void CAttachment::ReadFromCallback(const ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) { - bool resultHasPrevious = 0; - CheckError(lib3mf_resourceiterator_moveprevious(m_pHandle, &resultHasPrevious)); - - return resultHasPrevious; + CheckError(lib3mf_attachment_readfromcallback(m_pHandle, pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData)); } /** - * CResourceIterator::GetCurrent - Returns the resource the iterator points at. - * @return returns the resource instance. + * CAttachment::GetStreamSize - Retrieves the size of the attachment stream + * @return the stream size */ - PResource CResourceIterator::GetCurrent() + Lib3MF_uint64 CAttachment::GetStreamSize() { - Lib3MFHandle hResource = nullptr; - CheckError(lib3mf_resourceiterator_getcurrent(m_pHandle, &hResource)); + Lib3MF_uint64 resultStreamSize = 0; + CheckError(lib3mf_attachment_getstreamsize(m_pHandle, &resultStreamSize)); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return resultStreamSize; } /** - * CResourceIterator::Clone - Creates a new resource iterator with the same resource list. - * @return returns the cloned Iterator instance + * CAttachment::WriteToBuffer - Writes out the attachment into a buffer + * @param[out] BufferBuffer - Buffer to write into */ - PResourceIterator CResourceIterator::Clone() + void CAttachment::WriteToBuffer(std::vector & BufferBuffer) { - Lib3MFHandle hOutResourceIterator = nullptr; - CheckError(lib3mf_resourceiterator_clone(m_pHandle, &hOutResourceIterator)); - - if (!hOutResourceIterator) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hOutResourceIterator))); + Lib3MF_uint64 elementsNeededBuffer = 0; + Lib3MF_uint64 elementsWrittenBuffer = 0; + CheckError(lib3mf_attachment_writetobuffer(m_pHandle, 0, &elementsNeededBuffer, nullptr)); + BufferBuffer.resize((size_t) elementsNeededBuffer); + CheckError(lib3mf_attachment_writetobuffer(m_pHandle, elementsNeededBuffer, &elementsWrittenBuffer, BufferBuffer.data())); } /** - * CResourceIterator::Count - Returns the number of resoucres the iterator captures. - * @return returns the number of resoucres the iterator captures. + * CAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). + * @param[in] BufferBuffer - Buffer to read from */ - Lib3MF_uint64 CResourceIterator::Count() + void CAttachment::ReadFromBuffer(const CInputVector & BufferBuffer) { - Lib3MF_uint64 resultCount = 0; - CheckError(lib3mf_resourceiterator_count(m_pHandle, &resultCount)); - - return resultCount; + CheckError(lib3mf_attachment_readfrombuffer(m_pHandle, (Lib3MF_uint64)BufferBuffer.size(), BufferBuffer.data())); } /** - * Method definitions for class CSliceStackIterator + * Method definitions for class CTexture2D */ /** - * CSliceStackIterator::GetCurrentSliceStack - Returns the SliceStack the iterator points at. - * @return returns the SliceStack instance. + * CTexture2D::GetAttachment - Retrieves the attachment located at the path of the texture. + * @return attachment that holds the texture's image information. */ - PSliceStack CSliceStackIterator::GetCurrentSliceStack() + PAttachment CTexture2D::GetAttachment() { - Lib3MFHandle hResource = nullptr; - CheckError(lib3mf_slicestackiterator_getcurrentslicestack(m_pHandle, &hResource)); + Lib3MFHandle hAttachment = nullptr; + CheckError(lib3mf_texture2d_getattachment(m_pHandle, &hAttachment)); - if (!hResource) { + if (!hAttachment) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hAttachment))); } /** - * Method definitions for class CObjectIterator - */ + * CTexture2D::SetAttachment - Sets the texture's package path to the path of the attachment. + * @param[in] pAttachment - attachment that holds the texture's image information. + */ + void CTexture2D::SetAttachment(classParam pAttachment) + { + Lib3MFHandle hAttachment = pAttachment.GetHandle(); + CheckError(lib3mf_texture2d_setattachment(m_pHandle, hAttachment)); + } /** - * CObjectIterator::GetCurrentObject - Returns the Object the iterator points at. - * @return returns the Object instance. + * CTexture2D::GetContentType - Retrieves a texture's content type. + * @return returns content type enum. */ - PObject CObjectIterator::GetCurrentObject() + eTextureType CTexture2D::GetContentType() { - Lib3MFHandle hResource = nullptr; - CheckError(lib3mf_objectiterator_getcurrentobject(m_pHandle, &hResource)); + eTextureType resultContentType = (eTextureType) 0; + CheckError(lib3mf_texture2d_getcontenttype(m_pHandle, &resultContentType)); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return resultContentType; } /** - * Method definitions for class CMeshObjectIterator - */ + * CTexture2D::SetContentType - Retrieves a texture's content type. + * @param[in] eContentType - new Content Type + */ + void CTexture2D::SetContentType(const eTextureType eContentType) + { + CheckError(lib3mf_texture2d_setcontenttype(m_pHandle, eContentType)); + } /** - * CMeshObjectIterator::GetCurrentMeshObject - Returns the MeshObject the iterator points at. - * @return returns the MeshObject instance. + * CTexture2D::GetTileStyleUV - Retrieves a texture's tilestyle type. + * @param[out] eTileStyleU - returns tilestyle type enum. + * @param[out] eTileStyleV - returns tilestyle type enum. */ - PMeshObject CMeshObjectIterator::GetCurrentMeshObject() + void CTexture2D::GetTileStyleUV(eTextureTileStyle & eTileStyleU, eTextureTileStyle & eTileStyleV) { - Lib3MFHandle hResource = nullptr; - CheckError(lib3mf_meshobjectiterator_getcurrentmeshobject(m_pHandle, &hResource)); - - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + CheckError(lib3mf_texture2d_gettilestyleuv(m_pHandle, &eTileStyleU, &eTileStyleV)); } /** - * Method definitions for class CComponentsObjectIterator - */ + * CTexture2D::SetTileStyleUV - Sets a texture's tilestyle type. + * @param[in] eTileStyleU - new tilestyle type enum. + * @param[in] eTileStyleV - new tilestyle type enum. + */ + void CTexture2D::SetTileStyleUV(const eTextureTileStyle eTileStyleU, const eTextureTileStyle eTileStyleV) + { + CheckError(lib3mf_texture2d_settilestyleuv(m_pHandle, eTileStyleU, eTileStyleV)); + } /** - * CComponentsObjectIterator::GetCurrentComponentsObject - Returns the ComponentsObject the iterator points at. - * @return returns the ComponentsObject instance. + * CTexture2D::GetFilter - Retrieves a texture's filter type. + * @return returns filter type enum. */ - PComponentsObject CComponentsObjectIterator::GetCurrentComponentsObject() + eTextureFilter CTexture2D::GetFilter() { - Lib3MFHandle hResource = nullptr; - CheckError(lib3mf_componentsobjectiterator_getcurrentcomponentsobject(m_pHandle, &hResource)); + eTextureFilter resultFilter = (eTextureFilter) 0; + CheckError(lib3mf_texture2d_getfilter(m_pHandle, &resultFilter)); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return resultFilter; } /** - * Method definitions for class CTexture2DIterator - */ - - /** - * CTexture2DIterator::GetCurrentTexture2D - Returns the Texture2D the iterator points at. - * @return returns the Texture2D instance. + * CTexture2D::SetFilter - Sets a texture's filter type. + * @param[in] eFilter - sets new filter type enum. */ - PTexture2D CTexture2DIterator::GetCurrentTexture2D() + void CTexture2D::SetFilter(const eTextureFilter eFilter) { - Lib3MFHandle hResource = nullptr; - CheckError(lib3mf_texture2diterator_getcurrenttexture2d(m_pHandle, &hResource)); - - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + CheckError(lib3mf_texture2d_setfilter(m_pHandle, eFilter)); } /** - * Method definitions for class CBaseMaterialGroupIterator + * Method definitions for class CImplicitPort */ /** - * CBaseMaterialGroupIterator::GetCurrentBaseMaterialGroup - Returns the MaterialGroup the iterator points at. - * @return returns the BaseMaterialGroup instance. + * CImplicitPort::GetIdentifier - Retrieves the identifier of the port + * @return the identifier */ - PBaseMaterialGroup CBaseMaterialGroupIterator::GetCurrentBaseMaterialGroup() + std::string CImplicitPort::GetIdentifier() { - Lib3MFHandle hResource = nullptr; - CheckError(lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup(m_pHandle, &hResource)); + Lib3MF_uint32 bytesNeededIdentifier = 0; + Lib3MF_uint32 bytesWrittenIdentifier = 0; + CheckError(lib3mf_implicitport_getidentifier(m_pHandle, 0, &bytesNeededIdentifier, nullptr)); + std::vector bufferIdentifier(bytesNeededIdentifier); + CheckError(lib3mf_implicitport_getidentifier(m_pHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0])); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return std::string(&bufferIdentifier[0]); } /** - * Method definitions for class CColorGroupIterator - */ + * CImplicitPort::SetIdentifier - Sets the identifier of the port + * @param[in] sIdentifier - the identifier + */ + void CImplicitPort::SetIdentifier(const std::string & sIdentifier) + { + CheckError(lib3mf_implicitport_setidentifier(m_pHandle, sIdentifier.c_str())); + } /** - * CColorGroupIterator::GetCurrentColorGroup - Returns the ColorGroup the iterator points at. - * @return returns the ColorGroup instance. + * CImplicitPort::GetDisplayName - Retrieves the display name of the port + * @return the display name */ - PColorGroup CColorGroupIterator::GetCurrentColorGroup() + std::string CImplicitPort::GetDisplayName() { - Lib3MFHandle hResource = nullptr; - CheckError(lib3mf_colorgroupiterator_getcurrentcolorgroup(m_pHandle, &hResource)); + Lib3MF_uint32 bytesNeededDisplayName = 0; + Lib3MF_uint32 bytesWrittenDisplayName = 0; + CheckError(lib3mf_implicitport_getdisplayname(m_pHandle, 0, &bytesNeededDisplayName, nullptr)); + std::vector bufferDisplayName(bytesNeededDisplayName); + CheckError(lib3mf_implicitport_getdisplayname(m_pHandle, bytesNeededDisplayName, &bytesWrittenDisplayName, &bufferDisplayName[0])); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return std::string(&bufferDisplayName[0]); } /** - * Method definitions for class CTexture2DGroupIterator - */ - - /** - * CTexture2DGroupIterator::GetCurrentTexture2DGroup - Returns the Texture2DGroup the iterator points at. - * @return returns the Texture2DGroup instance. + * CImplicitPort::SetDisplayName - Sets the display name of the port + * @param[in] sDisplayName - the display name */ - PTexture2DGroup CTexture2DGroupIterator::GetCurrentTexture2DGroup() + void CImplicitPort::SetDisplayName(const std::string & sDisplayName) { - Lib3MFHandle hResource = nullptr; - CheckError(lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup(m_pHandle, &hResource)); - - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + CheckError(lib3mf_implicitport_setdisplayname(m_pHandle, sDisplayName.c_str())); } /** - * Method definitions for class CCompositeMaterialsIterator - */ + * CImplicitPort::SetType - Sets the type of the port + * @param[in] eImplicitPortType - the type + */ + void CImplicitPort::SetType(const eImplicitPortType eImplicitPortType) + { + CheckError(lib3mf_implicitport_settype(m_pHandle, eImplicitPortType)); + } /** - * CCompositeMaterialsIterator::GetCurrentCompositeMaterials - Returns the CompositeMaterials the iterator points at. - * @return returns the CompositeMaterials instance. + * CImplicitPort::GetType - Retrieves the type of the port + * @return the type */ - PCompositeMaterials CCompositeMaterialsIterator::GetCurrentCompositeMaterials() + eImplicitPortType CImplicitPort::GetType() { - Lib3MFHandle hResource = nullptr; - CheckError(lib3mf_compositematerialsiterator_getcurrentcompositematerials(m_pHandle, &hResource)); + eImplicitPortType resultImplicitPortType = (eImplicitPortType) 0; + CheckError(lib3mf_implicitport_gettype(m_pHandle, &resultImplicitPortType)); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return resultImplicitPortType; } /** - * Method definitions for class CMultiPropertyGroupIterator - */ + * CImplicitPort::GetReference - Retrieves the reference of the port, only used for input ports + * @return the reference + */ + std::string CImplicitPort::GetReference() + { + Lib3MF_uint32 bytesNeededReference = 0; + Lib3MF_uint32 bytesWrittenReference = 0; + CheckError(lib3mf_implicitport_getreference(m_pHandle, 0, &bytesNeededReference, nullptr)); + std::vector bufferReference(bytesNeededReference); + CheckError(lib3mf_implicitport_getreference(m_pHandle, bytesNeededReference, &bytesWrittenReference, &bufferReference[0])); + + return std::string(&bufferReference[0]); + } /** - * CMultiPropertyGroupIterator::GetCurrentMultiPropertyGroup - Returns the MultiPropertyGroup the iterator points at. - * @return returns the MultiPropertyGroup instance. + * CImplicitPort::SetReference - Sets the reference of the port, only used for input ports + * @param[in] sReference - the reference */ - PMultiPropertyGroup CMultiPropertyGroupIterator::GetCurrentMultiPropertyGroup() + void CImplicitPort::SetReference(const std::string & sReference) { - Lib3MFHandle hResource = nullptr; - CheckError(lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup(m_pHandle, &hResource)); - - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + CheckError(lib3mf_implicitport_setreference(m_pHandle, sReference.c_str())); } /** - * Method definitions for class CMetaData + * Method definitions for class CIterator */ /** - * CMetaData::GetNameSpace - returns the namespace URL of the metadata - * @return the namespace URL of the metadata + * CIterator::MoveNext - Iterates to the next item in the list. + * @return Iterates to the next item in the list. */ - std::string CMetaData::GetNameSpace() + bool CIterator::MoveNext() { - Lib3MF_uint32 bytesNeededNameSpace = 0; - Lib3MF_uint32 bytesWrittenNameSpace = 0; - CheckError(lib3mf_metadata_getnamespace(m_pHandle, 0, &bytesNeededNameSpace, nullptr)); - std::vector bufferNameSpace(bytesNeededNameSpace); - CheckError(lib3mf_metadata_getnamespace(m_pHandle, bytesNeededNameSpace, &bytesWrittenNameSpace, &bufferNameSpace[0])); + bool resultHasNext = 0; + CheckError(lib3mf_iterator_movenext(m_pHandle, &resultHasNext)); - return std::string(&bufferNameSpace[0]); + return resultHasNext; } /** - * CMetaData::SetNameSpace - sets a new namespace URL of the metadata - * @param[in] sNameSpace - the new namespace URL of the metadata + * CIterator::MovePrevious - Iterates to the previous item in the list. + * @return Iterates to the previous item in the list. */ - void CMetaData::SetNameSpace(const std::string & sNameSpace) + bool CIterator::MovePrevious() { - CheckError(lib3mf_metadata_setnamespace(m_pHandle, sNameSpace.c_str())); + bool resultHasPrevious = 0; + CheckError(lib3mf_iterator_moveprevious(m_pHandle, &resultHasPrevious)); + + return resultHasPrevious; } /** - * CMetaData::GetName - returns the name of a metadata - * @return the name of the metadata + * CIterator::Count - Returns the number of items the iterator captures. + * @return returns the number of items the iterator captures. */ - std::string CMetaData::GetName() + Lib3MF_uint64 CIterator::Count() { - Lib3MF_uint32 bytesNeededName = 0; - Lib3MF_uint32 bytesWrittenName = 0; - CheckError(lib3mf_metadata_getname(m_pHandle, 0, &bytesNeededName, nullptr)); - std::vector bufferName(bytesNeededName); - CheckError(lib3mf_metadata_getname(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); + Lib3MF_uint64 resultCount = 0; + CheckError(lib3mf_iterator_count(m_pHandle, &resultCount)); - return std::string(&bufferName[0]); + return resultCount; } /** - * CMetaData::SetName - sets a new name of a metadata - * @param[in] sName - the new name of the metadata - */ - void CMetaData::SetName(const std::string & sName) - { - CheckError(lib3mf_metadata_setname(m_pHandle, sName.c_str())); - } + * Method definitions for class CImplicitPortIterator + */ /** - * CMetaData::GetKey - returns the (namespace+name) of a metadata - * @return the key (namespace+name) of the metadata + * CImplicitPortIterator::GetCurrent - Returns the current element + * @return The current element */ - std::string CMetaData::GetKey() + PImplicitPort CImplicitPortIterator::GetCurrent() { - Lib3MF_uint32 bytesNeededKey = 0; - Lib3MF_uint32 bytesWrittenKey = 0; - CheckError(lib3mf_metadata_getkey(m_pHandle, 0, &bytesNeededKey, nullptr)); - std::vector bufferKey(bytesNeededKey); - CheckError(lib3mf_metadata_getkey(m_pHandle, bytesNeededKey, &bytesWrittenKey, &bufferKey[0])); + Lib3MFHandle hPort = nullptr; + CheckError(lib3mf_implicitportiterator_getcurrent(m_pHandle, &hPort)); - return std::string(&bufferKey[0]); + if (!hPort) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPort))); } /** - * CMetaData::GetMustPreserve - returns, whether a metadata must be preserved - * @return returns, whether a metadata must be preserved + * Method definitions for class CImplicitNode + */ + + /** + * CImplicitNode::GetIdentifier - Retrieves the identifier of the node + * @return the identifier */ - bool CMetaData::GetMustPreserve() + std::string CImplicitNode::GetIdentifier() { - bool resultMustPreserve = 0; - CheckError(lib3mf_metadata_getmustpreserve(m_pHandle, &resultMustPreserve)); + Lib3MF_uint32 bytesNeededIdentifier = 0; + Lib3MF_uint32 bytesWrittenIdentifier = 0; + CheckError(lib3mf_implicitnode_getidentifier(m_pHandle, 0, &bytesNeededIdentifier, nullptr)); + std::vector bufferIdentifier(bytesNeededIdentifier); + CheckError(lib3mf_implicitnode_getidentifier(m_pHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0])); - return resultMustPreserve; + return std::string(&bufferIdentifier[0]); } /** - * CMetaData::SetMustPreserve - sets whether a metadata must be preserved - * @param[in] bMustPreserve - a new value whether a metadata must be preserved + * CImplicitNode::SetIdentifier - Sets the identifier of the node + * @param[in] sIdentifier - the identifier */ - void CMetaData::SetMustPreserve(const bool bMustPreserve) + void CImplicitNode::SetIdentifier(const std::string & sIdentifier) { - CheckError(lib3mf_metadata_setmustpreserve(m_pHandle, bMustPreserve)); + CheckError(lib3mf_implicitnode_setidentifier(m_pHandle, sIdentifier.c_str())); } /** - * CMetaData::GetType - returns the type of a metadata - * @return the type of the metadata + * CImplicitNode::GetDisplayName - Retrieves the display name of the node + * @return the display name */ - std::string CMetaData::GetType() - { - Lib3MF_uint32 bytesNeededType = 0; - Lib3MF_uint32 bytesWrittenType = 0; - CheckError(lib3mf_metadata_gettype(m_pHandle, 0, &bytesNeededType, nullptr)); - std::vector bufferType(bytesNeededType); - CheckError(lib3mf_metadata_gettype(m_pHandle, bytesNeededType, &bytesWrittenType, &bufferType[0])); + std::string CImplicitNode::GetDisplayName() + { + Lib3MF_uint32 bytesNeededDisplayName = 0; + Lib3MF_uint32 bytesWrittenDisplayName = 0; + CheckError(lib3mf_implicitnode_getdisplayname(m_pHandle, 0, &bytesNeededDisplayName, nullptr)); + std::vector bufferDisplayName(bytesNeededDisplayName); + CheckError(lib3mf_implicitnode_getdisplayname(m_pHandle, bytesNeededDisplayName, &bytesWrittenDisplayName, &bufferDisplayName[0])); - return std::string(&bufferType[0]); + return std::string(&bufferDisplayName[0]); } /** - * CMetaData::SetType - sets a new type of a metadata. This must be a simple XML type - * @param[in] sType - a new type of the metadata + * CImplicitNode::SetDisplayName - Sets the display name of the node + * @param[in] sDisplayName - the display name */ - void CMetaData::SetType(const std::string & sType) + void CImplicitNode::SetDisplayName(const std::string & sDisplayName) { - CheckError(lib3mf_metadata_settype(m_pHandle, sType.c_str())); + CheckError(lib3mf_implicitnode_setdisplayname(m_pHandle, sDisplayName.c_str())); } /** - * CMetaData::GetValue - returns the value of the metadata - * @return the value of the metadata + * CImplicitNode::GetTag - Retrieves the tag of the node + * @return the tag */ - std::string CMetaData::GetValue() + std::string CImplicitNode::GetTag() { - Lib3MF_uint32 bytesNeededValue = 0; - Lib3MF_uint32 bytesWrittenValue = 0; - CheckError(lib3mf_metadata_getvalue(m_pHandle, 0, &bytesNeededValue, nullptr)); - std::vector bufferValue(bytesNeededValue); - CheckError(lib3mf_metadata_getvalue(m_pHandle, bytesNeededValue, &bytesWrittenValue, &bufferValue[0])); + Lib3MF_uint32 bytesNeededTag = 0; + Lib3MF_uint32 bytesWrittenTag = 0; + CheckError(lib3mf_implicitnode_gettag(m_pHandle, 0, &bytesNeededTag, nullptr)); + std::vector bufferTag(bytesNeededTag); + CheckError(lib3mf_implicitnode_gettag(m_pHandle, bytesNeededTag, &bytesWrittenTag, &bufferTag[0])); - return std::string(&bufferValue[0]); + return std::string(&bufferTag[0]); } /** - * CMetaData::SetValue - sets a new value of the metadata - * @param[in] sValue - a new value of the metadata + * CImplicitNode::SetTag - Sets the tag of the node + * @param[in] sTag - the tag */ - void CMetaData::SetValue(const std::string & sValue) + void CImplicitNode::SetTag(const std::string & sTag) { - CheckError(lib3mf_metadata_setvalue(m_pHandle, sValue.c_str())); + CheckError(lib3mf_implicitnode_settag(m_pHandle, sTag.c_str())); } /** - * Method definitions for class CMetaDataGroup - */ + * CImplicitNode::GetNodeType - Retrieves the type of the node + * @return the type of the node + */ + eImplicitNodeType CImplicitNode::GetNodeType() + { + eImplicitNodeType resultType = (eImplicitNodeType) 0; + CheckError(lib3mf_implicitnode_getnodetype(m_pHandle, &resultType)); + + return resultType; + } /** - * CMetaDataGroup::GetMetaDataCount - returns the number of metadata in this metadatagroup - * @return returns the number metadata + * CImplicitNode::AddInput - Add an input + * @param[in] sIdentifier - the identifier of the input + * @param[in] sDisplayName - the display name of the input + * @return */ - Lib3MF_uint32 CMetaDataGroup::GetMetaDataCount() + PImplicitPort CImplicitNode::AddInput(const std::string & sIdentifier, const std::string & sDisplayName) { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_metadatagroup_getmetadatacount(m_pHandle, &resultCount)); + Lib3MFHandle hPort = nullptr; + CheckError(lib3mf_implicitnode_addinput(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), &hPort)); - return resultCount; + if (!hPort) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPort))); } /** - * CMetaDataGroup::GetMetaData - returns a metadata value within this metadatagroup - * @param[in] nIndex - Index of the Metadata. - * @return an instance of the metadata + * CImplicitNode::GetInputs - Retrieves the inputs + * @return the iterator for the inputs */ - PMetaData CMetaDataGroup::GetMetaData(const Lib3MF_uint32 nIndex) + PImplicitPortIterator CImplicitNode::GetInputs() { - Lib3MFHandle hMetaData = nullptr; - CheckError(lib3mf_metadatagroup_getmetadata(m_pHandle, nIndex, &hMetaData)); + Lib3MFHandle hIterator = nullptr; + CheckError(lib3mf_implicitnode_getinputs(m_pHandle, &hIterator)); - if (!hMetaData) { + if (!hIterator) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hIterator))); } /** - * CMetaDataGroup::GetMetaDataByKey - returns a metadata value within this metadatagroup - * @param[in] sNameSpace - the namespace of the metadata - * @param[in] sName - the name of the Metadata - * @return an instance of the metadata + * CImplicitNode::AddOutput - Add an output + * @param[in] sIdentifier - the identifier of the output + * @param[in] sDisplayName - the display name of the output + * @return */ - PMetaData CMetaDataGroup::GetMetaDataByKey(const std::string & sNameSpace, const std::string & sName) + PImplicitPort CImplicitNode::AddOutput(const std::string & sIdentifier, const std::string & sDisplayName) { - Lib3MFHandle hMetaData = nullptr; - CheckError(lib3mf_metadatagroup_getmetadatabykey(m_pHandle, sNameSpace.c_str(), sName.c_str(), &hMetaData)); + Lib3MFHandle hPort = nullptr; + CheckError(lib3mf_implicitnode_addoutput(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), &hPort)); - if (!hMetaData) { + if (!hPort) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPort))); } /** - * CMetaDataGroup::RemoveMetaDataByIndex - removes metadata by index from the model. - * @param[in] nIndex - Index of the metadata to remove + * CImplicitNode::GetOutputs - Retrieves the outputs + * @return the iterator the outputs */ - void CMetaDataGroup::RemoveMetaDataByIndex(const Lib3MF_uint32 nIndex) + PImplicitPortIterator CImplicitNode::GetOutputs() { - CheckError(lib3mf_metadatagroup_removemetadatabyindex(m_pHandle, nIndex)); + Lib3MFHandle hIterator = nullptr; + CheckError(lib3mf_implicitnode_getoutputs(m_pHandle, &hIterator)); + + if (!hIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hIterator))); } /** - * CMetaDataGroup::RemoveMetaData - removes metadata from the model. - * @param[in] pTheMetaData - The metadata to remove + * CImplicitNode::FindInput - Retrieves an input + * @param[in] sIdentifier - the identifier of the input + * @return the input port */ - void CMetaDataGroup::RemoveMetaData(classParam pTheMetaData) + PImplicitPort CImplicitNode::FindInput(const std::string & sIdentifier) { - Lib3MFHandle hTheMetaData = pTheMetaData.GetHandle(); - CheckError(lib3mf_metadatagroup_removemetadata(m_pHandle, hTheMetaData)); + Lib3MFHandle hInput = nullptr; + CheckError(lib3mf_implicitnode_findinput(m_pHandle, sIdentifier.c_str(), &hInput)); + + if (hInput) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hInput))); + } else { + return nullptr; + } } /** - * CMetaDataGroup::AddMetaData - adds a new metadata to this metadatagroup - * @param[in] sNameSpace - the namespace of the metadata - * @param[in] sName - the name of the metadata - * @param[in] sValue - the value of the metadata - * @param[in] sType - the type of the metadata - * @param[in] bMustPreserve - shuold the metadata be preserved - * @return a new instance of the metadata + * CImplicitNode::FindOutput - Retrieves an output + * @param[in] sIdentifier - the identifier of the output + * @return the output port */ - PMetaData CMetaDataGroup::AddMetaData(const std::string & sNameSpace, const std::string & sName, const std::string & sValue, const std::string & sType, const bool bMustPreserve) + PImplicitPort CImplicitNode::FindOutput(const std::string & sIdentifier) { - Lib3MFHandle hMetaData = nullptr; - CheckError(lib3mf_metadatagroup_addmetadata(m_pHandle, sNameSpace.c_str(), sName.c_str(), sValue.c_str(), sType.c_str(), bMustPreserve, &hMetaData)); + Lib3MFHandle hOutput = nullptr; + CheckError(lib3mf_implicitnode_findoutput(m_pHandle, sIdentifier.c_str(), &hOutput)); - if (!hMetaData) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); + if (hOutput) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hOutput))); + } else { + return nullptr; } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); } /** - * Method definitions for class CObject + * CImplicitNode::AreTypesValid - Checks if the types of the input and output ports are valid for the node type + * @return true, if the types are valid + */ + bool CImplicitNode::AreTypesValid() + { + bool resultValid = 0; + CheckError(lib3mf_implicitnode_aretypesvalid(m_pHandle, &resultValid)); + + return resultValid; + } + + /** + * Method definitions for class COneInputNode */ /** - * CObject::GetType - Retrieves an object's type - * @return returns object type enum. + * COneInputNode::GetInputA - Retrieves the input + * @return the input */ - eObjectType CObject::GetType() + PImplicitPort COneInputNode::GetInputA() { - eObjectType resultObjectType = (eObjectType) 0; - CheckError(lib3mf_object_gettype(m_pHandle, &resultObjectType)); + Lib3MFHandle hInput = nullptr; + CheckError(lib3mf_oneinputnode_getinputa(m_pHandle, &hInput)); - return resultObjectType; + if (!hInput) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hInput))); } /** - * CObject::SetType - Sets an object's type - * @param[in] eObjectType - object type enum. + * COneInputNode::GetOutputResult - Retrieves the output + * @return the output */ - void CObject::SetType(const eObjectType eObjectType) + PImplicitPort COneInputNode::GetOutputResult() { - CheckError(lib3mf_object_settype(m_pHandle, eObjectType)); + Lib3MFHandle hResult = nullptr; + CheckError(lib3mf_oneinputnode_getoutputresult(m_pHandle, &hResult)); + + if (!hResult) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); } /** - * CObject::GetName - Retrieves an object's name - * @return returns object name. + * Method definitions for class CSinNode + */ + + /** + * Method definitions for class CCosNode + */ + + /** + * Method definitions for class CTanNode + */ + + /** + * Method definitions for class CArcSinNode + */ + + /** + * Method definitions for class CArcCosNode + */ + + /** + * Method definitions for class CArcTanNode + */ + + /** + * Method definitions for class CSinhNode + */ + + /** + * Method definitions for class CCoshNode + */ + + /** + * Method definitions for class CTanhNode + */ + + /** + * Method definitions for class CRoundNode + */ + + /** + * Method definitions for class CCeilNode + */ + + /** + * Method definitions for class CFloorNode + */ + + /** + * Method definitions for class CSignNode + */ + + /** + * Method definitions for class CFractNode + */ + + /** + * Method definitions for class CAbsNode + */ + + /** + * Method definitions for class CExpNode + */ + + /** + * Method definitions for class CLogNode + */ + + /** + * Method definitions for class CLog2Node + */ + + /** + * Method definitions for class CLog10Node + */ + + /** + * Method definitions for class CLengthNode + */ + + /** + * Method definitions for class CTransposeNode + */ + + /** + * Method definitions for class CInverseNode + */ + + /** + * Method definitions for class CSqrtNode + */ + + /** + * Method definitions for class CResourceIdNode + */ + + /** + * CResourceIdNode::SetResource - Sets the Resource that the resourceid attribute of the node will point to + * @param[in] pResource - the resource */ - std::string CObject::GetName() + void CResourceIdNode::SetResource(classParam pResource) { - Lib3MF_uint32 bytesNeededName = 0; - Lib3MF_uint32 bytesWrittenName = 0; - CheckError(lib3mf_object_getname(m_pHandle, 0, &bytesNeededName, nullptr)); - std::vector bufferName(bytesNeededName); - CheckError(lib3mf_object_getname(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); + Lib3MFHandle hResource = pResource.GetHandle(); + CheckError(lib3mf_resourceidnode_setresource(m_pHandle, hResource)); + } + + /** + * CResourceIdNode::GetResource - Retrieves the resource of the node + * @return the resource + */ + PResource CResourceIdNode::GetResource() + { + Lib3MFHandle hResource = nullptr; + CheckError(lib3mf_resourceidnode_getresource(m_pHandle, &hResource)); - return std::string(&bufferName[0]); + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); } /** - * CObject::SetName - Sets an object's name string - * @param[in] sName - new object name. + * CResourceIdNode::GetOutputValue - Retrieves the output + * @return the output */ - void CObject::SetName(const std::string & sName) + PImplicitPort CResourceIdNode::GetOutputValue() { - CheckError(lib3mf_object_setname(m_pHandle, sName.c_str())); + Lib3MFHandle hValue = nullptr; + CheckError(lib3mf_resourceidnode_getoutputvalue(m_pHandle, &hValue)); + + if (!hValue) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hValue))); } /** - * CObject::GetPartNumber - Retrieves an object's part number - * @return returns object part number. + * Method definitions for class CTwoInputNode + */ + + /** + * CTwoInputNode::GetInputB - Retrieves the second input + * @return the second input */ - std::string CObject::GetPartNumber() + PImplicitPort CTwoInputNode::GetInputB() { - Lib3MF_uint32 bytesNeededPartNumber = 0; - Lib3MF_uint32 bytesWrittenPartNumber = 0; - CheckError(lib3mf_object_getpartnumber(m_pHandle, 0, &bytesNeededPartNumber, nullptr)); - std::vector bufferPartNumber(bytesNeededPartNumber); - CheckError(lib3mf_object_getpartnumber(m_pHandle, bytesNeededPartNumber, &bytesWrittenPartNumber, &bufferPartNumber[0])); + Lib3MFHandle hB = nullptr; + CheckError(lib3mf_twoinputnode_getinputb(m_pHandle, &hB)); - return std::string(&bufferPartNumber[0]); + if (!hB) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hB))); } /** - * CObject::SetPartNumber - Sets an objects partnumber string - * @param[in] sPartNumber - new object part number. - */ - void CObject::SetPartNumber(const std::string & sPartNumber) - { - CheckError(lib3mf_object_setpartnumber(m_pHandle, sPartNumber.c_str())); - } + * Method definitions for class CAdditionNode + */ + + /** + * Method definitions for class CSubtractionNode + */ + + /** + * Method definitions for class CMultiplicationNode + */ + + /** + * Method definitions for class CDivisionNode + */ + + /** + * Method definitions for class CDotNode + */ + + /** + * Method definitions for class CCrossNode + */ + + /** + * Method definitions for class CArcTan2Node + */ + + /** + * Method definitions for class CMatVecMultiplicationNode + */ + + /** + * Method definitions for class CMinNode + */ + + /** + * Method definitions for class CMaxNode + */ + + /** + * Method definitions for class CFmodNode + */ + + /** + * Method definitions for class CModNode + */ + + /** + * Method definitions for class CPowNode + */ + + /** + * Method definitions for class CSelectNode + */ /** - * CObject::IsMeshObject - Retrieves, if an object is a mesh object - * @return returns, whether the object is a mesh object + * CSelectNode::GetInputB - Retrieves the second input + * @return the second input */ - bool CObject::IsMeshObject() + PImplicitPort CSelectNode::GetInputB() { - bool resultIsMeshObject = 0; - CheckError(lib3mf_object_ismeshobject(m_pHandle, &resultIsMeshObject)); + Lib3MFHandle hB = nullptr; + CheckError(lib3mf_selectnode_getinputb(m_pHandle, &hB)); - return resultIsMeshObject; + if (!hB) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hB))); } /** - * CObject::IsComponentsObject - Retrieves, if an object is a components object - * @return returns, whether the object is a components object + * CSelectNode::GetInputC - Retrieves the third input + * @return the third input */ - bool CObject::IsComponentsObject() + PImplicitPort CSelectNode::GetInputC() { - bool resultIsComponentsObject = 0; - CheckError(lib3mf_object_iscomponentsobject(m_pHandle, &resultIsComponentsObject)); + Lib3MFHandle hC = nullptr; + CheckError(lib3mf_selectnode_getinputc(m_pHandle, &hC)); - return resultIsComponentsObject; + if (!hC) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hC))); } /** - * CObject::IsValid - Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. - * @return returns whether the object is a valid object description + * CSelectNode::GetInputD - Retrieves the fourth input + * @return the fourth input */ - bool CObject::IsValid() + PImplicitPort CSelectNode::GetInputD() { - bool resultIsValid = 0; - CheckError(lib3mf_object_isvalid(m_pHandle, &resultIsValid)); + Lib3MFHandle hD = nullptr; + CheckError(lib3mf_selectnode_getinputd(m_pHandle, &hD)); - return resultIsValid; + if (!hD) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hD))); } /** - * CObject::SetAttachmentAsThumbnail - Use an existing attachment as thumbnail for this object - * @param[in] pAttachment - Instance of a new or the existing thumbnailattachment object. - */ - void CObject::SetAttachmentAsThumbnail(classParam pAttachment) - { - Lib3MFHandle hAttachment = pAttachment.GetHandle(); - CheckError(lib3mf_object_setattachmentasthumbnail(m_pHandle, hAttachment)); - } + * Method definitions for class CClampNode + */ /** - * CObject::GetThumbnailAttachment - Get the attachment containing the object thumbnail. - * @return Instance of the thumbnailattachment object or NULL. + * CClampNode::GetInputMin - Retrieves the input for the lower limit + * @return the input for the lower limit */ - PAttachment CObject::GetThumbnailAttachment() + PImplicitPort CClampNode::GetInputMin() { - Lib3MFHandle hAttachment = nullptr; - CheckError(lib3mf_object_getthumbnailattachment(m_pHandle, &hAttachment)); + Lib3MFHandle hMin = nullptr; + CheckError(lib3mf_clampnode_getinputmin(m_pHandle, &hMin)); - if (hAttachment) { - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hAttachment))); - } else { - return nullptr; + if (!hMin) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMin))); } /** - * CObject::ClearThumbnailAttachment - Clears the attachment. The attachment instance is not removed from the package. + * CClampNode::GetInputMax - Retrieves the input for the upper limit + * @return the input for the upper limit */ - void CObject::ClearThumbnailAttachment() + PImplicitPort CClampNode::GetInputMax() { - CheckError(lib3mf_object_clearthumbnailattachment(m_pHandle)); + Lib3MFHandle hMax = nullptr; + CheckError(lib3mf_clampnode_getinputmax(m_pHandle, &hMax)); + + if (!hMax) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMax))); } /** - * CObject::GetOutbox - Returns the outbox of a build item - * @return Outbox of this build item + * Method definitions for class CComposeVectorNode + */ + + /** + * CComposeVectorNode::GetInputX - Retrieves the input for the x component + * @return the input for the x component */ - sBox CObject::GetOutbox() + PImplicitPort CComposeVectorNode::GetInputX() { - sBox resultOutbox; - CheckError(lib3mf_object_getoutbox(m_pHandle, &resultOutbox)); + Lib3MFHandle hX = nullptr; + CheckError(lib3mf_composevectornode_getinputx(m_pHandle, &hX)); - return resultOutbox; + if (!hX) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hX))); } /** - * CObject::GetUUID - Retrieves an object's uuid string (see production extension specification) - * @param[out] bHasUUID - flag whether the build item has a UUID - * @return returns object uuid. + * CComposeVectorNode::GetInputY - Retrieves the input for the y component + * @return the input for the y component */ - std::string CObject::GetUUID(bool & bHasUUID) + PImplicitPort CComposeVectorNode::GetInputY() { - Lib3MF_uint32 bytesNeededUUID = 0; - Lib3MF_uint32 bytesWrittenUUID = 0; - CheckError(lib3mf_object_getuuid(m_pHandle, &bHasUUID, 0, &bytesNeededUUID, nullptr)); - std::vector bufferUUID(bytesNeededUUID); - CheckError(lib3mf_object_getuuid(m_pHandle, &bHasUUID, bytesNeededUUID, &bytesWrittenUUID, &bufferUUID[0])); + Lib3MFHandle hY = nullptr; + CheckError(lib3mf_composevectornode_getinputy(m_pHandle, &hY)); - return std::string(&bufferUUID[0]); + if (!hY) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hY))); } /** - * CObject::SetUUID - Sets a build object's uuid string (see production extension specification) - * @param[in] sUUID - new object uuid string. + * CComposeVectorNode::GetInputZ - Retrieves the input for the z component + * @return the input for the z component */ - void CObject::SetUUID(const std::string & sUUID) + PImplicitPort CComposeVectorNode::GetInputZ() { - CheckError(lib3mf_object_setuuid(m_pHandle, sUUID.c_str())); + Lib3MFHandle hZ = nullptr; + CheckError(lib3mf_composevectornode_getinputz(m_pHandle, &hZ)); + + if (!hZ) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hZ))); } /** - * CObject::GetMetaDataGroup - Returns the metadatagroup of this object - * @return returns an Instance of the metadatagroup of this object + * CComposeVectorNode::GetOutputResult - Retrieves the output + * @return the output */ - PMetaDataGroup CObject::GetMetaDataGroup() + PImplicitPort CComposeVectorNode::GetOutputResult() { - Lib3MFHandle hMetaDataGroup = nullptr; - CheckError(lib3mf_object_getmetadatagroup(m_pHandle, &hMetaDataGroup)); + Lib3MFHandle hResult = nullptr; + CheckError(lib3mf_composevectornode_getoutputresult(m_pHandle, &hResult)); - if (!hMetaDataGroup) { + if (!hResult) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaDataGroup))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); } /** - * CObject::SetSlicesMeshResolution - set the meshresolution of the mesh object - * @param[in] eMeshResolution - meshresolution of this object + * Method definitions for class CVectorFromScalarNode + */ + + /** + * Method definitions for class CDecomposeVectorNode + */ + + /** + * CDecomposeVectorNode::GetInputA - Retrieves the input + * @return the input port for the vector to decompose */ - void CObject::SetSlicesMeshResolution(const eSlicesMeshResolution eMeshResolution) + PImplicitPort CDecomposeVectorNode::GetInputA() { - CheckError(lib3mf_object_setslicesmeshresolution(m_pHandle, eMeshResolution)); + Lib3MFHandle hA = nullptr; + CheckError(lib3mf_decomposevectornode_getinputa(m_pHandle, &hA)); + + if (!hA) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hA))); } /** - * CObject::GetSlicesMeshResolution - get the meshresolution of the mesh object - * @return meshresolution of this object + * CDecomposeVectorNode::GetOutputX - Retrieves the output for the x component + * @return the output for the x component */ - eSlicesMeshResolution CObject::GetSlicesMeshResolution() + PImplicitPort CDecomposeVectorNode::GetOutputX() { - eSlicesMeshResolution resultMeshResolution = (eSlicesMeshResolution) 0; - CheckError(lib3mf_object_getslicesmeshresolution(m_pHandle, &resultMeshResolution)); + Lib3MFHandle hX = nullptr; + CheckError(lib3mf_decomposevectornode_getoutputx(m_pHandle, &hX)); - return resultMeshResolution; + if (!hX) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hX))); } /** - * CObject::HasSlices - returns whether the Object has a slice stack. If Recursive is true, also checks whether any references object has a slice stack - * @param[in] bRecursive - check also all referenced objects? - * @return does the object have a slice stack? + * CDecomposeVectorNode::GetOutputY - Retrieves the output for the y component + * @return the output for the y component */ - bool CObject::HasSlices(const bool bRecursive) + PImplicitPort CDecomposeVectorNode::GetOutputY() { - bool resultHasSlices = 0; - CheckError(lib3mf_object_hasslices(m_pHandle, bRecursive, &resultHasSlices)); + Lib3MFHandle hY = nullptr; + CheckError(lib3mf_decomposevectornode_getoutputy(m_pHandle, &hY)); - return resultHasSlices; + if (!hY) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hY))); } /** - * CObject::ClearSliceStack - unlinks the attached slicestack from this object. If no slice stack is attached, do noting. + * CDecomposeVectorNode::GetOutputZ - Retrieves the output for the z component + * @return the output for the z component */ - void CObject::ClearSliceStack() + PImplicitPort CDecomposeVectorNode::GetOutputZ() { - CheckError(lib3mf_object_clearslicestack(m_pHandle)); + Lib3MFHandle hZ = nullptr; + CheckError(lib3mf_decomposevectornode_getoutputz(m_pHandle, &hZ)); + + if (!hZ) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hZ))); } /** - * CObject::GetSliceStack - get the Slicestack attached to the object - * @return returns the slicestack instance + * Method definitions for class CComposeMatrixNode + */ + + /** + * CComposeMatrixNode::GetInputM00 - Retrieves the input for the element 0 0 + * @return the input for the m00 element */ - PSliceStack CObject::GetSliceStack() + PImplicitPort CComposeMatrixNode::GetInputM00() { - Lib3MFHandle hSliceStackInstance = nullptr; - CheckError(lib3mf_object_getslicestack(m_pHandle, &hSliceStackInstance)); + Lib3MFHandle hM00 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm00(m_pHandle, &hM00)); - if (!hSliceStackInstance) { + if (!hM00) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSliceStackInstance))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM00))); } /** - * CObject::AssignSliceStack - assigns a slicestack to the object - * @param[in] pSliceStackInstance - the new slice stack of this Object + * CComposeMatrixNode::GetInputM01 - Retrieves the input for the element 0 1 + * @return the input for the m01 element */ - void CObject::AssignSliceStack(classParam pSliceStackInstance) + PImplicitPort CComposeMatrixNode::GetInputM01() { - Lib3MFHandle hSliceStackInstance = pSliceStackInstance.GetHandle(); - CheckError(lib3mf_object_assignslicestack(m_pHandle, hSliceStackInstance)); + Lib3MFHandle hM01 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm01(m_pHandle, &hM01)); + + if (!hM01) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM01))); } /** - * Method definitions for class CMeshObject - */ - - /** - * CMeshObject::GetVertexCount - Returns the vertex count of a mesh object. - * @return filled with the vertex count. + * CComposeMatrixNode::GetInputM02 - Retrieves the input for the element 0 2 + * @return the input for the m02 element */ - Lib3MF_uint32 CMeshObject::GetVertexCount() + PImplicitPort CComposeMatrixNode::GetInputM02() { - Lib3MF_uint32 resultVertexCount = 0; - CheckError(lib3mf_meshobject_getvertexcount(m_pHandle, &resultVertexCount)); + Lib3MFHandle hM02 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm02(m_pHandle, &hM02)); - return resultVertexCount; + if (!hM02) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM02))); } /** - * CMeshObject::GetTriangleCount - Returns the triangle count of a mesh object. - * @return filled with the triangle count. + * CComposeMatrixNode::GetInputM03 - Retrieves the input for the element 0 3 + * @return the input for the m03 element */ - Lib3MF_uint32 CMeshObject::GetTriangleCount() + PImplicitPort CComposeMatrixNode::GetInputM03() { - Lib3MF_uint32 resultVertexCount = 0; - CheckError(lib3mf_meshobject_gettrianglecount(m_pHandle, &resultVertexCount)); + Lib3MFHandle hM03 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm03(m_pHandle, &hM03)); - return resultVertexCount; + if (!hM03) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM03))); } /** - * CMeshObject::GetVertex - Returns the vertex count of a mesh object. - * @param[in] nIndex - Index of the vertex (0 to vertexcount - 1) - * @return filled with the vertex coordinates. + * CComposeMatrixNode::GetInputM10 - Retrieves the input for the element 1 0 + * @return the input for the m10 element */ - sPosition CMeshObject::GetVertex(const Lib3MF_uint32 nIndex) + PImplicitPort CComposeMatrixNode::GetInputM10() { - sPosition resultCoordinates; - CheckError(lib3mf_meshobject_getvertex(m_pHandle, nIndex, &resultCoordinates)); + Lib3MFHandle hM10 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm10(m_pHandle, &hM10)); - return resultCoordinates; + if (!hM10) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM10))); } /** - * CMeshObject::SetVertex - Sets the coordinates of a single vertex of a mesh object - * @param[in] nIndex - Index of the vertex (0 to vertexcount - 1) - * @param[in] Coordinates - contains the vertex coordinates. + * CComposeMatrixNode::GetInputM11 - Retrieves the input for the element 1 1 + * @return the input for the m11 element */ - void CMeshObject::SetVertex(const Lib3MF_uint32 nIndex, const sPosition & Coordinates) + PImplicitPort CComposeMatrixNode::GetInputM11() { - CheckError(lib3mf_meshobject_setvertex(m_pHandle, nIndex, &Coordinates)); + Lib3MFHandle hM11 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm11(m_pHandle, &hM11)); + + if (!hM11) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM11))); } /** - * CMeshObject::AddVertex - Adds a single vertex to a mesh object - * @param[in] Coordinates - contains the vertex coordinates. - * @return Index of the new vertex + * CComposeMatrixNode::GetInputM12 - Retrieves the input for the element 1 2 + * @return the input for the m12 element */ - Lib3MF_uint32 CMeshObject::AddVertex(const sPosition & Coordinates) + PImplicitPort CComposeMatrixNode::GetInputM12() { - Lib3MF_uint32 resultNewIndex = 0; - CheckError(lib3mf_meshobject_addvertex(m_pHandle, &Coordinates, &resultNewIndex)); + Lib3MFHandle hM12 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm12(m_pHandle, &hM12)); - return resultNewIndex; + if (!hM12) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM12))); } /** - * CMeshObject::GetVertices - Obtains all vertex positions of a mesh object - * @param[out] VerticesBuffer - contains the vertex coordinates. + * CComposeMatrixNode::GetInputM13 - Retrieves the input for the element 1 3 + * @return the input for the m3 element */ - void CMeshObject::GetVertices(std::vector & VerticesBuffer) + PImplicitPort CComposeMatrixNode::GetInputM13() { - Lib3MF_uint64 elementsNeededVertices = 0; - Lib3MF_uint64 elementsWrittenVertices = 0; - CheckError(lib3mf_meshobject_getvertices(m_pHandle, 0, &elementsNeededVertices, nullptr)); - VerticesBuffer.resize((size_t) elementsNeededVertices); - CheckError(lib3mf_meshobject_getvertices(m_pHandle, elementsNeededVertices, &elementsWrittenVertices, VerticesBuffer.data())); + Lib3MFHandle hM13 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm13(m_pHandle, &hM13)); + + if (!hM13) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM13))); } /** - * CMeshObject::GetTriangle - Returns indices of a single triangle of a mesh object. - * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) - * @return filled with the triangle indices. + * CComposeMatrixNode::GetInputM20 - Retrieves the input for the element 2 0 + * @return the input for the m2 element */ - sTriangle CMeshObject::GetTriangle(const Lib3MF_uint32 nIndex) + PImplicitPort CComposeMatrixNode::GetInputM20() { - sTriangle resultIndices; - CheckError(lib3mf_meshobject_gettriangle(m_pHandle, nIndex, &resultIndices)); + Lib3MFHandle hM20 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm20(m_pHandle, &hM20)); - return resultIndices; + if (!hM20) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM20))); } /** - * CMeshObject::SetTriangle - Sets the indices of a single triangle of a mesh object. - * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) - * @param[in] Indices - contains the triangle indices. + * CComposeMatrixNode::GetInputM21 - Retrieves the input for the element 2 1 + * @return */ - void CMeshObject::SetTriangle(const Lib3MF_uint32 nIndex, const sTriangle & Indices) + PImplicitPort CComposeMatrixNode::GetInputM21() { - CheckError(lib3mf_meshobject_settriangle(m_pHandle, nIndex, &Indices)); + Lib3MFHandle hM21 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm21(m_pHandle, &hM21)); + + if (!hM21) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM21))); } /** - * CMeshObject::AddTriangle - Adds a single triangle to a mesh object - * @param[in] Indices - contains the triangle indices. - * @return Index of the new triangle + * CComposeMatrixNode::GetInputM22 - Retrieves the input for the element 2 2 + * @return the input for the m22 element */ - Lib3MF_uint32 CMeshObject::AddTriangle(const sTriangle & Indices) + PImplicitPort CComposeMatrixNode::GetInputM22() { - Lib3MF_uint32 resultNewIndex = 0; - CheckError(lib3mf_meshobject_addtriangle(m_pHandle, &Indices, &resultNewIndex)); + Lib3MFHandle hM22 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm22(m_pHandle, &hM22)); - return resultNewIndex; + if (!hM22) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM22))); } /** - * CMeshObject::GetTriangleIndices - Get all triangles of a mesh object - * @param[out] IndicesBuffer - contains the triangle indices. + * CComposeMatrixNode::GetInputM23 - Retrieves the input for the element 2 3 + * @return the input for the m23 element */ - void CMeshObject::GetTriangleIndices(std::vector & IndicesBuffer) + PImplicitPort CComposeMatrixNode::GetInputM23() { - Lib3MF_uint64 elementsNeededIndices = 0; - Lib3MF_uint64 elementsWrittenIndices = 0; - CheckError(lib3mf_meshobject_gettriangleindices(m_pHandle, 0, &elementsNeededIndices, nullptr)); - IndicesBuffer.resize((size_t) elementsNeededIndices); - CheckError(lib3mf_meshobject_gettriangleindices(m_pHandle, elementsNeededIndices, &elementsWrittenIndices, IndicesBuffer.data())); + Lib3MFHandle hM23 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm23(m_pHandle, &hM23)); + + if (!hM23) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM23))); } /** - * CMeshObject::SetObjectLevelProperty - Sets the property at the object-level of the mesh object. - * @param[in] nUniqueResourceID - the object-level Property UniqueResourceID. - * @param[in] nPropertyID - the object-level PropertyID. + * CComposeMatrixNode::GetInputM30 - Retrieves the input for the element 3 0 + * @return the input for the m30 element */ - void CMeshObject::SetObjectLevelProperty(const Lib3MF_uint32 nUniqueResourceID, const Lib3MF_uint32 nPropertyID) + PImplicitPort CComposeMatrixNode::GetInputM30() { - CheckError(lib3mf_meshobject_setobjectlevelproperty(m_pHandle, nUniqueResourceID, nPropertyID)); + Lib3MFHandle hM30 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm30(m_pHandle, &hM30)); + + if (!hM30) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM30))); } - /** - * CMeshObject::GetObjectLevelProperty - Gets the property at the object-level of the mesh object. - * @param[out] nUniqueResourceID - the object-level Property UniqueResourceID. - * @param[out] nPropertyID - the object-level PropertyID. - * @return Has an object-level property been specified? + /** + * CComposeMatrixNode::GetInputM31 - Retrieves the input for the element 3 1 + * @return the input for the m31 element */ - bool CMeshObject::GetObjectLevelProperty(Lib3MF_uint32 & nUniqueResourceID, Lib3MF_uint32 & nPropertyID) + PImplicitPort CComposeMatrixNode::GetInputM31() { - bool resultHasObjectLevelProperty = 0; - CheckError(lib3mf_meshobject_getobjectlevelproperty(m_pHandle, &nUniqueResourceID, &nPropertyID, &resultHasObjectLevelProperty)); + Lib3MFHandle hM31 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm31(m_pHandle, &hM31)); - return resultHasObjectLevelProperty; + if (!hM31) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM31))); } /** - * CMeshObject::SetTriangleProperties - Sets the properties of a single triangle of a mesh object. - * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) - * @param[in] Properties - contains the triangle properties. + * CComposeMatrixNode::GetInputM32 - Retrieves the input for the element 3 2 + * @return the input for the m32 element */ - void CMeshObject::SetTriangleProperties(const Lib3MF_uint32 nIndex, const sTriangleProperties & Properties) + PImplicitPort CComposeMatrixNode::GetInputM32() { - CheckError(lib3mf_meshobject_settriangleproperties(m_pHandle, nIndex, &Properties)); + Lib3MFHandle hM32 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm32(m_pHandle, &hM32)); + + if (!hM32) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM32))); } /** - * CMeshObject::GetTriangleProperties - Gets the properties of a single triangle of a mesh object. - * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) - * @param[out] Property - returns the triangle properties. + * CComposeMatrixNode::GetInputM33 - Retrieves the input for the element 3 3 + * @return the input for the m33 element */ - void CMeshObject::GetTriangleProperties(const Lib3MF_uint32 nIndex, sTriangleProperties & Property) + PImplicitPort CComposeMatrixNode::GetInputM33() { - CheckError(lib3mf_meshobject_gettriangleproperties(m_pHandle, nIndex, &Property)); + Lib3MFHandle hM33 = nullptr; + CheckError(lib3mf_composematrixnode_getinputm33(m_pHandle, &hM33)); + + if (!hM33) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM33))); } /** - * CMeshObject::SetAllTriangleProperties - Sets the properties of all triangles of a mesh object. Sets the object level property to the first entry of the passed triangle properties, if not yet specified. - * @param[in] PropertiesArrayBuffer - contains the triangle properties array. Must have trianglecount elements. + * CComposeMatrixNode::GetOutputResult - Retrieves the output + * @return the output */ - void CMeshObject::SetAllTriangleProperties(const CInputVector & PropertiesArrayBuffer) + PImplicitPort CComposeMatrixNode::GetOutputResult() { - CheckError(lib3mf_meshobject_setalltriangleproperties(m_pHandle, (Lib3MF_uint64)PropertiesArrayBuffer.size(), PropertiesArrayBuffer.data())); + Lib3MFHandle hResult = nullptr; + CheckError(lib3mf_composematrixnode_getoutputresult(m_pHandle, &hResult)); + + if (!hResult) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); } /** - * CMeshObject::GetAllTriangleProperties - Gets the properties of all triangles of a mesh object. - * @param[out] PropertiesArrayBuffer - returns the triangle properties array. Must have trianglecount elements. + * Method definitions for class CMatrixFromRowsNode + */ + + /** + * CMatrixFromRowsNode::GetInputA - Retrieves the input for the first row + * @return the input for the first row */ - void CMeshObject::GetAllTriangleProperties(std::vector & PropertiesArrayBuffer) + PImplicitPort CMatrixFromRowsNode::GetInputA() { - Lib3MF_uint64 elementsNeededPropertiesArray = 0; - Lib3MF_uint64 elementsWrittenPropertiesArray = 0; - CheckError(lib3mf_meshobject_getalltriangleproperties(m_pHandle, 0, &elementsNeededPropertiesArray, nullptr)); - PropertiesArrayBuffer.resize((size_t) elementsNeededPropertiesArray); - CheckError(lib3mf_meshobject_getalltriangleproperties(m_pHandle, elementsNeededPropertiesArray, &elementsWrittenPropertiesArray, PropertiesArrayBuffer.data())); + Lib3MFHandle hRow0 = nullptr; + CheckError(lib3mf_matrixfromrowsnode_getinputa(m_pHandle, &hRow0)); + + if (!hRow0) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hRow0))); } /** - * CMeshObject::ClearAllProperties - Clears all properties of this mesh object (triangle and object-level). + * CMatrixFromRowsNode::GetInputB - Retrieves the input for the second row + * @return the input for the second row */ - void CMeshObject::ClearAllProperties() + PImplicitPort CMatrixFromRowsNode::GetInputB() { - CheckError(lib3mf_meshobject_clearallproperties(m_pHandle)); + Lib3MFHandle hRow1 = nullptr; + CheckError(lib3mf_matrixfromrowsnode_getinputb(m_pHandle, &hRow1)); + + if (!hRow1) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hRow1))); } /** - * CMeshObject::SetGeometry - Set all triangles of a mesh object - * @param[in] VerticesBuffer - contains the positions. - * @param[in] IndicesBuffer - contains the triangle indices. + * CMatrixFromRowsNode::GetInputC - Retrieves the input for the third row + * @return the input for the third row */ - void CMeshObject::SetGeometry(const CInputVector & VerticesBuffer, const CInputVector & IndicesBuffer) + PImplicitPort CMatrixFromRowsNode::GetInputC() { - CheckError(lib3mf_meshobject_setgeometry(m_pHandle, (Lib3MF_uint64)VerticesBuffer.size(), VerticesBuffer.data(), (Lib3MF_uint64)IndicesBuffer.size(), IndicesBuffer.data())); + Lib3MFHandle hRow2 = nullptr; + CheckError(lib3mf_matrixfromrowsnode_getinputc(m_pHandle, &hRow2)); + + if (!hRow2) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hRow2))); } /** - * CMeshObject::IsManifoldAndOriented - Retrieves, if an object describes a topologically oriented and manifold mesh, according to the core spec. - * @return returns, if the object is oriented and manifold. + * CMatrixFromRowsNode::GetInputD - Retrieves the input for the fourth row + * @return the input for the fourth row */ - bool CMeshObject::IsManifoldAndOriented() + PImplicitPort CMatrixFromRowsNode::GetInputD() { - bool resultIsManifoldAndOriented = 0; - CheckError(lib3mf_meshobject_ismanifoldandoriented(m_pHandle, &resultIsManifoldAndOriented)); + Lib3MFHandle hRow3 = nullptr; + CheckError(lib3mf_matrixfromrowsnode_getinputd(m_pHandle, &hRow3)); - return resultIsManifoldAndOriented; + if (!hRow3) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hRow3))); } /** - * CMeshObject::BeamLattice - Retrieves the BeamLattice within this MeshObject. - * @return the BeamLattice within this MeshObject + * CMatrixFromRowsNode::GetOutputResult - Retrieves the output + * @return the output */ - PBeamLattice CMeshObject::BeamLattice() + PImplicitPort CMatrixFromRowsNode::GetOutputResult() { - Lib3MFHandle hTheBeamLattice = nullptr; - CheckError(lib3mf_meshobject_beamlattice(m_pHandle, &hTheBeamLattice)); + Lib3MFHandle hResult = nullptr; + CheckError(lib3mf_matrixfromrowsnode_getoutputresult(m_pHandle, &hResult)); - if (!hTheBeamLattice) { + if (!hResult) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheBeamLattice))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); } /** - * Method definitions for class CBeamLattice + * Method definitions for class CMatrixFromColumnsNode */ /** - * CBeamLattice::GetMinLength - Returns the minimal length of beams for the beamlattice. - * @return minimal length of beams for the beamlattice + * CMatrixFromColumnsNode::GetInputA - Retrieves the input for the first column + * @return the input for the first column */ - Lib3MF_double CBeamLattice::GetMinLength() + PImplicitPort CMatrixFromColumnsNode::GetInputA() { - Lib3MF_double resultMinLength = 0; - CheckError(lib3mf_beamlattice_getminlength(m_pHandle, &resultMinLength)); + Lib3MFHandle hColumn0 = nullptr; + CheckError(lib3mf_matrixfromcolumnsnode_getinputa(m_pHandle, &hColumn0)); - return resultMinLength; + if (!hColumn0) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hColumn0))); } /** - * CBeamLattice::SetMinLength - Sets the minimal length of beams for the beamlattice. - * @param[in] dMinLength - minimal length of beams for the beamlattice + * CMatrixFromColumnsNode::GetInputB - Retrieves the input for the second column + * @return the input for the second column */ - void CBeamLattice::SetMinLength(const Lib3MF_double dMinLength) + PImplicitPort CMatrixFromColumnsNode::GetInputB() { - CheckError(lib3mf_beamlattice_setminlength(m_pHandle, dMinLength)); + Lib3MFHandle hColumn1 = nullptr; + CheckError(lib3mf_matrixfromcolumnsnode_getinputb(m_pHandle, &hColumn1)); + + if (!hColumn1) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hColumn1))); } /** - * CBeamLattice::GetClipping - Returns the clipping mode and the clipping-mesh for the beamlattice of this mesh. - * @param[out] eClipMode - contains the clip mode of this mesh - * @param[out] nUniqueResourceID - filled with the UniqueResourceID of the clipping mesh-object or an undefined value if pClipMode is MODELBEAMLATTICECLIPMODE_NONE + * CMatrixFromColumnsNode::GetInputC - Retrieves the input for the third column + * @return the input for the third column */ - void CBeamLattice::GetClipping(eBeamLatticeClipMode & eClipMode, Lib3MF_uint32 & nUniqueResourceID) + PImplicitPort CMatrixFromColumnsNode::GetInputC() { - CheckError(lib3mf_beamlattice_getclipping(m_pHandle, &eClipMode, &nUniqueResourceID)); + Lib3MFHandle hColumn2 = nullptr; + CheckError(lib3mf_matrixfromcolumnsnode_getinputc(m_pHandle, &hColumn2)); + + if (!hColumn2) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hColumn2))); } /** - * CBeamLattice::SetClipping - Sets the clipping mode and the clipping-mesh for the beamlattice of this mesh. - * @param[in] eClipMode - contains the clip mode of this mesh - * @param[in] nUniqueResourceID - the UniqueResourceID of the clipping mesh-object. This mesh-object has to be defined before setting the Clipping. + * CMatrixFromColumnsNode::GetInputD - Retrieves the input for the fourth column + * @return the input for the fourth column */ - void CBeamLattice::SetClipping(const eBeamLatticeClipMode eClipMode, const Lib3MF_uint32 nUniqueResourceID) + PImplicitPort CMatrixFromColumnsNode::GetInputD() { - CheckError(lib3mf_beamlattice_setclipping(m_pHandle, eClipMode, nUniqueResourceID)); + Lib3MFHandle hColumn3 = nullptr; + CheckError(lib3mf_matrixfromcolumnsnode_getinputd(m_pHandle, &hColumn3)); + + if (!hColumn3) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hColumn3))); } /** - * CBeamLattice::GetRepresentation - Returns the representation-mesh for the beamlattice of this mesh. - * @return flag whether the beamlattice has a representation mesh. - * @param[out] nUniqueResourceID - filled with the UniqueResourceID of the clipping mesh-object. + * CMatrixFromColumnsNode::GetOutputResult - Retrieves the output + * @return the output */ - bool CBeamLattice::GetRepresentation(Lib3MF_uint32 & nUniqueResourceID) + PImplicitPort CMatrixFromColumnsNode::GetOutputResult() { - bool resultHasRepresentation = 0; - CheckError(lib3mf_beamlattice_getrepresentation(m_pHandle, &resultHasRepresentation, &nUniqueResourceID)); + Lib3MFHandle hResult = nullptr; + CheckError(lib3mf_matrixfromcolumnsnode_getoutputresult(m_pHandle, &hResult)); - return resultHasRepresentation; + if (!hResult) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); } /** - * CBeamLattice::SetRepresentation - Sets the representation-mesh for the beamlattice of this mesh. - * @param[in] nUniqueResourceID - the UniqueResourceID of the representation mesh-object. This mesh-object has to be defined before setting the representation. - */ - void CBeamLattice::SetRepresentation(const Lib3MF_uint32 nUniqueResourceID) - { - CheckError(lib3mf_beamlattice_setrepresentation(m_pHandle, nUniqueResourceID)); - } + * Method definitions for class CConstantNode + */ /** - * CBeamLattice::GetBallOptions - Returns the ball mode and the default ball radius for the beamlattice of this mesh. - * @param[out] eBallMode - contains the ball mode of this mesh - * @param[out] dBallRadius - default ball radius of balls for the beamlattice + * CConstantNode::SetConstant - Sets the constant value of the node + * @param[in] dValue - the value */ - void CBeamLattice::GetBallOptions(eBeamLatticeBallMode & eBallMode, Lib3MF_double & dBallRadius) + void CConstantNode::SetConstant(const Lib3MF_double dValue) { - CheckError(lib3mf_beamlattice_getballoptions(m_pHandle, &eBallMode, &dBallRadius)); + CheckError(lib3mf_constantnode_setconstant(m_pHandle, dValue)); } /** - * CBeamLattice::SetBallOptions - Sets the ball mode and thedefault ball radius for the beamlattice. - * @param[in] eBallMode - contains the ball mode of this mesh - * @param[in] dBallRadius - default ball radius of balls for the beamlattice + * CConstantNode::GetConstant - Retrieves the constant value of the node + * @return the value */ - void CBeamLattice::SetBallOptions(const eBeamLatticeBallMode eBallMode, const Lib3MF_double dBallRadius) + Lib3MF_double CConstantNode::GetConstant() { - CheckError(lib3mf_beamlattice_setballoptions(m_pHandle, eBallMode, dBallRadius)); + Lib3MF_double resultValue = 0; + CheckError(lib3mf_constantnode_getconstant(m_pHandle, &resultValue)); + + return resultValue; } /** - * CBeamLattice::GetBeamCount - Returns the beam count of a mesh object. - * @return filled with the beam count. + * CConstantNode::GetOutputValue - Retrieves the output + * @return the output */ - Lib3MF_uint32 CBeamLattice::GetBeamCount() + PImplicitPort CConstantNode::GetOutputValue() { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_beamlattice_getbeamcount(m_pHandle, &resultCount)); + Lib3MFHandle hValue = nullptr; + CheckError(lib3mf_constantnode_getoutputvalue(m_pHandle, &hValue)); - return resultCount; + if (!hValue) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hValue))); } /** - * CBeamLattice::GetBeam - Returns indices, radii and capmodes of a single beam of a mesh object. - * @param[in] nIndex - Index of the beam (0 to beamcount - 1). - * @return filled with the beam indices, radii and capmodes. + * Method definitions for class CConstVecNode + */ + + /** + * CConstVecNode::SetVector - Sets the vector value of the node + * @param[in] Value - the value */ - sBeam CBeamLattice::GetBeam(const Lib3MF_uint32 nIndex) + void CConstVecNode::SetVector(const sVector & Value) { - sBeam resultBeamInfo; - CheckError(lib3mf_beamlattice_getbeam(m_pHandle, nIndex, &resultBeamInfo)); - - return resultBeamInfo; + CheckError(lib3mf_constvecnode_setvector(m_pHandle, &Value)); } /** - * CBeamLattice::AddBeam - Adds a single beam to a mesh object. - * @param[in] BeamInfo - contains the node indices, radii and capmodes. - * @return filled with the new Index of the beam. + * CConstVecNode::GetVector - Retrieves the vector value of the node + * @return the value */ - Lib3MF_uint32 CBeamLattice::AddBeam(const sBeam & BeamInfo) + sVector CConstVecNode::GetVector() { - Lib3MF_uint32 resultIndex = 0; - CheckError(lib3mf_beamlattice_addbeam(m_pHandle, &BeamInfo, &resultIndex)); + sVector resultValue; + CheckError(lib3mf_constvecnode_getvector(m_pHandle, &resultValue)); - return resultIndex; + return resultValue; } /** - * CBeamLattice::SetBeam - Sets the indices, radii and capmodes of a single beam of a mesh object. - * @param[in] nIndex - Index of the beam (0 to beamcount - 1). - * @param[in] BeamInfo - filled with the beam indices, radii and capmodes. + * CConstVecNode::GetOutputVector - Retrieves the output + * @return the output */ - void CBeamLattice::SetBeam(const Lib3MF_uint32 nIndex, const sBeam & BeamInfo) + PImplicitPort CConstVecNode::GetOutputVector() { - CheckError(lib3mf_beamlattice_setbeam(m_pHandle, nIndex, &BeamInfo)); + Lib3MFHandle hVector = nullptr; + CheckError(lib3mf_constvecnode_getoutputvector(m_pHandle, &hVector)); + + if (!hVector) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hVector))); } /** - * CBeamLattice::SetBeams - Sets all beam indices, radii and capmodes of a mesh object. - * @param[in] BeamInfoBuffer - contains information of a number of beams - */ - void CBeamLattice::SetBeams(const CInputVector & BeamInfoBuffer) - { - CheckError(lib3mf_beamlattice_setbeams(m_pHandle, (Lib3MF_uint64)BeamInfoBuffer.size(), BeamInfoBuffer.data())); - } + * Method definitions for class CConstMatNode + */ /** - * CBeamLattice::GetBeams - obtains all beam indices, radii and capmodes of a mesh object. - * @param[out] BeamInfoBuffer - contains information of all beams + * CConstMatNode::SetMatrix - Sets the matrix value of the node + * @param[in] Value - the value */ - void CBeamLattice::GetBeams(std::vector & BeamInfoBuffer) + void CConstMatNode::SetMatrix(const sMatrix4x4 & Value) { - Lib3MF_uint64 elementsNeededBeamInfo = 0; - Lib3MF_uint64 elementsWrittenBeamInfo = 0; - CheckError(lib3mf_beamlattice_getbeams(m_pHandle, 0, &elementsNeededBeamInfo, nullptr)); - BeamInfoBuffer.resize((size_t) elementsNeededBeamInfo); - CheckError(lib3mf_beamlattice_getbeams(m_pHandle, elementsNeededBeamInfo, &elementsWrittenBeamInfo, BeamInfoBuffer.data())); + CheckError(lib3mf_constmatnode_setmatrix(m_pHandle, &Value)); } /** - * CBeamLattice::GetBallCount - Returns the ball count of a mesh object. - * @return filled with the ball count. + * CConstMatNode::GetMatrix - Retrieves the matrix value of the node + * @return the matrix */ - Lib3MF_uint32 CBeamLattice::GetBallCount() + sMatrix4x4 CConstMatNode::GetMatrix() { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_beamlattice_getballcount(m_pHandle, &resultCount)); + sMatrix4x4 resultValue; + CheckError(lib3mf_constmatnode_getmatrix(m_pHandle, &resultValue)); - return resultCount; + return resultValue; } /** - * CBeamLattice::GetBall - Returns index and radius of a single ball of a mesh object. - * @param[in] nIndex - Index of the ball (0 to ballcount - 1). - * @return filled with the ball node index and radius. + * CConstMatNode::GetOutputMatrix - Retrieves the output + * @return the output */ - sBall CBeamLattice::GetBall(const Lib3MF_uint32 nIndex) + PImplicitPort CConstMatNode::GetOutputMatrix() { - sBall resultBallInfo; - CheckError(lib3mf_beamlattice_getball(m_pHandle, nIndex, &resultBallInfo)); + Lib3MFHandle hMatrix = nullptr; + CheckError(lib3mf_constmatnode_getoutputmatrix(m_pHandle, &hMatrix)); - return resultBallInfo; + if (!hMatrix) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMatrix))); } /** - * CBeamLattice::AddBall - Adds a single ball to a mesh object. - * @param[in] BallInfo - contains the node index and radius. - * @return filled with the new Index of the ball. + * Method definitions for class CMeshNode + */ + + /** + * CMeshNode::GetInputMesh - Retrieves the input for the model resource id of the mesh + * @return the input port for the model resource id of the mesh */ - Lib3MF_uint32 CBeamLattice::AddBall(const sBall & BallInfo) + PImplicitPort CMeshNode::GetInputMesh() { - Lib3MF_uint32 resultIndex = 0; - CheckError(lib3mf_beamlattice_addball(m_pHandle, &BallInfo, &resultIndex)); + Lib3MFHandle hMesh = nullptr; + CheckError(lib3mf_meshnode_getinputmesh(m_pHandle, &hMesh)); - return resultIndex; + if (!hMesh) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMesh))); } /** - * CBeamLattice::SetBall - Sets the index and radius of a single ball of a mesh object. - * @param[in] nIndex - Index of the ball (0 to ballcount - 1). - * @param[in] BallInfo - filled with the ball node index and radius. + * CMeshNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position */ - void CBeamLattice::SetBall(const Lib3MF_uint32 nIndex, const sBall & BallInfo) + PImplicitPort CMeshNode::GetInputPos() { - CheckError(lib3mf_beamlattice_setball(m_pHandle, nIndex, &BallInfo)); + Lib3MFHandle hPos = nullptr; + CheckError(lib3mf_meshnode_getinputpos(m_pHandle, &hPos)); + + if (!hPos) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPos))); } /** - * CBeamLattice::SetBalls - Sets all ball indices and radii of a mesh object. - * @param[in] BallInfoBuffer - contains information of a number of balls + * CMeshNode::GetOutputDistance - Retrieves the output + * @return the output port for the signed distance to the mesh */ - void CBeamLattice::SetBalls(const CInputVector & BallInfoBuffer) + PImplicitPort CMeshNode::GetOutputDistance() { - CheckError(lib3mf_beamlattice_setballs(m_pHandle, (Lib3MF_uint64)BallInfoBuffer.size(), BallInfoBuffer.data())); + Lib3MFHandle hDistance = nullptr; + CheckError(lib3mf_meshnode_getoutputdistance(m_pHandle, &hDistance)); + + if (!hDistance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hDistance))); } /** - * CBeamLattice::GetBalls - obtains all ball indices and radii of a mesh object. - * @param[out] BallInfoBuffer - contains information of all balls - */ - void CBeamLattice::GetBalls(std::vector & BallInfoBuffer) - { - Lib3MF_uint64 elementsNeededBallInfo = 0; - Lib3MF_uint64 elementsWrittenBallInfo = 0; - CheckError(lib3mf_beamlattice_getballs(m_pHandle, 0, &elementsNeededBallInfo, nullptr)); - BallInfoBuffer.resize((size_t) elementsNeededBallInfo); - CheckError(lib3mf_beamlattice_getballs(m_pHandle, elementsNeededBallInfo, &elementsWrittenBallInfo, BallInfoBuffer.data())); - } + * Method definitions for class CUnsignedMeshNode + */ /** - * CBeamLattice::GetBeamSetCount - Returns the number of beamsets of a mesh object. - * @return filled with the beamset count. + * CUnsignedMeshNode::GetInputMesh - Retrieves the input for the model resource id of the mesh + * @return the input port for the model resource id of the mesh */ - Lib3MF_uint32 CBeamLattice::GetBeamSetCount() + PImplicitPort CUnsignedMeshNode::GetInputMesh() { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_beamlattice_getbeamsetcount(m_pHandle, &resultCount)); + Lib3MFHandle hMesh = nullptr; + CheckError(lib3mf_unsignedmeshnode_getinputmesh(m_pHandle, &hMesh)); - return resultCount; + if (!hMesh) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMesh))); } /** - * CBeamLattice::AddBeamSet - Adds an empty beamset to a mesh object - * @return the new beamset + * CUnsignedMeshNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position */ - PBeamSet CBeamLattice::AddBeamSet() + PImplicitPort CUnsignedMeshNode::GetInputPos() { - Lib3MFHandle hBeamSet = nullptr; - CheckError(lib3mf_beamlattice_addbeamset(m_pHandle, &hBeamSet)); + Lib3MFHandle hPos = nullptr; + CheckError(lib3mf_unsignedmeshnode_getinputpos(m_pHandle, &hPos)); - if (!hBeamSet) { + if (!hPos) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBeamSet))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPos))); } /** - * CBeamLattice::GetBeamSet - Returns a beamset of a mesh object - * @param[in] nIndex - index of the requested beamset (0 ... beamsetcount-1). - * @return the requested beamset + * CUnsignedMeshNode::GetOutputDistance - Retrieves the output + * @return the output port for the unsigned distance to the mesh */ - PBeamSet CBeamLattice::GetBeamSet(const Lib3MF_uint32 nIndex) + PImplicitPort CUnsignedMeshNode::GetOutputDistance() { - Lib3MFHandle hBeamSet = nullptr; - CheckError(lib3mf_beamlattice_getbeamset(m_pHandle, nIndex, &hBeamSet)); + Lib3MFHandle hDistance = nullptr; + CheckError(lib3mf_unsignedmeshnode_getoutputdistance(m_pHandle, &hDistance)); - if (!hBeamSet) { + if (!hDistance) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBeamSet))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hDistance))); } /** - * Method definitions for class CComponent + * Method definitions for class CFunctionCallNode */ /** - * CComponent::GetObjectResource - Returns the Resource Instance of the component. - * @return filled with the Resource Instance. + * CFunctionCallNode::GetInputFunctionID - Retrieves the input for the function id + * @return the input port for the function */ - PObject CComponent::GetObjectResource() + PImplicitPort CFunctionCallNode::GetInputFunctionID() { - Lib3MFHandle hObjectResource = nullptr; - CheckError(lib3mf_component_getobjectresource(m_pHandle, &hObjectResource)); + Lib3MFHandle hFunction = nullptr; + CheckError(lib3mf_functioncallnode_getinputfunctionid(m_pHandle, &hFunction)); - if (!hObjectResource) { + if (!hFunction) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hObjectResource))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hFunction))); } /** - * CComponent::GetObjectResourceID - Returns the UniqueResourceID of the component. - * @return returns the UniqueResourceID. + * Method definitions for class CNodeIterator + */ + + /** + * CNodeIterator::GetCurrent - Returns the current element + * @return The current element */ - Lib3MF_uint32 CComponent::GetObjectResourceID() + PImplicitNode CNodeIterator::GetCurrent() { - Lib3MF_uint32 resultUniqueResourceID = 0; - CheckError(lib3mf_component_getobjectresourceid(m_pHandle, &resultUniqueResourceID)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_nodeiterator_getcurrent(m_pHandle, &hNode)); - return resultUniqueResourceID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CComponent::GetUUID - returns, whether a component has a UUID and, if true, the component's UUID - * @param[out] bHasUUID - flag whether the component has a UUID - * @return the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * Method definitions for class CFunction + */ + + /** + * CFunction::GetDisplayName - Retrieves the display name of the function + * @return the display name */ - std::string CComponent::GetUUID(bool & bHasUUID) + std::string CFunction::GetDisplayName() { - Lib3MF_uint32 bytesNeededUUID = 0; - Lib3MF_uint32 bytesWrittenUUID = 0; - CheckError(lib3mf_component_getuuid(m_pHandle, &bHasUUID, 0, &bytesNeededUUID, nullptr)); - std::vector bufferUUID(bytesNeededUUID); - CheckError(lib3mf_component_getuuid(m_pHandle, &bHasUUID, bytesNeededUUID, &bytesWrittenUUID, &bufferUUID[0])); + Lib3MF_uint32 bytesNeededDisplayName = 0; + Lib3MF_uint32 bytesWrittenDisplayName = 0; + CheckError(lib3mf_function_getdisplayname(m_pHandle, 0, &bytesNeededDisplayName, nullptr)); + std::vector bufferDisplayName(bytesNeededDisplayName); + CheckError(lib3mf_function_getdisplayname(m_pHandle, bytesNeededDisplayName, &bytesWrittenDisplayName, &bufferDisplayName[0])); - return std::string(&bufferUUID[0]); + return std::string(&bufferDisplayName[0]); } /** - * CComponent::SetUUID - sets the component's UUID - * @param[in] sUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * CFunction::SetDisplayName - Sets the display name of the function + * @param[in] sDisplayName - the display name */ - void CComponent::SetUUID(const std::string & sUUID) + void CFunction::SetDisplayName(const std::string & sDisplayName) { - CheckError(lib3mf_component_setuuid(m_pHandle, sUUID.c_str())); + CheckError(lib3mf_function_setdisplayname(m_pHandle, sDisplayName.c_str())); } /** - * CComponent::HasTransform - Returns, if the component has a different transformation than the identity matrix - * @return if true is returned, the transformation is not equal than the identity + * CFunction::AddInput - Add an input + * @param[in] sIdentifier - the identifier of the input + * @param[in] sDisplayName - the display name of the input + * @param[in] eType - the type of the input + * @return The added input port */ - bool CComponent::HasTransform() + PImplicitPort CFunction::AddInput(const std::string & sIdentifier, const std::string & sDisplayName, const eImplicitPortType eType) { - bool resultHasTransform = 0; - CheckError(lib3mf_component_hastransform(m_pHandle, &resultHasTransform)); + Lib3MFHandle hPort = nullptr; + CheckError(lib3mf_function_addinput(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), eType, &hPort)); - return resultHasTransform; + if (!hPort) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPort))); } /** - * CComponent::GetTransform - Returns the transformation matrix of the component. - * @return filled with the component transformation matrix + * CFunction::GetInputs - Retrieves the inputs + * @return iterator for the list of inputs */ - sTransform CComponent::GetTransform() + PImplicitPortIterator CFunction::GetInputs() { - sTransform resultTransform; - CheckError(lib3mf_component_gettransform(m_pHandle, &resultTransform)); + Lib3MFHandle hIterator = nullptr; + CheckError(lib3mf_function_getinputs(m_pHandle, &hIterator)); - return resultTransform; + if (!hIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hIterator))); } /** - * CComponent::SetTransform - Sets the transformation matrix of the component. - * @param[in] Transform - new transformation matrix + * CFunction::RemoveInput - Removes an input + * @param[in] pInput - The input to be removed */ - void CComponent::SetTransform(const sTransform & Transform) + void CFunction::RemoveInput(classParam pInput) { - CheckError(lib3mf_component_settransform(m_pHandle, &Transform)); + Lib3MFHandle hInput = pInput.GetHandle(); + CheckError(lib3mf_function_removeinput(m_pHandle, hInput)); } /** - * Method definitions for class CComponentsObject - */ - - /** - * CComponentsObject::AddComponent - Adds a new component to a components object. - * @param[in] pObjectResource - object to add as component. Must not lead to circular references! - * @param[in] Transform - optional transform matrix for the component. - * @return new component instance + * CFunction::AddOutput - Add an output + * @param[in] sIdentifier - the identifier of the output + * @param[in] sDisplayName - the display name of the output + * @param[in] eType - the type of the input + * @return The added input port */ - PComponent CComponentsObject::AddComponent(classParam pObjectResource, const sTransform & Transform) + PImplicitPort CFunction::AddOutput(const std::string & sIdentifier, const std::string & sDisplayName, const eImplicitPortType eType) { - Lib3MFHandle hObjectResource = pObjectResource.GetHandle(); - Lib3MFHandle hComponentInstance = nullptr; - CheckError(lib3mf_componentsobject_addcomponent(m_pHandle, hObjectResource, &Transform, &hComponentInstance)); + Lib3MFHandle hPort = nullptr; + CheckError(lib3mf_function_addoutput(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), eType, &hPort)); - if (!hComponentInstance) { + if (!hPort) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hComponentInstance))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPort))); } /** - * CComponentsObject::GetComponent - Retrieves a component from a component object. - * @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) - * @return component instance + * CFunction::GetOutputs - Retrieves the outputs + * @return iterator for the outputs */ - PComponent CComponentsObject::GetComponent(const Lib3MF_uint32 nIndex) + PImplicitPortIterator CFunction::GetOutputs() { - Lib3MFHandle hComponentInstance = nullptr; - CheckError(lib3mf_componentsobject_getcomponent(m_pHandle, nIndex, &hComponentInstance)); + Lib3MFHandle hIterator = nullptr; + CheckError(lib3mf_function_getoutputs(m_pHandle, &hIterator)); - if (!hComponentInstance) { + if (!hIterator) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hComponentInstance))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hIterator))); } /** - * CComponentsObject::GetComponentCount - Retrieves a component count of a component object. - * @return returns the component count + * CFunction::RemoveOutput - Removes an output + * @param[in] pOutput - The output to be removed */ - Lib3MF_uint32 CComponentsObject::GetComponentCount() + void CFunction::RemoveOutput(classParam pOutput) { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_componentsobject_getcomponentcount(m_pHandle, &resultCount)); - - return resultCount; + Lib3MFHandle hOutput = pOutput.GetHandle(); + CheckError(lib3mf_function_removeoutput(m_pHandle, hOutput)); } /** - * Method definitions for class CBeamSet - */ - - /** - * CBeamSet::SetName - Sets a beamset's name string - * @param[in] sName - new name of the beamset. + * CFunction::FindInput - Retrieves an input + * @param[in] sIdentifier - the identifier of the input + * @return the input port */ - void CBeamSet::SetName(const std::string & sName) + PImplicitPort CFunction::FindInput(const std::string & sIdentifier) { - CheckError(lib3mf_beamset_setname(m_pHandle, sName.c_str())); + Lib3MFHandle hInput = nullptr; + CheckError(lib3mf_function_findinput(m_pHandle, sIdentifier.c_str(), &hInput)); + + if (!hInput) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hInput))); } /** - * CBeamSet::GetName - Retrieves a beamset's name string - * @return returns the name of the beamset. + * CFunction::FindOutput - Retrieves an output + * @param[in] sIdentifier - the identifier of the output + * @return the output port */ - std::string CBeamSet::GetName() + PImplicitPort CFunction::FindOutput(const std::string & sIdentifier) { - Lib3MF_uint32 bytesNeededName = 0; - Lib3MF_uint32 bytesWrittenName = 0; - CheckError(lib3mf_beamset_getname(m_pHandle, 0, &bytesNeededName, nullptr)); - std::vector bufferName(bytesNeededName); - CheckError(lib3mf_beamset_getname(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); + Lib3MFHandle hOutput = nullptr; + CheckError(lib3mf_function_findoutput(m_pHandle, sIdentifier.c_str(), &hOutput)); - return std::string(&bufferName[0]); + if (!hOutput) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hOutput))); } /** - * CBeamSet::SetIdentifier - Sets a beamset's identifier string - * @param[in] sIdentifier - new name of the beamset. - */ - void CBeamSet::SetIdentifier(const std::string & sIdentifier) - { - CheckError(lib3mf_beamset_setidentifier(m_pHandle, sIdentifier.c_str())); - } + * Method definitions for class CImplicitFunction + */ /** - * CBeamSet::GetIdentifier - Retrieves a beamset's identifier string - * @return returns the identifier of the beamset. + * CImplicitFunction::GetIdentifier - Retrieves the identifier of the function + * @return the identifier */ - std::string CBeamSet::GetIdentifier() + std::string CImplicitFunction::GetIdentifier() { Lib3MF_uint32 bytesNeededIdentifier = 0; Lib3MF_uint32 bytesWrittenIdentifier = 0; - CheckError(lib3mf_beamset_getidentifier(m_pHandle, 0, &bytesNeededIdentifier, nullptr)); + CheckError(lib3mf_implicitfunction_getidentifier(m_pHandle, 0, &bytesNeededIdentifier, nullptr)); std::vector bufferIdentifier(bytesNeededIdentifier); - CheckError(lib3mf_beamset_getidentifier(m_pHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0])); + CheckError(lib3mf_implicitfunction_getidentifier(m_pHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0])); return std::string(&bufferIdentifier[0]); } /** - * CBeamSet::GetReferenceCount - Retrieves the reference count of a beamset - * @return returns the reference count + * CImplicitFunction::SetIdentifier - Sets the identifier of the function + * @param[in] sIdentifier - the identifier */ - Lib3MF_uint32 CBeamSet::GetReferenceCount() + void CImplicitFunction::SetIdentifier(const std::string & sIdentifier) { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_beamset_getreferencecount(m_pHandle, &resultCount)); - - return resultCount; + CheckError(lib3mf_implicitfunction_setidentifier(m_pHandle, sIdentifier.c_str())); } /** - * CBeamSet::SetReferences - Sets the references of a beamset - * @param[in] ReferencesBuffer - the new indices of all beams in this beamset + * CImplicitFunction::AddNode - Add a node + * @param[in] eNodeType - the type of the node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBeamSet::SetReferences(const CInputVector & ReferencesBuffer) + PImplicitNode CImplicitFunction::AddNode(const eImplicitNodeType eNodeType, const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_beamset_setreferences(m_pHandle, (Lib3MF_uint64)ReferencesBuffer.size(), ReferencesBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addnode(m_pHandle, eNodeType, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBeamSet::GetReferences - Retrieves the references of a beamset - * @param[out] ReferencesBuffer - retrieves the indices of all beams in this beamset + * CImplicitFunction::AddSinNode - Add a SinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBeamSet::GetReferences(std::vector & ReferencesBuffer) + PSinNode CImplicitFunction::AddSinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededReferences = 0; - Lib3MF_uint64 elementsWrittenReferences = 0; - CheckError(lib3mf_beamset_getreferences(m_pHandle, 0, &elementsNeededReferences, nullptr)); - ReferencesBuffer.resize((size_t) elementsNeededReferences); - CheckError(lib3mf_beamset_getreferences(m_pHandle, elementsNeededReferences, &elementsWrittenReferences, ReferencesBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addsinnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBeamSet::GetBallReferenceCount - Retrieves the ball reference count of a beamset - * @return returns the ball reference count + * CImplicitFunction::AddCosNode - Add a CosNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CBeamSet::GetBallReferenceCount() + PCosNode CImplicitFunction::AddCosNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_beamset_getballreferencecount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addcosnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBeamSet::SetBallReferences - Sets the ball references of a beamset - * @param[in] BallReferencesBuffer - the new indices of all balls in this beamset + * CImplicitFunction::AddTanNode - Add a TanNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBeamSet::SetBallReferences(const CInputVector & BallReferencesBuffer) + PTanNode CImplicitFunction::AddTanNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_beamset_setballreferences(m_pHandle, (Lib3MF_uint64)BallReferencesBuffer.size(), BallReferencesBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addtannode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBeamSet::GetBallReferences - Retrieves the ball references of a beamset - * @param[out] BallReferencesBuffer - retrieves the indices of all balls in this beamset + * CImplicitFunction::AddArcSinNode - Add a ArcSinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBeamSet::GetBallReferences(std::vector & BallReferencesBuffer) + PArcSinNode CImplicitFunction::AddArcSinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededBallReferences = 0; - Lib3MF_uint64 elementsWrittenBallReferences = 0; - CheckError(lib3mf_beamset_getballreferences(m_pHandle, 0, &elementsNeededBallReferences, nullptr)); - BallReferencesBuffer.resize((size_t) elementsNeededBallReferences); - CheckError(lib3mf_beamset_getballreferences(m_pHandle, elementsNeededBallReferences, &elementsWrittenBallReferences, BallReferencesBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addarcsinnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CBaseMaterialGroup - */ + * CImplicitFunction::AddArcCosNode - Add a ArcCosNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PArcCosNode CImplicitFunction::AddArcCosNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addarccosnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } /** - * CBaseMaterialGroup::GetCount - Retrieves the count of base materials in the material group. - * @return returns the count of base materials. + * CImplicitFunction::AddArcTan2Node - Add a ArcTan2Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CBaseMaterialGroup::GetCount() + PArcTan2Node CImplicitFunction::AddArcTan2Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_basematerialgroup_getcount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addarctan2node(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::GetAllPropertyIDs - returns all the PropertyIDs of all materials in this group - * @param[out] PropertyIDsBuffer - PropertyID of the material in the material group. + * CImplicitFunction::AddSinhNode - Add a SinhNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBaseMaterialGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + PSinhNode CImplicitFunction::AddSinhNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(lib3mf_basematerialgroup_getallpropertyids(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(lib3mf_basematerialgroup_getallpropertyids(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addsinhnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::AddMaterial - Adds a new material to the material group - * @param[in] sName - new name of the base material. - * @param[in] DisplayColor - Display color of the material - * @return returns new PropertyID of the new material in the material group. + * CImplicitFunction::AddCoshNode - Add a CoshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CBaseMaterialGroup::AddMaterial(const std::string & sName, const sColor & DisplayColor) + PCoshNode CImplicitFunction::AddCoshNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultPropertyID = 0; - CheckError(lib3mf_basematerialgroup_addmaterial(m_pHandle, sName.c_str(), &DisplayColor, &resultPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addcoshnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultPropertyID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::RemoveMaterial - Removes a material from the material group. - * @param[in] nPropertyID - PropertyID of the material in the material group. + * CImplicitFunction::AddTanhNode - Add a TanhNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBaseMaterialGroup::RemoveMaterial(const Lib3MF_uint32 nPropertyID) + PTanhNode CImplicitFunction::AddTanhNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_basematerialgroup_removematerial(m_pHandle, nPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addtanhnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::GetName - Returns the base material's name - * @param[in] nPropertyID - PropertyID of the material in the material group. - * @return returns the name of the base material. + * CImplicitFunction::AddRoundNode - Add a RoundNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - std::string CBaseMaterialGroup::GetName(const Lib3MF_uint32 nPropertyID) + PRoundNode CImplicitFunction::AddRoundNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 bytesNeededName = 0; - Lib3MF_uint32 bytesWrittenName = 0; - CheckError(lib3mf_basematerialgroup_getname(m_pHandle, nPropertyID, 0, &bytesNeededName, nullptr)); - std::vector bufferName(bytesNeededName); - CheckError(lib3mf_basematerialgroup_getname(m_pHandle, nPropertyID, bytesNeededName, &bytesWrittenName, &bufferName[0])); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addroundnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return std::string(&bufferName[0]); + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::SetName - Sets a base material's name - * @param[in] nPropertyID - PropertyID of the material in the material group. - * @param[in] sName - new name of the base material. + * CImplicitFunction::AddCeilNode - Add a CeilNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBaseMaterialGroup::SetName(const Lib3MF_uint32 nPropertyID, const std::string & sName) + PCeilNode CImplicitFunction::AddCeilNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_basematerialgroup_setname(m_pHandle, nPropertyID, sName.c_str())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addceilnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::SetDisplayColor - Sets a base material's display color. - * @param[in] nPropertyID - PropertyID of the material in the material group. - * @param[in] TheColor - The base material's display color + * CImplicitFunction::AddFloorNode - Add a FloorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBaseMaterialGroup::SetDisplayColor(const Lib3MF_uint32 nPropertyID, const sColor & TheColor) + PFloorNode CImplicitFunction::AddFloorNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_basematerialgroup_setdisplaycolor(m_pHandle, nPropertyID, &TheColor)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addfloornode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::GetDisplayColor - Returns a base material's display color. - * @param[in] nPropertyID - PropertyID of the material in the material group. - * @return The base material's display color + * CImplicitFunction::AddSignNode - Add a SignNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - sColor CBaseMaterialGroup::GetDisplayColor(const Lib3MF_uint32 nPropertyID) + PSignNode CImplicitFunction::AddSignNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - sColor resultTheColor; - CheckError(lib3mf_basematerialgroup_getdisplaycolor(m_pHandle, nPropertyID, &resultTheColor)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addsignnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultTheColor; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CColorGroup - */ - - /** - * CColorGroup::GetCount - Retrieves the count of base materials in this Color Group. - * @return returns the count of colors within this color group. + * CImplicitFunction::AddFractNode - Add a FractNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CColorGroup::GetCount() + PFractNode CImplicitFunction::AddFractNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_colorgroup_getcount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addfractnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CColorGroup::GetAllPropertyIDs - returns all the PropertyIDs of all colors within this group - * @param[out] PropertyIDsBuffer - PropertyID of the color in the color group. + * CImplicitFunction::AddAbsNode - Add a AbsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CColorGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + PAbsNode CImplicitFunction::AddAbsNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(lib3mf_colorgroup_getallpropertyids(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(lib3mf_colorgroup_getallpropertyids(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addabsnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CColorGroup::AddColor - Adds a new value. - * @param[in] TheColor - The new color - * @return PropertyID of the new color within this color group. + * CImplicitFunction::AddExpNode - Add a ExpNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CColorGroup::AddColor(const sColor & TheColor) + PExpNode CImplicitFunction::AddExpNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultPropertyID = 0; - CheckError(lib3mf_colorgroup_addcolor(m_pHandle, &TheColor, &resultPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addexpnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultPropertyID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CColorGroup::RemoveColor - Removes a color from the color group. - * @param[in] nPropertyID - PropertyID of the color to be removed from the color group. + * CImplicitFunction::AddLogNode - Add a LogNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CColorGroup::RemoveColor(const Lib3MF_uint32 nPropertyID) + PLogNode CImplicitFunction::AddLogNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_colorgroup_removecolor(m_pHandle, nPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addlognode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CColorGroup::SetColor - Sets a color value. - * @param[in] nPropertyID - PropertyID of a color within this color group. - * @param[in] TheColor - The color + * CImplicitFunction::AddLog2Node - Add a Log2Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CColorGroup::SetColor(const Lib3MF_uint32 nPropertyID, const sColor & TheColor) + PLog2Node CImplicitFunction::AddLog2Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_colorgroup_setcolor(m_pHandle, nPropertyID, &TheColor)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addlog2node(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CColorGroup::GetColor - Sets a color value. - * @param[in] nPropertyID - PropertyID of a color within this color group. - * @return The color + * CImplicitFunction::AddLog10Node - Add a Log10Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - sColor CColorGroup::GetColor(const Lib3MF_uint32 nPropertyID) + PLog10Node CImplicitFunction::AddLog10Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - sColor resultTheColor; - CheckError(lib3mf_colorgroup_getcolor(m_pHandle, nPropertyID, &resultTheColor)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addlog10node(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultTheColor; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CTexture2DGroup - */ + * CImplicitFunction::AddLengthNode - Add a LengthNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PLengthNode CImplicitFunction::AddLengthNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addlengthnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } /** - * CTexture2DGroup::GetCount - Retrieves the count of tex2coords in the Texture2DGroup. - * @return returns the count of tex2coords. + * CImplicitFunction::AddTransposeNode - Add a TransposeNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CTexture2DGroup::GetCount() + PTransposeNode CImplicitFunction::AddTransposeNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_texture2dgroup_getcount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addtransposenode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CTexture2DGroup::GetAllPropertyIDs - returns all the PropertyIDs of all tex2coords in this Texture2DGroup - * @param[out] PropertyIDsBuffer - PropertyID of the tex2coords in the Texture2DGroup. + * CImplicitFunction::InverseNode - Add a InverseNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CTexture2DGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + PInverseNode CImplicitFunction::InverseNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(lib3mf_texture2dgroup_getallpropertyids(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(lib3mf_texture2dgroup_getallpropertyids(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_inversenode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CTexture2DGroup::AddTex2Coord - Adds a new tex2coord to the Texture2DGroup - * @param[in] UVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. - * @return returns new PropertyID of the new tex2coord in the Texture2DGroup. + * CImplicitFunction::AddSqrtNode - Add a SqrtNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CTexture2DGroup::AddTex2Coord(const sTex2Coord & UVCoordinate) + PSqrtNode CImplicitFunction::AddSqrtNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultPropertyID = 0; - CheckError(lib3mf_texture2dgroup_addtex2coord(m_pHandle, &UVCoordinate, &resultPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addsqrtnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultPropertyID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CTexture2DGroup::GetTex2Coord - Obtains a tex2coord to the Texture2DGroup - * @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. - * @return The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. + * CImplicitFunction::AddResourceIdNode - Add a ResourceIdNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - sTex2Coord CTexture2DGroup::GetTex2Coord(const Lib3MF_uint32 nPropertyID) + PResourceIdNode CImplicitFunction::AddResourceIdNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - sTex2Coord resultUVCoordinate; - CheckError(lib3mf_texture2dgroup_gettex2coord(m_pHandle, nPropertyID, &resultUVCoordinate)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addresourceidnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultUVCoordinate; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CTexture2DGroup::RemoveTex2Coord - Removes a tex2coords from the Texture2DGroup. - * @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. + * CImplicitFunction::AddAdditionNode - Add an AdditionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CTexture2DGroup::RemoveTex2Coord(const Lib3MF_uint32 nPropertyID) + PAdditionNode CImplicitFunction::AddAdditionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_texture2dgroup_removetex2coord(m_pHandle, nPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addadditionnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CTexture2DGroup::GetTexture2D - Obtains the texture2D instance of this group. - * @return the texture2D instance of this group. + * CImplicitFunction::AddSubtractionNode - Add a SubtractionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - PTexture2D CTexture2DGroup::GetTexture2D() + PSubtractionNode CImplicitFunction::AddSubtractionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MFHandle hTexture2DInstance = nullptr; - CheckError(lib3mf_texture2dgroup_gettexture2d(m_pHandle, &hTexture2DInstance)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addsubtractionnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - if (!hTexture2DInstance) { + if (!hNode) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTexture2DInstance))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CCompositeMaterials - */ + * CImplicitFunction::AddMultiplicationNode - Add a MultiplicationNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PMultiplicationNode CImplicitFunction::AddMultiplicationNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addmultiplicationnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } /** - * CCompositeMaterials::GetCount - Retrieves the count of Composite-s in the CompositeMaterials. - * @return returns the count of Composite-s + * CImplicitFunction::AddDivisionNode - Add a DivisionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CCompositeMaterials::GetCount() + PDivisionNode CImplicitFunction::AddDivisionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_compositematerials_getcount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_adddivisionnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CCompositeMaterials::GetAllPropertyIDs - returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials - * @param[out] PropertyIDsBuffer - PropertyID of the Composite-Mixing Values in the CompositeMaterials. + * CImplicitFunction::AddDotNode - Add a DotNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CCompositeMaterials::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + PDotNode CImplicitFunction::AddDotNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(lib3mf_compositematerials_getallpropertyids(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(lib3mf_compositematerials_getallpropertyids(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_adddotnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CCompositeMaterials::GetBaseMaterialGroup - Obtains the BaseMaterialGroup instance of this CompositeMaterials. - * @return returns the BaseMaterialGroup instance of this CompositeMaterials + * CImplicitFunction::AddCrossNode - Add a CrossNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - PBaseMaterialGroup CCompositeMaterials::GetBaseMaterialGroup() + PCrossNode CImplicitFunction::AddCrossNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MFHandle hBaseMaterialGroupInstance = nullptr; - CheckError(lib3mf_compositematerials_getbasematerialgroup(m_pHandle, &hBaseMaterialGroupInstance)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addcrossnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - if (!hBaseMaterialGroupInstance) { + if (!hNode) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBaseMaterialGroupInstance))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CCompositeMaterials::AddComposite - Adds a new Composite-Mixing Values to the CompositeMaterials. - * @param[in] CompositeBuffer - The Composite Constituents to be added as composite - * @return returns new PropertyID of the new Composite in the CompositeMaterials. + * CImplicitFunction::AddMatVecMultiplicationNode - Add a MatVecMultiplicationNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CCompositeMaterials::AddComposite(const CInputVector & CompositeBuffer) + PMatVecMultiplicationNode CImplicitFunction::AddMatVecMultiplicationNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultPropertyID = 0; - CheckError(lib3mf_compositematerials_addcomposite(m_pHandle, (Lib3MF_uint64)CompositeBuffer.size(), CompositeBuffer.data(), &resultPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addmatvecmultiplicationnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultPropertyID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CCompositeMaterials::RemoveComposite - Removes a Composite-Maxing Ratio from the CompositeMaterials. - * @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. + * CImplicitFunction::AddMinNode - Add a MinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CCompositeMaterials::RemoveComposite(const Lib3MF_uint32 nPropertyID) + PMinNode CImplicitFunction::AddMinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_compositematerials_removecomposite(m_pHandle, nPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addminnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CCompositeMaterials::GetComposite - Obtains a Composite-Maxing Ratio of this CompositeMaterials. - * @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. - * @param[out] CompositeBuffer - The Composite-Mixing Values with the given PropertyID + * CImplicitFunction::AddMaxNode - Add a MaxNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CCompositeMaterials::GetComposite(const Lib3MF_uint32 nPropertyID, std::vector & CompositeBuffer) + PMaxNode CImplicitFunction::AddMaxNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededComposite = 0; - Lib3MF_uint64 elementsWrittenComposite = 0; - CheckError(lib3mf_compositematerials_getcomposite(m_pHandle, nPropertyID, 0, &elementsNeededComposite, nullptr)); - CompositeBuffer.resize((size_t) elementsNeededComposite); - CheckError(lib3mf_compositematerials_getcomposite(m_pHandle, nPropertyID, elementsNeededComposite, &elementsWrittenComposite, CompositeBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addmaxnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CMultiPropertyGroup - */ + * CImplicitFunction::AddFmodNode - Add a FmodNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PFmodNode CImplicitFunction::AddFmodNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addfmodnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } /** - * CMultiPropertyGroup::GetCount - Retrieves the count of MultiProperty-s in the MultiPropertyGroup. - * @return returns the count of MultiProperty-s + * CImplicitFunction::AddPowNode - Add a PowNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CMultiPropertyGroup::GetCount() + PPowNode CImplicitFunction::AddPowNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_multipropertygroup_getcount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addpownode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::GetAllPropertyIDs - returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup - * @param[out] PropertyIDsBuffer - PropertyID of the MultiProperty-s in the MultiPropertyGroup. + * CImplicitFunction::AddSelectNode - Add a SelectNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CMultiPropertyGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + PSelectNode CImplicitFunction::AddSelectNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(lib3mf_multipropertygroup_getallpropertyids(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(lib3mf_multipropertygroup_getallpropertyids(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addselectnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::AddMultiProperty - Adds a new MultiProperty to the MultiPropertyGroup. - * @param[in] PropertyIDsBuffer - The PropertyIDs of the new MultiProperty. - * @return returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. + * CImplicitFunction::AddClampNode - Add a ClampNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CMultiPropertyGroup::AddMultiProperty(const CInputVector & PropertyIDsBuffer) + PClampNode CImplicitFunction::AddClampNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultPropertyID = 0; - CheckError(lib3mf_multipropertygroup_addmultiproperty(m_pHandle, (Lib3MF_uint64)PropertyIDsBuffer.size(), PropertyIDsBuffer.data(), &resultPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addclampnode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultPropertyID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::SetMultiProperty - Sets the PropertyIDs of a MultiProperty. - * @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. - * @param[in] PropertyIDsBuffer - The new PropertyIDs of the MultiProperty + * CImplicitFunction::AddComposeVectorNode - Add a ComposeVectorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CMultiPropertyGroup::SetMultiProperty(const Lib3MF_uint32 nPropertyID, const CInputVector & PropertyIDsBuffer) + PComposeVectorNode CImplicitFunction::AddComposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_multipropertygroup_setmultiproperty(m_pHandle, nPropertyID, (Lib3MF_uint64)PropertyIDsBuffer.size(), PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addcomposevectornode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::GetMultiProperty - Obtains the PropertyIDs of a MultiProperty. - * @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. - * @param[out] PropertyIDsBuffer - The PropertyIDs of the MultiProperty + * CImplicitFunction::AddVectorFromScalarNode - Add a VectorFromScalar + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CMultiPropertyGroup::GetMultiProperty(const Lib3MF_uint32 nPropertyID, std::vector & PropertyIDsBuffer) + PVectorFromScalarNode CImplicitFunction::AddVectorFromScalarNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(lib3mf_multipropertygroup_getmultiproperty(m_pHandle, nPropertyID, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(lib3mf_multipropertygroup_getmultiproperty(m_pHandle, nPropertyID, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addvectorfromscalarnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::RemoveMultiProperty - Removes a MultiProperty from this MultiPropertyGroup. - * @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. + * CImplicitFunction::AddDecomposeVectorNode - Add a DecomposeVectorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CMultiPropertyGroup::RemoveMultiProperty(const Lib3MF_uint32 nPropertyID) + PDecomposeVectorNode CImplicitFunction::AddDecomposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_multipropertygroup_removemultiproperty(m_pHandle, nPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_adddecomposevectornode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::GetLayerCount - Retrieves the number of layers of this MultiPropertyGroup. - * @return returns the number of layers + * CImplicitFunction::AddComposeMatrixNode - Add a ComposeMatrixNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CMultiPropertyGroup::GetLayerCount() + PComposeMatrixNode CImplicitFunction::AddComposeMatrixNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(lib3mf_multipropertygroup_getlayercount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addcomposematrixnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::AddLayer - Adds a MultiPropertyLayer to this MultiPropertyGroup. - * @param[in] TheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup - * @return returns the index of this MultiPropertyLayer + * CImplicitFunction::AddMatrixFromRowsNode - Add a MatrixFromRowsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CMultiPropertyGroup::AddLayer(const sMultiPropertyLayer & TheLayer) + PMatrixFromRowsNode CImplicitFunction::AddMatrixFromRowsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultLayerIndex = 0; - CheckError(lib3mf_multipropertygroup_addlayer(m_pHandle, &TheLayer, &resultLayerIndex)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addmatrixfromrowsnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultLayerIndex; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::GetLayer - Obtains a MultiPropertyLayer of this MultiPropertyGroup. - * @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried - * @return The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup + * CImplicitFunction::AddMatrixFromColumnsNode - Add a MatrixFromColumnsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - sMultiPropertyLayer CMultiPropertyGroup::GetLayer(const Lib3MF_uint32 nLayerIndex) + PMatrixFromColumnsNode CImplicitFunction::AddMatrixFromColumnsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - sMultiPropertyLayer resultTheLayer; - CheckError(lib3mf_multipropertygroup_getlayer(m_pHandle, nLayerIndex, &resultTheLayer)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addmatrixfromcolumnsnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultTheLayer; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::RemoveLayer - Removes a MultiPropertyLayer from this MultiPropertyGroup. - * @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed + * CImplicitFunction::AddConstantNode - Add a ConstantNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CMultiPropertyGroup::RemoveLayer(const Lib3MF_uint32 nLayerIndex) + PConstantNode CImplicitFunction::AddConstantNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_multipropertygroup_removelayer(m_pHandle, nLayerIndex)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addconstantnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CAttachment - */ - - /** - * CAttachment::GetPath - Retrieves an attachment's package path. This function will be removed in a later release. - * @return returns the attachment's package path string + * CImplicitFunction::AddConstVecNode - Add a ConstVecNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - std::string CAttachment::GetPath() + PConstVecNode CImplicitFunction::AddConstVecNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 bytesNeededPath = 0; - Lib3MF_uint32 bytesWrittenPath = 0; - CheckError(lib3mf_attachment_getpath(m_pHandle, 0, &bytesNeededPath, nullptr)); - std::vector bufferPath(bytesNeededPath); - CheckError(lib3mf_attachment_getpath(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addconstvecnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return std::string(&bufferPath[0]); + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CAttachment::SetPath - Sets an attachment's package path. This function will be removed in a later release. - * @param[in] sPath - new path of the attachment. + * CImplicitFunction::AddConstMatNode - Add a ConstMatNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CAttachment::SetPath(const std::string & sPath) + PConstMatNode CImplicitFunction::AddConstMatNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_attachment_setpath(m_pHandle, sPath.c_str())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addconstmatnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CAttachment::PackagePart - Returns the PackagePart that is this attachment. - * @return The PackagePart of this attachment. + * CImplicitFunction::AddMeshNode - Add a MeshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - PPackagePart CAttachment::PackagePart() + PMeshNode CImplicitFunction::AddMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MFHandle hPackagePart = nullptr; - CheckError(lib3mf_attachment_packagepart(m_pHandle, &hPackagePart)); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addmeshnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - if (!hPackagePart) { + if (!hNode) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPackagePart))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CAttachment::GetRelationShipType - Retrieves an attachment's relationship type - * @return returns the attachment's package relationship type string + * CImplicitFunction::AddUnsignedMeshNode - Add a UnsignedMeshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - std::string CAttachment::GetRelationShipType() + PUnsignedMeshNode CImplicitFunction::AddUnsignedMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 bytesNeededPath = 0; - Lib3MF_uint32 bytesWrittenPath = 0; - CheckError(lib3mf_attachment_getrelationshiptype(m_pHandle, 0, &bytesNeededPath, nullptr)); - std::vector bufferPath(bytesNeededPath); - CheckError(lib3mf_attachment_getrelationshiptype(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addunsignedmeshnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return std::string(&bufferPath[0]); + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CAttachment::SetRelationShipType - Sets an attachment's relationship type. - * @param[in] sPath - new relationship type string. + * CImplicitFunction::AddFunctionCallNode - Add a FunctionCallNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CAttachment::SetRelationShipType(const std::string & sPath) + PFunctionCallNode CImplicitFunction::AddFunctionCallNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - CheckError(lib3mf_attachment_setrelationshiptype(m_pHandle, sPath.c_str())); + Lib3MFHandle hNode = nullptr; + CheckError(lib3mf_implicitfunction_addfunctioncallnode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CAttachment::WriteToFile - Writes out the attachment as file. - * @param[in] sFileName - file to write into. + * CImplicitFunction::GetNodes - Retrieves the nodes + * @return iterator for the list of nodes */ - void CAttachment::WriteToFile(const std::string & sFileName) + PNodeIterator CImplicitFunction::GetNodes() { - CheckError(lib3mf_attachment_writetofile(m_pHandle, sFileName.c_str())); + Lib3MFHandle hIterator = nullptr; + CheckError(lib3mf_implicitfunction_getnodes(m_pHandle, &hIterator)); + + if (!hIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hIterator))); } /** - * CAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. - * @param[in] sFileName - file to read from. + * CImplicitFunction::RemoveNode - Removes a node + * @param[in] pNode - The node to be removed */ - void CAttachment::ReadFromFile(const std::string & sFileName) + void CImplicitFunction::RemoveNode(classParam pNode) { - CheckError(lib3mf_attachment_readfromfile(m_pHandle, sFileName.c_str())); + Lib3MFHandle hNode = pNode.GetHandle(); + CheckError(lib3mf_implicitfunction_removenode(m_pHandle, hNode)); } /** - * CAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. - * @param[in] pTheReadCallback - Callback to call for reading a data chunk - * @param[in] nStreamSize - number of bytes the callback returns - * @param[in] pTheSeekCallback - Callback to call for seeking in the stream. - * @param[in] pUserData - Userdata that is passed to the callback function + * CImplicitFunction::AddLink - Add a link + * @param[in] pSource - the source port + * @param[in] pTarget - the target port */ - void CAttachment::ReadFromCallback(const ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) + void CImplicitFunction::AddLink(classParam pSource, classParam pTarget) { - CheckError(lib3mf_attachment_readfromcallback(m_pHandle, pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData)); + Lib3MFHandle hSource = pSource.GetHandle(); + Lib3MFHandle hTarget = pTarget.GetHandle(); + CheckError(lib3mf_implicitfunction_addlink(m_pHandle, hSource, hTarget)); } /** - * CAttachment::GetStreamSize - Retrieves the size of the attachment stream - * @return the stream size + * CImplicitFunction::AddLinkByNames - Add a link + * @param[in] sSource - name of the source port in the format nodename.portname + * @param[in] sTarget - name of the target port in the format nodename.portname */ - Lib3MF_uint64 CAttachment::GetStreamSize() + void CImplicitFunction::AddLinkByNames(const std::string & sSource, const std::string & sTarget) { - Lib3MF_uint64 resultStreamSize = 0; - CheckError(lib3mf_attachment_getstreamsize(m_pHandle, &resultStreamSize)); - - return resultStreamSize; + CheckError(lib3mf_implicitfunction_addlinkbynames(m_pHandle, sSource.c_str(), sTarget.c_str())); } /** - * CAttachment::WriteToBuffer - Writes out the attachment into a buffer - * @param[out] BufferBuffer - Buffer to write into + * CImplicitFunction::Clear - Clears the function */ - void CAttachment::WriteToBuffer(std::vector & BufferBuffer) + void CImplicitFunction::Clear() { - Lib3MF_uint64 elementsNeededBuffer = 0; - Lib3MF_uint64 elementsWrittenBuffer = 0; - CheckError(lib3mf_attachment_writetobuffer(m_pHandle, 0, &elementsNeededBuffer, nullptr)); - BufferBuffer.resize((size_t) elementsNeededBuffer); - CheckError(lib3mf_attachment_writetobuffer(m_pHandle, elementsNeededBuffer, &elementsWrittenBuffer, BufferBuffer.data())); + CheckError(lib3mf_implicitfunction_clear(m_pHandle)); } /** - * CAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). - * @param[in] BufferBuffer - Buffer to read from + * CImplicitFunction::SortNodesTopologically - Sorts the nodes topologically */ - void CAttachment::ReadFromBuffer(const CInputVector & BufferBuffer) + void CImplicitFunction::SortNodesTopologically() { - CheckError(lib3mf_attachment_readfrombuffer(m_pHandle, (Lib3MF_uint64)BufferBuffer.size(), BufferBuffer.data())); + CheckError(lib3mf_implicitfunction_sortnodestopologically(m_pHandle)); } /** - * Method definitions for class CTexture2D + * Method definitions for class CFunctionFromImage3D */ /** - * CTexture2D::GetAttachment - Retrieves the attachment located at the path of the texture. - * @return attachment that holds the texture's image information. + * CFunctionFromImage3D::GetImage3D - Returns the selected 3D image. + * @return image instance */ - PAttachment CTexture2D::GetAttachment() + PImage3D CFunctionFromImage3D::GetImage3D() { - Lib3MFHandle hAttachment = nullptr; - CheckError(lib3mf_texture2d_getattachment(m_pHandle, &hAttachment)); + Lib3MFHandle hImage3D = nullptr; + CheckError(lib3mf_functionfromimage3d_getimage3d(m_pHandle, &hImage3D)); - if (!hAttachment) { + if (!hImage3D) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hAttachment))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hImage3D))); } /** - * CTexture2D::SetAttachment - Sets the texture's package path to the path of the attachment. - * @param[in] pAttachment - attachment that holds the texture's image information. + * CFunctionFromImage3D::SetImage3D - Sets the 3D image of the selector. + * @param[in] pImage3D - image instance */ - void CTexture2D::SetAttachment(classParam pAttachment) + void CFunctionFromImage3D::SetImage3D(classParam pImage3D) { - Lib3MFHandle hAttachment = pAttachment.GetHandle(); - CheckError(lib3mf_texture2d_setattachment(m_pHandle, hAttachment)); + Lib3MFHandle hImage3D = pImage3D.GetHandle(); + CheckError(lib3mf_functionfromimage3d_setimage3d(m_pHandle, hImage3D)); } /** - * CTexture2D::GetContentType - Retrieves a texture's content type. - * @return returns content type enum. + * CFunctionFromImage3D::SetFilter - Sets the texture filter of the selector. + * @param[in] eFilter - texture filter */ - eTextureType CTexture2D::GetContentType() + void CFunctionFromImage3D::SetFilter(const eTextureFilter eFilter) { - eTextureType resultContentType = (eTextureType) 0; - CheckError(lib3mf_texture2d_getcontenttype(m_pHandle, &resultContentType)); + CheckError(lib3mf_functionfromimage3d_setfilter(m_pHandle, eFilter)); + } + + /** + * CFunctionFromImage3D::GetFilter - Returns the texture filter of the selector. + * @return texture filter + */ + eTextureFilter CFunctionFromImage3D::GetFilter() + { + eTextureFilter resultFilter = (eTextureFilter) 0; + CheckError(lib3mf_functionfromimage3d_getfilter(m_pHandle, &resultFilter)); - return resultContentType; + return resultFilter; } /** - * CTexture2D::SetContentType - Retrieves a texture's content type. - * @param[in] eContentType - new Content Type + * CFunctionFromImage3D::SetTileStyles - Sets the tile styles of the selector. + * @param[in] eTileStyleU - tile style in U + * @param[in] eTileStyleV - tile style in V + * @param[in] eTileStyleW - tile style in W */ - void CTexture2D::SetContentType(const eTextureType eContentType) + void CFunctionFromImage3D::SetTileStyles(const eTextureTileStyle eTileStyleU, const eTextureTileStyle eTileStyleV, const eTextureTileStyle eTileStyleW) { - CheckError(lib3mf_texture2d_setcontenttype(m_pHandle, eContentType)); + CheckError(lib3mf_functionfromimage3d_settilestyles(m_pHandle, eTileStyleU, eTileStyleV, eTileStyleW)); } /** - * CTexture2D::GetTileStyleUV - Retrieves a texture's tilestyle type. - * @param[out] eTileStyleU - returns tilestyle type enum. - * @param[out] eTileStyleV - returns tilestyle type enum. + * CFunctionFromImage3D::GetTileStyles - Retrieves the tile styles of the selector. + * @param[out] eTileStyleU - tile style in U + * @param[out] eTileStyleV - tile style in V + * @param[out] eTileStyleW - tile style in W */ - void CTexture2D::GetTileStyleUV(eTextureTileStyle & eTileStyleU, eTextureTileStyle & eTileStyleV) + void CFunctionFromImage3D::GetTileStyles(eTextureTileStyle & eTileStyleU, eTextureTileStyle & eTileStyleV, eTextureTileStyle & eTileStyleW) { - CheckError(lib3mf_texture2d_gettilestyleuv(m_pHandle, &eTileStyleU, &eTileStyleV)); + CheckError(lib3mf_functionfromimage3d_gettilestyles(m_pHandle, &eTileStyleU, &eTileStyleV, &eTileStyleW)); } /** - * CTexture2D::SetTileStyleUV - Sets a texture's tilestyle type. - * @param[in] eTileStyleU - new tilestyle type enum. - * @param[in] eTileStyleV - new tilestyle type enum. + * CFunctionFromImage3D::GetOffset - returns the offset value for the pixel values in the Image3D + * @return the offset value for the pixel values in the Image3D */ - void CTexture2D::SetTileStyleUV(const eTextureTileStyle eTileStyleU, const eTextureTileStyle eTileStyleV) + Lib3MF_double CFunctionFromImage3D::GetOffset() { - CheckError(lib3mf_texture2d_settilestyleuv(m_pHandle, eTileStyleU, eTileStyleV)); + Lib3MF_double resultOffset = 0; + CheckError(lib3mf_functionfromimage3d_getoffset(m_pHandle, &resultOffset)); + + return resultOffset; } /** - * CTexture2D::GetFilter - Retrieves a texture's filter type. - * @return returns filter type enum. + * CFunctionFromImage3D::SetOffset - Sets the offset value for the pixel values in the Image3D + * @param[in] dOffset - the offset value for the pixel values in the Image3D */ - eTextureFilter CTexture2D::GetFilter() + void CFunctionFromImage3D::SetOffset(const Lib3MF_double dOffset) { - eTextureFilter resultFilter = (eTextureFilter) 0; - CheckError(lib3mf_texture2d_getfilter(m_pHandle, &resultFilter)); + CheckError(lib3mf_functionfromimage3d_setoffset(m_pHandle, dOffset)); + } + + /** + * CFunctionFromImage3D::GetScale - returns the scale value for the pixel values in the Image3D + * @return the scale value for the pixel values in the Image3D + */ + Lib3MF_double CFunctionFromImage3D::GetScale() + { + Lib3MF_double resultScale = 0; + CheckError(lib3mf_functionfromimage3d_getscale(m_pHandle, &resultScale)); - return resultFilter; + return resultScale; } /** - * CTexture2D::SetFilter - Sets a texture's filter type. - * @param[in] eFilter - sets new filter type enum. + * CFunctionFromImage3D::SetScale - Sets the scale value for the pixel values in the Image3D + * @param[in] dScale - the scale value for the pixel values in the Image3D */ - void CTexture2D::SetFilter(const eTextureFilter eFilter) + void CFunctionFromImage3D::SetScale(const Lib3MF_double dScale) { - CheckError(lib3mf_texture2d_setfilter(m_pHandle, eFilter)); + CheckError(lib3mf_functionfromimage3d_setscale(m_pHandle, dScale)); } /** @@ -5860,6 +11330,22 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSliceStacInstance))); } + /** + * CModel::GetLevelSetByID - finds a level set object by its UniqueResourceID + * @param[in] nUniqueResourceID - UniqueResourceID + * @return returns the level set object instance + */ + PLevelSet CModel::GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID) + { + Lib3MFHandle hLevelSetObjectInstance = nullptr; + CheckError(lib3mf_model_getlevelsetbyid(m_pHandle, nUniqueResourceID, &hLevelSetObjectInstance)); + + if (!hLevelSetObjectInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hLevelSetObjectInstance))); + } + /** * CModel::GetBuildUUID - returns, whether a build has a UUID and, if true, the build's UUID * @param[out] bHasUUID - flag whether the build has a UUID @@ -6077,6 +11563,21 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResourceIterator))); } + /** + * CModel::GetImage3Ds - creates a resource iterator instance with all image3d resources. + * @return returns the iterator instance. + */ + PImage3DIterator CModel::GetImage3Ds() + { + Lib3MFHandle hResourceIterator = nullptr; + CheckError(lib3mf_model_getimage3ds(m_pHandle, &hResourceIterator)); + + if (!hResourceIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResourceIterator))); + } + /** * CModel::MergeToModel - Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. * @return returns the merged model instance @@ -6092,6 +11593,16 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMergedModelInstance))); } + /** + * CModel::MergeFromModel - Merges the given model into this model. + * @param[in] pModelInstance - model to be merged + */ + void CModel::MergeFromModel(classParam pModelInstance) + { + Lib3MFHandle hModelInstance = pModelInstance.GetHandle(); + CheckError(lib3mf_model_mergefrommodel(m_pHandle, hModelInstance)); + } + /** * CModel::AddMeshObject - adds an empty mesh object to the model. * @return returns the mesh object instance @@ -6234,6 +11745,40 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMultiPropertyGroupInstance))); } + /** + * CModel::AddImageStack - creates a new 3D Image Resource + * @param[in] nColumnCount - the number of columns in each sheet. + * @param[in] nRowCount - the number of rows in each sheet. + * @param[in] nSheetCount - the number of sheets in the image stack. + * @return returns the new ImageStack instance + */ + PImageStack CModel::AddImageStack(const Lib3MF_uint32 nColumnCount, const Lib3MF_uint32 nRowCount, const Lib3MF_uint32 nSheetCount) + { + Lib3MFHandle hInstance = nullptr; + CheckError(lib3mf_model_addimagestack(m_pHandle, nColumnCount, nRowCount, nSheetCount, &hInstance)); + + if (!hInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hInstance))); + } + + /** + * CModel::GetImageStackByID - finds an ImageStack object by its UniqueResourceID + * @param[in] nUniqueResourceID - UniqueResourceID + * @return returns the image stack instance + */ + PImageStack CModel::GetImageStackByID(const Lib3MF_uint32 nUniqueResourceID) + { + Lib3MFHandle hImageStackInstance = nullptr; + CheckError(lib3mf_model_getimagestackbyid(m_pHandle, nUniqueResourceID, &hImageStackInstance)); + + if (!hImageStackInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hImageStackInstance))); + } + /** * CModel::AddBuildItem - adds a build item to the model. * @param[in] pObject - Object instance. @@ -6442,6 +11987,108 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hKeyStore))); } + + /** + * CModel::GetFunctions - creates a resource iterator for all functions + * @return returns the resource iterator + */ + PFunctionIterator CModel::GetFunctions() + { + Lib3MFHandle hTheResourceIterator = nullptr; + CheckError(lib3mf_model_getfunctions(m_pHandle, &hTheResourceIterator)); + + if (!hTheResourceIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheResourceIterator))); + } + + /** + * CModel::AddImplicitFunction - adds a function described by nodes to the model + * @return returns the function instance + */ + PImplicitFunction CModel::AddImplicitFunction() + { + Lib3MFHandle hFunctionInstance = nullptr; + CheckError(lib3mf_model_addimplicitfunction(m_pHandle, &hFunctionInstance)); + + if (!hFunctionInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hFunctionInstance))); + } + + /** + * CModel::AddFunctionFromImage3D - adds a function defined by an image3d to the model + * @param[in] pImage3DInstance - the Image3D-instance used for this function + * @return returns the function instance + */ + PFunctionFromImage3D CModel::AddFunctionFromImage3D(classParam pImage3DInstance) + { + Lib3MFHandle hImage3DInstance = pImage3DInstance.GetHandle(); + Lib3MFHandle hFunctionInstance = nullptr; + CheckError(lib3mf_model_addfunctionfromimage3d(m_pHandle, hImage3DInstance, &hFunctionInstance)); + + if (!hFunctionInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hFunctionInstance))); + } + + /** + * CModel::AddVolumeData - adds a volume data resource to the model. + * @return returns the new volume data instance. + */ + PVolumeData CModel::AddVolumeData() + { + Lib3MFHandle hVolumeDataInstance = nullptr; + CheckError(lib3mf_model_addvolumedata(m_pHandle, &hVolumeDataInstance)); + + if (!hVolumeDataInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hVolumeDataInstance))); + } + + /** + * CModel::AddLevelSet - adds an empty boundary shape object to the model. + * @return returns the mesh object instance + */ + PLevelSet CModel::AddLevelSet() + { + Lib3MFHandle hLevelSetInstance = nullptr; + CheckError(lib3mf_model_addlevelset(m_pHandle, &hLevelSetInstance)); + + if (!hLevelSetInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hLevelSetInstance))); + } + + /** + * CModel::GetLevelSets - creates a resource iterator instance with all boundary shape resources. + * @return returns the iterator instance. + */ + PLevelSetIterator CModel::GetLevelSets() + { + Lib3MFHandle hResourceIterator = nullptr; + CheckError(lib3mf_model_getlevelsets(m_pHandle, &hResourceIterator)); + + if (!hResourceIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResourceIterator))); + } + + /** + * CModel::RemoveResource - Removes a resource from the model + * @param[in] pResource - The resource to remove + */ + void CModel::RemoveResource(classParam pResource) + { + Lib3MFHandle hResource = pResource.GetHandle(); + CheckError(lib3mf_model_removeresource(m_pHandle, hResource)); + } } // namespace Lib3MF diff --git a/Autogenerated/Bindings/Cpp/lib3mf_types.hpp b/Autogenerated/Bindings/Cpp/lib3mf_types.hpp index 705f02718..61ecedc56 100644 --- a/Autogenerated/Bindings/Cpp/lib3mf_types.hpp +++ b/Autogenerated/Bindings/Cpp/lib3mf_types.hpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++-Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -83,8 +83,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 3 -#define LIB3MF_VERSION_MICRO 2 +#define LIB3MF_VERSION_MINOR 4 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -129,13 +129,18 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER 140 /** A progress identifier is unknown */ #define LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT 141 /** An element buffer exceeds its spec limit */ #define LIB3MF_ERROR_INVALIDRESOURCE 142 /** A resource is invalid */ +#define LIB3MF_ERROR_INVALIDLEVELSET 143 /** A level set is invalid */ #define LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE 2000 /** This object type is not valid for beamlattices */ #define LIB3MF_ERROR_INVALIDKEYSTORE 3000 /** The keystore object is invalid */ #define LIB3MF_ERROR_INVALIDKEYSTORECONSUMER 3001 /** The consumer keystore object is invalid */ #define LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND 3002 /** A consumer has not been found */ #define LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND 3003 /** A resource data has not been found */ #define LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED 3004 /** A Key or Conentent encryption callback has not been registered */ -#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key siue is invalid */ +#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key size is invalid */ +#define LIB3MF_ERROR_INCOMPATIBLEPORTTYPES 4000 /** Link could not be added, the port types are incompatible */ +#define LIB3MF_ERROR_GRAPHISCYCLIC 4001 /** The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted. */ +#define LIB3MF_ERROR_INPUTNOTSET 4002 /** The input of a node is not set. */ +#define LIB3MF_ERROR_INVALIDNODECONFIGURATION 4003 /** The selected node configuration is not supported */ /************************************************************************************************************************* Error strings for Lib3MF @@ -180,13 +185,18 @@ inline const char * LIB3MF_GETERRORSTRING (Lib3MFResult nErrorCode) { case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "A progress identifier is unknown"; case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "An element buffer exceeds its spec limit"; case LIB3MF_ERROR_INVALIDRESOURCE: return "A resource is invalid"; + case LIB3MF_ERROR_INVALIDLEVELSET: return "A level set is invalid"; case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "This object type is not valid for beamlattices"; case LIB3MF_ERROR_INVALIDKEYSTORE: return "The keystore object is invalid"; case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "The consumer keystore object is invalid"; case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: return "A consumer has not been found"; case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "A resource data has not been found"; case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "A Key or Conentent encryption callback has not been registered"; - case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key siue is invalid"; + case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key size is invalid"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "Link could not be added, the port types are incompatible"; + case LIB3MF_ERROR_GRAPHISCYCLIC: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case LIB3MF_ERROR_INPUTNOTSET: return "The input of a node is not set."; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "The selected node configuration is not supported"; default: return "unknown error"; } } @@ -211,11 +221,21 @@ typedef Lib3MFHandle Lib3MF_ColorGroupIterator; typedef Lib3MFHandle Lib3MF_Texture2DGroupIterator; typedef Lib3MFHandle Lib3MF_CompositeMaterialsIterator; typedef Lib3MFHandle Lib3MF_MultiPropertyGroupIterator; +typedef Lib3MFHandle Lib3MF_Image3DIterator; +typedef Lib3MFHandle Lib3MF_FunctionIterator; +typedef Lib3MFHandle Lib3MF_LevelSetIterator; typedef Lib3MFHandle Lib3MF_MetaData; typedef Lib3MFHandle Lib3MF_MetaDataGroup; typedef Lib3MFHandle Lib3MF_Object; typedef Lib3MFHandle Lib3MF_MeshObject; +typedef Lib3MFHandle Lib3MF_LevelSet; typedef Lib3MFHandle Lib3MF_BeamLattice; +typedef Lib3MFHandle Lib3MF_FunctionReference; +typedef Lib3MFHandle Lib3MF_VolumeDataColor; +typedef Lib3MFHandle Lib3MF_MaterialMapping; +typedef Lib3MFHandle Lib3MF_VolumeDataComposite; +typedef Lib3MFHandle Lib3MF_VolumeDataProperty; +typedef Lib3MFHandle Lib3MF_VolumeData; typedef Lib3MFHandle Lib3MF_Component; typedef Lib3MFHandle Lib3MF_ComponentsObject; typedef Lib3MFHandle Lib3MF_BeamSet; @@ -224,8 +244,71 @@ typedef Lib3MFHandle Lib3MF_ColorGroup; typedef Lib3MFHandle Lib3MF_Texture2DGroup; typedef Lib3MFHandle Lib3MF_CompositeMaterials; typedef Lib3MFHandle Lib3MF_MultiPropertyGroup; +typedef Lib3MFHandle Lib3MF_Image3D; +typedef Lib3MFHandle Lib3MF_ImageStack; typedef Lib3MFHandle Lib3MF_Attachment; typedef Lib3MFHandle Lib3MF_Texture2D; +typedef Lib3MFHandle Lib3MF_ImplicitPort; +typedef Lib3MFHandle Lib3MF_Iterator; +typedef Lib3MFHandle Lib3MF_ImplicitPortIterator; +typedef Lib3MFHandle Lib3MF_ImplicitNode; +typedef Lib3MFHandle Lib3MF_OneInputNode; +typedef Lib3MFHandle Lib3MF_SinNode; +typedef Lib3MFHandle Lib3MF_CosNode; +typedef Lib3MFHandle Lib3MF_TanNode; +typedef Lib3MFHandle Lib3MF_ArcSinNode; +typedef Lib3MFHandle Lib3MF_ArcCosNode; +typedef Lib3MFHandle Lib3MF_ArcTanNode; +typedef Lib3MFHandle Lib3MF_SinhNode; +typedef Lib3MFHandle Lib3MF_CoshNode; +typedef Lib3MFHandle Lib3MF_TanhNode; +typedef Lib3MFHandle Lib3MF_RoundNode; +typedef Lib3MFHandle Lib3MF_CeilNode; +typedef Lib3MFHandle Lib3MF_FloorNode; +typedef Lib3MFHandle Lib3MF_SignNode; +typedef Lib3MFHandle Lib3MF_FractNode; +typedef Lib3MFHandle Lib3MF_AbsNode; +typedef Lib3MFHandle Lib3MF_ExpNode; +typedef Lib3MFHandle Lib3MF_LogNode; +typedef Lib3MFHandle Lib3MF_Log2Node; +typedef Lib3MFHandle Lib3MF_Log10Node; +typedef Lib3MFHandle Lib3MF_LengthNode; +typedef Lib3MFHandle Lib3MF_TransposeNode; +typedef Lib3MFHandle Lib3MF_InverseNode; +typedef Lib3MFHandle Lib3MF_SqrtNode; +typedef Lib3MFHandle Lib3MF_ResourceIdNode; +typedef Lib3MFHandle Lib3MF_TwoInputNode; +typedef Lib3MFHandle Lib3MF_AdditionNode; +typedef Lib3MFHandle Lib3MF_SubtractionNode; +typedef Lib3MFHandle Lib3MF_MultiplicationNode; +typedef Lib3MFHandle Lib3MF_DivisionNode; +typedef Lib3MFHandle Lib3MF_DotNode; +typedef Lib3MFHandle Lib3MF_CrossNode; +typedef Lib3MFHandle Lib3MF_ArcTan2Node; +typedef Lib3MFHandle Lib3MF_MatVecMultiplicationNode; +typedef Lib3MFHandle Lib3MF_MinNode; +typedef Lib3MFHandle Lib3MF_MaxNode; +typedef Lib3MFHandle Lib3MF_FmodNode; +typedef Lib3MFHandle Lib3MF_ModNode; +typedef Lib3MFHandle Lib3MF_PowNode; +typedef Lib3MFHandle Lib3MF_SelectNode; +typedef Lib3MFHandle Lib3MF_ClampNode; +typedef Lib3MFHandle Lib3MF_ComposeVectorNode; +typedef Lib3MFHandle Lib3MF_VectorFromScalarNode; +typedef Lib3MFHandle Lib3MF_DecomposeVectorNode; +typedef Lib3MFHandle Lib3MF_ComposeMatrixNode; +typedef Lib3MFHandle Lib3MF_MatrixFromRowsNode; +typedef Lib3MFHandle Lib3MF_MatrixFromColumnsNode; +typedef Lib3MFHandle Lib3MF_ConstantNode; +typedef Lib3MFHandle Lib3MF_ConstVecNode; +typedef Lib3MFHandle Lib3MF_ConstMatNode; +typedef Lib3MFHandle Lib3MF_MeshNode; +typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_FunctionCallNode; +typedef Lib3MFHandle Lib3MF_NodeIterator; +typedef Lib3MFHandle Lib3MF_Function; +typedef Lib3MFHandle Lib3MF_ImplicitFunction; +typedef Lib3MFHandle Lib3MF_FunctionFromImage3D; typedef Lib3MFHandle Lib3MF_BuildItem; typedef Lib3MFHandle Lib3MF_BuildItemIterator; typedef Lib3MFHandle Lib3MF_Slice; @@ -306,7 +389,7 @@ namespace Lib3MF { }; enum class eBeamLatticeBallMode : Lib3MF_int32 { - None = 0, + BeamLatticeBallModeNone = 0, Mixed = 1, All = 2 }; @@ -344,6 +427,103 @@ namespace Lib3MF { Multiply = 2 }; + enum class eChannelName : Lib3MF_int32 { + Red = 0, + Green = 1, + Blue = 2, + Alpha = 3 + }; + + enum class eCompositionMethod : Lib3MF_int32 { + WeightedSum = 0, + Multiply = 1, + Min = 2, + Max = 3, + Mask = 4 + }; + + enum class eCompositionSpace : Lib3MF_int32 { + Raw = 0, + LinearColor = 1 + }; + + /** + * enum class eImplicitNodeType - The type of the node + */ + enum class eImplicitNodeType : Lib3MF_int32 { + Addition = 1, /** Adds to values (scalar or vector) */ + Subtraction = 2, /** Subtracts two values (scalar or vector) */ + Multiplication = 3, /** Multiplies two values (scalar or vector) */ + Division = 4, /** Divides two values (scalar or vector) */ + Constant = 5, /** A constant scalar value */ + ConstVec = 6, /** A constant vector value */ + ConstMat = 7, /** A constant matrix value */ + ComposeVector = 8, /** Creates a vector from three scalar values */ + DecomposeVector = 9, /** Decomposes a vector into three scalar values */ + ComposeMatrix = 10, /** Creates a matrix from nine scalar values */ + MatrixFromColumns = 11, /** Creates a matrix from three column vector values */ + MatrixFromRows = 12, /** Creates a matrix from three row vector values */ + Dot = 13, /** Calculates the dot product of two vector values */ + Cross = 14, /** Calculates the cross product of two vector values */ + MatVecMultiplication = 15, /** Multiplies a matrix with a vector */ + Transpose = 16, /** Transposes a matrix */ + Inverse = 17, /** Computes the inverse of a matrix */ + Sinus = 18, /** Calculates the sinus */ + Cosinus = 19, /** Calculates the cosinus */ + Tan = 20, /** Calculates the tangent */ + ArcSin = 21, /** Calculates the arcsinus */ + ArcCos = 22, /** Calculates the arccosinus */ + ArcTan = 23, /** Calculates the arctangent */ + ArcTan2 = 24, /** Calculates the arctangent */ + Min = 25, /** Calculates the minimum tow values */ + Max = 26, /** Calculates the maximum of two values */ + Abs = 27, /** Calcul the absolute value */ + Fmod = 28, /** Computes the remainder of the divison of the inputs (same behavior as C fmod) */ + Pow = 29, /** Calculates the power A^B */ + Sqrt = 30, /** Calculates the square root */ + Exp = 31, /** Exponential function */ + Log = 32, /** Natural logarithmus */ + Log2 = 33, /** Logarithmus to the base 2 */ + Log10 = 34, /** Logarithmus to the base 10 */ + Select = 35, /** If A is less B returns C, else D */ + Clamp = 36, /** Clamps the input value to min and max */ + Sinh = 37, /** Calculates the hyperbolic sine */ + Cosh = 38, /** Calculates the hyperbolic cosine */ + Tanh = 39, /** Calculates the hyperbolic tangent */ + Round = 40, /** Rounds a scalar value to the nearest integer */ + Ceil = 41, /** Rounds a scalar value up to the nearest integer */ + Floor = 42, /** Rounds a scalar value down to the nearest integer */ + Sign = 43, /** Returns the sign */ + Fract = 44, /** Returns the fractional part */ + FunctionCall = 45, /** Calls a function */ + Mesh = 46, /** Calculates the signed distance to a mesh */ + Length = 47, /** Calculates the length of a vector */ + ConstResourceID = 48, /** Selects a resource (function, mesh etc.) */ + VectorFromScalar = 49, /** Creates a vector from one scalar values */ + UnsignedMesh = 50, /** Calculates the unsigned distance to a mesh */ + Mod = 51 /** Calculates the modulo of two values (same behaviour as glsl mod) */ + }; + + /** + * enum class eImplicitPortType - The type of the port + */ + enum class eImplicitPortType : Lib3MF_int32 { + Scalar = 1, /** Scalar */ + Vector = 2, /** Vector */ + Matrix = 3, /** 4x4 Matrix */ + ResourceID = 4 /** Resource ID */ + }; + + /** + * enum class eImplicitNodeConfiguration - Defines the input and output types of a node + */ + enum class eImplicitNodeConfiguration : Lib3MF_int32 { + Default = 1, /** Default */ + ScalarToScalar = 2, /** Scalar -> Scalar */ + VectorToVector = 3, /** Vector -> Vector */ + MatrixToMatrix = 4 /** Matrix -> Matrix */ + }; + enum class eEncryptionAlgorithm : Lib3MF_int32 { AES256_GCM = 1 /** http://www.w3.org/2009/xmlenc11#aes256-gcm */ }; @@ -435,6 +615,14 @@ namespace Lib3MF { Lib3MF_double m_Radius; } sBall; + typedef struct sVector { + Lib3MF_double m_Coordinates[3]; + } sVector; + + typedef struct sMatrix4x4 { + Lib3MF_double m_Field[4][4]; + } sMatrix4x4; + #pragma pack () /************************************************************************************************************************* @@ -530,6 +718,12 @@ typedef Lib3MF::eBeamLatticeClipMode eLib3MFBeamLatticeClipMode; typedef Lib3MF::eBeamLatticeBallMode eLib3MFBeamLatticeBallMode; typedef Lib3MF::eProgressIdentifier eLib3MFProgressIdentifier; typedef Lib3MF::eBlendMethod eLib3MFBlendMethod; +typedef Lib3MF::eChannelName eLib3MFChannelName; +typedef Lib3MF::eCompositionMethod eLib3MFCompositionMethod; +typedef Lib3MF::eCompositionSpace eLib3MFCompositionSpace; +typedef Lib3MF::eImplicitNodeType eLib3MFImplicitNodeType; +typedef Lib3MF::eImplicitPortType eLib3MFImplicitPortType; +typedef Lib3MF::eImplicitNodeConfiguration eLib3MFImplicitNodeConfiguration; typedef Lib3MF::eEncryptionAlgorithm eLib3MFEncryptionAlgorithm; typedef Lib3MF::eWrappingAlgorithm eLib3MFWrappingAlgorithm; typedef Lib3MF::eMgfAlgorithm eLib3MFMgfAlgorithm; @@ -547,6 +741,8 @@ typedef Lib3MF::sBox sLib3MFBox; typedef Lib3MF::sColor sLib3MFColor; typedef Lib3MF::sBeam sLib3MFBeam; typedef Lib3MF::sBall sLib3MFBall; +typedef Lib3MF::sVector sLib3MFVector; +typedef Lib3MF::sMatrix4x4 sLib3MFMatrix4x4; typedef Lib3MF::ProgressCallback Lib3MFProgressCallback; typedef Lib3MF::WriteCallback Lib3MFWriteCallback; typedef Lib3MF::ReadCallback Lib3MFReadCallback; diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_abi.hpp b/Autogenerated/Bindings/CppDynamic/lib3mf_abi.hpp index 4efde3a1a..6b1dac4a1 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_abi.hpp +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_abi.hpp @@ -564,6 +564,45 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerialsiterator_getcurrentcomposi */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup(Lib3MF_MultiPropertyGroupIterator pMultiPropertyGroupIterator, Lib3MF_MultiPropertyGroup * pResource); +/************************************************************************************************************************* + Class definition for Image3DIterator +**************************************************************************************************************************/ + +/** +* Returns the Image3D the iterator points at. +* +* @param[in] pImage3DIterator - Image3DIterator instance. +* @param[out] pResource - returns the Image3D instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3diterator_getcurrentimage3d(Lib3MF_Image3DIterator pImage3DIterator, Lib3MF_Image3D * pResource); + +/************************************************************************************************************************* + Class definition for ScalarFieldIterator +**************************************************************************************************************************/ + +/** +* Returns the ScalarField the iterator points at. +* +* @param[in] pScalarFieldIterator - ScalarFieldIterator instance. +* @param[out] pResource - returns the ScalarField instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfielditerator_getcurrentscalarfield(Lib3MF_ScalarFieldIterator pScalarFieldIterator, Lib3MF_ScalarField * pResource); + +/************************************************************************************************************************* + Class definition for Vector3DFieldIterator +**************************************************************************************************************************/ + +/** +* Returns the Vector3DField the iterator points at. +* +* @param[in] pVector3DFieldIterator - Vector3DFieldIterator instance. +* @param[out] pResource - returns the Vector3DField instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfielditerator_getcurrentvector3dfield(Lib3MF_Vector3DFieldIterator pVector3DFieldIterator, Lib3MF_Vector3DField * pResource); + /************************************************************************************************************************* Class definition for MetaData **************************************************************************************************************************/ @@ -1155,6 +1194,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_ismanifoldandoriented(Lib3MF_Mesh */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_beamlattice(Lib3MF_MeshObject pMeshObject, Lib3MF_BeamLattice * pTheBeamLattice); +/** +* Retrieves the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_volumedata(Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData * pTheVolumeData); + /************************************************************************************************************************* Class definition for BeamLattice **************************************************************************************************************************/ @@ -1273,116 +1321,1023 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_addbeam(Lib3MF_BeamLattice pBeam * @param[in] pBeamInfo - filled with the beam indices, radii and capmodes. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_setbeam(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const Lib3MF::sBeam * pBeamInfo); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_setbeam(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const Lib3MF::sBeam * pBeamInfo); + +/** +* Sets all beam indices, radii and capmodes of a mesh object. +* +* @param[in] pBeamLattice - BeamLattice instance. +* @param[in] nBeamInfoBufferSize - Number of elements in buffer +* @param[in] pBeamInfoBuffer - Beam buffer of contains information of a number of beams +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_setbeams(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBeamInfoBufferSize, const Lib3MF::sBeam * pBeamInfoBuffer); + +/** +* obtains all beam indices, radii and capmodes of a mesh object. +* +* @param[in] pBeamLattice - BeamLattice instance. +* @param[in] nBeamInfoBufferSize - Number of elements in buffer +* @param[out] pBeamInfoNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBeamInfoBuffer - Beam buffer of contains information of all beams +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getbeams(Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBeamInfoBufferSize, Lib3MF_uint64* pBeamInfoNeededCount, Lib3MF::sBeam * pBeamInfoBuffer); + +/** +* Returns the ball count of a mesh object. +* +* @param[in] pBeamLattice - BeamLattice instance. +* @param[out] pCount - filled with the ball count. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getballcount(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount); + +/** +* Returns index and radius of a single ball of a mesh object. +* +* @param[in] pBeamLattice - BeamLattice instance. +* @param[in] nIndex - Index of the ball (0 to ballcount - 1). +* @param[out] pBallInfo - filled with the ball node index and radius. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getball(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF::sBall * pBallInfo); + +/** +* Adds a single ball to a mesh object. +* +* @param[in] pBeamLattice - BeamLattice instance. +* @param[in] pBallInfo - contains the node index and radius. +* @param[out] pIndex - filled with the new Index of the ball. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_addball(Lib3MF_BeamLattice pBeamLattice, const Lib3MF::sBall * pBallInfo, Lib3MF_uint32 * pIndex); + +/** +* Sets the index and radius of a single ball of a mesh object. +* +* @param[in] pBeamLattice - BeamLattice instance. +* @param[in] nIndex - Index of the ball (0 to ballcount - 1). +* @param[in] pBallInfo - filled with the ball node index and radius. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_setball(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const Lib3MF::sBall * pBallInfo); + +/** +* Sets all ball indices and radii of a mesh object. +* +* @param[in] pBeamLattice - BeamLattice instance. +* @param[in] nBallInfoBufferSize - Number of elements in buffer +* @param[in] pBallInfoBuffer - Ball buffer of contains information of a number of balls +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_setballs(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBallInfoBufferSize, const Lib3MF::sBall * pBallInfoBuffer); + +/** +* obtains all ball indices and radii of a mesh object. +* +* @param[in] pBeamLattice - BeamLattice instance. +* @param[in] nBallInfoBufferSize - Number of elements in buffer +* @param[out] pBallInfoNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBallInfoBuffer - Ball buffer of contains information of all balls +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getballs(Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBallInfoBufferSize, Lib3MF_uint64* pBallInfoNeededCount, Lib3MF::sBall * pBallInfoBuffer); + +/** +* Returns the number of beamsets of a mesh object. +* +* @param[in] pBeamLattice - BeamLattice instance. +* @param[out] pCount - filled with the beamset count. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getbeamsetcount(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount); + +/** +* Adds an empty beamset to a mesh object +* +* @param[in] pBeamLattice - BeamLattice instance. +* @param[out] pBeamSet - the new beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_addbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3MF_BeamSet * pBeamSet); + +/** +* Returns a beamset of a mesh object +* +* @param[in] pBeamLattice - BeamLattice instance. +* @param[in] nIndex - index of the requested beamset (0 ... beamsetcount-1). +* @param[out] pBeamSet - the requested beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet); + +/************************************************************************************************************************* + Class definition for ScalarField +**************************************************************************************************************************/ + +/** +* Gets the name of this ScalarField. +* +* @param[in] pScalarField - ScalarField instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of The name of this ScalarField., may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfield_getname(Lib3MF_ScalarField pScalarField, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* Sets the name of this ScalarField. +* +* @param[in] pScalarField - ScalarField instance. +* @param[in] pName - The name of this ScalarField. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfield_setname(Lib3MF_ScalarField pScalarField, const char * pName); + +/** +* Retrieves, if this ScalarField is a ScalarFieldFromImage3D +* +* @param[in] pScalarField - ScalarField instance. +* @param[out] pIsFromImage3D - returns, whether the scalar field is a ScalarFieldFromImage3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfield_isfromimage3d(Lib3MF_ScalarField pScalarField, bool * pIsFromImage3D); + +/** +* Retrieves, if this ScalarField is a ScalarFieldConstant +* +* @param[in] pScalarField - ScalarField instance. +* @param[out] pIsConstant - returns, whether the scalar field is a ScalarFieldConstant +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfield_isconstant(Lib3MF_ScalarField pScalarField, bool * pIsConstant); + +/** +* Retrieves, if this ScalarField is a ScalarFieldComposed +* +* @param[in] pScalarField - ScalarField instance. +* @param[out] pIsComposed - returns, whether the scalar field is a ScalarFieldComposed +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfield_iscomposed(Lib3MF_ScalarField pScalarField, bool * pIsComposed); + +/************************************************************************************************************************* + Class definition for Vector3DField +**************************************************************************************************************************/ + +/** +* Gets the name of this Vector3DField. +* +* @param[in] pVector3DField - Vector3DField instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of The name of this Vector3DField., may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfield_getname(Lib3MF_Vector3DField pVector3DField, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* Sets the name of this Vector3DField. +* +* @param[in] pVector3DField - Vector3DField instance. +* @param[in] pName - The name of this Vector3DField. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfield_setname(Lib3MF_Vector3DField pVector3DField, const char * pName); + +/** +* Retrieves, if this Vector3DField is a Vector3DFieldFromImage3D +* +* @param[in] pVector3DField - Vector3DField instance. +* @param[out] pIsFromImage3D - returns, whether the 3d vector field is a Vector3DFieldFromImage3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfield_isfromimage3d(Lib3MF_Vector3DField pVector3DField, bool * pIsFromImage3D); + +/** +* Retrieves, if this Vector3DField is a Vector3DFieldConstant +* +* @param[in] pVector3DField - Vector3DField instance. +* @param[out] pIsConstant - returns, whether the 3d vector field is a Vector3DFieldConstant +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfield_isconstant(Lib3MF_Vector3DField pVector3DField, bool * pIsConstant); + +/** +* Retrieves, if this Vector3DField is a Vector3DFieldComposed +* +* @param[in] pVector3DField - Vector3DField instance. +* @param[out] pIsComposed - returns, whether the 3d vector field is a Vector3DFieldComposed +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfield_iscomposed(Lib3MF_Vector3DField pVector3DField, bool * pIsComposed); + +/************************************************************************************************************************* + Class definition for ScalarFieldFromImage3D +**************************************************************************************************************************/ + +/** +* Returns the selected 3D image. +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[out] pImage3D - image instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_getimage(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF_Image3D * pImage3D); + +/** +* Sets the 3D image of the selector. +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[in] pImage3D - image instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_setimage(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF_Image3D pImage3D); + +/** +* Sets the channel name to be picked from the referenced Image3D. +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[in] eName - Sets the channel name. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_setchannel(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF::eChannelName eName); + +/** +* Gets the channel name to be picked from the referenced Image3D. +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[out] pName - Sets the channel name. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_getchannel(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF::eChannelName * pName); + +/** +* Sets the texture filter of the selector. +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[in] eFilter - texture filter +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_setfilter(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF::eTextureFilter eFilter); + +/** +* Returns the texture filter of the selector. +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[out] pFilter - texture filter +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_getfilter(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF::eTextureFilter * pFilter); + +/** +* Sets the tile styles of the selector. +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[in] eTileStyleU - tile style in U +* @param[in] eTileStyleV - tile style in V +* @param[in] eTileStyleW - tile style in W +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_settilestyles(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF::eTextureTileStyle eTileStyleU, Lib3MF::eTextureTileStyle eTileStyleV, Lib3MF::eTextureTileStyle eTileStyleW); + +/** +* Retrieves the tile styles of the selector. +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[out] pTileStyleU - tile style in U +* @param[out] pTileStyleV - tile style in V +* @param[out] pTileStyleW - tile style in W +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_gettilestyles(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF::eTextureTileStyle * pTileStyleU, Lib3MF::eTextureTileStyle * pTileStyleV, Lib3MF::eTextureTileStyle * pTileStyleW); + +/** +* returns the offset value for the pixel values in the Image3D +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[out] pOffset - the offset value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_getoffset(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF_double * pOffset); + +/** +* Sets the offset value for the pixel values in the Image3D +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[in] dOffset - the offset value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_setoffset(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF_double dOffset); + +/** +* returns the scale value for the pixel values in the Image3D +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[out] pScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_getscale(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF_double * pScale); + +/** +* Sets the scale value for the pixel values in the Image3D +* +* @param[in] pScalarFieldFromImage3D - ScalarFieldFromImage3D instance. +* @param[in] dScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldfromimage3d_setscale(Lib3MF_ScalarFieldFromImage3D pScalarFieldFromImage3D, Lib3MF_double dScale); + +/************************************************************************************************************************* + Class definition for ScalarFieldConstant +**************************************************************************************************************************/ + +/** +* returns the constant value of this ScalarFieldConstant +* +* @param[in] pScalarFieldConstant - ScalarFieldConstant instance. +* @param[out] pValue - the constant value of this ScalarFieldConstant +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldconstant_getvalue(Lib3MF_ScalarFieldConstant pScalarFieldConstant, Lib3MF_double * pValue); + +/** +* Sets the constant value of this ScalarFieldConstant +* +* @param[in] pScalarFieldConstant - ScalarFieldConstant instance. +* @param[in] dValue - the constant value of this ScalarFieldConstant +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldconstant_setvalue(Lib3MF_ScalarFieldConstant pScalarFieldConstant, Lib3MF_double dValue); + +/************************************************************************************************************************* + Class definition for ScalarFieldComposed +**************************************************************************************************************************/ + +/** +* Sets the method to used for composition. +* +* @param[in] pScalarFieldComposed - ScalarFieldComposed instance. +* @param[in] eTheMethod - Sets the composition method. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldcomposed_setmethod(Lib3MF_ScalarFieldComposed pScalarFieldComposed, Lib3MF::eCompositionMethod eTheMethod); + +/** +* Gets the method to used for composition. +* +* @param[in] pScalarFieldComposed - ScalarFieldComposed instance. +* @param[out] pTheMethod - Gets the composition method. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldcomposed_getmethod(Lib3MF_ScalarFieldComposed pScalarFieldComposed, Lib3MF::eCompositionMethod * pTheMethod); + +/** +* returns the factor scalar field 1 is multiplied with when composited +* +* @param[in] pScalarFieldComposed - ScalarFieldComposed instance. +* @param[out] pFactor1 - the factor scalar field 1 is multiplied with when composited +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldcomposed_getfactor1(Lib3MF_ScalarFieldComposed pScalarFieldComposed, Lib3MF_double * pFactor1); + +/** +* sets the factor scalar field 1 is multiplied with when composited +* +* @param[in] pScalarFieldComposed - ScalarFieldComposed instance. +* @param[in] dFactor1 - the factor scalar field 1 is multiplied with when composited +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldcomposed_setfactor1(Lib3MF_ScalarFieldComposed pScalarFieldComposed, Lib3MF_double dFactor1); + +/** +* returns the factor scalar field 2 is multiplied with when composited +* +* @param[in] pScalarFieldComposed - ScalarFieldComposed instance. +* @param[out] pFactor2 - the factor scalar field 2 is multiplied with when composited +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldcomposed_getfactor2(Lib3MF_ScalarFieldComposed pScalarFieldComposed, Lib3MF_double * pFactor2); + +/** +* sets the factor scalar field 2 is multiplied with when composited +* +* @param[in] pScalarFieldComposed - ScalarFieldComposed instance. +* @param[in] dFactor2 - the factor scalar field 2 is multiplied with when composited +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldcomposed_setfactor2(Lib3MF_ScalarFieldComposed pScalarFieldComposed, Lib3MF_double dFactor2); + +/** +* Access to the ScalarFieldReference for the first composited field +* +* @param[in] pScalarFieldComposed - ScalarFieldComposed instance. +* @param[out] pTheScalarFieldReference1 - ScalarFieldReference +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldcomposed_scalarfieldreference1(Lib3MF_ScalarFieldComposed pScalarFieldComposed, Lib3MF_ScalarFieldReference * pTheScalarFieldReference1); + +/** +* Access to the ScalarFieldReference for the second composited field +* +* @param[in] pScalarFieldComposed - ScalarFieldComposed instance. +* @param[out] pTheScalarFieldReference1 - ScalarFieldReference +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldcomposed_scalarfieldreference2(Lib3MF_ScalarFieldComposed pScalarFieldComposed, Lib3MF_ScalarFieldReference * pTheScalarFieldReference1); + +/** +* Access to the ScalarFieldReference for masking. Only relevant if the Method is mask. +* +* @param[in] pScalarFieldComposed - ScalarFieldComposed instance. +* @param[out] pTheScalarFieldReferenceMask - ScalarFieldReference +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldcomposed_scalarfieldreferencemask(Lib3MF_ScalarFieldComposed pScalarFieldComposed, Lib3MF_ScalarFieldReference * pTheScalarFieldReferenceMask); + +/************************************************************************************************************************* + Class definition for Vector3DFieldFromImage3D +**************************************************************************************************************************/ + +/** +* Returns the selected 3D image. +* +* @param[in] pVector3DFieldFromImage3D - Vector3DFieldFromImage3D instance. +* @param[out] pImage3D - image instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldfromimage3d_getimage(Lib3MF_Vector3DFieldFromImage3D pVector3DFieldFromImage3D, Lib3MF_Image3D * pImage3D); + +/** +* Sets the 3D image of the selector. +* +* @param[in] pVector3DFieldFromImage3D - Vector3DFieldFromImage3D instance. +* @param[in] pImage3D - image instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldfromimage3d_setimage(Lib3MF_Vector3DFieldFromImage3D pVector3DFieldFromImage3D, Lib3MF_Image3D pImage3D); + +/** +* Sets the texture filter of the selector. +* +* @param[in] pVector3DFieldFromImage3D - Vector3DFieldFromImage3D instance. +* @param[in] eFilter - texture filter +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldfromimage3d_setfilter(Lib3MF_Vector3DFieldFromImage3D pVector3DFieldFromImage3D, Lib3MF::eTextureFilter eFilter); + +/** +* Returns the texture filter of the selector. +* +* @param[in] pVector3DFieldFromImage3D - Vector3DFieldFromImage3D instance. +* @param[out] pFilter - texture filter +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldfromimage3d_getfilter(Lib3MF_Vector3DFieldFromImage3D pVector3DFieldFromImage3D, Lib3MF::eTextureFilter * pFilter); + +/** +* Sets the tile styles of the selector. +* +* @param[in] pVector3DFieldFromImage3D - Vector3DFieldFromImage3D instance. +* @param[in] eTileStyleU - tile style in U +* @param[in] eTileStyleV - tile style in V +* @param[in] eTileStyleW - tile style in W +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldfromimage3d_settilestyles(Lib3MF_Vector3DFieldFromImage3D pVector3DFieldFromImage3D, Lib3MF::eTextureTileStyle eTileStyleU, Lib3MF::eTextureTileStyle eTileStyleV, Lib3MF::eTextureTileStyle eTileStyleW); + +/** +* Retrieves the tile styles of the selector. +* +* @param[in] pVector3DFieldFromImage3D - Vector3DFieldFromImage3D instance. +* @param[out] pTileStyleU - tile style in U +* @param[out] pTileStyleV - tile style in V +* @param[out] pTileStyleW - tile style in W +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldfromimage3d_gettilestyles(Lib3MF_Vector3DFieldFromImage3D pVector3DFieldFromImage3D, Lib3MF::eTextureTileStyle * pTileStyleU, Lib3MF::eTextureTileStyle * pTileStyleV, Lib3MF::eTextureTileStyle * pTileStyleW); + +/** +* returns the offset value for the pixel values in the Image3D +* +* @param[in] pVector3DFieldFromImage3D - Vector3DFieldFromImage3D instance. +* @param[out] pOffset - the offset value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldfromimage3d_getoffset(Lib3MF_Vector3DFieldFromImage3D pVector3DFieldFromImage3D, Lib3MF_double * pOffset); + +/** +* Sets the offset value for the pixel values in the Image3D +* +* @param[in] pVector3DFieldFromImage3D - Vector3DFieldFromImage3D instance. +* @param[in] dOffset - the offset value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldfromimage3d_setoffset(Lib3MF_Vector3DFieldFromImage3D pVector3DFieldFromImage3D, Lib3MF_double dOffset); + +/** +* returns the scale value for the pixel values in the Image3D +* +* @param[in] pVector3DFieldFromImage3D - Vector3DFieldFromImage3D instance. +* @param[out] pScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldfromimage3d_getscale(Lib3MF_Vector3DFieldFromImage3D pVector3DFieldFromImage3D, Lib3MF_double * pScale); + +/** +* Sets the scale value for the pixel values in the Image3D +* +* @param[in] pVector3DFieldFromImage3D - Vector3DFieldFromImage3D instance. +* @param[in] dScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldfromimage3d_setscale(Lib3MF_Vector3DFieldFromImage3D pVector3DFieldFromImage3D, Lib3MF_double dScale); + +/************************************************************************************************************************* + Class definition for Vector3DFieldConstant +**************************************************************************************************************************/ + +/** +* returns the constant x-value of this Vector3DFieldConstant +* +* @param[in] pVector3DFieldConstant - Vector3DFieldConstant instance. +* @param[out] pValueX - the constant x-value of this Vector3DFieldConstant +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldconstant_getvaluex(Lib3MF_Vector3DFieldConstant pVector3DFieldConstant, Lib3MF_double * pValueX); + +/** +* Sets the constant x-value of this Vector3DFieldConstant +* +* @param[in] pVector3DFieldConstant - Vector3DFieldConstant instance. +* @param[in] dValueX - the constant x-value of this Vector3DFieldConstant +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldconstant_setvaluex(Lib3MF_Vector3DFieldConstant pVector3DFieldConstant, Lib3MF_double dValueX); + +/** +* returns the constant y-value of this Vector3DFieldConstant +* +* @param[in] pVector3DFieldConstant - Vector3DFieldConstant instance. +* @param[out] pValueY - the constant y-value of this Vector3DFieldConstant +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldconstant_getvaluey(Lib3MF_Vector3DFieldConstant pVector3DFieldConstant, Lib3MF_double * pValueY); + +/** +* Sets the constant y-value of this Vector3DFieldConstant +* +* @param[in] pVector3DFieldConstant - Vector3DFieldConstant instance. +* @param[in] dValueY - the constant y-value of this Vector3DFieldConstant +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldconstant_setvaluey(Lib3MF_Vector3DFieldConstant pVector3DFieldConstant, Lib3MF_double dValueY); + +/** +* returns the constant x-value of this Vector3DFieldConstant +* +* @param[in] pVector3DFieldConstant - Vector3DFieldConstant instance. +* @param[out] pValueZ - the constant x-value of this Vector3DFieldConstant +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldconstant_getvaluez(Lib3MF_Vector3DFieldConstant pVector3DFieldConstant, Lib3MF_double * pValueZ); + +/** +* Sets the constant z-value of this Vector3DFieldConstant +* +* @param[in] pVector3DFieldConstant - Vector3DFieldConstant instance. +* @param[in] dValueZ - the constant z-value of this Vector3DFieldConstant +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldconstant_setvaluez(Lib3MF_Vector3DFieldConstant pVector3DFieldConstant, Lib3MF_double dValueZ); + +/************************************************************************************************************************* + Class definition for Vector3DFieldComposed +**************************************************************************************************************************/ + +/** +* Sets the method to used for composition. +* +* @param[in] pVector3DFieldComposed - Vector3DFieldComposed instance. +* @param[in] eTheMethod - Sets the composition method. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldcomposed_setmethod(Lib3MF_Vector3DFieldComposed pVector3DFieldComposed, Lib3MF::eCompositionMethod eTheMethod); + +/** +* Gets the method to used for composition. +* +* @param[in] pVector3DFieldComposed - Vector3DFieldComposed instance. +* @param[out] pTheMethod - Gets the composition method. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldcomposed_getmethod(Lib3MF_Vector3DFieldComposed pVector3DFieldComposed, Lib3MF::eCompositionMethod * pTheMethod); + +/** +* Sets the space in which composition takes place. +* +* @param[in] pVector3DFieldComposed - Vector3DFieldComposed instance. +* @param[in] eTheSpace - Sets the composition space. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldcomposed_setspace(Lib3MF_Vector3DFieldComposed pVector3DFieldComposed, Lib3MF::eCompositionSpace eTheSpace); + +/** +* Gets the space in which composition takes place. +* +* @param[in] pVector3DFieldComposed - Vector3DFieldComposed instance. +* @param[out] pTheSpace - Gets the composition space. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldcomposed_getspace(Lib3MF_Vector3DFieldComposed pVector3DFieldComposed, Lib3MF::eCompositionSpace * pTheSpace); + +/** +* returns the factor vector3d field 1 is multiplied with when composited +* +* @param[in] pVector3DFieldComposed - Vector3DFieldComposed instance. +* @param[out] pFactor1 - the factor vector3d field 1 is multiplied with when composited +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldcomposed_getfactor1(Lib3MF_Vector3DFieldComposed pVector3DFieldComposed, Lib3MF_double * pFactor1); + +/** +* sets the factor vector3d field 1 is multiplied with when composited +* +* @param[in] pVector3DFieldComposed - Vector3DFieldComposed instance. +* @param[in] dFactor1 - the factor vector3d field 1 is multiplied with when composited +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldcomposed_setfactor1(Lib3MF_Vector3DFieldComposed pVector3DFieldComposed, Lib3MF_double dFactor1); + +/** +* returns the vector3d scalar field 2 is multiplied with when composited +* +* @param[in] pVector3DFieldComposed - Vector3DFieldComposed instance. +* @param[out] pFactor2 - the factor vector3d field 2 is multiplied with when composited +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldcomposed_getfactor2(Lib3MF_Vector3DFieldComposed pVector3DFieldComposed, Lib3MF_double * pFactor2); + +/** +* sets the factor vector3d field 2 is multiplied with when composited +* +* @param[in] pVector3DFieldComposed - Vector3DFieldComposed instance. +* @param[in] dFactor2 - the factor vector3d field 2 is multiplied with when composited +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldcomposed_setfactor2(Lib3MF_Vector3DFieldComposed pVector3DFieldComposed, Lib3MF_double dFactor2); + +/** +* Access to the Vector3DFieldReference for the first composited field +* +* @param[in] pVector3DFieldComposed - Vector3DFieldComposed instance. +* @param[out] pTheVector3DFieldReference1 - Vector3DFieldReference +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldcomposed_vector3dfieldreference1(Lib3MF_Vector3DFieldComposed pVector3DFieldComposed, Lib3MF_Vector3DFieldReference * pTheVector3DFieldReference1); + +/** +* Access to the Vector3DFieldReference for the second composited field +* +* @param[in] pVector3DFieldComposed - Vector3DFieldComposed instance. +* @param[out] pTheVector3DFieldReference1 - Vector3DFieldReference +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldcomposed_vector3dfieldreference2(Lib3MF_Vector3DFieldComposed pVector3DFieldComposed, Lib3MF_Vector3DFieldReference * pTheVector3DFieldReference1); + +/** +* Access to the ScalarFieldReference for masking. Only relevant if the Method is mask. +* +* @param[in] pVector3DFieldComposed - Vector3DFieldComposed instance. +* @param[out] pTheScalarFieldReferenceMask - ScalarFieldReference +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldcomposed_scalarfieldreferencemask(Lib3MF_Vector3DFieldComposed pVector3DFieldComposed, Lib3MF_ScalarFieldReference * pTheScalarFieldReferenceMask); + +/************************************************************************************************************************* + Class definition for FieldReference +**************************************************************************************************************************/ + +/** +* Returns the UniqueResourceID of the Field (Scalar- or Vector3DField). +* +* @param[in] pFieldReference - FieldReference instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_fieldreference_getfieldresourceid(Lib3MF_FieldReference pFieldReference, Lib3MF_uint32 * pUniqueResourceID); + +/** +* Sets the UniqueResourceID to refer to. +* +* @param[in] pFieldReference - FieldReference instance. +* @param[in] nUniqueResourceID - UniqueResourceID of the Field (Scalar- or Vector3DField) +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_fieldreference_setfieldresourceid(Lib3MF_FieldReference pFieldReference, Lib3MF_uint32 nUniqueResourceID); + +/** +* Returns the transformation matrix into the coordinate system of the referenced Field. +* +* @param[in] pFieldReference - FieldReference instance. +* @param[out] pTransform - the transformation matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_fieldreference_gettransform(Lib3MF_FieldReference pFieldReference, Lib3MF::sTransform * pTransform); + +/** +* Sets the transformation matrix into the coordinate system of the referenced Field. +* +* @param[in] pFieldReference - FieldReference instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_fieldreference_settransform(Lib3MF_FieldReference pFieldReference, const Lib3MF::sTransform * pTransform); + +/************************************************************************************************************************* + Class definition for ScalarFieldReference +**************************************************************************************************************************/ + +/** +* Sets the ScalarField to use within this volume data item. +* +* @param[in] pScalarFieldReference - ScalarFieldReference instance. +* @param[in] pTheScalarField - ScalarField used in this element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_scalarfieldreference_setscalarfield(Lib3MF_ScalarFieldReference pScalarFieldReference, Lib3MF_ScalarField pTheScalarField); + +/************************************************************************************************************************* + Class definition for Vector3DFieldReference +**************************************************************************************************************************/ + +/** +* Sets the Vector3DField to use within this volume data item. +* +* @param[in] pVector3DFieldReference - Vector3DFieldReference instance. +* @param[in] pTheVector3DField - Vector3DField used in this element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_vector3dfieldreference_setvector3dfield(Lib3MF_Vector3DFieldReference pVector3DFieldReference, Lib3MF_Vector3DField pTheVector3DField); + +/************************************************************************************************************************* + Class definition for VolumeDataBoundary +**************************************************************************************************************************/ + +/** +* Returns the solidthreshold for the levelset function encoded in this VolumeDataBoundary +* +* @param[in] pVolumeDataBoundary - VolumeDataBoundary instance. +* @param[out] pTheSolidThreshold - The solidthreshold for the levelset function encoded in this VolumeDataBoundary +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataboundary_getsolidthreshold(Lib3MF_VolumeDataBoundary pVolumeDataBoundary, Lib3MF_double * pTheSolidThreshold); + +/** +* Sets the solidthreshold for the levelset function encoded in this VolumeDataBoundary +* +* @param[in] pVolumeDataBoundary - VolumeDataBoundary instance. +* @param[in] dTheSolidThreshold - The solidthreshold for the levelset function encoded in this VolumeDataBoundary +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataboundary_setsolidthreshold(Lib3MF_VolumeDataBoundary pVolumeDataBoundary, Lib3MF_double dTheSolidThreshold); + +/************************************************************************************************************************* + Class definition for VolumeDataColor +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MaterialMapping +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for VolumeDataComposite +**************************************************************************************************************************/ + +/** +* Returns the BaseMaterialGroup used within this volume data item +* +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pBaseMaterialGroupInstance - The BaseMaterialGroup instance of this VolumeDataComposite element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getbasematerialgroup(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); + +/** +* Sets the BaseMaterialGroup to use within this volume data item. +* +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_setbasematerialgroup(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance); + +/** +* Returns the number of material mappings of this VolumeDataComposite element +* +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pCount - the number of material mappings. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmappingcount(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); + +/** +* Returns MaterialMappting with given index +* +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - Index of the MaterialMapping in question. +* @param[out] pTheMaterialMapping - MaterialMapping used in this element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); + +/** +* Adds a the MaterialMapping +* +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pTransform - new transformation matrix +* @param[out] pTheMaterialMapping - The new MaterialMapping +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_addmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, const Lib3MF::sTransform * pTransform, Lib3MF_MaterialMapping * pTheMaterialMapping); + +/** +* Removes the MaterialMapping with given index +* +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - The index of the MaterialMapping to be removed. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_removematerialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex); + +/************************************************************************************************************************* + Class definition for VolumeDataProperty +**************************************************************************************************************************/ + +/** +* Gets the qualified name of this property. +* +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] nPropertyNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pPropertyNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPropertyNameBuffer - buffer of The qualified name of this property., may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_getname(Lib3MF_VolumeDataProperty pVolumeDataProperty, const Lib3MF_uint32 nPropertyNameBufferSize, Lib3MF_uint32* pPropertyNameNeededChars, char * pPropertyNameBuffer); + +/** +* Sets whether this property is required to process this 3MF document instance. +* +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_setisrequired(Lib3MF_VolumeDataProperty pVolumeDataProperty, bool bIsRequired); + +/** +* Returns whether this property is required to process this 3MF document instance. +* +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[out] pIsRequired - Is this property required to process this 3MF document instance? +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_isrequired(Lib3MF_VolumeDataProperty pVolumeDataProperty, bool * pIsRequired); + +/************************************************************************************************************************* + Class definition for VolumeData +**************************************************************************************************************************/ + +/** +* Returns the VolumeDataBoundary of this VolumeData instance +* +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheLevelSetData - filled with the VolumeDataBoundary of this VolumeData instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getboundary(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataBoundary * pTheLevelSetData); + +/** +* Creates a new VolumeDataBoundary for this VolumeData instance +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pTheScalarField - ScalarField used in this element +* @param[out] pTheLevelSetData - The new VolumeDataBoundary of this VolumeData instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_createnewboundary(Lib3MF_VolumeData pVolumeData, Lib3MF_ScalarField pTheScalarField, Lib3MF_VolumeDataBoundary * pTheLevelSetData); + +/** +* Removes the VolumeDataBoundary of this VolumeData instance +* +* @param[in] pVolumeData - VolumeData instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removeboundary(Lib3MF_VolumeData pVolumeData); /** -* Sets all beam indices, radii and capmodes of a mesh object. +* Returns the VolumeDataComposite of this VolumeData instance * -* @param[in] pBeamLattice - BeamLattice instance. -* @param[in] nBeamInfoBufferSize - Number of elements in buffer -* @param[in] pBeamInfoBuffer - Beam buffer of contains information of a number of beams +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - filled with the VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_setbeams(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBeamInfoBufferSize, const Lib3MF::sBeam * pBeamInfoBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getcomposite(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* obtains all beam indices, radii and capmodes of a mesh object. +* Creates a new VolumeDataComposite for this VolumeData instance * -* @param[in] pBeamLattice - BeamLattice instance. -* @param[in] nBeamInfoBufferSize - Number of elements in buffer -* @param[out] pBeamInfoNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBeamInfoBuffer - Beam buffer of contains information of all beams +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - The new VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getbeams(Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBeamInfoBufferSize, Lib3MF_uint64* pBeamInfoNeededCount, Lib3MF::sBeam * pBeamInfoBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_createnewcomposite(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* Returns the ball count of a mesh object. +* Removes the VolumeDataComposite of this VolumeData instance * -* @param[in] pBeamLattice - BeamLattice instance. -* @param[out] pCount - filled with the ball count. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getballcount(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removecomposite(Lib3MF_VolumeData pVolumeData); /** -* Returns index and radius of a single ball of a mesh object. +* Returns the VolumeDataColor of this VolumeData instance * -* @param[in] pBeamLattice - BeamLattice instance. -* @param[in] nIndex - Index of the ball (0 to ballcount - 1). -* @param[out] pBallInfo - filled with the ball node index and radius. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheColorData - filled with the VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getball(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF::sBall * pBallInfo); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getcolor(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataColor * pTheColorData); /** -* Adds a single ball to a mesh object. +* Creates a new VolumeDataColor for this VolumeData instance * -* @param[in] pBeamLattice - BeamLattice instance. -* @param[in] pBallInfo - contains the node index and radius. -* @param[out] pIndex - filled with the new Index of the ball. +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pTheVector3DField - Vector3DField used in this element +* @param[out] pTheColorData - The new VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_addball(Lib3MF_BeamLattice pBeamLattice, const Lib3MF::sBall * pBallInfo, Lib3MF_uint32 * pIndex); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_createnewcolor(Lib3MF_VolumeData pVolumeData, Lib3MF_Vector3DField pTheVector3DField, Lib3MF_VolumeDataColor * pTheColorData); /** -* Sets the index and radius of a single ball of a mesh object. +* Removes the VolumeDataColor of this VolumeData instance * -* @param[in] pBeamLattice - BeamLattice instance. -* @param[in] nIndex - Index of the ball (0 to ballcount - 1). -* @param[in] pBallInfo - filled with the ball node index and radius. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_setball(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const Lib3MF::sBall * pBallInfo); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removecolor(Lib3MF_VolumeData pVolumeData); /** -* Sets all ball indices and radii of a mesh object. +* Returns the number of VolumeDataProperty * -* @param[in] pBeamLattice - BeamLattice instance. -* @param[in] nBallInfoBufferSize - Number of elements in buffer -* @param[in] pBallInfoBuffer - Ball buffer of contains information of a number of balls +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_setballs(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBallInfoBufferSize, const Lib3MF::sBall * pBallInfoBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getpropertycount(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); /** -* obtains all ball indices and radii of a mesh object. +* Returns the VolumeDataProperty at a given Index * -* @param[in] pBeamLattice - BeamLattice instance. -* @param[in] nBallInfoBufferSize - Number of elements in buffer -* @param[out] pBallInfoNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBallInfoBuffer - Ball buffer of contains information of all balls +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be returned. +* @param[out] pTheVolumeDataProperty - the VolumeDataProperty at the given index. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getballs(Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBallInfoBufferSize, Lib3MF_uint64* pBallInfoNeededCount, Lib3MF::sBall * pBallInfoBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getproperty(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); /** -* Returns the number of beamsets of a mesh object. +* Adds a new VolumeDataProperty from a ScalarField * -* @param[in] pBeamLattice - BeamLattice instance. -* @param[out] pCount - filled with the beamset count. +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pName - the qualified name (namespace+name) of the Property +* @param[in] pTheScalarField - ScalarField used in this element +* @param[out] pTheVolumeDataProperty - the newly created VolumeDataProperty. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getbeamsetcount(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_addpropertyfromscalarfield(Lib3MF_VolumeData pVolumeData, const char * pName, Lib3MF_ScalarField pTheScalarField, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); /** -* Adds an empty beamset to a mesh object +* Adds a new VolumeDataProperty from a Vector3DField * -* @param[in] pBeamLattice - BeamLattice instance. -* @param[out] pBeamSet - the new beamset +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pName - the qualified name (namespace+name) of the Property +* @param[in] pTheVector3DField - Vector3DField used in this element +* @param[out] pTheVolumeDataProperty - the newly created VolumeDataProperty. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_addbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3MF_BeamSet * pBeamSet); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_addpropertyfromvector3dfield(Lib3MF_VolumeData pVolumeData, const char * pName, Lib3MF_Vector3DField pTheVector3DField, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); /** -* Returns a beamset of a mesh object +* Removes the VolumeDataProperty with a given index * -* @param[in] pBeamLattice - BeamLattice instance. -* @param[in] nIndex - index of the requested beamset (0 ... beamsetcount-1). -* @param[out] pBeamSet - the requested beamset +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be removed. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removeproperty(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex); /************************************************************************************************************************* Class definition for Component @@ -1973,6 +2928,144 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayer(Lib3MF_MultiProp */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removelayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); +/************************************************************************************************************************* + Class definition for Image3D +**************************************************************************************************************************/ + +/** +* returns the name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of the name of this Image3D, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_getname(Lib3MF_Image3D pImage3D, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* sets a new name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] pName - the new name of this Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_setname(Lib3MF_Image3D pImage3D, const char * pName); + +/** +* Retrieves, if this Image3D is a ImageStack +* +* @param[in] pImage3D - Image3D instance. +* @param[out] pIsImageStack - returns, whether the Image3D is an ImageStack +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_isimagestack(Lib3MF_Image3D pImage3D, bool * pIsImageStack); + +/************************************************************************************************************************* + Class definition for ImageStack +**************************************************************************************************************************/ + +/** +* Retrieves the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pRowCount - number of rows +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getrowcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pRowCount); + +/** +* Sets the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nRowCount - number of rows +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setrowcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nRowCount); + +/** +* Retrieves the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pColumnCount - number of columns +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getcolumncount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pColumnCount); + +/** +* Sets the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nColumnCount - number of columns +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setcolumncount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nColumnCount); + +/** +* Retrieves the number of images in the stack. +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pSheetCount - number of images +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getsheetcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pSheetCount); + +/** +* Retrieves a sheet of the stack. Raises an error if sheet is not set. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getsheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pSheet); + +/** +* Sets a sheet to an existing attachment. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setsheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment pSheet); + +/** +* Creates a new sheet attachment with empty data. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createemptysheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a memory buffer. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] nDataBufferSize - Number of elements in buffer +* @param[in] pDataBuffer - uint8 buffer of binary image data +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createsheetfrombuffer(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a file on disk. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] pFileName - file name to read from +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createsheetfromfile(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, const char * pFileName, Lib3MF_Attachment * pSheet); + /************************************************************************************************************************* Class definition for Attachment **************************************************************************************************************************/ @@ -3262,6 +4355,33 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getmultipropertygroups(Lib3MF_Model pM */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestacks(Lib3MF_Model pModel, Lib3MF_SliceStackIterator * pResourceIterator); +/** +* creates a resource iterator instance with all image3d resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getimage3ds(Lib3MF_Model pModel, Lib3MF_Image3DIterator * pResourceIterator); + +/** +* creates a resource iterator instance with all ScalarField resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getscalarfields(Lib3MF_Model pModel, Lib3MF_ScalarFieldIterator * pResourceIterator); + +/** +* creates a resource iterator instance with all Vector3DField resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getvector3dfields(Lib3MF_Model pModel, Lib3MF_Vector3DFieldIterator * pResourceIterator); + /** * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. * @@ -3356,6 +4476,164 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addcompositematerials(Lib3MF_Model pMo */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addmultipropertygroup(Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance); +/** +* creates a new 3D Image Resource +* +* @param[in] pModel - Model instance. +* @param[in] nColumnCount - the number of columns in each sheet. +* @param[in] nRowCount - the number of rows in each sheet. +* @param[in] nSheetCount - the number of sheets in the image stack. +* @param[out] pInstance - returns the new ImageStack instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addimagestack(Lib3MF_Model pModel, Lib3MF_uint32 nColumnCount, Lib3MF_uint32 nRowCount, Lib3MF_uint32 nSheetCount, Lib3MF_ImageStack * pInstance); + +/** +* finds an ImageStack object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pImageStackInstance - returns the image stack instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getimagestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ImageStack * pImageStackInstance); + +/** +* creates a new ScalarFieldFromImage3D Resource +* +* @param[in] pModel - Model instance. +* @param[in] pImage3D - image instance +* @param[out] pTheScalarFieldFromImage3D - returns the new ScalarFieldFromImage3D instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addscalarfieldfromimage3d(Lib3MF_Model pModel, Lib3MF_Image3D pImage3D, Lib3MF_ScalarFieldFromImage3D * pTheScalarFieldFromImage3D); + +/** +* creates a new ScalarFieldComposed Resource +* +* @param[in] pModel - Model instance. +* @param[out] pTheScalarFieldComposed - returns the new ScalarFieldComposed instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addscalarfieldcomposed(Lib3MF_Model pModel, Lib3MF_ScalarFieldComposed * pTheScalarFieldComposed); + +/** +* creates a new ScalarFieldConstant Resource +* +* @param[in] pModel - Model instance. +* @param[out] pTheScalarFieldConstant - returns the new ScalarFieldConstant instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addscalarfieldconstant(Lib3MF_Model pModel, Lib3MF_ScalarFieldConstant * pTheScalarFieldConstant); + +/** +* finds a ScalarField object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pScalarFieldInstance - returns the scalar field instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getscalarfieldbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ScalarField * pScalarFieldInstance); + +/** +* finds a ScalarFieldFromImage3D object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pScalarFieldFromImage3DInstance - returns the ScalarFieldFromImage3D instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getscalarfieldfromimage3dbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ScalarFieldFromImage3D * pScalarFieldFromImage3DInstance); + +/** +* finds a ScalarFieldComposed object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pScalarFieldComposedInstance - returns the ScalarFieldComponsed instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getscalarfieldcomposedbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ScalarFieldComposed * pScalarFieldComposedInstance); + +/** +* finds a ScalarFieldConstant object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pScalarFieldConstantInstance - returns the ScalarFieldConstant instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getscalarfieldconstantbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ScalarFieldConstant * pScalarFieldConstantInstance); + +/** +* creates a new Vector3DFieldFromImage3D Resource +* +* @param[in] pModel - Model instance. +* @param[in] pImage3D - image instance +* @param[out] pTheVector3DFieldFromImage3D - returns the new Vector3DFieldFromImage3D instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addvector3dfieldfromimage3d(Lib3MF_Model pModel, Lib3MF_Image3D pImage3D, Lib3MF_Vector3DFieldFromImage3D * pTheVector3DFieldFromImage3D); + +/** +* creates a new Vector3DFieldComposed Resource +* +* @param[in] pModel - Model instance. +* @param[out] pTheVector3DFieldComposed - returns the new Vector3DFieldComposed instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addvector3dfieldcomposed(Lib3MF_Model pModel, Lib3MF_Vector3DFieldComposed * pTheVector3DFieldComposed); + +/** +* creates a new Vector3DFieldConstant Resource +* +* @param[in] pModel - Model instance. +* @param[out] pTheVector3DFieldConstant - returns the new Vector3DFieldConstant instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addvector3dfieldconstant(Lib3MF_Model pModel, Lib3MF_Vector3DFieldConstant * pTheVector3DFieldConstant); + +/** +* finds a Vector3DField object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pVector3DFieldInstance - returns the scalar field instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getvector3dfieldbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_Vector3DField * pVector3DFieldInstance); + +/** +* finds a Vector3DFieldFromImage3D object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pVector3DFieldFromImage3DInstance - returns the Vector3DFieldFromImage3D instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getvector3dfieldfromimage3dbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_Vector3DFieldFromImage3D * pVector3DFieldFromImage3DInstance); + +/** +* finds a Vector3DFieldComposed object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pVector3DFieldComposedInstance - returns the Vector3DFieldComponsed instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getvector3dfieldcomposedbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_Vector3DFieldComposed * pVector3DFieldComposedInstance); + +/** +* finds a Vector3DFieldConstant object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pVector3DFieldConstantInstance - returns the Vector3DFieldConstant instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getvector3dfieldconstantbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_Vector3DFieldConstant * pVector3DFieldConstantInstance); + /** * adds a build item to the model. * diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h index bfe996afe..ccdbec87a 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.h @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++-Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -562,6 +562,45 @@ typedef Lib3MFResult (*PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMate */ typedef Lib3MFResult (*PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr) (Lib3MF_MultiPropertyGroupIterator pMultiPropertyGroupIterator, Lib3MF_MultiPropertyGroup * pResource); +/************************************************************************************************************************* + Class definition for Image3DIterator +**************************************************************************************************************************/ + +/** +* Returns the Image3D the iterator points at. +* +* @param[in] pImage3DIterator - Image3DIterator instance. +* @param[out] pResource - returns the Image3D instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3DIterator_GetCurrentImage3DPtr) (Lib3MF_Image3DIterator pImage3DIterator, Lib3MF_Image3D * pResource); + +/************************************************************************************************************************* + Class definition for FunctionIterator +**************************************************************************************************************************/ + +/** +* Returns the Function the iterator points at. +* +* @param[in] pFunctionIterator - FunctionIterator instance. +* @param[out] pResource - returns the Function instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionIterator_GetCurrentFunctionPtr) (Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource); + +/************************************************************************************************************************* + Class definition for LevelSetIterator +**************************************************************************************************************************/ + +/** +* Returns the LevelSet the iterator points at. +* +* @param[in] pLevelSetIterator - LevelSetIterator instance. +* @param[out] pResource - returns the MeshObject instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) (Lib3MF_LevelSetIterator pLevelSetIterator, Lib3MF_LevelSet * pResource); + /************************************************************************************************************************* Class definition for MetaData **************************************************************************************************************************/ @@ -821,6 +860,15 @@ typedef Lib3MFResult (*PLib3MFObject_IsMeshObjectPtr) (Lib3MF_Object pObject, bo */ typedef Lib3MFResult (*PLib3MFObject_IsComponentsObjectPtr) (Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFObject_IsLevelSetObjectPtr) (Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. * @@ -1153,6 +1201,174 @@ typedef Lib3MFResult (*PLib3MFMeshObject_IsManifoldAndOrientedPtr) (Lib3MF_MeshO */ typedef Lib3MFResult (*PLib3MFMeshObject_BeamLatticePtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_BeamLattice * pTheBeamLattice); +/** +* Retrieves the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshObject_GetVolumeDataPtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshObject_SetVolumeDataPtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData pTheVolumeData); + +/************************************************************************************************************************* + Class definition for LevelSet +**************************************************************************************************************************/ + +/** +* Returns the function that is used as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetFunctionPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_Function * pTheFunction); + +/** +* Sets the function to use as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetFunctionPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_Function pTheFunction); + +/** +* Returns the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTransform - the transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetTransformPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF::sTransform * pTransform); + +/** +* Sets the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetTransformPtr) (Lib3MF_LevelSet pLevelSet, const Lib3MF::sTransform * pTransform); + +/** +* Returns the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetChannelNamePtr) (Lib3MF_LevelSet pLevelSet, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); + +/** +* Sets the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pChannelName - new name of the function output channel +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetChannelNamePtr) (Lib3MF_LevelSet pLevelSet, const char * pChannelName); + +/** +* Sets the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMinFeatureSizePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double dMinFeatureSize); + +/** +* Returns the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMinFeatureSizePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double * pMinFeatureSize); + +/** +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dFallBackValue - fallback value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetFallBackValuePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double dFallBackValue); + +/** +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pFallBackValue - fallback value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetFallBackValuePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double * pFallBackValue); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshBBoxOnlyPtr) (Lib3MF_LevelSet pLevelSet, bool bMeshBBoxOnly); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshBBoxOnlyPtr) (Lib3MF_LevelSet pLevelSet, bool * pMeshBBoxOnly); + +/** +* Sets the mesh to use as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject pTheMesh); + +/** +* Returns the mesh that is used as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); + +/** +* Retrieves the VolumeData this Object. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheVolumeData - the VolumeData of this Object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this LevelSet. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData pTheVolumeData); + /************************************************************************************************************************* Class definition for BeamLattice **************************************************************************************************************************/ @@ -1383,784 +1599,3179 @@ typedef Lib3MFResult (*PLib3MFBeamLattice_AddBeamSetPtr) (Lib3MF_BeamLattice pBe typedef Lib3MFResult (*PLib3MFBeamLattice_GetBeamSetPtr) (Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet); /************************************************************************************************************************* - Class definition for Component + Class definition for FunctionReference **************************************************************************************************************************/ /** -* Returns the Resource Instance of the component. +* Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. * -* @param[in] pComponent - Component instance. -* @param[out] pObjectResource - filled with the Resource Instance. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourcePtr) (Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetFunctionResourceIDPtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 * pUniqueResourceID); /** -* Returns the UniqueResourceID of the component. +* Sets the UniqueResourceID to refer to. * -* @param[in] pComponent - Component instance. -* @param[out] pUniqueResourceID - returns the UniqueResourceID. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nUniqueResourceID - UniqueResourceID of the function * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourceIDPtr) (Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetFunctionResourceIDPtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 nUniqueResourceID); /** -* returns, whether a component has a UUID and, if true, the component's UUID +* Returns the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[out] pHasUUID - flag whether the component has a UUID -* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) -* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pTransform - the transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetUUIDPtr) (Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetTransformPtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF::sTransform * pTransform); /** -* sets the component's UUID +* Sets the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pTransform - new transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_SetUUIDPtr) (Lib3MF_Component pComponent, const char * pUUID); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetTransformPtr) (Lib3MF_FunctionReference pFunctionReference, const Lib3MF::sTransform * pTransform); /** -* Returns, if the component has a different transformation than the identity matrix +* Returns the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_HasTransformPtr) (Lib3MF_Component pComponent, bool * pHasTransform); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetChannelNamePtr) (Lib3MF_FunctionReference pFunctionReference, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); /** -* Returns the transformation matrix of the component. +* Sets the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pTransform - filled with the component transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pChannelName - new name of the function output channel * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetTransformPtr) (Lib3MF_Component pComponent, Lib3MF::sTransform * pTransform); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetChannelNamePtr) (Lib3MF_FunctionReference pFunctionReference, const char * pChannelName); /** -* Sets the transformation matrix of the component. +* Sets the minimal feature size as a hint for the function evaluator * -* @param[in] pComponent - Component instance. -* @param[in] pTransform - new transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_SetTransformPtr) (Lib3MF_Component pComponent, const Lib3MF::sTransform * pTransform); - -/************************************************************************************************************************* - Class definition for ComponentsObject -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFFunctionReference_SetMinFeatureSizePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dMinFeatureSize); /** -* Adds a new component to a components object. +* Returns the minimal feature size as a hint for the function evaluator * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] pObjectResource - object to add as component. Must not lead to circular references! -* @param[in] pTransform - optional transform matrix for the component. -* @param[out] pComponentInstance - new component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_AddComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const Lib3MF::sTransform * pTransform, Lib3MF_Component * pComponentInstance); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetMinFeatureSizePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pMinFeatureSize); /** -* Retrieves a component from a component object. +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) -* @param[out] pComponentInstance - component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dFallBackValue - fallback value * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetFallBackValuePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dFallBackValue); /** -* Retrieves a component count of a component object. +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[out] pCount - returns the component count +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pFallBackValue - fallback value * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentCountPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetFallBackValuePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pFallBackValue); /************************************************************************************************************************* - Class definition for BeamSet + Class definition for VolumeDataColor **************************************************************************************************************************/ -/** -* Sets a beamset's name string -* -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pName - new name of the beamset. -* @return error code or 0 (success) -*/ -typedef Lib3MFResult (*PLib3MFBeamSet_SetNamePtr) (Lib3MF_BeamSet pBeamSet, const char * pName); +/************************************************************************************************************************* + Class definition for MaterialMapping +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for VolumeDataComposite +**************************************************************************************************************************/ /** -* Retrieves a beamset's name string +* Returns the BaseMaterialGroup used within this volume data item * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pBaseMaterialGroupInstance - The BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetNamePtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); /** -* Sets a beamset's identifier string +* Sets the BaseMaterialGroup to use within this volume data item. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pIdentifier - new name of the beamset. +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const char * pIdentifier); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance); /** -* Retrieves a beamset's identifier string +* Returns the number of material mappings of this VolumeDataComposite element * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) -* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pCount - the number of material mappings. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Retrieves the reference count of a beamset +* Returns MaterialMappting with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the reference count +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - Index of the MaterialMapping in question. +* @param[out] pTheMaterialMapping - MaterialMapping used in this element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Sets the references of a beamset +* Adds a the MaterialMapping * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pTransform - new transformation matrix +* @param[out] pTheMaterialMapping - The new MaterialMapping * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_AddMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, const Lib3MF::sTransform * pTransform, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Retrieves the references of a beamset +* Removes the MaterialMapping with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - The index of the MaterialMapping to be removed. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex); + +/************************************************************************************************************************* + Class definition for VolumeDataProperty +**************************************************************************************************************************/ /** -* Retrieves the ball reference count of a beamset +* Gets the qualified name of this property. * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the ball reference count +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] nPropertyNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pPropertyNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPropertyNameBuffer - buffer of The qualified name of this property., may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_GetNamePtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, const Lib3MF_uint32 nPropertyNameBufferSize, Lib3MF_uint32* pPropertyNameNeededChars, char * pPropertyNameBuffer); /** -* Sets the ball references of a beamset +* Sets whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_SetIsRequiredPtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, bool bIsRequired); /** -* Retrieves the ball references of a beamset +* Returns whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[out] pIsRequired - Is this property required to process this 3MF document instance? * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_IsRequiredPtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, bool * pIsRequired); /************************************************************************************************************************* - Class definition for BaseMaterialGroup + Class definition for VolumeData **************************************************************************************************************************/ /** -* Retrieves the count of base materials in the material group. +* Returns the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[out] pCount - returns the count of base materials. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - filled with the VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetCountPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeData_GetCompositePtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* returns all the PropertyIDs of all materials in this group +* Creates a new VolumeDataComposite for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - The new VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFVolumeData_CreateNewCompositePtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* Adds a new material to the material group +* Removes the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] pName - new name of the base material. -* @param[in] pDisplayColor - Display color of the material -* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_AddMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const Lib3MF::sColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFVolumeData_RemoveCompositePtr) (Lib3MF_VolumeData pVolumeData); /** -* Removes a material from the material group. +* Returns the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheColorData - filled with the VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_RemoveMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFVolumeData_GetColorPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataColor * pTheColorData); /** -* Returns the base material's name +* Creates a new VolumeDataColor for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheColorData - The new VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +typedef Lib3MFResult (*PLib3MFVolumeData_CreateNewColorPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataColor * pTheColorData); /** -* Sets a base material's name +* Removes the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pName - new name of the base material. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); +typedef Lib3MFResult (*PLib3MFVolumeData_RemoveColorPtr) (Lib3MF_VolumeData pVolumeData); /** -* Sets a base material's display color. +* Returns the number of VolumeDataProperty * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); +typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyCountPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); /** -* Returns a base material's display color. +* Returns the VolumeDataProperty at a given Index * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[out] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be returned. +* @param[out] pTheVolumeDataProperty - the VolumeDataProperty at the given index. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); +typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Adds a new VolumeDataProperty from a Function +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pName - the qualified name (namespace+name) of the Property +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheVolumeDataProperty - the newly created VolumeDataProperty. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFVolumeData_AddPropertyFromFunctionPtr) (Lib3MF_VolumeData pVolumeData, const char * pName, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Removes the VolumeDataProperty with a given index +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFVolumeData_RemovePropertyPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex); /************************************************************************************************************************* - Class definition for ColorGroup + Class definition for Component **************************************************************************************************************************/ /** -* Retrieves the count of base materials in this Color Group. +* Returns the Resource Instance of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[out] pCount - returns the count of colors within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pObjectResource - filled with the Resource Instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetCountPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourcePtr) (Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); /** -* returns all the PropertyIDs of all colors within this group +* Returns the UniqueResourceID of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @param[in] pComponent - Component instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetAllPropertyIDsPtr) (Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourceIDPtr) (Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); /** -* Adds a new value. +* returns, whether a component has a UUID and, if true, the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] pTheColor - The new color -* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pHasUUID - flag whether the component has a UUID +* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) +* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_AddColorPtr) (Lib3MF_ColorGroup pColorGroup, const Lib3MF::sColor * pTheColor, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFComponent_GetUUIDPtr) (Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); /** -* Removes a color from the color group. +* sets the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @param[in] pComponent - Component instance. +* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_RemoveColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFComponent_SetUUIDPtr) (Lib3MF_Component pComponent, const char * pUUID); /** -* Sets a color value. +* Returns, if the component has a different transformation than the identity matrix * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[in] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_SetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); +typedef Lib3MFResult (*PLib3MFComponent_HasTransformPtr) (Lib3MF_Component pComponent, bool * pHasTransform); /** -* Sets a color value. +* Returns the transformation matrix of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[out] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pTransform - filled with the component transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); +typedef Lib3MFResult (*PLib3MFComponent_GetTransformPtr) (Lib3MF_Component pComponent, Lib3MF::sTransform * pTransform); + +/** +* Sets the transformation matrix of the component. +* +* @param[in] pComponent - Component instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComponent_SetTransformPtr) (Lib3MF_Component pComponent, const Lib3MF::sTransform * pTransform); /************************************************************************************************************************* - Class definition for Texture2DGroup + Class definition for ComponentsObject **************************************************************************************************************************/ /** -* Retrieves the count of tex2coords in the Texture2DGroup. +* Adds a new component to a components object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pCount - returns the count of tex2coords. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] pObjectResource - object to add as component. Must not lead to circular references! +* @param[in] pTransform - optional transform matrix for the component. +* @param[out] pComponentInstance - new component instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetCountPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFComponentsObject_AddComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const Lib3MF::sTransform * pTransform, Lib3MF_Component * pComponentInstance); /** -* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* Retrieves a component from a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) +* @param[out] pComponentInstance - component instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); /** -* Adds a new tex2coord to the Texture2DGroup +* Retrieves a component count of a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. -* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[out] pCount - returns the component count * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_AddTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF::sTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentCountPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); + +/************************************************************************************************************************* + Class definition for BeamSet +**************************************************************************************************************************/ /** -* Obtains a tex2coord to the Texture2DGroup +* Sets a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. -* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pName - new name of the beamset. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sTex2Coord * pUVCoordinate); +typedef Lib3MFResult (*PLib3MFBeamSet_SetNamePtr) (Lib3MF_BeamSet pBeamSet, const char * pName); /** -* Removes a tex2coords from the Texture2DGroup. +* Retrieves a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_RemoveTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFBeamSet_GetNamePtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); /** -* Obtains the texture2D instance of this group. +* Sets a beamset's identifier string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pIdentifier - new name of the beamset. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTexture2DPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); +typedef Lib3MFResult (*PLib3MFBeamSet_SetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const char * pIdentifier); + +/** +* Retrieves a beamset's identifier string +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Retrieves the reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the reference count +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_SetReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the ball reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the ball reference count +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_SetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); + +/** +* Retrieves the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); /************************************************************************************************************************* - Class definition for CompositeMaterials + Class definition for BaseMaterialGroup **************************************************************************************************************************/ /** -* Retrieves the count of Composite-s in the CompositeMaterials. +* Retrieves the count of base materials in the material group. * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pCount - returns the count of Composite-s +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[out] pCount - returns the count of base materials. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCountPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetCountPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); /** -* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* returns all the PropertyIDs of all materials in this group * -* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new material to the material group +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] pName - new name of the base material. +* @param[in] pDisplayColor - Display color of the material +* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_AddMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const Lib3MF::sColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a material from the material group. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_RemoveMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); + +/** +* Returns the base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* Sets a base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pName - new name of the base material. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); + +/** +* Sets a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); + +/** +* Returns a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[out] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); + +/************************************************************************************************************************* + Class definition for ColorGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of base materials in this Color Group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[out] pCount - returns the count of colors within this color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetCountPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all colors within this group +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetAllPropertyIDsPtr) (Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] pTheColor - The new color +* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_AddColorPtr) (Lib3MF_ColorGroup pColorGroup, const Lib3MF::sColor * pTheColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a color from the color group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_RemoveColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[in] pTheColor - The color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_SetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[out] pTheColor - The color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); + +/************************************************************************************************************************* + Class definition for Texture2DGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of tex2coords in the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pCount - returns the count of tex2coords. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetCountPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_AddTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF::sTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); + +/** +* Obtains a tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. +* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sTex2Coord * pUVCoordinate); + +/** +* Removes a tex2coords from the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_RemoveTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); + +/** +* Obtains the texture2D instance of this group. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTexture2DPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); + +/************************************************************************************************************************* + Class definition for CompositeMaterials +**************************************************************************************************************************/ + +/** +* Retrieves the count of Composite-s in the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pCount - returns the count of Composite-s +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCountPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. * @param[in] nPropertyIDsBufferSize - Number of elements in buffer * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. * @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the Composite-Mixing Values in the CompositeMaterials. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); + +/** +* Adds a new Composite-Mixing Values to the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite +* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_AddCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const Lib3MF::sCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_RemoveCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); + +/** +* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, Lib3MF::sCompositeConstituent * pCompositeBuffer); + +/************************************************************************************************************************* + Class definition for MultiPropertyGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the count of MultiProperty-s +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new MultiProperty to the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. +* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Sets the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Removes a MultiProperty from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); + +/** +* Retrieves the number of layers of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the number of layers +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup +* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF::sMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); + +/** +* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried +* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, Lib3MF::sMultiPropertyLayer * pTheLayer); + +/** +* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); + +/************************************************************************************************************************* + Class definition for Image3D +**************************************************************************************************************************/ + +/** +* returns the name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of the name of this Image3D, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_GetNamePtr) (Lib3MF_Image3D pImage3D, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* sets a new name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] pName - the new name of this Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_SetNamePtr) (Lib3MF_Image3D pImage3D, const char * pName); + +/** +* Retrieves, if this Image3D is a ImageStack +* +* @param[in] pImage3D - Image3D instance. +* @param[out] pIsImageStack - returns, whether the Image3D is an ImageStack +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_IsImageStackPtr) (Lib3MF_Image3D pImage3D, bool * pIsImageStack); + +/************************************************************************************************************************* + Class definition for ImageStack +**************************************************************************************************************************/ + +/** +* Retrieves the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pRowCount - number of rows +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetRowCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pRowCount); + +/** +* Sets the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nRowCount - number of rows +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetRowCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nRowCount); + +/** +* Retrieves the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pColumnCount - number of columns +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetColumnCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pColumnCount); + +/** +* Sets the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nColumnCount - number of columns +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetColumnCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nColumnCount); + +/** +* Retrieves the number of images in the stack. +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pSheetCount - number of images +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetSheetCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pSheetCount); + +/** +* Retrieves a sheet of the stack. Raises an error if sheet is not set. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetSheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pSheet); + +/** +* Sets a sheet to an existing attachment. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetSheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment pSheet); + +/** +* Creates a new sheet attachment with empty data. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateEmptySheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a memory buffer. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] nDataBufferSize - Number of elements in buffer +* @param[in] pDataBuffer - uint8 buffer of binary image data +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateSheetFromBufferPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a file on disk. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] pFileName - file name to read from +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateSheetFromFilePtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, const char * pFileName, Lib3MF_Attachment * pSheet); + +/************************************************************************************************************************* + Class definition for Attachment +**************************************************************************************************************************/ + +/** +* Retrieves an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetPathPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new path of the attachment. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_SetPathPtr) (Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Returns the PackagePart that is this attachment. +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pPackagePart - The PackagePart of this attachment. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_PackagePartPtr) (Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); + +/** +* Retrieves an attachment's relationship type +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's relationship type. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new relationship type string. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Writes out the attachment as file. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to write into. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to read from. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pTheReadCallback - Callback to call for reading a data chunk +* @param[in] nStreamSize - number of bytes the callback returns +* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. +* @param[in] pUserData - Userdata that is passed to the callback function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromCallbackPtr) (Lib3MF_Attachment pAttachment, Lib3MF::ReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MF::SeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); + +/** +* Retrieves the size of the attachment stream +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pStreamSize - the stream size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); + +/** +* Writes out the attachment into a buffer +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); + +/** +* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromBufferPtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); + +/************************************************************************************************************************* + Class definition for Texture2D +**************************************************************************************************************************/ + +/** +* Retrieves the attachment located at the path of the texture. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); + +/** +* Sets the texture's package path to the path of the attachment. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pContentType - returns content type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetContentTypePtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType * pContentType); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eContentType - new Content Type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetContentTypePtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType eContentType); + +/** +* Retrieves a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pTileStyleU - returns tilestyle type enum. +* @param[out] pTileStyleV - returns tilestyle type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle * pTileStyleU, Lib3MF::eTextureTileStyle * pTileStyleV); + +/** +* Sets a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eTileStyleU - new tilestyle type enum. +* @param[in] eTileStyleV - new tilestyle type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle eTileStyleU, Lib3MF::eTextureTileStyle eTileStyleV); + +/** +* Retrieves a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pFilter - returns filter type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetFilterPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter * pFilter); + +/** +* Sets a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eFilter - sets new filter type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetFilterPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter eFilter); + +/************************************************************************************************************************* + Class definition for ImplicitPort +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetIdentifierPtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetIdentifierPtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pIdentifier); + +/** +* Retrieves the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetDisplayNamePtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetDisplayNamePtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pDisplayName); + +/** +* Sets the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] eImplicitPortType - the type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetTypePtr) (Lib3MF_ImplicitPort pImplicitPort, Lib3MF::eImplicitPortType eImplicitPortType); + +/** +* Retrieves the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[out] pImplicitPortType - the type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetTypePtr) (Lib3MF_ImplicitPort pImplicitPort, Lib3MF::eImplicitPortType * pImplicitPortType); + +/** +* Retrieves the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nReferenceBufferSize - size of the buffer (including trailing 0) +* @param[out] pReferenceNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pReferenceBuffer - buffer of the reference, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetReferencePtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nReferenceBufferSize, Lib3MF_uint32* pReferenceNeededChars, char * pReferenceBuffer); + +/** +* Sets the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pReference - the reference +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetReferencePtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pReference); + +/************************************************************************************************************************* + Class definition for Iterator +**************************************************************************************************************************/ + +/** +* Iterates to the next item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasNext - Iterates to the next item in the list. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_MoveNextPtr) (Lib3MF_Iterator pIterator, bool * pHasNext); + +/** +* Iterates to the previous item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasPrevious - Iterates to the previous item in the list. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_MovePreviousPtr) (Lib3MF_Iterator pIterator, bool * pHasPrevious); + +/** +* Returns the number of items the iterator captures. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pCount - returns the number of items the iterator captures. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_CountPtr) (Lib3MF_Iterator pIterator, Lib3MF_uint64 * pCount); + +/************************************************************************************************************************* + Class definition for ImplicitPortIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pImplicitPortIterator - ImplicitPortIterator instance. +* @param[out] pPort - The current element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPortIterator_GetCurrentPtr) (Lib3MF_ImplicitPortIterator pImplicitPortIterator, Lib3MF_ImplicitPort * pPort); + +/************************************************************************************************************************* + Class definition for ImplicitNode +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetIdentifierPtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetIdentifierPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier); + +/** +* Retrieves the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetDisplayNamePtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetDisplayNamePtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pDisplayName); + +/** +* Retrieves the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nTagBufferSize - size of the buffer (including trailing 0) +* @param[out] pTagNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pTagBuffer - buffer of the tag, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetTagPtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nTagBufferSize, Lib3MF_uint32* pTagNeededChars, char * pTagBuffer); + +/** +* Sets the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pTag - the tag +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetTagPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pTag); + +/** +* Retrieves the type of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pType - the type of the node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetNodeTypePtr) (Lib3MF_ImplicitNode pImplicitNode, Lib3MF::eImplicitNodeType * pType); + +/** +* Add an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[out] pPort - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AddInputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator for the inputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetInputsPtr) (Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Add an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[out] pPort - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AddOutputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator the outputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetOutputsPtr) (Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Retrieves an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_FindInputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_FindOutputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/** +* Checks if the types of the input and output ports are valid for the node type +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pValid - true, if the types are valid +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AreTypesValidPtr) (Lib3MF_ImplicitNode pImplicitNode, bool * pValid); + +/************************************************************************************************************************* + Class definition for OneInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pInput - the input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFOneInputNode_GetInputAPtr) (Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves the output +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFOneInputNode_GetOutputResultPtr) (Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for SinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcSinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcCosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SinhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CoshNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for RoundNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CeilNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FloorNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SignNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FractNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for AbsNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ExpNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LogNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log10Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LengthNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TransposeNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for InverseNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SqrtNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ResourceIdNode +**************************************************************************************************************************/ + +/** +* Sets the Resource that the resourceid attribute of the node will point to +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[in] pResource - the resource +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_SetResourcePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource pResource); + +/** +* Retrieves the resource of the node +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pResource - the resource +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_GetResourcePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource * pResource); + +/** +* Retrieves the output +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_GetOutputValuePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for TwoInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pTwoInputNode - TwoInputNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTwoInputNode_GetInputBPtr) (Lib3MF_TwoInputNode pTwoInputNode, Lib3MF_ImplicitPort * pB); + +/************************************************************************************************************************* + Class definition for AdditionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SubtractionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DivisionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DotNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CrossNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTan2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MatVecMultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MaxNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FmodNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ModNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for PowNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SelectNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputBPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pB); + +/** +* Retrieves the third input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pC - the third input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputCPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pC); + +/** +* Retrieves the fourth input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pD - the fourth input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputDPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pD); + +/************************************************************************************************************************* + Class definition for ClampNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the lower limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMin - the input for the lower limit +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFClampNode_GetInputMinPtr) (Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMin); + +/** +* Retrieves the input for the upper limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMax - the input for the upper limit +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFClampNode_GetInputMaxPtr) (Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMax); + +/************************************************************************************************************************* + Class definition for ComposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the x component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pX - the input for the x component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputXPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the input for the y component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pY - the input for the y component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputYPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the input for the z component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pZ - the input for the z component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputZPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/** +* Retrieves the output +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetOutputResultPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for VectorFromScalarNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DecomposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pA - the input port for the vector to decompose +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetInputAPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pA); + +/** +* Retrieves the output for the x component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pX - the output for the x component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputXPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the output for the y component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pY - the output for the y component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputYPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the output for the z component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pZ - the output for the z component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputZPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/************************************************************************************************************************* + Class definition for ComposeMatrixNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the element 0 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM00 - the input for the m00 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM00Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM00); + +/** +* Retrieves the input for the element 0 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM01 - the input for the m01 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM01Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM01); + +/** +* Retrieves the input for the element 0 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM02 - the input for the m02 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM02Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM02); + +/** +* Retrieves the input for the element 0 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM03 - the input for the m03 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM03Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM03); + +/** +* Retrieves the input for the element 1 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM10 - the input for the m10 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM10Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM10); + +/** +* Retrieves the input for the element 1 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM11 - the input for the m11 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM11Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM11); + +/** +* Retrieves the input for the element 1 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM12 - the input for the m12 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM12Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM12); + +/** +* Retrieves the input for the element 1 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM13 - the input for the m3 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM13Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM13); + +/** +* Retrieves the input for the element 2 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM20 - the input for the m2 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM20Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM20); + +/** +* Retrieves the input for the element 2 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM21 - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM21Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM21); + +/** +* Retrieves the input for the element 2 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM22 - the input for the m22 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM22Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM22); + +/** +* Retrieves the input for the element 2 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM23 - the input for the m23 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM23Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM23); + +/** +* Retrieves the input for the element 3 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM30 - the input for the m30 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM30Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM30); + +/** +* Retrieves the input for the element 3 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM31 - the input for the m31 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM31Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM31); + +/** +* Retrieves the input for the element 3 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM32 - the input for the m32 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM32Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM32); + +/** +* Retrieves the input for the element 3 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM33 - the input for the m33 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM33Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM33); + +/** +* Retrieves the output +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetOutputResultPtr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromRowsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow0 - the input for the first row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputAPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow0); + +/** +* Retrieves the input for the second row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow1 - the input for the second row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputBPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow1); + +/** +* Retrieves the input for the third row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow2 - the input for the third row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputCPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow2); + +/** +* Retrieves the input for the fourth row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow3 - the input for the fourth row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputDPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetOutputResultPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromColumnsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn0 - the input for the first column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputAPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn0); + +/** +* Retrieves the input for the second column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn1 - the input for the second column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputBPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn1); + +/** +* Retrieves the input for the third column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn2 - the input for the third column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputCPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn2); + +/** +* Retrieves the input for the fourth column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn3 - the input for the fourth column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputDPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for ConstantNode +**************************************************************************************************************************/ + +/** +* Sets the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[in] dValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_SetConstantPtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_double dValue); + +/** +* Retrieves the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_GetConstantPtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_double * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_GetOutputValuePtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for ConstVecNode +**************************************************************************************************************************/ + +/** +* Sets the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_SetVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, const Lib3MF::sVector * pValue); + +/** +* Retrieves the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_GetVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, Lib3MF::sVector * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pVector - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_GetOutputVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, Lib3MF_ImplicitPort * pVector); + +/************************************************************************************************************************* + Class definition for ConstMatNode +**************************************************************************************************************************/ + +/** +* Sets the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_SetMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, const Lib3MF::sMatrix4x4 * pValue); + +/** +* Retrieves the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pValue - the matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_GetMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, Lib3MF::sMatrix4x4 * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pMatrix - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_GetOutputMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, Lib3MF_ImplicitPort * pMatrix); + +/************************************************************************************************************************* + Class definition for MeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetInputMeshPtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetInputPosPtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pDistance - the output port for the signed distance to the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetOutputDistancePtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for UnsignedMeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputMeshPtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputPosPtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pDistance - the output port for the unsigned distance to the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetOutputDistancePtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for FunctionCallNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionCallNode - FunctionCallNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionCallNode_GetInputFunctionIDPtr) (Lib3MF_FunctionCallNode pFunctionCallNode, Lib3MF_ImplicitPort * pFunction); + +/************************************************************************************************************************* + Class definition for NodeIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pNodeIterator - NodeIterator instance. +* @param[out] pNode - The current element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNodeIterator_GetCurrentPtr) (Lib3MF_NodeIterator pNodeIterator, Lib3MF_ImplicitNode * pNode); + +/************************************************************************************************************************* + Class definition for Function +**************************************************************************************************************************/ + +/** +* Retrieves the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetDisplayNamePtr) (Lib3MF_Function pFunction, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_SetDisplayNamePtr) (Lib3MF_Function pFunction, const char * pDisplayName); + +/** +* Add an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_AddInputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, Lib3MF::eImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the list of inputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetInputsPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an input +* +* @param[in] pFunction - Function instance. +* @param[in] pInput - The input to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_RemoveInputPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPort pInput); + +/** +* Add an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_AddOutputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, Lib3MF::eImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the outputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetOutputsPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an output +* +* @param[in] pFunction - Function instance. +* @param[in] pOutput - The output to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_RemoveOutputPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPort pOutput); + +/** +* Retrieves an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_FindInputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_FindOutputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/************************************************************************************************************************* + Class definition for ImplicitFunction +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_GetIdentifierPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_SetIdentifierPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier); + +/** +* Add a node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] eNodeType - the type of the node +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF::eImplicitNodeType eNodeType, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ImplicitNode * pNode); + +/** +* Add a SinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinNode * pNode); + +/** +* Add a CosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCosNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CosNode * pNode); + +/** +* Add a TanNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTanNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanNode * pNode); + +/** +* Add a ArcSinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcSinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcSinNode * pNode); + +/** +* Add a ArcCosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcCosNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcCosNode * pNode); + +/** +* Add a ArcTan2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcTan2NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcTan2Node * pNode); + +/** +* Add a SinhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSinhNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinhNode * pNode); + +/** +* Add a CoshNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCoshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CoshNode * pNode); + +/** +* Add a TanhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTanhNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanhNode * pNode); + +/** +* Add a RoundNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddRoundNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_RoundNode * pNode); + +/** +* Add a CeilNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCeilNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CeilNode * pNode); + +/** +* Add a FloorNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFloorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FloorNode * pNode); + +/** +* Add a SignNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSignNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SignNode * pNode); + +/** +* Add a FractNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFractNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FractNode * pNode); + +/** +* Add a AbsNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddAbsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AbsNode * pNode); + +/** +* Add a ExpNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddExpNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ExpNode * pNode); + +/** +* Add a LogNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLogNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_LogNode * pNode); + +/** +* Add a Log2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLog2NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log2Node * pNode); + +/** +* Add a Log10Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLog10NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log10Node * pNode); + +/** +* Add a LengthNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLengthNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_LengthNode * pNode); + +/** +* Add a TransposeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTransposeNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TransposeNode * pNode); + +/** +* Add a InverseNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_InverseNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_InverseNode * pNode); + +/** +* Add a SqrtNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSqrtNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SqrtNode * pNode); + +/** +* Add a ResourceIdNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddResourceIdNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ResourceIdNode * pNode); + +/** +* Add an AdditionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddAdditionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AdditionNode * pNode); + +/** +* Add a SubtractionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSubtractionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SubtractionNode * pNode); + +/** +* Add a MultiplicationNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMultiplicationNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MultiplicationNode * pNode); + +/** +* Add a DivisionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDivisionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_DivisionNode * pNode); + +/** +* Add a DotNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDotNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DotNode * pNode); + +/** +* Add a CrossNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCrossNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_CrossNode * pNode); /** -* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* Add a MatVecMultiplicationNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatVecMultiplicationNode * pNode); /** -* Adds a new Composite-Mixing Values to the CompositeMaterials. +* Add a MinNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite -* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_AddCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const Lib3MF::sCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MinNode * pNode); /** -* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* Add a MaxNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_RemoveCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMaxNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MaxNode * pNode); /** -* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* Add a FmodNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, Lib3MF::sCompositeConstituent * pCompositeBuffer); - -/************************************************************************************************************************* - Class definition for MultiPropertyGroup -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFmodNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FmodNode * pNode); /** -* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* Add a PowNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the count of MultiProperty-s +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddPowNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_PowNode * pNode); /** -* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* Add a SelectNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSelectNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SelectNode * pNode); /** -* Adds a new MultiProperty to the MultiPropertyGroup. +* Add a ClampNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. -* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddClampNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ClampNode * pNode); /** -* Sets the PropertyIDs of a MultiProperty. +* Add a ComposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddComposeVectorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeVectorNode * pNode); /** -* Obtains the PropertyIDs of a MultiProperty. +* Add a VectorFromScalar * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_VectorFromScalarNode * pNode); /** -* Removes a MultiProperty from this MultiPropertyGroup. +* Add a DecomposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DecomposeVectorNode * pNode); /** -* Retrieves the number of layers of this MultiPropertyGroup. +* Add a ComposeMatrixNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the number of layers +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddComposeMatrixNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeMatrixNode * pNode); /** -* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* Add a MatrixFromRowsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup -* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF::sMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromRowsNode * pNode); /** -* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* Add a MatrixFromColumnsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried -* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, Lib3MF::sMultiPropertyLayer * pTheLayer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromColumnsNode * pNode); /** -* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* Add a ConstantNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); - -/************************************************************************************************************************* - Class definition for Attachment -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstantNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstantNode * pNode); /** -* Retrieves an attachment's package path. This function will be removed in a later release. +* Add a ConstVecNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetPathPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstVecNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstVecNode * pNode); /** -* Sets an attachment's package path. This function will be removed in a later release. +* Add a ConstMatNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new path of the attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_SetPathPtr) (Lib3MF_Attachment pAttachment, const char * pPath); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstMatNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstMatNode * pNode); /** -* Returns the PackagePart that is this attachment. +* Add a MeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[out] pPackagePart - The PackagePart of this attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_PackagePartPtr) (Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MeshNode * pNode); /** -* Retrieves an attachment's relationship type +* Add a UnsignedMeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); /** -* Sets an attachment's relationship type. +* Add a FunctionCallNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new relationship type string. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const char * pPath); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFunctionCallNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode); /** -* Writes out the attachment as file. +* Retrieves the nodes * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to write into. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[out] pIterator - iterator for the list of nodes * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); +typedef Lib3MFResult (*PLib3MFImplicitFunction_GetNodesPtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_NodeIterator * pIterator); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Removes a node * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to read from. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pNode - The node to be removed * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); +typedef Lib3MFResult (*PLib3MFImplicitFunction_RemoveNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitNode pNode); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[in] pTheReadCallback - Callback to call for reading a data chunk -* @param[in] nStreamSize - number of bytes the callback returns -* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. -* @param[in] pUserData - Userdata that is passed to the callback function +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - the source port +* @param[in] pTarget - the target port * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromCallbackPtr) (Lib3MF_Attachment pAttachment, Lib3MF::ReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MF::SeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLinkPtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitPort pSource, Lib3MF_ImplicitPort pTarget); /** -* Retrieves the size of the attachment stream +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[out] pStreamSize - the stream size +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - name of the source port in the format nodename.portname +* @param[in] pTarget - name of the target port in the format nodename.portname * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLinkByNamesPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pSource, const char * pTarget); /** -* Writes out the attachment into a buffer +* Clears the function * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_ClearPtr) (Lib3MF_ImplicitFunction pImplicitFunction); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Sorts the nodes topologically * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromBufferPtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_SortNodesTopologicallyPtr) (Lib3MF_ImplicitFunction pImplicitFunction); /************************************************************************************************************************* - Class definition for Texture2D + Class definition for FunctionFromImage3D **************************************************************************************************************************/ /** -* Retrieves the attachment located at the path of the texture. +* Returns the selected 3D image. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pImage3D - image instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetImage3DPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D * pImage3D); /** -* Sets the texture's package path to the path of the attachment. +* Sets the 3D image of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] pImage3D - image instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetImage3DPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D pImage3D); /** -* Retrieves a texture's content type. +* Sets the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pContentType - returns content type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eFilter - texture filter * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetContentTypePtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType * pContentType); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetFilterPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureFilter eFilter); /** -* Retrieves a texture's content type. +* Returns the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eContentType - new Content Type +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pFilter - texture filter * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetContentTypePtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType eContentType); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetFilterPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureFilter * pFilter); /** -* Retrieves a texture's tilestyle type. +* Sets the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pTileStyleU - returns tilestyle type enum. -* @param[out] pTileStyleV - returns tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eTileStyleU - tile style in U +* @param[in] eTileStyleV - tile style in V +* @param[in] eTileStyleW - tile style in W * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle * pTileStyleU, Lib3MF::eTextureTileStyle * pTileStyleV); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetTileStylesPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureTileStyle eTileStyleU, Lib3MF::eTextureTileStyle eTileStyleV, Lib3MF::eTextureTileStyle eTileStyleW); /** -* Sets a texture's tilestyle type. +* Retrieves the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eTileStyleU - new tilestyle type enum. -* @param[in] eTileStyleV - new tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pTileStyleU - tile style in U +* @param[out] pTileStyleV - tile style in V +* @param[out] pTileStyleW - tile style in W * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle eTileStyleU, Lib3MF::eTextureTileStyle eTileStyleV); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetTileStylesPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureTileStyle * pTileStyleU, Lib3MF::eTextureTileStyle * pTileStyleV, Lib3MF::eTextureTileStyle * pTileStyleW); /** -* Retrieves a texture's filter type. +* returns the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pFilter - returns filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetFilterPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter * pFilter); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetOffsetPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pOffset); /** -* Sets a texture's filter type. +* Sets the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eFilter - sets new filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetFilterPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter eFilter); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetOffsetPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dOffset); + +/** +* returns the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetScalePtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pScale); + +/** +* Sets the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetScalePtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dScale); /************************************************************************************************************************* Class definition for BuildItem @@ -3132,6 +5743,16 @@ typedef Lib3MFResult (*PLib3MFModel_GetColorGroupByIDPtr) (Lib3MF_Model pModel, */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -3270,6 +5891,15 @@ typedef Lib3MFResult (*PLib3MFModel_GetMultiPropertyGroupsPtr) (Lib3MF_Model pMo */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStacksPtr) (Lib3MF_Model pModel, Lib3MF_SliceStackIterator * pResourceIterator); +/** +* creates a resource iterator instance with all image3d resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetImage3DsPtr) (Lib3MF_Model pModel, Lib3MF_Image3DIterator * pResourceIterator); + /** * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. * @@ -3279,6 +5909,15 @@ typedef Lib3MFResult (*PLib3MFModel_GetSliceStacksPtr) (Lib3MF_Model pModel, Lib */ typedef Lib3MFResult (*PLib3MFModel_MergeToModelPtr) (Lib3MF_Model pModel, Lib3MF_Model * pMergedModelInstance); +/** +* Merges the given model into this model. +* +* @param[in] pModel - Model instance. +* @param[in] pModelInstance - model to be merged +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_MergeFromModelPtr) (Lib3MF_Model pModel, Lib3MF_Model pModelInstance); + /** * adds an empty mesh object to the model. * @@ -3364,6 +6003,28 @@ typedef Lib3MFResult (*PLib3MFModel_AddCompositeMaterialsPtr) (Lib3MF_Model pMod */ typedef Lib3MFResult (*PLib3MFModel_AddMultiPropertyGroupPtr) (Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance); +/** +* creates a new 3D Image Resource +* +* @param[in] pModel - Model instance. +* @param[in] nColumnCount - the number of columns in each sheet. +* @param[in] nRowCount - the number of rows in each sheet. +* @param[in] nSheetCount - the number of sheets in the image stack. +* @param[out] pInstance - returns the new ImageStack instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddImageStackPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nColumnCount, Lib3MF_uint32 nRowCount, Lib3MF_uint32 nSheetCount, Lib3MF_ImageStack * pInstance); + +/** +* finds an ImageStack object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pImageStackInstance - returns the image stack instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetImageStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ImageStack * pImageStackInstance); + /** * adds a build item to the model. * @@ -3515,6 +6176,70 @@ typedef Lib3MFResult (*PLib3MFModel_SetRandomNumberCallbackPtr) (Lib3MF_Model pM */ typedef Lib3MFResult (*PLib3MFModel_GetKeyStorePtr) (Lib3MF_Model pModel, Lib3MF_KeyStore * pKeyStore); +/** +* creates a resource iterator for all functions +* +* @param[in] pModel - Model instance. +* @param[out] pTheResourceIterator - returns the resource iterator +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetFunctionsPtr) (Lib3MF_Model pModel, Lib3MF_FunctionIterator * pTheResourceIterator); + +/** +* adds a function described by nodes to the model +* +* @param[in] pModel - Model instance. +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddImplicitFunctionPtr) (Lib3MF_Model pModel, Lib3MF_ImplicitFunction * pFunctionInstance); + +/** +* adds a function defined by an image3d to the model +* +* @param[in] pModel - Model instance. +* @param[in] pImage3DInstance - the Image3D-instance used for this function +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddFunctionFromImage3DPtr) (Lib3MF_Model pModel, Lib3MF_Image3D pImage3DInstance, Lib3MF_FunctionFromImage3D * pFunctionInstance); + +/** +* adds a volume data resource to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pVolumeDataInstance - returns the new volume data instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddVolumeDataPtr) (Lib3MF_Model pModel, Lib3MF_VolumeData * pVolumeDataInstance); + +/** +* adds an empty boundary shape object to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pLevelSetInstance - returns the mesh object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddLevelSetPtr) (Lib3MF_Model pModel, Lib3MF_LevelSet * pLevelSetInstance); + +/** +* creates a resource iterator instance with all boundary shape resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetsPtr) (Lib3MF_Model pModel, Lib3MF_LevelSetIterator * pResourceIterator); + +/** +* Removes a resource from the model +* +* @param[in] pModel - Model instance. +* @param[in] pResource - The resource to remove +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_RemoveResourcePtr) (Lib3MF_Model pModel, Lib3MF_Resource pResource); + /************************************************************************************************************************* Global functions **************************************************************************************************************************/ @@ -3767,6 +6492,9 @@ typedef struct { PLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupPtr m_Texture2DGroupIterator_GetCurrentTexture2DGroup; PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsPtr m_CompositeMaterialsIterator_GetCurrentCompositeMaterials; PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup; + PLib3MFImage3DIterator_GetCurrentImage3DPtr m_Image3DIterator_GetCurrentImage3D; + PLib3MFFunctionIterator_GetCurrentFunctionPtr m_FunctionIterator_GetCurrentFunction; + PLib3MFLevelSetIterator_GetCurrentLevelSetPtr m_LevelSetIterator_GetCurrentLevelSet; PLib3MFMetaData_GetNameSpacePtr m_MetaData_GetNameSpace; PLib3MFMetaData_SetNameSpacePtr m_MetaData_SetNameSpace; PLib3MFMetaData_GetNamePtr m_MetaData_GetName; @@ -3792,6 +6520,7 @@ typedef struct { PLib3MFObject_SetPartNumberPtr m_Object_SetPartNumber; PLib3MFObject_IsMeshObjectPtr m_Object_IsMeshObject; PLib3MFObject_IsComponentsObjectPtr m_Object_IsComponentsObject; + PLib3MFObject_IsLevelSetObjectPtr m_Object_IsLevelSetObject; PLib3MFObject_IsValidPtr m_Object_IsValid; PLib3MFObject_SetAttachmentAsThumbnailPtr m_Object_SetAttachmentAsThumbnail; PLib3MFObject_GetThumbnailAttachmentPtr m_Object_GetThumbnailAttachment; @@ -3826,6 +6555,24 @@ typedef struct { PLib3MFMeshObject_SetGeometryPtr m_MeshObject_SetGeometry; PLib3MFMeshObject_IsManifoldAndOrientedPtr m_MeshObject_IsManifoldAndOriented; PLib3MFMeshObject_BeamLatticePtr m_MeshObject_BeamLattice; + PLib3MFMeshObject_GetVolumeDataPtr m_MeshObject_GetVolumeData; + PLib3MFMeshObject_SetVolumeDataPtr m_MeshObject_SetVolumeData; + PLib3MFLevelSet_GetFunctionPtr m_LevelSet_GetFunction; + PLib3MFLevelSet_SetFunctionPtr m_LevelSet_SetFunction; + PLib3MFLevelSet_GetTransformPtr m_LevelSet_GetTransform; + PLib3MFLevelSet_SetTransformPtr m_LevelSet_SetTransform; + PLib3MFLevelSet_GetChannelNamePtr m_LevelSet_GetChannelName; + PLib3MFLevelSet_SetChannelNamePtr m_LevelSet_SetChannelName; + PLib3MFLevelSet_SetMinFeatureSizePtr m_LevelSet_SetMinFeatureSize; + PLib3MFLevelSet_GetMinFeatureSizePtr m_LevelSet_GetMinFeatureSize; + PLib3MFLevelSet_SetFallBackValuePtr m_LevelSet_SetFallBackValue; + PLib3MFLevelSet_GetFallBackValuePtr m_LevelSet_GetFallBackValue; + PLib3MFLevelSet_SetMeshBBoxOnlyPtr m_LevelSet_SetMeshBBoxOnly; + PLib3MFLevelSet_GetMeshBBoxOnlyPtr m_LevelSet_GetMeshBBoxOnly; + PLib3MFLevelSet_SetMeshPtr m_LevelSet_SetMesh; + PLib3MFLevelSet_GetMeshPtr m_LevelSet_GetMesh; + PLib3MFLevelSet_GetVolumeDataPtr m_LevelSet_GetVolumeData; + PLib3MFLevelSet_SetVolumeDataPtr m_LevelSet_SetVolumeData; PLib3MFBeamLattice_GetMinLengthPtr m_BeamLattice_GetMinLength; PLib3MFBeamLattice_SetMinLengthPtr m_BeamLattice_SetMinLength; PLib3MFBeamLattice_GetClippingPtr m_BeamLattice_GetClipping; @@ -3849,6 +6596,35 @@ typedef struct { PLib3MFBeamLattice_GetBeamSetCountPtr m_BeamLattice_GetBeamSetCount; PLib3MFBeamLattice_AddBeamSetPtr m_BeamLattice_AddBeamSet; PLib3MFBeamLattice_GetBeamSetPtr m_BeamLattice_GetBeamSet; + PLib3MFFunctionReference_GetFunctionResourceIDPtr m_FunctionReference_GetFunctionResourceID; + PLib3MFFunctionReference_SetFunctionResourceIDPtr m_FunctionReference_SetFunctionResourceID; + PLib3MFFunctionReference_GetTransformPtr m_FunctionReference_GetTransform; + PLib3MFFunctionReference_SetTransformPtr m_FunctionReference_SetTransform; + PLib3MFFunctionReference_GetChannelNamePtr m_FunctionReference_GetChannelName; + PLib3MFFunctionReference_SetChannelNamePtr m_FunctionReference_SetChannelName; + PLib3MFFunctionReference_SetMinFeatureSizePtr m_FunctionReference_SetMinFeatureSize; + PLib3MFFunctionReference_GetMinFeatureSizePtr m_FunctionReference_GetMinFeatureSize; + PLib3MFFunctionReference_SetFallBackValuePtr m_FunctionReference_SetFallBackValue; + PLib3MFFunctionReference_GetFallBackValuePtr m_FunctionReference_GetFallBackValue; + PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr m_VolumeDataComposite_GetBaseMaterialGroup; + PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr m_VolumeDataComposite_SetBaseMaterialGroup; + PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr m_VolumeDataComposite_GetMaterialMappingCount; + PLib3MFVolumeDataComposite_GetMaterialMappingPtr m_VolumeDataComposite_GetMaterialMapping; + PLib3MFVolumeDataComposite_AddMaterialMappingPtr m_VolumeDataComposite_AddMaterialMapping; + PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr m_VolumeDataComposite_RemoveMaterialMapping; + PLib3MFVolumeDataProperty_GetNamePtr m_VolumeDataProperty_GetName; + PLib3MFVolumeDataProperty_SetIsRequiredPtr m_VolumeDataProperty_SetIsRequired; + PLib3MFVolumeDataProperty_IsRequiredPtr m_VolumeDataProperty_IsRequired; + PLib3MFVolumeData_GetCompositePtr m_VolumeData_GetComposite; + PLib3MFVolumeData_CreateNewCompositePtr m_VolumeData_CreateNewComposite; + PLib3MFVolumeData_RemoveCompositePtr m_VolumeData_RemoveComposite; + PLib3MFVolumeData_GetColorPtr m_VolumeData_GetColor; + PLib3MFVolumeData_CreateNewColorPtr m_VolumeData_CreateNewColor; + PLib3MFVolumeData_RemoveColorPtr m_VolumeData_RemoveColor; + PLib3MFVolumeData_GetPropertyCountPtr m_VolumeData_GetPropertyCount; + PLib3MFVolumeData_GetPropertyPtr m_VolumeData_GetProperty; + PLib3MFVolumeData_AddPropertyFromFunctionPtr m_VolumeData_AddPropertyFromFunction; + PLib3MFVolumeData_RemovePropertyPtr m_VolumeData_RemoveProperty; PLib3MFComponent_GetObjectResourcePtr m_Component_GetObjectResource; PLib3MFComponent_GetObjectResourceIDPtr m_Component_GetObjectResourceID; PLib3MFComponent_GetUUIDPtr m_Component_GetUUID; @@ -3905,6 +6681,19 @@ typedef struct { PLib3MFMultiPropertyGroup_AddLayerPtr m_MultiPropertyGroup_AddLayer; PLib3MFMultiPropertyGroup_GetLayerPtr m_MultiPropertyGroup_GetLayer; PLib3MFMultiPropertyGroup_RemoveLayerPtr m_MultiPropertyGroup_RemoveLayer; + PLib3MFImage3D_GetNamePtr m_Image3D_GetName; + PLib3MFImage3D_SetNamePtr m_Image3D_SetName; + PLib3MFImage3D_IsImageStackPtr m_Image3D_IsImageStack; + PLib3MFImageStack_GetRowCountPtr m_ImageStack_GetRowCount; + PLib3MFImageStack_SetRowCountPtr m_ImageStack_SetRowCount; + PLib3MFImageStack_GetColumnCountPtr m_ImageStack_GetColumnCount; + PLib3MFImageStack_SetColumnCountPtr m_ImageStack_SetColumnCount; + PLib3MFImageStack_GetSheetCountPtr m_ImageStack_GetSheetCount; + PLib3MFImageStack_GetSheetPtr m_ImageStack_GetSheet; + PLib3MFImageStack_SetSheetPtr m_ImageStack_SetSheet; + PLib3MFImageStack_CreateEmptySheetPtr m_ImageStack_CreateEmptySheet; + PLib3MFImageStack_CreateSheetFromBufferPtr m_ImageStack_CreateSheetFromBuffer; + PLib3MFImageStack_CreateSheetFromFilePtr m_ImageStack_CreateSheetFromFile; PLib3MFAttachment_GetPathPtr m_Attachment_GetPath; PLib3MFAttachment_SetPathPtr m_Attachment_SetPath; PLib3MFAttachment_PackagePartPtr m_Attachment_PackagePart; @@ -3924,6 +6713,173 @@ typedef struct { PLib3MFTexture2D_SetTileStyleUVPtr m_Texture2D_SetTileStyleUV; PLib3MFTexture2D_GetFilterPtr m_Texture2D_GetFilter; PLib3MFTexture2D_SetFilterPtr m_Texture2D_SetFilter; + PLib3MFImplicitPort_GetIdentifierPtr m_ImplicitPort_GetIdentifier; + PLib3MFImplicitPort_SetIdentifierPtr m_ImplicitPort_SetIdentifier; + PLib3MFImplicitPort_GetDisplayNamePtr m_ImplicitPort_GetDisplayName; + PLib3MFImplicitPort_SetDisplayNamePtr m_ImplicitPort_SetDisplayName; + PLib3MFImplicitPort_SetTypePtr m_ImplicitPort_SetType; + PLib3MFImplicitPort_GetTypePtr m_ImplicitPort_GetType; + PLib3MFImplicitPort_GetReferencePtr m_ImplicitPort_GetReference; + PLib3MFImplicitPort_SetReferencePtr m_ImplicitPort_SetReference; + PLib3MFIterator_MoveNextPtr m_Iterator_MoveNext; + PLib3MFIterator_MovePreviousPtr m_Iterator_MovePrevious; + PLib3MFIterator_CountPtr m_Iterator_Count; + PLib3MFImplicitPortIterator_GetCurrentPtr m_ImplicitPortIterator_GetCurrent; + PLib3MFImplicitNode_GetIdentifierPtr m_ImplicitNode_GetIdentifier; + PLib3MFImplicitNode_SetIdentifierPtr m_ImplicitNode_SetIdentifier; + PLib3MFImplicitNode_GetDisplayNamePtr m_ImplicitNode_GetDisplayName; + PLib3MFImplicitNode_SetDisplayNamePtr m_ImplicitNode_SetDisplayName; + PLib3MFImplicitNode_GetTagPtr m_ImplicitNode_GetTag; + PLib3MFImplicitNode_SetTagPtr m_ImplicitNode_SetTag; + PLib3MFImplicitNode_GetNodeTypePtr m_ImplicitNode_GetNodeType; + PLib3MFImplicitNode_AddInputPtr m_ImplicitNode_AddInput; + PLib3MFImplicitNode_GetInputsPtr m_ImplicitNode_GetInputs; + PLib3MFImplicitNode_AddOutputPtr m_ImplicitNode_AddOutput; + PLib3MFImplicitNode_GetOutputsPtr m_ImplicitNode_GetOutputs; + PLib3MFImplicitNode_FindInputPtr m_ImplicitNode_FindInput; + PLib3MFImplicitNode_FindOutputPtr m_ImplicitNode_FindOutput; + PLib3MFImplicitNode_AreTypesValidPtr m_ImplicitNode_AreTypesValid; + PLib3MFOneInputNode_GetInputAPtr m_OneInputNode_GetInputA; + PLib3MFOneInputNode_GetOutputResultPtr m_OneInputNode_GetOutputResult; + PLib3MFResourceIdNode_SetResourcePtr m_ResourceIdNode_SetResource; + PLib3MFResourceIdNode_GetResourcePtr m_ResourceIdNode_GetResource; + PLib3MFResourceIdNode_GetOutputValuePtr m_ResourceIdNode_GetOutputValue; + PLib3MFTwoInputNode_GetInputBPtr m_TwoInputNode_GetInputB; + PLib3MFSelectNode_GetInputBPtr m_SelectNode_GetInputB; + PLib3MFSelectNode_GetInputCPtr m_SelectNode_GetInputC; + PLib3MFSelectNode_GetInputDPtr m_SelectNode_GetInputD; + PLib3MFClampNode_GetInputMinPtr m_ClampNode_GetInputMin; + PLib3MFClampNode_GetInputMaxPtr m_ClampNode_GetInputMax; + PLib3MFComposeVectorNode_GetInputXPtr m_ComposeVectorNode_GetInputX; + PLib3MFComposeVectorNode_GetInputYPtr m_ComposeVectorNode_GetInputY; + PLib3MFComposeVectorNode_GetInputZPtr m_ComposeVectorNode_GetInputZ; + PLib3MFComposeVectorNode_GetOutputResultPtr m_ComposeVectorNode_GetOutputResult; + PLib3MFDecomposeVectorNode_GetInputAPtr m_DecomposeVectorNode_GetInputA; + PLib3MFDecomposeVectorNode_GetOutputXPtr m_DecomposeVectorNode_GetOutputX; + PLib3MFDecomposeVectorNode_GetOutputYPtr m_DecomposeVectorNode_GetOutputY; + PLib3MFDecomposeVectorNode_GetOutputZPtr m_DecomposeVectorNode_GetOutputZ; + PLib3MFComposeMatrixNode_GetInputM00Ptr m_ComposeMatrixNode_GetInputM00; + PLib3MFComposeMatrixNode_GetInputM01Ptr m_ComposeMatrixNode_GetInputM01; + PLib3MFComposeMatrixNode_GetInputM02Ptr m_ComposeMatrixNode_GetInputM02; + PLib3MFComposeMatrixNode_GetInputM03Ptr m_ComposeMatrixNode_GetInputM03; + PLib3MFComposeMatrixNode_GetInputM10Ptr m_ComposeMatrixNode_GetInputM10; + PLib3MFComposeMatrixNode_GetInputM11Ptr m_ComposeMatrixNode_GetInputM11; + PLib3MFComposeMatrixNode_GetInputM12Ptr m_ComposeMatrixNode_GetInputM12; + PLib3MFComposeMatrixNode_GetInputM13Ptr m_ComposeMatrixNode_GetInputM13; + PLib3MFComposeMatrixNode_GetInputM20Ptr m_ComposeMatrixNode_GetInputM20; + PLib3MFComposeMatrixNode_GetInputM21Ptr m_ComposeMatrixNode_GetInputM21; + PLib3MFComposeMatrixNode_GetInputM22Ptr m_ComposeMatrixNode_GetInputM22; + PLib3MFComposeMatrixNode_GetInputM23Ptr m_ComposeMatrixNode_GetInputM23; + PLib3MFComposeMatrixNode_GetInputM30Ptr m_ComposeMatrixNode_GetInputM30; + PLib3MFComposeMatrixNode_GetInputM31Ptr m_ComposeMatrixNode_GetInputM31; + PLib3MFComposeMatrixNode_GetInputM32Ptr m_ComposeMatrixNode_GetInputM32; + PLib3MFComposeMatrixNode_GetInputM33Ptr m_ComposeMatrixNode_GetInputM33; + PLib3MFComposeMatrixNode_GetOutputResultPtr m_ComposeMatrixNode_GetOutputResult; + PLib3MFMatrixFromRowsNode_GetInputAPtr m_MatrixFromRowsNode_GetInputA; + PLib3MFMatrixFromRowsNode_GetInputBPtr m_MatrixFromRowsNode_GetInputB; + PLib3MFMatrixFromRowsNode_GetInputCPtr m_MatrixFromRowsNode_GetInputC; + PLib3MFMatrixFromRowsNode_GetInputDPtr m_MatrixFromRowsNode_GetInputD; + PLib3MFMatrixFromRowsNode_GetOutputResultPtr m_MatrixFromRowsNode_GetOutputResult; + PLib3MFMatrixFromColumnsNode_GetInputAPtr m_MatrixFromColumnsNode_GetInputA; + PLib3MFMatrixFromColumnsNode_GetInputBPtr m_MatrixFromColumnsNode_GetInputB; + PLib3MFMatrixFromColumnsNode_GetInputCPtr m_MatrixFromColumnsNode_GetInputC; + PLib3MFMatrixFromColumnsNode_GetInputDPtr m_MatrixFromColumnsNode_GetInputD; + PLib3MFMatrixFromColumnsNode_GetOutputResultPtr m_MatrixFromColumnsNode_GetOutputResult; + PLib3MFConstantNode_SetConstantPtr m_ConstantNode_SetConstant; + PLib3MFConstantNode_GetConstantPtr m_ConstantNode_GetConstant; + PLib3MFConstantNode_GetOutputValuePtr m_ConstantNode_GetOutputValue; + PLib3MFConstVecNode_SetVectorPtr m_ConstVecNode_SetVector; + PLib3MFConstVecNode_GetVectorPtr m_ConstVecNode_GetVector; + PLib3MFConstVecNode_GetOutputVectorPtr m_ConstVecNode_GetOutputVector; + PLib3MFConstMatNode_SetMatrixPtr m_ConstMatNode_SetMatrix; + PLib3MFConstMatNode_GetMatrixPtr m_ConstMatNode_GetMatrix; + PLib3MFConstMatNode_GetOutputMatrixPtr m_ConstMatNode_GetOutputMatrix; + PLib3MFMeshNode_GetInputMeshPtr m_MeshNode_GetInputMesh; + PLib3MFMeshNode_GetInputPosPtr m_MeshNode_GetInputPos; + PLib3MFMeshNode_GetOutputDistancePtr m_MeshNode_GetOutputDistance; + PLib3MFUnsignedMeshNode_GetInputMeshPtr m_UnsignedMeshNode_GetInputMesh; + PLib3MFUnsignedMeshNode_GetInputPosPtr m_UnsignedMeshNode_GetInputPos; + PLib3MFUnsignedMeshNode_GetOutputDistancePtr m_UnsignedMeshNode_GetOutputDistance; + PLib3MFFunctionCallNode_GetInputFunctionIDPtr m_FunctionCallNode_GetInputFunctionID; + PLib3MFNodeIterator_GetCurrentPtr m_NodeIterator_GetCurrent; + PLib3MFFunction_GetDisplayNamePtr m_Function_GetDisplayName; + PLib3MFFunction_SetDisplayNamePtr m_Function_SetDisplayName; + PLib3MFFunction_AddInputPtr m_Function_AddInput; + PLib3MFFunction_GetInputsPtr m_Function_GetInputs; + PLib3MFFunction_RemoveInputPtr m_Function_RemoveInput; + PLib3MFFunction_AddOutputPtr m_Function_AddOutput; + PLib3MFFunction_GetOutputsPtr m_Function_GetOutputs; + PLib3MFFunction_RemoveOutputPtr m_Function_RemoveOutput; + PLib3MFFunction_FindInputPtr m_Function_FindInput; + PLib3MFFunction_FindOutputPtr m_Function_FindOutput; + PLib3MFImplicitFunction_GetIdentifierPtr m_ImplicitFunction_GetIdentifier; + PLib3MFImplicitFunction_SetIdentifierPtr m_ImplicitFunction_SetIdentifier; + PLib3MFImplicitFunction_AddNodePtr m_ImplicitFunction_AddNode; + PLib3MFImplicitFunction_AddSinNodePtr m_ImplicitFunction_AddSinNode; + PLib3MFImplicitFunction_AddCosNodePtr m_ImplicitFunction_AddCosNode; + PLib3MFImplicitFunction_AddTanNodePtr m_ImplicitFunction_AddTanNode; + PLib3MFImplicitFunction_AddArcSinNodePtr m_ImplicitFunction_AddArcSinNode; + PLib3MFImplicitFunction_AddArcCosNodePtr m_ImplicitFunction_AddArcCosNode; + PLib3MFImplicitFunction_AddArcTan2NodePtr m_ImplicitFunction_AddArcTan2Node; + PLib3MFImplicitFunction_AddSinhNodePtr m_ImplicitFunction_AddSinhNode; + PLib3MFImplicitFunction_AddCoshNodePtr m_ImplicitFunction_AddCoshNode; + PLib3MFImplicitFunction_AddTanhNodePtr m_ImplicitFunction_AddTanhNode; + PLib3MFImplicitFunction_AddRoundNodePtr m_ImplicitFunction_AddRoundNode; + PLib3MFImplicitFunction_AddCeilNodePtr m_ImplicitFunction_AddCeilNode; + PLib3MFImplicitFunction_AddFloorNodePtr m_ImplicitFunction_AddFloorNode; + PLib3MFImplicitFunction_AddSignNodePtr m_ImplicitFunction_AddSignNode; + PLib3MFImplicitFunction_AddFractNodePtr m_ImplicitFunction_AddFractNode; + PLib3MFImplicitFunction_AddAbsNodePtr m_ImplicitFunction_AddAbsNode; + PLib3MFImplicitFunction_AddExpNodePtr m_ImplicitFunction_AddExpNode; + PLib3MFImplicitFunction_AddLogNodePtr m_ImplicitFunction_AddLogNode; + PLib3MFImplicitFunction_AddLog2NodePtr m_ImplicitFunction_AddLog2Node; + PLib3MFImplicitFunction_AddLog10NodePtr m_ImplicitFunction_AddLog10Node; + PLib3MFImplicitFunction_AddLengthNodePtr m_ImplicitFunction_AddLengthNode; + PLib3MFImplicitFunction_AddTransposeNodePtr m_ImplicitFunction_AddTransposeNode; + PLib3MFImplicitFunction_InverseNodePtr m_ImplicitFunction_InverseNode; + PLib3MFImplicitFunction_AddSqrtNodePtr m_ImplicitFunction_AddSqrtNode; + PLib3MFImplicitFunction_AddResourceIdNodePtr m_ImplicitFunction_AddResourceIdNode; + PLib3MFImplicitFunction_AddAdditionNodePtr m_ImplicitFunction_AddAdditionNode; + PLib3MFImplicitFunction_AddSubtractionNodePtr m_ImplicitFunction_AddSubtractionNode; + PLib3MFImplicitFunction_AddMultiplicationNodePtr m_ImplicitFunction_AddMultiplicationNode; + PLib3MFImplicitFunction_AddDivisionNodePtr m_ImplicitFunction_AddDivisionNode; + PLib3MFImplicitFunction_AddDotNodePtr m_ImplicitFunction_AddDotNode; + PLib3MFImplicitFunction_AddCrossNodePtr m_ImplicitFunction_AddCrossNode; + PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr m_ImplicitFunction_AddMatVecMultiplicationNode; + PLib3MFImplicitFunction_AddMinNodePtr m_ImplicitFunction_AddMinNode; + PLib3MFImplicitFunction_AddMaxNodePtr m_ImplicitFunction_AddMaxNode; + PLib3MFImplicitFunction_AddFmodNodePtr m_ImplicitFunction_AddFmodNode; + PLib3MFImplicitFunction_AddPowNodePtr m_ImplicitFunction_AddPowNode; + PLib3MFImplicitFunction_AddSelectNodePtr m_ImplicitFunction_AddSelectNode; + PLib3MFImplicitFunction_AddClampNodePtr m_ImplicitFunction_AddClampNode; + PLib3MFImplicitFunction_AddComposeVectorNodePtr m_ImplicitFunction_AddComposeVectorNode; + PLib3MFImplicitFunction_AddVectorFromScalarNodePtr m_ImplicitFunction_AddVectorFromScalarNode; + PLib3MFImplicitFunction_AddDecomposeVectorNodePtr m_ImplicitFunction_AddDecomposeVectorNode; + PLib3MFImplicitFunction_AddComposeMatrixNodePtr m_ImplicitFunction_AddComposeMatrixNode; + PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr m_ImplicitFunction_AddMatrixFromRowsNode; + PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr m_ImplicitFunction_AddMatrixFromColumnsNode; + PLib3MFImplicitFunction_AddConstantNodePtr m_ImplicitFunction_AddConstantNode; + PLib3MFImplicitFunction_AddConstVecNodePtr m_ImplicitFunction_AddConstVecNode; + PLib3MFImplicitFunction_AddConstMatNodePtr m_ImplicitFunction_AddConstMatNode; + PLib3MFImplicitFunction_AddMeshNodePtr m_ImplicitFunction_AddMeshNode; + PLib3MFImplicitFunction_AddUnsignedMeshNodePtr m_ImplicitFunction_AddUnsignedMeshNode; + PLib3MFImplicitFunction_AddFunctionCallNodePtr m_ImplicitFunction_AddFunctionCallNode; + PLib3MFImplicitFunction_GetNodesPtr m_ImplicitFunction_GetNodes; + PLib3MFImplicitFunction_RemoveNodePtr m_ImplicitFunction_RemoveNode; + PLib3MFImplicitFunction_AddLinkPtr m_ImplicitFunction_AddLink; + PLib3MFImplicitFunction_AddLinkByNamesPtr m_ImplicitFunction_AddLinkByNames; + PLib3MFImplicitFunction_ClearPtr m_ImplicitFunction_Clear; + PLib3MFImplicitFunction_SortNodesTopologicallyPtr m_ImplicitFunction_SortNodesTopologically; + PLib3MFFunctionFromImage3D_GetImage3DPtr m_FunctionFromImage3D_GetImage3D; + PLib3MFFunctionFromImage3D_SetImage3DPtr m_FunctionFromImage3D_SetImage3D; + PLib3MFFunctionFromImage3D_SetFilterPtr m_FunctionFromImage3D_SetFilter; + PLib3MFFunctionFromImage3D_GetFilterPtr m_FunctionFromImage3D_GetFilter; + PLib3MFFunctionFromImage3D_SetTileStylesPtr m_FunctionFromImage3D_SetTileStyles; + PLib3MFFunctionFromImage3D_GetTileStylesPtr m_FunctionFromImage3D_GetTileStyles; + PLib3MFFunctionFromImage3D_GetOffsetPtr m_FunctionFromImage3D_GetOffset; + PLib3MFFunctionFromImage3D_SetOffsetPtr m_FunctionFromImage3D_SetOffset; + PLib3MFFunctionFromImage3D_GetScalePtr m_FunctionFromImage3D_GetScale; + PLib3MFFunctionFromImage3D_SetScalePtr m_FunctionFromImage3D_SetScale; PLib3MFBuildItem_GetObjectResourcePtr m_BuildItem_GetObjectResource; PLib3MFBuildItem_GetUUIDPtr m_BuildItem_GetUUID; PLib3MFBuildItem_SetUUIDPtr m_BuildItem_SetUUID; @@ -4018,6 +6974,7 @@ typedef struct { PLib3MFModel_GetComponentsObjectByIDPtr m_Model_GetComponentsObjectByID; PLib3MFModel_GetColorGroupByIDPtr m_Model_GetColorGroupByID; PLib3MFModel_GetSliceStackByIDPtr m_Model_GetSliceStackByID; + PLib3MFModel_GetLevelSetByIDPtr m_Model_GetLevelSetByID; PLib3MFModel_GetBuildUUIDPtr m_Model_GetBuildUUID; PLib3MFModel_SetBuildUUIDPtr m_Model_SetBuildUUID; PLib3MFModel_GetBuildItemsPtr m_Model_GetBuildItems; @@ -4033,7 +6990,9 @@ typedef struct { PLib3MFModel_GetCompositeMaterialsPtr m_Model_GetCompositeMaterials; PLib3MFModel_GetMultiPropertyGroupsPtr m_Model_GetMultiPropertyGroups; PLib3MFModel_GetSliceStacksPtr m_Model_GetSliceStacks; + PLib3MFModel_GetImage3DsPtr m_Model_GetImage3Ds; PLib3MFModel_MergeToModelPtr m_Model_MergeToModel; + PLib3MFModel_MergeFromModelPtr m_Model_MergeFromModel; PLib3MFModel_AddMeshObjectPtr m_Model_AddMeshObject; PLib3MFModel_AddComponentsObjectPtr m_Model_AddComponentsObject; PLib3MFModel_AddSliceStackPtr m_Model_AddSliceStack; @@ -4043,6 +7002,8 @@ typedef struct { PLib3MFModel_AddTexture2DGroupPtr m_Model_AddTexture2DGroup; PLib3MFModel_AddCompositeMaterialsPtr m_Model_AddCompositeMaterials; PLib3MFModel_AddMultiPropertyGroupPtr m_Model_AddMultiPropertyGroup; + PLib3MFModel_AddImageStackPtr m_Model_AddImageStack; + PLib3MFModel_GetImageStackByIDPtr m_Model_GetImageStackByID; PLib3MFModel_AddBuildItemPtr m_Model_AddBuildItem; PLib3MFModel_RemoveBuildItemPtr m_Model_RemoveBuildItem; PLib3MFModel_GetMetaDataGroupPtr m_Model_GetMetaDataGroup; @@ -4059,6 +7020,13 @@ typedef struct { PLib3MFModel_RemoveCustomContentTypePtr m_Model_RemoveCustomContentType; PLib3MFModel_SetRandomNumberCallbackPtr m_Model_SetRandomNumberCallback; PLib3MFModel_GetKeyStorePtr m_Model_GetKeyStore; + PLib3MFModel_GetFunctionsPtr m_Model_GetFunctions; + PLib3MFModel_AddImplicitFunctionPtr m_Model_AddImplicitFunction; + PLib3MFModel_AddFunctionFromImage3DPtr m_Model_AddFunctionFromImage3D; + PLib3MFModel_AddVolumeDataPtr m_Model_AddVolumeData; + PLib3MFModel_AddLevelSetPtr m_Model_AddLevelSet; + PLib3MFModel_GetLevelSetsPtr m_Model_GetLevelSets; + PLib3MFModel_RemoveResourcePtr m_Model_RemoveResource; PLib3MFGetLibraryVersionPtr m_GetLibraryVersion; PLib3MFGetPrereleaseInformationPtr m_GetPrereleaseInformation; PLib3MFGetBuildInformationPtr m_GetBuildInformation; diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp index a374db4eb..7dd954217 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_dynamic.hpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++-Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -73,11 +73,21 @@ class CColorGroupIterator; class CTexture2DGroupIterator; class CCompositeMaterialsIterator; class CMultiPropertyGroupIterator; +class CImage3DIterator; +class CFunctionIterator; +class CLevelSetIterator; class CMetaData; class CMetaDataGroup; class CObject; class CMeshObject; +class CLevelSet; class CBeamLattice; +class CFunctionReference; +class CVolumeDataColor; +class CMaterialMapping; +class CVolumeDataComposite; +class CVolumeDataProperty; +class CVolumeData; class CComponent; class CComponentsObject; class CBeamSet; @@ -86,8 +96,71 @@ class CColorGroup; class CTexture2DGroup; class CCompositeMaterials; class CMultiPropertyGroup; +class CImage3D; +class CImageStack; class CAttachment; class CTexture2D; +class CImplicitPort; +class CIterator; +class CImplicitPortIterator; +class CImplicitNode; +class COneInputNode; +class CSinNode; +class CCosNode; +class CTanNode; +class CArcSinNode; +class CArcCosNode; +class CArcTanNode; +class CSinhNode; +class CCoshNode; +class CTanhNode; +class CRoundNode; +class CCeilNode; +class CFloorNode; +class CSignNode; +class CFractNode; +class CAbsNode; +class CExpNode; +class CLogNode; +class CLog2Node; +class CLog10Node; +class CLengthNode; +class CTransposeNode; +class CInverseNode; +class CSqrtNode; +class CResourceIdNode; +class CTwoInputNode; +class CAdditionNode; +class CSubtractionNode; +class CMultiplicationNode; +class CDivisionNode; +class CDotNode; +class CCrossNode; +class CArcTan2Node; +class CMatVecMultiplicationNode; +class CMinNode; +class CMaxNode; +class CFmodNode; +class CModNode; +class CPowNode; +class CSelectNode; +class CClampNode; +class CComposeVectorNode; +class CVectorFromScalarNode; +class CDecomposeVectorNode; +class CComposeMatrixNode; +class CMatrixFromRowsNode; +class CMatrixFromColumnsNode; +class CConstantNode; +class CConstVecNode; +class CConstMatNode; +class CMeshNode; +class CUnsignedMeshNode; +class CFunctionCallNode; +class CNodeIterator; +class CFunction; +class CImplicitFunction; +class CFunctionFromImage3D; class CBuildItem; class CBuildItemIterator; class CSlice; @@ -120,11 +193,21 @@ typedef CColorGroupIterator CLib3MFColorGroupIterator; typedef CTexture2DGroupIterator CLib3MFTexture2DGroupIterator; typedef CCompositeMaterialsIterator CLib3MFCompositeMaterialsIterator; typedef CMultiPropertyGroupIterator CLib3MFMultiPropertyGroupIterator; +typedef CImage3DIterator CLib3MFImage3DIterator; +typedef CFunctionIterator CLib3MFFunctionIterator; +typedef CLevelSetIterator CLib3MFLevelSetIterator; typedef CMetaData CLib3MFMetaData; typedef CMetaDataGroup CLib3MFMetaDataGroup; typedef CObject CLib3MFObject; typedef CMeshObject CLib3MFMeshObject; +typedef CLevelSet CLib3MFLevelSet; typedef CBeamLattice CLib3MFBeamLattice; +typedef CFunctionReference CLib3MFFunctionReference; +typedef CVolumeDataColor CLib3MFVolumeDataColor; +typedef CMaterialMapping CLib3MFMaterialMapping; +typedef CVolumeDataComposite CLib3MFVolumeDataComposite; +typedef CVolumeDataProperty CLib3MFVolumeDataProperty; +typedef CVolumeData CLib3MFVolumeData; typedef CComponent CLib3MFComponent; typedef CComponentsObject CLib3MFComponentsObject; typedef CBeamSet CLib3MFBeamSet; @@ -133,8 +216,71 @@ typedef CColorGroup CLib3MFColorGroup; typedef CTexture2DGroup CLib3MFTexture2DGroup; typedef CCompositeMaterials CLib3MFCompositeMaterials; typedef CMultiPropertyGroup CLib3MFMultiPropertyGroup; +typedef CImage3D CLib3MFImage3D; +typedef CImageStack CLib3MFImageStack; typedef CAttachment CLib3MFAttachment; typedef CTexture2D CLib3MFTexture2D; +typedef CImplicitPort CLib3MFImplicitPort; +typedef CIterator CLib3MFIterator; +typedef CImplicitPortIterator CLib3MFImplicitPortIterator; +typedef CImplicitNode CLib3MFImplicitNode; +typedef COneInputNode CLib3MFOneInputNode; +typedef CSinNode CLib3MFSinNode; +typedef CCosNode CLib3MFCosNode; +typedef CTanNode CLib3MFTanNode; +typedef CArcSinNode CLib3MFArcSinNode; +typedef CArcCosNode CLib3MFArcCosNode; +typedef CArcTanNode CLib3MFArcTanNode; +typedef CSinhNode CLib3MFSinhNode; +typedef CCoshNode CLib3MFCoshNode; +typedef CTanhNode CLib3MFTanhNode; +typedef CRoundNode CLib3MFRoundNode; +typedef CCeilNode CLib3MFCeilNode; +typedef CFloorNode CLib3MFFloorNode; +typedef CSignNode CLib3MFSignNode; +typedef CFractNode CLib3MFFractNode; +typedef CAbsNode CLib3MFAbsNode; +typedef CExpNode CLib3MFExpNode; +typedef CLogNode CLib3MFLogNode; +typedef CLog2Node CLib3MFLog2Node; +typedef CLog10Node CLib3MFLog10Node; +typedef CLengthNode CLib3MFLengthNode; +typedef CTransposeNode CLib3MFTransposeNode; +typedef CInverseNode CLib3MFInverseNode; +typedef CSqrtNode CLib3MFSqrtNode; +typedef CResourceIdNode CLib3MFResourceIdNode; +typedef CTwoInputNode CLib3MFTwoInputNode; +typedef CAdditionNode CLib3MFAdditionNode; +typedef CSubtractionNode CLib3MFSubtractionNode; +typedef CMultiplicationNode CLib3MFMultiplicationNode; +typedef CDivisionNode CLib3MFDivisionNode; +typedef CDotNode CLib3MFDotNode; +typedef CCrossNode CLib3MFCrossNode; +typedef CArcTan2Node CLib3MFArcTan2Node; +typedef CMatVecMultiplicationNode CLib3MFMatVecMultiplicationNode; +typedef CMinNode CLib3MFMinNode; +typedef CMaxNode CLib3MFMaxNode; +typedef CFmodNode CLib3MFFmodNode; +typedef CModNode CLib3MFModNode; +typedef CPowNode CLib3MFPowNode; +typedef CSelectNode CLib3MFSelectNode; +typedef CClampNode CLib3MFClampNode; +typedef CComposeVectorNode CLib3MFComposeVectorNode; +typedef CVectorFromScalarNode CLib3MFVectorFromScalarNode; +typedef CDecomposeVectorNode CLib3MFDecomposeVectorNode; +typedef CComposeMatrixNode CLib3MFComposeMatrixNode; +typedef CMatrixFromRowsNode CLib3MFMatrixFromRowsNode; +typedef CMatrixFromColumnsNode CLib3MFMatrixFromColumnsNode; +typedef CConstantNode CLib3MFConstantNode; +typedef CConstVecNode CLib3MFConstVecNode; +typedef CConstMatNode CLib3MFConstMatNode; +typedef CMeshNode CLib3MFMeshNode; +typedef CUnsignedMeshNode CLib3MFUnsignedMeshNode; +typedef CFunctionCallNode CLib3MFFunctionCallNode; +typedef CNodeIterator CLib3MFNodeIterator; +typedef CFunction CLib3MFFunction; +typedef CImplicitFunction CLib3MFImplicitFunction; +typedef CFunctionFromImage3D CLib3MFFunctionFromImage3D; typedef CBuildItem CLib3MFBuildItem; typedef CBuildItemIterator CLib3MFBuildItemIterator; typedef CSlice CLib3MFSlice; @@ -167,11 +313,21 @@ typedef std::shared_ptr PColorGroupIterator; typedef std::shared_ptr PTexture2DGroupIterator; typedef std::shared_ptr PCompositeMaterialsIterator; typedef std::shared_ptr PMultiPropertyGroupIterator; +typedef std::shared_ptr PImage3DIterator; +typedef std::shared_ptr PFunctionIterator; +typedef std::shared_ptr PLevelSetIterator; typedef std::shared_ptr PMetaData; typedef std::shared_ptr PMetaDataGroup; typedef std::shared_ptr PObject; typedef std::shared_ptr PMeshObject; +typedef std::shared_ptr PLevelSet; typedef std::shared_ptr PBeamLattice; +typedef std::shared_ptr PFunctionReference; +typedef std::shared_ptr PVolumeDataColor; +typedef std::shared_ptr PMaterialMapping; +typedef std::shared_ptr PVolumeDataComposite; +typedef std::shared_ptr PVolumeDataProperty; +typedef std::shared_ptr PVolumeData; typedef std::shared_ptr PComponent; typedef std::shared_ptr PComponentsObject; typedef std::shared_ptr PBeamSet; @@ -180,8 +336,71 @@ typedef std::shared_ptr PColorGroup; typedef std::shared_ptr PTexture2DGroup; typedef std::shared_ptr PCompositeMaterials; typedef std::shared_ptr PMultiPropertyGroup; +typedef std::shared_ptr PImage3D; +typedef std::shared_ptr PImageStack; typedef std::shared_ptr PAttachment; typedef std::shared_ptr PTexture2D; +typedef std::shared_ptr PImplicitPort; +typedef std::shared_ptr PIterator; +typedef std::shared_ptr PImplicitPortIterator; +typedef std::shared_ptr PImplicitNode; +typedef std::shared_ptr POneInputNode; +typedef std::shared_ptr PSinNode; +typedef std::shared_ptr PCosNode; +typedef std::shared_ptr PTanNode; +typedef std::shared_ptr PArcSinNode; +typedef std::shared_ptr PArcCosNode; +typedef std::shared_ptr PArcTanNode; +typedef std::shared_ptr PSinhNode; +typedef std::shared_ptr PCoshNode; +typedef std::shared_ptr PTanhNode; +typedef std::shared_ptr PRoundNode; +typedef std::shared_ptr PCeilNode; +typedef std::shared_ptr PFloorNode; +typedef std::shared_ptr PSignNode; +typedef std::shared_ptr PFractNode; +typedef std::shared_ptr PAbsNode; +typedef std::shared_ptr PExpNode; +typedef std::shared_ptr PLogNode; +typedef std::shared_ptr PLog2Node; +typedef std::shared_ptr PLog10Node; +typedef std::shared_ptr PLengthNode; +typedef std::shared_ptr PTransposeNode; +typedef std::shared_ptr PInverseNode; +typedef std::shared_ptr PSqrtNode; +typedef std::shared_ptr PResourceIdNode; +typedef std::shared_ptr PTwoInputNode; +typedef std::shared_ptr PAdditionNode; +typedef std::shared_ptr PSubtractionNode; +typedef std::shared_ptr PMultiplicationNode; +typedef std::shared_ptr PDivisionNode; +typedef std::shared_ptr PDotNode; +typedef std::shared_ptr PCrossNode; +typedef std::shared_ptr PArcTan2Node; +typedef std::shared_ptr PMatVecMultiplicationNode; +typedef std::shared_ptr PMinNode; +typedef std::shared_ptr PMaxNode; +typedef std::shared_ptr PFmodNode; +typedef std::shared_ptr PModNode; +typedef std::shared_ptr PPowNode; +typedef std::shared_ptr PSelectNode; +typedef std::shared_ptr PClampNode; +typedef std::shared_ptr PComposeVectorNode; +typedef std::shared_ptr PVectorFromScalarNode; +typedef std::shared_ptr PDecomposeVectorNode; +typedef std::shared_ptr PComposeMatrixNode; +typedef std::shared_ptr PMatrixFromRowsNode; +typedef std::shared_ptr PMatrixFromColumnsNode; +typedef std::shared_ptr PConstantNode; +typedef std::shared_ptr PConstVecNode; +typedef std::shared_ptr PConstMatNode; +typedef std::shared_ptr PMeshNode; +typedef std::shared_ptr PUnsignedMeshNode; +typedef std::shared_ptr PFunctionCallNode; +typedef std::shared_ptr PNodeIterator; +typedef std::shared_ptr PFunction; +typedef std::shared_ptr PImplicitFunction; +typedef std::shared_ptr PFunctionFromImage3D; typedef std::shared_ptr PBuildItem; typedef std::shared_ptr PBuildItemIterator; typedef std::shared_ptr PSlice; @@ -214,11 +433,21 @@ typedef PColorGroupIterator PLib3MFColorGroupIterator; typedef PTexture2DGroupIterator PLib3MFTexture2DGroupIterator; typedef PCompositeMaterialsIterator PLib3MFCompositeMaterialsIterator; typedef PMultiPropertyGroupIterator PLib3MFMultiPropertyGroupIterator; +typedef PImage3DIterator PLib3MFImage3DIterator; +typedef PFunctionIterator PLib3MFFunctionIterator; +typedef PLevelSetIterator PLib3MFLevelSetIterator; typedef PMetaData PLib3MFMetaData; typedef PMetaDataGroup PLib3MFMetaDataGroup; typedef PObject PLib3MFObject; typedef PMeshObject PLib3MFMeshObject; +typedef PLevelSet PLib3MFLevelSet; typedef PBeamLattice PLib3MFBeamLattice; +typedef PFunctionReference PLib3MFFunctionReference; +typedef PVolumeDataColor PLib3MFVolumeDataColor; +typedef PMaterialMapping PLib3MFMaterialMapping; +typedef PVolumeDataComposite PLib3MFVolumeDataComposite; +typedef PVolumeDataProperty PLib3MFVolumeDataProperty; +typedef PVolumeData PLib3MFVolumeData; typedef PComponent PLib3MFComponent; typedef PComponentsObject PLib3MFComponentsObject; typedef PBeamSet PLib3MFBeamSet; @@ -227,8 +456,71 @@ typedef PColorGroup PLib3MFColorGroup; typedef PTexture2DGroup PLib3MFTexture2DGroup; typedef PCompositeMaterials PLib3MFCompositeMaterials; typedef PMultiPropertyGroup PLib3MFMultiPropertyGroup; +typedef PImage3D PLib3MFImage3D; +typedef PImageStack PLib3MFImageStack; typedef PAttachment PLib3MFAttachment; typedef PTexture2D PLib3MFTexture2D; +typedef PImplicitPort PLib3MFImplicitPort; +typedef PIterator PLib3MFIterator; +typedef PImplicitPortIterator PLib3MFImplicitPortIterator; +typedef PImplicitNode PLib3MFImplicitNode; +typedef POneInputNode PLib3MFOneInputNode; +typedef PSinNode PLib3MFSinNode; +typedef PCosNode PLib3MFCosNode; +typedef PTanNode PLib3MFTanNode; +typedef PArcSinNode PLib3MFArcSinNode; +typedef PArcCosNode PLib3MFArcCosNode; +typedef PArcTanNode PLib3MFArcTanNode; +typedef PSinhNode PLib3MFSinhNode; +typedef PCoshNode PLib3MFCoshNode; +typedef PTanhNode PLib3MFTanhNode; +typedef PRoundNode PLib3MFRoundNode; +typedef PCeilNode PLib3MFCeilNode; +typedef PFloorNode PLib3MFFloorNode; +typedef PSignNode PLib3MFSignNode; +typedef PFractNode PLib3MFFractNode; +typedef PAbsNode PLib3MFAbsNode; +typedef PExpNode PLib3MFExpNode; +typedef PLogNode PLib3MFLogNode; +typedef PLog2Node PLib3MFLog2Node; +typedef PLog10Node PLib3MFLog10Node; +typedef PLengthNode PLib3MFLengthNode; +typedef PTransposeNode PLib3MFTransposeNode; +typedef PInverseNode PLib3MFInverseNode; +typedef PSqrtNode PLib3MFSqrtNode; +typedef PResourceIdNode PLib3MFResourceIdNode; +typedef PTwoInputNode PLib3MFTwoInputNode; +typedef PAdditionNode PLib3MFAdditionNode; +typedef PSubtractionNode PLib3MFSubtractionNode; +typedef PMultiplicationNode PLib3MFMultiplicationNode; +typedef PDivisionNode PLib3MFDivisionNode; +typedef PDotNode PLib3MFDotNode; +typedef PCrossNode PLib3MFCrossNode; +typedef PArcTan2Node PLib3MFArcTan2Node; +typedef PMatVecMultiplicationNode PLib3MFMatVecMultiplicationNode; +typedef PMinNode PLib3MFMinNode; +typedef PMaxNode PLib3MFMaxNode; +typedef PFmodNode PLib3MFFmodNode; +typedef PModNode PLib3MFModNode; +typedef PPowNode PLib3MFPowNode; +typedef PSelectNode PLib3MFSelectNode; +typedef PClampNode PLib3MFClampNode; +typedef PComposeVectorNode PLib3MFComposeVectorNode; +typedef PVectorFromScalarNode PLib3MFVectorFromScalarNode; +typedef PDecomposeVectorNode PLib3MFDecomposeVectorNode; +typedef PComposeMatrixNode PLib3MFComposeMatrixNode; +typedef PMatrixFromRowsNode PLib3MFMatrixFromRowsNode; +typedef PMatrixFromColumnsNode PLib3MFMatrixFromColumnsNode; +typedef PConstantNode PLib3MFConstantNode; +typedef PConstVecNode PLib3MFConstVecNode; +typedef PConstMatNode PLib3MFConstMatNode; +typedef PMeshNode PLib3MFMeshNode; +typedef PUnsignedMeshNode PLib3MFUnsignedMeshNode; +typedef PFunctionCallNode PLib3MFFunctionCallNode; +typedef PNodeIterator PLib3MFNodeIterator; +typedef PFunction PLib3MFFunction; +typedef PImplicitFunction PLib3MFImplicitFunction; +typedef PFunctionFromImage3D PLib3MFFunctionFromImage3D; typedef PBuildItem PLib3MFBuildItem; typedef PBuildItemIterator PLib3MFBuildItemIterator; typedef PSlice PLib3MFSlice; @@ -355,6 +647,7 @@ class ELib3MFException : public std::exception { case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "UNKOWNPROGRESSIDENTIFIER"; case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "ELEMENTCOUNTEXCEEDSLIMIT"; case LIB3MF_ERROR_INVALIDRESOURCE: return "INVALIDRESOURCE"; + case LIB3MF_ERROR_INVALIDLEVELSET: return "INVALIDLEVELSET"; case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "BEAMLATTICE_INVALID_OBJECTTYPE"; case LIB3MF_ERROR_INVALIDKEYSTORE: return "INVALIDKEYSTORE"; case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "INVALIDKEYSTORECONSUMER"; @@ -362,6 +655,10 @@ class ELib3MFException : public std::exception { case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "KEYSTORERESOURCEDATANOTFOUND"; case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "SECURECONTEXTNOTREGISTERED"; case LIB3MF_ERROR_INVALIDKEYSIZE: return "INVALIDKEYSIZE"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "INCOMPATIBLEPORTTYPES"; + case LIB3MF_ERROR_GRAPHISCYCLIC: return "GRAPHISCYCLIC"; + case LIB3MF_ERROR_INPUTNOTSET: return "INPUTNOTSET"; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "INVALIDNODECONFIGURATION"; } return "UNKNOWN"; } @@ -406,13 +703,18 @@ class ELib3MFException : public std::exception { case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "A progress identifier is unknown"; case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "An element buffer exceeds its spec limit"; case LIB3MF_ERROR_INVALIDRESOURCE: return "A resource is invalid"; + case LIB3MF_ERROR_INVALIDLEVELSET: return "A level set is invalid"; case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "This object type is not valid for beamlattices"; case LIB3MF_ERROR_INVALIDKEYSTORE: return "The keystore object is invalid"; case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "The consumer keystore object is invalid"; case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: return "A consumer has not been found"; case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "A resource data has not been found"; case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "A Key or Conentent encryption callback has not been registered"; - case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key siue is invalid"; + case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key size is invalid"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "Link could not be added, the port types are incompatible"; + case LIB3MF_ERROR_GRAPHISCYCLIC: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case LIB3MF_ERROR_INPUTNOTSET: return "The input of a node is not set."; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "The selected node configuration is not supported"; } return "unknown error"; } @@ -561,11 +863,21 @@ class CWrapper { friend class CTexture2DGroupIterator; friend class CCompositeMaterialsIterator; friend class CMultiPropertyGroupIterator; + friend class CImage3DIterator; + friend class CFunctionIterator; + friend class CLevelSetIterator; friend class CMetaData; friend class CMetaDataGroup; friend class CObject; friend class CMeshObject; + friend class CLevelSet; friend class CBeamLattice; + friend class CFunctionReference; + friend class CVolumeDataColor; + friend class CMaterialMapping; + friend class CVolumeDataComposite; + friend class CVolumeDataProperty; + friend class CVolumeData; friend class CComponent; friend class CComponentsObject; friend class CBeamSet; @@ -574,8 +886,71 @@ class CWrapper { friend class CTexture2DGroup; friend class CCompositeMaterials; friend class CMultiPropertyGroup; + friend class CImage3D; + friend class CImageStack; friend class CAttachment; friend class CTexture2D; + friend class CImplicitPort; + friend class CIterator; + friend class CImplicitPortIterator; + friend class CImplicitNode; + friend class COneInputNode; + friend class CSinNode; + friend class CCosNode; + friend class CTanNode; + friend class CArcSinNode; + friend class CArcCosNode; + friend class CArcTanNode; + friend class CSinhNode; + friend class CCoshNode; + friend class CTanhNode; + friend class CRoundNode; + friend class CCeilNode; + friend class CFloorNode; + friend class CSignNode; + friend class CFractNode; + friend class CAbsNode; + friend class CExpNode; + friend class CLogNode; + friend class CLog2Node; + friend class CLog10Node; + friend class CLengthNode; + friend class CTransposeNode; + friend class CInverseNode; + friend class CSqrtNode; + friend class CResourceIdNode; + friend class CTwoInputNode; + friend class CAdditionNode; + friend class CSubtractionNode; + friend class CMultiplicationNode; + friend class CDivisionNode; + friend class CDotNode; + friend class CCrossNode; + friend class CArcTan2Node; + friend class CMatVecMultiplicationNode; + friend class CMinNode; + friend class CMaxNode; + friend class CFmodNode; + friend class CModNode; + friend class CPowNode; + friend class CSelectNode; + friend class CClampNode; + friend class CComposeVectorNode; + friend class CVectorFromScalarNode; + friend class CDecomposeVectorNode; + friend class CComposeMatrixNode; + friend class CMatrixFromRowsNode; + friend class CMatrixFromColumnsNode; + friend class CConstantNode; + friend class CConstVecNode; + friend class CConstMatNode; + friend class CMeshNode; + friend class CUnsignedMeshNode; + friend class CFunctionCallNode; + friend class CNodeIterator; + friend class CFunction; + friend class CImplicitFunction; + friend class CFunctionFromImage3D; friend class CBuildItem; friend class CBuildItemIterator; friend class CSlice; @@ -935,6 +1310,57 @@ class CMultiPropertyGroupIterator : public CResourceIterator { inline PMultiPropertyGroup GetCurrentMultiPropertyGroup(); }; +/************************************************************************************************************************* + Class CImage3DIterator +**************************************************************************************************************************/ +class CImage3DIterator : public CResourceIterator { +public: + + /** + * CImage3DIterator::CImage3DIterator - Constructor for Image3DIterator class. + */ + CImage3DIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResourceIterator(pWrapper, pHandle) + { + } + + inline PImage3D GetCurrentImage3D(); +}; + +/************************************************************************************************************************* + Class CFunctionIterator +**************************************************************************************************************************/ +class CFunctionIterator : public CResourceIterator { +public: + + /** + * CFunctionIterator::CFunctionIterator - Constructor for FunctionIterator class. + */ + CFunctionIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResourceIterator(pWrapper, pHandle) + { + } + + inline PFunction GetCurrentFunction(); +}; + +/************************************************************************************************************************* + Class CLevelSetIterator +**************************************************************************************************************************/ +class CLevelSetIterator : public CResourceIterator { +public: + + /** + * CLevelSetIterator::CLevelSetIterator - Constructor for LevelSetIterator class. + */ + CLevelSetIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResourceIterator(pWrapper, pHandle) + { + } + + inline PLevelSet GetCurrentLevelSet(); +}; + /************************************************************************************************************************* Class CMetaData **************************************************************************************************************************/ @@ -1006,6 +1432,7 @@ class CObject : public CResource { inline void SetPartNumber(const std::string & sPartNumber); inline bool IsMeshObject(); inline bool IsComponentsObject(); + inline bool IsLevelSetObject(); inline bool IsValid(); inline void SetAttachmentAsThumbnail(classParam pAttachment); inline PAttachment GetThumbnailAttachment(); @@ -1056,6 +1483,40 @@ class CMeshObject : public CObject { inline void SetGeometry(const CInputVector & VerticesBuffer, const CInputVector & IndicesBuffer); inline bool IsManifoldAndOriented(); inline PBeamLattice BeamLattice(); + inline PVolumeData GetVolumeData(); + inline void SetVolumeData(classParam pTheVolumeData); +}; + +/************************************************************************************************************************* + Class CLevelSet +**************************************************************************************************************************/ +class CLevelSet : public CObject { +public: + + /** + * CLevelSet::CLevelSet - Constructor for LevelSet class. + */ + CLevelSet(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CObject(pWrapper, pHandle) + { + } + + inline PFunction GetFunction(); + inline void SetFunction(classParam pTheFunction); + inline sTransform GetTransform(); + inline void SetTransform(const sTransform & Transform); + inline std::string GetChannelName(); + inline void SetChannelName(const std::string & sChannelName); + inline void SetMinFeatureSize(const Lib3MF_double dMinFeatureSize); + inline Lib3MF_double GetMinFeatureSize(); + inline void SetFallBackValue(const Lib3MF_double dFallBackValue); + inline Lib3MF_double GetFallBackValue(); + inline void SetMeshBBoxOnly(const bool bMeshBBoxOnly); + inline bool GetMeshBBoxOnly(); + inline void SetMesh(classParam pTheMesh); + inline PMeshObject GetMesh(); + inline PVolumeData GetVolumeData(); + inline void SetVolumeData(classParam pTheVolumeData); }; /************************************************************************************************************************* @@ -1097,6 +1558,131 @@ class CBeamLattice : public CBase { inline PBeamSet GetBeamSet(const Lib3MF_uint32 nIndex); }; +/************************************************************************************************************************* + Class CFunctionReference +**************************************************************************************************************************/ +class CFunctionReference : public CBase { +public: + + /** + * CFunctionReference::CFunctionReference - Constructor for FunctionReference class. + */ + CFunctionReference(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline Lib3MF_uint32 GetFunctionResourceID(); + inline void SetFunctionResourceID(const Lib3MF_uint32 nUniqueResourceID); + inline sTransform GetTransform(); + inline void SetTransform(const sTransform & Transform); + inline std::string GetChannelName(); + inline void SetChannelName(const std::string & sChannelName); + inline void SetMinFeatureSize(const Lib3MF_double dMinFeatureSize); + inline Lib3MF_double GetMinFeatureSize(); + inline void SetFallBackValue(const Lib3MF_double dFallBackValue); + inline Lib3MF_double GetFallBackValue(); +}; + +/************************************************************************************************************************* + Class CVolumeDataColor +**************************************************************************************************************************/ +class CVolumeDataColor : public CFunctionReference { +public: + + /** + * CVolumeDataColor::CVolumeDataColor - Constructor for VolumeDataColor class. + */ + CVolumeDataColor(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CFunctionReference(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CMaterialMapping +**************************************************************************************************************************/ +class CMaterialMapping : public CFunctionReference { +public: + + /** + * CMaterialMapping::CMaterialMapping - Constructor for MaterialMapping class. + */ + CMaterialMapping(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CFunctionReference(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CVolumeDataComposite +**************************************************************************************************************************/ +class CVolumeDataComposite : public CBase { +public: + + /** + * CVolumeDataComposite::CVolumeDataComposite - Constructor for VolumeDataComposite class. + */ + CVolumeDataComposite(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PBaseMaterialGroup GetBaseMaterialGroup(); + inline void SetBaseMaterialGroup(classParam pBaseMaterialGroupInstance); + inline Lib3MF_uint32 GetMaterialMappingCount(); + inline PMaterialMapping GetMaterialMapping(const Lib3MF_uint32 nIndex); + inline PMaterialMapping AddMaterialMapping(const sTransform & Transform); + inline void RemoveMaterialMapping(const Lib3MF_uint32 nIndex); +}; + +/************************************************************************************************************************* + Class CVolumeDataProperty +**************************************************************************************************************************/ +class CVolumeDataProperty : public CFunctionReference { +public: + + /** + * CVolumeDataProperty::CVolumeDataProperty - Constructor for VolumeDataProperty class. + */ + CVolumeDataProperty(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CFunctionReference(pWrapper, pHandle) + { + } + + inline std::string GetName(); + inline void SetIsRequired(const bool bIsRequired); + inline bool IsRequired(); +}; + +/************************************************************************************************************************* + Class CVolumeData +**************************************************************************************************************************/ +class CVolumeData : public CResource { +public: + + /** + * CVolumeData::CVolumeData - Constructor for VolumeData class. + */ + CVolumeData(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResource(pWrapper, pHandle) + { + } + + inline PVolumeDataComposite GetComposite(); + inline PVolumeDataComposite CreateNewComposite(); + inline void RemoveComposite(); + inline PVolumeDataColor GetColor(); + inline PVolumeDataColor CreateNewColor(classParam pTheFunction); + inline void RemoveColor(); + inline Lib3MF_uint32 GetPropertyCount(); + inline PVolumeDataProperty GetProperty(const Lib3MF_uint32 nIndex); + inline PVolumeDataProperty AddPropertyFromFunction(const std::string & sName, classParam pTheFunction); + inline void RemoveProperty(const Lib3MF_uint32 nIndex); +}; + /************************************************************************************************************************* Class CComponent **************************************************************************************************************************/ @@ -1281,6 +1867,51 @@ class CMultiPropertyGroup : public CResource { inline void RemoveLayer(const Lib3MF_uint32 nLayerIndex); }; +/************************************************************************************************************************* + Class CImage3D +**************************************************************************************************************************/ +class CImage3D : public CResource { +public: + + /** + * CImage3D::CImage3D - Constructor for Image3D class. + */ + CImage3D(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResource(pWrapper, pHandle) + { + } + + inline std::string GetName(); + inline void SetName(const std::string & sName); + inline bool IsImageStack(); +}; + +/************************************************************************************************************************* + Class CImageStack +**************************************************************************************************************************/ +class CImageStack : public CImage3D { +public: + + /** + * CImageStack::CImageStack - Constructor for ImageStack class. + */ + CImageStack(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImage3D(pWrapper, pHandle) + { + } + + inline Lib3MF_uint32 GetRowCount(); + inline void SetRowCount(const Lib3MF_uint32 nRowCount); + inline Lib3MF_uint32 GetColumnCount(); + inline void SetColumnCount(const Lib3MF_uint32 nColumnCount); + inline Lib3MF_uint32 GetSheetCount(); + inline PAttachment GetSheet(const Lib3MF_uint32 nIndex); + inline void SetSheet(const Lib3MF_uint32 nIndex, classParam pSheet); + inline PAttachment CreateEmptySheet(const Lib3MF_uint32 nIndex, const std::string & sPath); + inline PAttachment CreateSheetFromBuffer(const Lib3MF_uint32 nIndex, const std::string & sPath, const CInputVector & DataBuffer); + inline PAttachment CreateSheetFromFile(const Lib3MF_uint32 nIndex, const std::string & sPath, const std::string & sFileName); +}; + /************************************************************************************************************************* Class CAttachment **************************************************************************************************************************/ @@ -1333,721 +1964,1952 @@ class CTexture2D : public CResource { }; /************************************************************************************************************************* - Class CBuildItem + Class CImplicitPort **************************************************************************************************************************/ -class CBuildItem : public CBase { +class CImplicitPort : public CBase { public: /** - * CBuildItem::CBuildItem - Constructor for BuildItem class. + * CImplicitPort::CImplicitPort - Constructor for ImplicitPort class. */ - CBuildItem(CWrapper* pWrapper, Lib3MFHandle pHandle) + CImplicitPort(CWrapper* pWrapper, Lib3MFHandle pHandle) : CBase(pWrapper, pHandle) { } - inline PObject GetObjectResource(); - inline std::string GetUUID(bool & bHasUUID); - inline void SetUUID(const std::string & sUUID); - inline Lib3MF_uint32 GetObjectResourceID(); - inline bool HasObjectTransform(); - inline sTransform GetObjectTransform(); - inline void SetObjectTransform(const sTransform & Transform); - inline std::string GetPartNumber(); - inline void SetPartNumber(const std::string & sSetPartnumber); - inline PMetaDataGroup GetMetaDataGroup(); - inline sBox GetOutbox(); + inline std::string GetIdentifier(); + inline void SetIdentifier(const std::string & sIdentifier); + inline std::string GetDisplayName(); + inline void SetDisplayName(const std::string & sDisplayName); + inline void SetType(const eImplicitPortType eImplicitPortType); + inline eImplicitPortType GetType(); + inline std::string GetReference(); + inline void SetReference(const std::string & sReference); }; /************************************************************************************************************************* - Class CBuildItemIterator + Class CIterator **************************************************************************************************************************/ -class CBuildItemIterator : public CBase { +class CIterator : public CBase { public: /** - * CBuildItemIterator::CBuildItemIterator - Constructor for BuildItemIterator class. + * CIterator::CIterator - Constructor for Iterator class. */ - CBuildItemIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + CIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) : CBase(pWrapper, pHandle) { } inline bool MoveNext(); inline bool MovePrevious(); - inline PBuildItem GetCurrent(); - inline PBuildItemIterator Clone(); inline Lib3MF_uint64 Count(); }; /************************************************************************************************************************* - Class CSlice + Class CImplicitPortIterator **************************************************************************************************************************/ -class CSlice : public CBase { +class CImplicitPortIterator : public CIterator { public: /** - * CSlice::CSlice - Constructor for Slice class. + * CImplicitPortIterator::CImplicitPortIterator - Constructor for ImplicitPortIterator class. */ - CSlice(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CImplicitPortIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CIterator(pWrapper, pHandle) { } - inline void SetVertices(const CInputVector & VerticesBuffer); - inline void GetVertices(std::vector & VerticesBuffer); - inline Lib3MF_uint64 GetVertexCount(); - inline Lib3MF_uint64 AddPolygon(const CInputVector & IndicesBuffer); - inline Lib3MF_uint64 GetPolygonCount(); - inline void SetPolygonIndices(const Lib3MF_uint64 nIndex, const CInputVector & IndicesBuffer); - inline void GetPolygonIndices(const Lib3MF_uint64 nIndex, std::vector & IndicesBuffer); - inline Lib3MF_uint64 GetPolygonIndexCount(const Lib3MF_uint64 nIndex); - inline Lib3MF_double GetZTop(); + inline PImplicitPort GetCurrent(); }; /************************************************************************************************************************* - Class CSliceStack + Class CImplicitNode **************************************************************************************************************************/ -class CSliceStack : public CResource { +class CImplicitNode : public CBase { public: /** - * CSliceStack::CSliceStack - Constructor for SliceStack class. + * CImplicitNode::CImplicitNode - Constructor for ImplicitNode class. */ - CSliceStack(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CResource(pWrapper, pHandle) + CImplicitNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) { } - inline Lib3MF_double GetBottomZ(); - inline Lib3MF_uint64 GetSliceCount(); - inline PSlice GetSlice(const Lib3MF_uint64 nSliceIndex); - inline PSlice AddSlice(const Lib3MF_double dZTop); - inline Lib3MF_uint64 GetSliceRefCount(); - inline void AddSliceStackReference(classParam pTheSliceStack); - inline PSliceStack GetSliceStackReference(const Lib3MF_uint64 nSliceRefIndex); - inline void CollapseSliceReferences(); - inline void SetOwnPath(const std::string & sPath); - inline std::string GetOwnPath(); + inline std::string GetIdentifier(); + inline void SetIdentifier(const std::string & sIdentifier); + inline std::string GetDisplayName(); + inline void SetDisplayName(const std::string & sDisplayName); + inline std::string GetTag(); + inline void SetTag(const std::string & sTag); + inline eImplicitNodeType GetNodeType(); + inline PImplicitPort AddInput(const std::string & sIdentifier, const std::string & sDisplayName); + inline PImplicitPortIterator GetInputs(); + inline PImplicitPort AddOutput(const std::string & sIdentifier, const std::string & sDisplayName); + inline PImplicitPortIterator GetOutputs(); + inline PImplicitPort FindInput(const std::string & sIdentifier); + inline PImplicitPort FindOutput(const std::string & sIdentifier); + inline bool AreTypesValid(); }; /************************************************************************************************************************* - Class CConsumer + Class COneInputNode **************************************************************************************************************************/ -class CConsumer : public CBase { +class COneInputNode : public CImplicitNode { public: /** - * CConsumer::CConsumer - Constructor for Consumer class. + * COneInputNode::COneInputNode - Constructor for OneInputNode class. */ - CConsumer(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + COneInputNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) { } - inline std::string GetConsumerID(); - inline std::string GetKeyID(); - inline std::string GetKeyValue(); + inline PImplicitPort GetInputA(); + inline PImplicitPort GetOutputResult(); }; /************************************************************************************************************************* - Class CAccessRight + Class CSinNode **************************************************************************************************************************/ -class CAccessRight : public CBase { +class CSinNode : public COneInputNode { public: /** - * CAccessRight::CAccessRight - Constructor for AccessRight class. + * CSinNode::CSinNode - Constructor for SinNode class. */ - CAccessRight(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CSinNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline PConsumer GetConsumer(); - inline eWrappingAlgorithm GetWrappingAlgorithm(); - inline eMgfAlgorithm GetMgfAlgorithm(); - inline eDigestMethod GetDigestMethod(); }; /************************************************************************************************************************* - Class CContentEncryptionParams + Class CCosNode **************************************************************************************************************************/ -class CContentEncryptionParams : public CBase { +class CCosNode : public COneInputNode { public: /** - * CContentEncryptionParams::CContentEncryptionParams - Constructor for ContentEncryptionParams class. + * CCosNode::CCosNode - Constructor for CosNode class. */ - CContentEncryptionParams(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CCosNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline eEncryptionAlgorithm GetEncryptionAlgorithm(); - inline void GetKey(std::vector & ByteDataBuffer); - inline void GetInitializationVector(std::vector & ByteDataBuffer); - inline void GetAuthenticationTag(std::vector & ByteDataBuffer); - inline void SetAuthenticationTag(const CInputVector & ByteDataBuffer); - inline void GetAdditionalAuthenticationData(std::vector & ByteDataBuffer); - inline Lib3MF_uint64 GetDescriptor(); - inline std::string GetKeyUUID(); }; /************************************************************************************************************************* - Class CResourceData + Class CTanNode **************************************************************************************************************************/ -class CResourceData : public CBase { +class CTanNode : public COneInputNode { public: /** - * CResourceData::CResourceData - Constructor for ResourceData class. + * CTanNode::CTanNode - Constructor for TanNode class. */ - CResourceData(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CTanNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline PPackagePart GetPath(); - inline eEncryptionAlgorithm GetEncryptionAlgorithm(); - inline eCompression GetCompression(); - inline void GetAdditionalAuthenticationData(std::vector & ByteDataBuffer); }; /************************************************************************************************************************* - Class CResourceDataGroup + Class CArcSinNode **************************************************************************************************************************/ -class CResourceDataGroup : public CBase { +class CArcSinNode : public COneInputNode { public: /** - * CResourceDataGroup::CResourceDataGroup - Constructor for ResourceDataGroup class. + * CArcSinNode::CArcSinNode - Constructor for ArcSinNode class. */ - CResourceDataGroup(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CArcSinNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline std::string GetKeyUUID(); - inline PAccessRight AddAccessRight(classParam pConsumer, const eWrappingAlgorithm eWrappingAlgorithm, const eMgfAlgorithm eMgfAlgorithm, const eDigestMethod eDigestMethod); - inline PAccessRight FindAccessRightByConsumer(classParam pConsumer); - inline void RemoveAccessRight(classParam pConsumer); }; /************************************************************************************************************************* - Class CKeyStore + Class CArcCosNode **************************************************************************************************************************/ -class CKeyStore : public CBase { +class CArcCosNode : public COneInputNode { public: /** - * CKeyStore::CKeyStore - Constructor for KeyStore class. + * CArcCosNode::CArcCosNode - Constructor for ArcCosNode class. */ - CKeyStore(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CArcCosNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline PConsumer AddConsumer(const std::string & sConsumerID, const std::string & sKeyID, const std::string & sKeyValue); - inline Lib3MF_uint64 GetConsumerCount(); - inline PConsumer GetConsumer(const Lib3MF_uint64 nConsumerIndex); - inline void RemoveConsumer(classParam pConsumer); - inline PConsumer FindConsumer(const std::string & sConsumerID); - inline Lib3MF_uint64 GetResourceDataGroupCount(); - inline PResourceDataGroup AddResourceDataGroup(); - inline PResourceDataGroup GetResourceDataGroup(const Lib3MF_uint64 nResourceDataIndex); - inline void RemoveResourceDataGroup(classParam pResourceDataGroup); - inline PResourceDataGroup FindResourceDataGroup(classParam pPartPath); - inline PResourceData AddResourceData(classParam pResourceDataGroup, classParam pPartPath, const eEncryptionAlgorithm eAlgorithm, const eCompression eCompression, const CInputVector & AdditionalAuthenticationDataBuffer); - inline void RemoveResourceData(classParam pResourceData); - inline PResourceData FindResourceData(classParam pResourcePath); - inline Lib3MF_uint64 GetResourceDataCount(); - inline PResourceData GetResourceData(const Lib3MF_uint64 nResourceDataIndex); - inline std::string GetUUID(bool & bHasUUID); - inline void SetUUID(const std::string & sUUID); }; /************************************************************************************************************************* - Class CModel + Class CArcTanNode **************************************************************************************************************************/ -class CModel : public CBase { +class CArcTanNode : public COneInputNode { public: /** - * CModel::CModel - Constructor for Model class. + * CArcTanNode::CArcTanNode - Constructor for ArcTanNode class. */ - CModel(CWrapper* pWrapper, Lib3MFHandle pHandle) - : CBase(pWrapper, pHandle) + CArcTanNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { } - inline PPackagePart RootModelPart(); - inline PPackagePart FindOrCreatePackagePart(const std::string & sAbsolutePath); - inline void SetUnit(const eModelUnit eUnit); - inline eModelUnit GetUnit(); - inline std::string GetLanguage(); - inline void SetLanguage(const std::string & sLanguage); - inline PWriter QueryWriter(const std::string & sWriterClass); - inline PReader QueryReader(const std::string & sReaderClass); - inline PResource GetResourceByID(const Lib3MF_uint32 nUniqueResourceID); - inline PTexture2D GetTexture2DByID(const Lib3MF_uint32 nUniqueResourceID); - inline ePropertyType GetPropertyTypeByID(const Lib3MF_uint32 nUniqueResourceID); - inline PBaseMaterialGroup GetBaseMaterialGroupByID(const Lib3MF_uint32 nUniqueResourceID); - inline PTexture2DGroup GetTexture2DGroupByID(const Lib3MF_uint32 nUniqueResourceID); - inline PCompositeMaterials GetCompositeMaterialsByID(const Lib3MF_uint32 nUniqueResourceID); - inline PMultiPropertyGroup GetMultiPropertyGroupByID(const Lib3MF_uint32 nUniqueResourceID); - inline PMeshObject GetMeshObjectByID(const Lib3MF_uint32 nUniqueResourceID); - inline PComponentsObject GetComponentsObjectByID(const Lib3MF_uint32 nUniqueResourceID); - inline PColorGroup GetColorGroupByID(const Lib3MF_uint32 nUniqueResourceID); - inline PSliceStack GetSliceStackByID(const Lib3MF_uint32 nUniqueResourceID); - inline std::string GetBuildUUID(bool & bHasUUID); - inline void SetBuildUUID(const std::string & sUUID); - inline PBuildItemIterator GetBuildItems(); - inline sBox GetOutbox(); - inline PResourceIterator GetResources(); - inline PObjectIterator GetObjects(); - inline PMeshObjectIterator GetMeshObjects(); - inline PComponentsObjectIterator GetComponentsObjects(); - inline PTexture2DIterator GetTexture2Ds(); - inline PBaseMaterialGroupIterator GetBaseMaterialGroups(); - inline PColorGroupIterator GetColorGroups(); - inline PTexture2DGroupIterator GetTexture2DGroups(); - inline PCompositeMaterialsIterator GetCompositeMaterials(); - inline PMultiPropertyGroupIterator GetMultiPropertyGroups(); - inline PSliceStackIterator GetSliceStacks(); - inline PModel MergeToModel(); - inline PMeshObject AddMeshObject(); - inline PComponentsObject AddComponentsObject(); - inline PSliceStack AddSliceStack(const Lib3MF_double dZBottom); - inline PTexture2D AddTexture2DFromAttachment(classParam pTextureAttachment); - inline PBaseMaterialGroup AddBaseMaterialGroup(); - inline PColorGroup AddColorGroup(); - inline PTexture2DGroup AddTexture2DGroup(classParam pTexture2DInstance); - inline PCompositeMaterials AddCompositeMaterials(classParam pBaseMaterialGroupInstance); - inline PMultiPropertyGroup AddMultiPropertyGroup(); - inline PBuildItem AddBuildItem(classParam pObject, const sTransform & Transform); - inline void RemoveBuildItem(classParam pBuildItemInstance); - inline PMetaDataGroup GetMetaDataGroup(); - inline PAttachment AddAttachment(const std::string & sURI, const std::string & sRelationShipType); - inline void RemoveAttachment(classParam pAttachmentInstance); - inline PAttachment GetAttachment(const Lib3MF_uint32 nIndex); - inline PAttachment FindAttachment(const std::string & sURI); - inline Lib3MF_uint32 GetAttachmentCount(); - inline bool HasPackageThumbnailAttachment(); - inline PAttachment CreatePackageThumbnailAttachment(); - inline PAttachment GetPackageThumbnailAttachment(); - inline void RemovePackageThumbnailAttachment(); - inline void AddCustomContentType(const std::string & sExtension, const std::string & sContentType); - inline void RemoveCustomContentType(const std::string & sExtension); - inline void SetRandomNumberCallback(const RandomNumberCallback pTheCallback, const Lib3MF_pvoid pUserData); - inline PKeyStore GetKeyStore(); }; - + /************************************************************************************************************************* - RTTI: Polymorphic Factory implementation + Class CSinhNode **************************************************************************************************************************/ - -/** -* IMPORTANT: PolymorphicFactory method should not be used by application directly. -* It's designed to be used on Lib3MFHandle object only once. -* If it's used on any existing object as a form of dynamic cast then -* CWrapper::AcquireInstance(CBase object) must be called after instantiating new object. -* This is important to keep reference count matching between application and library sides. -*/ -inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) -{ - Lib3MF_uint64 resultClassTypeId = 0; - CheckError(nullptr, m_WrapperTable.m_Base_ClassTypeId(pHandle, &resultClassTypeId)); - switch(resultClassTypeId) { - case 0x856632D0BAF1D8B7UL: return new CBase(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Base" - case 0xE76F642F363FD7E9UL: return new CWriter(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Writer" - case 0x2D86831DA59FBE72UL: return new CReader(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Reader" - case 0x0E55A826D377483EUL: return new CPackagePart(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::PackagePart" - case 0xDFE3889D1B269CBBUL: return new CResource(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Resource" - case 0x460F3515E2621DBEUL: return new CResourceIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIterator" - case 0x69684DB99FA813F6UL: return new CSliceStackIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStackIterator" - case 0xDE92510BD2112288UL: return new CObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ObjectIterator" - case 0xF4196034E2B9FDE6UL: return new CMeshObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObjectIterator" - case 0x564DE4217ED7614AUL: return new CComponentsObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObjectIterator" - case 0x4BD32B4870FFC03BUL: return new CTexture2DIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DIterator" - case 0x65E6EDD9362C79CBUL: return new CBaseMaterialGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroupIterator" - case 0x10274A1757C729C0UL: return new CColorGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroupIterator" - case 0x30D55F4DB88FE0CAUL: return new CTexture2DGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroupIterator" - case 0xA99CC6C3F70FB6F9UL: return new CCompositeMaterialsIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterialsIterator" - case 0xC2BDF5D8CBBDB1F0UL: return new CMultiPropertyGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" - case 0xD17716D063DE2C22UL: return new CMetaData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" - case 0x0C3B85369E9B25D3UL: return new CMetaDataGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" - case 0x2DA2136F577A779CUL: return new CObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Object" - case 0x3B3A6DC6EC610497UL: return new CMeshObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" - case 0x63B3B461B30B4BA5UL: return new CBeamLattice(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" - case 0x4ECDB6A6F69F2BEBUL: return new CComponent(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Component" - case 0x6522CF04EB283FEDUL: return new CComponentsObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" - case 0x30CCDBE90E00B55BUL: return new CBeamSet(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" - case 0xB27D4656E16609FAUL: return new CBaseMaterialGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroup" - case 0xD085FB2E49CDB5B1UL: return new CColorGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroup" - case 0xBC1208397E37055DUL: return new CTexture2DGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroup" - case 0xCE16224D688B86F2UL: return new CCompositeMaterials(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" - case 0xB989E02E43158FE6UL: return new CMultiPropertyGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" - case 0x8CE7A1191A63A35DUL: return new CAttachment(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Attachment" - case 0xE0441CF976B36319UL: return new CTexture2D(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" - case 0x68FB2D5FFC4BA12AUL: return new CBuildItem(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItem" - case 0xA7D21BD364910860UL: return new CBuildItemIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItemIterator" - case 0x2198BCF4D8DF9C40UL: return new CSlice(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Slice" - case 0x6594B031B6096238UL: return new CSliceStack(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStack" - case 0xD9E46D5E6D8118EEUL: return new CConsumer(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Consumer" - case 0x385C42FC5609498AUL: return new CAccessRight(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::AccessRight" - case 0x7FB36B91D4CE4671UL: return new CContentEncryptionParams(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ContentEncryptionParams" - case 0x1A47A5E258E22EF9UL: return new CResourceData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceData" - case 0xD59067227E428AA4UL: return new CResourceDataGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceDataGroup" - case 0x1CC9E0CC082253C6UL: return new CKeyStore(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::KeyStore" - case 0x5A8164ECEDB03F09UL: return new CModel(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Model" - } - return new CBase(this, pHandle); -} +class CSinhNode : public COneInputNode { +public: /** - * CWrapper::GetLibraryVersion - retrieves the binary version of this library. - * @param[out] nMajor - returns the major version of this library - * @param[out] nMinor - returns the minor version of this library - * @param[out] nMicro - returns the micro version of this library + * CSinhNode::CSinhNode - Constructor for SinhNode class. */ - inline void CWrapper::GetLibraryVersion(Lib3MF_uint32 & nMajor, Lib3MF_uint32 & nMinor, Lib3MF_uint32 & nMicro) + CSinhNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - CheckError(nullptr,m_WrapperTable.m_GetLibraryVersion(&nMajor, &nMinor, &nMicro)); } +}; + +/************************************************************************************************************************* + Class CCoshNode +**************************************************************************************************************************/ +class CCoshNode : public COneInputNode { +public: + /** - * CWrapper::GetPrereleaseInformation - retrieves prerelease information of this library. - * @return Does the library provide prerelease version? - * @param[out] sPrereleaseInfo - retrieves prerelease information of this library. + * CCoshNode::CCoshNode - Constructor for CoshNode class. */ - inline bool CWrapper::GetPrereleaseInformation(std::string & sPrereleaseInfo) + CCoshNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - bool resultHasPrereleaseInfo = 0; - Lib3MF_uint32 bytesNeededPrereleaseInfo = 0; - Lib3MF_uint32 bytesWrittenPrereleaseInfo = 0; - CheckError(nullptr,m_WrapperTable.m_GetPrereleaseInformation(&resultHasPrereleaseInfo, 0, &bytesNeededPrereleaseInfo, nullptr)); - std::vector bufferPrereleaseInfo(bytesNeededPrereleaseInfo); - CheckError(nullptr,m_WrapperTable.m_GetPrereleaseInformation(&resultHasPrereleaseInfo, bytesNeededPrereleaseInfo, &bytesWrittenPrereleaseInfo, &bufferPrereleaseInfo[0])); - sPrereleaseInfo = std::string(&bufferPrereleaseInfo[0]); - - return resultHasPrereleaseInfo; } +}; + +/************************************************************************************************************************* + Class CTanhNode +**************************************************************************************************************************/ +class CTanhNode : public COneInputNode { +public: + /** - * CWrapper::GetBuildInformation - retrieves build information of this library. - * @return Does the library provide build version? - * @param[out] sBuildInformation - retrieves build information of this library. + * CTanhNode::CTanhNode - Constructor for TanhNode class. */ - inline bool CWrapper::GetBuildInformation(std::string & sBuildInformation) + CTanhNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - bool resultHasBuildInfo = 0; - Lib3MF_uint32 bytesNeededBuildInformation = 0; - Lib3MF_uint32 bytesWrittenBuildInformation = 0; - CheckError(nullptr,m_WrapperTable.m_GetBuildInformation(&resultHasBuildInfo, 0, &bytesNeededBuildInformation, nullptr)); - std::vector bufferBuildInformation(bytesNeededBuildInformation); - CheckError(nullptr,m_WrapperTable.m_GetBuildInformation(&resultHasBuildInfo, bytesNeededBuildInformation, &bytesWrittenBuildInformation, &bufferBuildInformation[0])); - sBuildInformation = std::string(&bufferBuildInformation[0]); - - return resultHasBuildInfo; } +}; + +/************************************************************************************************************************* + Class CRoundNode +**************************************************************************************************************************/ +class CRoundNode : public COneInputNode { +public: + /** - * CWrapper::GetSpecificationVersion - retrieves whether a specification is supported, and if so, which version. - * @param[in] sSpecificationURL - URL of extension to check - * @param[out] bIsSupported - returns whether this specification is supported - * @param[out] nMajor - returns the major version of the extension (if IsSupported) - * @param[out] nMinor - returns the minor version of the extension (if IsSupported) - * @param[out] nMicro - returns the micro version of the extension (if IsSupported) + * CRoundNode::CRoundNode - Constructor for RoundNode class. */ - inline void CWrapper::GetSpecificationVersion(const std::string & sSpecificationURL, bool & bIsSupported, Lib3MF_uint32 & nMajor, Lib3MF_uint32 & nMinor, Lib3MF_uint32 & nMicro) + CRoundNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - CheckError(nullptr,m_WrapperTable.m_GetSpecificationVersion(sSpecificationURL.c_str(), &bIsSupported, &nMajor, &nMinor, &nMicro)); } +}; + +/************************************************************************************************************************* + Class CCeilNode +**************************************************************************************************************************/ +class CCeilNode : public COneInputNode { +public: + /** - * CWrapper::CreateModel - creates an empty model instance. - * @return returns an empty model instance + * CCeilNode::CCeilNode - Constructor for CeilNode class. */ - inline PModel CWrapper::CreateModel() + CCeilNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - Lib3MFHandle hModel = nullptr; - CheckError(nullptr,m_WrapperTable.m_CreateModel(&hModel)); - - if (!hModel) { - CheckError(nullptr,LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(this->polymorphicFactory(hModel))); } +}; + +/************************************************************************************************************************* + Class CFloorNode +**************************************************************************************************************************/ +class CFloorNode : public COneInputNode { +public: + /** - * CWrapper::Release - releases shared ownership of an object instance - * @param[in] pInstance - the object instance to release + * CFloorNode::CFloorNode - Constructor for FloorNode class. */ - inline void CWrapper::Release(classParam pInstance) + CFloorNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - Lib3MFHandle hInstance = pInstance.GetHandle(); - CheckError(nullptr,m_WrapperTable.m_Release(hInstance)); } +}; + +/************************************************************************************************************************* + Class CSignNode +**************************************************************************************************************************/ +class CSignNode : public COneInputNode { +public: + /** - * CWrapper::Acquire - acquires shared ownership of an object instance - * @param[in] pInstance - the object instance to acquire + * CSignNode::CSignNode - Constructor for SignNode class. */ - inline void CWrapper::Acquire(classParam pInstance) + CSignNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - Lib3MFHandle hInstance = pInstance.GetHandle(); - CheckError(nullptr,m_WrapperTable.m_Acquire(hInstance)); } +}; + +/************************************************************************************************************************* + Class CFractNode +**************************************************************************************************************************/ +class CFractNode : public COneInputNode { +public: + /** - * CWrapper::SetJournal - Sets the journal file path - * @param[in] sJournalPath - File name of the journal file + * CFractNode::CFractNode - Constructor for FractNode class. */ - inline void CWrapper::SetJournal(const std::string & sJournalPath) + CFractNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - CheckError(nullptr,m_WrapperTable.m_SetJournal(sJournalPath.c_str())); } +}; + +/************************************************************************************************************************* + Class CAbsNode +**************************************************************************************************************************/ +class CAbsNode : public COneInputNode { +public: + /** - * CWrapper::GetLastError - Retrieves the last error string of an instance - * @param[in] pInstance - Object where the error occured. - * @param[out] sLastErrorString - Last Error String - * @return Returns if the instance has a last error. + * CAbsNode::CAbsNode - Constructor for AbsNode class. */ - inline bool CWrapper::GetLastError(classParam pInstance, std::string & sLastErrorString) + CAbsNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - Lib3MFHandle hInstance = pInstance.GetHandle(); - Lib3MF_uint32 bytesNeededLastErrorString = 0; - Lib3MF_uint32 bytesWrittenLastErrorString = 0; - bool resultHasLastError = 0; - CheckError(nullptr,m_WrapperTable.m_GetLastError(hInstance, 0, &bytesNeededLastErrorString, nullptr, &resultHasLastError)); - std::vector bufferLastErrorString(bytesNeededLastErrorString); - CheckError(nullptr,m_WrapperTable.m_GetLastError(hInstance, bytesNeededLastErrorString, &bytesWrittenLastErrorString, &bufferLastErrorString[0], &resultHasLastError)); - sLastErrorString = std::string(&bufferLastErrorString[0]); - - return resultHasLastError; } +}; + +/************************************************************************************************************************* + Class CExpNode +**************************************************************************************************************************/ +class CExpNode : public COneInputNode { +public: + /** - * CWrapper::GetSymbolLookupMethod - Returns the address of the SymbolLookupMethod - * @return Address of the SymbolAddressMethod + * CExpNode::CExpNode - Constructor for ExpNode class. */ - inline Lib3MF_pvoid CWrapper::GetSymbolLookupMethod() + CExpNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - Lib3MF_pvoid resultSymbolLookupMethod = 0; - CheckError(nullptr,m_WrapperTable.m_GetSymbolLookupMethod(&resultSymbolLookupMethod)); - - return resultSymbolLookupMethod; } +}; + +/************************************************************************************************************************* + Class CLogNode +**************************************************************************************************************************/ +class CLogNode : public COneInputNode { +public: + /** - * CWrapper::RetrieveProgressMessage - Return an English text for a progress identifier.|Note: this is the only function you can call from your callback function. - * @param[in] eTheProgressIdentifier - the progress identifier that is passed to the callback function - * @param[out] sProgressMessage - English text for the progress identifier + * CLogNode::CLogNode - Constructor for LogNode class. */ - inline void CWrapper::RetrieveProgressMessage(const eProgressIdentifier eTheProgressIdentifier, std::string & sProgressMessage) + CLogNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - Lib3MF_uint32 bytesNeededProgressMessage = 0; - Lib3MF_uint32 bytesWrittenProgressMessage = 0; - CheckError(nullptr,m_WrapperTable.m_RetrieveProgressMessage(eTheProgressIdentifier, 0, &bytesNeededProgressMessage, nullptr)); - std::vector bufferProgressMessage(bytesNeededProgressMessage); - CheckError(nullptr,m_WrapperTable.m_RetrieveProgressMessage(eTheProgressIdentifier, bytesNeededProgressMessage, &bytesWrittenProgressMessage, &bufferProgressMessage[0])); - sProgressMessage = std::string(&bufferProgressMessage[0]); } +}; + +/************************************************************************************************************************* + Class CLog2Node +**************************************************************************************************************************/ +class CLog2Node : public COneInputNode { +public: + /** - * CWrapper::RGBAToColor - Creates a Color from uint8 RGBA values - * @param[in] nRed - Red value of color (0-255) - * @param[in] nGreen - Green value of color (0-255) - * @param[in] nBlue - Blue value of color (0-255) - * @param[in] nAlpha - Alpha value of color (0-255) - * @return Assembled color + * CLog2Node::CLog2Node - Constructor for Log2Node class. */ - inline sColor CWrapper::RGBAToColor(const Lib3MF_uint8 nRed, const Lib3MF_uint8 nGreen, const Lib3MF_uint8 nBlue, const Lib3MF_uint8 nAlpha) + CLog2Node(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - sColor resultTheColor; - CheckError(nullptr,m_WrapperTable.m_RGBAToColor(nRed, nGreen, nBlue, nAlpha, &resultTheColor)); - - return resultTheColor; } +}; + +/************************************************************************************************************************* + Class CLog10Node +**************************************************************************************************************************/ +class CLog10Node : public COneInputNode { +public: + /** - * CWrapper::FloatRGBAToColor - Creates a Color from uint8 RGBA values - * @param[in] fRed - Red value of color (0-1) - * @param[in] fGreen - Green value of color (0-1) - * @param[in] fBlue - Blue value of color (0-1) - * @param[in] fAlpha - Alpha value of color (0-1) - * @return Assembled color + * CLog10Node::CLog10Node - Constructor for Log10Node class. */ - inline sColor CWrapper::FloatRGBAToColor(const Lib3MF_single fRed, const Lib3MF_single fGreen, const Lib3MF_single fBlue, const Lib3MF_single fAlpha) + CLog10Node(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - sColor resultTheColor; - CheckError(nullptr,m_WrapperTable.m_FloatRGBAToColor(fRed, fGreen, fBlue, fAlpha, &resultTheColor)); - - return resultTheColor; } +}; + +/************************************************************************************************************************* + Class CLengthNode +**************************************************************************************************************************/ +class CLengthNode : public COneInputNode { +public: + /** - * CWrapper::ColorToRGBA - Calculates uint8-RGBA-values from a Color - * @param[in] TheColor - Color to handle - * @param[out] nRed - Red value of color (0-255) - * @param[out] nGreen - Green value of color (0-255) - * @param[out] nBlue - Blue value of color (0-255) - * @param[out] nAlpha - Alpha value of color (0-255) + * CLengthNode::CLengthNode - Constructor for LengthNode class. */ - inline void CWrapper::ColorToRGBA(const sColor & TheColor, Lib3MF_uint8 & nRed, Lib3MF_uint8 & nGreen, Lib3MF_uint8 & nBlue, Lib3MF_uint8 & nAlpha) + CLengthNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - CheckError(nullptr,m_WrapperTable.m_ColorToRGBA(&TheColor, &nRed, &nGreen, &nBlue, &nAlpha)); } +}; + +/************************************************************************************************************************* + Class CTransposeNode +**************************************************************************************************************************/ +class CTransposeNode : public COneInputNode { +public: + /** - * CWrapper::ColorToFloatRGBA - Calculates float-RGBA-values from a Color - * @param[in] TheColor - Color to handle - * @param[out] fRed - Red value of color (0-1) - * @param[out] fGreen - Green value of color (0-1) - * @param[out] fBlue - Blue value of color (0-1) - * @param[out] fAlpha - Alpha value of color (0-1) + * CTransposeNode::CTransposeNode - Constructor for TransposeNode class. */ - inline void CWrapper::ColorToFloatRGBA(const sColor & TheColor, Lib3MF_single & fRed, Lib3MF_single & fGreen, Lib3MF_single & fBlue, Lib3MF_single & fAlpha) + CTransposeNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - CheckError(nullptr,m_WrapperTable.m_ColorToFloatRGBA(&TheColor, &fRed, &fGreen, &fBlue, &fAlpha)); } +}; + +/************************************************************************************************************************* + Class CInverseNode +**************************************************************************************************************************/ +class CInverseNode : public COneInputNode { +public: + /** - * CWrapper::GetIdentityTransform - Creates an identity transform - * @return Transformation matrix. + * CInverseNode::CInverseNode - Constructor for InverseNode class. */ - inline sTransform CWrapper::GetIdentityTransform() + CInverseNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - sTransform resultTransform; - CheckError(nullptr,m_WrapperTable.m_GetIdentityTransform(&resultTransform)); - - return resultTransform; } +}; + +/************************************************************************************************************************* + Class CSqrtNode +**************************************************************************************************************************/ +class CSqrtNode : public COneInputNode { +public: + /** - * CWrapper::GetUniformScaleTransform - Creates a uniform scale transform - * @param[in] fFactor - Factor in X, Y and Z - * @return Transformation matrix. + * CSqrtNode::CSqrtNode - Constructor for SqrtNode class. */ - inline sTransform CWrapper::GetUniformScaleTransform(const Lib3MF_single fFactor) + CSqrtNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - sTransform resultTransform; - CheckError(nullptr,m_WrapperTable.m_GetUniformScaleTransform(fFactor, &resultTransform)); - - return resultTransform; } +}; + +/************************************************************************************************************************* + Class CResourceIdNode +**************************************************************************************************************************/ +class CResourceIdNode : public CImplicitNode { +public: + /** - * CWrapper::GetScaleTransform - Creates a scale transform - * @param[in] fFactorX - Factor in X - * @param[in] fFactorY - Factor in Y - * @param[in] fFactorZ - Factor in Z - * @return Transformation matrix. + * CResourceIdNode::CResourceIdNode - Constructor for ResourceIdNode class. */ - inline sTransform CWrapper::GetScaleTransform(const Lib3MF_single fFactorX, const Lib3MF_single fFactorY, const Lib3MF_single fFactorZ) + CResourceIdNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) { - sTransform resultTransform; - CheckError(nullptr,m_WrapperTable.m_GetScaleTransform(fFactorX, fFactorY, fFactorZ, &resultTransform)); - - return resultTransform; } + inline void SetResource(classParam pResource); + inline PResource GetResource(); + inline PImplicitPort GetOutputValue(); +}; + +/************************************************************************************************************************* + Class CTwoInputNode +**************************************************************************************************************************/ +class CTwoInputNode : public COneInputNode { +public: + /** - * CWrapper::GetTranslationTransform - Creates an translation transform - * @param[in] fVectorX - Translation in X - * @param[in] fVectorY - Translation in Y - * @param[in] fVectorZ - Translation in Z - * @return Transformation matrix. + * CTwoInputNode::CTwoInputNode - Constructor for TwoInputNode class. */ - inline sTransform CWrapper::GetTranslationTransform(const Lib3MF_single fVectorX, const Lib3MF_single fVectorY, const Lib3MF_single fVectorZ) + CTwoInputNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) { - sTransform resultTransform; - CheckError(nullptr,m_WrapperTable.m_GetTranslationTransform(fVectorX, fVectorY, fVectorZ, &resultTransform)); - - return resultTransform; } - inline void CWrapper::CheckError(CBase * pBaseClass, Lib3MFResult nResult) + inline PImplicitPort GetInputB(); +}; + +/************************************************************************************************************************* + Class CAdditionNode +**************************************************************************************************************************/ +class CAdditionNode : public CTwoInputNode { +public: + + /** + * CAdditionNode::CAdditionNode - Constructor for AdditionNode class. + */ + CAdditionNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) { - if (nResult != 0) { - std::string sErrorMessage; - if (pBaseClass != nullptr) { - GetLastError(pBaseClass, sErrorMessage); - } - throw ELib3MFException(nResult, sErrorMessage); - } } - - inline Lib3MFResult CWrapper::initWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) +}; + +/************************************************************************************************************************* + Class CSubtractionNode +**************************************************************************************************************************/ +class CSubtractionNode : public CTwoInputNode { +public: + + /** + * CSubtractionNode::CSubtractionNode - Constructor for SubtractionNode class. + */ + CSubtractionNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) { - if (pWrapperTable == nullptr) - return LIB3MF_ERROR_INVALIDPARAM; - - pWrapperTable->m_LibraryHandle = nullptr; - pWrapperTable->m_Base_ClassTypeId = nullptr; - pWrapperTable->m_Writer_WriteToFile = nullptr; - pWrapperTable->m_Writer_GetStreamSize = nullptr; - pWrapperTable->m_Writer_WriteToBuffer = nullptr; - pWrapperTable->m_Writer_WriteToCallback = nullptr; - pWrapperTable->m_Writer_SetProgressCallback = nullptr; - pWrapperTable->m_Writer_GetDecimalPrecision = nullptr; - pWrapperTable->m_Writer_SetDecimalPrecision = nullptr; - pWrapperTable->m_Writer_SetStrictModeActive = nullptr; - pWrapperTable->m_Writer_GetStrictModeActive = nullptr; - pWrapperTable->m_Writer_GetWarning = nullptr; - pWrapperTable->m_Writer_GetWarningCount = nullptr; - pWrapperTable->m_Writer_AddKeyWrappingCallback = nullptr; - pWrapperTable->m_Writer_SetContentEncryptionCallback = nullptr; - pWrapperTable->m_Reader_ReadFromFile = nullptr; - pWrapperTable->m_Reader_ReadFromBuffer = nullptr; - pWrapperTable->m_Reader_ReadFromCallback = nullptr; - pWrapperTable->m_Reader_SetProgressCallback = nullptr; - pWrapperTable->m_Reader_AddRelationToRead = nullptr; - pWrapperTable->m_Reader_RemoveRelationToRead = nullptr; - pWrapperTable->m_Reader_SetStrictModeActive = nullptr; - pWrapperTable->m_Reader_GetStrictModeActive = nullptr; - pWrapperTable->m_Reader_GetWarning = nullptr; - pWrapperTable->m_Reader_GetWarningCount = nullptr; - pWrapperTable->m_Reader_AddKeyWrappingCallback = nullptr; - pWrapperTable->m_Reader_SetContentEncryptionCallback = nullptr; - pWrapperTable->m_PackagePart_GetPath = nullptr; - pWrapperTable->m_PackagePart_SetPath = nullptr; - pWrapperTable->m_Resource_GetResourceID = nullptr; - pWrapperTable->m_Resource_GetUniqueResourceID = nullptr; - pWrapperTable->m_Resource_PackagePart = nullptr; - pWrapperTable->m_Resource_SetPackagePart = nullptr; - pWrapperTable->m_Resource_GetModelResourceID = nullptr; - pWrapperTable->m_ResourceIterator_MoveNext = nullptr; - pWrapperTable->m_ResourceIterator_MovePrevious = nullptr; - pWrapperTable->m_ResourceIterator_GetCurrent = nullptr; - pWrapperTable->m_ResourceIterator_Clone = nullptr; - pWrapperTable->m_ResourceIterator_Count = nullptr; - pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack = nullptr; - pWrapperTable->m_ObjectIterator_GetCurrentObject = nullptr; - pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject = nullptr; - pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject = nullptr; - pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D = nullptr; - pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup = nullptr; - pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup = nullptr; - pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup = nullptr; - pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials = nullptr; - pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup = nullptr; - pWrapperTable->m_MetaData_GetNameSpace = nullptr; - pWrapperTable->m_MetaData_SetNameSpace = nullptr; - pWrapperTable->m_MetaData_GetName = nullptr; - pWrapperTable->m_MetaData_SetName = nullptr; - pWrapperTable->m_MetaData_GetKey = nullptr; - pWrapperTable->m_MetaData_GetMustPreserve = nullptr; - pWrapperTable->m_MetaData_SetMustPreserve = nullptr; - pWrapperTable->m_MetaData_GetType = nullptr; - pWrapperTable->m_MetaData_SetType = nullptr; - pWrapperTable->m_MetaData_GetValue = nullptr; - pWrapperTable->m_MetaData_SetValue = nullptr; - pWrapperTable->m_MetaDataGroup_GetMetaDataCount = nullptr; - pWrapperTable->m_MetaDataGroup_GetMetaData = nullptr; + } + +}; + +/************************************************************************************************************************* + Class CMultiplicationNode +**************************************************************************************************************************/ +class CMultiplicationNode : public CTwoInputNode { +public: + + /** + * CMultiplicationNode::CMultiplicationNode - Constructor for MultiplicationNode class. + */ + CMultiplicationNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CDivisionNode +**************************************************************************************************************************/ +class CDivisionNode : public CTwoInputNode { +public: + + /** + * CDivisionNode::CDivisionNode - Constructor for DivisionNode class. + */ + CDivisionNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CDotNode +**************************************************************************************************************************/ +class CDotNode : public CTwoInputNode { +public: + + /** + * CDotNode::CDotNode - Constructor for DotNode class. + */ + CDotNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CCrossNode +**************************************************************************************************************************/ +class CCrossNode : public CTwoInputNode { +public: + + /** + * CCrossNode::CCrossNode - Constructor for CrossNode class. + */ + CCrossNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CArcTan2Node +**************************************************************************************************************************/ +class CArcTan2Node : public CTwoInputNode { +public: + + /** + * CArcTan2Node::CArcTan2Node - Constructor for ArcTan2Node class. + */ + CArcTan2Node(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CMatVecMultiplicationNode +**************************************************************************************************************************/ +class CMatVecMultiplicationNode : public CTwoInputNode { +public: + + /** + * CMatVecMultiplicationNode::CMatVecMultiplicationNode - Constructor for MatVecMultiplicationNode class. + */ + CMatVecMultiplicationNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CMinNode +**************************************************************************************************************************/ +class CMinNode : public CTwoInputNode { +public: + + /** + * CMinNode::CMinNode - Constructor for MinNode class. + */ + CMinNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CMaxNode +**************************************************************************************************************************/ +class CMaxNode : public CTwoInputNode { +public: + + /** + * CMaxNode::CMaxNode - Constructor for MaxNode class. + */ + CMaxNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CFmodNode +**************************************************************************************************************************/ +class CFmodNode : public CTwoInputNode { +public: + + /** + * CFmodNode::CFmodNode - Constructor for FmodNode class. + */ + CFmodNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CModNode +**************************************************************************************************************************/ +class CModNode : public CTwoInputNode { +public: + + /** + * CModNode::CModNode - Constructor for ModNode class. + */ + CModNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CPowNode +**************************************************************************************************************************/ +class CPowNode : public CTwoInputNode { +public: + + /** + * CPowNode::CPowNode - Constructor for PowNode class. + */ + CPowNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CTwoInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CSelectNode +**************************************************************************************************************************/ +class CSelectNode : public COneInputNode { +public: + + /** + * CSelectNode::CSelectNode - Constructor for SelectNode class. + */ + CSelectNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputB(); + inline PImplicitPort GetInputC(); + inline PImplicitPort GetInputD(); +}; + +/************************************************************************************************************************* + Class CClampNode +**************************************************************************************************************************/ +class CClampNode : public COneInputNode { +public: + + /** + * CClampNode::CClampNode - Constructor for ClampNode class. + */ + CClampNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputMin(); + inline PImplicitPort GetInputMax(); +}; + +/************************************************************************************************************************* + Class CComposeVectorNode +**************************************************************************************************************************/ +class CComposeVectorNode : public CImplicitNode { +public: + + /** + * CComposeVectorNode::CComposeVectorNode - Constructor for ComposeVectorNode class. + */ + CComposeVectorNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputX(); + inline PImplicitPort GetInputY(); + inline PImplicitPort GetInputZ(); + inline PImplicitPort GetOutputResult(); +}; + +/************************************************************************************************************************* + Class CVectorFromScalarNode +**************************************************************************************************************************/ +class CVectorFromScalarNode : public COneInputNode { +public: + + /** + * CVectorFromScalarNode::CVectorFromScalarNode - Constructor for VectorFromScalarNode class. + */ + CVectorFromScalarNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : COneInputNode(pWrapper, pHandle) + { + } + +}; + +/************************************************************************************************************************* + Class CDecomposeVectorNode +**************************************************************************************************************************/ +class CDecomposeVectorNode : public CImplicitNode { +public: + + /** + * CDecomposeVectorNode::CDecomposeVectorNode - Constructor for DecomposeVectorNode class. + */ + CDecomposeVectorNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputA(); + inline PImplicitPort GetOutputX(); + inline PImplicitPort GetOutputY(); + inline PImplicitPort GetOutputZ(); +}; + +/************************************************************************************************************************* + Class CComposeMatrixNode +**************************************************************************************************************************/ +class CComposeMatrixNode : public CImplicitNode { +public: + + /** + * CComposeMatrixNode::CComposeMatrixNode - Constructor for ComposeMatrixNode class. + */ + CComposeMatrixNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputM00(); + inline PImplicitPort GetInputM01(); + inline PImplicitPort GetInputM02(); + inline PImplicitPort GetInputM03(); + inline PImplicitPort GetInputM10(); + inline PImplicitPort GetInputM11(); + inline PImplicitPort GetInputM12(); + inline PImplicitPort GetInputM13(); + inline PImplicitPort GetInputM20(); + inline PImplicitPort GetInputM21(); + inline PImplicitPort GetInputM22(); + inline PImplicitPort GetInputM23(); + inline PImplicitPort GetInputM30(); + inline PImplicitPort GetInputM31(); + inline PImplicitPort GetInputM32(); + inline PImplicitPort GetInputM33(); + inline PImplicitPort GetOutputResult(); +}; + +/************************************************************************************************************************* + Class CMatrixFromRowsNode +**************************************************************************************************************************/ +class CMatrixFromRowsNode : public CImplicitNode { +public: + + /** + * CMatrixFromRowsNode::CMatrixFromRowsNode - Constructor for MatrixFromRowsNode class. + */ + CMatrixFromRowsNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputA(); + inline PImplicitPort GetInputB(); + inline PImplicitPort GetInputC(); + inline PImplicitPort GetInputD(); + inline PImplicitPort GetOutputResult(); +}; + +/************************************************************************************************************************* + Class CMatrixFromColumnsNode +**************************************************************************************************************************/ +class CMatrixFromColumnsNode : public CImplicitNode { +public: + + /** + * CMatrixFromColumnsNode::CMatrixFromColumnsNode - Constructor for MatrixFromColumnsNode class. + */ + CMatrixFromColumnsNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputA(); + inline PImplicitPort GetInputB(); + inline PImplicitPort GetInputC(); + inline PImplicitPort GetInputD(); + inline PImplicitPort GetOutputResult(); +}; + +/************************************************************************************************************************* + Class CConstantNode +**************************************************************************************************************************/ +class CConstantNode : public CImplicitNode { +public: + + /** + * CConstantNode::CConstantNode - Constructor for ConstantNode class. + */ + CConstantNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline void SetConstant(const Lib3MF_double dValue); + inline Lib3MF_double GetConstant(); + inline PImplicitPort GetOutputValue(); +}; + +/************************************************************************************************************************* + Class CConstVecNode +**************************************************************************************************************************/ +class CConstVecNode : public CImplicitNode { +public: + + /** + * CConstVecNode::CConstVecNode - Constructor for ConstVecNode class. + */ + CConstVecNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline void SetVector(const sVector & Value); + inline sVector GetVector(); + inline PImplicitPort GetOutputVector(); +}; + +/************************************************************************************************************************* + Class CConstMatNode +**************************************************************************************************************************/ +class CConstMatNode : public CImplicitNode { +public: + + /** + * CConstMatNode::CConstMatNode - Constructor for ConstMatNode class. + */ + CConstMatNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline void SetMatrix(const sMatrix4x4 & Value); + inline sMatrix4x4 GetMatrix(); + inline PImplicitPort GetOutputMatrix(); +}; + +/************************************************************************************************************************* + Class CMeshNode +**************************************************************************************************************************/ +class CMeshNode : public CImplicitNode { +public: + + /** + * CMeshNode::CMeshNode - Constructor for MeshNode class. + */ + CMeshNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputMesh(); + inline PImplicitPort GetInputPos(); + inline PImplicitPort GetOutputDistance(); +}; + +/************************************************************************************************************************* + Class CUnsignedMeshNode +**************************************************************************************************************************/ +class CUnsignedMeshNode : public CImplicitNode { +public: + + /** + * CUnsignedMeshNode::CUnsignedMeshNode - Constructor for UnsignedMeshNode class. + */ + CUnsignedMeshNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputMesh(); + inline PImplicitPort GetInputPos(); + inline PImplicitPort GetOutputDistance(); +}; + +/************************************************************************************************************************* + Class CFunctionCallNode +**************************************************************************************************************************/ +class CFunctionCallNode : public CImplicitNode { +public: + + /** + * CFunctionCallNode::CFunctionCallNode - Constructor for FunctionCallNode class. + */ + CFunctionCallNode(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CImplicitNode(pWrapper, pHandle) + { + } + + inline PImplicitPort GetInputFunctionID(); +}; + +/************************************************************************************************************************* + Class CNodeIterator +**************************************************************************************************************************/ +class CNodeIterator : public CIterator { +public: + + /** + * CNodeIterator::CNodeIterator - Constructor for NodeIterator class. + */ + CNodeIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CIterator(pWrapper, pHandle) + { + } + + inline PImplicitNode GetCurrent(); +}; + +/************************************************************************************************************************* + Class CFunction +**************************************************************************************************************************/ +class CFunction : public CResource { +public: + + /** + * CFunction::CFunction - Constructor for Function class. + */ + CFunction(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResource(pWrapper, pHandle) + { + } + + inline std::string GetDisplayName(); + inline void SetDisplayName(const std::string & sDisplayName); + inline PImplicitPort AddInput(const std::string & sIdentifier, const std::string & sDisplayName, const eImplicitPortType eType); + inline PImplicitPortIterator GetInputs(); + inline void RemoveInput(classParam pInput); + inline PImplicitPort AddOutput(const std::string & sIdentifier, const std::string & sDisplayName, const eImplicitPortType eType); + inline PImplicitPortIterator GetOutputs(); + inline void RemoveOutput(classParam pOutput); + inline PImplicitPort FindInput(const std::string & sIdentifier); + inline PImplicitPort FindOutput(const std::string & sIdentifier); +}; + +/************************************************************************************************************************* + Class CImplicitFunction +**************************************************************************************************************************/ +class CImplicitFunction : public CFunction { +public: + + /** + * CImplicitFunction::CImplicitFunction - Constructor for ImplicitFunction class. + */ + CImplicitFunction(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CFunction(pWrapper, pHandle) + { + } + + inline std::string GetIdentifier(); + inline void SetIdentifier(const std::string & sIdentifier); + inline PImplicitNode AddNode(const eImplicitNodeType eNodeType, const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PSinNode AddSinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PCosNode AddCosNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PTanNode AddTanNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PArcSinNode AddArcSinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PArcCosNode AddArcCosNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PArcTan2Node AddArcTan2Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PSinhNode AddSinhNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PCoshNode AddCoshNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PTanhNode AddTanhNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PRoundNode AddRoundNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PCeilNode AddCeilNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PFloorNode AddFloorNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PSignNode AddSignNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PFractNode AddFractNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PAbsNode AddAbsNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PExpNode AddExpNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PLogNode AddLogNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PLog2Node AddLog2Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PLog10Node AddLog10Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PLengthNode AddLengthNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PTransposeNode AddTransposeNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PInverseNode InverseNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PSqrtNode AddSqrtNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PResourceIdNode AddResourceIdNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PAdditionNode AddAdditionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PSubtractionNode AddSubtractionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PMultiplicationNode AddMultiplicationNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PDivisionNode AddDivisionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PDotNode AddDotNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PCrossNode AddCrossNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PMatVecMultiplicationNode AddMatVecMultiplicationNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PMinNode AddMinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PMaxNode AddMaxNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PFmodNode AddFmodNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PPowNode AddPowNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PSelectNode AddSelectNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PClampNode AddClampNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag); + inline PComposeVectorNode AddComposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PVectorFromScalarNode AddVectorFromScalarNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PDecomposeVectorNode AddDecomposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PComposeMatrixNode AddComposeMatrixNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PMatrixFromRowsNode AddMatrixFromRowsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PMatrixFromColumnsNode AddMatrixFromColumnsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PConstantNode AddConstantNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PConstVecNode AddConstVecNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PConstMatNode AddConstMatNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PMeshNode AddMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PUnsignedMeshNode AddUnsignedMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PFunctionCallNode AddFunctionCallNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag); + inline PNodeIterator GetNodes(); + inline void RemoveNode(classParam pNode); + inline void AddLink(classParam pSource, classParam pTarget); + inline void AddLinkByNames(const std::string & sSource, const std::string & sTarget); + inline void Clear(); + inline void SortNodesTopologically(); +}; + +/************************************************************************************************************************* + Class CFunctionFromImage3D +**************************************************************************************************************************/ +class CFunctionFromImage3D : public CFunction { +public: + + /** + * CFunctionFromImage3D::CFunctionFromImage3D - Constructor for FunctionFromImage3D class. + */ + CFunctionFromImage3D(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CFunction(pWrapper, pHandle) + { + } + + inline PImage3D GetImage3D(); + inline void SetImage3D(classParam pImage3D); + inline void SetFilter(const eTextureFilter eFilter); + inline eTextureFilter GetFilter(); + inline void SetTileStyles(const eTextureTileStyle eTileStyleU, const eTextureTileStyle eTileStyleV, const eTextureTileStyle eTileStyleW); + inline void GetTileStyles(eTextureTileStyle & eTileStyleU, eTextureTileStyle & eTileStyleV, eTextureTileStyle & eTileStyleW); + inline Lib3MF_double GetOffset(); + inline void SetOffset(const Lib3MF_double dOffset); + inline Lib3MF_double GetScale(); + inline void SetScale(const Lib3MF_double dScale); +}; + +/************************************************************************************************************************* + Class CBuildItem +**************************************************************************************************************************/ +class CBuildItem : public CBase { +public: + + /** + * CBuildItem::CBuildItem - Constructor for BuildItem class. + */ + CBuildItem(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PObject GetObjectResource(); + inline std::string GetUUID(bool & bHasUUID); + inline void SetUUID(const std::string & sUUID); + inline Lib3MF_uint32 GetObjectResourceID(); + inline bool HasObjectTransform(); + inline sTransform GetObjectTransform(); + inline void SetObjectTransform(const sTransform & Transform); + inline std::string GetPartNumber(); + inline void SetPartNumber(const std::string & sSetPartnumber); + inline PMetaDataGroup GetMetaDataGroup(); + inline sBox GetOutbox(); +}; + +/************************************************************************************************************************* + Class CBuildItemIterator +**************************************************************************************************************************/ +class CBuildItemIterator : public CBase { +public: + + /** + * CBuildItemIterator::CBuildItemIterator - Constructor for BuildItemIterator class. + */ + CBuildItemIterator(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline bool MoveNext(); + inline bool MovePrevious(); + inline PBuildItem GetCurrent(); + inline PBuildItemIterator Clone(); + inline Lib3MF_uint64 Count(); +}; + +/************************************************************************************************************************* + Class CSlice +**************************************************************************************************************************/ +class CSlice : public CBase { +public: + + /** + * CSlice::CSlice - Constructor for Slice class. + */ + CSlice(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline void SetVertices(const CInputVector & VerticesBuffer); + inline void GetVertices(std::vector & VerticesBuffer); + inline Lib3MF_uint64 GetVertexCount(); + inline Lib3MF_uint64 AddPolygon(const CInputVector & IndicesBuffer); + inline Lib3MF_uint64 GetPolygonCount(); + inline void SetPolygonIndices(const Lib3MF_uint64 nIndex, const CInputVector & IndicesBuffer); + inline void GetPolygonIndices(const Lib3MF_uint64 nIndex, std::vector & IndicesBuffer); + inline Lib3MF_uint64 GetPolygonIndexCount(const Lib3MF_uint64 nIndex); + inline Lib3MF_double GetZTop(); +}; + +/************************************************************************************************************************* + Class CSliceStack +**************************************************************************************************************************/ +class CSliceStack : public CResource { +public: + + /** + * CSliceStack::CSliceStack - Constructor for SliceStack class. + */ + CSliceStack(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CResource(pWrapper, pHandle) + { + } + + inline Lib3MF_double GetBottomZ(); + inline Lib3MF_uint64 GetSliceCount(); + inline PSlice GetSlice(const Lib3MF_uint64 nSliceIndex); + inline PSlice AddSlice(const Lib3MF_double dZTop); + inline Lib3MF_uint64 GetSliceRefCount(); + inline void AddSliceStackReference(classParam pTheSliceStack); + inline PSliceStack GetSliceStackReference(const Lib3MF_uint64 nSliceRefIndex); + inline void CollapseSliceReferences(); + inline void SetOwnPath(const std::string & sPath); + inline std::string GetOwnPath(); +}; + +/************************************************************************************************************************* + Class CConsumer +**************************************************************************************************************************/ +class CConsumer : public CBase { +public: + + /** + * CConsumer::CConsumer - Constructor for Consumer class. + */ + CConsumer(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline std::string GetConsumerID(); + inline std::string GetKeyID(); + inline std::string GetKeyValue(); +}; + +/************************************************************************************************************************* + Class CAccessRight +**************************************************************************************************************************/ +class CAccessRight : public CBase { +public: + + /** + * CAccessRight::CAccessRight - Constructor for AccessRight class. + */ + CAccessRight(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PConsumer GetConsumer(); + inline eWrappingAlgorithm GetWrappingAlgorithm(); + inline eMgfAlgorithm GetMgfAlgorithm(); + inline eDigestMethod GetDigestMethod(); +}; + +/************************************************************************************************************************* + Class CContentEncryptionParams +**************************************************************************************************************************/ +class CContentEncryptionParams : public CBase { +public: + + /** + * CContentEncryptionParams::CContentEncryptionParams - Constructor for ContentEncryptionParams class. + */ + CContentEncryptionParams(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline eEncryptionAlgorithm GetEncryptionAlgorithm(); + inline void GetKey(std::vector & ByteDataBuffer); + inline void GetInitializationVector(std::vector & ByteDataBuffer); + inline void GetAuthenticationTag(std::vector & ByteDataBuffer); + inline void SetAuthenticationTag(const CInputVector & ByteDataBuffer); + inline void GetAdditionalAuthenticationData(std::vector & ByteDataBuffer); + inline Lib3MF_uint64 GetDescriptor(); + inline std::string GetKeyUUID(); +}; + +/************************************************************************************************************************* + Class CResourceData +**************************************************************************************************************************/ +class CResourceData : public CBase { +public: + + /** + * CResourceData::CResourceData - Constructor for ResourceData class. + */ + CResourceData(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PPackagePart GetPath(); + inline eEncryptionAlgorithm GetEncryptionAlgorithm(); + inline eCompression GetCompression(); + inline void GetAdditionalAuthenticationData(std::vector & ByteDataBuffer); +}; + +/************************************************************************************************************************* + Class CResourceDataGroup +**************************************************************************************************************************/ +class CResourceDataGroup : public CBase { +public: + + /** + * CResourceDataGroup::CResourceDataGroup - Constructor for ResourceDataGroup class. + */ + CResourceDataGroup(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline std::string GetKeyUUID(); + inline PAccessRight AddAccessRight(classParam pConsumer, const eWrappingAlgorithm eWrappingAlgorithm, const eMgfAlgorithm eMgfAlgorithm, const eDigestMethod eDigestMethod); + inline PAccessRight FindAccessRightByConsumer(classParam pConsumer); + inline void RemoveAccessRight(classParam pConsumer); +}; + +/************************************************************************************************************************* + Class CKeyStore +**************************************************************************************************************************/ +class CKeyStore : public CBase { +public: + + /** + * CKeyStore::CKeyStore - Constructor for KeyStore class. + */ + CKeyStore(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PConsumer AddConsumer(const std::string & sConsumerID, const std::string & sKeyID, const std::string & sKeyValue); + inline Lib3MF_uint64 GetConsumerCount(); + inline PConsumer GetConsumer(const Lib3MF_uint64 nConsumerIndex); + inline void RemoveConsumer(classParam pConsumer); + inline PConsumer FindConsumer(const std::string & sConsumerID); + inline Lib3MF_uint64 GetResourceDataGroupCount(); + inline PResourceDataGroup AddResourceDataGroup(); + inline PResourceDataGroup GetResourceDataGroup(const Lib3MF_uint64 nResourceDataIndex); + inline void RemoveResourceDataGroup(classParam pResourceDataGroup); + inline PResourceDataGroup FindResourceDataGroup(classParam pPartPath); + inline PResourceData AddResourceData(classParam pResourceDataGroup, classParam pPartPath, const eEncryptionAlgorithm eAlgorithm, const eCompression eCompression, const CInputVector & AdditionalAuthenticationDataBuffer); + inline void RemoveResourceData(classParam pResourceData); + inline PResourceData FindResourceData(classParam pResourcePath); + inline Lib3MF_uint64 GetResourceDataCount(); + inline PResourceData GetResourceData(const Lib3MF_uint64 nResourceDataIndex); + inline std::string GetUUID(bool & bHasUUID); + inline void SetUUID(const std::string & sUUID); +}; + +/************************************************************************************************************************* + Class CModel +**************************************************************************************************************************/ +class CModel : public CBase { +public: + + /** + * CModel::CModel - Constructor for Model class. + */ + CModel(CWrapper* pWrapper, Lib3MFHandle pHandle) + : CBase(pWrapper, pHandle) + { + } + + inline PPackagePart RootModelPart(); + inline PPackagePart FindOrCreatePackagePart(const std::string & sAbsolutePath); + inline void SetUnit(const eModelUnit eUnit); + inline eModelUnit GetUnit(); + inline std::string GetLanguage(); + inline void SetLanguage(const std::string & sLanguage); + inline PWriter QueryWriter(const std::string & sWriterClass); + inline PReader QueryReader(const std::string & sReaderClass); + inline PResource GetResourceByID(const Lib3MF_uint32 nUniqueResourceID); + inline PTexture2D GetTexture2DByID(const Lib3MF_uint32 nUniqueResourceID); + inline ePropertyType GetPropertyTypeByID(const Lib3MF_uint32 nUniqueResourceID); + inline PBaseMaterialGroup GetBaseMaterialGroupByID(const Lib3MF_uint32 nUniqueResourceID); + inline PTexture2DGroup GetTexture2DGroupByID(const Lib3MF_uint32 nUniqueResourceID); + inline PCompositeMaterials GetCompositeMaterialsByID(const Lib3MF_uint32 nUniqueResourceID); + inline PMultiPropertyGroup GetMultiPropertyGroupByID(const Lib3MF_uint32 nUniqueResourceID); + inline PMeshObject GetMeshObjectByID(const Lib3MF_uint32 nUniqueResourceID); + inline PComponentsObject GetComponentsObjectByID(const Lib3MF_uint32 nUniqueResourceID); + inline PColorGroup GetColorGroupByID(const Lib3MF_uint32 nUniqueResourceID); + inline PSliceStack GetSliceStackByID(const Lib3MF_uint32 nUniqueResourceID); + inline PLevelSet GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID); + inline std::string GetBuildUUID(bool & bHasUUID); + inline void SetBuildUUID(const std::string & sUUID); + inline PBuildItemIterator GetBuildItems(); + inline sBox GetOutbox(); + inline PResourceIterator GetResources(); + inline PObjectIterator GetObjects(); + inline PMeshObjectIterator GetMeshObjects(); + inline PComponentsObjectIterator GetComponentsObjects(); + inline PTexture2DIterator GetTexture2Ds(); + inline PBaseMaterialGroupIterator GetBaseMaterialGroups(); + inline PColorGroupIterator GetColorGroups(); + inline PTexture2DGroupIterator GetTexture2DGroups(); + inline PCompositeMaterialsIterator GetCompositeMaterials(); + inline PMultiPropertyGroupIterator GetMultiPropertyGroups(); + inline PSliceStackIterator GetSliceStacks(); + inline PImage3DIterator GetImage3Ds(); + inline PModel MergeToModel(); + inline void MergeFromModel(classParam pModelInstance); + inline PMeshObject AddMeshObject(); + inline PComponentsObject AddComponentsObject(); + inline PSliceStack AddSliceStack(const Lib3MF_double dZBottom); + inline PTexture2D AddTexture2DFromAttachment(classParam pTextureAttachment); + inline PBaseMaterialGroup AddBaseMaterialGroup(); + inline PColorGroup AddColorGroup(); + inline PTexture2DGroup AddTexture2DGroup(classParam pTexture2DInstance); + inline PCompositeMaterials AddCompositeMaterials(classParam pBaseMaterialGroupInstance); + inline PMultiPropertyGroup AddMultiPropertyGroup(); + inline PImageStack AddImageStack(const Lib3MF_uint32 nColumnCount, const Lib3MF_uint32 nRowCount, const Lib3MF_uint32 nSheetCount); + inline PImageStack GetImageStackByID(const Lib3MF_uint32 nUniqueResourceID); + inline PBuildItem AddBuildItem(classParam pObject, const sTransform & Transform); + inline void RemoveBuildItem(classParam pBuildItemInstance); + inline PMetaDataGroup GetMetaDataGroup(); + inline PAttachment AddAttachment(const std::string & sURI, const std::string & sRelationShipType); + inline void RemoveAttachment(classParam pAttachmentInstance); + inline PAttachment GetAttachment(const Lib3MF_uint32 nIndex); + inline PAttachment FindAttachment(const std::string & sURI); + inline Lib3MF_uint32 GetAttachmentCount(); + inline bool HasPackageThumbnailAttachment(); + inline PAttachment CreatePackageThumbnailAttachment(); + inline PAttachment GetPackageThumbnailAttachment(); + inline void RemovePackageThumbnailAttachment(); + inline void AddCustomContentType(const std::string & sExtension, const std::string & sContentType); + inline void RemoveCustomContentType(const std::string & sExtension); + inline void SetRandomNumberCallback(const RandomNumberCallback pTheCallback, const Lib3MF_pvoid pUserData); + inline PKeyStore GetKeyStore(); + inline PFunctionIterator GetFunctions(); + inline PImplicitFunction AddImplicitFunction(); + inline PFunctionFromImage3D AddFunctionFromImage3D(classParam pImage3DInstance); + inline PVolumeData AddVolumeData(); + inline PLevelSet AddLevelSet(); + inline PLevelSetIterator GetLevelSets(); + inline void RemoveResource(classParam pResource); +}; + +/************************************************************************************************************************* + RTTI: Polymorphic Factory implementation +**************************************************************************************************************************/ + +/** +* IMPORTANT: PolymorphicFactory method should not be used by application directly. +* It's designed to be used on Lib3MFHandle object only once. +* If it's used on any existing object as a form of dynamic cast then +* CWrapper::AcquireInstance(CBase object) must be called after instantiating new object. +* This is important to keep reference count matching between application and library sides. +*/ +inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) +{ + Lib3MF_uint64 resultClassTypeId = 0; + CheckError(nullptr, m_WrapperTable.m_Base_ClassTypeId(pHandle, &resultClassTypeId)); + switch(resultClassTypeId) { + case 0x856632D0BAF1D8B7UL: return new CBase(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Base" + case 0xE76F642F363FD7E9UL: return new CWriter(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Writer" + case 0x2D86831DA59FBE72UL: return new CReader(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Reader" + case 0x0E55A826D377483EUL: return new CPackagePart(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::PackagePart" + case 0xDFE3889D1B269CBBUL: return new CResource(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Resource" + case 0x460F3515E2621DBEUL: return new CResourceIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIterator" + case 0x69684DB99FA813F6UL: return new CSliceStackIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStackIterator" + case 0xDE92510BD2112288UL: return new CObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ObjectIterator" + case 0xF4196034E2B9FDE6UL: return new CMeshObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObjectIterator" + case 0x564DE4217ED7614AUL: return new CComponentsObjectIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObjectIterator" + case 0x4BD32B4870FFC03BUL: return new CTexture2DIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DIterator" + case 0x65E6EDD9362C79CBUL: return new CBaseMaterialGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroupIterator" + case 0x10274A1757C729C0UL: return new CColorGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroupIterator" + case 0x30D55F4DB88FE0CAUL: return new CTexture2DGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroupIterator" + case 0xA99CC6C3F70FB6F9UL: return new CCompositeMaterialsIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterialsIterator" + case 0xC2BDF5D8CBBDB1F0UL: return new CMultiPropertyGroupIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" + case 0xC4B8EC00A82BF336UL: return new CImage3DIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" + case 0x40E9035363ACE65EUL: return new CFunctionIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" + case 0xA0C005C035D5371DUL: return new CLevelSetIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + case 0xD17716D063DE2C22UL: return new CMetaData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" + case 0x0C3B85369E9B25D3UL: return new CMetaDataGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" + case 0x2DA2136F577A779CUL: return new CObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Object" + case 0x3B3A6DC6EC610497UL: return new CMeshObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" + case 0xE8A7D9C192EFD0E2UL: return new CLevelSet(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + case 0x63B3B461B30B4BA5UL: return new CBeamLattice(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" + case 0x4DF17E76926221C2UL: return new CFunctionReference(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" + case 0xD85B5B6143E787E3UL: return new CVolumeDataColor(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" + case 0x241FE6B4817C3FE4UL: return new CMaterialMapping(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MaterialMapping" + case 0x46F1DAC40581B304UL: return new CVolumeDataComposite(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataComposite" + case 0xFC368AA44ACE42DAUL: return new CVolumeDataProperty(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataProperty" + case 0x9200586FB91587A7UL: return new CVolumeData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeData" + case 0x4ECDB6A6F69F2BEBUL: return new CComponent(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Component" + case 0x6522CF04EB283FEDUL: return new CComponentsObject(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" + case 0x30CCDBE90E00B55BUL: return new CBeamSet(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" + case 0xB27D4656E16609FAUL: return new CBaseMaterialGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroup" + case 0xD085FB2E49CDB5B1UL: return new CColorGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroup" + case 0xBC1208397E37055DUL: return new CTexture2DGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroup" + case 0xCE16224D688B86F2UL: return new CCompositeMaterials(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" + case 0xB989E02E43158FE6UL: return new CMultiPropertyGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" + case 0xBD938FF2D2663D61UL: return new CImage3D(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Image3D" + case 0x13A2561F0CFB712AUL: return new CImageStack(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImageStack" + case 0x8CE7A1191A63A35DUL: return new CAttachment(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Attachment" + case 0xE0441CF976B36319UL: return new CTexture2D(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" + case 0xD5C49B04AF1963CDUL: return new CImplicitPort(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPort" + case 0x52F06268CD098EFEUL: return new CIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Iterator" + case 0xC62268F2D7C7012CUL: return new CImplicitPortIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPortIterator" + case 0xE72592A7725AB29BUL: return new CImplicitNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitNode" + case 0xB19B9FDA94B0A5E7UL: return new COneInputNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::OneInputNode" + case 0xD5AEA50A56306722UL: return new CSinNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SinNode" + case 0x59BC328F6FB5C5FFUL: return new CCosNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CosNode" + case 0x2614CC572AF350B7UL: return new CTanNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::TanNode" + case 0xE554C8A7E72AAF4DUL: return new CArcSinNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcSinNode" + case 0x943AF6AE0EFD2B8AUL: return new CArcCosNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcCosNode" + case 0xE47D547615816BADUL: return new CArcTanNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTanNode" + case 0x3C7756A456F2D089UL: return new CSinhNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SinhNode" + case 0x4A993F91E1DE256DUL: return new CCoshNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CoshNode" + case 0xCF077B19B0B78E9DUL: return new CTanhNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::TanhNode" + case 0xD9F5A53C657765AEUL: return new CRoundNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::RoundNode" + case 0x627E211653E11D93UL: return new CCeilNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CeilNode" + case 0x392A0F4C041D249CUL: return new CFloorNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FloorNode" + case 0x8A45165E6C9646D7UL: return new CSignNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SignNode" + case 0x53E62FD67F4D9A65UL: return new CFractNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FractNode" + case 0x6B641C7060040BE3UL: return new CAbsNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::AbsNode" + case 0x3390243A8E2410F3UL: return new CExpNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ExpNode" + case 0x0070021D73AA89FDUL: return new CLogNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LogNode" + case 0xE8C0ABF7C5DC7068UL: return new CLog2Node(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Log2Node" + case 0x87740AD53454E0DFUL: return new CLog10Node(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Log10Node" + case 0xD85889E2739A74B1UL: return new CLengthNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::LengthNode" + case 0xA808B7599C158CE6UL: return new CTransposeNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::TransposeNode" + case 0xE8601F66A23A0540UL: return new CInverseNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::InverseNode" + case 0x9F831944A3DE31DAUL: return new CSqrtNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SqrtNode" + case 0xCA86A77C71CD3FAEUL: return new CResourceIdNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIdNode" + case 0x7DE3951BA4C1064CUL: return new CTwoInputNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::TwoInputNode" + case 0x57A2236998DF5248UL: return new CAdditionNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::AdditionNode" + case 0x6079B12FFF345D02UL: return new CSubtractionNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SubtractionNode" + case 0xA3C27CF54C2AA76CUL: return new CMultiplicationNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MultiplicationNode" + case 0xB896B6413C08CF39UL: return new CDivisionNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::DivisionNode" + case 0xFE60932A66375FADUL: return new CDotNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::DotNode" + case 0x106182D38CA5CFE3UL: return new CCrossNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::CrossNode" + case 0xB6153EF5DE7E5E11UL: return new CArcTan2Node(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTan2Node" + case 0x7570C43B9721D0C0UL: return new CMatVecMultiplicationNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatVecMultiplicationNode" + case 0x846AFDE9A091E997UL: return new CMinNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MinNode" + case 0x073F910381BF250DUL: return new CMaxNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MaxNode" + case 0x1EF703D298223F2AUL: return new CFmodNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FmodNode" + case 0xEA57335849379F22UL: return new CModNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ModNode" + case 0x7700AA17CA1AC0F8UL: return new CPowNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::PowNode" + case 0x1127ED71E05A9BD4UL: return new CSelectNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SelectNode" + case 0x77AF68C971B1485FUL: return new CClampNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ClampNode" + case 0x49C24B8840C01F7EUL: return new CComposeVectorNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeVectorNode" + case 0x2E417B93351375E2UL: return new CVectorFromScalarNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::VectorFromScalarNode" + case 0xCC4F8D561CCE35D4UL: return new CDecomposeVectorNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::DecomposeVectorNode" + case 0x9EF9EB54A53AA40DUL: return new CComposeMatrixNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeMatrixNode" + case 0xD6DFD0A7EB64AC33UL: return new CMatrixFromRowsNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromRowsNode" + case 0x0DCBEAFCF83F3AACUL: return new CMatrixFromColumnsNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromColumnsNode" + case 0x3F8E5D082F966B1BUL: return new CConstantNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstantNode" + case 0x9C9363B3F708D556UL: return new CConstVecNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstVecNode" + case 0xF85C90EDCE6F90A4UL: return new CConstMatNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" + case 0x53601FD432E3DEF4UL: return new CMeshNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" + case 0x29985A628251A9CDUL: return new CUnsignedMeshNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + case 0x0765C17C952F24E3UL: return new CFunctionCallNode(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" + case 0xFC006BC888CAB4D0UL: return new CNodeIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" + case 0x9EFB2757CA1A5231UL: return new CFunction(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Function" + case 0x6CE54469EEA83BC1UL: return new CImplicitFunction(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitFunction" + case 0x9BD7D3C2026B8CE8UL: return new CFunctionFromImage3D(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionFromImage3D" + case 0x68FB2D5FFC4BA12AUL: return new CBuildItem(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItem" + case 0xA7D21BD364910860UL: return new CBuildItemIterator(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItemIterator" + case 0x2198BCF4D8DF9C40UL: return new CSlice(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Slice" + case 0x6594B031B6096238UL: return new CSliceStack(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStack" + case 0xD9E46D5E6D8118EEUL: return new CConsumer(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Consumer" + case 0x385C42FC5609498AUL: return new CAccessRight(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::AccessRight" + case 0x7FB36B91D4CE4671UL: return new CContentEncryptionParams(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ContentEncryptionParams" + case 0x1A47A5E258E22EF9UL: return new CResourceData(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceData" + case 0xD59067227E428AA4UL: return new CResourceDataGroup(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceDataGroup" + case 0x1CC9E0CC082253C6UL: return new CKeyStore(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::KeyStore" + case 0x5A8164ECEDB03F09UL: return new CModel(this, pHandle); break; // First 64 bits of SHA1 of a string: "Lib3MF::Model" + } + return new CBase(this, pHandle); +} + + /** + * CWrapper::GetLibraryVersion - retrieves the binary version of this library. + * @param[out] nMajor - returns the major version of this library + * @param[out] nMinor - returns the minor version of this library + * @param[out] nMicro - returns the micro version of this library + */ + inline void CWrapper::GetLibraryVersion(Lib3MF_uint32 & nMajor, Lib3MF_uint32 & nMinor, Lib3MF_uint32 & nMicro) + { + CheckError(nullptr,m_WrapperTable.m_GetLibraryVersion(&nMajor, &nMinor, &nMicro)); + } + + /** + * CWrapper::GetPrereleaseInformation - retrieves prerelease information of this library. + * @return Does the library provide prerelease version? + * @param[out] sPrereleaseInfo - retrieves prerelease information of this library. + */ + inline bool CWrapper::GetPrereleaseInformation(std::string & sPrereleaseInfo) + { + bool resultHasPrereleaseInfo = 0; + Lib3MF_uint32 bytesNeededPrereleaseInfo = 0; + Lib3MF_uint32 bytesWrittenPrereleaseInfo = 0; + CheckError(nullptr,m_WrapperTable.m_GetPrereleaseInformation(&resultHasPrereleaseInfo, 0, &bytesNeededPrereleaseInfo, nullptr)); + std::vector bufferPrereleaseInfo(bytesNeededPrereleaseInfo); + CheckError(nullptr,m_WrapperTable.m_GetPrereleaseInformation(&resultHasPrereleaseInfo, bytesNeededPrereleaseInfo, &bytesWrittenPrereleaseInfo, &bufferPrereleaseInfo[0])); + sPrereleaseInfo = std::string(&bufferPrereleaseInfo[0]); + + return resultHasPrereleaseInfo; + } + + /** + * CWrapper::GetBuildInformation - retrieves build information of this library. + * @return Does the library provide build version? + * @param[out] sBuildInformation - retrieves build information of this library. + */ + inline bool CWrapper::GetBuildInformation(std::string & sBuildInformation) + { + bool resultHasBuildInfo = 0; + Lib3MF_uint32 bytesNeededBuildInformation = 0; + Lib3MF_uint32 bytesWrittenBuildInformation = 0; + CheckError(nullptr,m_WrapperTable.m_GetBuildInformation(&resultHasBuildInfo, 0, &bytesNeededBuildInformation, nullptr)); + std::vector bufferBuildInformation(bytesNeededBuildInformation); + CheckError(nullptr,m_WrapperTable.m_GetBuildInformation(&resultHasBuildInfo, bytesNeededBuildInformation, &bytesWrittenBuildInformation, &bufferBuildInformation[0])); + sBuildInformation = std::string(&bufferBuildInformation[0]); + + return resultHasBuildInfo; + } + + /** + * CWrapper::GetSpecificationVersion - retrieves whether a specification is supported, and if so, which version. + * @param[in] sSpecificationURL - URL of extension to check + * @param[out] bIsSupported - returns whether this specification is supported + * @param[out] nMajor - returns the major version of the extension (if IsSupported) + * @param[out] nMinor - returns the minor version of the extension (if IsSupported) + * @param[out] nMicro - returns the micro version of the extension (if IsSupported) + */ + inline void CWrapper::GetSpecificationVersion(const std::string & sSpecificationURL, bool & bIsSupported, Lib3MF_uint32 & nMajor, Lib3MF_uint32 & nMinor, Lib3MF_uint32 & nMicro) + { + CheckError(nullptr,m_WrapperTable.m_GetSpecificationVersion(sSpecificationURL.c_str(), &bIsSupported, &nMajor, &nMinor, &nMicro)); + } + + /** + * CWrapper::CreateModel - creates an empty model instance. + * @return returns an empty model instance + */ + inline PModel CWrapper::CreateModel() + { + Lib3MFHandle hModel = nullptr; + CheckError(nullptr,m_WrapperTable.m_CreateModel(&hModel)); + + if (!hModel) { + CheckError(nullptr,LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(this->polymorphicFactory(hModel))); + } + + /** + * CWrapper::Release - releases shared ownership of an object instance + * @param[in] pInstance - the object instance to release + */ + inline void CWrapper::Release(classParam pInstance) + { + Lib3MFHandle hInstance = pInstance.GetHandle(); + CheckError(nullptr,m_WrapperTable.m_Release(hInstance)); + } + + /** + * CWrapper::Acquire - acquires shared ownership of an object instance + * @param[in] pInstance - the object instance to acquire + */ + inline void CWrapper::Acquire(classParam pInstance) + { + Lib3MFHandle hInstance = pInstance.GetHandle(); + CheckError(nullptr,m_WrapperTable.m_Acquire(hInstance)); + } + + /** + * CWrapper::SetJournal - Sets the journal file path + * @param[in] sJournalPath - File name of the journal file + */ + inline void CWrapper::SetJournal(const std::string & sJournalPath) + { + CheckError(nullptr,m_WrapperTable.m_SetJournal(sJournalPath.c_str())); + } + + /** + * CWrapper::GetLastError - Retrieves the last error string of an instance + * @param[in] pInstance - Object where the error occured. + * @param[out] sLastErrorString - Last Error String + * @return Returns if the instance has a last error. + */ + inline bool CWrapper::GetLastError(classParam pInstance, std::string & sLastErrorString) + { + Lib3MFHandle hInstance = pInstance.GetHandle(); + Lib3MF_uint32 bytesNeededLastErrorString = 0; + Lib3MF_uint32 bytesWrittenLastErrorString = 0; + bool resultHasLastError = 0; + CheckError(nullptr,m_WrapperTable.m_GetLastError(hInstance, 0, &bytesNeededLastErrorString, nullptr, &resultHasLastError)); + std::vector bufferLastErrorString(bytesNeededLastErrorString); + CheckError(nullptr,m_WrapperTable.m_GetLastError(hInstance, bytesNeededLastErrorString, &bytesWrittenLastErrorString, &bufferLastErrorString[0], &resultHasLastError)); + sLastErrorString = std::string(&bufferLastErrorString[0]); + + return resultHasLastError; + } + + /** + * CWrapper::GetSymbolLookupMethod - Returns the address of the SymbolLookupMethod + * @return Address of the SymbolAddressMethod + */ + inline Lib3MF_pvoid CWrapper::GetSymbolLookupMethod() + { + Lib3MF_pvoid resultSymbolLookupMethod = 0; + CheckError(nullptr,m_WrapperTable.m_GetSymbolLookupMethod(&resultSymbolLookupMethod)); + + return resultSymbolLookupMethod; + } + + /** + * CWrapper::RetrieveProgressMessage - Return an English text for a progress identifier.|Note: this is the only function you can call from your callback function. + * @param[in] eTheProgressIdentifier - the progress identifier that is passed to the callback function + * @param[out] sProgressMessage - English text for the progress identifier + */ + inline void CWrapper::RetrieveProgressMessage(const eProgressIdentifier eTheProgressIdentifier, std::string & sProgressMessage) + { + Lib3MF_uint32 bytesNeededProgressMessage = 0; + Lib3MF_uint32 bytesWrittenProgressMessage = 0; + CheckError(nullptr,m_WrapperTable.m_RetrieveProgressMessage(eTheProgressIdentifier, 0, &bytesNeededProgressMessage, nullptr)); + std::vector bufferProgressMessage(bytesNeededProgressMessage); + CheckError(nullptr,m_WrapperTable.m_RetrieveProgressMessage(eTheProgressIdentifier, bytesNeededProgressMessage, &bytesWrittenProgressMessage, &bufferProgressMessage[0])); + sProgressMessage = std::string(&bufferProgressMessage[0]); + } + + /** + * CWrapper::RGBAToColor - Creates a Color from uint8 RGBA values + * @param[in] nRed - Red value of color (0-255) + * @param[in] nGreen - Green value of color (0-255) + * @param[in] nBlue - Blue value of color (0-255) + * @param[in] nAlpha - Alpha value of color (0-255) + * @return Assembled color + */ + inline sColor CWrapper::RGBAToColor(const Lib3MF_uint8 nRed, const Lib3MF_uint8 nGreen, const Lib3MF_uint8 nBlue, const Lib3MF_uint8 nAlpha) + { + sColor resultTheColor; + CheckError(nullptr,m_WrapperTable.m_RGBAToColor(nRed, nGreen, nBlue, nAlpha, &resultTheColor)); + + return resultTheColor; + } + + /** + * CWrapper::FloatRGBAToColor - Creates a Color from uint8 RGBA values + * @param[in] fRed - Red value of color (0-1) + * @param[in] fGreen - Green value of color (0-1) + * @param[in] fBlue - Blue value of color (0-1) + * @param[in] fAlpha - Alpha value of color (0-1) + * @return Assembled color + */ + inline sColor CWrapper::FloatRGBAToColor(const Lib3MF_single fRed, const Lib3MF_single fGreen, const Lib3MF_single fBlue, const Lib3MF_single fAlpha) + { + sColor resultTheColor; + CheckError(nullptr,m_WrapperTable.m_FloatRGBAToColor(fRed, fGreen, fBlue, fAlpha, &resultTheColor)); + + return resultTheColor; + } + + /** + * CWrapper::ColorToRGBA - Calculates uint8-RGBA-values from a Color + * @param[in] TheColor - Color to handle + * @param[out] nRed - Red value of color (0-255) + * @param[out] nGreen - Green value of color (0-255) + * @param[out] nBlue - Blue value of color (0-255) + * @param[out] nAlpha - Alpha value of color (0-255) + */ + inline void CWrapper::ColorToRGBA(const sColor & TheColor, Lib3MF_uint8 & nRed, Lib3MF_uint8 & nGreen, Lib3MF_uint8 & nBlue, Lib3MF_uint8 & nAlpha) + { + CheckError(nullptr,m_WrapperTable.m_ColorToRGBA(&TheColor, &nRed, &nGreen, &nBlue, &nAlpha)); + } + + /** + * CWrapper::ColorToFloatRGBA - Calculates float-RGBA-values from a Color + * @param[in] TheColor - Color to handle + * @param[out] fRed - Red value of color (0-1) + * @param[out] fGreen - Green value of color (0-1) + * @param[out] fBlue - Blue value of color (0-1) + * @param[out] fAlpha - Alpha value of color (0-1) + */ + inline void CWrapper::ColorToFloatRGBA(const sColor & TheColor, Lib3MF_single & fRed, Lib3MF_single & fGreen, Lib3MF_single & fBlue, Lib3MF_single & fAlpha) + { + CheckError(nullptr,m_WrapperTable.m_ColorToFloatRGBA(&TheColor, &fRed, &fGreen, &fBlue, &fAlpha)); + } + + /** + * CWrapper::GetIdentityTransform - Creates an identity transform + * @return Transformation matrix. + */ + inline sTransform CWrapper::GetIdentityTransform() + { + sTransform resultTransform; + CheckError(nullptr,m_WrapperTable.m_GetIdentityTransform(&resultTransform)); + + return resultTransform; + } + + /** + * CWrapper::GetUniformScaleTransform - Creates a uniform scale transform + * @param[in] fFactor - Factor in X, Y and Z + * @return Transformation matrix. + */ + inline sTransform CWrapper::GetUniformScaleTransform(const Lib3MF_single fFactor) + { + sTransform resultTransform; + CheckError(nullptr,m_WrapperTable.m_GetUniformScaleTransform(fFactor, &resultTransform)); + + return resultTransform; + } + + /** + * CWrapper::GetScaleTransform - Creates a scale transform + * @param[in] fFactorX - Factor in X + * @param[in] fFactorY - Factor in Y + * @param[in] fFactorZ - Factor in Z + * @return Transformation matrix. + */ + inline sTransform CWrapper::GetScaleTransform(const Lib3MF_single fFactorX, const Lib3MF_single fFactorY, const Lib3MF_single fFactorZ) + { + sTransform resultTransform; + CheckError(nullptr,m_WrapperTable.m_GetScaleTransform(fFactorX, fFactorY, fFactorZ, &resultTransform)); + + return resultTransform; + } + + /** + * CWrapper::GetTranslationTransform - Creates an translation transform + * @param[in] fVectorX - Translation in X + * @param[in] fVectorY - Translation in Y + * @param[in] fVectorZ - Translation in Z + * @return Transformation matrix. + */ + inline sTransform CWrapper::GetTranslationTransform(const Lib3MF_single fVectorX, const Lib3MF_single fVectorY, const Lib3MF_single fVectorZ) + { + sTransform resultTransform; + CheckError(nullptr,m_WrapperTable.m_GetTranslationTransform(fVectorX, fVectorY, fVectorZ, &resultTransform)); + + return resultTransform; + } + + inline void CWrapper::CheckError(CBase * pBaseClass, Lib3MFResult nResult) + { + if (nResult != 0) { + std::string sErrorMessage; + if (pBaseClass != nullptr) { + GetLastError(pBaseClass, sErrorMessage); + } + throw ELib3MFException(nResult, sErrorMessage); + } + } + + + inline Lib3MFResult CWrapper::initWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) + { + if (pWrapperTable == nullptr) + return LIB3MF_ERROR_INVALIDPARAM; + + pWrapperTable->m_LibraryHandle = nullptr; + pWrapperTable->m_Base_ClassTypeId = nullptr; + pWrapperTable->m_Writer_WriteToFile = nullptr; + pWrapperTable->m_Writer_GetStreamSize = nullptr; + pWrapperTable->m_Writer_WriteToBuffer = nullptr; + pWrapperTable->m_Writer_WriteToCallback = nullptr; + pWrapperTable->m_Writer_SetProgressCallback = nullptr; + pWrapperTable->m_Writer_GetDecimalPrecision = nullptr; + pWrapperTable->m_Writer_SetDecimalPrecision = nullptr; + pWrapperTable->m_Writer_SetStrictModeActive = nullptr; + pWrapperTable->m_Writer_GetStrictModeActive = nullptr; + pWrapperTable->m_Writer_GetWarning = nullptr; + pWrapperTable->m_Writer_GetWarningCount = nullptr; + pWrapperTable->m_Writer_AddKeyWrappingCallback = nullptr; + pWrapperTable->m_Writer_SetContentEncryptionCallback = nullptr; + pWrapperTable->m_Reader_ReadFromFile = nullptr; + pWrapperTable->m_Reader_ReadFromBuffer = nullptr; + pWrapperTable->m_Reader_ReadFromCallback = nullptr; + pWrapperTable->m_Reader_SetProgressCallback = nullptr; + pWrapperTable->m_Reader_AddRelationToRead = nullptr; + pWrapperTable->m_Reader_RemoveRelationToRead = nullptr; + pWrapperTable->m_Reader_SetStrictModeActive = nullptr; + pWrapperTable->m_Reader_GetStrictModeActive = nullptr; + pWrapperTable->m_Reader_GetWarning = nullptr; + pWrapperTable->m_Reader_GetWarningCount = nullptr; + pWrapperTable->m_Reader_AddKeyWrappingCallback = nullptr; + pWrapperTable->m_Reader_SetContentEncryptionCallback = nullptr; + pWrapperTable->m_PackagePart_GetPath = nullptr; + pWrapperTable->m_PackagePart_SetPath = nullptr; + pWrapperTable->m_Resource_GetResourceID = nullptr; + pWrapperTable->m_Resource_GetUniqueResourceID = nullptr; + pWrapperTable->m_Resource_PackagePart = nullptr; + pWrapperTable->m_Resource_SetPackagePart = nullptr; + pWrapperTable->m_Resource_GetModelResourceID = nullptr; + pWrapperTable->m_ResourceIterator_MoveNext = nullptr; + pWrapperTable->m_ResourceIterator_MovePrevious = nullptr; + pWrapperTable->m_ResourceIterator_GetCurrent = nullptr; + pWrapperTable->m_ResourceIterator_Clone = nullptr; + pWrapperTable->m_ResourceIterator_Count = nullptr; + pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack = nullptr; + pWrapperTable->m_ObjectIterator_GetCurrentObject = nullptr; + pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject = nullptr; + pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject = nullptr; + pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D = nullptr; + pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup = nullptr; + pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup = nullptr; + pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup = nullptr; + pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials = nullptr; + pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup = nullptr; + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = nullptr; + pWrapperTable->m_FunctionIterator_GetCurrentFunction = nullptr; + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = nullptr; + pWrapperTable->m_MetaData_GetNameSpace = nullptr; + pWrapperTable->m_MetaData_SetNameSpace = nullptr; + pWrapperTable->m_MetaData_GetName = nullptr; + pWrapperTable->m_MetaData_SetName = nullptr; + pWrapperTable->m_MetaData_GetKey = nullptr; + pWrapperTable->m_MetaData_GetMustPreserve = nullptr; + pWrapperTable->m_MetaData_SetMustPreserve = nullptr; + pWrapperTable->m_MetaData_GetType = nullptr; + pWrapperTable->m_MetaData_SetType = nullptr; + pWrapperTable->m_MetaData_GetValue = nullptr; + pWrapperTable->m_MetaData_SetValue = nullptr; + pWrapperTable->m_MetaDataGroup_GetMetaDataCount = nullptr; + pWrapperTable->m_MetaDataGroup_GetMetaData = nullptr; pWrapperTable->m_MetaDataGroup_GetMetaDataByKey = nullptr; pWrapperTable->m_MetaDataGroup_RemoveMetaDataByIndex = nullptr; pWrapperTable->m_MetaDataGroup_RemoveMetaData = nullptr; @@ -2060,6 +3922,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_Object_SetPartNumber = nullptr; pWrapperTable->m_Object_IsMeshObject = nullptr; pWrapperTable->m_Object_IsComponentsObject = nullptr; + pWrapperTable->m_Object_IsLevelSetObject = nullptr; pWrapperTable->m_Object_IsValid = nullptr; pWrapperTable->m_Object_SetAttachmentAsThumbnail = nullptr; pWrapperTable->m_Object_GetThumbnailAttachment = nullptr; @@ -2094,6 +3957,24 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_MeshObject_SetGeometry = nullptr; pWrapperTable->m_MeshObject_IsManifoldAndOriented = nullptr; pWrapperTable->m_MeshObject_BeamLattice = nullptr; + pWrapperTable->m_MeshObject_GetVolumeData = nullptr; + pWrapperTable->m_MeshObject_SetVolumeData = nullptr; + pWrapperTable->m_LevelSet_GetFunction = nullptr; + pWrapperTable->m_LevelSet_SetFunction = nullptr; + pWrapperTable->m_LevelSet_GetTransform = nullptr; + pWrapperTable->m_LevelSet_SetTransform = nullptr; + pWrapperTable->m_LevelSet_GetChannelName = nullptr; + pWrapperTable->m_LevelSet_SetChannelName = nullptr; + pWrapperTable->m_LevelSet_SetMinFeatureSize = nullptr; + pWrapperTable->m_LevelSet_GetMinFeatureSize = nullptr; + pWrapperTable->m_LevelSet_SetFallBackValue = nullptr; + pWrapperTable->m_LevelSet_GetFallBackValue = nullptr; + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = nullptr; + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = nullptr; + pWrapperTable->m_LevelSet_SetMesh = nullptr; + pWrapperTable->m_LevelSet_GetMesh = nullptr; + pWrapperTable->m_LevelSet_GetVolumeData = nullptr; + pWrapperTable->m_LevelSet_SetVolumeData = nullptr; pWrapperTable->m_BeamLattice_GetMinLength = nullptr; pWrapperTable->m_BeamLattice_SetMinLength = nullptr; pWrapperTable->m_BeamLattice_GetClipping = nullptr; @@ -2117,6 +3998,35 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_BeamLattice_GetBeamSetCount = nullptr; pWrapperTable->m_BeamLattice_AddBeamSet = nullptr; pWrapperTable->m_BeamLattice_GetBeamSet = nullptr; + pWrapperTable->m_FunctionReference_GetFunctionResourceID = nullptr; + pWrapperTable->m_FunctionReference_SetFunctionResourceID = nullptr; + pWrapperTable->m_FunctionReference_GetTransform = nullptr; + pWrapperTable->m_FunctionReference_SetTransform = nullptr; + pWrapperTable->m_FunctionReference_GetChannelName = nullptr; + pWrapperTable->m_FunctionReference_SetChannelName = nullptr; + pWrapperTable->m_FunctionReference_SetMinFeatureSize = nullptr; + pWrapperTable->m_FunctionReference_GetMinFeatureSize = nullptr; + pWrapperTable->m_FunctionReference_SetFallBackValue = nullptr; + pWrapperTable->m_FunctionReference_GetFallBackValue = nullptr; + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = nullptr; + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = nullptr; + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = nullptr; + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = nullptr; + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = nullptr; + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = nullptr; + pWrapperTable->m_VolumeDataProperty_GetName = nullptr; + pWrapperTable->m_VolumeDataProperty_SetIsRequired = nullptr; + pWrapperTable->m_VolumeDataProperty_IsRequired = nullptr; + pWrapperTable->m_VolumeData_GetComposite = nullptr; + pWrapperTable->m_VolumeData_CreateNewComposite = nullptr; + pWrapperTable->m_VolumeData_RemoveComposite = nullptr; + pWrapperTable->m_VolumeData_GetColor = nullptr; + pWrapperTable->m_VolumeData_CreateNewColor = nullptr; + pWrapperTable->m_VolumeData_RemoveColor = nullptr; + pWrapperTable->m_VolumeData_GetPropertyCount = nullptr; + pWrapperTable->m_VolumeData_GetProperty = nullptr; + pWrapperTable->m_VolumeData_AddPropertyFromFunction = nullptr; + pWrapperTable->m_VolumeData_RemoveProperty = nullptr; pWrapperTable->m_Component_GetObjectResource = nullptr; pWrapperTable->m_Component_GetObjectResourceID = nullptr; pWrapperTable->m_Component_GetUUID = nullptr; @@ -2173,6 +4083,19 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_MultiPropertyGroup_AddLayer = nullptr; pWrapperTable->m_MultiPropertyGroup_GetLayer = nullptr; pWrapperTable->m_MultiPropertyGroup_RemoveLayer = nullptr; + pWrapperTable->m_Image3D_GetName = nullptr; + pWrapperTable->m_Image3D_SetName = nullptr; + pWrapperTable->m_Image3D_IsImageStack = nullptr; + pWrapperTable->m_ImageStack_GetRowCount = nullptr; + pWrapperTable->m_ImageStack_SetRowCount = nullptr; + pWrapperTable->m_ImageStack_GetColumnCount = nullptr; + pWrapperTable->m_ImageStack_SetColumnCount = nullptr; + pWrapperTable->m_ImageStack_GetSheetCount = nullptr; + pWrapperTable->m_ImageStack_GetSheet = nullptr; + pWrapperTable->m_ImageStack_SetSheet = nullptr; + pWrapperTable->m_ImageStack_CreateEmptySheet = nullptr; + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = nullptr; + pWrapperTable->m_ImageStack_CreateSheetFromFile = nullptr; pWrapperTable->m_Attachment_GetPath = nullptr; pWrapperTable->m_Attachment_SetPath = nullptr; pWrapperTable->m_Attachment_PackagePart = nullptr; @@ -2192,6 +4115,173 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_Texture2D_SetTileStyleUV = nullptr; pWrapperTable->m_Texture2D_GetFilter = nullptr; pWrapperTable->m_Texture2D_SetFilter = nullptr; + pWrapperTable->m_ImplicitPort_GetIdentifier = nullptr; + pWrapperTable->m_ImplicitPort_SetIdentifier = nullptr; + pWrapperTable->m_ImplicitPort_GetDisplayName = nullptr; + pWrapperTable->m_ImplicitPort_SetDisplayName = nullptr; + pWrapperTable->m_ImplicitPort_SetType = nullptr; + pWrapperTable->m_ImplicitPort_GetType = nullptr; + pWrapperTable->m_ImplicitPort_GetReference = nullptr; + pWrapperTable->m_ImplicitPort_SetReference = nullptr; + pWrapperTable->m_Iterator_MoveNext = nullptr; + pWrapperTable->m_Iterator_MovePrevious = nullptr; + pWrapperTable->m_Iterator_Count = nullptr; + pWrapperTable->m_ImplicitPortIterator_GetCurrent = nullptr; + pWrapperTable->m_ImplicitNode_GetIdentifier = nullptr; + pWrapperTable->m_ImplicitNode_SetIdentifier = nullptr; + pWrapperTable->m_ImplicitNode_GetDisplayName = nullptr; + pWrapperTable->m_ImplicitNode_SetDisplayName = nullptr; + pWrapperTable->m_ImplicitNode_GetTag = nullptr; + pWrapperTable->m_ImplicitNode_SetTag = nullptr; + pWrapperTable->m_ImplicitNode_GetNodeType = nullptr; + pWrapperTable->m_ImplicitNode_AddInput = nullptr; + pWrapperTable->m_ImplicitNode_GetInputs = nullptr; + pWrapperTable->m_ImplicitNode_AddOutput = nullptr; + pWrapperTable->m_ImplicitNode_GetOutputs = nullptr; + pWrapperTable->m_ImplicitNode_FindInput = nullptr; + pWrapperTable->m_ImplicitNode_FindOutput = nullptr; + pWrapperTable->m_ImplicitNode_AreTypesValid = nullptr; + pWrapperTable->m_OneInputNode_GetInputA = nullptr; + pWrapperTable->m_OneInputNode_GetOutputResult = nullptr; + pWrapperTable->m_ResourceIdNode_SetResource = nullptr; + pWrapperTable->m_ResourceIdNode_GetResource = nullptr; + pWrapperTable->m_ResourceIdNode_GetOutputValue = nullptr; + pWrapperTable->m_TwoInputNode_GetInputB = nullptr; + pWrapperTable->m_SelectNode_GetInputB = nullptr; + pWrapperTable->m_SelectNode_GetInputC = nullptr; + pWrapperTable->m_SelectNode_GetInputD = nullptr; + pWrapperTable->m_ClampNode_GetInputMin = nullptr; + pWrapperTable->m_ClampNode_GetInputMax = nullptr; + pWrapperTable->m_ComposeVectorNode_GetInputX = nullptr; + pWrapperTable->m_ComposeVectorNode_GetInputY = nullptr; + pWrapperTable->m_ComposeVectorNode_GetInputZ = nullptr; + pWrapperTable->m_ComposeVectorNode_GetOutputResult = nullptr; + pWrapperTable->m_DecomposeVectorNode_GetInputA = nullptr; + pWrapperTable->m_DecomposeVectorNode_GetOutputX = nullptr; + pWrapperTable->m_DecomposeVectorNode_GetOutputY = nullptr; + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = nullptr; + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = nullptr; + pWrapperTable->m_MatrixFromRowsNode_GetInputA = nullptr; + pWrapperTable->m_MatrixFromRowsNode_GetInputB = nullptr; + pWrapperTable->m_MatrixFromRowsNode_GetInputC = nullptr; + pWrapperTable->m_MatrixFromRowsNode_GetInputD = nullptr; + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = nullptr; + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = nullptr; + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = nullptr; + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = nullptr; + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = nullptr; + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = nullptr; + pWrapperTable->m_ConstantNode_SetConstant = nullptr; + pWrapperTable->m_ConstantNode_GetConstant = nullptr; + pWrapperTable->m_ConstantNode_GetOutputValue = nullptr; + pWrapperTable->m_ConstVecNode_SetVector = nullptr; + pWrapperTable->m_ConstVecNode_GetVector = nullptr; + pWrapperTable->m_ConstVecNode_GetOutputVector = nullptr; + pWrapperTable->m_ConstMatNode_SetMatrix = nullptr; + pWrapperTable->m_ConstMatNode_GetMatrix = nullptr; + pWrapperTable->m_ConstMatNode_GetOutputMatrix = nullptr; + pWrapperTable->m_MeshNode_GetInputMesh = nullptr; + pWrapperTable->m_MeshNode_GetInputPos = nullptr; + pWrapperTable->m_MeshNode_GetOutputDistance = nullptr; + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = nullptr; + pWrapperTable->m_UnsignedMeshNode_GetInputPos = nullptr; + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = nullptr; + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = nullptr; + pWrapperTable->m_NodeIterator_GetCurrent = nullptr; + pWrapperTable->m_Function_GetDisplayName = nullptr; + pWrapperTable->m_Function_SetDisplayName = nullptr; + pWrapperTable->m_Function_AddInput = nullptr; + pWrapperTable->m_Function_GetInputs = nullptr; + pWrapperTable->m_Function_RemoveInput = nullptr; + pWrapperTable->m_Function_AddOutput = nullptr; + pWrapperTable->m_Function_GetOutputs = nullptr; + pWrapperTable->m_Function_RemoveOutput = nullptr; + pWrapperTable->m_Function_FindInput = nullptr; + pWrapperTable->m_Function_FindOutput = nullptr; + pWrapperTable->m_ImplicitFunction_GetIdentifier = nullptr; + pWrapperTable->m_ImplicitFunction_SetIdentifier = nullptr; + pWrapperTable->m_ImplicitFunction_AddNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddSinNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddCosNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddTanNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddArcSinNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddArcCosNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = nullptr; + pWrapperTable->m_ImplicitFunction_AddSinhNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddCoshNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddTanhNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddRoundNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddCeilNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddFloorNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddSignNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddFractNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddAbsNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddExpNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddLogNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddLog2Node = nullptr; + pWrapperTable->m_ImplicitFunction_AddLog10Node = nullptr; + pWrapperTable->m_ImplicitFunction_AddLengthNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddTransposeNode = nullptr; + pWrapperTable->m_ImplicitFunction_InverseNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddSqrtNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddAdditionNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddDivisionNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddDotNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddCrossNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddMinNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddMaxNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddFmodNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddPowNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddSelectNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddClampNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddConstantNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddConstVecNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddConstMatNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddMeshNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = nullptr; + pWrapperTable->m_ImplicitFunction_GetNodes = nullptr; + pWrapperTable->m_ImplicitFunction_RemoveNode = nullptr; + pWrapperTable->m_ImplicitFunction_AddLink = nullptr; + pWrapperTable->m_ImplicitFunction_AddLinkByNames = nullptr; + pWrapperTable->m_ImplicitFunction_Clear = nullptr; + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = nullptr; + pWrapperTable->m_FunctionFromImage3D_GetImage3D = nullptr; + pWrapperTable->m_FunctionFromImage3D_SetImage3D = nullptr; + pWrapperTable->m_FunctionFromImage3D_SetFilter = nullptr; + pWrapperTable->m_FunctionFromImage3D_GetFilter = nullptr; + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = nullptr; + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = nullptr; + pWrapperTable->m_FunctionFromImage3D_GetOffset = nullptr; + pWrapperTable->m_FunctionFromImage3D_SetOffset = nullptr; + pWrapperTable->m_FunctionFromImage3D_GetScale = nullptr; + pWrapperTable->m_FunctionFromImage3D_SetScale = nullptr; pWrapperTable->m_BuildItem_GetObjectResource = nullptr; pWrapperTable->m_BuildItem_GetUUID = nullptr; pWrapperTable->m_BuildItem_SetUUID = nullptr; @@ -2286,6 +4376,7 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_Model_GetComponentsObjectByID = nullptr; pWrapperTable->m_Model_GetColorGroupByID = nullptr; pWrapperTable->m_Model_GetSliceStackByID = nullptr; + pWrapperTable->m_Model_GetLevelSetByID = nullptr; pWrapperTable->m_Model_GetBuildUUID = nullptr; pWrapperTable->m_Model_SetBuildUUID = nullptr; pWrapperTable->m_Model_GetBuildItems = nullptr; @@ -2301,7 +4392,9 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_Model_GetCompositeMaterials = nullptr; pWrapperTable->m_Model_GetMultiPropertyGroups = nullptr; pWrapperTable->m_Model_GetSliceStacks = nullptr; + pWrapperTable->m_Model_GetImage3Ds = nullptr; pWrapperTable->m_Model_MergeToModel = nullptr; + pWrapperTable->m_Model_MergeFromModel = nullptr; pWrapperTable->m_Model_AddMeshObject = nullptr; pWrapperTable->m_Model_AddComponentsObject = nullptr; pWrapperTable->m_Model_AddSliceStack = nullptr; @@ -2311,6 +4404,8 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_Model_AddTexture2DGroup = nullptr; pWrapperTable->m_Model_AddCompositeMaterials = nullptr; pWrapperTable->m_Model_AddMultiPropertyGroup = nullptr; + pWrapperTable->m_Model_AddImageStack = nullptr; + pWrapperTable->m_Model_GetImageStackByID = nullptr; pWrapperTable->m_Model_AddBuildItem = nullptr; pWrapperTable->m_Model_RemoveBuildItem = nullptr; pWrapperTable->m_Model_GetMetaDataGroup = nullptr; @@ -2327,6 +4422,13 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_Model_RemoveCustomContentType = nullptr; pWrapperTable->m_Model_SetRandomNumberCallback = nullptr; pWrapperTable->m_Model_GetKeyStore = nullptr; + pWrapperTable->m_Model_GetFunctions = nullptr; + pWrapperTable->m_Model_AddImplicitFunction = nullptr; + pWrapperTable->m_Model_AddFunctionFromImage3D = nullptr; + pWrapperTable->m_Model_AddVolumeData = nullptr; + pWrapperTable->m_Model_AddLevelSet = nullptr; + pWrapperTable->m_Model_GetLevelSets = nullptr; + pWrapperTable->m_Model_RemoveResource = nullptr; pWrapperTable->m_GetLibraryVersion = nullptr; pWrapperTable->m_GetPrereleaseInformation = nullptr; pWrapperTable->m_GetBuildInformation = nullptr; @@ -2347,5107 +4449,11143 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) pWrapperTable->m_GetScaleTransform = nullptr; pWrapperTable->m_GetTranslationTransform = nullptr; - return LIB3MF_SUCCESS; - } - - inline Lib3MFResult CWrapper::releaseWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) - { - if (pWrapperTable == nullptr) - return LIB3MF_ERROR_INVALIDPARAM; + return LIB3MF_SUCCESS; + } + + inline Lib3MFResult CWrapper::releaseWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) + { + if (pWrapperTable == nullptr) + return LIB3MF_ERROR_INVALIDPARAM; + + if (pWrapperTable->m_LibraryHandle != nullptr) { + #ifdef _WIN32 + HMODULE hModule = (HMODULE) pWrapperTable->m_LibraryHandle; + FreeLibrary(hModule); + #else // _WIN32 + dlclose(pWrapperTable->m_LibraryHandle); + #endif // _WIN32 + return initWrapperTable(pWrapperTable); + } + + return LIB3MF_SUCCESS; + } + + inline Lib3MFResult CWrapper::loadWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, const char * pLibraryFileName) + { + if (pWrapperTable == nullptr) + return LIB3MF_ERROR_INVALIDPARAM; + if (pLibraryFileName == nullptr) + return LIB3MF_ERROR_INVALIDPARAM; + + #ifdef _WIN32 + // Convert filename to UTF16-string + int nLength = 0; + while ((pLibraryFileName[nLength] != 0) && (nLength < MAX_PATH)) + nLength++; + int nBufferSize = nLength * 2 + 2; + std::vector wsLibraryFileName(nBufferSize); + int nResult = MultiByteToWideChar(CP_UTF8, 0, pLibraryFileName, nLength, &wsLibraryFileName[0], nBufferSize); + if (nResult == 0) + return LIB3MF_ERROR_COULDNOTLOADLIBRARY; + + HMODULE hLibrary = LoadLibraryW(wsLibraryFileName.data()); + if (hLibrary == 0) + return LIB3MF_ERROR_COULDNOTLOADLIBRARY; + #else // _WIN32 + void* hLibrary = dlopen(pLibraryFileName, RTLD_LAZY); + if (hLibrary == 0) + return LIB3MF_ERROR_COULDNOTLOADLIBRARY; + dlerror(); + #endif // _WIN32 + + #ifdef _WIN32 + pWrapperTable->m_Base_ClassTypeId = (PLib3MFBase_ClassTypeIdPtr) GetProcAddress(hLibrary, "lib3mf_base_classtypeid"); + #else // _WIN32 + pWrapperTable->m_Base_ClassTypeId = (PLib3MFBase_ClassTypeIdPtr) dlsym(hLibrary, "lib3mf_base_classtypeid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Base_ClassTypeId == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_WriteToFile = (PLib3MFWriter_WriteToFilePtr) GetProcAddress(hLibrary, "lib3mf_writer_writetofile"); + #else // _WIN32 + pWrapperTable->m_Writer_WriteToFile = (PLib3MFWriter_WriteToFilePtr) dlsym(hLibrary, "lib3mf_writer_writetofile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_WriteToFile == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_GetStreamSize = (PLib3MFWriter_GetStreamSizePtr) GetProcAddress(hLibrary, "lib3mf_writer_getstreamsize"); + #else // _WIN32 + pWrapperTable->m_Writer_GetStreamSize = (PLib3MFWriter_GetStreamSizePtr) dlsym(hLibrary, "lib3mf_writer_getstreamsize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_GetStreamSize == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_WriteToBuffer = (PLib3MFWriter_WriteToBufferPtr) GetProcAddress(hLibrary, "lib3mf_writer_writetobuffer"); + #else // _WIN32 + pWrapperTable->m_Writer_WriteToBuffer = (PLib3MFWriter_WriteToBufferPtr) dlsym(hLibrary, "lib3mf_writer_writetobuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_WriteToBuffer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_WriteToCallback = (PLib3MFWriter_WriteToCallbackPtr) GetProcAddress(hLibrary, "lib3mf_writer_writetocallback"); + #else // _WIN32 + pWrapperTable->m_Writer_WriteToCallback = (PLib3MFWriter_WriteToCallbackPtr) dlsym(hLibrary, "lib3mf_writer_writetocallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_WriteToCallback == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_SetProgressCallback = (PLib3MFWriter_SetProgressCallbackPtr) GetProcAddress(hLibrary, "lib3mf_writer_setprogresscallback"); + #else // _WIN32 + pWrapperTable->m_Writer_SetProgressCallback = (PLib3MFWriter_SetProgressCallbackPtr) dlsym(hLibrary, "lib3mf_writer_setprogresscallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_SetProgressCallback == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_GetDecimalPrecision = (PLib3MFWriter_GetDecimalPrecisionPtr) GetProcAddress(hLibrary, "lib3mf_writer_getdecimalprecision"); + #else // _WIN32 + pWrapperTable->m_Writer_GetDecimalPrecision = (PLib3MFWriter_GetDecimalPrecisionPtr) dlsym(hLibrary, "lib3mf_writer_getdecimalprecision"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_GetDecimalPrecision == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_SetDecimalPrecision = (PLib3MFWriter_SetDecimalPrecisionPtr) GetProcAddress(hLibrary, "lib3mf_writer_setdecimalprecision"); + #else // _WIN32 + pWrapperTable->m_Writer_SetDecimalPrecision = (PLib3MFWriter_SetDecimalPrecisionPtr) dlsym(hLibrary, "lib3mf_writer_setdecimalprecision"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_SetDecimalPrecision == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_SetStrictModeActive = (PLib3MFWriter_SetStrictModeActivePtr) GetProcAddress(hLibrary, "lib3mf_writer_setstrictmodeactive"); + #else // _WIN32 + pWrapperTable->m_Writer_SetStrictModeActive = (PLib3MFWriter_SetStrictModeActivePtr) dlsym(hLibrary, "lib3mf_writer_setstrictmodeactive"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_SetStrictModeActive == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_GetStrictModeActive = (PLib3MFWriter_GetStrictModeActivePtr) GetProcAddress(hLibrary, "lib3mf_writer_getstrictmodeactive"); + #else // _WIN32 + pWrapperTable->m_Writer_GetStrictModeActive = (PLib3MFWriter_GetStrictModeActivePtr) dlsym(hLibrary, "lib3mf_writer_getstrictmodeactive"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_GetStrictModeActive == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_GetWarning = (PLib3MFWriter_GetWarningPtr) GetProcAddress(hLibrary, "lib3mf_writer_getwarning"); + #else // _WIN32 + pWrapperTable->m_Writer_GetWarning = (PLib3MFWriter_GetWarningPtr) dlsym(hLibrary, "lib3mf_writer_getwarning"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_GetWarning == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_GetWarningCount = (PLib3MFWriter_GetWarningCountPtr) GetProcAddress(hLibrary, "lib3mf_writer_getwarningcount"); + #else // _WIN32 + pWrapperTable->m_Writer_GetWarningCount = (PLib3MFWriter_GetWarningCountPtr) dlsym(hLibrary, "lib3mf_writer_getwarningcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_GetWarningCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_AddKeyWrappingCallback = (PLib3MFWriter_AddKeyWrappingCallbackPtr) GetProcAddress(hLibrary, "lib3mf_writer_addkeywrappingcallback"); + #else // _WIN32 + pWrapperTable->m_Writer_AddKeyWrappingCallback = (PLib3MFWriter_AddKeyWrappingCallbackPtr) dlsym(hLibrary, "lib3mf_writer_addkeywrappingcallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_AddKeyWrappingCallback == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Writer_SetContentEncryptionCallback = (PLib3MFWriter_SetContentEncryptionCallbackPtr) GetProcAddress(hLibrary, "lib3mf_writer_setcontentencryptioncallback"); + #else // _WIN32 + pWrapperTable->m_Writer_SetContentEncryptionCallback = (PLib3MFWriter_SetContentEncryptionCallbackPtr) dlsym(hLibrary, "lib3mf_writer_setcontentencryptioncallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Writer_SetContentEncryptionCallback == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_ReadFromFile = (PLib3MFReader_ReadFromFilePtr) GetProcAddress(hLibrary, "lib3mf_reader_readfromfile"); + #else // _WIN32 + pWrapperTable->m_Reader_ReadFromFile = (PLib3MFReader_ReadFromFilePtr) dlsym(hLibrary, "lib3mf_reader_readfromfile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_ReadFromFile == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_ReadFromBuffer = (PLib3MFReader_ReadFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_reader_readfrombuffer"); + #else // _WIN32 + pWrapperTable->m_Reader_ReadFromBuffer = (PLib3MFReader_ReadFromBufferPtr) dlsym(hLibrary, "lib3mf_reader_readfrombuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_ReadFromBuffer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_ReadFromCallback = (PLib3MFReader_ReadFromCallbackPtr) GetProcAddress(hLibrary, "lib3mf_reader_readfromcallback"); + #else // _WIN32 + pWrapperTable->m_Reader_ReadFromCallback = (PLib3MFReader_ReadFromCallbackPtr) dlsym(hLibrary, "lib3mf_reader_readfromcallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_ReadFromCallback == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_SetProgressCallback = (PLib3MFReader_SetProgressCallbackPtr) GetProcAddress(hLibrary, "lib3mf_reader_setprogresscallback"); + #else // _WIN32 + pWrapperTable->m_Reader_SetProgressCallback = (PLib3MFReader_SetProgressCallbackPtr) dlsym(hLibrary, "lib3mf_reader_setprogresscallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_SetProgressCallback == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_AddRelationToRead = (PLib3MFReader_AddRelationToReadPtr) GetProcAddress(hLibrary, "lib3mf_reader_addrelationtoread"); + #else // _WIN32 + pWrapperTable->m_Reader_AddRelationToRead = (PLib3MFReader_AddRelationToReadPtr) dlsym(hLibrary, "lib3mf_reader_addrelationtoread"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_AddRelationToRead == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_RemoveRelationToRead = (PLib3MFReader_RemoveRelationToReadPtr) GetProcAddress(hLibrary, "lib3mf_reader_removerelationtoread"); + #else // _WIN32 + pWrapperTable->m_Reader_RemoveRelationToRead = (PLib3MFReader_RemoveRelationToReadPtr) dlsym(hLibrary, "lib3mf_reader_removerelationtoread"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_RemoveRelationToRead == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_SetStrictModeActive = (PLib3MFReader_SetStrictModeActivePtr) GetProcAddress(hLibrary, "lib3mf_reader_setstrictmodeactive"); + #else // _WIN32 + pWrapperTable->m_Reader_SetStrictModeActive = (PLib3MFReader_SetStrictModeActivePtr) dlsym(hLibrary, "lib3mf_reader_setstrictmodeactive"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_SetStrictModeActive == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_GetStrictModeActive = (PLib3MFReader_GetStrictModeActivePtr) GetProcAddress(hLibrary, "lib3mf_reader_getstrictmodeactive"); + #else // _WIN32 + pWrapperTable->m_Reader_GetStrictModeActive = (PLib3MFReader_GetStrictModeActivePtr) dlsym(hLibrary, "lib3mf_reader_getstrictmodeactive"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_GetStrictModeActive == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_GetWarning = (PLib3MFReader_GetWarningPtr) GetProcAddress(hLibrary, "lib3mf_reader_getwarning"); + #else // _WIN32 + pWrapperTable->m_Reader_GetWarning = (PLib3MFReader_GetWarningPtr) dlsym(hLibrary, "lib3mf_reader_getwarning"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_GetWarning == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_GetWarningCount = (PLib3MFReader_GetWarningCountPtr) GetProcAddress(hLibrary, "lib3mf_reader_getwarningcount"); + #else // _WIN32 + pWrapperTable->m_Reader_GetWarningCount = (PLib3MFReader_GetWarningCountPtr) dlsym(hLibrary, "lib3mf_reader_getwarningcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_GetWarningCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_AddKeyWrappingCallback = (PLib3MFReader_AddKeyWrappingCallbackPtr) GetProcAddress(hLibrary, "lib3mf_reader_addkeywrappingcallback"); + #else // _WIN32 + pWrapperTable->m_Reader_AddKeyWrappingCallback = (PLib3MFReader_AddKeyWrappingCallbackPtr) dlsym(hLibrary, "lib3mf_reader_addkeywrappingcallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_AddKeyWrappingCallback == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Reader_SetContentEncryptionCallback = (PLib3MFReader_SetContentEncryptionCallbackPtr) GetProcAddress(hLibrary, "lib3mf_reader_setcontentencryptioncallback"); + #else // _WIN32 + pWrapperTable->m_Reader_SetContentEncryptionCallback = (PLib3MFReader_SetContentEncryptionCallbackPtr) dlsym(hLibrary, "lib3mf_reader_setcontentencryptioncallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Reader_SetContentEncryptionCallback == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_PackagePart_GetPath = (PLib3MFPackagePart_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_packagepart_getpath"); + #else // _WIN32 + pWrapperTable->m_PackagePart_GetPath = (PLib3MFPackagePart_GetPathPtr) dlsym(hLibrary, "lib3mf_packagepart_getpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_PackagePart_GetPath == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_PackagePart_SetPath = (PLib3MFPackagePart_SetPathPtr) GetProcAddress(hLibrary, "lib3mf_packagepart_setpath"); + #else // _WIN32 + pWrapperTable->m_PackagePart_SetPath = (PLib3MFPackagePart_SetPathPtr) dlsym(hLibrary, "lib3mf_packagepart_setpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_PackagePart_SetPath == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Resource_GetResourceID = (PLib3MFResource_GetResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_resource_getresourceid"); + #else // _WIN32 + pWrapperTable->m_Resource_GetResourceID = (PLib3MFResource_GetResourceIDPtr) dlsym(hLibrary, "lib3mf_resource_getresourceid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Resource_GetResourceID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Resource_GetUniqueResourceID = (PLib3MFResource_GetUniqueResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_resource_getuniqueresourceid"); + #else // _WIN32 + pWrapperTable->m_Resource_GetUniqueResourceID = (PLib3MFResource_GetUniqueResourceIDPtr) dlsym(hLibrary, "lib3mf_resource_getuniqueresourceid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Resource_GetUniqueResourceID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Resource_PackagePart = (PLib3MFResource_PackagePartPtr) GetProcAddress(hLibrary, "lib3mf_resource_packagepart"); + #else // _WIN32 + pWrapperTable->m_Resource_PackagePart = (PLib3MFResource_PackagePartPtr) dlsym(hLibrary, "lib3mf_resource_packagepart"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Resource_PackagePart == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Resource_SetPackagePart = (PLib3MFResource_SetPackagePartPtr) GetProcAddress(hLibrary, "lib3mf_resource_setpackagepart"); + #else // _WIN32 + pWrapperTable->m_Resource_SetPackagePart = (PLib3MFResource_SetPackagePartPtr) dlsym(hLibrary, "lib3mf_resource_setpackagepart"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Resource_SetPackagePart == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Resource_GetModelResourceID = (PLib3MFResource_GetModelResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_resource_getmodelresourceid"); + #else // _WIN32 + pWrapperTable->m_Resource_GetModelResourceID = (PLib3MFResource_GetModelResourceIDPtr) dlsym(hLibrary, "lib3mf_resource_getmodelresourceid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Resource_GetModelResourceID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIterator_MoveNext = (PLib3MFResourceIterator_MoveNextPtr) GetProcAddress(hLibrary, "lib3mf_resourceiterator_movenext"); + #else // _WIN32 + pWrapperTable->m_ResourceIterator_MoveNext = (PLib3MFResourceIterator_MoveNextPtr) dlsym(hLibrary, "lib3mf_resourceiterator_movenext"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIterator_MoveNext == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIterator_MovePrevious = (PLib3MFResourceIterator_MovePreviousPtr) GetProcAddress(hLibrary, "lib3mf_resourceiterator_moveprevious"); + #else // _WIN32 + pWrapperTable->m_ResourceIterator_MovePrevious = (PLib3MFResourceIterator_MovePreviousPtr) dlsym(hLibrary, "lib3mf_resourceiterator_moveprevious"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIterator_MovePrevious == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIterator_GetCurrent = (PLib3MFResourceIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_resourceiterator_getcurrent"); + #else // _WIN32 + pWrapperTable->m_ResourceIterator_GetCurrent = (PLib3MFResourceIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_resourceiterator_getcurrent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIterator_GetCurrent == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIterator_Clone = (PLib3MFResourceIterator_ClonePtr) GetProcAddress(hLibrary, "lib3mf_resourceiterator_clone"); + #else // _WIN32 + pWrapperTable->m_ResourceIterator_Clone = (PLib3MFResourceIterator_ClonePtr) dlsym(hLibrary, "lib3mf_resourceiterator_clone"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIterator_Clone == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIterator_Count = (PLib3MFResourceIterator_CountPtr) GetProcAddress(hLibrary, "lib3mf_resourceiterator_count"); + #else // _WIN32 + pWrapperTable->m_ResourceIterator_Count = (PLib3MFResourceIterator_CountPtr) dlsym(hLibrary, "lib3mf_resourceiterator_count"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIterator_Count == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack = (PLib3MFSliceStackIterator_GetCurrentSliceStackPtr) GetProcAddress(hLibrary, "lib3mf_slicestackiterator_getcurrentslicestack"); + #else // _WIN32 + pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack = (PLib3MFSliceStackIterator_GetCurrentSliceStackPtr) dlsym(hLibrary, "lib3mf_slicestackiterator_getcurrentslicestack"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ObjectIterator_GetCurrentObject = (PLib3MFObjectIterator_GetCurrentObjectPtr) GetProcAddress(hLibrary, "lib3mf_objectiterator_getcurrentobject"); + #else // _WIN32 + pWrapperTable->m_ObjectIterator_GetCurrentObject = (PLib3MFObjectIterator_GetCurrentObjectPtr) dlsym(hLibrary, "lib3mf_objectiterator_getcurrentobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ObjectIterator_GetCurrentObject == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject = (PLib3MFMeshObjectIterator_GetCurrentMeshObjectPtr) GetProcAddress(hLibrary, "lib3mf_meshobjectiterator_getcurrentmeshobject"); + #else // _WIN32 + pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject = (PLib3MFMeshObjectIterator_GetCurrentMeshObjectPtr) dlsym(hLibrary, "lib3mf_meshobjectiterator_getcurrentmeshobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject = (PLib3MFComponentsObjectIterator_GetCurrentComponentsObjectPtr) GetProcAddress(hLibrary, "lib3mf_componentsobjectiterator_getcurrentcomponentsobject"); + #else // _WIN32 + pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject = (PLib3MFComponentsObjectIterator_GetCurrentComponentsObjectPtr) dlsym(hLibrary, "lib3mf_componentsobjectiterator_getcurrentcomponentsobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D = (PLib3MFTexture2DIterator_GetCurrentTexture2DPtr) GetProcAddress(hLibrary, "lib3mf_texture2diterator_getcurrenttexture2d"); + #else // _WIN32 + pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D = (PLib3MFTexture2DIterator_GetCurrentTexture2DPtr) dlsym(hLibrary, "lib3mf_texture2diterator_getcurrenttexture2d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup = (PLib3MFBaseMaterialGroupIterator_GetCurrentBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup = (PLib3MFBaseMaterialGroupIterator_GetCurrentBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup = (PLib3MFColorGroupIterator_GetCurrentColorGroupPtr) GetProcAddress(hLibrary, "lib3mf_colorgroupiterator_getcurrentcolorgroup"); + #else // _WIN32 + pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup = (PLib3MFColorGroupIterator_GetCurrentColorGroupPtr) dlsym(hLibrary, "lib3mf_colorgroupiterator_getcurrentcolorgroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup = (PLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup = (PLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupPtr) dlsym(hLibrary, "lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials = (PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsPtr) GetProcAddress(hLibrary, "lib3mf_compositematerialsiterator_getcurrentcompositematerials"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials = (PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsPtr) dlsym(hLibrary, "lib3mf_compositematerialsiterator_getcurrentcompositematerials"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup = (PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup = (PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr) dlsym(hLibrary, "lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = (PLib3MFImage3DIterator_GetCurrentImage3DPtr) GetProcAddress(hLibrary, "lib3mf_image3diterator_getcurrentimage3d"); + #else // _WIN32 + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = (PLib3MFImage3DIterator_GetCurrentImage3DPtr) dlsym(hLibrary, "lib3mf_image3diterator_getcurrentimage3d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3DIterator_GetCurrentImage3D == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionIterator_GetCurrentFunction = (PLib3MFFunctionIterator_GetCurrentFunctionPtr) GetProcAddress(hLibrary, "lib3mf_functioniterator_getcurrentfunction"); + #else // _WIN32 + pWrapperTable->m_FunctionIterator_GetCurrentFunction = (PLib3MFFunctionIterator_GetCurrentFunctionPtr) dlsym(hLibrary, "lib3mf_functioniterator_getcurrentfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionIterator_GetCurrentFunction == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = (PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) GetProcAddress(hLibrary, "lib3mf_levelsetiterator_getcurrentlevelset"); + #else // _WIN32 + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = (PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) dlsym(hLibrary, "lib3mf_levelsetiterator_getcurrentlevelset"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaData_GetNameSpace = (PLib3MFMetaData_GetNameSpacePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getnamespace"); + #else // _WIN32 + pWrapperTable->m_MetaData_GetNameSpace = (PLib3MFMetaData_GetNameSpacePtr) dlsym(hLibrary, "lib3mf_metadata_getnamespace"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaData_GetNameSpace == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaData_SetNameSpace = (PLib3MFMetaData_SetNameSpacePtr) GetProcAddress(hLibrary, "lib3mf_metadata_setnamespace"); + #else // _WIN32 + pWrapperTable->m_MetaData_SetNameSpace = (PLib3MFMetaData_SetNameSpacePtr) dlsym(hLibrary, "lib3mf_metadata_setnamespace"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaData_SetNameSpace == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaData_GetName = (PLib3MFMetaData_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getname"); + #else // _WIN32 + pWrapperTable->m_MetaData_GetName = (PLib3MFMetaData_GetNamePtr) dlsym(hLibrary, "lib3mf_metadata_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaData_GetName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaData_SetName = (PLib3MFMetaData_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_metadata_setname"); + #else // _WIN32 + pWrapperTable->m_MetaData_SetName = (PLib3MFMetaData_SetNamePtr) dlsym(hLibrary, "lib3mf_metadata_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaData_SetName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaData_GetKey = (PLib3MFMetaData_GetKeyPtr) GetProcAddress(hLibrary, "lib3mf_metadata_getkey"); + #else // _WIN32 + pWrapperTable->m_MetaData_GetKey = (PLib3MFMetaData_GetKeyPtr) dlsym(hLibrary, "lib3mf_metadata_getkey"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaData_GetKey == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaData_GetMustPreserve = (PLib3MFMetaData_GetMustPreservePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getmustpreserve"); + #else // _WIN32 + pWrapperTable->m_MetaData_GetMustPreserve = (PLib3MFMetaData_GetMustPreservePtr) dlsym(hLibrary, "lib3mf_metadata_getmustpreserve"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaData_GetMustPreserve == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaData_SetMustPreserve = (PLib3MFMetaData_SetMustPreservePtr) GetProcAddress(hLibrary, "lib3mf_metadata_setmustpreserve"); + #else // _WIN32 + pWrapperTable->m_MetaData_SetMustPreserve = (PLib3MFMetaData_SetMustPreservePtr) dlsym(hLibrary, "lib3mf_metadata_setmustpreserve"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaData_SetMustPreserve == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaData_GetType = (PLib3MFMetaData_GetTypePtr) GetProcAddress(hLibrary, "lib3mf_metadata_gettype"); + #else // _WIN32 + pWrapperTable->m_MetaData_GetType = (PLib3MFMetaData_GetTypePtr) dlsym(hLibrary, "lib3mf_metadata_gettype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaData_GetType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaData_SetType = (PLib3MFMetaData_SetTypePtr) GetProcAddress(hLibrary, "lib3mf_metadata_settype"); + #else // _WIN32 + pWrapperTable->m_MetaData_SetType = (PLib3MFMetaData_SetTypePtr) dlsym(hLibrary, "lib3mf_metadata_settype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaData_SetType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaData_GetValue = (PLib3MFMetaData_GetValuePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getvalue"); + #else // _WIN32 + pWrapperTable->m_MetaData_GetValue = (PLib3MFMetaData_GetValuePtr) dlsym(hLibrary, "lib3mf_metadata_getvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaData_GetValue == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaData_SetValue = (PLib3MFMetaData_SetValuePtr) GetProcAddress(hLibrary, "lib3mf_metadata_setvalue"); + #else // _WIN32 + pWrapperTable->m_MetaData_SetValue = (PLib3MFMetaData_SetValuePtr) dlsym(hLibrary, "lib3mf_metadata_setvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaData_SetValue == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaDataGroup_GetMetaDataCount = (PLib3MFMetaDataGroup_GetMetaDataCountPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_getmetadatacount"); + #else // _WIN32 + pWrapperTable->m_MetaDataGroup_GetMetaDataCount = (PLib3MFMetaDataGroup_GetMetaDataCountPtr) dlsym(hLibrary, "lib3mf_metadatagroup_getmetadatacount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaDataGroup_GetMetaDataCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaDataGroup_GetMetaData = (PLib3MFMetaDataGroup_GetMetaDataPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_getmetadata"); + #else // _WIN32 + pWrapperTable->m_MetaDataGroup_GetMetaData = (PLib3MFMetaDataGroup_GetMetaDataPtr) dlsym(hLibrary, "lib3mf_metadatagroup_getmetadata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaDataGroup_GetMetaData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaDataGroup_GetMetaDataByKey = (PLib3MFMetaDataGroup_GetMetaDataByKeyPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_getmetadatabykey"); + #else // _WIN32 + pWrapperTable->m_MetaDataGroup_GetMetaDataByKey = (PLib3MFMetaDataGroup_GetMetaDataByKeyPtr) dlsym(hLibrary, "lib3mf_metadatagroup_getmetadatabykey"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaDataGroup_GetMetaDataByKey == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaDataGroup_RemoveMetaDataByIndex = (PLib3MFMetaDataGroup_RemoveMetaDataByIndexPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_removemetadatabyindex"); + #else // _WIN32 + pWrapperTable->m_MetaDataGroup_RemoveMetaDataByIndex = (PLib3MFMetaDataGroup_RemoveMetaDataByIndexPtr) dlsym(hLibrary, "lib3mf_metadatagroup_removemetadatabyindex"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaDataGroup_RemoveMetaDataByIndex == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaDataGroup_RemoveMetaData = (PLib3MFMetaDataGroup_RemoveMetaDataPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_removemetadata"); + #else // _WIN32 + pWrapperTable->m_MetaDataGroup_RemoveMetaData = (PLib3MFMetaDataGroup_RemoveMetaDataPtr) dlsym(hLibrary, "lib3mf_metadatagroup_removemetadata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaDataGroup_RemoveMetaData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MetaDataGroup_AddMetaData = (PLib3MFMetaDataGroup_AddMetaDataPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_addmetadata"); + #else // _WIN32 + pWrapperTable->m_MetaDataGroup_AddMetaData = (PLib3MFMetaDataGroup_AddMetaDataPtr) dlsym(hLibrary, "lib3mf_metadatagroup_addmetadata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MetaDataGroup_AddMetaData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_GetType = (PLib3MFObject_GetTypePtr) GetProcAddress(hLibrary, "lib3mf_object_gettype"); + #else // _WIN32 + pWrapperTable->m_Object_GetType = (PLib3MFObject_GetTypePtr) dlsym(hLibrary, "lib3mf_object_gettype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_GetType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_SetType = (PLib3MFObject_SetTypePtr) GetProcAddress(hLibrary, "lib3mf_object_settype"); + #else // _WIN32 + pWrapperTable->m_Object_SetType = (PLib3MFObject_SetTypePtr) dlsym(hLibrary, "lib3mf_object_settype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_SetType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_GetName = (PLib3MFObject_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_object_getname"); + #else // _WIN32 + pWrapperTable->m_Object_GetName = (PLib3MFObject_GetNamePtr) dlsym(hLibrary, "lib3mf_object_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_GetName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_SetName = (PLib3MFObject_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_object_setname"); + #else // _WIN32 + pWrapperTable->m_Object_SetName = (PLib3MFObject_SetNamePtr) dlsym(hLibrary, "lib3mf_object_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_SetName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_GetPartNumber = (PLib3MFObject_GetPartNumberPtr) GetProcAddress(hLibrary, "lib3mf_object_getpartnumber"); + #else // _WIN32 + pWrapperTable->m_Object_GetPartNumber = (PLib3MFObject_GetPartNumberPtr) dlsym(hLibrary, "lib3mf_object_getpartnumber"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_GetPartNumber == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_SetPartNumber = (PLib3MFObject_SetPartNumberPtr) GetProcAddress(hLibrary, "lib3mf_object_setpartnumber"); + #else // _WIN32 + pWrapperTable->m_Object_SetPartNumber = (PLib3MFObject_SetPartNumberPtr) dlsym(hLibrary, "lib3mf_object_setpartnumber"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_SetPartNumber == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_IsMeshObject = (PLib3MFObject_IsMeshObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_ismeshobject"); + #else // _WIN32 + pWrapperTable->m_Object_IsMeshObject = (PLib3MFObject_IsMeshObjectPtr) dlsym(hLibrary, "lib3mf_object_ismeshobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_IsMeshObject == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_IsComponentsObject = (PLib3MFObject_IsComponentsObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_iscomponentsobject"); + #else // _WIN32 + pWrapperTable->m_Object_IsComponentsObject = (PLib3MFObject_IsComponentsObjectPtr) dlsym(hLibrary, "lib3mf_object_iscomponentsobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_IsComponentsObject == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_islevelsetobject"); + #else // _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) dlsym(hLibrary, "lib3mf_object_islevelsetobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_IsLevelSetObject == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_IsValid = (PLib3MFObject_IsValidPtr) GetProcAddress(hLibrary, "lib3mf_object_isvalid"); + #else // _WIN32 + pWrapperTable->m_Object_IsValid = (PLib3MFObject_IsValidPtr) dlsym(hLibrary, "lib3mf_object_isvalid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_IsValid == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_SetAttachmentAsThumbnail = (PLib3MFObject_SetAttachmentAsThumbnailPtr) GetProcAddress(hLibrary, "lib3mf_object_setattachmentasthumbnail"); + #else // _WIN32 + pWrapperTable->m_Object_SetAttachmentAsThumbnail = (PLib3MFObject_SetAttachmentAsThumbnailPtr) dlsym(hLibrary, "lib3mf_object_setattachmentasthumbnail"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_SetAttachmentAsThumbnail == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_GetThumbnailAttachment = (PLib3MFObject_GetThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_object_getthumbnailattachment"); + #else // _WIN32 + pWrapperTable->m_Object_GetThumbnailAttachment = (PLib3MFObject_GetThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_object_getthumbnailattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_GetThumbnailAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_ClearThumbnailAttachment = (PLib3MFObject_ClearThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_object_clearthumbnailattachment"); + #else // _WIN32 + pWrapperTable->m_Object_ClearThumbnailAttachment = (PLib3MFObject_ClearThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_object_clearthumbnailattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_ClearThumbnailAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_GetOutbox = (PLib3MFObject_GetOutboxPtr) GetProcAddress(hLibrary, "lib3mf_object_getoutbox"); + #else // _WIN32 + pWrapperTable->m_Object_GetOutbox = (PLib3MFObject_GetOutboxPtr) dlsym(hLibrary, "lib3mf_object_getoutbox"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_GetOutbox == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_GetUUID = (PLib3MFObject_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_object_getuuid"); + #else // _WIN32 + pWrapperTable->m_Object_GetUUID = (PLib3MFObject_GetUUIDPtr) dlsym(hLibrary, "lib3mf_object_getuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_GetUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_SetUUID = (PLib3MFObject_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_object_setuuid"); + #else // _WIN32 + pWrapperTable->m_Object_SetUUID = (PLib3MFObject_SetUUIDPtr) dlsym(hLibrary, "lib3mf_object_setuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_SetUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_GetMetaDataGroup = (PLib3MFObject_GetMetaDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_object_getmetadatagroup"); + #else // _WIN32 + pWrapperTable->m_Object_GetMetaDataGroup = (PLib3MFObject_GetMetaDataGroupPtr) dlsym(hLibrary, "lib3mf_object_getmetadatagroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_GetMetaDataGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_SetSlicesMeshResolution = (PLib3MFObject_SetSlicesMeshResolutionPtr) GetProcAddress(hLibrary, "lib3mf_object_setslicesmeshresolution"); + #else // _WIN32 + pWrapperTable->m_Object_SetSlicesMeshResolution = (PLib3MFObject_SetSlicesMeshResolutionPtr) dlsym(hLibrary, "lib3mf_object_setslicesmeshresolution"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_SetSlicesMeshResolution == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_GetSlicesMeshResolution = (PLib3MFObject_GetSlicesMeshResolutionPtr) GetProcAddress(hLibrary, "lib3mf_object_getslicesmeshresolution"); + #else // _WIN32 + pWrapperTable->m_Object_GetSlicesMeshResolution = (PLib3MFObject_GetSlicesMeshResolutionPtr) dlsym(hLibrary, "lib3mf_object_getslicesmeshresolution"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_GetSlicesMeshResolution == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_HasSlices = (PLib3MFObject_HasSlicesPtr) GetProcAddress(hLibrary, "lib3mf_object_hasslices"); + #else // _WIN32 + pWrapperTable->m_Object_HasSlices = (PLib3MFObject_HasSlicesPtr) dlsym(hLibrary, "lib3mf_object_hasslices"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_HasSlices == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_ClearSliceStack = (PLib3MFObject_ClearSliceStackPtr) GetProcAddress(hLibrary, "lib3mf_object_clearslicestack"); + #else // _WIN32 + pWrapperTable->m_Object_ClearSliceStack = (PLib3MFObject_ClearSliceStackPtr) dlsym(hLibrary, "lib3mf_object_clearslicestack"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_ClearSliceStack == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_GetSliceStack = (PLib3MFObject_GetSliceStackPtr) GetProcAddress(hLibrary, "lib3mf_object_getslicestack"); + #else // _WIN32 + pWrapperTable->m_Object_GetSliceStack = (PLib3MFObject_GetSliceStackPtr) dlsym(hLibrary, "lib3mf_object_getslicestack"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_GetSliceStack == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Object_AssignSliceStack = (PLib3MFObject_AssignSliceStackPtr) GetProcAddress(hLibrary, "lib3mf_object_assignslicestack"); + #else // _WIN32 + pWrapperTable->m_Object_AssignSliceStack = (PLib3MFObject_AssignSliceStackPtr) dlsym(hLibrary, "lib3mf_object_assignslicestack"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_AssignSliceStack == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetVertexCount = (PLib3MFMeshObject_GetVertexCountPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getvertexcount"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetVertexCount = (PLib3MFMeshObject_GetVertexCountPtr) dlsym(hLibrary, "lib3mf_meshobject_getvertexcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetVertexCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetTriangleCount = (PLib3MFMeshObject_GetTriangleCountPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_gettrianglecount"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetTriangleCount = (PLib3MFMeshObject_GetTriangleCountPtr) dlsym(hLibrary, "lib3mf_meshobject_gettrianglecount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetTriangleCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetVertex = (PLib3MFMeshObject_GetVertexPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getvertex"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetVertex = (PLib3MFMeshObject_GetVertexPtr) dlsym(hLibrary, "lib3mf_meshobject_getvertex"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetVertex == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_SetVertex = (PLib3MFMeshObject_SetVertexPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setvertex"); + #else // _WIN32 + pWrapperTable->m_MeshObject_SetVertex = (PLib3MFMeshObject_SetVertexPtr) dlsym(hLibrary, "lib3mf_meshobject_setvertex"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_SetVertex == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_AddVertex = (PLib3MFMeshObject_AddVertexPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_addvertex"); + #else // _WIN32 + pWrapperTable->m_MeshObject_AddVertex = (PLib3MFMeshObject_AddVertexPtr) dlsym(hLibrary, "lib3mf_meshobject_addvertex"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_AddVertex == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetVertices = (PLib3MFMeshObject_GetVerticesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getvertices"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetVertices = (PLib3MFMeshObject_GetVerticesPtr) dlsym(hLibrary, "lib3mf_meshobject_getvertices"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetVertices == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetTriangle = (PLib3MFMeshObject_GetTrianglePtr) GetProcAddress(hLibrary, "lib3mf_meshobject_gettriangle"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetTriangle = (PLib3MFMeshObject_GetTrianglePtr) dlsym(hLibrary, "lib3mf_meshobject_gettriangle"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetTriangle == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_SetTriangle = (PLib3MFMeshObject_SetTrianglePtr) GetProcAddress(hLibrary, "lib3mf_meshobject_settriangle"); + #else // _WIN32 + pWrapperTable->m_MeshObject_SetTriangle = (PLib3MFMeshObject_SetTrianglePtr) dlsym(hLibrary, "lib3mf_meshobject_settriangle"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_SetTriangle == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_AddTriangle = (PLib3MFMeshObject_AddTrianglePtr) GetProcAddress(hLibrary, "lib3mf_meshobject_addtriangle"); + #else // _WIN32 + pWrapperTable->m_MeshObject_AddTriangle = (PLib3MFMeshObject_AddTrianglePtr) dlsym(hLibrary, "lib3mf_meshobject_addtriangle"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_AddTriangle == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetTriangleIndices = (PLib3MFMeshObject_GetTriangleIndicesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_gettriangleindices"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetTriangleIndices = (PLib3MFMeshObject_GetTriangleIndicesPtr) dlsym(hLibrary, "lib3mf_meshobject_gettriangleindices"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetTriangleIndices == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_SetObjectLevelProperty = (PLib3MFMeshObject_SetObjectLevelPropertyPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setobjectlevelproperty"); + #else // _WIN32 + pWrapperTable->m_MeshObject_SetObjectLevelProperty = (PLib3MFMeshObject_SetObjectLevelPropertyPtr) dlsym(hLibrary, "lib3mf_meshobject_setobjectlevelproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_SetObjectLevelProperty == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetObjectLevelProperty = (PLib3MFMeshObject_GetObjectLevelPropertyPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getobjectlevelproperty"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetObjectLevelProperty = (PLib3MFMeshObject_GetObjectLevelPropertyPtr) dlsym(hLibrary, "lib3mf_meshobject_getobjectlevelproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetObjectLevelProperty == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_SetTriangleProperties = (PLib3MFMeshObject_SetTrianglePropertiesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_settriangleproperties"); + #else // _WIN32 + pWrapperTable->m_MeshObject_SetTriangleProperties = (PLib3MFMeshObject_SetTrianglePropertiesPtr) dlsym(hLibrary, "lib3mf_meshobject_settriangleproperties"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_SetTriangleProperties == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetTriangleProperties = (PLib3MFMeshObject_GetTrianglePropertiesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_gettriangleproperties"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetTriangleProperties = (PLib3MFMeshObject_GetTrianglePropertiesPtr) dlsym(hLibrary, "lib3mf_meshobject_gettriangleproperties"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetTriangleProperties == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_SetAllTriangleProperties = (PLib3MFMeshObject_SetAllTrianglePropertiesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setalltriangleproperties"); + #else // _WIN32 + pWrapperTable->m_MeshObject_SetAllTriangleProperties = (PLib3MFMeshObject_SetAllTrianglePropertiesPtr) dlsym(hLibrary, "lib3mf_meshobject_setalltriangleproperties"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_SetAllTriangleProperties == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetAllTriangleProperties = (PLib3MFMeshObject_GetAllTrianglePropertiesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getalltriangleproperties"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetAllTriangleProperties = (PLib3MFMeshObject_GetAllTrianglePropertiesPtr) dlsym(hLibrary, "lib3mf_meshobject_getalltriangleproperties"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetAllTriangleProperties == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_ClearAllProperties = (PLib3MFMeshObject_ClearAllPropertiesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_clearallproperties"); + #else // _WIN32 + pWrapperTable->m_MeshObject_ClearAllProperties = (PLib3MFMeshObject_ClearAllPropertiesPtr) dlsym(hLibrary, "lib3mf_meshobject_clearallproperties"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_ClearAllProperties == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_SetGeometry = (PLib3MFMeshObject_SetGeometryPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setgeometry"); + #else // _WIN32 + pWrapperTable->m_MeshObject_SetGeometry = (PLib3MFMeshObject_SetGeometryPtr) dlsym(hLibrary, "lib3mf_meshobject_setgeometry"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_SetGeometry == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_IsManifoldAndOriented = (PLib3MFMeshObject_IsManifoldAndOrientedPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_ismanifoldandoriented"); + #else // _WIN32 + pWrapperTable->m_MeshObject_IsManifoldAndOriented = (PLib3MFMeshObject_IsManifoldAndOrientedPtr) dlsym(hLibrary, "lib3mf_meshobject_ismanifoldandoriented"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_IsManifoldAndOriented == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_BeamLattice = (PLib3MFMeshObject_BeamLatticePtr) GetProcAddress(hLibrary, "lib3mf_meshobject_beamlattice"); + #else // _WIN32 + pWrapperTable->m_MeshObject_BeamLattice = (PLib3MFMeshObject_BeamLatticePtr) dlsym(hLibrary, "lib3mf_meshobject_beamlattice"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_BeamLattice == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetVolumeData = (PLib3MFMeshObject_GetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getvolumedata"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetVolumeData = (PLib3MFMeshObject_GetVolumeDataPtr) dlsym(hLibrary, "lib3mf_meshobject_getvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetVolumeData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_SetVolumeData = (PLib3MFMeshObject_SetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setvolumedata"); + #else // _WIN32 + pWrapperTable->m_MeshObject_SetVolumeData = (PLib3MFMeshObject_SetVolumeDataPtr) dlsym(hLibrary, "lib3mf_meshobject_setvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_SetVolumeData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetFunction = (PLib3MFLevelSet_GetFunctionPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getfunction"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetFunction = (PLib3MFLevelSet_GetFunctionPtr) dlsym(hLibrary, "lib3mf_levelset_getfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetFunction == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetFunction = (PLib3MFLevelSet_SetFunctionPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setfunction"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetFunction = (PLib3MFLevelSet_SetFunctionPtr) dlsym(hLibrary, "lib3mf_levelset_setfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetFunction == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetTransform = (PLib3MFLevelSet_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_levelset_gettransform"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetTransform = (PLib3MFLevelSet_GetTransformPtr) dlsym(hLibrary, "lib3mf_levelset_gettransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetTransform == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetTransform = (PLib3MFLevelSet_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_levelset_settransform"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetTransform = (PLib3MFLevelSet_SetTransformPtr) dlsym(hLibrary, "lib3mf_levelset_settransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetTransform == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetChannelName = (PLib3MFLevelSet_GetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getchannelname"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetChannelName = (PLib3MFLevelSet_GetChannelNamePtr) dlsym(hLibrary, "lib3mf_levelset_getchannelname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetChannelName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetChannelName = (PLib3MFLevelSet_SetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setchannelname"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetChannelName = (PLib3MFLevelSet_SetChannelNamePtr) dlsym(hLibrary, "lib3mf_levelset_setchannelname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetChannelName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMinFeatureSize = (PLib3MFLevelSet_SetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setminfeaturesize"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMinFeatureSize = (PLib3MFLevelSet_SetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_levelset_setminfeaturesize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMinFeatureSize == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMinFeatureSize = (PLib3MFLevelSet_GetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getminfeaturesize"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMinFeatureSize = (PLib3MFLevelSet_GetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_levelset_getminfeaturesize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMinFeatureSize == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetFallBackValue = (PLib3MFLevelSet_SetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setfallbackvalue"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetFallBackValue = (PLib3MFLevelSet_SetFallBackValuePtr) dlsym(hLibrary, "lib3mf_levelset_setfallbackvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetFallBackValue == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetFallBackValue = (PLib3MFLevelSet_GetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getfallbackvalue"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetFallBackValue = (PLib3MFLevelSet_GetFallBackValuePtr) dlsym(hLibrary, "lib3mf_levelset_getfallbackvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetFallBackValue == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = (PLib3MFLevelSet_SetMeshBBoxOnlyPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setmeshbboxonly"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = (PLib3MFLevelSet_SetMeshBBoxOnlyPtr) dlsym(hLibrary, "lib3mf_levelset_setmeshbboxonly"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMeshBBoxOnly == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = (PLib3MFLevelSet_GetMeshBBoxOnlyPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getmeshbboxonly"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = (PLib3MFLevelSet_GetMeshBBoxOnlyPtr) dlsym(hLibrary, "lib3mf_levelset_getmeshbboxonly"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMeshBBoxOnly == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMesh = (PLib3MFLevelSet_SetMeshPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setmesh"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMesh = (PLib3MFLevelSet_SetMeshPtr) dlsym(hLibrary, "lib3mf_levelset_setmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMesh == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMesh = (PLib3MFLevelSet_GetMeshPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getmesh"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMesh = (PLib3MFLevelSet_GetMeshPtr) dlsym(hLibrary, "lib3mf_levelset_getmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMesh == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetVolumeData = (PLib3MFLevelSet_GetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getvolumedata"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetVolumeData = (PLib3MFLevelSet_GetVolumeDataPtr) dlsym(hLibrary, "lib3mf_levelset_getvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetVolumeData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetVolumeData = (PLib3MFLevelSet_SetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setvolumedata"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetVolumeData = (PLib3MFLevelSet_SetVolumeDataPtr) dlsym(hLibrary, "lib3mf_levelset_setvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetVolumeData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetMinLength = (PLib3MFBeamLattice_GetMinLengthPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getminlength"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetMinLength = (PLib3MFBeamLattice_GetMinLengthPtr) dlsym(hLibrary, "lib3mf_beamlattice_getminlength"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetMinLength == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_SetMinLength = (PLib3MFBeamLattice_SetMinLengthPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setminlength"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_SetMinLength = (PLib3MFBeamLattice_SetMinLengthPtr) dlsym(hLibrary, "lib3mf_beamlattice_setminlength"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_SetMinLength == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetClipping = (PLib3MFBeamLattice_GetClippingPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getclipping"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetClipping = (PLib3MFBeamLattice_GetClippingPtr) dlsym(hLibrary, "lib3mf_beamlattice_getclipping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetClipping == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_SetClipping = (PLib3MFBeamLattice_SetClippingPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setclipping"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_SetClipping = (PLib3MFBeamLattice_SetClippingPtr) dlsym(hLibrary, "lib3mf_beamlattice_setclipping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_SetClipping == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetRepresentation = (PLib3MFBeamLattice_GetRepresentationPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getrepresentation"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetRepresentation = (PLib3MFBeamLattice_GetRepresentationPtr) dlsym(hLibrary, "lib3mf_beamlattice_getrepresentation"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetRepresentation == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_SetRepresentation = (PLib3MFBeamLattice_SetRepresentationPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setrepresentation"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_SetRepresentation = (PLib3MFBeamLattice_SetRepresentationPtr) dlsym(hLibrary, "lib3mf_beamlattice_setrepresentation"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_SetRepresentation == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetBallOptions = (PLib3MFBeamLattice_GetBallOptionsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getballoptions"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetBallOptions = (PLib3MFBeamLattice_GetBallOptionsPtr) dlsym(hLibrary, "lib3mf_beamlattice_getballoptions"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetBallOptions == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_SetBallOptions = (PLib3MFBeamLattice_SetBallOptionsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setballoptions"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_SetBallOptions = (PLib3MFBeamLattice_SetBallOptionsPtr) dlsym(hLibrary, "lib3mf_beamlattice_setballoptions"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_SetBallOptions == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetBeamCount = (PLib3MFBeamLattice_GetBeamCountPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getbeamcount"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetBeamCount = (PLib3MFBeamLattice_GetBeamCountPtr) dlsym(hLibrary, "lib3mf_beamlattice_getbeamcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetBeamCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetBeam = (PLib3MFBeamLattice_GetBeamPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getbeam"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetBeam = (PLib3MFBeamLattice_GetBeamPtr) dlsym(hLibrary, "lib3mf_beamlattice_getbeam"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetBeam == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_AddBeam = (PLib3MFBeamLattice_AddBeamPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_addbeam"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_AddBeam = (PLib3MFBeamLattice_AddBeamPtr) dlsym(hLibrary, "lib3mf_beamlattice_addbeam"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_AddBeam == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_SetBeam = (PLib3MFBeamLattice_SetBeamPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setbeam"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_SetBeam = (PLib3MFBeamLattice_SetBeamPtr) dlsym(hLibrary, "lib3mf_beamlattice_setbeam"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_SetBeam == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_SetBeams = (PLib3MFBeamLattice_SetBeamsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setbeams"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_SetBeams = (PLib3MFBeamLattice_SetBeamsPtr) dlsym(hLibrary, "lib3mf_beamlattice_setbeams"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_SetBeams == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetBeams = (PLib3MFBeamLattice_GetBeamsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getbeams"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetBeams = (PLib3MFBeamLattice_GetBeamsPtr) dlsym(hLibrary, "lib3mf_beamlattice_getbeams"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetBeams == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetBallCount = (PLib3MFBeamLattice_GetBallCountPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getballcount"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetBallCount = (PLib3MFBeamLattice_GetBallCountPtr) dlsym(hLibrary, "lib3mf_beamlattice_getballcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetBallCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetBall = (PLib3MFBeamLattice_GetBallPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getball"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetBall = (PLib3MFBeamLattice_GetBallPtr) dlsym(hLibrary, "lib3mf_beamlattice_getball"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetBall == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_AddBall = (PLib3MFBeamLattice_AddBallPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_addball"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_AddBall = (PLib3MFBeamLattice_AddBallPtr) dlsym(hLibrary, "lib3mf_beamlattice_addball"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_AddBall == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_SetBall = (PLib3MFBeamLattice_SetBallPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setball"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_SetBall = (PLib3MFBeamLattice_SetBallPtr) dlsym(hLibrary, "lib3mf_beamlattice_setball"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_SetBall == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_SetBalls = (PLib3MFBeamLattice_SetBallsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setballs"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_SetBalls = (PLib3MFBeamLattice_SetBallsPtr) dlsym(hLibrary, "lib3mf_beamlattice_setballs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_SetBalls == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetBalls = (PLib3MFBeamLattice_GetBallsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getballs"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetBalls = (PLib3MFBeamLattice_GetBallsPtr) dlsym(hLibrary, "lib3mf_beamlattice_getballs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetBalls == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetBeamSetCount = (PLib3MFBeamLattice_GetBeamSetCountPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getbeamsetcount"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetBeamSetCount = (PLib3MFBeamLattice_GetBeamSetCountPtr) dlsym(hLibrary, "lib3mf_beamlattice_getbeamsetcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetBeamSetCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_AddBeamSet = (PLib3MFBeamLattice_AddBeamSetPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_addbeamset"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_AddBeamSet = (PLib3MFBeamLattice_AddBeamSetPtr) dlsym(hLibrary, "lib3mf_beamlattice_addbeamset"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_AddBeamSet == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamLattice_GetBeamSet = (PLib3MFBeamLattice_GetBeamSetPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getbeamset"); + #else // _WIN32 + pWrapperTable->m_BeamLattice_GetBeamSet = (PLib3MFBeamLattice_GetBeamSetPtr) dlsym(hLibrary, "lib3mf_beamlattice_getbeamset"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamLattice_GetBeamSet == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionReference_GetFunctionResourceID = (PLib3MFFunctionReference_GetFunctionResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getfunctionresourceid"); + #else // _WIN32 + pWrapperTable->m_FunctionReference_GetFunctionResourceID = (PLib3MFFunctionReference_GetFunctionResourceIDPtr) dlsym(hLibrary, "lib3mf_functionreference_getfunctionresourceid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionReference_GetFunctionResourceID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionReference_SetFunctionResourceID = (PLib3MFFunctionReference_SetFunctionResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setfunctionresourceid"); + #else // _WIN32 + pWrapperTable->m_FunctionReference_SetFunctionResourceID = (PLib3MFFunctionReference_SetFunctionResourceIDPtr) dlsym(hLibrary, "lib3mf_functionreference_setfunctionresourceid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionReference_SetFunctionResourceID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionReference_GetTransform = (PLib3MFFunctionReference_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_gettransform"); + #else // _WIN32 + pWrapperTable->m_FunctionReference_GetTransform = (PLib3MFFunctionReference_GetTransformPtr) dlsym(hLibrary, "lib3mf_functionreference_gettransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionReference_GetTransform == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionReference_SetTransform = (PLib3MFFunctionReference_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_settransform"); + #else // _WIN32 + pWrapperTable->m_FunctionReference_SetTransform = (PLib3MFFunctionReference_SetTransformPtr) dlsym(hLibrary, "lib3mf_functionreference_settransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionReference_SetTransform == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionReference_GetChannelName = (PLib3MFFunctionReference_GetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getchannelname"); + #else // _WIN32 + pWrapperTable->m_FunctionReference_GetChannelName = (PLib3MFFunctionReference_GetChannelNamePtr) dlsym(hLibrary, "lib3mf_functionreference_getchannelname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionReference_GetChannelName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionReference_SetChannelName = (PLib3MFFunctionReference_SetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setchannelname"); + #else // _WIN32 + pWrapperTable->m_FunctionReference_SetChannelName = (PLib3MFFunctionReference_SetChannelNamePtr) dlsym(hLibrary, "lib3mf_functionreference_setchannelname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionReference_SetChannelName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionReference_SetMinFeatureSize = (PLib3MFFunctionReference_SetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setminfeaturesize"); + #else // _WIN32 + pWrapperTable->m_FunctionReference_SetMinFeatureSize = (PLib3MFFunctionReference_SetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_functionreference_setminfeaturesize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionReference_SetMinFeatureSize == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionReference_GetMinFeatureSize = (PLib3MFFunctionReference_GetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getminfeaturesize"); + #else // _WIN32 + pWrapperTable->m_FunctionReference_GetMinFeatureSize = (PLib3MFFunctionReference_GetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_functionreference_getminfeaturesize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionReference_GetMinFeatureSize == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionReference_SetFallBackValue = (PLib3MFFunctionReference_SetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setfallbackvalue"); + #else // _WIN32 + pWrapperTable->m_FunctionReference_SetFallBackValue = (PLib3MFFunctionReference_SetFallBackValuePtr) dlsym(hLibrary, "lib3mf_functionreference_setfallbackvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionReference_SetFallBackValue == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionReference_GetFallBackValue = (PLib3MFFunctionReference_GetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getfallbackvalue"); + #else // _WIN32 + pWrapperTable->m_FunctionReference_GetFallBackValue = (PLib3MFFunctionReference_GetFallBackValuePtr) dlsym(hLibrary, "lib3mf_functionreference_getfallbackvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionReference_GetFallBackValue == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = (PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getbasematerialgroup"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = (PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getbasematerialgroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = (PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_setbasematerialgroup"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = (PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_setbasematerialgroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = (PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getmaterialmappingcount"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = (PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getmaterialmappingcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = (PLib3MFVolumeDataComposite_GetMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getmaterialmapping"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = (PLib3MFVolumeDataComposite_GetMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getmaterialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_GetMaterialMapping == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = (PLib3MFVolumeDataComposite_AddMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_addmaterialmapping"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = (PLib3MFVolumeDataComposite_AddMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_addmaterialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_AddMaterialMapping == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = (PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_removematerialmapping"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = (PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_removematerialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_GetName = (PLib3MFVolumeDataProperty_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_getname"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_GetName = (PLib3MFVolumeDataProperty_GetNamePtr) dlsym(hLibrary, "lib3mf_volumedataproperty_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_GetName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_SetIsRequired = (PLib3MFVolumeDataProperty_SetIsRequiredPtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_setisrequired"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_SetIsRequired = (PLib3MFVolumeDataProperty_SetIsRequiredPtr) dlsym(hLibrary, "lib3mf_volumedataproperty_setisrequired"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_SetIsRequired == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_IsRequired = (PLib3MFVolumeDataProperty_IsRequiredPtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_isrequired"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_IsRequired = (PLib3MFVolumeDataProperty_IsRequiredPtr) dlsym(hLibrary, "lib3mf_volumedataproperty_isrequired"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_IsRequired == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetComposite = (PLib3MFVolumeData_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getcomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetComposite = (PLib3MFVolumeData_GetCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_getcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetComposite == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_CreateNewComposite = (PLib3MFVolumeData_CreateNewCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_createnewcomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_CreateNewComposite = (PLib3MFVolumeData_CreateNewCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_createnewcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_CreateNewComposite == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveComposite = (PLib3MFVolumeData_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removecomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveComposite = (PLib3MFVolumeData_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_removecomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveComposite == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetColor = (PLib3MFVolumeData_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getcolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetColor = (PLib3MFVolumeData_GetColorPtr) dlsym(hLibrary, "lib3mf_volumedata_getcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetColor == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_CreateNewColor = (PLib3MFVolumeData_CreateNewColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_createnewcolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_CreateNewColor = (PLib3MFVolumeData_CreateNewColorPtr) dlsym(hLibrary, "lib3mf_volumedata_createnewcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_CreateNewColor == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveColor = (PLib3MFVolumeData_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removecolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveColor = (PLib3MFVolumeData_RemoveColorPtr) dlsym(hLibrary, "lib3mf_volumedata_removecolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveColor == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetPropertyCount = (PLib3MFVolumeData_GetPropertyCountPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getpropertycount"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetPropertyCount = (PLib3MFVolumeData_GetPropertyCountPtr) dlsym(hLibrary, "lib3mf_volumedata_getpropertycount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetPropertyCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetProperty = (PLib3MFVolumeData_GetPropertyPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getproperty"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetProperty = (PLib3MFVolumeData_GetPropertyPtr) dlsym(hLibrary, "lib3mf_volumedata_getproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetProperty == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_AddPropertyFromFunction = (PLib3MFVolumeData_AddPropertyFromFunctionPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_addpropertyfromfunction"); + #else // _WIN32 + pWrapperTable->m_VolumeData_AddPropertyFromFunction = (PLib3MFVolumeData_AddPropertyFromFunctionPtr) dlsym(hLibrary, "lib3mf_volumedata_addpropertyfromfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_AddPropertyFromFunction == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveProperty = (PLib3MFVolumeData_RemovePropertyPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removeproperty"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveProperty = (PLib3MFVolumeData_RemovePropertyPtr) dlsym(hLibrary, "lib3mf_volumedata_removeproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveProperty == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresource"); + #else // _WIN32 + pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) dlsym(hLibrary, "lib3mf_component_getobjectresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetObjectResource == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresourceid"); + #else // _WIN32 + pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) dlsym(hLibrary, "lib3mf_component_getobjectresourceid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetObjectResourceID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getuuid"); + #else // _WIN32 + pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) dlsym(hLibrary, "lib3mf_component_getuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_setuuid"); + #else // _WIN32 + pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) dlsym(hLibrary, "lib3mf_component_setuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_SetUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_hastransform"); + #else // _WIN32 + pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) dlsym(hLibrary, "lib3mf_component_hastransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_HasTransform == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_gettransform"); + #else // _WIN32 + pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) dlsym(hLibrary, "lib3mf_component_gettransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetTransform == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_settransform"); + #else // _WIN32 + pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) dlsym(hLibrary, "lib3mf_component_settransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_SetTransform == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_addcomponent"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_addcomponent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_AddComponent == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponent"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_GetComponent == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_GetComponentCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_setname"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) dlsym(hLibrary, "lib3mf_beamset_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_getname"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) dlsym(hLibrary, "lib3mf_beamset_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setidentifier"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetIdentifier == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getidentifier"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetIdentifier == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferencecount"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getreferencecount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetReferenceCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetReferences == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetReferences == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferencecount"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferencecount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetBallReferenceCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setballreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setballreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetBallReferences == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetBallReferences == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_AddMaterial == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_removematerial"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_removematerial"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_RemoveMaterial == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getname"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setname"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_SetName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_SetDisplayColor == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetDisplayColor == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetAllPropertyIDs == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_addcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_addcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_AddColor == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_removecolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_removecolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_RemoveColor == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_setcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_setcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_SetColor == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetColor == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_AddTex2Coord == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetTex2Coord == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_RemoveTex2Coord == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetTexture2D == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcount"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) dlsym(hLibrary, "lib3mf_compositematerials_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_addcomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_addcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_AddComposite == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_removecomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_removecomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_RemoveComposite == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_getcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetComposite == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getcount"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_AddMultiProperty == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_SetMultiProperty == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetMultiProperty == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetLayerCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addlayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addlayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_AddLayer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetLayer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removelayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removelayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_RemoveLayer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_GetName = (PLib3MFImage3D_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_image3d_getname"); + #else // _WIN32 + pWrapperTable->m_Image3D_GetName = (PLib3MFImage3D_GetNamePtr) dlsym(hLibrary, "lib3mf_image3d_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_GetName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_SetName = (PLib3MFImage3D_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_image3d_setname"); + #else // _WIN32 + pWrapperTable->m_Image3D_SetName = (PLib3MFImage3D_SetNamePtr) dlsym(hLibrary, "lib3mf_image3d_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_SetName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_IsImageStack = (PLib3MFImage3D_IsImageStackPtr) GetProcAddress(hLibrary, "lib3mf_image3d_isimagestack"); + #else // _WIN32 + pWrapperTable->m_Image3D_IsImageStack = (PLib3MFImage3D_IsImageStackPtr) dlsym(hLibrary, "lib3mf_image3d_isimagestack"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_IsImageStack == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetRowCount = (PLib3MFImageStack_GetRowCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getrowcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetRowCount = (PLib3MFImageStack_GetRowCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getrowcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetRowCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetRowCount = (PLib3MFImageStack_SetRowCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setrowcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetRowCount = (PLib3MFImageStack_SetRowCountPtr) dlsym(hLibrary, "lib3mf_imagestack_setrowcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetRowCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetColumnCount = (PLib3MFImageStack_GetColumnCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getcolumncount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetColumnCount = (PLib3MFImageStack_GetColumnCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getcolumncount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetColumnCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetColumnCount = (PLib3MFImageStack_SetColumnCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setcolumncount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetColumnCount = (PLib3MFImageStack_SetColumnCountPtr) dlsym(hLibrary, "lib3mf_imagestack_setcolumncount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetColumnCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetSheetCount = (PLib3MFImageStack_GetSheetCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getsheetcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetSheetCount = (PLib3MFImageStack_GetSheetCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getsheetcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetSheetCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetSheet = (PLib3MFImageStack_GetSheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getsheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetSheet = (PLib3MFImageStack_GetSheetPtr) dlsym(hLibrary, "lib3mf_imagestack_getsheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetSheet == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetSheet = (PLib3MFImageStack_SetSheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setsheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetSheet = (PLib3MFImageStack_SetSheetPtr) dlsym(hLibrary, "lib3mf_imagestack_setsheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetSheet == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateEmptySheet = (PLib3MFImageStack_CreateEmptySheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createemptysheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateEmptySheet = (PLib3MFImageStack_CreateEmptySheetPtr) dlsym(hLibrary, "lib3mf_imagestack_createemptysheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateEmptySheet == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = (PLib3MFImageStack_CreateSheetFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createsheetfrombuffer"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = (PLib3MFImageStack_CreateSheetFromBufferPtr) dlsym(hLibrary, "lib3mf_imagestack_createsheetfrombuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateSheetFromBuffer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromFile = (PLib3MFImageStack_CreateSheetFromFilePtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createsheetfromfile"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromFile = (PLib3MFImageStack_CreateSheetFromFilePtr) dlsym(hLibrary, "lib3mf_imagestack_createsheetfromfile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateSheetFromFile == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_getpath"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) dlsym(hLibrary, "lib3mf_attachment_getpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetPath == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_setpath"); + #else // _WIN32 + pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) dlsym(hLibrary, "lib3mf_attachment_setpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_SetPath == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) GetProcAddress(hLibrary, "lib3mf_attachment_packagepart"); + #else // _WIN32 + pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) dlsym(hLibrary, "lib3mf_attachment_packagepart"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_PackagePart == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getrelationshiptype"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_getrelationshiptype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetRelationShipType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_setrelationshiptype"); + #else // _WIN32 + pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_setrelationshiptype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_SetRelationShipType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetofile"); + #else // _WIN32 + pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) dlsym(hLibrary, "lib3mf_attachment_writetofile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_WriteToFile == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromfile"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) dlsym(hLibrary, "lib3mf_attachment_readfromfile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromFile == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromcallback"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) dlsym(hLibrary, "lib3mf_attachment_readfromcallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromCallback == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getstreamsize"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) dlsym(hLibrary, "lib3mf_attachment_getstreamsize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetStreamSize == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetobuffer"); + #else // _WIN32 + pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) dlsym(hLibrary, "lib3mf_attachment_writetobuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_WriteToBuffer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfrombuffer"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) dlsym(hLibrary, "lib3mf_attachment_readfrombuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromBuffer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getattachment"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_getattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setattachment"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_setattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getcontenttype"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_getcontenttype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetContentType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setcontenttype"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_setcontenttype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetContentType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetTileStyleUV == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_settilestyleuv"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_settilestyleuv"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetTileStyleUV == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getfilter"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_getfilter"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetFilter == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setfilter"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_setfilter"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetFilter == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetIdentifier = (PLib3MFImplicitPort_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetIdentifier = (PLib3MFImplicitPort_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitport_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetIdentifier == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetIdentifier = (PLib3MFImplicitPort_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetIdentifier = (PLib3MFImplicitPort_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitport_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetIdentifier == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetDisplayName = (PLib3MFImplicitPort_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetDisplayName = (PLib3MFImplicitPort_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitport_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetDisplayName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetDisplayName = (PLib3MFImplicitPort_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetDisplayName = (PLib3MFImplicitPort_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitport_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetDisplayName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetType = (PLib3MFImplicitPort_SetTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_settype"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetType = (PLib3MFImplicitPort_SetTypePtr) dlsym(hLibrary, "lib3mf_implicitport_settype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetType = (PLib3MFImplicitPort_GetTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_gettype"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetType = (PLib3MFImplicitPort_GetTypePtr) dlsym(hLibrary, "lib3mf_implicitport_gettype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetReference = (PLib3MFImplicitPort_GetReferencePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getreference"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetReference = (PLib3MFImplicitPort_GetReferencePtr) dlsym(hLibrary, "lib3mf_implicitport_getreference"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetReference == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetReference = (PLib3MFImplicitPort_SetReferencePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setreference"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetReference = (PLib3MFImplicitPort_SetReferencePtr) dlsym(hLibrary, "lib3mf_implicitport_setreference"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetReference == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_MoveNext = (PLib3MFIterator_MoveNextPtr) GetProcAddress(hLibrary, "lib3mf_iterator_movenext"); + #else // _WIN32 + pWrapperTable->m_Iterator_MoveNext = (PLib3MFIterator_MoveNextPtr) dlsym(hLibrary, "lib3mf_iterator_movenext"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_MoveNext == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_MovePrevious = (PLib3MFIterator_MovePreviousPtr) GetProcAddress(hLibrary, "lib3mf_iterator_moveprevious"); + #else // _WIN32 + pWrapperTable->m_Iterator_MovePrevious = (PLib3MFIterator_MovePreviousPtr) dlsym(hLibrary, "lib3mf_iterator_moveprevious"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_MovePrevious == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_Count = (PLib3MFIterator_CountPtr) GetProcAddress(hLibrary, "lib3mf_iterator_count"); + #else // _WIN32 + pWrapperTable->m_Iterator_Count = (PLib3MFIterator_CountPtr) dlsym(hLibrary, "lib3mf_iterator_count"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_Count == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPortIterator_GetCurrent = (PLib3MFImplicitPortIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_implicitportiterator_getcurrent"); + #else // _WIN32 + pWrapperTable->m_ImplicitPortIterator_GetCurrent = (PLib3MFImplicitPortIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_implicitportiterator_getcurrent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPortIterator_GetCurrent == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetIdentifier = (PLib3MFImplicitNode_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetIdentifier = (PLib3MFImplicitNode_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitnode_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetIdentifier == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetIdentifier = (PLib3MFImplicitNode_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetIdentifier = (PLib3MFImplicitNode_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitnode_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetIdentifier == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetDisplayName = (PLib3MFImplicitNode_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetDisplayName = (PLib3MFImplicitNode_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitnode_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetDisplayName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetDisplayName = (PLib3MFImplicitNode_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetDisplayName = (PLib3MFImplicitNode_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitnode_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetDisplayName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetTag = (PLib3MFImplicitNode_GetTagPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_gettag"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetTag = (PLib3MFImplicitNode_GetTagPtr) dlsym(hLibrary, "lib3mf_implicitnode_gettag"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetTag == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetTag = (PLib3MFImplicitNode_SetTagPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_settag"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetTag = (PLib3MFImplicitNode_SetTagPtr) dlsym(hLibrary, "lib3mf_implicitnode_settag"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetTag == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetNodeType = (PLib3MFImplicitNode_GetNodeTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getnodetype"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetNodeType = (PLib3MFImplicitNode_GetNodeTypePtr) dlsym(hLibrary, "lib3mf_implicitnode_getnodetype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetNodeType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AddInput = (PLib3MFImplicitNode_AddInputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_addinput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AddInput = (PLib3MFImplicitNode_AddInputPtr) dlsym(hLibrary, "lib3mf_implicitnode_addinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AddInput == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetInputs = (PLib3MFImplicitNode_GetInputsPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getinputs"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetInputs = (PLib3MFImplicitNode_GetInputsPtr) dlsym(hLibrary, "lib3mf_implicitnode_getinputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetInputs == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AddOutput = (PLib3MFImplicitNode_AddOutputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_addoutput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AddOutput = (PLib3MFImplicitNode_AddOutputPtr) dlsym(hLibrary, "lib3mf_implicitnode_addoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AddOutput == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetOutputs = (PLib3MFImplicitNode_GetOutputsPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getoutputs"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetOutputs = (PLib3MFImplicitNode_GetOutputsPtr) dlsym(hLibrary, "lib3mf_implicitnode_getoutputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetOutputs == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_FindInput = (PLib3MFImplicitNode_FindInputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_findinput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_FindInput = (PLib3MFImplicitNode_FindInputPtr) dlsym(hLibrary, "lib3mf_implicitnode_findinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_FindInput == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_FindOutput = (PLib3MFImplicitNode_FindOutputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_findoutput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_FindOutput = (PLib3MFImplicitNode_FindOutputPtr) dlsym(hLibrary, "lib3mf_implicitnode_findoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_FindOutput == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AreTypesValid = (PLib3MFImplicitNode_AreTypesValidPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_aretypesvalid"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AreTypesValid = (PLib3MFImplicitNode_AreTypesValidPtr) dlsym(hLibrary, "lib3mf_implicitnode_aretypesvalid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AreTypesValid == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_OneInputNode_GetInputA = (PLib3MFOneInputNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_oneinputnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_OneInputNode_GetInputA = (PLib3MFOneInputNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_oneinputnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_OneInputNode_GetInputA == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_OneInputNode_GetOutputResult = (PLib3MFOneInputNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_oneinputnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_OneInputNode_GetOutputResult = (PLib3MFOneInputNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_oneinputnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_OneInputNode_GetOutputResult == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_SetResource = (PLib3MFResourceIdNode_SetResourcePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_setresource"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_SetResource = (PLib3MFResourceIdNode_SetResourcePtr) dlsym(hLibrary, "lib3mf_resourceidnode_setresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_SetResource == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_GetResource = (PLib3MFResourceIdNode_GetResourcePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_getresource"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_GetResource = (PLib3MFResourceIdNode_GetResourcePtr) dlsym(hLibrary, "lib3mf_resourceidnode_getresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_GetResource == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_GetOutputValue = (PLib3MFResourceIdNode_GetOutputValuePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_getoutputvalue"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_GetOutputValue = (PLib3MFResourceIdNode_GetOutputValuePtr) dlsym(hLibrary, "lib3mf_resourceidnode_getoutputvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_GetOutputValue == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_TwoInputNode_GetInputB = (PLib3MFTwoInputNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_twoinputnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_TwoInputNode_GetInputB = (PLib3MFTwoInputNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_twoinputnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_TwoInputNode_GetInputB == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputB = (PLib3MFSelectNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputB = (PLib3MFSelectNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputB == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputC = (PLib3MFSelectNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputC = (PLib3MFSelectNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputC == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputD = (PLib3MFSelectNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputD = (PLib3MFSelectNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputD == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ClampNode_GetInputMin = (PLib3MFClampNode_GetInputMinPtr) GetProcAddress(hLibrary, "lib3mf_clampnode_getinputmin"); + #else // _WIN32 + pWrapperTable->m_ClampNode_GetInputMin = (PLib3MFClampNode_GetInputMinPtr) dlsym(hLibrary, "lib3mf_clampnode_getinputmin"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ClampNode_GetInputMin == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ClampNode_GetInputMax = (PLib3MFClampNode_GetInputMaxPtr) GetProcAddress(hLibrary, "lib3mf_clampnode_getinputmax"); + #else // _WIN32 + pWrapperTable->m_ClampNode_GetInputMax = (PLib3MFClampNode_GetInputMaxPtr) dlsym(hLibrary, "lib3mf_clampnode_getinputmax"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ClampNode_GetInputMax == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputX = (PLib3MFComposeVectorNode_GetInputXPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputx"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputX = (PLib3MFComposeVectorNode_GetInputXPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputx"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputX == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputY = (PLib3MFComposeVectorNode_GetInputYPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputy"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputY = (PLib3MFComposeVectorNode_GetInputYPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputy"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputY == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputZ = (PLib3MFComposeVectorNode_GetInputZPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputz"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputZ = (PLib3MFComposeVectorNode_GetInputZPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputz"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputZ == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetOutputResult = (PLib3MFComposeVectorNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetOutputResult = (PLib3MFComposeVectorNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_composevectornode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetOutputResult == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetInputA = (PLib3MFDecomposeVectorNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getinputa"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetInputA = (PLib3MFDecomposeVectorNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetInputA == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputX = (PLib3MFDecomposeVectorNode_GetOutputXPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputx"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputX = (PLib3MFDecomposeVectorNode_GetOutputXPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputx"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputX == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputY = (PLib3MFDecomposeVectorNode_GetOutputYPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputy"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputY = (PLib3MFDecomposeVectorNode_GetOutputYPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputy"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputY == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = (PLib3MFDecomposeVectorNode_GetOutputZPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputz"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = (PLib3MFDecomposeVectorNode_GetOutputZPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputz"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputZ == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = (PLib3MFComposeMatrixNode_GetInputM00Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm00"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = (PLib3MFComposeMatrixNode_GetInputM00Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm00"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM00 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = (PLib3MFComposeMatrixNode_GetInputM01Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm01"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = (PLib3MFComposeMatrixNode_GetInputM01Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm01"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM01 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = (PLib3MFComposeMatrixNode_GetInputM02Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm02"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = (PLib3MFComposeMatrixNode_GetInputM02Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm02"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM02 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = (PLib3MFComposeMatrixNode_GetInputM03Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm03"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = (PLib3MFComposeMatrixNode_GetInputM03Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm03"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM03 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = (PLib3MFComposeMatrixNode_GetInputM10Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm10"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = (PLib3MFComposeMatrixNode_GetInputM10Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm10"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM10 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = (PLib3MFComposeMatrixNode_GetInputM11Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm11"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = (PLib3MFComposeMatrixNode_GetInputM11Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm11"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM11 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = (PLib3MFComposeMatrixNode_GetInputM12Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm12"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = (PLib3MFComposeMatrixNode_GetInputM12Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm12"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM12 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = (PLib3MFComposeMatrixNode_GetInputM13Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm13"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = (PLib3MFComposeMatrixNode_GetInputM13Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm13"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM13 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = (PLib3MFComposeMatrixNode_GetInputM20Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm20"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = (PLib3MFComposeMatrixNode_GetInputM20Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm20"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM20 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = (PLib3MFComposeMatrixNode_GetInputM21Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm21"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = (PLib3MFComposeMatrixNode_GetInputM21Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm21"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM21 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = (PLib3MFComposeMatrixNode_GetInputM22Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm22"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = (PLib3MFComposeMatrixNode_GetInputM22Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm22"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM22 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = (PLib3MFComposeMatrixNode_GetInputM23Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm23"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = (PLib3MFComposeMatrixNode_GetInputM23Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm23"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM23 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = (PLib3MFComposeMatrixNode_GetInputM30Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm30"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = (PLib3MFComposeMatrixNode_GetInputM30Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm30"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM30 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = (PLib3MFComposeMatrixNode_GetInputM31Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm31"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = (PLib3MFComposeMatrixNode_GetInputM31Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm31"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM31 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = (PLib3MFComposeMatrixNode_GetInputM32Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm32"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = (PLib3MFComposeMatrixNode_GetInputM32Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm32"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM32 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = (PLib3MFComposeMatrixNode_GetInputM33Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm33"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = (PLib3MFComposeMatrixNode_GetInputM33Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm33"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM33 == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = (PLib3MFComposeMatrixNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = (PLib3MFComposeMatrixNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_composematrixnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetOutputResult == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputA = (PLib3MFMatrixFromRowsNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputA = (PLib3MFMatrixFromRowsNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputA == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputB = (PLib3MFMatrixFromRowsNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputB = (PLib3MFMatrixFromRowsNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputB == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputC = (PLib3MFMatrixFromRowsNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputC = (PLib3MFMatrixFromRowsNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputC == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputD = (PLib3MFMatrixFromRowsNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputD = (PLib3MFMatrixFromRowsNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputD == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = (PLib3MFMatrixFromRowsNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = (PLib3MFMatrixFromRowsNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetOutputResult == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = (PLib3MFMatrixFromColumnsNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = (PLib3MFMatrixFromColumnsNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputA == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = (PLib3MFMatrixFromColumnsNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = (PLib3MFMatrixFromColumnsNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputB == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = (PLib3MFMatrixFromColumnsNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = (PLib3MFMatrixFromColumnsNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputC == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = (PLib3MFMatrixFromColumnsNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = (PLib3MFMatrixFromColumnsNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputD == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = (PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = (PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_SetConstant = (PLib3MFConstantNode_SetConstantPtr) GetProcAddress(hLibrary, "lib3mf_constantnode_setconstant"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_SetConstant = (PLib3MFConstantNode_SetConstantPtr) dlsym(hLibrary, "lib3mf_constantnode_setconstant"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_SetConstant == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_GetConstant = (PLib3MFConstantNode_GetConstantPtr) GetProcAddress(hLibrary, "lib3mf_constantnode_getconstant"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_GetConstant = (PLib3MFConstantNode_GetConstantPtr) dlsym(hLibrary, "lib3mf_constantnode_getconstant"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_GetConstant == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_GetOutputValue = (PLib3MFConstantNode_GetOutputValuePtr) GetProcAddress(hLibrary, "lib3mf_constantnode_getoutputvalue"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_GetOutputValue = (PLib3MFConstantNode_GetOutputValuePtr) dlsym(hLibrary, "lib3mf_constantnode_getoutputvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_GetOutputValue == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_SetVector = (PLib3MFConstVecNode_SetVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_setvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_SetVector = (PLib3MFConstVecNode_SetVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_setvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_SetVector == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_GetVector = (PLib3MFConstVecNode_GetVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_getvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_GetVector = (PLib3MFConstVecNode_GetVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_getvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_GetVector == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_GetOutputVector = (PLib3MFConstVecNode_GetOutputVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_getoutputvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_GetOutputVector = (PLib3MFConstVecNode_GetOutputVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_getoutputvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_GetOutputVector == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_SetMatrix = (PLib3MFConstMatNode_SetMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_setmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_SetMatrix = (PLib3MFConstMatNode_SetMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_setmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_SetMatrix == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_GetMatrix = (PLib3MFConstMatNode_GetMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_getmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_GetMatrix = (PLib3MFConstMatNode_GetMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_getmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_GetMatrix == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_GetOutputMatrix = (PLib3MFConstMatNode_GetOutputMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_getoutputmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_GetOutputMatrix = (PLib3MFConstMatNode_GetOutputMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_getoutputmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_GetOutputMatrix == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetInputMesh = (PLib3MFMeshNode_GetInputMeshPtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getinputmesh"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetInputMesh = (PLib3MFMeshNode_GetInputMeshPtr) dlsym(hLibrary, "lib3mf_meshnode_getinputmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetInputMesh == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetInputPos = (PLib3MFMeshNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetInputPos = (PLib3MFMeshNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_meshnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetInputPos == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetOutputDistance = (PLib3MFMeshNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetOutputDistance = (PLib3MFMeshNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_meshnode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetOutputDistance == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = (PLib3MFUnsignedMeshNode_GetInputMeshPtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getinputmesh"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = (PLib3MFUnsignedMeshNode_GetInputMeshPtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getinputmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetInputMesh == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputPos = (PLib3MFUnsignedMeshNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputPos = (PLib3MFUnsignedMeshNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetInputPos == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = (PLib3MFUnsignedMeshNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = (PLib3MFUnsignedMeshNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetOutputDistance == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionCallNode_GetInputFunctionID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NodeIterator_GetCurrent = (PLib3MFNodeIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_nodeiterator_getcurrent"); + #else // _WIN32 + pWrapperTable->m_NodeIterator_GetCurrent = (PLib3MFNodeIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_nodeiterator_getcurrent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NodeIterator_GetCurrent == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetDisplayName = (PLib3MFFunction_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_function_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_Function_GetDisplayName = (PLib3MFFunction_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_function_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetDisplayName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_SetDisplayName = (PLib3MFFunction_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_function_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_Function_SetDisplayName = (PLib3MFFunction_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_function_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_SetDisplayName == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_AddInput = (PLib3MFFunction_AddInputPtr) GetProcAddress(hLibrary, "lib3mf_function_addinput"); + #else // _WIN32 + pWrapperTable->m_Function_AddInput = (PLib3MFFunction_AddInputPtr) dlsym(hLibrary, "lib3mf_function_addinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_AddInput == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetInputs = (PLib3MFFunction_GetInputsPtr) GetProcAddress(hLibrary, "lib3mf_function_getinputs"); + #else // _WIN32 + pWrapperTable->m_Function_GetInputs = (PLib3MFFunction_GetInputsPtr) dlsym(hLibrary, "lib3mf_function_getinputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetInputs == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_RemoveInput = (PLib3MFFunction_RemoveInputPtr) GetProcAddress(hLibrary, "lib3mf_function_removeinput"); + #else // _WIN32 + pWrapperTable->m_Function_RemoveInput = (PLib3MFFunction_RemoveInputPtr) dlsym(hLibrary, "lib3mf_function_removeinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_RemoveInput == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_AddOutput = (PLib3MFFunction_AddOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_addoutput"); + #else // _WIN32 + pWrapperTable->m_Function_AddOutput = (PLib3MFFunction_AddOutputPtr) dlsym(hLibrary, "lib3mf_function_addoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_AddOutput == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetOutputs = (PLib3MFFunction_GetOutputsPtr) GetProcAddress(hLibrary, "lib3mf_function_getoutputs"); + #else // _WIN32 + pWrapperTable->m_Function_GetOutputs = (PLib3MFFunction_GetOutputsPtr) dlsym(hLibrary, "lib3mf_function_getoutputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetOutputs == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_RemoveOutput = (PLib3MFFunction_RemoveOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_removeoutput"); + #else // _WIN32 + pWrapperTable->m_Function_RemoveOutput = (PLib3MFFunction_RemoveOutputPtr) dlsym(hLibrary, "lib3mf_function_removeoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_RemoveOutput == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_FindInput = (PLib3MFFunction_FindInputPtr) GetProcAddress(hLibrary, "lib3mf_function_findinput"); + #else // _WIN32 + pWrapperTable->m_Function_FindInput = (PLib3MFFunction_FindInputPtr) dlsym(hLibrary, "lib3mf_function_findinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_FindInput == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_FindOutput = (PLib3MFFunction_FindOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_findoutput"); + #else // _WIN32 + pWrapperTable->m_Function_FindOutput = (PLib3MFFunction_FindOutputPtr) dlsym(hLibrary, "lib3mf_function_findoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_FindOutput == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_GetIdentifier = (PLib3MFImplicitFunction_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_GetIdentifier = (PLib3MFImplicitFunction_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitfunction_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_GetIdentifier == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_SetIdentifier = (PLib3MFImplicitFunction_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_SetIdentifier = (PLib3MFImplicitFunction_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitfunction_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_SetIdentifier == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddNode = (PLib3MFImplicitFunction_AddNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddNode = (PLib3MFImplicitFunction_AddNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddSinNode = (PLib3MFImplicitFunction_AddSinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsinnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddSinNode = (PLib3MFImplicitFunction_AddSinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsinnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddSinNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddCosNode = (PLib3MFImplicitFunction_AddCosNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcosnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddCosNode = (PLib3MFImplicitFunction_AddCosNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcosnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddCosNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddTanNode = (PLib3MFImplicitFunction_AddTanNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtannode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddTanNode = (PLib3MFImplicitFunction_AddTanNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtannode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddTanNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcSinNode = (PLib3MFImplicitFunction_AddArcSinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarcsinnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcSinNode = (PLib3MFImplicitFunction_AddArcSinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarcsinnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddArcSinNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcCosNode = (PLib3MFImplicitFunction_AddArcCosNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarccosnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcCosNode = (PLib3MFImplicitFunction_AddArcCosNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarccosnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddArcCosNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = (PLib3MFImplicitFunction_AddArcTan2NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarctan2node"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = (PLib3MFImplicitFunction_AddArcTan2NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarctan2node"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddArcTan2Node == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddSinhNode = (PLib3MFImplicitFunction_AddSinhNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsinhnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddSinhNode = (PLib3MFImplicitFunction_AddSinhNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsinhnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddSinhNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddCoshNode = (PLib3MFImplicitFunction_AddCoshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcoshnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddCoshNode = (PLib3MFImplicitFunction_AddCoshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcoshnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddCoshNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddTanhNode = (PLib3MFImplicitFunction_AddTanhNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtanhnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddTanhNode = (PLib3MFImplicitFunction_AddTanhNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtanhnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddTanhNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddRoundNode = (PLib3MFImplicitFunction_AddRoundNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addroundnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddRoundNode = (PLib3MFImplicitFunction_AddRoundNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addroundnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddRoundNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddCeilNode = (PLib3MFImplicitFunction_AddCeilNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addceilnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddCeilNode = (PLib3MFImplicitFunction_AddCeilNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addceilnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddCeilNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddFloorNode = (PLib3MFImplicitFunction_AddFloorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfloornode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddFloorNode = (PLib3MFImplicitFunction_AddFloorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfloornode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddFloorNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddSignNode = (PLib3MFImplicitFunction_AddSignNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsignnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddSignNode = (PLib3MFImplicitFunction_AddSignNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsignnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddSignNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddFractNode = (PLib3MFImplicitFunction_AddFractNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfractnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddFractNode = (PLib3MFImplicitFunction_AddFractNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfractnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddFractNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddAbsNode = (PLib3MFImplicitFunction_AddAbsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addabsnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddAbsNode = (PLib3MFImplicitFunction_AddAbsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addabsnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddAbsNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddExpNode = (PLib3MFImplicitFunction_AddExpNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addexpnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddExpNode = (PLib3MFImplicitFunction_AddExpNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addexpnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddExpNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddLogNode = (PLib3MFImplicitFunction_AddLogNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlognode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddLogNode = (PLib3MFImplicitFunction_AddLogNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlognode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddLogNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddLog2Node = (PLib3MFImplicitFunction_AddLog2NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlog2node"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddLog2Node = (PLib3MFImplicitFunction_AddLog2NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlog2node"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddLog2Node == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddLog10Node = (PLib3MFImplicitFunction_AddLog10NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlog10node"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddLog10Node = (PLib3MFImplicitFunction_AddLog10NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlog10node"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddLog10Node == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddLengthNode = (PLib3MFImplicitFunction_AddLengthNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlengthnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddLengthNode = (PLib3MFImplicitFunction_AddLengthNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlengthnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddLengthNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddTransposeNode = (PLib3MFImplicitFunction_AddTransposeNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtransposenode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddTransposeNode = (PLib3MFImplicitFunction_AddTransposeNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtransposenode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddTransposeNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_InverseNode = (PLib3MFImplicitFunction_InverseNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_inversenode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_InverseNode = (PLib3MFImplicitFunction_InverseNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_inversenode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_InverseNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddSqrtNode = (PLib3MFImplicitFunction_AddSqrtNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsqrtnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddSqrtNode = (PLib3MFImplicitFunction_AddSqrtNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsqrtnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddSqrtNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = (PLib3MFImplicitFunction_AddResourceIdNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addresourceidnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = (PLib3MFImplicitFunction_AddResourceIdNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addresourceidnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddResourceIdNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddAdditionNode = (PLib3MFImplicitFunction_AddAdditionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addadditionnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddAdditionNode = (PLib3MFImplicitFunction_AddAdditionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addadditionnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddAdditionNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = (PLib3MFImplicitFunction_AddSubtractionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsubtractionnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = (PLib3MFImplicitFunction_AddSubtractionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsubtractionnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddSubtractionNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = (PLib3MFImplicitFunction_AddMultiplicationNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmultiplicationnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = (PLib3MFImplicitFunction_AddMultiplicationNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmultiplicationnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddMultiplicationNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddDivisionNode = (PLib3MFImplicitFunction_AddDivisionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddivisionnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddDivisionNode = (PLib3MFImplicitFunction_AddDivisionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddivisionnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddDivisionNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddDotNode = (PLib3MFImplicitFunction_AddDotNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddotnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddDotNode = (PLib3MFImplicitFunction_AddDotNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddotnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddDotNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddCrossNode = (PLib3MFImplicitFunction_AddCrossNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcrossnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddCrossNode = (PLib3MFImplicitFunction_AddCrossNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcrossnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddCrossNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = (PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatvecmultiplicationnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = (PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatvecmultiplicationnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddMinNode = (PLib3MFImplicitFunction_AddMinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addminnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddMinNode = (PLib3MFImplicitFunction_AddMinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addminnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddMinNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddMaxNode = (PLib3MFImplicitFunction_AddMaxNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmaxnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddMaxNode = (PLib3MFImplicitFunction_AddMaxNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmaxnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddMaxNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddFmodNode = (PLib3MFImplicitFunction_AddFmodNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfmodnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddFmodNode = (PLib3MFImplicitFunction_AddFmodNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfmodnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddFmodNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddPowNode = (PLib3MFImplicitFunction_AddPowNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addpownode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddPowNode = (PLib3MFImplicitFunction_AddPowNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addpownode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddPowNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddSelectNode = (PLib3MFImplicitFunction_AddSelectNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addselectnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddSelectNode = (PLib3MFImplicitFunction_AddSelectNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addselectnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddSelectNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddClampNode = (PLib3MFImplicitFunction_AddClampNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addclampnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddClampNode = (PLib3MFImplicitFunction_AddClampNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addclampnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddClampNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = (PLib3MFImplicitFunction_AddComposeVectorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcomposevectornode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = (PLib3MFImplicitFunction_AddComposeVectorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcomposevectornode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddComposeVectorNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = (PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addvectorfromscalarnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = (PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addvectorfromscalarnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = (PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddecomposevectornode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = (PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddecomposevectornode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = (PLib3MFImplicitFunction_AddComposeMatrixNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcomposematrixnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = (PLib3MFImplicitFunction_AddComposeMatrixNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcomposematrixnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = (PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatrixfromrowsnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = (PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatrixfromrowsnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = (PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatrixfromcolumnsnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = (PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatrixfromcolumnsnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddConstantNode = (PLib3MFImplicitFunction_AddConstantNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstantnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddConstantNode = (PLib3MFImplicitFunction_AddConstantNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstantnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddConstantNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddConstVecNode = (PLib3MFImplicitFunction_AddConstVecNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstvecnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddConstVecNode = (PLib3MFImplicitFunction_AddConstVecNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstvecnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddConstVecNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddConstMatNode = (PLib3MFImplicitFunction_AddConstMatNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstmatnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddConstMatNode = (PLib3MFImplicitFunction_AddConstMatNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstmatnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddConstMatNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddMeshNode = (PLib3MFImplicitFunction_AddMeshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmeshnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddMeshNode = (PLib3MFImplicitFunction_AddMeshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmeshnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddMeshNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = (PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addunsignedmeshnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = (PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addunsignedmeshnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddFunctionCallNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_GetNodes = (PLib3MFImplicitFunction_GetNodesPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_getnodes"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_GetNodes = (PLib3MFImplicitFunction_GetNodesPtr) dlsym(hLibrary, "lib3mf_implicitfunction_getnodes"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_GetNodes == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_RemoveNode = (PLib3MFImplicitFunction_RemoveNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_removenode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_RemoveNode = (PLib3MFImplicitFunction_RemoveNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_removenode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_RemoveNode == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddLink = (PLib3MFImplicitFunction_AddLinkPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlink"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddLink = (PLib3MFImplicitFunction_AddLinkPtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlink"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddLink == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddLinkByNames = (PLib3MFImplicitFunction_AddLinkByNamesPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlinkbynames"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddLinkByNames = (PLib3MFImplicitFunction_AddLinkByNamesPtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlinkbynames"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddLinkByNames == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_Clear = (PLib3MFImplicitFunction_ClearPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_clear"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_Clear = (PLib3MFImplicitFunction_ClearPtr) dlsym(hLibrary, "lib3mf_implicitfunction_clear"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_Clear == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = (PLib3MFImplicitFunction_SortNodesTopologicallyPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_sortnodestopologically"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = (PLib3MFImplicitFunction_SortNodesTopologicallyPtr) dlsym(hLibrary, "lib3mf_implicitfunction_sortnodestopologically"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_SortNodesTopologically == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionFromImage3D_GetImage3D = (PLib3MFFunctionFromImage3D_GetImage3DPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getimage3d"); + #else // _WIN32 + pWrapperTable->m_FunctionFromImage3D_GetImage3D = (PLib3MFFunctionFromImage3D_GetImage3DPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getimage3d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionFromImage3D_GetImage3D == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionFromImage3D_SetImage3D = (PLib3MFFunctionFromImage3D_SetImage3DPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setimage3d"); + #else // _WIN32 + pWrapperTable->m_FunctionFromImage3D_SetImage3D = (PLib3MFFunctionFromImage3D_SetImage3DPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setimage3d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionFromImage3D_SetImage3D == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionFromImage3D_SetFilter = (PLib3MFFunctionFromImage3D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setfilter"); + #else // _WIN32 + pWrapperTable->m_FunctionFromImage3D_SetFilter = (PLib3MFFunctionFromImage3D_SetFilterPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setfilter"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionFromImage3D_SetFilter == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionFromImage3D_GetFilter = (PLib3MFFunctionFromImage3D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getfilter"); + #else // _WIN32 + pWrapperTable->m_FunctionFromImage3D_GetFilter = (PLib3MFFunctionFromImage3D_GetFilterPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getfilter"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionFromImage3D_GetFilter == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = (PLib3MFFunctionFromImage3D_SetTileStylesPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_settilestyles"); + #else // _WIN32 + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = (PLib3MFFunctionFromImage3D_SetTileStylesPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_settilestyles"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionFromImage3D_SetTileStyles == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = (PLib3MFFunctionFromImage3D_GetTileStylesPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_gettilestyles"); + #else // _WIN32 + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = (PLib3MFFunctionFromImage3D_GetTileStylesPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_gettilestyles"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionFromImage3D_GetTileStyles == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionFromImage3D_GetOffset = (PLib3MFFunctionFromImage3D_GetOffsetPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getoffset"); + #else // _WIN32 + pWrapperTable->m_FunctionFromImage3D_GetOffset = (PLib3MFFunctionFromImage3D_GetOffsetPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getoffset"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionFromImage3D_GetOffset == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionFromImage3D_SetOffset = (PLib3MFFunctionFromImage3D_SetOffsetPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setoffset"); + #else // _WIN32 + pWrapperTable->m_FunctionFromImage3D_SetOffset = (PLib3MFFunctionFromImage3D_SetOffsetPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setoffset"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionFromImage3D_SetOffset == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionFromImage3D_GetScale = (PLib3MFFunctionFromImage3D_GetScalePtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getscale"); + #else // _WIN32 + pWrapperTable->m_FunctionFromImage3D_GetScale = (PLib3MFFunctionFromImage3D_GetScalePtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getscale"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionFromImage3D_GetScale == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionFromImage3D_SetScale = (PLib3MFFunctionFromImage3D_SetScalePtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setscale"); + #else // _WIN32 + pWrapperTable->m_FunctionFromImage3D_SetScale = (PLib3MFFunctionFromImage3D_SetScalePtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setscale"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionFromImage3D_SetScale == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItem_GetObjectResource = (PLib3MFBuildItem_GetObjectResourcePtr) GetProcAddress(hLibrary, "lib3mf_builditem_getobjectresource"); + #else // _WIN32 + pWrapperTable->m_BuildItem_GetObjectResource = (PLib3MFBuildItem_GetObjectResourcePtr) dlsym(hLibrary, "lib3mf_builditem_getobjectresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItem_GetObjectResource == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItem_GetUUID = (PLib3MFBuildItem_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getuuid"); + #else // _WIN32 + pWrapperTable->m_BuildItem_GetUUID = (PLib3MFBuildItem_GetUUIDPtr) dlsym(hLibrary, "lib3mf_builditem_getuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItem_GetUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItem_SetUUID = (PLib3MFBuildItem_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_builditem_setuuid"); + #else // _WIN32 + pWrapperTable->m_BuildItem_SetUUID = (PLib3MFBuildItem_SetUUIDPtr) dlsym(hLibrary, "lib3mf_builditem_setuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItem_SetUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItem_GetObjectResourceID = (PLib3MFBuildItem_GetObjectResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getobjectresourceid"); + #else // _WIN32 + pWrapperTable->m_BuildItem_GetObjectResourceID = (PLib3MFBuildItem_GetObjectResourceIDPtr) dlsym(hLibrary, "lib3mf_builditem_getobjectresourceid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItem_GetObjectResourceID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItem_HasObjectTransform = (PLib3MFBuildItem_HasObjectTransformPtr) GetProcAddress(hLibrary, "lib3mf_builditem_hasobjecttransform"); + #else // _WIN32 + pWrapperTable->m_BuildItem_HasObjectTransform = (PLib3MFBuildItem_HasObjectTransformPtr) dlsym(hLibrary, "lib3mf_builditem_hasobjecttransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItem_HasObjectTransform == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItem_GetObjectTransform = (PLib3MFBuildItem_GetObjectTransformPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getobjecttransform"); + #else // _WIN32 + pWrapperTable->m_BuildItem_GetObjectTransform = (PLib3MFBuildItem_GetObjectTransformPtr) dlsym(hLibrary, "lib3mf_builditem_getobjecttransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItem_GetObjectTransform == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItem_SetObjectTransform = (PLib3MFBuildItem_SetObjectTransformPtr) GetProcAddress(hLibrary, "lib3mf_builditem_setobjecttransform"); + #else // _WIN32 + pWrapperTable->m_BuildItem_SetObjectTransform = (PLib3MFBuildItem_SetObjectTransformPtr) dlsym(hLibrary, "lib3mf_builditem_setobjecttransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItem_SetObjectTransform == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItem_GetPartNumber = (PLib3MFBuildItem_GetPartNumberPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getpartnumber"); + #else // _WIN32 + pWrapperTable->m_BuildItem_GetPartNumber = (PLib3MFBuildItem_GetPartNumberPtr) dlsym(hLibrary, "lib3mf_builditem_getpartnumber"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItem_GetPartNumber == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItem_SetPartNumber = (PLib3MFBuildItem_SetPartNumberPtr) GetProcAddress(hLibrary, "lib3mf_builditem_setpartnumber"); + #else // _WIN32 + pWrapperTable->m_BuildItem_SetPartNumber = (PLib3MFBuildItem_SetPartNumberPtr) dlsym(hLibrary, "lib3mf_builditem_setpartnumber"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItem_SetPartNumber == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItem_GetMetaDataGroup = (PLib3MFBuildItem_GetMetaDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getmetadatagroup"); + #else // _WIN32 + pWrapperTable->m_BuildItem_GetMetaDataGroup = (PLib3MFBuildItem_GetMetaDataGroupPtr) dlsym(hLibrary, "lib3mf_builditem_getmetadatagroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItem_GetMetaDataGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItem_GetOutbox = (PLib3MFBuildItem_GetOutboxPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getoutbox"); + #else // _WIN32 + pWrapperTable->m_BuildItem_GetOutbox = (PLib3MFBuildItem_GetOutboxPtr) dlsym(hLibrary, "lib3mf_builditem_getoutbox"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItem_GetOutbox == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItemIterator_MoveNext = (PLib3MFBuildItemIterator_MoveNextPtr) GetProcAddress(hLibrary, "lib3mf_builditemiterator_movenext"); + #else // _WIN32 + pWrapperTable->m_BuildItemIterator_MoveNext = (PLib3MFBuildItemIterator_MoveNextPtr) dlsym(hLibrary, "lib3mf_builditemiterator_movenext"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItemIterator_MoveNext == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItemIterator_MovePrevious = (PLib3MFBuildItemIterator_MovePreviousPtr) GetProcAddress(hLibrary, "lib3mf_builditemiterator_moveprevious"); + #else // _WIN32 + pWrapperTable->m_BuildItemIterator_MovePrevious = (PLib3MFBuildItemIterator_MovePreviousPtr) dlsym(hLibrary, "lib3mf_builditemiterator_moveprevious"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItemIterator_MovePrevious == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItemIterator_GetCurrent = (PLib3MFBuildItemIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_builditemiterator_getcurrent"); + #else // _WIN32 + pWrapperTable->m_BuildItemIterator_GetCurrent = (PLib3MFBuildItemIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_builditemiterator_getcurrent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItemIterator_GetCurrent == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItemIterator_Clone = (PLib3MFBuildItemIterator_ClonePtr) GetProcAddress(hLibrary, "lib3mf_builditemiterator_clone"); + #else // _WIN32 + pWrapperTable->m_BuildItemIterator_Clone = (PLib3MFBuildItemIterator_ClonePtr) dlsym(hLibrary, "lib3mf_builditemiterator_clone"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItemIterator_Clone == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BuildItemIterator_Count = (PLib3MFBuildItemIterator_CountPtr) GetProcAddress(hLibrary, "lib3mf_builditemiterator_count"); + #else // _WIN32 + pWrapperTable->m_BuildItemIterator_Count = (PLib3MFBuildItemIterator_CountPtr) dlsym(hLibrary, "lib3mf_builditemiterator_count"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BuildItemIterator_Count == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Slice_SetVertices = (PLib3MFSlice_SetVerticesPtr) GetProcAddress(hLibrary, "lib3mf_slice_setvertices"); + #else // _WIN32 + pWrapperTable->m_Slice_SetVertices = (PLib3MFSlice_SetVerticesPtr) dlsym(hLibrary, "lib3mf_slice_setvertices"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Slice_SetVertices == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Slice_GetVertices = (PLib3MFSlice_GetVerticesPtr) GetProcAddress(hLibrary, "lib3mf_slice_getvertices"); + #else // _WIN32 + pWrapperTable->m_Slice_GetVertices = (PLib3MFSlice_GetVerticesPtr) dlsym(hLibrary, "lib3mf_slice_getvertices"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Slice_GetVertices == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Slice_GetVertexCount = (PLib3MFSlice_GetVertexCountPtr) GetProcAddress(hLibrary, "lib3mf_slice_getvertexcount"); + #else // _WIN32 + pWrapperTable->m_Slice_GetVertexCount = (PLib3MFSlice_GetVertexCountPtr) dlsym(hLibrary, "lib3mf_slice_getvertexcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Slice_GetVertexCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Slice_AddPolygon = (PLib3MFSlice_AddPolygonPtr) GetProcAddress(hLibrary, "lib3mf_slice_addpolygon"); + #else // _WIN32 + pWrapperTable->m_Slice_AddPolygon = (PLib3MFSlice_AddPolygonPtr) dlsym(hLibrary, "lib3mf_slice_addpolygon"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Slice_AddPolygon == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Slice_GetPolygonCount = (PLib3MFSlice_GetPolygonCountPtr) GetProcAddress(hLibrary, "lib3mf_slice_getpolygoncount"); + #else // _WIN32 + pWrapperTable->m_Slice_GetPolygonCount = (PLib3MFSlice_GetPolygonCountPtr) dlsym(hLibrary, "lib3mf_slice_getpolygoncount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Slice_GetPolygonCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Slice_SetPolygonIndices = (PLib3MFSlice_SetPolygonIndicesPtr) GetProcAddress(hLibrary, "lib3mf_slice_setpolygonindices"); + #else // _WIN32 + pWrapperTable->m_Slice_SetPolygonIndices = (PLib3MFSlice_SetPolygonIndicesPtr) dlsym(hLibrary, "lib3mf_slice_setpolygonindices"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Slice_SetPolygonIndices == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Slice_GetPolygonIndices = (PLib3MFSlice_GetPolygonIndicesPtr) GetProcAddress(hLibrary, "lib3mf_slice_getpolygonindices"); + #else // _WIN32 + pWrapperTable->m_Slice_GetPolygonIndices = (PLib3MFSlice_GetPolygonIndicesPtr) dlsym(hLibrary, "lib3mf_slice_getpolygonindices"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Slice_GetPolygonIndices == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Slice_GetPolygonIndexCount = (PLib3MFSlice_GetPolygonIndexCountPtr) GetProcAddress(hLibrary, "lib3mf_slice_getpolygonindexcount"); + #else // _WIN32 + pWrapperTable->m_Slice_GetPolygonIndexCount = (PLib3MFSlice_GetPolygonIndexCountPtr) dlsym(hLibrary, "lib3mf_slice_getpolygonindexcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Slice_GetPolygonIndexCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Slice_GetZTop = (PLib3MFSlice_GetZTopPtr) GetProcAddress(hLibrary, "lib3mf_slice_getztop"); + #else // _WIN32 + pWrapperTable->m_Slice_GetZTop = (PLib3MFSlice_GetZTopPtr) dlsym(hLibrary, "lib3mf_slice_getztop"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Slice_GetZTop == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SliceStack_GetBottomZ = (PLib3MFSliceStack_GetBottomZPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getbottomz"); + #else // _WIN32 + pWrapperTable->m_SliceStack_GetBottomZ = (PLib3MFSliceStack_GetBottomZPtr) dlsym(hLibrary, "lib3mf_slicestack_getbottomz"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SliceStack_GetBottomZ == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SliceStack_GetSliceCount = (PLib3MFSliceStack_GetSliceCountPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getslicecount"); + #else // _WIN32 + pWrapperTable->m_SliceStack_GetSliceCount = (PLib3MFSliceStack_GetSliceCountPtr) dlsym(hLibrary, "lib3mf_slicestack_getslicecount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SliceStack_GetSliceCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SliceStack_GetSlice = (PLib3MFSliceStack_GetSlicePtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getslice"); + #else // _WIN32 + pWrapperTable->m_SliceStack_GetSlice = (PLib3MFSliceStack_GetSlicePtr) dlsym(hLibrary, "lib3mf_slicestack_getslice"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SliceStack_GetSlice == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SliceStack_AddSlice = (PLib3MFSliceStack_AddSlicePtr) GetProcAddress(hLibrary, "lib3mf_slicestack_addslice"); + #else // _WIN32 + pWrapperTable->m_SliceStack_AddSlice = (PLib3MFSliceStack_AddSlicePtr) dlsym(hLibrary, "lib3mf_slicestack_addslice"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SliceStack_AddSlice == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SliceStack_GetSliceRefCount = (PLib3MFSliceStack_GetSliceRefCountPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getslicerefcount"); + #else // _WIN32 + pWrapperTable->m_SliceStack_GetSliceRefCount = (PLib3MFSliceStack_GetSliceRefCountPtr) dlsym(hLibrary, "lib3mf_slicestack_getslicerefcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SliceStack_GetSliceRefCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SliceStack_AddSliceStackReference = (PLib3MFSliceStack_AddSliceStackReferencePtr) GetProcAddress(hLibrary, "lib3mf_slicestack_addslicestackreference"); + #else // _WIN32 + pWrapperTable->m_SliceStack_AddSliceStackReference = (PLib3MFSliceStack_AddSliceStackReferencePtr) dlsym(hLibrary, "lib3mf_slicestack_addslicestackreference"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SliceStack_AddSliceStackReference == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SliceStack_GetSliceStackReference = (PLib3MFSliceStack_GetSliceStackReferencePtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getslicestackreference"); + #else // _WIN32 + pWrapperTable->m_SliceStack_GetSliceStackReference = (PLib3MFSliceStack_GetSliceStackReferencePtr) dlsym(hLibrary, "lib3mf_slicestack_getslicestackreference"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SliceStack_GetSliceStackReference == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SliceStack_CollapseSliceReferences = (PLib3MFSliceStack_CollapseSliceReferencesPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_collapseslicereferences"); + #else // _WIN32 + pWrapperTable->m_SliceStack_CollapseSliceReferences = (PLib3MFSliceStack_CollapseSliceReferencesPtr) dlsym(hLibrary, "lib3mf_slicestack_collapseslicereferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SliceStack_CollapseSliceReferences == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SliceStack_SetOwnPath = (PLib3MFSliceStack_SetOwnPathPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_setownpath"); + #else // _WIN32 + pWrapperTable->m_SliceStack_SetOwnPath = (PLib3MFSliceStack_SetOwnPathPtr) dlsym(hLibrary, "lib3mf_slicestack_setownpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SliceStack_SetOwnPath == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SliceStack_GetOwnPath = (PLib3MFSliceStack_GetOwnPathPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getownpath"); + #else // _WIN32 + pWrapperTable->m_SliceStack_GetOwnPath = (PLib3MFSliceStack_GetOwnPathPtr) dlsym(hLibrary, "lib3mf_slicestack_getownpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SliceStack_GetOwnPath == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Consumer_GetConsumerID = (PLib3MFConsumer_GetConsumerIDPtr) GetProcAddress(hLibrary, "lib3mf_consumer_getconsumerid"); + #else // _WIN32 + pWrapperTable->m_Consumer_GetConsumerID = (PLib3MFConsumer_GetConsumerIDPtr) dlsym(hLibrary, "lib3mf_consumer_getconsumerid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Consumer_GetConsumerID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Consumer_GetKeyID = (PLib3MFConsumer_GetKeyIDPtr) GetProcAddress(hLibrary, "lib3mf_consumer_getkeyid"); + #else // _WIN32 + pWrapperTable->m_Consumer_GetKeyID = (PLib3MFConsumer_GetKeyIDPtr) dlsym(hLibrary, "lib3mf_consumer_getkeyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Consumer_GetKeyID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Consumer_GetKeyValue = (PLib3MFConsumer_GetKeyValuePtr) GetProcAddress(hLibrary, "lib3mf_consumer_getkeyvalue"); + #else // _WIN32 + pWrapperTable->m_Consumer_GetKeyValue = (PLib3MFConsumer_GetKeyValuePtr) dlsym(hLibrary, "lib3mf_consumer_getkeyvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Consumer_GetKeyValue == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_AccessRight_GetConsumer = (PLib3MFAccessRight_GetConsumerPtr) GetProcAddress(hLibrary, "lib3mf_accessright_getconsumer"); + #else // _WIN32 + pWrapperTable->m_AccessRight_GetConsumer = (PLib3MFAccessRight_GetConsumerPtr) dlsym(hLibrary, "lib3mf_accessright_getconsumer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_AccessRight_GetConsumer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_AccessRight_GetWrappingAlgorithm = (PLib3MFAccessRight_GetWrappingAlgorithmPtr) GetProcAddress(hLibrary, "lib3mf_accessright_getwrappingalgorithm"); + #else // _WIN32 + pWrapperTable->m_AccessRight_GetWrappingAlgorithm = (PLib3MFAccessRight_GetWrappingAlgorithmPtr) dlsym(hLibrary, "lib3mf_accessright_getwrappingalgorithm"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_AccessRight_GetWrappingAlgorithm == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_AccessRight_GetMgfAlgorithm = (PLib3MFAccessRight_GetMgfAlgorithmPtr) GetProcAddress(hLibrary, "lib3mf_accessright_getmgfalgorithm"); + #else // _WIN32 + pWrapperTable->m_AccessRight_GetMgfAlgorithm = (PLib3MFAccessRight_GetMgfAlgorithmPtr) dlsym(hLibrary, "lib3mf_accessright_getmgfalgorithm"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_AccessRight_GetMgfAlgorithm == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_AccessRight_GetDigestMethod = (PLib3MFAccessRight_GetDigestMethodPtr) GetProcAddress(hLibrary, "lib3mf_accessright_getdigestmethod"); + #else // _WIN32 + pWrapperTable->m_AccessRight_GetDigestMethod = (PLib3MFAccessRight_GetDigestMethodPtr) dlsym(hLibrary, "lib3mf_accessright_getdigestmethod"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_AccessRight_GetDigestMethod == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm = (PLib3MFContentEncryptionParams_GetEncryptionAlgorithmPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getencryptionalgorithm"); + #else // _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm = (PLib3MFContentEncryptionParams_GetEncryptionAlgorithmPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getencryptionalgorithm"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetKey = (PLib3MFContentEncryptionParams_GetKeyPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getkey"); + #else // _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetKey = (PLib3MFContentEncryptionParams_GetKeyPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getkey"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ContentEncryptionParams_GetKey == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetInitializationVector = (PLib3MFContentEncryptionParams_GetInitializationVectorPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getinitializationvector"); + #else // _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetInitializationVector = (PLib3MFContentEncryptionParams_GetInitializationVectorPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getinitializationvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ContentEncryptionParams_GetInitializationVector == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetAuthenticationTag = (PLib3MFContentEncryptionParams_GetAuthenticationTagPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getauthenticationtag"); + #else // _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetAuthenticationTag = (PLib3MFContentEncryptionParams_GetAuthenticationTagPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getauthenticationtag"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ContentEncryptionParams_GetAuthenticationTag == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ContentEncryptionParams_SetAuthenticationTag = (PLib3MFContentEncryptionParams_SetAuthenticationTagPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_setauthenticationtag"); + #else // _WIN32 + pWrapperTable->m_ContentEncryptionParams_SetAuthenticationTag = (PLib3MFContentEncryptionParams_SetAuthenticationTagPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_setauthenticationtag"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ContentEncryptionParams_SetAuthenticationTag == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData = (PLib3MFContentEncryptionParams_GetAdditionalAuthenticationDataPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getadditionalauthenticationdata"); + #else // _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData = (PLib3MFContentEncryptionParams_GetAdditionalAuthenticationDataPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getadditionalauthenticationdata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetDescriptor = (PLib3MFContentEncryptionParams_GetDescriptorPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getdescriptor"); + #else // _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetDescriptor = (PLib3MFContentEncryptionParams_GetDescriptorPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getdescriptor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ContentEncryptionParams_GetDescriptor == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetKeyUUID = (PLib3MFContentEncryptionParams_GetKeyUUIDPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getkeyuuid"); + #else // _WIN32 + pWrapperTable->m_ContentEncryptionParams_GetKeyUUID = (PLib3MFContentEncryptionParams_GetKeyUUIDPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getkeyuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ContentEncryptionParams_GetKeyUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceData_GetPath = (PLib3MFResourceData_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_resourcedata_getpath"); + #else // _WIN32 + pWrapperTable->m_ResourceData_GetPath = (PLib3MFResourceData_GetPathPtr) dlsym(hLibrary, "lib3mf_resourcedata_getpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceData_GetPath == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceData_GetEncryptionAlgorithm = (PLib3MFResourceData_GetEncryptionAlgorithmPtr) GetProcAddress(hLibrary, "lib3mf_resourcedata_getencryptionalgorithm"); + #else // _WIN32 + pWrapperTable->m_ResourceData_GetEncryptionAlgorithm = (PLib3MFResourceData_GetEncryptionAlgorithmPtr) dlsym(hLibrary, "lib3mf_resourcedata_getencryptionalgorithm"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceData_GetEncryptionAlgorithm == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceData_GetCompression = (PLib3MFResourceData_GetCompressionPtr) GetProcAddress(hLibrary, "lib3mf_resourcedata_getcompression"); + #else // _WIN32 + pWrapperTable->m_ResourceData_GetCompression = (PLib3MFResourceData_GetCompressionPtr) dlsym(hLibrary, "lib3mf_resourcedata_getcompression"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceData_GetCompression == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceData_GetAdditionalAuthenticationData = (PLib3MFResourceData_GetAdditionalAuthenticationDataPtr) GetProcAddress(hLibrary, "lib3mf_resourcedata_getadditionalauthenticationdata"); + #else // _WIN32 + pWrapperTable->m_ResourceData_GetAdditionalAuthenticationData = (PLib3MFResourceData_GetAdditionalAuthenticationDataPtr) dlsym(hLibrary, "lib3mf_resourcedata_getadditionalauthenticationdata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceData_GetAdditionalAuthenticationData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceDataGroup_GetKeyUUID = (PLib3MFResourceDataGroup_GetKeyUUIDPtr) GetProcAddress(hLibrary, "lib3mf_resourcedatagroup_getkeyuuid"); + #else // _WIN32 + pWrapperTable->m_ResourceDataGroup_GetKeyUUID = (PLib3MFResourceDataGroup_GetKeyUUIDPtr) dlsym(hLibrary, "lib3mf_resourcedatagroup_getkeyuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceDataGroup_GetKeyUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceDataGroup_AddAccessRight = (PLib3MFResourceDataGroup_AddAccessRightPtr) GetProcAddress(hLibrary, "lib3mf_resourcedatagroup_addaccessright"); + #else // _WIN32 + pWrapperTable->m_ResourceDataGroup_AddAccessRight = (PLib3MFResourceDataGroup_AddAccessRightPtr) dlsym(hLibrary, "lib3mf_resourcedatagroup_addaccessright"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceDataGroup_AddAccessRight == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer = (PLib3MFResourceDataGroup_FindAccessRightByConsumerPtr) GetProcAddress(hLibrary, "lib3mf_resourcedatagroup_findaccessrightbyconsumer"); + #else // _WIN32 + pWrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer = (PLib3MFResourceDataGroup_FindAccessRightByConsumerPtr) dlsym(hLibrary, "lib3mf_resourcedatagroup_findaccessrightbyconsumer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceDataGroup_RemoveAccessRight = (PLib3MFResourceDataGroup_RemoveAccessRightPtr) GetProcAddress(hLibrary, "lib3mf_resourcedatagroup_removeaccessright"); + #else // _WIN32 + pWrapperTable->m_ResourceDataGroup_RemoveAccessRight = (PLib3MFResourceDataGroup_RemoveAccessRightPtr) dlsym(hLibrary, "lib3mf_resourcedatagroup_removeaccessright"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceDataGroup_RemoveAccessRight == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_AddConsumer = (PLib3MFKeyStore_AddConsumerPtr) GetProcAddress(hLibrary, "lib3mf_keystore_addconsumer"); + #else // _WIN32 + pWrapperTable->m_KeyStore_AddConsumer = (PLib3MFKeyStore_AddConsumerPtr) dlsym(hLibrary, "lib3mf_keystore_addconsumer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_AddConsumer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_GetConsumerCount = (PLib3MFKeyStore_GetConsumerCountPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getconsumercount"); + #else // _WIN32 + pWrapperTable->m_KeyStore_GetConsumerCount = (PLib3MFKeyStore_GetConsumerCountPtr) dlsym(hLibrary, "lib3mf_keystore_getconsumercount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_GetConsumerCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_GetConsumer = (PLib3MFKeyStore_GetConsumerPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getconsumer"); + #else // _WIN32 + pWrapperTable->m_KeyStore_GetConsumer = (PLib3MFKeyStore_GetConsumerPtr) dlsym(hLibrary, "lib3mf_keystore_getconsumer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_GetConsumer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_RemoveConsumer = (PLib3MFKeyStore_RemoveConsumerPtr) GetProcAddress(hLibrary, "lib3mf_keystore_removeconsumer"); + #else // _WIN32 + pWrapperTable->m_KeyStore_RemoveConsumer = (PLib3MFKeyStore_RemoveConsumerPtr) dlsym(hLibrary, "lib3mf_keystore_removeconsumer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_RemoveConsumer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_FindConsumer = (PLib3MFKeyStore_FindConsumerPtr) GetProcAddress(hLibrary, "lib3mf_keystore_findconsumer"); + #else // _WIN32 + pWrapperTable->m_KeyStore_FindConsumer = (PLib3MFKeyStore_FindConsumerPtr) dlsym(hLibrary, "lib3mf_keystore_findconsumer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_FindConsumer == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_GetResourceDataGroupCount = (PLib3MFKeyStore_GetResourceDataGroupCountPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getresourcedatagroupcount"); + #else // _WIN32 + pWrapperTable->m_KeyStore_GetResourceDataGroupCount = (PLib3MFKeyStore_GetResourceDataGroupCountPtr) dlsym(hLibrary, "lib3mf_keystore_getresourcedatagroupcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_GetResourceDataGroupCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_AddResourceDataGroup = (PLib3MFKeyStore_AddResourceDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_keystore_addresourcedatagroup"); + #else // _WIN32 + pWrapperTable->m_KeyStore_AddResourceDataGroup = (PLib3MFKeyStore_AddResourceDataGroupPtr) dlsym(hLibrary, "lib3mf_keystore_addresourcedatagroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_AddResourceDataGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_GetResourceDataGroup = (PLib3MFKeyStore_GetResourceDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getresourcedatagroup"); + #else // _WIN32 + pWrapperTable->m_KeyStore_GetResourceDataGroup = (PLib3MFKeyStore_GetResourceDataGroupPtr) dlsym(hLibrary, "lib3mf_keystore_getresourcedatagroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_GetResourceDataGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_RemoveResourceDataGroup = (PLib3MFKeyStore_RemoveResourceDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_keystore_removeresourcedatagroup"); + #else // _WIN32 + pWrapperTable->m_KeyStore_RemoveResourceDataGroup = (PLib3MFKeyStore_RemoveResourceDataGroupPtr) dlsym(hLibrary, "lib3mf_keystore_removeresourcedatagroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_RemoveResourceDataGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_FindResourceDataGroup = (PLib3MFKeyStore_FindResourceDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_keystore_findresourcedatagroup"); + #else // _WIN32 + pWrapperTable->m_KeyStore_FindResourceDataGroup = (PLib3MFKeyStore_FindResourceDataGroupPtr) dlsym(hLibrary, "lib3mf_keystore_findresourcedatagroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_FindResourceDataGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_AddResourceData = (PLib3MFKeyStore_AddResourceDataPtr) GetProcAddress(hLibrary, "lib3mf_keystore_addresourcedata"); + #else // _WIN32 + pWrapperTable->m_KeyStore_AddResourceData = (PLib3MFKeyStore_AddResourceDataPtr) dlsym(hLibrary, "lib3mf_keystore_addresourcedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_AddResourceData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_RemoveResourceData = (PLib3MFKeyStore_RemoveResourceDataPtr) GetProcAddress(hLibrary, "lib3mf_keystore_removeresourcedata"); + #else // _WIN32 + pWrapperTable->m_KeyStore_RemoveResourceData = (PLib3MFKeyStore_RemoveResourceDataPtr) dlsym(hLibrary, "lib3mf_keystore_removeresourcedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_RemoveResourceData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_FindResourceData = (PLib3MFKeyStore_FindResourceDataPtr) GetProcAddress(hLibrary, "lib3mf_keystore_findresourcedata"); + #else // _WIN32 + pWrapperTable->m_KeyStore_FindResourceData = (PLib3MFKeyStore_FindResourceDataPtr) dlsym(hLibrary, "lib3mf_keystore_findresourcedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_FindResourceData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_GetResourceDataCount = (PLib3MFKeyStore_GetResourceDataCountPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getresourcedatacount"); + #else // _WIN32 + pWrapperTable->m_KeyStore_GetResourceDataCount = (PLib3MFKeyStore_GetResourceDataCountPtr) dlsym(hLibrary, "lib3mf_keystore_getresourcedatacount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_GetResourceDataCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_GetResourceData = (PLib3MFKeyStore_GetResourceDataPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getresourcedata"); + #else // _WIN32 + pWrapperTable->m_KeyStore_GetResourceData = (PLib3MFKeyStore_GetResourceDataPtr) dlsym(hLibrary, "lib3mf_keystore_getresourcedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_GetResourceData == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_GetUUID = (PLib3MFKeyStore_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getuuid"); + #else // _WIN32 + pWrapperTable->m_KeyStore_GetUUID = (PLib3MFKeyStore_GetUUIDPtr) dlsym(hLibrary, "lib3mf_keystore_getuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_GetUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_KeyStore_SetUUID = (PLib3MFKeyStore_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_keystore_setuuid"); + #else // _WIN32 + pWrapperTable->m_KeyStore_SetUUID = (PLib3MFKeyStore_SetUUIDPtr) dlsym(hLibrary, "lib3mf_keystore_setuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_KeyStore_SetUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_RootModelPart = (PLib3MFModel_RootModelPartPtr) GetProcAddress(hLibrary, "lib3mf_model_rootmodelpart"); + #else // _WIN32 + pWrapperTable->m_Model_RootModelPart = (PLib3MFModel_RootModelPartPtr) dlsym(hLibrary, "lib3mf_model_rootmodelpart"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_RootModelPart == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_FindOrCreatePackagePart = (PLib3MFModel_FindOrCreatePackagePartPtr) GetProcAddress(hLibrary, "lib3mf_model_findorcreatepackagepart"); + #else // _WIN32 + pWrapperTable->m_Model_FindOrCreatePackagePart = (PLib3MFModel_FindOrCreatePackagePartPtr) dlsym(hLibrary, "lib3mf_model_findorcreatepackagepart"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_FindOrCreatePackagePart == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_SetUnit = (PLib3MFModel_SetUnitPtr) GetProcAddress(hLibrary, "lib3mf_model_setunit"); + #else // _WIN32 + pWrapperTable->m_Model_SetUnit = (PLib3MFModel_SetUnitPtr) dlsym(hLibrary, "lib3mf_model_setunit"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_SetUnit == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetUnit = (PLib3MFModel_GetUnitPtr) GetProcAddress(hLibrary, "lib3mf_model_getunit"); + #else // _WIN32 + pWrapperTable->m_Model_GetUnit = (PLib3MFModel_GetUnitPtr) dlsym(hLibrary, "lib3mf_model_getunit"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetUnit == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetLanguage = (PLib3MFModel_GetLanguagePtr) GetProcAddress(hLibrary, "lib3mf_model_getlanguage"); + #else // _WIN32 + pWrapperTable->m_Model_GetLanguage = (PLib3MFModel_GetLanguagePtr) dlsym(hLibrary, "lib3mf_model_getlanguage"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLanguage == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_SetLanguage = (PLib3MFModel_SetLanguagePtr) GetProcAddress(hLibrary, "lib3mf_model_setlanguage"); + #else // _WIN32 + pWrapperTable->m_Model_SetLanguage = (PLib3MFModel_SetLanguagePtr) dlsym(hLibrary, "lib3mf_model_setlanguage"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_SetLanguage == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_QueryWriter = (PLib3MFModel_QueryWriterPtr) GetProcAddress(hLibrary, "lib3mf_model_querywriter"); + #else // _WIN32 + pWrapperTable->m_Model_QueryWriter = (PLib3MFModel_QueryWriterPtr) dlsym(hLibrary, "lib3mf_model_querywriter"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_QueryWriter == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_QueryReader = (PLib3MFModel_QueryReaderPtr) GetProcAddress(hLibrary, "lib3mf_model_queryreader"); + #else // _WIN32 + pWrapperTable->m_Model_QueryReader = (PLib3MFModel_QueryReaderPtr) dlsym(hLibrary, "lib3mf_model_queryreader"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_QueryReader == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetResourceByID = (PLib3MFModel_GetResourceByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getresourcebyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetResourceByID = (PLib3MFModel_GetResourceByIDPtr) dlsym(hLibrary, "lib3mf_model_getresourcebyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetResourceByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetTexture2DByID = (PLib3MFModel_GetTexture2DByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_gettexture2dbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetTexture2DByID = (PLib3MFModel_GetTexture2DByIDPtr) dlsym(hLibrary, "lib3mf_model_gettexture2dbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetTexture2DByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetPropertyTypeByID = (PLib3MFModel_GetPropertyTypeByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getpropertytypebyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetPropertyTypeByID = (PLib3MFModel_GetPropertyTypeByIDPtr) dlsym(hLibrary, "lib3mf_model_getpropertytypebyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetPropertyTypeByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetBaseMaterialGroupByID = (PLib3MFModel_GetBaseMaterialGroupByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getbasematerialgroupbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetBaseMaterialGroupByID = (PLib3MFModel_GetBaseMaterialGroupByIDPtr) dlsym(hLibrary, "lib3mf_model_getbasematerialgroupbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetBaseMaterialGroupByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetTexture2DGroupByID = (PLib3MFModel_GetTexture2DGroupByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_gettexture2dgroupbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetTexture2DGroupByID = (PLib3MFModel_GetTexture2DGroupByIDPtr) dlsym(hLibrary, "lib3mf_model_gettexture2dgroupbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetTexture2DGroupByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetCompositeMaterialsByID = (PLib3MFModel_GetCompositeMaterialsByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getcompositematerialsbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetCompositeMaterialsByID = (PLib3MFModel_GetCompositeMaterialsByIDPtr) dlsym(hLibrary, "lib3mf_model_getcompositematerialsbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetCompositeMaterialsByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetMultiPropertyGroupByID = (PLib3MFModel_GetMultiPropertyGroupByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getmultipropertygroupbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetMultiPropertyGroupByID = (PLib3MFModel_GetMultiPropertyGroupByIDPtr) dlsym(hLibrary, "lib3mf_model_getmultipropertygroupbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetMultiPropertyGroupByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetMeshObjectByID = (PLib3MFModel_GetMeshObjectByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getmeshobjectbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetMeshObjectByID = (PLib3MFModel_GetMeshObjectByIDPtr) dlsym(hLibrary, "lib3mf_model_getmeshobjectbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetMeshObjectByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetComponentsObjectByID = (PLib3MFModel_GetComponentsObjectByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getcomponentsobjectbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetComponentsObjectByID = (PLib3MFModel_GetComponentsObjectByIDPtr) dlsym(hLibrary, "lib3mf_model_getcomponentsobjectbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetComponentsObjectByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetColorGroupByID = (PLib3MFModel_GetColorGroupByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getcolorgroupbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetColorGroupByID = (PLib3MFModel_GetColorGroupByIDPtr) dlsym(hLibrary, "lib3mf_model_getcolorgroupbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetColorGroupByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetSliceStackByID = (PLib3MFModel_GetSliceStackByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getslicestackbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetSliceStackByID = (PLib3MFModel_GetSliceStackByIDPtr) dlsym(hLibrary, "lib3mf_model_getslicestackbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetSliceStackByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsetbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) dlsym(hLibrary, "lib3mf_model_getlevelsetbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLevelSetByID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetBuildUUID = (PLib3MFModel_GetBuildUUIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getbuilduuid"); + #else // _WIN32 + pWrapperTable->m_Model_GetBuildUUID = (PLib3MFModel_GetBuildUUIDPtr) dlsym(hLibrary, "lib3mf_model_getbuilduuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetBuildUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_SetBuildUUID = (PLib3MFModel_SetBuildUUIDPtr) GetProcAddress(hLibrary, "lib3mf_model_setbuilduuid"); + #else // _WIN32 + pWrapperTable->m_Model_SetBuildUUID = (PLib3MFModel_SetBuildUUIDPtr) dlsym(hLibrary, "lib3mf_model_setbuilduuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_SetBuildUUID == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetBuildItems = (PLib3MFModel_GetBuildItemsPtr) GetProcAddress(hLibrary, "lib3mf_model_getbuilditems"); + #else // _WIN32 + pWrapperTable->m_Model_GetBuildItems = (PLib3MFModel_GetBuildItemsPtr) dlsym(hLibrary, "lib3mf_model_getbuilditems"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetBuildItems == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetOutbox = (PLib3MFModel_GetOutboxPtr) GetProcAddress(hLibrary, "lib3mf_model_getoutbox"); + #else // _WIN32 + pWrapperTable->m_Model_GetOutbox = (PLib3MFModel_GetOutboxPtr) dlsym(hLibrary, "lib3mf_model_getoutbox"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetOutbox == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetResources = (PLib3MFModel_GetResourcesPtr) GetProcAddress(hLibrary, "lib3mf_model_getresources"); + #else // _WIN32 + pWrapperTable->m_Model_GetResources = (PLib3MFModel_GetResourcesPtr) dlsym(hLibrary, "lib3mf_model_getresources"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetResources == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetObjects = (PLib3MFModel_GetObjectsPtr) GetProcAddress(hLibrary, "lib3mf_model_getobjects"); + #else // _WIN32 + pWrapperTable->m_Model_GetObjects = (PLib3MFModel_GetObjectsPtr) dlsym(hLibrary, "lib3mf_model_getobjects"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetObjects == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetMeshObjects = (PLib3MFModel_GetMeshObjectsPtr) GetProcAddress(hLibrary, "lib3mf_model_getmeshobjects"); + #else // _WIN32 + pWrapperTable->m_Model_GetMeshObjects = (PLib3MFModel_GetMeshObjectsPtr) dlsym(hLibrary, "lib3mf_model_getmeshobjects"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetMeshObjects == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetComponentsObjects = (PLib3MFModel_GetComponentsObjectsPtr) GetProcAddress(hLibrary, "lib3mf_model_getcomponentsobjects"); + #else // _WIN32 + pWrapperTable->m_Model_GetComponentsObjects = (PLib3MFModel_GetComponentsObjectsPtr) dlsym(hLibrary, "lib3mf_model_getcomponentsobjects"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetComponentsObjects == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetTexture2Ds = (PLib3MFModel_GetTexture2DsPtr) GetProcAddress(hLibrary, "lib3mf_model_gettexture2ds"); + #else // _WIN32 + pWrapperTable->m_Model_GetTexture2Ds = (PLib3MFModel_GetTexture2DsPtr) dlsym(hLibrary, "lib3mf_model_gettexture2ds"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetTexture2Ds == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetBaseMaterialGroups = (PLib3MFModel_GetBaseMaterialGroupsPtr) GetProcAddress(hLibrary, "lib3mf_model_getbasematerialgroups"); + #else // _WIN32 + pWrapperTable->m_Model_GetBaseMaterialGroups = (PLib3MFModel_GetBaseMaterialGroupsPtr) dlsym(hLibrary, "lib3mf_model_getbasematerialgroups"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetBaseMaterialGroups == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetColorGroups = (PLib3MFModel_GetColorGroupsPtr) GetProcAddress(hLibrary, "lib3mf_model_getcolorgroups"); + #else // _WIN32 + pWrapperTable->m_Model_GetColorGroups = (PLib3MFModel_GetColorGroupsPtr) dlsym(hLibrary, "lib3mf_model_getcolorgroups"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetColorGroups == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetTexture2DGroups = (PLib3MFModel_GetTexture2DGroupsPtr) GetProcAddress(hLibrary, "lib3mf_model_gettexture2dgroups"); + #else // _WIN32 + pWrapperTable->m_Model_GetTexture2DGroups = (PLib3MFModel_GetTexture2DGroupsPtr) dlsym(hLibrary, "lib3mf_model_gettexture2dgroups"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetTexture2DGroups == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetCompositeMaterials = (PLib3MFModel_GetCompositeMaterialsPtr) GetProcAddress(hLibrary, "lib3mf_model_getcompositematerials"); + #else // _WIN32 + pWrapperTable->m_Model_GetCompositeMaterials = (PLib3MFModel_GetCompositeMaterialsPtr) dlsym(hLibrary, "lib3mf_model_getcompositematerials"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetCompositeMaterials == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - if (pWrapperTable->m_LibraryHandle != nullptr) { #ifdef _WIN32 - HMODULE hModule = (HMODULE) pWrapperTable->m_LibraryHandle; - FreeLibrary(hModule); + pWrapperTable->m_Model_GetMultiPropertyGroups = (PLib3MFModel_GetMultiPropertyGroupsPtr) GetProcAddress(hLibrary, "lib3mf_model_getmultipropertygroups"); #else // _WIN32 - dlclose(pWrapperTable->m_LibraryHandle); + pWrapperTable->m_Model_GetMultiPropertyGroups = (PLib3MFModel_GetMultiPropertyGroupsPtr) dlsym(hLibrary, "lib3mf_model_getmultipropertygroups"); + dlerror(); #endif // _WIN32 - return initWrapperTable(pWrapperTable); - } + if (pWrapperTable->m_Model_GetMultiPropertyGroups == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - return LIB3MF_SUCCESS; - } - - inline Lib3MFResult CWrapper::loadWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, const char * pLibraryFileName) - { - if (pWrapperTable == nullptr) - return LIB3MF_ERROR_INVALIDPARAM; - if (pLibraryFileName == nullptr) - return LIB3MF_ERROR_INVALIDPARAM; + #ifdef _WIN32 + pWrapperTable->m_Model_GetSliceStacks = (PLib3MFModel_GetSliceStacksPtr) GetProcAddress(hLibrary, "lib3mf_model_getslicestacks"); + #else // _WIN32 + pWrapperTable->m_Model_GetSliceStacks = (PLib3MFModel_GetSliceStacksPtr) dlsym(hLibrary, "lib3mf_model_getslicestacks"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetSliceStacks == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - // Convert filename to UTF16-string - int nLength = 0; - while ((pLibraryFileName[nLength] != 0) && (nLength < MAX_PATH)) - nLength++; - int nBufferSize = nLength * 2 + 2; - std::vector wsLibraryFileName(nBufferSize); - int nResult = MultiByteToWideChar(CP_UTF8, 0, pLibraryFileName, nLength, &wsLibraryFileName[0], nBufferSize); - if (nResult == 0) - return LIB3MF_ERROR_COULDNOTLOADLIBRARY; + pWrapperTable->m_Model_GetImage3Ds = (PLib3MFModel_GetImage3DsPtr) GetProcAddress(hLibrary, "lib3mf_model_getimage3ds"); + #else // _WIN32 + pWrapperTable->m_Model_GetImage3Ds = (PLib3MFModel_GetImage3DsPtr) dlsym(hLibrary, "lib3mf_model_getimage3ds"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetImage3Ds == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - HMODULE hLibrary = LoadLibraryW(wsLibraryFileName.data()); - if (hLibrary == 0) - return LIB3MF_ERROR_COULDNOTLOADLIBRARY; + #ifdef _WIN32 + pWrapperTable->m_Model_MergeToModel = (PLib3MFModel_MergeToModelPtr) GetProcAddress(hLibrary, "lib3mf_model_mergetomodel"); #else // _WIN32 - void* hLibrary = dlopen(pLibraryFileName, RTLD_LAZY); - if (hLibrary == 0) - return LIB3MF_ERROR_COULDNOTLOADLIBRARY; + pWrapperTable->m_Model_MergeToModel = (PLib3MFModel_MergeToModelPtr) dlsym(hLibrary, "lib3mf_model_mergetomodel"); dlerror(); #endif // _WIN32 + if (pWrapperTable->m_Model_MergeToModel == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Base_ClassTypeId = (PLib3MFBase_ClassTypeIdPtr) GetProcAddress(hLibrary, "lib3mf_base_classtypeid"); + pWrapperTable->m_Model_MergeFromModel = (PLib3MFModel_MergeFromModelPtr) GetProcAddress(hLibrary, "lib3mf_model_mergefrommodel"); #else // _WIN32 - pWrapperTable->m_Base_ClassTypeId = (PLib3MFBase_ClassTypeIdPtr) dlsym(hLibrary, "lib3mf_base_classtypeid"); + pWrapperTable->m_Model_MergeFromModel = (PLib3MFModel_MergeFromModelPtr) dlsym(hLibrary, "lib3mf_model_mergefrommodel"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Base_ClassTypeId == nullptr) + if (pWrapperTable->m_Model_MergeFromModel == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_WriteToFile = (PLib3MFWriter_WriteToFilePtr) GetProcAddress(hLibrary, "lib3mf_writer_writetofile"); + pWrapperTable->m_Model_AddMeshObject = (PLib3MFModel_AddMeshObjectPtr) GetProcAddress(hLibrary, "lib3mf_model_addmeshobject"); #else // _WIN32 - pWrapperTable->m_Writer_WriteToFile = (PLib3MFWriter_WriteToFilePtr) dlsym(hLibrary, "lib3mf_writer_writetofile"); + pWrapperTable->m_Model_AddMeshObject = (PLib3MFModel_AddMeshObjectPtr) dlsym(hLibrary, "lib3mf_model_addmeshobject"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_WriteToFile == nullptr) + if (pWrapperTable->m_Model_AddMeshObject == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_GetStreamSize = (PLib3MFWriter_GetStreamSizePtr) GetProcAddress(hLibrary, "lib3mf_writer_getstreamsize"); + pWrapperTable->m_Model_AddComponentsObject = (PLib3MFModel_AddComponentsObjectPtr) GetProcAddress(hLibrary, "lib3mf_model_addcomponentsobject"); #else // _WIN32 - pWrapperTable->m_Writer_GetStreamSize = (PLib3MFWriter_GetStreamSizePtr) dlsym(hLibrary, "lib3mf_writer_getstreamsize"); + pWrapperTable->m_Model_AddComponentsObject = (PLib3MFModel_AddComponentsObjectPtr) dlsym(hLibrary, "lib3mf_model_addcomponentsobject"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_GetStreamSize == nullptr) + if (pWrapperTable->m_Model_AddComponentsObject == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_WriteToBuffer = (PLib3MFWriter_WriteToBufferPtr) GetProcAddress(hLibrary, "lib3mf_writer_writetobuffer"); + pWrapperTable->m_Model_AddSliceStack = (PLib3MFModel_AddSliceStackPtr) GetProcAddress(hLibrary, "lib3mf_model_addslicestack"); #else // _WIN32 - pWrapperTable->m_Writer_WriteToBuffer = (PLib3MFWriter_WriteToBufferPtr) dlsym(hLibrary, "lib3mf_writer_writetobuffer"); + pWrapperTable->m_Model_AddSliceStack = (PLib3MFModel_AddSliceStackPtr) dlsym(hLibrary, "lib3mf_model_addslicestack"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_WriteToBuffer == nullptr) + if (pWrapperTable->m_Model_AddSliceStack == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_WriteToCallback = (PLib3MFWriter_WriteToCallbackPtr) GetProcAddress(hLibrary, "lib3mf_writer_writetocallback"); + pWrapperTable->m_Model_AddTexture2DFromAttachment = (PLib3MFModel_AddTexture2DFromAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_addtexture2dfromattachment"); #else // _WIN32 - pWrapperTable->m_Writer_WriteToCallback = (PLib3MFWriter_WriteToCallbackPtr) dlsym(hLibrary, "lib3mf_writer_writetocallback"); + pWrapperTable->m_Model_AddTexture2DFromAttachment = (PLib3MFModel_AddTexture2DFromAttachmentPtr) dlsym(hLibrary, "lib3mf_model_addtexture2dfromattachment"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_WriteToCallback == nullptr) + if (pWrapperTable->m_Model_AddTexture2DFromAttachment == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_SetProgressCallback = (PLib3MFWriter_SetProgressCallbackPtr) GetProcAddress(hLibrary, "lib3mf_writer_setprogresscallback"); + pWrapperTable->m_Model_AddBaseMaterialGroup = (PLib3MFModel_AddBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_model_addbasematerialgroup"); #else // _WIN32 - pWrapperTable->m_Writer_SetProgressCallback = (PLib3MFWriter_SetProgressCallbackPtr) dlsym(hLibrary, "lib3mf_writer_setprogresscallback"); + pWrapperTable->m_Model_AddBaseMaterialGroup = (PLib3MFModel_AddBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_model_addbasematerialgroup"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_SetProgressCallback == nullptr) + if (pWrapperTable->m_Model_AddBaseMaterialGroup == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_GetDecimalPrecision = (PLib3MFWriter_GetDecimalPrecisionPtr) GetProcAddress(hLibrary, "lib3mf_writer_getdecimalprecision"); + pWrapperTable->m_Model_AddColorGroup = (PLib3MFModel_AddColorGroupPtr) GetProcAddress(hLibrary, "lib3mf_model_addcolorgroup"); #else // _WIN32 - pWrapperTable->m_Writer_GetDecimalPrecision = (PLib3MFWriter_GetDecimalPrecisionPtr) dlsym(hLibrary, "lib3mf_writer_getdecimalprecision"); + pWrapperTable->m_Model_AddColorGroup = (PLib3MFModel_AddColorGroupPtr) dlsym(hLibrary, "lib3mf_model_addcolorgroup"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_GetDecimalPrecision == nullptr) + if (pWrapperTable->m_Model_AddColorGroup == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_SetDecimalPrecision = (PLib3MFWriter_SetDecimalPrecisionPtr) GetProcAddress(hLibrary, "lib3mf_writer_setdecimalprecision"); + pWrapperTable->m_Model_AddTexture2DGroup = (PLib3MFModel_AddTexture2DGroupPtr) GetProcAddress(hLibrary, "lib3mf_model_addtexture2dgroup"); #else // _WIN32 - pWrapperTable->m_Writer_SetDecimalPrecision = (PLib3MFWriter_SetDecimalPrecisionPtr) dlsym(hLibrary, "lib3mf_writer_setdecimalprecision"); + pWrapperTable->m_Model_AddTexture2DGroup = (PLib3MFModel_AddTexture2DGroupPtr) dlsym(hLibrary, "lib3mf_model_addtexture2dgroup"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_SetDecimalPrecision == nullptr) + if (pWrapperTable->m_Model_AddTexture2DGroup == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_SetStrictModeActive = (PLib3MFWriter_SetStrictModeActivePtr) GetProcAddress(hLibrary, "lib3mf_writer_setstrictmodeactive"); + pWrapperTable->m_Model_AddCompositeMaterials = (PLib3MFModel_AddCompositeMaterialsPtr) GetProcAddress(hLibrary, "lib3mf_model_addcompositematerials"); #else // _WIN32 - pWrapperTable->m_Writer_SetStrictModeActive = (PLib3MFWriter_SetStrictModeActivePtr) dlsym(hLibrary, "lib3mf_writer_setstrictmodeactive"); + pWrapperTable->m_Model_AddCompositeMaterials = (PLib3MFModel_AddCompositeMaterialsPtr) dlsym(hLibrary, "lib3mf_model_addcompositematerials"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_SetStrictModeActive == nullptr) + if (pWrapperTable->m_Model_AddCompositeMaterials == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_GetStrictModeActive = (PLib3MFWriter_GetStrictModeActivePtr) GetProcAddress(hLibrary, "lib3mf_writer_getstrictmodeactive"); + pWrapperTable->m_Model_AddMultiPropertyGroup = (PLib3MFModel_AddMultiPropertyGroupPtr) GetProcAddress(hLibrary, "lib3mf_model_addmultipropertygroup"); #else // _WIN32 - pWrapperTable->m_Writer_GetStrictModeActive = (PLib3MFWriter_GetStrictModeActivePtr) dlsym(hLibrary, "lib3mf_writer_getstrictmodeactive"); + pWrapperTable->m_Model_AddMultiPropertyGroup = (PLib3MFModel_AddMultiPropertyGroupPtr) dlsym(hLibrary, "lib3mf_model_addmultipropertygroup"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_GetStrictModeActive == nullptr) + if (pWrapperTable->m_Model_AddMultiPropertyGroup == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_GetWarning = (PLib3MFWriter_GetWarningPtr) GetProcAddress(hLibrary, "lib3mf_writer_getwarning"); + pWrapperTable->m_Model_AddImageStack = (PLib3MFModel_AddImageStackPtr) GetProcAddress(hLibrary, "lib3mf_model_addimagestack"); #else // _WIN32 - pWrapperTable->m_Writer_GetWarning = (PLib3MFWriter_GetWarningPtr) dlsym(hLibrary, "lib3mf_writer_getwarning"); + pWrapperTable->m_Model_AddImageStack = (PLib3MFModel_AddImageStackPtr) dlsym(hLibrary, "lib3mf_model_addimagestack"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_GetWarning == nullptr) + if (pWrapperTable->m_Model_AddImageStack == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_GetWarningCount = (PLib3MFWriter_GetWarningCountPtr) GetProcAddress(hLibrary, "lib3mf_writer_getwarningcount"); + pWrapperTable->m_Model_GetImageStackByID = (PLib3MFModel_GetImageStackByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getimagestackbyid"); #else // _WIN32 - pWrapperTable->m_Writer_GetWarningCount = (PLib3MFWriter_GetWarningCountPtr) dlsym(hLibrary, "lib3mf_writer_getwarningcount"); + pWrapperTable->m_Model_GetImageStackByID = (PLib3MFModel_GetImageStackByIDPtr) dlsym(hLibrary, "lib3mf_model_getimagestackbyid"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_GetWarningCount == nullptr) + if (pWrapperTable->m_Model_GetImageStackByID == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_AddKeyWrappingCallback = (PLib3MFWriter_AddKeyWrappingCallbackPtr) GetProcAddress(hLibrary, "lib3mf_writer_addkeywrappingcallback"); + pWrapperTable->m_Model_AddBuildItem = (PLib3MFModel_AddBuildItemPtr) GetProcAddress(hLibrary, "lib3mf_model_addbuilditem"); #else // _WIN32 - pWrapperTable->m_Writer_AddKeyWrappingCallback = (PLib3MFWriter_AddKeyWrappingCallbackPtr) dlsym(hLibrary, "lib3mf_writer_addkeywrappingcallback"); + pWrapperTable->m_Model_AddBuildItem = (PLib3MFModel_AddBuildItemPtr) dlsym(hLibrary, "lib3mf_model_addbuilditem"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_AddKeyWrappingCallback == nullptr) + if (pWrapperTable->m_Model_AddBuildItem == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Writer_SetContentEncryptionCallback = (PLib3MFWriter_SetContentEncryptionCallbackPtr) GetProcAddress(hLibrary, "lib3mf_writer_setcontentencryptioncallback"); + pWrapperTable->m_Model_RemoveBuildItem = (PLib3MFModel_RemoveBuildItemPtr) GetProcAddress(hLibrary, "lib3mf_model_removebuilditem"); #else // _WIN32 - pWrapperTable->m_Writer_SetContentEncryptionCallback = (PLib3MFWriter_SetContentEncryptionCallbackPtr) dlsym(hLibrary, "lib3mf_writer_setcontentencryptioncallback"); + pWrapperTable->m_Model_RemoveBuildItem = (PLib3MFModel_RemoveBuildItemPtr) dlsym(hLibrary, "lib3mf_model_removebuilditem"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Writer_SetContentEncryptionCallback == nullptr) + if (pWrapperTable->m_Model_RemoveBuildItem == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetMetaDataGroup = (PLib3MFModel_GetMetaDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_model_getmetadatagroup"); + #else // _WIN32 + pWrapperTable->m_Model_GetMetaDataGroup = (PLib3MFModel_GetMetaDataGroupPtr) dlsym(hLibrary, "lib3mf_model_getmetadatagroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetMetaDataGroup == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddAttachment = (PLib3MFModel_AddAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_addattachment"); + #else // _WIN32 + pWrapperTable->m_Model_AddAttachment = (PLib3MFModel_AddAttachmentPtr) dlsym(hLibrary, "lib3mf_model_addattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_RemoveAttachment = (PLib3MFModel_RemoveAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_removeattachment"); + #else // _WIN32 + pWrapperTable->m_Model_RemoveAttachment = (PLib3MFModel_RemoveAttachmentPtr) dlsym(hLibrary, "lib3mf_model_removeattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_RemoveAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetAttachment = (PLib3MFModel_GetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_getattachment"); + #else // _WIN32 + pWrapperTable->m_Model_GetAttachment = (PLib3MFModel_GetAttachmentPtr) dlsym(hLibrary, "lib3mf_model_getattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_FindAttachment = (PLib3MFModel_FindAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_findattachment"); + #else // _WIN32 + pWrapperTable->m_Model_FindAttachment = (PLib3MFModel_FindAttachmentPtr) dlsym(hLibrary, "lib3mf_model_findattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_FindAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetAttachmentCount = (PLib3MFModel_GetAttachmentCountPtr) GetProcAddress(hLibrary, "lib3mf_model_getattachmentcount"); + #else // _WIN32 + pWrapperTable->m_Model_GetAttachmentCount = (PLib3MFModel_GetAttachmentCountPtr) dlsym(hLibrary, "lib3mf_model_getattachmentcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetAttachmentCount == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_HasPackageThumbnailAttachment = (PLib3MFModel_HasPackageThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_haspackagethumbnailattachment"); + #else // _WIN32 + pWrapperTable->m_Model_HasPackageThumbnailAttachment = (PLib3MFModel_HasPackageThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_model_haspackagethumbnailattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_HasPackageThumbnailAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_CreatePackageThumbnailAttachment = (PLib3MFModel_CreatePackageThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_createpackagethumbnailattachment"); + #else // _WIN32 + pWrapperTable->m_Model_CreatePackageThumbnailAttachment = (PLib3MFModel_CreatePackageThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_model_createpackagethumbnailattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_CreatePackageThumbnailAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetPackageThumbnailAttachment = (PLib3MFModel_GetPackageThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_getpackagethumbnailattachment"); + #else // _WIN32 + pWrapperTable->m_Model_GetPackageThumbnailAttachment = (PLib3MFModel_GetPackageThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_model_getpackagethumbnailattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetPackageThumbnailAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_RemovePackageThumbnailAttachment = (PLib3MFModel_RemovePackageThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_removepackagethumbnailattachment"); + #else // _WIN32 + pWrapperTable->m_Model_RemovePackageThumbnailAttachment = (PLib3MFModel_RemovePackageThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_model_removepackagethumbnailattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_RemovePackageThumbnailAttachment == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddCustomContentType = (PLib3MFModel_AddCustomContentTypePtr) GetProcAddress(hLibrary, "lib3mf_model_addcustomcontenttype"); + #else // _WIN32 + pWrapperTable->m_Model_AddCustomContentType = (PLib3MFModel_AddCustomContentTypePtr) dlsym(hLibrary, "lib3mf_model_addcustomcontenttype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddCustomContentType == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_RemoveCustomContentType = (PLib3MFModel_RemoveCustomContentTypePtr) GetProcAddress(hLibrary, "lib3mf_model_removecustomcontenttype"); + #else // _WIN32 + pWrapperTable->m_Model_RemoveCustomContentType = (PLib3MFModel_RemoveCustomContentTypePtr) dlsym(hLibrary, "lib3mf_model_removecustomcontenttype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_RemoveCustomContentType == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_ReadFromFile = (PLib3MFReader_ReadFromFilePtr) GetProcAddress(hLibrary, "lib3mf_reader_readfromfile"); + pWrapperTable->m_Model_SetRandomNumberCallback = (PLib3MFModel_SetRandomNumberCallbackPtr) GetProcAddress(hLibrary, "lib3mf_model_setrandomnumbercallback"); #else // _WIN32 - pWrapperTable->m_Reader_ReadFromFile = (PLib3MFReader_ReadFromFilePtr) dlsym(hLibrary, "lib3mf_reader_readfromfile"); + pWrapperTable->m_Model_SetRandomNumberCallback = (PLib3MFModel_SetRandomNumberCallbackPtr) dlsym(hLibrary, "lib3mf_model_setrandomnumbercallback"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_ReadFromFile == nullptr) + if (pWrapperTable->m_Model_SetRandomNumberCallback == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_ReadFromBuffer = (PLib3MFReader_ReadFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_reader_readfrombuffer"); + pWrapperTable->m_Model_GetKeyStore = (PLib3MFModel_GetKeyStorePtr) GetProcAddress(hLibrary, "lib3mf_model_getkeystore"); #else // _WIN32 - pWrapperTable->m_Reader_ReadFromBuffer = (PLib3MFReader_ReadFromBufferPtr) dlsym(hLibrary, "lib3mf_reader_readfrombuffer"); + pWrapperTable->m_Model_GetKeyStore = (PLib3MFModel_GetKeyStorePtr) dlsym(hLibrary, "lib3mf_model_getkeystore"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_ReadFromBuffer == nullptr) + if (pWrapperTable->m_Model_GetKeyStore == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_ReadFromCallback = (PLib3MFReader_ReadFromCallbackPtr) GetProcAddress(hLibrary, "lib3mf_reader_readfromcallback"); + pWrapperTable->m_Model_GetFunctions = (PLib3MFModel_GetFunctionsPtr) GetProcAddress(hLibrary, "lib3mf_model_getfunctions"); #else // _WIN32 - pWrapperTable->m_Reader_ReadFromCallback = (PLib3MFReader_ReadFromCallbackPtr) dlsym(hLibrary, "lib3mf_reader_readfromcallback"); + pWrapperTable->m_Model_GetFunctions = (PLib3MFModel_GetFunctionsPtr) dlsym(hLibrary, "lib3mf_model_getfunctions"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_ReadFromCallback == nullptr) + if (pWrapperTable->m_Model_GetFunctions == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_SetProgressCallback = (PLib3MFReader_SetProgressCallbackPtr) GetProcAddress(hLibrary, "lib3mf_reader_setprogresscallback"); + pWrapperTable->m_Model_AddImplicitFunction = (PLib3MFModel_AddImplicitFunctionPtr) GetProcAddress(hLibrary, "lib3mf_model_addimplicitfunction"); #else // _WIN32 - pWrapperTable->m_Reader_SetProgressCallback = (PLib3MFReader_SetProgressCallbackPtr) dlsym(hLibrary, "lib3mf_reader_setprogresscallback"); + pWrapperTable->m_Model_AddImplicitFunction = (PLib3MFModel_AddImplicitFunctionPtr) dlsym(hLibrary, "lib3mf_model_addimplicitfunction"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_SetProgressCallback == nullptr) + if (pWrapperTable->m_Model_AddImplicitFunction == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_AddRelationToRead = (PLib3MFReader_AddRelationToReadPtr) GetProcAddress(hLibrary, "lib3mf_reader_addrelationtoread"); + pWrapperTable->m_Model_AddFunctionFromImage3D = (PLib3MFModel_AddFunctionFromImage3DPtr) GetProcAddress(hLibrary, "lib3mf_model_addfunctionfromimage3d"); #else // _WIN32 - pWrapperTable->m_Reader_AddRelationToRead = (PLib3MFReader_AddRelationToReadPtr) dlsym(hLibrary, "lib3mf_reader_addrelationtoread"); + pWrapperTable->m_Model_AddFunctionFromImage3D = (PLib3MFModel_AddFunctionFromImage3DPtr) dlsym(hLibrary, "lib3mf_model_addfunctionfromimage3d"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_AddRelationToRead == nullptr) + if (pWrapperTable->m_Model_AddFunctionFromImage3D == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_RemoveRelationToRead = (PLib3MFReader_RemoveRelationToReadPtr) GetProcAddress(hLibrary, "lib3mf_reader_removerelationtoread"); + pWrapperTable->m_Model_AddVolumeData = (PLib3MFModel_AddVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_model_addvolumedata"); #else // _WIN32 - pWrapperTable->m_Reader_RemoveRelationToRead = (PLib3MFReader_RemoveRelationToReadPtr) dlsym(hLibrary, "lib3mf_reader_removerelationtoread"); + pWrapperTable->m_Model_AddVolumeData = (PLib3MFModel_AddVolumeDataPtr) dlsym(hLibrary, "lib3mf_model_addvolumedata"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_RemoveRelationToRead == nullptr) + if (pWrapperTable->m_Model_AddVolumeData == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_SetStrictModeActive = (PLib3MFReader_SetStrictModeActivePtr) GetProcAddress(hLibrary, "lib3mf_reader_setstrictmodeactive"); + pWrapperTable->m_Model_AddLevelSet = (PLib3MFModel_AddLevelSetPtr) GetProcAddress(hLibrary, "lib3mf_model_addlevelset"); #else // _WIN32 - pWrapperTable->m_Reader_SetStrictModeActive = (PLib3MFReader_SetStrictModeActivePtr) dlsym(hLibrary, "lib3mf_reader_setstrictmodeactive"); + pWrapperTable->m_Model_AddLevelSet = (PLib3MFModel_AddLevelSetPtr) dlsym(hLibrary, "lib3mf_model_addlevelset"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_SetStrictModeActive == nullptr) + if (pWrapperTable->m_Model_AddLevelSet == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_GetStrictModeActive = (PLib3MFReader_GetStrictModeActivePtr) GetProcAddress(hLibrary, "lib3mf_reader_getstrictmodeactive"); + pWrapperTable->m_Model_GetLevelSets = (PLib3MFModel_GetLevelSetsPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsets"); #else // _WIN32 - pWrapperTable->m_Reader_GetStrictModeActive = (PLib3MFReader_GetStrictModeActivePtr) dlsym(hLibrary, "lib3mf_reader_getstrictmodeactive"); + pWrapperTable->m_Model_GetLevelSets = (PLib3MFModel_GetLevelSetsPtr) dlsym(hLibrary, "lib3mf_model_getlevelsets"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_GetStrictModeActive == nullptr) + if (pWrapperTable->m_Model_GetLevelSets == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_GetWarning = (PLib3MFReader_GetWarningPtr) GetProcAddress(hLibrary, "lib3mf_reader_getwarning"); + pWrapperTable->m_Model_RemoveResource = (PLib3MFModel_RemoveResourcePtr) GetProcAddress(hLibrary, "lib3mf_model_removeresource"); #else // _WIN32 - pWrapperTable->m_Reader_GetWarning = (PLib3MFReader_GetWarningPtr) dlsym(hLibrary, "lib3mf_reader_getwarning"); + pWrapperTable->m_Model_RemoveResource = (PLib3MFModel_RemoveResourcePtr) dlsym(hLibrary, "lib3mf_model_removeresource"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_GetWarning == nullptr) + if (pWrapperTable->m_Model_RemoveResource == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_GetWarningCount = (PLib3MFReader_GetWarningCountPtr) GetProcAddress(hLibrary, "lib3mf_reader_getwarningcount"); + pWrapperTable->m_GetLibraryVersion = (PLib3MFGetLibraryVersionPtr) GetProcAddress(hLibrary, "lib3mf_getlibraryversion"); #else // _WIN32 - pWrapperTable->m_Reader_GetWarningCount = (PLib3MFReader_GetWarningCountPtr) dlsym(hLibrary, "lib3mf_reader_getwarningcount"); + pWrapperTable->m_GetLibraryVersion = (PLib3MFGetLibraryVersionPtr) dlsym(hLibrary, "lib3mf_getlibraryversion"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_GetWarningCount == nullptr) + if (pWrapperTable->m_GetLibraryVersion == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_AddKeyWrappingCallback = (PLib3MFReader_AddKeyWrappingCallbackPtr) GetProcAddress(hLibrary, "lib3mf_reader_addkeywrappingcallback"); + pWrapperTable->m_GetPrereleaseInformation = (PLib3MFGetPrereleaseInformationPtr) GetProcAddress(hLibrary, "lib3mf_getprereleaseinformation"); #else // _WIN32 - pWrapperTable->m_Reader_AddKeyWrappingCallback = (PLib3MFReader_AddKeyWrappingCallbackPtr) dlsym(hLibrary, "lib3mf_reader_addkeywrappingcallback"); + pWrapperTable->m_GetPrereleaseInformation = (PLib3MFGetPrereleaseInformationPtr) dlsym(hLibrary, "lib3mf_getprereleaseinformation"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_AddKeyWrappingCallback == nullptr) + if (pWrapperTable->m_GetPrereleaseInformation == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Reader_SetContentEncryptionCallback = (PLib3MFReader_SetContentEncryptionCallbackPtr) GetProcAddress(hLibrary, "lib3mf_reader_setcontentencryptioncallback"); + pWrapperTable->m_GetBuildInformation = (PLib3MFGetBuildInformationPtr) GetProcAddress(hLibrary, "lib3mf_getbuildinformation"); #else // _WIN32 - pWrapperTable->m_Reader_SetContentEncryptionCallback = (PLib3MFReader_SetContentEncryptionCallbackPtr) dlsym(hLibrary, "lib3mf_reader_setcontentencryptioncallback"); + pWrapperTable->m_GetBuildInformation = (PLib3MFGetBuildInformationPtr) dlsym(hLibrary, "lib3mf_getbuildinformation"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Reader_SetContentEncryptionCallback == nullptr) + if (pWrapperTable->m_GetBuildInformation == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_PackagePart_GetPath = (PLib3MFPackagePart_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_packagepart_getpath"); + pWrapperTable->m_GetSpecificationVersion = (PLib3MFGetSpecificationVersionPtr) GetProcAddress(hLibrary, "lib3mf_getspecificationversion"); #else // _WIN32 - pWrapperTable->m_PackagePart_GetPath = (PLib3MFPackagePart_GetPathPtr) dlsym(hLibrary, "lib3mf_packagepart_getpath"); + pWrapperTable->m_GetSpecificationVersion = (PLib3MFGetSpecificationVersionPtr) dlsym(hLibrary, "lib3mf_getspecificationversion"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_PackagePart_GetPath == nullptr) + if (pWrapperTable->m_GetSpecificationVersion == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_PackagePart_SetPath = (PLib3MFPackagePart_SetPathPtr) GetProcAddress(hLibrary, "lib3mf_packagepart_setpath"); + pWrapperTable->m_CreateModel = (PLib3MFCreateModelPtr) GetProcAddress(hLibrary, "lib3mf_createmodel"); #else // _WIN32 - pWrapperTable->m_PackagePart_SetPath = (PLib3MFPackagePart_SetPathPtr) dlsym(hLibrary, "lib3mf_packagepart_setpath"); + pWrapperTable->m_CreateModel = (PLib3MFCreateModelPtr) dlsym(hLibrary, "lib3mf_createmodel"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_PackagePart_SetPath == nullptr) + if (pWrapperTable->m_CreateModel == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Resource_GetResourceID = (PLib3MFResource_GetResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_resource_getresourceid"); + pWrapperTable->m_Release = (PLib3MFReleasePtr) GetProcAddress(hLibrary, "lib3mf_release"); #else // _WIN32 - pWrapperTable->m_Resource_GetResourceID = (PLib3MFResource_GetResourceIDPtr) dlsym(hLibrary, "lib3mf_resource_getresourceid"); + pWrapperTable->m_Release = (PLib3MFReleasePtr) dlsym(hLibrary, "lib3mf_release"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Resource_GetResourceID == nullptr) + if (pWrapperTable->m_Release == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Resource_GetUniqueResourceID = (PLib3MFResource_GetUniqueResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_resource_getuniqueresourceid"); + pWrapperTable->m_Acquire = (PLib3MFAcquirePtr) GetProcAddress(hLibrary, "lib3mf_acquire"); #else // _WIN32 - pWrapperTable->m_Resource_GetUniqueResourceID = (PLib3MFResource_GetUniqueResourceIDPtr) dlsym(hLibrary, "lib3mf_resource_getuniqueresourceid"); + pWrapperTable->m_Acquire = (PLib3MFAcquirePtr) dlsym(hLibrary, "lib3mf_acquire"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Resource_GetUniqueResourceID == nullptr) + if (pWrapperTable->m_Acquire == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Resource_PackagePart = (PLib3MFResource_PackagePartPtr) GetProcAddress(hLibrary, "lib3mf_resource_packagepart"); + pWrapperTable->m_SetJournal = (PLib3MFSetJournalPtr) GetProcAddress(hLibrary, "lib3mf_setjournal"); #else // _WIN32 - pWrapperTable->m_Resource_PackagePart = (PLib3MFResource_PackagePartPtr) dlsym(hLibrary, "lib3mf_resource_packagepart"); + pWrapperTable->m_SetJournal = (PLib3MFSetJournalPtr) dlsym(hLibrary, "lib3mf_setjournal"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Resource_PackagePart == nullptr) + if (pWrapperTable->m_SetJournal == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Resource_SetPackagePart = (PLib3MFResource_SetPackagePartPtr) GetProcAddress(hLibrary, "lib3mf_resource_setpackagepart"); + pWrapperTable->m_GetLastError = (PLib3MFGetLastErrorPtr) GetProcAddress(hLibrary, "lib3mf_getlasterror"); #else // _WIN32 - pWrapperTable->m_Resource_SetPackagePart = (PLib3MFResource_SetPackagePartPtr) dlsym(hLibrary, "lib3mf_resource_setpackagepart"); + pWrapperTable->m_GetLastError = (PLib3MFGetLastErrorPtr) dlsym(hLibrary, "lib3mf_getlasterror"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Resource_SetPackagePart == nullptr) + if (pWrapperTable->m_GetLastError == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Resource_GetModelResourceID = (PLib3MFResource_GetModelResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_resource_getmodelresourceid"); + pWrapperTable->m_GetSymbolLookupMethod = (PLib3MFGetSymbolLookupMethodPtr) GetProcAddress(hLibrary, "lib3mf_getsymbollookupmethod"); #else // _WIN32 - pWrapperTable->m_Resource_GetModelResourceID = (PLib3MFResource_GetModelResourceIDPtr) dlsym(hLibrary, "lib3mf_resource_getmodelresourceid"); + pWrapperTable->m_GetSymbolLookupMethod = (PLib3MFGetSymbolLookupMethodPtr) dlsym(hLibrary, "lib3mf_getsymbollookupmethod"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Resource_GetModelResourceID == nullptr) + if (pWrapperTable->m_GetSymbolLookupMethod == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ResourceIterator_MoveNext = (PLib3MFResourceIterator_MoveNextPtr) GetProcAddress(hLibrary, "lib3mf_resourceiterator_movenext"); + pWrapperTable->m_RetrieveProgressMessage = (PLib3MFRetrieveProgressMessagePtr) GetProcAddress(hLibrary, "lib3mf_retrieveprogressmessage"); #else // _WIN32 - pWrapperTable->m_ResourceIterator_MoveNext = (PLib3MFResourceIterator_MoveNextPtr) dlsym(hLibrary, "lib3mf_resourceiterator_movenext"); + pWrapperTable->m_RetrieveProgressMessage = (PLib3MFRetrieveProgressMessagePtr) dlsym(hLibrary, "lib3mf_retrieveprogressmessage"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ResourceIterator_MoveNext == nullptr) + if (pWrapperTable->m_RetrieveProgressMessage == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ResourceIterator_MovePrevious = (PLib3MFResourceIterator_MovePreviousPtr) GetProcAddress(hLibrary, "lib3mf_resourceiterator_moveprevious"); + pWrapperTable->m_RGBAToColor = (PLib3MFRGBAToColorPtr) GetProcAddress(hLibrary, "lib3mf_rgbatocolor"); #else // _WIN32 - pWrapperTable->m_ResourceIterator_MovePrevious = (PLib3MFResourceIterator_MovePreviousPtr) dlsym(hLibrary, "lib3mf_resourceiterator_moveprevious"); + pWrapperTable->m_RGBAToColor = (PLib3MFRGBAToColorPtr) dlsym(hLibrary, "lib3mf_rgbatocolor"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ResourceIterator_MovePrevious == nullptr) + if (pWrapperTable->m_RGBAToColor == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ResourceIterator_GetCurrent = (PLib3MFResourceIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_resourceiterator_getcurrent"); + pWrapperTable->m_FloatRGBAToColor = (PLib3MFFloatRGBAToColorPtr) GetProcAddress(hLibrary, "lib3mf_floatrgbatocolor"); #else // _WIN32 - pWrapperTable->m_ResourceIterator_GetCurrent = (PLib3MFResourceIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_resourceiterator_getcurrent"); + pWrapperTable->m_FloatRGBAToColor = (PLib3MFFloatRGBAToColorPtr) dlsym(hLibrary, "lib3mf_floatrgbatocolor"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ResourceIterator_GetCurrent == nullptr) + if (pWrapperTable->m_FloatRGBAToColor == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ResourceIterator_Clone = (PLib3MFResourceIterator_ClonePtr) GetProcAddress(hLibrary, "lib3mf_resourceiterator_clone"); + pWrapperTable->m_ColorToRGBA = (PLib3MFColorToRGBAPtr) GetProcAddress(hLibrary, "lib3mf_colortorgba"); #else // _WIN32 - pWrapperTable->m_ResourceIterator_Clone = (PLib3MFResourceIterator_ClonePtr) dlsym(hLibrary, "lib3mf_resourceiterator_clone"); + pWrapperTable->m_ColorToRGBA = (PLib3MFColorToRGBAPtr) dlsym(hLibrary, "lib3mf_colortorgba"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ResourceIterator_Clone == nullptr) + if (pWrapperTable->m_ColorToRGBA == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ResourceIterator_Count = (PLib3MFResourceIterator_CountPtr) GetProcAddress(hLibrary, "lib3mf_resourceiterator_count"); + pWrapperTable->m_ColorToFloatRGBA = (PLib3MFColorToFloatRGBAPtr) GetProcAddress(hLibrary, "lib3mf_colortofloatrgba"); #else // _WIN32 - pWrapperTable->m_ResourceIterator_Count = (PLib3MFResourceIterator_CountPtr) dlsym(hLibrary, "lib3mf_resourceiterator_count"); + pWrapperTable->m_ColorToFloatRGBA = (PLib3MFColorToFloatRGBAPtr) dlsym(hLibrary, "lib3mf_colortofloatrgba"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ResourceIterator_Count == nullptr) + if (pWrapperTable->m_ColorToFloatRGBA == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack = (PLib3MFSliceStackIterator_GetCurrentSliceStackPtr) GetProcAddress(hLibrary, "lib3mf_slicestackiterator_getcurrentslicestack"); + pWrapperTable->m_GetIdentityTransform = (PLib3MFGetIdentityTransformPtr) GetProcAddress(hLibrary, "lib3mf_getidentitytransform"); #else // _WIN32 - pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack = (PLib3MFSliceStackIterator_GetCurrentSliceStackPtr) dlsym(hLibrary, "lib3mf_slicestackiterator_getcurrentslicestack"); + pWrapperTable->m_GetIdentityTransform = (PLib3MFGetIdentityTransformPtr) dlsym(hLibrary, "lib3mf_getidentitytransform"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack == nullptr) + if (pWrapperTable->m_GetIdentityTransform == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ObjectIterator_GetCurrentObject = (PLib3MFObjectIterator_GetCurrentObjectPtr) GetProcAddress(hLibrary, "lib3mf_objectiterator_getcurrentobject"); + pWrapperTable->m_GetUniformScaleTransform = (PLib3MFGetUniformScaleTransformPtr) GetProcAddress(hLibrary, "lib3mf_getuniformscaletransform"); #else // _WIN32 - pWrapperTable->m_ObjectIterator_GetCurrentObject = (PLib3MFObjectIterator_GetCurrentObjectPtr) dlsym(hLibrary, "lib3mf_objectiterator_getcurrentobject"); + pWrapperTable->m_GetUniformScaleTransform = (PLib3MFGetUniformScaleTransformPtr) dlsym(hLibrary, "lib3mf_getuniformscaletransform"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ObjectIterator_GetCurrentObject == nullptr) + if (pWrapperTable->m_GetUniformScaleTransform == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject = (PLib3MFMeshObjectIterator_GetCurrentMeshObjectPtr) GetProcAddress(hLibrary, "lib3mf_meshobjectiterator_getcurrentmeshobject"); + pWrapperTable->m_GetScaleTransform = (PLib3MFGetScaleTransformPtr) GetProcAddress(hLibrary, "lib3mf_getscaletransform"); #else // _WIN32 - pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject = (PLib3MFMeshObjectIterator_GetCurrentMeshObjectPtr) dlsym(hLibrary, "lib3mf_meshobjectiterator_getcurrentmeshobject"); + pWrapperTable->m_GetScaleTransform = (PLib3MFGetScaleTransformPtr) dlsym(hLibrary, "lib3mf_getscaletransform"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject == nullptr) + if (pWrapperTable->m_GetScaleTransform == nullptr) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject = (PLib3MFComponentsObjectIterator_GetCurrentComponentsObjectPtr) GetProcAddress(hLibrary, "lib3mf_componentsobjectiterator_getcurrentcomponentsobject"); + pWrapperTable->m_GetTranslationTransform = (PLib3MFGetTranslationTransformPtr) GetProcAddress(hLibrary, "lib3mf_gettranslationtransform"); #else // _WIN32 - pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject = (PLib3MFComponentsObjectIterator_GetCurrentComponentsObjectPtr) dlsym(hLibrary, "lib3mf_componentsobjectiterator_getcurrentcomponentsobject"); + pWrapperTable->m_GetTranslationTransform = (PLib3MFGetTranslationTransformPtr) dlsym(hLibrary, "lib3mf_gettranslationtransform"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject == nullptr) + if (pWrapperTable->m_GetTranslationTransform == nullptr) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + pWrapperTable->m_LibraryHandle = hLibrary; + return LIB3MF_SUCCESS; + } + + inline Lib3MFResult CWrapper::loadWrapperTableFromSymbolLookupMethod(sLib3MFDynamicWrapperTable * pWrapperTable, void* pSymbolLookupMethod) +{ + if (pWrapperTable == nullptr) + return LIB3MF_ERROR_INVALIDPARAM; + if (pSymbolLookupMethod == nullptr) + return LIB3MF_ERROR_INVALIDPARAM; + + typedef Lib3MFResult(*SymbolLookupType)(const char*, void**); + + SymbolLookupType pLookup = (SymbolLookupType)pSymbolLookupMethod; + + Lib3MFResult eLookupError = LIB3MF_SUCCESS; + eLookupError = (*pLookup)("lib3mf_base_classtypeid", (void**)&(pWrapperTable->m_Base_ClassTypeId)); + if ( (eLookupError != 0) || (pWrapperTable->m_Base_ClassTypeId == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_writetofile", (void**)&(pWrapperTable->m_Writer_WriteToFile)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_WriteToFile == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_getstreamsize", (void**)&(pWrapperTable->m_Writer_GetStreamSize)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_GetStreamSize == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_writetobuffer", (void**)&(pWrapperTable->m_Writer_WriteToBuffer)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_WriteToBuffer == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_writetocallback", (void**)&(pWrapperTable->m_Writer_WriteToCallback)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_WriteToCallback == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_setprogresscallback", (void**)&(pWrapperTable->m_Writer_SetProgressCallback)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_SetProgressCallback == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_getdecimalprecision", (void**)&(pWrapperTable->m_Writer_GetDecimalPrecision)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_GetDecimalPrecision == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_setdecimalprecision", (void**)&(pWrapperTable->m_Writer_SetDecimalPrecision)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_SetDecimalPrecision == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_setstrictmodeactive", (void**)&(pWrapperTable->m_Writer_SetStrictModeActive)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_SetStrictModeActive == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_getstrictmodeactive", (void**)&(pWrapperTable->m_Writer_GetStrictModeActive)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_GetStrictModeActive == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_getwarning", (void**)&(pWrapperTable->m_Writer_GetWarning)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_GetWarning == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_getwarningcount", (void**)&(pWrapperTable->m_Writer_GetWarningCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_GetWarningCount == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_addkeywrappingcallback", (void**)&(pWrapperTable->m_Writer_AddKeyWrappingCallback)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_AddKeyWrappingCallback == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_writer_setcontentencryptioncallback", (void**)&(pWrapperTable->m_Writer_SetContentEncryptionCallback)); + if ( (eLookupError != 0) || (pWrapperTable->m_Writer_SetContentEncryptionCallback == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_reader_readfromfile", (void**)&(pWrapperTable->m_Reader_ReadFromFile)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_ReadFromFile == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_reader_readfrombuffer", (void**)&(pWrapperTable->m_Reader_ReadFromBuffer)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_ReadFromBuffer == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_reader_readfromcallback", (void**)&(pWrapperTable->m_Reader_ReadFromCallback)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_ReadFromCallback == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_reader_setprogresscallback", (void**)&(pWrapperTable->m_Reader_SetProgressCallback)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_SetProgressCallback == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_reader_addrelationtoread", (void**)&(pWrapperTable->m_Reader_AddRelationToRead)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_AddRelationToRead == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_reader_removerelationtoread", (void**)&(pWrapperTable->m_Reader_RemoveRelationToRead)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_RemoveRelationToRead == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_reader_setstrictmodeactive", (void**)&(pWrapperTable->m_Reader_SetStrictModeActive)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_SetStrictModeActive == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_reader_getstrictmodeactive", (void**)&(pWrapperTable->m_Reader_GetStrictModeActive)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_GetStrictModeActive == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_reader_getwarning", (void**)&(pWrapperTable->m_Reader_GetWarning)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_GetWarning == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D = (PLib3MFTexture2DIterator_GetCurrentTexture2DPtr) GetProcAddress(hLibrary, "lib3mf_texture2diterator_getcurrenttexture2d"); - #else // _WIN32 - pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D = (PLib3MFTexture2DIterator_GetCurrentTexture2DPtr) dlsym(hLibrary, "lib3mf_texture2diterator_getcurrenttexture2d"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D == nullptr) + eLookupError = (*pLookup)("lib3mf_reader_getwarningcount", (void**)&(pWrapperTable->m_Reader_GetWarningCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_GetWarningCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup = (PLib3MFBaseMaterialGroupIterator_GetCurrentBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup"); - #else // _WIN32 - pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup = (PLib3MFBaseMaterialGroupIterator_GetCurrentBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_reader_addkeywrappingcallback", (void**)&(pWrapperTable->m_Reader_AddKeyWrappingCallback)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_AddKeyWrappingCallback == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup = (PLib3MFColorGroupIterator_GetCurrentColorGroupPtr) GetProcAddress(hLibrary, "lib3mf_colorgroupiterator_getcurrentcolorgroup"); - #else // _WIN32 - pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup = (PLib3MFColorGroupIterator_GetCurrentColorGroupPtr) dlsym(hLibrary, "lib3mf_colorgroupiterator_getcurrentcolorgroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_reader_setcontentencryptioncallback", (void**)&(pWrapperTable->m_Reader_SetContentEncryptionCallback)); + if ( (eLookupError != 0) || (pWrapperTable->m_Reader_SetContentEncryptionCallback == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup = (PLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup"); - #else // _WIN32 - pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup = (PLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupPtr) dlsym(hLibrary, "lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_packagepart_getpath", (void**)&(pWrapperTable->m_PackagePart_GetPath)); + if ( (eLookupError != 0) || (pWrapperTable->m_PackagePart_GetPath == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials = (PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsPtr) GetProcAddress(hLibrary, "lib3mf_compositematerialsiterator_getcurrentcompositematerials"); - #else // _WIN32 - pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials = (PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsPtr) dlsym(hLibrary, "lib3mf_compositematerialsiterator_getcurrentcompositematerials"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials == nullptr) + eLookupError = (*pLookup)("lib3mf_packagepart_setpath", (void**)&(pWrapperTable->m_PackagePart_SetPath)); + if ( (eLookupError != 0) || (pWrapperTable->m_PackagePart_SetPath == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup = (PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup"); - #else // _WIN32 - pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup = (PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr) dlsym(hLibrary, "lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_resource_getresourceid", (void**)&(pWrapperTable->m_Resource_GetResourceID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Resource_GetResourceID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaData_GetNameSpace = (PLib3MFMetaData_GetNameSpacePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getnamespace"); - #else // _WIN32 - pWrapperTable->m_MetaData_GetNameSpace = (PLib3MFMetaData_GetNameSpacePtr) dlsym(hLibrary, "lib3mf_metadata_getnamespace"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaData_GetNameSpace == nullptr) + eLookupError = (*pLookup)("lib3mf_resource_getuniqueresourceid", (void**)&(pWrapperTable->m_Resource_GetUniqueResourceID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Resource_GetUniqueResourceID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaData_SetNameSpace = (PLib3MFMetaData_SetNameSpacePtr) GetProcAddress(hLibrary, "lib3mf_metadata_setnamespace"); - #else // _WIN32 - pWrapperTable->m_MetaData_SetNameSpace = (PLib3MFMetaData_SetNameSpacePtr) dlsym(hLibrary, "lib3mf_metadata_setnamespace"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaData_SetNameSpace == nullptr) + eLookupError = (*pLookup)("lib3mf_resource_packagepart", (void**)&(pWrapperTable->m_Resource_PackagePart)); + if ( (eLookupError != 0) || (pWrapperTable->m_Resource_PackagePart == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaData_GetName = (PLib3MFMetaData_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getname"); - #else // _WIN32 - pWrapperTable->m_MetaData_GetName = (PLib3MFMetaData_GetNamePtr) dlsym(hLibrary, "lib3mf_metadata_getname"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaData_GetName == nullptr) + eLookupError = (*pLookup)("lib3mf_resource_setpackagepart", (void**)&(pWrapperTable->m_Resource_SetPackagePart)); + if ( (eLookupError != 0) || (pWrapperTable->m_Resource_SetPackagePart == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaData_SetName = (PLib3MFMetaData_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_metadata_setname"); - #else // _WIN32 - pWrapperTable->m_MetaData_SetName = (PLib3MFMetaData_SetNamePtr) dlsym(hLibrary, "lib3mf_metadata_setname"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaData_SetName == nullptr) + eLookupError = (*pLookup)("lib3mf_resource_getmodelresourceid", (void**)&(pWrapperTable->m_Resource_GetModelResourceID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Resource_GetModelResourceID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaData_GetKey = (PLib3MFMetaData_GetKeyPtr) GetProcAddress(hLibrary, "lib3mf_metadata_getkey"); - #else // _WIN32 - pWrapperTable->m_MetaData_GetKey = (PLib3MFMetaData_GetKeyPtr) dlsym(hLibrary, "lib3mf_metadata_getkey"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaData_GetKey == nullptr) + eLookupError = (*pLookup)("lib3mf_resourceiterator_movenext", (void**)&(pWrapperTable->m_ResourceIterator_MoveNext)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIterator_MoveNext == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaData_GetMustPreserve = (PLib3MFMetaData_GetMustPreservePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getmustpreserve"); - #else // _WIN32 - pWrapperTable->m_MetaData_GetMustPreserve = (PLib3MFMetaData_GetMustPreservePtr) dlsym(hLibrary, "lib3mf_metadata_getmustpreserve"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaData_GetMustPreserve == nullptr) + eLookupError = (*pLookup)("lib3mf_resourceiterator_moveprevious", (void**)&(pWrapperTable->m_ResourceIterator_MovePrevious)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIterator_MovePrevious == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaData_SetMustPreserve = (PLib3MFMetaData_SetMustPreservePtr) GetProcAddress(hLibrary, "lib3mf_metadata_setmustpreserve"); - #else // _WIN32 - pWrapperTable->m_MetaData_SetMustPreserve = (PLib3MFMetaData_SetMustPreservePtr) dlsym(hLibrary, "lib3mf_metadata_setmustpreserve"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaData_SetMustPreserve == nullptr) + eLookupError = (*pLookup)("lib3mf_resourceiterator_getcurrent", (void**)&(pWrapperTable->m_ResourceIterator_GetCurrent)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIterator_GetCurrent == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaData_GetType = (PLib3MFMetaData_GetTypePtr) GetProcAddress(hLibrary, "lib3mf_metadata_gettype"); - #else // _WIN32 - pWrapperTable->m_MetaData_GetType = (PLib3MFMetaData_GetTypePtr) dlsym(hLibrary, "lib3mf_metadata_gettype"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaData_GetType == nullptr) + eLookupError = (*pLookup)("lib3mf_resourceiterator_clone", (void**)&(pWrapperTable->m_ResourceIterator_Clone)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIterator_Clone == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaData_SetType = (PLib3MFMetaData_SetTypePtr) GetProcAddress(hLibrary, "lib3mf_metadata_settype"); - #else // _WIN32 - pWrapperTable->m_MetaData_SetType = (PLib3MFMetaData_SetTypePtr) dlsym(hLibrary, "lib3mf_metadata_settype"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaData_SetType == nullptr) + eLookupError = (*pLookup)("lib3mf_resourceiterator_count", (void**)&(pWrapperTable->m_ResourceIterator_Count)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIterator_Count == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaData_GetValue = (PLib3MFMetaData_GetValuePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getvalue"); - #else // _WIN32 - pWrapperTable->m_MetaData_GetValue = (PLib3MFMetaData_GetValuePtr) dlsym(hLibrary, "lib3mf_metadata_getvalue"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaData_GetValue == nullptr) + eLookupError = (*pLookup)("lib3mf_slicestackiterator_getcurrentslicestack", (void**)&(pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack)); + if ( (eLookupError != 0) || (pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaData_SetValue = (PLib3MFMetaData_SetValuePtr) GetProcAddress(hLibrary, "lib3mf_metadata_setvalue"); - #else // _WIN32 - pWrapperTable->m_MetaData_SetValue = (PLib3MFMetaData_SetValuePtr) dlsym(hLibrary, "lib3mf_metadata_setvalue"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaData_SetValue == nullptr) + eLookupError = (*pLookup)("lib3mf_objectiterator_getcurrentobject", (void**)&(pWrapperTable->m_ObjectIterator_GetCurrentObject)); + if ( (eLookupError != 0) || (pWrapperTable->m_ObjectIterator_GetCurrentObject == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaDataGroup_GetMetaDataCount = (PLib3MFMetaDataGroup_GetMetaDataCountPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_getmetadatacount"); - #else // _WIN32 - pWrapperTable->m_MetaDataGroup_GetMetaDataCount = (PLib3MFMetaDataGroup_GetMetaDataCountPtr) dlsym(hLibrary, "lib3mf_metadatagroup_getmetadatacount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaDataGroup_GetMetaDataCount == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobjectiterator_getcurrentmeshobject", (void**)&(pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaDataGroup_GetMetaData = (PLib3MFMetaDataGroup_GetMetaDataPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_getmetadata"); - #else // _WIN32 - pWrapperTable->m_MetaDataGroup_GetMetaData = (PLib3MFMetaDataGroup_GetMetaDataPtr) dlsym(hLibrary, "lib3mf_metadatagroup_getmetadata"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaDataGroup_GetMetaData == nullptr) + eLookupError = (*pLookup)("lib3mf_componentsobjectiterator_getcurrentcomponentsobject", (void**)&(pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaDataGroup_GetMetaDataByKey = (PLib3MFMetaDataGroup_GetMetaDataByKeyPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_getmetadatabykey"); - #else // _WIN32 - pWrapperTable->m_MetaDataGroup_GetMetaDataByKey = (PLib3MFMetaDataGroup_GetMetaDataByKeyPtr) dlsym(hLibrary, "lib3mf_metadatagroup_getmetadatabykey"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaDataGroup_GetMetaDataByKey == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2diterator_getcurrenttexture2d", (void**)&(pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaDataGroup_RemoveMetaDataByIndex = (PLib3MFMetaDataGroup_RemoveMetaDataByIndexPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_removemetadatabyindex"); - #else // _WIN32 - pWrapperTable->m_MetaDataGroup_RemoveMetaDataByIndex = (PLib3MFMetaDataGroup_RemoveMetaDataByIndexPtr) dlsym(hLibrary, "lib3mf_metadatagroup_removemetadatabyindex"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaDataGroup_RemoveMetaDataByIndex == nullptr) + eLookupError = (*pLookup)("lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup", (void**)&(pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaDataGroup_RemoveMetaData = (PLib3MFMetaDataGroup_RemoveMetaDataPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_removemetadata"); - #else // _WIN32 - pWrapperTable->m_MetaDataGroup_RemoveMetaData = (PLib3MFMetaDataGroup_RemoveMetaDataPtr) dlsym(hLibrary, "lib3mf_metadatagroup_removemetadata"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaDataGroup_RemoveMetaData == nullptr) + eLookupError = (*pLookup)("lib3mf_colorgroupiterator_getcurrentcolorgroup", (void**)&(pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MetaDataGroup_AddMetaData = (PLib3MFMetaDataGroup_AddMetaDataPtr) GetProcAddress(hLibrary, "lib3mf_metadatagroup_addmetadata"); - #else // _WIN32 - pWrapperTable->m_MetaDataGroup_AddMetaData = (PLib3MFMetaDataGroup_AddMetaDataPtr) dlsym(hLibrary, "lib3mf_metadatagroup_addmetadata"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MetaDataGroup_AddMetaData == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup", (void**)&(pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_GetType = (PLib3MFObject_GetTypePtr) GetProcAddress(hLibrary, "lib3mf_object_gettype"); - #else // _WIN32 - pWrapperTable->m_Object_GetType = (PLib3MFObject_GetTypePtr) dlsym(hLibrary, "lib3mf_object_gettype"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_GetType == nullptr) + eLookupError = (*pLookup)("lib3mf_compositematerialsiterator_getcurrentcompositematerials", (void**)&(pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials)); + if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_SetType = (PLib3MFObject_SetTypePtr) GetProcAddress(hLibrary, "lib3mf_object_settype"); - #else // _WIN32 - pWrapperTable->m_Object_SetType = (PLib3MFObject_SetTypePtr) dlsym(hLibrary, "lib3mf_object_settype"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_SetType == nullptr) + eLookupError = (*pLookup)("lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup", (void**)&(pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_GetName = (PLib3MFObject_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_object_getname"); - #else // _WIN32 - pWrapperTable->m_Object_GetName = (PLib3MFObject_GetNamePtr) dlsym(hLibrary, "lib3mf_object_getname"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_GetName == nullptr) + eLookupError = (*pLookup)("lib3mf_image3diterator_getcurrentimage3d", (void**)&(pWrapperTable->m_Image3DIterator_GetCurrentImage3D)); + if ( (eLookupError != 0) || (pWrapperTable->m_Image3DIterator_GetCurrentImage3D == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_SetName = (PLib3MFObject_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_object_setname"); - #else // _WIN32 - pWrapperTable->m_Object_SetName = (PLib3MFObject_SetNamePtr) dlsym(hLibrary, "lib3mf_object_setname"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_SetName == nullptr) + eLookupError = (*pLookup)("lib3mf_functioniterator_getcurrentfunction", (void**)&(pWrapperTable->m_FunctionIterator_GetCurrentFunction)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionIterator_GetCurrentFunction == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_GetPartNumber = (PLib3MFObject_GetPartNumberPtr) GetProcAddress(hLibrary, "lib3mf_object_getpartnumber"); - #else // _WIN32 - pWrapperTable->m_Object_GetPartNumber = (PLib3MFObject_GetPartNumberPtr) dlsym(hLibrary, "lib3mf_object_getpartnumber"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_GetPartNumber == nullptr) + eLookupError = (*pLookup)("lib3mf_levelsetiterator_getcurrentlevelset", (void**)&(pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_SetPartNumber = (PLib3MFObject_SetPartNumberPtr) GetProcAddress(hLibrary, "lib3mf_object_setpartnumber"); - #else // _WIN32 - pWrapperTable->m_Object_SetPartNumber = (PLib3MFObject_SetPartNumberPtr) dlsym(hLibrary, "lib3mf_object_setpartnumber"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_SetPartNumber == nullptr) + eLookupError = (*pLookup)("lib3mf_metadata_getnamespace", (void**)&(pWrapperTable->m_MetaData_GetNameSpace)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetNameSpace == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_metadata_setnamespace", (void**)&(pWrapperTable->m_MetaData_SetNameSpace)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_SetNameSpace == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_IsMeshObject = (PLib3MFObject_IsMeshObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_ismeshobject"); - #else // _WIN32 - pWrapperTable->m_Object_IsMeshObject = (PLib3MFObject_IsMeshObjectPtr) dlsym(hLibrary, "lib3mf_object_ismeshobject"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_IsMeshObject == nullptr) + eLookupError = (*pLookup)("lib3mf_metadata_getname", (void**)&(pWrapperTable->m_MetaData_GetName)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_IsComponentsObject = (PLib3MFObject_IsComponentsObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_iscomponentsobject"); - #else // _WIN32 - pWrapperTable->m_Object_IsComponentsObject = (PLib3MFObject_IsComponentsObjectPtr) dlsym(hLibrary, "lib3mf_object_iscomponentsobject"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_IsComponentsObject == nullptr) + eLookupError = (*pLookup)("lib3mf_metadata_setname", (void**)&(pWrapperTable->m_MetaData_SetName)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_SetName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_IsValid = (PLib3MFObject_IsValidPtr) GetProcAddress(hLibrary, "lib3mf_object_isvalid"); - #else // _WIN32 - pWrapperTable->m_Object_IsValid = (PLib3MFObject_IsValidPtr) dlsym(hLibrary, "lib3mf_object_isvalid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_IsValid == nullptr) + eLookupError = (*pLookup)("lib3mf_metadata_getkey", (void**)&(pWrapperTable->m_MetaData_GetKey)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetKey == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_SetAttachmentAsThumbnail = (PLib3MFObject_SetAttachmentAsThumbnailPtr) GetProcAddress(hLibrary, "lib3mf_object_setattachmentasthumbnail"); - #else // _WIN32 - pWrapperTable->m_Object_SetAttachmentAsThumbnail = (PLib3MFObject_SetAttachmentAsThumbnailPtr) dlsym(hLibrary, "lib3mf_object_setattachmentasthumbnail"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_SetAttachmentAsThumbnail == nullptr) + eLookupError = (*pLookup)("lib3mf_metadata_getmustpreserve", (void**)&(pWrapperTable->m_MetaData_GetMustPreserve)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetMustPreserve == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_GetThumbnailAttachment = (PLib3MFObject_GetThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_object_getthumbnailattachment"); - #else // _WIN32 - pWrapperTable->m_Object_GetThumbnailAttachment = (PLib3MFObject_GetThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_object_getthumbnailattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_GetThumbnailAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_metadata_setmustpreserve", (void**)&(pWrapperTable->m_MetaData_SetMustPreserve)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_SetMustPreserve == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_ClearThumbnailAttachment = (PLib3MFObject_ClearThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_object_clearthumbnailattachment"); - #else // _WIN32 - pWrapperTable->m_Object_ClearThumbnailAttachment = (PLib3MFObject_ClearThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_object_clearthumbnailattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_ClearThumbnailAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_metadata_gettype", (void**)&(pWrapperTable->m_MetaData_GetType)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_GetOutbox = (PLib3MFObject_GetOutboxPtr) GetProcAddress(hLibrary, "lib3mf_object_getoutbox"); - #else // _WIN32 - pWrapperTable->m_Object_GetOutbox = (PLib3MFObject_GetOutboxPtr) dlsym(hLibrary, "lib3mf_object_getoutbox"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_GetOutbox == nullptr) + eLookupError = (*pLookup)("lib3mf_metadata_settype", (void**)&(pWrapperTable->m_MetaData_SetType)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_SetType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_GetUUID = (PLib3MFObject_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_object_getuuid"); - #else // _WIN32 - pWrapperTable->m_Object_GetUUID = (PLib3MFObject_GetUUIDPtr) dlsym(hLibrary, "lib3mf_object_getuuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_GetUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_metadata_getvalue", (void**)&(pWrapperTable->m_MetaData_GetValue)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetValue == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_SetUUID = (PLib3MFObject_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_object_setuuid"); - #else // _WIN32 - pWrapperTable->m_Object_SetUUID = (PLib3MFObject_SetUUIDPtr) dlsym(hLibrary, "lib3mf_object_setuuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_SetUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_metadata_setvalue", (void**)&(pWrapperTable->m_MetaData_SetValue)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_SetValue == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_GetMetaDataGroup = (PLib3MFObject_GetMetaDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_object_getmetadatagroup"); - #else // _WIN32 - pWrapperTable->m_Object_GetMetaDataGroup = (PLib3MFObject_GetMetaDataGroupPtr) dlsym(hLibrary, "lib3mf_object_getmetadatagroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_GetMetaDataGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_metadatagroup_getmetadatacount", (void**)&(pWrapperTable->m_MetaDataGroup_GetMetaDataCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_GetMetaDataCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_SetSlicesMeshResolution = (PLib3MFObject_SetSlicesMeshResolutionPtr) GetProcAddress(hLibrary, "lib3mf_object_setslicesmeshresolution"); - #else // _WIN32 - pWrapperTable->m_Object_SetSlicesMeshResolution = (PLib3MFObject_SetSlicesMeshResolutionPtr) dlsym(hLibrary, "lib3mf_object_setslicesmeshresolution"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_SetSlicesMeshResolution == nullptr) + eLookupError = (*pLookup)("lib3mf_metadatagroup_getmetadata", (void**)&(pWrapperTable->m_MetaDataGroup_GetMetaData)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_GetMetaData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_GetSlicesMeshResolution = (PLib3MFObject_GetSlicesMeshResolutionPtr) GetProcAddress(hLibrary, "lib3mf_object_getslicesmeshresolution"); - #else // _WIN32 - pWrapperTable->m_Object_GetSlicesMeshResolution = (PLib3MFObject_GetSlicesMeshResolutionPtr) dlsym(hLibrary, "lib3mf_object_getslicesmeshresolution"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_GetSlicesMeshResolution == nullptr) + eLookupError = (*pLookup)("lib3mf_metadatagroup_getmetadatabykey", (void**)&(pWrapperTable->m_MetaDataGroup_GetMetaDataByKey)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_GetMetaDataByKey == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_HasSlices = (PLib3MFObject_HasSlicesPtr) GetProcAddress(hLibrary, "lib3mf_object_hasslices"); - #else // _WIN32 - pWrapperTable->m_Object_HasSlices = (PLib3MFObject_HasSlicesPtr) dlsym(hLibrary, "lib3mf_object_hasslices"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_HasSlices == nullptr) + eLookupError = (*pLookup)("lib3mf_metadatagroup_removemetadatabyindex", (void**)&(pWrapperTable->m_MetaDataGroup_RemoveMetaDataByIndex)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_RemoveMetaDataByIndex == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_ClearSliceStack = (PLib3MFObject_ClearSliceStackPtr) GetProcAddress(hLibrary, "lib3mf_object_clearslicestack"); - #else // _WIN32 - pWrapperTable->m_Object_ClearSliceStack = (PLib3MFObject_ClearSliceStackPtr) dlsym(hLibrary, "lib3mf_object_clearslicestack"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_ClearSliceStack == nullptr) + eLookupError = (*pLookup)("lib3mf_metadatagroup_removemetadata", (void**)&(pWrapperTable->m_MetaDataGroup_RemoveMetaData)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_RemoveMetaData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_GetSliceStack = (PLib3MFObject_GetSliceStackPtr) GetProcAddress(hLibrary, "lib3mf_object_getslicestack"); - #else // _WIN32 - pWrapperTable->m_Object_GetSliceStack = (PLib3MFObject_GetSliceStackPtr) dlsym(hLibrary, "lib3mf_object_getslicestack"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_GetSliceStack == nullptr) + eLookupError = (*pLookup)("lib3mf_metadatagroup_addmetadata", (void**)&(pWrapperTable->m_MetaDataGroup_AddMetaData)); + if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_AddMetaData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Object_AssignSliceStack = (PLib3MFObject_AssignSliceStackPtr) GetProcAddress(hLibrary, "lib3mf_object_assignslicestack"); - #else // _WIN32 - pWrapperTable->m_Object_AssignSliceStack = (PLib3MFObject_AssignSliceStackPtr) dlsym(hLibrary, "lib3mf_object_assignslicestack"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Object_AssignSliceStack == nullptr) + eLookupError = (*pLookup)("lib3mf_object_gettype", (void**)&(pWrapperTable->m_Object_GetType)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_GetVertexCount = (PLib3MFMeshObject_GetVertexCountPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getvertexcount"); - #else // _WIN32 - pWrapperTable->m_MeshObject_GetVertexCount = (PLib3MFMeshObject_GetVertexCountPtr) dlsym(hLibrary, "lib3mf_meshobject_getvertexcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_GetVertexCount == nullptr) + eLookupError = (*pLookup)("lib3mf_object_settype", (void**)&(pWrapperTable->m_Object_SetType)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_GetTriangleCount = (PLib3MFMeshObject_GetTriangleCountPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_gettrianglecount"); - #else // _WIN32 - pWrapperTable->m_MeshObject_GetTriangleCount = (PLib3MFMeshObject_GetTriangleCountPtr) dlsym(hLibrary, "lib3mf_meshobject_gettrianglecount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_GetTriangleCount == nullptr) + eLookupError = (*pLookup)("lib3mf_object_getname", (void**)&(pWrapperTable->m_Object_GetName)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_GetVertex = (PLib3MFMeshObject_GetVertexPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getvertex"); - #else // _WIN32 - pWrapperTable->m_MeshObject_GetVertex = (PLib3MFMeshObject_GetVertexPtr) dlsym(hLibrary, "lib3mf_meshobject_getvertex"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_GetVertex == nullptr) + eLookupError = (*pLookup)("lib3mf_object_setname", (void**)&(pWrapperTable->m_Object_SetName)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_SetVertex = (PLib3MFMeshObject_SetVertexPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setvertex"); - #else // _WIN32 - pWrapperTable->m_MeshObject_SetVertex = (PLib3MFMeshObject_SetVertexPtr) dlsym(hLibrary, "lib3mf_meshobject_setvertex"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_SetVertex == nullptr) + eLookupError = (*pLookup)("lib3mf_object_getpartnumber", (void**)&(pWrapperTable->m_Object_GetPartNumber)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetPartNumber == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_AddVertex = (PLib3MFMeshObject_AddVertexPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_addvertex"); - #else // _WIN32 - pWrapperTable->m_MeshObject_AddVertex = (PLib3MFMeshObject_AddVertexPtr) dlsym(hLibrary, "lib3mf_meshobject_addvertex"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_AddVertex == nullptr) + eLookupError = (*pLookup)("lib3mf_object_setpartnumber", (void**)&(pWrapperTable->m_Object_SetPartNumber)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetPartNumber == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_GetVertices = (PLib3MFMeshObject_GetVerticesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getvertices"); - #else // _WIN32 - pWrapperTable->m_MeshObject_GetVertices = (PLib3MFMeshObject_GetVerticesPtr) dlsym(hLibrary, "lib3mf_meshobject_getvertices"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_GetVertices == nullptr) + eLookupError = (*pLookup)("lib3mf_object_ismeshobject", (void**)&(pWrapperTable->m_Object_IsMeshObject)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_IsMeshObject == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_GetTriangle = (PLib3MFMeshObject_GetTrianglePtr) GetProcAddress(hLibrary, "lib3mf_meshobject_gettriangle"); - #else // _WIN32 - pWrapperTable->m_MeshObject_GetTriangle = (PLib3MFMeshObject_GetTrianglePtr) dlsym(hLibrary, "lib3mf_meshobject_gettriangle"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_GetTriangle == nullptr) + eLookupError = (*pLookup)("lib3mf_object_iscomponentsobject", (void**)&(pWrapperTable->m_Object_IsComponentsObject)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_IsComponentsObject == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_SetTriangle = (PLib3MFMeshObject_SetTrianglePtr) GetProcAddress(hLibrary, "lib3mf_meshobject_settriangle"); - #else // _WIN32 - pWrapperTable->m_MeshObject_SetTriangle = (PLib3MFMeshObject_SetTrianglePtr) dlsym(hLibrary, "lib3mf_meshobject_settriangle"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_SetTriangle == nullptr) + eLookupError = (*pLookup)("lib3mf_object_islevelsetobject", (void**)&(pWrapperTable->m_Object_IsLevelSetObject)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_IsLevelSetObject == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_AddTriangle = (PLib3MFMeshObject_AddTrianglePtr) GetProcAddress(hLibrary, "lib3mf_meshobject_addtriangle"); - #else // _WIN32 - pWrapperTable->m_MeshObject_AddTriangle = (PLib3MFMeshObject_AddTrianglePtr) dlsym(hLibrary, "lib3mf_meshobject_addtriangle"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_AddTriangle == nullptr) + eLookupError = (*pLookup)("lib3mf_object_isvalid", (void**)&(pWrapperTable->m_Object_IsValid)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_IsValid == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_GetTriangleIndices = (PLib3MFMeshObject_GetTriangleIndicesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_gettriangleindices"); - #else // _WIN32 - pWrapperTable->m_MeshObject_GetTriangleIndices = (PLib3MFMeshObject_GetTriangleIndicesPtr) dlsym(hLibrary, "lib3mf_meshobject_gettriangleindices"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_GetTriangleIndices == nullptr) + eLookupError = (*pLookup)("lib3mf_object_setattachmentasthumbnail", (void**)&(pWrapperTable->m_Object_SetAttachmentAsThumbnail)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetAttachmentAsThumbnail == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_SetObjectLevelProperty = (PLib3MFMeshObject_SetObjectLevelPropertyPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setobjectlevelproperty"); - #else // _WIN32 - pWrapperTable->m_MeshObject_SetObjectLevelProperty = (PLib3MFMeshObject_SetObjectLevelPropertyPtr) dlsym(hLibrary, "lib3mf_meshobject_setobjectlevelproperty"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_SetObjectLevelProperty == nullptr) + eLookupError = (*pLookup)("lib3mf_object_getthumbnailattachment", (void**)&(pWrapperTable->m_Object_GetThumbnailAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetThumbnailAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_GetObjectLevelProperty = (PLib3MFMeshObject_GetObjectLevelPropertyPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getobjectlevelproperty"); - #else // _WIN32 - pWrapperTable->m_MeshObject_GetObjectLevelProperty = (PLib3MFMeshObject_GetObjectLevelPropertyPtr) dlsym(hLibrary, "lib3mf_meshobject_getobjectlevelproperty"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_GetObjectLevelProperty == nullptr) + eLookupError = (*pLookup)("lib3mf_object_clearthumbnailattachment", (void**)&(pWrapperTable->m_Object_ClearThumbnailAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_ClearThumbnailAttachment == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_object_getoutbox", (void**)&(pWrapperTable->m_Object_GetOutbox)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetOutbox == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_SetTriangleProperties = (PLib3MFMeshObject_SetTrianglePropertiesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_settriangleproperties"); - #else // _WIN32 - pWrapperTable->m_MeshObject_SetTriangleProperties = (PLib3MFMeshObject_SetTrianglePropertiesPtr) dlsym(hLibrary, "lib3mf_meshobject_settriangleproperties"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_SetTriangleProperties == nullptr) + eLookupError = (*pLookup)("lib3mf_object_getuuid", (void**)&(pWrapperTable->m_Object_GetUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_GetTriangleProperties = (PLib3MFMeshObject_GetTrianglePropertiesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_gettriangleproperties"); - #else // _WIN32 - pWrapperTable->m_MeshObject_GetTriangleProperties = (PLib3MFMeshObject_GetTrianglePropertiesPtr) dlsym(hLibrary, "lib3mf_meshobject_gettriangleproperties"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_GetTriangleProperties == nullptr) + eLookupError = (*pLookup)("lib3mf_object_setuuid", (void**)&(pWrapperTable->m_Object_SetUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_SetAllTriangleProperties = (PLib3MFMeshObject_SetAllTrianglePropertiesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setalltriangleproperties"); - #else // _WIN32 - pWrapperTable->m_MeshObject_SetAllTriangleProperties = (PLib3MFMeshObject_SetAllTrianglePropertiesPtr) dlsym(hLibrary, "lib3mf_meshobject_setalltriangleproperties"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_SetAllTriangleProperties == nullptr) + eLookupError = (*pLookup)("lib3mf_object_getmetadatagroup", (void**)&(pWrapperTable->m_Object_GetMetaDataGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetMetaDataGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_GetAllTriangleProperties = (PLib3MFMeshObject_GetAllTrianglePropertiesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getalltriangleproperties"); - #else // _WIN32 - pWrapperTable->m_MeshObject_GetAllTriangleProperties = (PLib3MFMeshObject_GetAllTrianglePropertiesPtr) dlsym(hLibrary, "lib3mf_meshobject_getalltriangleproperties"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_GetAllTriangleProperties == nullptr) + eLookupError = (*pLookup)("lib3mf_object_setslicesmeshresolution", (void**)&(pWrapperTable->m_Object_SetSlicesMeshResolution)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetSlicesMeshResolution == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_ClearAllProperties = (PLib3MFMeshObject_ClearAllPropertiesPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_clearallproperties"); - #else // _WIN32 - pWrapperTable->m_MeshObject_ClearAllProperties = (PLib3MFMeshObject_ClearAllPropertiesPtr) dlsym(hLibrary, "lib3mf_meshobject_clearallproperties"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_ClearAllProperties == nullptr) + eLookupError = (*pLookup)("lib3mf_object_getslicesmeshresolution", (void**)&(pWrapperTable->m_Object_GetSlicesMeshResolution)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetSlicesMeshResolution == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_SetGeometry = (PLib3MFMeshObject_SetGeometryPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setgeometry"); - #else // _WIN32 - pWrapperTable->m_MeshObject_SetGeometry = (PLib3MFMeshObject_SetGeometryPtr) dlsym(hLibrary, "lib3mf_meshobject_setgeometry"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_SetGeometry == nullptr) + eLookupError = (*pLookup)("lib3mf_object_hasslices", (void**)&(pWrapperTable->m_Object_HasSlices)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_HasSlices == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_IsManifoldAndOriented = (PLib3MFMeshObject_IsManifoldAndOrientedPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_ismanifoldandoriented"); - #else // _WIN32 - pWrapperTable->m_MeshObject_IsManifoldAndOriented = (PLib3MFMeshObject_IsManifoldAndOrientedPtr) dlsym(hLibrary, "lib3mf_meshobject_ismanifoldandoriented"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_IsManifoldAndOriented == nullptr) + eLookupError = (*pLookup)("lib3mf_object_clearslicestack", (void**)&(pWrapperTable->m_Object_ClearSliceStack)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_ClearSliceStack == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MeshObject_BeamLattice = (PLib3MFMeshObject_BeamLatticePtr) GetProcAddress(hLibrary, "lib3mf_meshobject_beamlattice"); - #else // _WIN32 - pWrapperTable->m_MeshObject_BeamLattice = (PLib3MFMeshObject_BeamLatticePtr) dlsym(hLibrary, "lib3mf_meshobject_beamlattice"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MeshObject_BeamLattice == nullptr) + eLookupError = (*pLookup)("lib3mf_object_getslicestack", (void**)&(pWrapperTable->m_Object_GetSliceStack)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetSliceStack == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetMinLength = (PLib3MFBeamLattice_GetMinLengthPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getminlength"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetMinLength = (PLib3MFBeamLattice_GetMinLengthPtr) dlsym(hLibrary, "lib3mf_beamlattice_getminlength"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetMinLength == nullptr) + eLookupError = (*pLookup)("lib3mf_object_assignslicestack", (void**)&(pWrapperTable->m_Object_AssignSliceStack)); + if ( (eLookupError != 0) || (pWrapperTable->m_Object_AssignSliceStack == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_SetMinLength = (PLib3MFBeamLattice_SetMinLengthPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setminlength"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_SetMinLength = (PLib3MFBeamLattice_SetMinLengthPtr) dlsym(hLibrary, "lib3mf_beamlattice_setminlength"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_SetMinLength == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_getvertexcount", (void**)&(pWrapperTable->m_MeshObject_GetVertexCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetVertexCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetClipping = (PLib3MFBeamLattice_GetClippingPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getclipping"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetClipping = (PLib3MFBeamLattice_GetClippingPtr) dlsym(hLibrary, "lib3mf_beamlattice_getclipping"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetClipping == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_gettrianglecount", (void**)&(pWrapperTable->m_MeshObject_GetTriangleCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetTriangleCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_SetClipping = (PLib3MFBeamLattice_SetClippingPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setclipping"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_SetClipping = (PLib3MFBeamLattice_SetClippingPtr) dlsym(hLibrary, "lib3mf_beamlattice_setclipping"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_SetClipping == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_getvertex", (void**)&(pWrapperTable->m_MeshObject_GetVertex)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetVertex == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetRepresentation = (PLib3MFBeamLattice_GetRepresentationPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getrepresentation"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetRepresentation = (PLib3MFBeamLattice_GetRepresentationPtr) dlsym(hLibrary, "lib3mf_beamlattice_getrepresentation"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetRepresentation == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_setvertex", (void**)&(pWrapperTable->m_MeshObject_SetVertex)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetVertex == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_SetRepresentation = (PLib3MFBeamLattice_SetRepresentationPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setrepresentation"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_SetRepresentation = (PLib3MFBeamLattice_SetRepresentationPtr) dlsym(hLibrary, "lib3mf_beamlattice_setrepresentation"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_SetRepresentation == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_addvertex", (void**)&(pWrapperTable->m_MeshObject_AddVertex)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_AddVertex == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetBallOptions = (PLib3MFBeamLattice_GetBallOptionsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getballoptions"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetBallOptions = (PLib3MFBeamLattice_GetBallOptionsPtr) dlsym(hLibrary, "lib3mf_beamlattice_getballoptions"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetBallOptions == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_getvertices", (void**)&(pWrapperTable->m_MeshObject_GetVertices)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetVertices == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_SetBallOptions = (PLib3MFBeamLattice_SetBallOptionsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setballoptions"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_SetBallOptions = (PLib3MFBeamLattice_SetBallOptionsPtr) dlsym(hLibrary, "lib3mf_beamlattice_setballoptions"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_SetBallOptions == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_gettriangle", (void**)&(pWrapperTable->m_MeshObject_GetTriangle)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetTriangle == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetBeamCount = (PLib3MFBeamLattice_GetBeamCountPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getbeamcount"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetBeamCount = (PLib3MFBeamLattice_GetBeamCountPtr) dlsym(hLibrary, "lib3mf_beamlattice_getbeamcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetBeamCount == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_settriangle", (void**)&(pWrapperTable->m_MeshObject_SetTriangle)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetTriangle == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetBeam = (PLib3MFBeamLattice_GetBeamPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getbeam"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetBeam = (PLib3MFBeamLattice_GetBeamPtr) dlsym(hLibrary, "lib3mf_beamlattice_getbeam"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetBeam == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_addtriangle", (void**)&(pWrapperTable->m_MeshObject_AddTriangle)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_AddTriangle == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_AddBeam = (PLib3MFBeamLattice_AddBeamPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_addbeam"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_AddBeam = (PLib3MFBeamLattice_AddBeamPtr) dlsym(hLibrary, "lib3mf_beamlattice_addbeam"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_AddBeam == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_gettriangleindices", (void**)&(pWrapperTable->m_MeshObject_GetTriangleIndices)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetTriangleIndices == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_SetBeam = (PLib3MFBeamLattice_SetBeamPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setbeam"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_SetBeam = (PLib3MFBeamLattice_SetBeamPtr) dlsym(hLibrary, "lib3mf_beamlattice_setbeam"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_SetBeam == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_setobjectlevelproperty", (void**)&(pWrapperTable->m_MeshObject_SetObjectLevelProperty)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetObjectLevelProperty == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_SetBeams = (PLib3MFBeamLattice_SetBeamsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setbeams"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_SetBeams = (PLib3MFBeamLattice_SetBeamsPtr) dlsym(hLibrary, "lib3mf_beamlattice_setbeams"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_SetBeams == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_getobjectlevelproperty", (void**)&(pWrapperTable->m_MeshObject_GetObjectLevelProperty)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetObjectLevelProperty == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetBeams = (PLib3MFBeamLattice_GetBeamsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getbeams"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetBeams = (PLib3MFBeamLattice_GetBeamsPtr) dlsym(hLibrary, "lib3mf_beamlattice_getbeams"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetBeams == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_settriangleproperties", (void**)&(pWrapperTable->m_MeshObject_SetTriangleProperties)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetTriangleProperties == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetBallCount = (PLib3MFBeamLattice_GetBallCountPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getballcount"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetBallCount = (PLib3MFBeamLattice_GetBallCountPtr) dlsym(hLibrary, "lib3mf_beamlattice_getballcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetBallCount == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_gettriangleproperties", (void**)&(pWrapperTable->m_MeshObject_GetTriangleProperties)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetTriangleProperties == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetBall = (PLib3MFBeamLattice_GetBallPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getball"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetBall = (PLib3MFBeamLattice_GetBallPtr) dlsym(hLibrary, "lib3mf_beamlattice_getball"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetBall == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_setalltriangleproperties", (void**)&(pWrapperTable->m_MeshObject_SetAllTriangleProperties)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetAllTriangleProperties == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_AddBall = (PLib3MFBeamLattice_AddBallPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_addball"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_AddBall = (PLib3MFBeamLattice_AddBallPtr) dlsym(hLibrary, "lib3mf_beamlattice_addball"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_AddBall == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_getalltriangleproperties", (void**)&(pWrapperTable->m_MeshObject_GetAllTriangleProperties)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetAllTriangleProperties == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_SetBall = (PLib3MFBeamLattice_SetBallPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setball"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_SetBall = (PLib3MFBeamLattice_SetBallPtr) dlsym(hLibrary, "lib3mf_beamlattice_setball"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_SetBall == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_clearallproperties", (void**)&(pWrapperTable->m_MeshObject_ClearAllProperties)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_ClearAllProperties == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_SetBalls = (PLib3MFBeamLattice_SetBallsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_setballs"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_SetBalls = (PLib3MFBeamLattice_SetBallsPtr) dlsym(hLibrary, "lib3mf_beamlattice_setballs"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_SetBalls == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_setgeometry", (void**)&(pWrapperTable->m_MeshObject_SetGeometry)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetGeometry == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetBalls = (PLib3MFBeamLattice_GetBallsPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getballs"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetBalls = (PLib3MFBeamLattice_GetBallsPtr) dlsym(hLibrary, "lib3mf_beamlattice_getballs"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetBalls == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_ismanifoldandoriented", (void**)&(pWrapperTable->m_MeshObject_IsManifoldAndOriented)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_IsManifoldAndOriented == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_meshobject_beamlattice", (void**)&(pWrapperTable->m_MeshObject_BeamLattice)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_BeamLattice == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetBeamSetCount = (PLib3MFBeamLattice_GetBeamSetCountPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getbeamsetcount"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetBeamSetCount = (PLib3MFBeamLattice_GetBeamSetCountPtr) dlsym(hLibrary, "lib3mf_beamlattice_getbeamsetcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetBeamSetCount == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_getvolumedata", (void**)&(pWrapperTable->m_MeshObject_GetVolumeData)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetVolumeData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_AddBeamSet = (PLib3MFBeamLattice_AddBeamSetPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_addbeamset"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_AddBeamSet = (PLib3MFBeamLattice_AddBeamSetPtr) dlsym(hLibrary, "lib3mf_beamlattice_addbeamset"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_AddBeamSet == nullptr) + eLookupError = (*pLookup)("lib3mf_meshobject_setvolumedata", (void**)&(pWrapperTable->m_MeshObject_SetVolumeData)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetVolumeData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamLattice_GetBeamSet = (PLib3MFBeamLattice_GetBeamSetPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getbeamset"); - #else // _WIN32 - pWrapperTable->m_BeamLattice_GetBeamSet = (PLib3MFBeamLattice_GetBeamSetPtr) dlsym(hLibrary, "lib3mf_beamlattice_getbeamset"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamLattice_GetBeamSet == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_getfunction", (void**)&(pWrapperTable->m_LevelSet_GetFunction)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_GetFunction == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresource"); - #else // _WIN32 - pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) dlsym(hLibrary, "lib3mf_component_getobjectresource"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Component_GetObjectResource == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_setfunction", (void**)&(pWrapperTable->m_LevelSet_SetFunction)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_SetFunction == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresourceid"); - #else // _WIN32 - pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) dlsym(hLibrary, "lib3mf_component_getobjectresourceid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Component_GetObjectResourceID == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_gettransform", (void**)&(pWrapperTable->m_LevelSet_GetTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_GetTransform == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getuuid"); - #else // _WIN32 - pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) dlsym(hLibrary, "lib3mf_component_getuuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Component_GetUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_settransform", (void**)&(pWrapperTable->m_LevelSet_SetTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_SetTransform == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_setuuid"); - #else // _WIN32 - pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) dlsym(hLibrary, "lib3mf_component_setuuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Component_SetUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_getchannelname", (void**)&(pWrapperTable->m_LevelSet_GetChannelName)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_GetChannelName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_hastransform"); - #else // _WIN32 - pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) dlsym(hLibrary, "lib3mf_component_hastransform"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Component_HasTransform == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_setchannelname", (void**)&(pWrapperTable->m_LevelSet_SetChannelName)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_SetChannelName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_gettransform"); - #else // _WIN32 - pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) dlsym(hLibrary, "lib3mf_component_gettransform"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Component_GetTransform == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_setminfeaturesize", (void**)&(pWrapperTable->m_LevelSet_SetMinFeatureSize)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_SetMinFeatureSize == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_settransform"); - #else // _WIN32 - pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) dlsym(hLibrary, "lib3mf_component_settransform"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Component_SetTransform == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_getminfeaturesize", (void**)&(pWrapperTable->m_LevelSet_GetMinFeatureSize)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_GetMinFeatureSize == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_addcomponent"); - #else // _WIN32 - pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_addcomponent"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_AddComponent == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_setfallbackvalue", (void**)&(pWrapperTable->m_LevelSet_SetFallBackValue)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_SetFallBackValue == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponent"); - #else // _WIN32 - pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponent"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_GetComponent == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_getfallbackvalue", (void**)&(pWrapperTable->m_LevelSet_GetFallBackValue)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_GetFallBackValue == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponentcount"); - #else // _WIN32 - pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponentcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_GetComponentCount == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_setmeshbboxonly", (void**)&(pWrapperTable->m_LevelSet_SetMeshBBoxOnly)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_SetMeshBBoxOnly == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_setname"); - #else // _WIN32 - pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) dlsym(hLibrary, "lib3mf_beamset_setname"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetName == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_getmeshbboxonly", (void**)&(pWrapperTable->m_LevelSet_GetMeshBBoxOnly)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_GetMeshBBoxOnly == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_getname"); - #else // _WIN32 - pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) dlsym(hLibrary, "lib3mf_beamset_getname"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetName == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_setmesh", (void**)&(pWrapperTable->m_LevelSet_SetMesh)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_SetMesh == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setidentifier"); - #else // _WIN32 - pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_setidentifier"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetIdentifier == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_getmesh", (void**)&(pWrapperTable->m_LevelSet_GetMesh)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_GetMesh == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getidentifier"); - #else // _WIN32 - pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_getidentifier"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetIdentifier == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_getvolumedata", (void**)&(pWrapperTable->m_LevelSet_GetVolumeData)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_GetVolumeData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferencecount"); - #else // _WIN32 - pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getreferencecount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetReferenceCount == nullptr) + eLookupError = (*pLookup)("lib3mf_levelset_setvolumedata", (void**)&(pWrapperTable->m_LevelSet_SetVolumeData)); + if ( (eLookupError != 0) || (pWrapperTable->m_LevelSet_SetVolumeData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setreferences"); - #else // _WIN32 - pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setreferences"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetReferences == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_getminlength", (void**)&(pWrapperTable->m_BeamLattice_GetMinLength)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetMinLength == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferences"); - #else // _WIN32 - pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getreferences"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetReferences == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_setminlength", (void**)&(pWrapperTable->m_BeamLattice_SetMinLength)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetMinLength == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferencecount"); - #else // _WIN32 - pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferencecount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetBallReferenceCount == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_getclipping", (void**)&(pWrapperTable->m_BeamLattice_GetClipping)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetClipping == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setballreferences"); - #else // _WIN32 - pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setballreferences"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetBallReferences == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_setclipping", (void**)&(pWrapperTable->m_BeamLattice_SetClipping)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetClipping == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferences"); - #else // _WIN32 - pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferences"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetBallReferences == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_getrepresentation", (void**)&(pWrapperTable->m_BeamLattice_GetRepresentation)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetRepresentation == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getcount"); - #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetCount == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_setrepresentation", (void**)&(pWrapperTable->m_BeamLattice_SetRepresentation)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetRepresentation == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); - #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_getballoptions", (void**)&(pWrapperTable->m_BeamLattice_GetBallOptions)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBallOptions == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_addmaterial"); - #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_addmaterial"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_AddMaterial == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_setballoptions", (void**)&(pWrapperTable->m_BeamLattice_SetBallOptions)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetBallOptions == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_removematerial"); - #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_removematerial"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_RemoveMaterial == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_getbeamcount", (void**)&(pWrapperTable->m_BeamLattice_GetBeamCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBeamCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getname"); - #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getname"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetName == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_getbeam", (void**)&(pWrapperTable->m_BeamLattice_GetBeam)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBeam == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setname"); - #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setname"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_SetName == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_addbeam", (void**)&(pWrapperTable->m_BeamLattice_AddBeam)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_AddBeam == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); - #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_SetDisplayColor == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_setbeam", (void**)&(pWrapperTable->m_BeamLattice_SetBeam)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetBeam == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); - #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetDisplayColor == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_setbeams", (void**)&(pWrapperTable->m_BeamLattice_SetBeams)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetBeams == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcount"); - #else // _WIN32 - pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetCount == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_getbeams", (void**)&(pWrapperTable->m_BeamLattice_GetBeams)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBeams == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_beamlattice_getballcount", (void**)&(pWrapperTable->m_BeamLattice_GetBallCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBallCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getallpropertyids"); - #else // _WIN32 - pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_colorgroup_getallpropertyids"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetAllPropertyIDs == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_getball", (void**)&(pWrapperTable->m_BeamLattice_GetBall)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBall == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_addcolor"); - #else // _WIN32 - pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_addcolor"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_AddColor == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_addball", (void**)&(pWrapperTable->m_BeamLattice_AddBall)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_AddBall == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_removecolor"); - #else // _WIN32 - pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_removecolor"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_RemoveColor == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_setball", (void**)&(pWrapperTable->m_BeamLattice_SetBall)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetBall == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_setcolor"); - #else // _WIN32 - pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_setcolor"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_SetColor == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_setballs", (void**)&(pWrapperTable->m_BeamLattice_SetBalls)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetBalls == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcolor"); - #else // _WIN32 - pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcolor"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetColor == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_getballs", (void**)&(pWrapperTable->m_BeamLattice_GetBalls)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBalls == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getcount"); - #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetCount == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_getbeamsetcount", (void**)&(pWrapperTable->m_BeamLattice_GetBeamSetCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBeamSetCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); - #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_addbeamset", (void**)&(pWrapperTable->m_BeamLattice_AddBeamSet)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_AddBeamSet == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); - #else // _WIN32 - pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_AddTex2Coord == nullptr) + eLookupError = (*pLookup)("lib3mf_beamlattice_getbeamset", (void**)&(pWrapperTable->m_BeamLattice_GetBeamSet)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBeamSet == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); - #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetTex2Coord == nullptr) + eLookupError = (*pLookup)("lib3mf_functionreference_getfunctionresourceid", (void**)&(pWrapperTable->m_FunctionReference_GetFunctionResourceID)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionReference_GetFunctionResourceID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); - #else // _WIN32 - pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_RemoveTex2Coord == nullptr) + eLookupError = (*pLookup)("lib3mf_functionreference_setfunctionresourceid", (void**)&(pWrapperTable->m_FunctionReference_SetFunctionResourceID)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionReference_SetFunctionResourceID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); - #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetTexture2D == nullptr) + eLookupError = (*pLookup)("lib3mf_functionreference_gettransform", (void**)&(pWrapperTable->m_FunctionReference_GetTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionReference_GetTransform == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcount"); - #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) dlsym(hLibrary, "lib3mf_compositematerials_getcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetCount == nullptr) + eLookupError = (*pLookup)("lib3mf_functionreference_settransform", (void**)&(pWrapperTable->m_FunctionReference_SetTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionReference_SetTransform == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getallpropertyids"); - #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_compositematerials_getallpropertyids"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs == nullptr) + eLookupError = (*pLookup)("lib3mf_functionreference_getchannelname", (void**)&(pWrapperTable->m_FunctionReference_GetChannelName)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionReference_GetChannelName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); - #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_functionreference_setchannelname", (void**)&(pWrapperTable->m_FunctionReference_SetChannelName)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionReference_SetChannelName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_addcomposite"); - #else // _WIN32 - pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_addcomposite"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_AddComposite == nullptr) + eLookupError = (*pLookup)("lib3mf_functionreference_setminfeaturesize", (void**)&(pWrapperTable->m_FunctionReference_SetMinFeatureSize)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionReference_SetMinFeatureSize == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_removecomposite"); - #else // _WIN32 - pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_removecomposite"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_RemoveComposite == nullptr) + eLookupError = (*pLookup)("lib3mf_functionreference_getminfeaturesize", (void**)&(pWrapperTable->m_FunctionReference_GetMinFeatureSize)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionReference_GetMinFeatureSize == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcomposite"); - #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_getcomposite"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetComposite == nullptr) + eLookupError = (*pLookup)("lib3mf_functionreference_setfallbackvalue", (void**)&(pWrapperTable->m_FunctionReference_SetFallBackValue)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionReference_SetFallBackValue == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getcount"); - #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetCount == nullptr) + eLookupError = (*pLookup)("lib3mf_functionreference_getfallbackvalue", (void**)&(pWrapperTable->m_FunctionReference_GetFallBackValue)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionReference_GetFallBackValue == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); - #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedatacomposite_getbasematerialgroup", (void**)&(pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); - #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_AddMultiProperty == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedatacomposite_setbasematerialgroup", (void**)&(pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); - #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_SetMultiProperty == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedatacomposite_getmaterialmappingcount", (void**)&(pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); - #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetMultiProperty == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedatacomposite_getmaterialmapping", (void**)&(pWrapperTable->m_VolumeDataComposite_GetMaterialMapping)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeDataComposite_GetMaterialMapping == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); - #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedatacomposite_addmaterialmapping", (void**)&(pWrapperTable->m_VolumeDataComposite_AddMaterialMapping)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeDataComposite_AddMaterialMapping == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayercount"); - #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayercount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetLayerCount == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedatacomposite_removematerialmapping", (void**)&(pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addlayer"); - #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addlayer"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_AddLayer == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedataproperty_getname", (void**)&(pWrapperTable->m_VolumeDataProperty_GetName)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeDataProperty_GetName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayer"); - #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayer"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetLayer == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedataproperty_setisrequired", (void**)&(pWrapperTable->m_VolumeDataProperty_SetIsRequired)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeDataProperty_SetIsRequired == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removelayer"); - #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removelayer"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_RemoveLayer == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedataproperty_isrequired", (void**)&(pWrapperTable->m_VolumeDataProperty_IsRequired)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeDataProperty_IsRequired == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_getpath"); - #else // _WIN32 - pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) dlsym(hLibrary, "lib3mf_attachment_getpath"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetPath == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedata_getcomposite", (void**)&(pWrapperTable->m_VolumeData_GetComposite)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeData_GetComposite == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_setpath"); - #else // _WIN32 - pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) dlsym(hLibrary, "lib3mf_attachment_setpath"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Attachment_SetPath == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedata_createnewcomposite", (void**)&(pWrapperTable->m_VolumeData_CreateNewComposite)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeData_CreateNewComposite == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) GetProcAddress(hLibrary, "lib3mf_attachment_packagepart"); - #else // _WIN32 - pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) dlsym(hLibrary, "lib3mf_attachment_packagepart"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Attachment_PackagePart == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedata_removecomposite", (void**)&(pWrapperTable->m_VolumeData_RemoveComposite)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeData_RemoveComposite == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getrelationshiptype"); - #else // _WIN32 - pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_getrelationshiptype"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetRelationShipType == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedata_getcolor", (void**)&(pWrapperTable->m_VolumeData_GetColor)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeData_GetColor == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_setrelationshiptype"); - #else // _WIN32 - pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_setrelationshiptype"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Attachment_SetRelationShipType == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedata_createnewcolor", (void**)&(pWrapperTable->m_VolumeData_CreateNewColor)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeData_CreateNewColor == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetofile"); - #else // _WIN32 - pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) dlsym(hLibrary, "lib3mf_attachment_writetofile"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Attachment_WriteToFile == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedata_removecolor", (void**)&(pWrapperTable->m_VolumeData_RemoveColor)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeData_RemoveColor == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromfile"); - #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) dlsym(hLibrary, "lib3mf_attachment_readfromfile"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromFile == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedata_getpropertycount", (void**)&(pWrapperTable->m_VolumeData_GetPropertyCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeData_GetPropertyCount == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_volumedata_getproperty", (void**)&(pWrapperTable->m_VolumeData_GetProperty)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeData_GetProperty == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromcallback"); - #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) dlsym(hLibrary, "lib3mf_attachment_readfromcallback"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromCallback == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedata_addpropertyfromfunction", (void**)&(pWrapperTable->m_VolumeData_AddPropertyFromFunction)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeData_AddPropertyFromFunction == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getstreamsize"); - #else // _WIN32 - pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) dlsym(hLibrary, "lib3mf_attachment_getstreamsize"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetStreamSize == nullptr) + eLookupError = (*pLookup)("lib3mf_volumedata_removeproperty", (void**)&(pWrapperTable->m_VolumeData_RemoveProperty)); + if ( (eLookupError != 0) || (pWrapperTable->m_VolumeData_RemoveProperty == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetobuffer"); - #else // _WIN32 - pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) dlsym(hLibrary, "lib3mf_attachment_writetobuffer"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Attachment_WriteToBuffer == nullptr) + eLookupError = (*pLookup)("lib3mf_component_getobjectresource", (void**)&(pWrapperTable->m_Component_GetObjectResource)); + if ( (eLookupError != 0) || (pWrapperTable->m_Component_GetObjectResource == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfrombuffer"); - #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) dlsym(hLibrary, "lib3mf_attachment_readfrombuffer"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromBuffer == nullptr) + eLookupError = (*pLookup)("lib3mf_component_getobjectresourceid", (void**)&(pWrapperTable->m_Component_GetObjectResourceID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Component_GetObjectResourceID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getattachment"); - #else // _WIN32 - pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_getattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_component_getuuid", (void**)&(pWrapperTable->m_Component_GetUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Component_GetUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setattachment"); - #else // _WIN32 - pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_setattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_component_setuuid", (void**)&(pWrapperTable->m_Component_SetUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Component_SetUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getcontenttype"); - #else // _WIN32 - pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_getcontenttype"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetContentType == nullptr) + eLookupError = (*pLookup)("lib3mf_component_hastransform", (void**)&(pWrapperTable->m_Component_HasTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_Component_HasTransform == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setcontenttype"); - #else // _WIN32 - pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_setcontenttype"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetContentType == nullptr) + eLookupError = (*pLookup)("lib3mf_component_gettransform", (void**)&(pWrapperTable->m_Component_GetTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_Component_GetTransform == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_gettilestyleuv"); - #else // _WIN32 - pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_gettilestyleuv"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetTileStyleUV == nullptr) + eLookupError = (*pLookup)("lib3mf_component_settransform", (void**)&(pWrapperTable->m_Component_SetTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_Component_SetTransform == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_settilestyleuv"); - #else // _WIN32 - pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_settilestyleuv"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetTileStyleUV == nullptr) + eLookupError = (*pLookup)("lib3mf_componentsobject_addcomponent", (void**)&(pWrapperTable->m_ComponentsObject_AddComponent)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComponentsObject_AddComponent == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getfilter"); - #else // _WIN32 - pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_getfilter"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetFilter == nullptr) + eLookupError = (*pLookup)("lib3mf_componentsobject_getcomponent", (void**)&(pWrapperTable->m_ComponentsObject_GetComponent)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComponentsObject_GetComponent == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setfilter"); - #else // _WIN32 - pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_setfilter"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetFilter == nullptr) + eLookupError = (*pLookup)("lib3mf_componentsobject_getcomponentcount", (void**)&(pWrapperTable->m_ComponentsObject_GetComponentCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComponentsObject_GetComponentCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItem_GetObjectResource = (PLib3MFBuildItem_GetObjectResourcePtr) GetProcAddress(hLibrary, "lib3mf_builditem_getobjectresource"); - #else // _WIN32 - pWrapperTable->m_BuildItem_GetObjectResource = (PLib3MFBuildItem_GetObjectResourcePtr) dlsym(hLibrary, "lib3mf_builditem_getobjectresource"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItem_GetObjectResource == nullptr) + eLookupError = (*pLookup)("lib3mf_beamset_setname", (void**)&(pWrapperTable->m_BeamSet_SetName)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_SetName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItem_GetUUID = (PLib3MFBuildItem_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getuuid"); - #else // _WIN32 - pWrapperTable->m_BuildItem_GetUUID = (PLib3MFBuildItem_GetUUIDPtr) dlsym(hLibrary, "lib3mf_builditem_getuuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItem_GetUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_beamset_getname", (void**)&(pWrapperTable->m_BeamSet_GetName)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItem_SetUUID = (PLib3MFBuildItem_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_builditem_setuuid"); - #else // _WIN32 - pWrapperTable->m_BuildItem_SetUUID = (PLib3MFBuildItem_SetUUIDPtr) dlsym(hLibrary, "lib3mf_builditem_setuuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItem_SetUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_beamset_setidentifier", (void**)&(pWrapperTable->m_BeamSet_SetIdentifier)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_SetIdentifier == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItem_GetObjectResourceID = (PLib3MFBuildItem_GetObjectResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getobjectresourceid"); - #else // _WIN32 - pWrapperTable->m_BuildItem_GetObjectResourceID = (PLib3MFBuildItem_GetObjectResourceIDPtr) dlsym(hLibrary, "lib3mf_builditem_getobjectresourceid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItem_GetObjectResourceID == nullptr) + eLookupError = (*pLookup)("lib3mf_beamset_getidentifier", (void**)&(pWrapperTable->m_BeamSet_GetIdentifier)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetIdentifier == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItem_HasObjectTransform = (PLib3MFBuildItem_HasObjectTransformPtr) GetProcAddress(hLibrary, "lib3mf_builditem_hasobjecttransform"); - #else // _WIN32 - pWrapperTable->m_BuildItem_HasObjectTransform = (PLib3MFBuildItem_HasObjectTransformPtr) dlsym(hLibrary, "lib3mf_builditem_hasobjecttransform"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItem_HasObjectTransform == nullptr) + eLookupError = (*pLookup)("lib3mf_beamset_getreferencecount", (void**)&(pWrapperTable->m_BeamSet_GetReferenceCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetReferenceCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItem_GetObjectTransform = (PLib3MFBuildItem_GetObjectTransformPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getobjecttransform"); - #else // _WIN32 - pWrapperTable->m_BuildItem_GetObjectTransform = (PLib3MFBuildItem_GetObjectTransformPtr) dlsym(hLibrary, "lib3mf_builditem_getobjecttransform"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItem_GetObjectTransform == nullptr) + eLookupError = (*pLookup)("lib3mf_beamset_setreferences", (void**)&(pWrapperTable->m_BeamSet_SetReferences)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_SetReferences == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItem_SetObjectTransform = (PLib3MFBuildItem_SetObjectTransformPtr) GetProcAddress(hLibrary, "lib3mf_builditem_setobjecttransform"); - #else // _WIN32 - pWrapperTable->m_BuildItem_SetObjectTransform = (PLib3MFBuildItem_SetObjectTransformPtr) dlsym(hLibrary, "lib3mf_builditem_setobjecttransform"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItem_SetObjectTransform == nullptr) + eLookupError = (*pLookup)("lib3mf_beamset_getreferences", (void**)&(pWrapperTable->m_BeamSet_GetReferences)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetReferences == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItem_GetPartNumber = (PLib3MFBuildItem_GetPartNumberPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getpartnumber"); - #else // _WIN32 - pWrapperTable->m_BuildItem_GetPartNumber = (PLib3MFBuildItem_GetPartNumberPtr) dlsym(hLibrary, "lib3mf_builditem_getpartnumber"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItem_GetPartNumber == nullptr) + eLookupError = (*pLookup)("lib3mf_beamset_getballreferencecount", (void**)&(pWrapperTable->m_BeamSet_GetBallReferenceCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetBallReferenceCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItem_SetPartNumber = (PLib3MFBuildItem_SetPartNumberPtr) GetProcAddress(hLibrary, "lib3mf_builditem_setpartnumber"); - #else // _WIN32 - pWrapperTable->m_BuildItem_SetPartNumber = (PLib3MFBuildItem_SetPartNumberPtr) dlsym(hLibrary, "lib3mf_builditem_setpartnumber"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItem_SetPartNumber == nullptr) + eLookupError = (*pLookup)("lib3mf_beamset_setballreferences", (void**)&(pWrapperTable->m_BeamSet_SetBallReferences)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_SetBallReferences == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItem_GetMetaDataGroup = (PLib3MFBuildItem_GetMetaDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getmetadatagroup"); - #else // _WIN32 - pWrapperTable->m_BuildItem_GetMetaDataGroup = (PLib3MFBuildItem_GetMetaDataGroupPtr) dlsym(hLibrary, "lib3mf_builditem_getmetadatagroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItem_GetMetaDataGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_beamset_getballreferences", (void**)&(pWrapperTable->m_BeamSet_GetBallReferences)); + if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetBallReferences == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItem_GetOutbox = (PLib3MFBuildItem_GetOutboxPtr) GetProcAddress(hLibrary, "lib3mf_builditem_getoutbox"); - #else // _WIN32 - pWrapperTable->m_BuildItem_GetOutbox = (PLib3MFBuildItem_GetOutboxPtr) dlsym(hLibrary, "lib3mf_builditem_getoutbox"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItem_GetOutbox == nullptr) + eLookupError = (*pLookup)("lib3mf_basematerialgroup_getcount", (void**)&(pWrapperTable->m_BaseMaterialGroup_GetCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_GetCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItemIterator_MoveNext = (PLib3MFBuildItemIterator_MoveNextPtr) GetProcAddress(hLibrary, "lib3mf_builditemiterator_movenext"); - #else // _WIN32 - pWrapperTable->m_BuildItemIterator_MoveNext = (PLib3MFBuildItemIterator_MoveNextPtr) dlsym(hLibrary, "lib3mf_builditemiterator_movenext"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItemIterator_MoveNext == nullptr) + eLookupError = (*pLookup)("lib3mf_basematerialgroup_getallpropertyids", (void**)&(pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs)); + if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItemIterator_MovePrevious = (PLib3MFBuildItemIterator_MovePreviousPtr) GetProcAddress(hLibrary, "lib3mf_builditemiterator_moveprevious"); - #else // _WIN32 - pWrapperTable->m_BuildItemIterator_MovePrevious = (PLib3MFBuildItemIterator_MovePreviousPtr) dlsym(hLibrary, "lib3mf_builditemiterator_moveprevious"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItemIterator_MovePrevious == nullptr) + eLookupError = (*pLookup)("lib3mf_basematerialgroup_addmaterial", (void**)&(pWrapperTable->m_BaseMaterialGroup_AddMaterial)); + if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_AddMaterial == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItemIterator_GetCurrent = (PLib3MFBuildItemIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_builditemiterator_getcurrent"); - #else // _WIN32 - pWrapperTable->m_BuildItemIterator_GetCurrent = (PLib3MFBuildItemIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_builditemiterator_getcurrent"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItemIterator_GetCurrent == nullptr) + eLookupError = (*pLookup)("lib3mf_basematerialgroup_removematerial", (void**)&(pWrapperTable->m_BaseMaterialGroup_RemoveMaterial)); + if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_RemoveMaterial == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItemIterator_Clone = (PLib3MFBuildItemIterator_ClonePtr) GetProcAddress(hLibrary, "lib3mf_builditemiterator_clone"); - #else // _WIN32 - pWrapperTable->m_BuildItemIterator_Clone = (PLib3MFBuildItemIterator_ClonePtr) dlsym(hLibrary, "lib3mf_builditemiterator_clone"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItemIterator_Clone == nullptr) + eLookupError = (*pLookup)("lib3mf_basematerialgroup_getname", (void**)&(pWrapperTable->m_BaseMaterialGroup_GetName)); + if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_GetName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_BuildItemIterator_Count = (PLib3MFBuildItemIterator_CountPtr) GetProcAddress(hLibrary, "lib3mf_builditemiterator_count"); - #else // _WIN32 - pWrapperTable->m_BuildItemIterator_Count = (PLib3MFBuildItemIterator_CountPtr) dlsym(hLibrary, "lib3mf_builditemiterator_count"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_BuildItemIterator_Count == nullptr) + eLookupError = (*pLookup)("lib3mf_basematerialgroup_setname", (void**)&(pWrapperTable->m_BaseMaterialGroup_SetName)); + if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_SetName == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_basematerialgroup_setdisplaycolor", (void**)&(pWrapperTable->m_BaseMaterialGroup_SetDisplayColor)); + if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_SetDisplayColor == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_basematerialgroup_getdisplaycolor", (void**)&(pWrapperTable->m_BaseMaterialGroup_GetDisplayColor)); + if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_GetDisplayColor == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Slice_SetVertices = (PLib3MFSlice_SetVerticesPtr) GetProcAddress(hLibrary, "lib3mf_slice_setvertices"); - #else // _WIN32 - pWrapperTable->m_Slice_SetVertices = (PLib3MFSlice_SetVerticesPtr) dlsym(hLibrary, "lib3mf_slice_setvertices"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Slice_SetVertices == nullptr) + eLookupError = (*pLookup)("lib3mf_colorgroup_getcount", (void**)&(pWrapperTable->m_ColorGroup_GetCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_GetCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Slice_GetVertices = (PLib3MFSlice_GetVerticesPtr) GetProcAddress(hLibrary, "lib3mf_slice_getvertices"); - #else // _WIN32 - pWrapperTable->m_Slice_GetVertices = (PLib3MFSlice_GetVerticesPtr) dlsym(hLibrary, "lib3mf_slice_getvertices"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Slice_GetVertices == nullptr) + eLookupError = (*pLookup)("lib3mf_colorgroup_getallpropertyids", (void**)&(pWrapperTable->m_ColorGroup_GetAllPropertyIDs)); + if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_GetAllPropertyIDs == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Slice_GetVertexCount = (PLib3MFSlice_GetVertexCountPtr) GetProcAddress(hLibrary, "lib3mf_slice_getvertexcount"); - #else // _WIN32 - pWrapperTable->m_Slice_GetVertexCount = (PLib3MFSlice_GetVertexCountPtr) dlsym(hLibrary, "lib3mf_slice_getvertexcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Slice_GetVertexCount == nullptr) + eLookupError = (*pLookup)("lib3mf_colorgroup_addcolor", (void**)&(pWrapperTable->m_ColorGroup_AddColor)); + if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_AddColor == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Slice_AddPolygon = (PLib3MFSlice_AddPolygonPtr) GetProcAddress(hLibrary, "lib3mf_slice_addpolygon"); - #else // _WIN32 - pWrapperTable->m_Slice_AddPolygon = (PLib3MFSlice_AddPolygonPtr) dlsym(hLibrary, "lib3mf_slice_addpolygon"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Slice_AddPolygon == nullptr) + eLookupError = (*pLookup)("lib3mf_colorgroup_removecolor", (void**)&(pWrapperTable->m_ColorGroup_RemoveColor)); + if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_RemoveColor == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Slice_GetPolygonCount = (PLib3MFSlice_GetPolygonCountPtr) GetProcAddress(hLibrary, "lib3mf_slice_getpolygoncount"); - #else // _WIN32 - pWrapperTable->m_Slice_GetPolygonCount = (PLib3MFSlice_GetPolygonCountPtr) dlsym(hLibrary, "lib3mf_slice_getpolygoncount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Slice_GetPolygonCount == nullptr) + eLookupError = (*pLookup)("lib3mf_colorgroup_setcolor", (void**)&(pWrapperTable->m_ColorGroup_SetColor)); + if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_SetColor == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Slice_SetPolygonIndices = (PLib3MFSlice_SetPolygonIndicesPtr) GetProcAddress(hLibrary, "lib3mf_slice_setpolygonindices"); - #else // _WIN32 - pWrapperTable->m_Slice_SetPolygonIndices = (PLib3MFSlice_SetPolygonIndicesPtr) dlsym(hLibrary, "lib3mf_slice_setpolygonindices"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Slice_SetPolygonIndices == nullptr) + eLookupError = (*pLookup)("lib3mf_colorgroup_getcolor", (void**)&(pWrapperTable->m_ColorGroup_GetColor)); + if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_GetColor == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Slice_GetPolygonIndices = (PLib3MFSlice_GetPolygonIndicesPtr) GetProcAddress(hLibrary, "lib3mf_slice_getpolygonindices"); - #else // _WIN32 - pWrapperTable->m_Slice_GetPolygonIndices = (PLib3MFSlice_GetPolygonIndicesPtr) dlsym(hLibrary, "lib3mf_slice_getpolygonindices"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Slice_GetPolygonIndices == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2dgroup_getcount", (void**)&(pWrapperTable->m_Texture2DGroup_GetCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_GetCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Slice_GetPolygonIndexCount = (PLib3MFSlice_GetPolygonIndexCountPtr) GetProcAddress(hLibrary, "lib3mf_slice_getpolygonindexcount"); - #else // _WIN32 - pWrapperTable->m_Slice_GetPolygonIndexCount = (PLib3MFSlice_GetPolygonIndexCountPtr) dlsym(hLibrary, "lib3mf_slice_getpolygonindexcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Slice_GetPolygonIndexCount == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2dgroup_getallpropertyids", (void**)&(pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Slice_GetZTop = (PLib3MFSlice_GetZTopPtr) GetProcAddress(hLibrary, "lib3mf_slice_getztop"); - #else // _WIN32 - pWrapperTable->m_Slice_GetZTop = (PLib3MFSlice_GetZTopPtr) dlsym(hLibrary, "lib3mf_slice_getztop"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Slice_GetZTop == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2dgroup_addtex2coord", (void**)&(pWrapperTable->m_Texture2DGroup_AddTex2Coord)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_AddTex2Coord == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_SliceStack_GetBottomZ = (PLib3MFSliceStack_GetBottomZPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getbottomz"); - #else // _WIN32 - pWrapperTable->m_SliceStack_GetBottomZ = (PLib3MFSliceStack_GetBottomZPtr) dlsym(hLibrary, "lib3mf_slicestack_getbottomz"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_SliceStack_GetBottomZ == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2dgroup_gettex2coord", (void**)&(pWrapperTable->m_Texture2DGroup_GetTex2Coord)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_GetTex2Coord == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_SliceStack_GetSliceCount = (PLib3MFSliceStack_GetSliceCountPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getslicecount"); - #else // _WIN32 - pWrapperTable->m_SliceStack_GetSliceCount = (PLib3MFSliceStack_GetSliceCountPtr) dlsym(hLibrary, "lib3mf_slicestack_getslicecount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_SliceStack_GetSliceCount == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2dgroup_removetex2coord", (void**)&(pWrapperTable->m_Texture2DGroup_RemoveTex2Coord)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_RemoveTex2Coord == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_SliceStack_GetSlice = (PLib3MFSliceStack_GetSlicePtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getslice"); - #else // _WIN32 - pWrapperTable->m_SliceStack_GetSlice = (PLib3MFSliceStack_GetSlicePtr) dlsym(hLibrary, "lib3mf_slicestack_getslice"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_SliceStack_GetSlice == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2dgroup_gettexture2d", (void**)&(pWrapperTable->m_Texture2DGroup_GetTexture2D)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_GetTexture2D == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_SliceStack_AddSlice = (PLib3MFSliceStack_AddSlicePtr) GetProcAddress(hLibrary, "lib3mf_slicestack_addslice"); - #else // _WIN32 - pWrapperTable->m_SliceStack_AddSlice = (PLib3MFSliceStack_AddSlicePtr) dlsym(hLibrary, "lib3mf_slicestack_addslice"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_SliceStack_AddSlice == nullptr) + eLookupError = (*pLookup)("lib3mf_compositematerials_getcount", (void**)&(pWrapperTable->m_CompositeMaterials_GetCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_GetCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_SliceStack_GetSliceRefCount = (PLib3MFSliceStack_GetSliceRefCountPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getslicerefcount"); - #else // _WIN32 - pWrapperTable->m_SliceStack_GetSliceRefCount = (PLib3MFSliceStack_GetSliceRefCountPtr) dlsym(hLibrary, "lib3mf_slicestack_getslicerefcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_SliceStack_GetSliceRefCount == nullptr) + eLookupError = (*pLookup)("lib3mf_compositematerials_getallpropertyids", (void**)&(pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs)); + if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_SliceStack_AddSliceStackReference = (PLib3MFSliceStack_AddSliceStackReferencePtr) GetProcAddress(hLibrary, "lib3mf_slicestack_addslicestackreference"); - #else // _WIN32 - pWrapperTable->m_SliceStack_AddSliceStackReference = (PLib3MFSliceStack_AddSliceStackReferencePtr) dlsym(hLibrary, "lib3mf_slicestack_addslicestackreference"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_SliceStack_AddSliceStackReference == nullptr) + eLookupError = (*pLookup)("lib3mf_compositematerials_getbasematerialgroup", (void**)&(pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_SliceStack_GetSliceStackReference = (PLib3MFSliceStack_GetSliceStackReferencePtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getslicestackreference"); - #else // _WIN32 - pWrapperTable->m_SliceStack_GetSliceStackReference = (PLib3MFSliceStack_GetSliceStackReferencePtr) dlsym(hLibrary, "lib3mf_slicestack_getslicestackreference"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_SliceStack_GetSliceStackReference == nullptr) + eLookupError = (*pLookup)("lib3mf_compositematerials_addcomposite", (void**)&(pWrapperTable->m_CompositeMaterials_AddComposite)); + if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_AddComposite == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_SliceStack_CollapseSliceReferences = (PLib3MFSliceStack_CollapseSliceReferencesPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_collapseslicereferences"); - #else // _WIN32 - pWrapperTable->m_SliceStack_CollapseSliceReferences = (PLib3MFSliceStack_CollapseSliceReferencesPtr) dlsym(hLibrary, "lib3mf_slicestack_collapseslicereferences"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_SliceStack_CollapseSliceReferences == nullptr) + eLookupError = (*pLookup)("lib3mf_compositematerials_removecomposite", (void**)&(pWrapperTable->m_CompositeMaterials_RemoveComposite)); + if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_RemoveComposite == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_SliceStack_SetOwnPath = (PLib3MFSliceStack_SetOwnPathPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_setownpath"); - #else // _WIN32 - pWrapperTable->m_SliceStack_SetOwnPath = (PLib3MFSliceStack_SetOwnPathPtr) dlsym(hLibrary, "lib3mf_slicestack_setownpath"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_SliceStack_SetOwnPath == nullptr) + eLookupError = (*pLookup)("lib3mf_compositematerials_getcomposite", (void**)&(pWrapperTable->m_CompositeMaterials_GetComposite)); + if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_GetComposite == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_SliceStack_GetOwnPath = (PLib3MFSliceStack_GetOwnPathPtr) GetProcAddress(hLibrary, "lib3mf_slicestack_getownpath"); - #else // _WIN32 - pWrapperTable->m_SliceStack_GetOwnPath = (PLib3MFSliceStack_GetOwnPathPtr) dlsym(hLibrary, "lib3mf_slicestack_getownpath"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_SliceStack_GetOwnPath == nullptr) + eLookupError = (*pLookup)("lib3mf_multipropertygroup_getcount", (void**)&(pWrapperTable->m_MultiPropertyGroup_GetCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_GetCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Consumer_GetConsumerID = (PLib3MFConsumer_GetConsumerIDPtr) GetProcAddress(hLibrary, "lib3mf_consumer_getconsumerid"); - #else // _WIN32 - pWrapperTable->m_Consumer_GetConsumerID = (PLib3MFConsumer_GetConsumerIDPtr) dlsym(hLibrary, "lib3mf_consumer_getconsumerid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Consumer_GetConsumerID == nullptr) + eLookupError = (*pLookup)("lib3mf_multipropertygroup_getallpropertyids", (void**)&(pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs)); + if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Consumer_GetKeyID = (PLib3MFConsumer_GetKeyIDPtr) GetProcAddress(hLibrary, "lib3mf_consumer_getkeyid"); - #else // _WIN32 - pWrapperTable->m_Consumer_GetKeyID = (PLib3MFConsumer_GetKeyIDPtr) dlsym(hLibrary, "lib3mf_consumer_getkeyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Consumer_GetKeyID == nullptr) + eLookupError = (*pLookup)("lib3mf_multipropertygroup_addmultiproperty", (void**)&(pWrapperTable->m_MultiPropertyGroup_AddMultiProperty)); + if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_AddMultiProperty == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Consumer_GetKeyValue = (PLib3MFConsumer_GetKeyValuePtr) GetProcAddress(hLibrary, "lib3mf_consumer_getkeyvalue"); - #else // _WIN32 - pWrapperTable->m_Consumer_GetKeyValue = (PLib3MFConsumer_GetKeyValuePtr) dlsym(hLibrary, "lib3mf_consumer_getkeyvalue"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Consumer_GetKeyValue == nullptr) + eLookupError = (*pLookup)("lib3mf_multipropertygroup_setmultiproperty", (void**)&(pWrapperTable->m_MultiPropertyGroup_SetMultiProperty)); + if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_SetMultiProperty == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_AccessRight_GetConsumer = (PLib3MFAccessRight_GetConsumerPtr) GetProcAddress(hLibrary, "lib3mf_accessright_getconsumer"); - #else // _WIN32 - pWrapperTable->m_AccessRight_GetConsumer = (PLib3MFAccessRight_GetConsumerPtr) dlsym(hLibrary, "lib3mf_accessright_getconsumer"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_AccessRight_GetConsumer == nullptr) + eLookupError = (*pLookup)("lib3mf_multipropertygroup_getmultiproperty", (void**)&(pWrapperTable->m_MultiPropertyGroup_GetMultiProperty)); + if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_GetMultiProperty == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_AccessRight_GetWrappingAlgorithm = (PLib3MFAccessRight_GetWrappingAlgorithmPtr) GetProcAddress(hLibrary, "lib3mf_accessright_getwrappingalgorithm"); - #else // _WIN32 - pWrapperTable->m_AccessRight_GetWrappingAlgorithm = (PLib3MFAccessRight_GetWrappingAlgorithmPtr) dlsym(hLibrary, "lib3mf_accessright_getwrappingalgorithm"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_AccessRight_GetWrappingAlgorithm == nullptr) + eLookupError = (*pLookup)("lib3mf_multipropertygroup_removemultiproperty", (void**)&(pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty)); + if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_AccessRight_GetMgfAlgorithm = (PLib3MFAccessRight_GetMgfAlgorithmPtr) GetProcAddress(hLibrary, "lib3mf_accessright_getmgfalgorithm"); - #else // _WIN32 - pWrapperTable->m_AccessRight_GetMgfAlgorithm = (PLib3MFAccessRight_GetMgfAlgorithmPtr) dlsym(hLibrary, "lib3mf_accessright_getmgfalgorithm"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_AccessRight_GetMgfAlgorithm == nullptr) + eLookupError = (*pLookup)("lib3mf_multipropertygroup_getlayercount", (void**)&(pWrapperTable->m_MultiPropertyGroup_GetLayerCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_GetLayerCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_AccessRight_GetDigestMethod = (PLib3MFAccessRight_GetDigestMethodPtr) GetProcAddress(hLibrary, "lib3mf_accessright_getdigestmethod"); - #else // _WIN32 - pWrapperTable->m_AccessRight_GetDigestMethod = (PLib3MFAccessRight_GetDigestMethodPtr) dlsym(hLibrary, "lib3mf_accessright_getdigestmethod"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_AccessRight_GetDigestMethod == nullptr) + eLookupError = (*pLookup)("lib3mf_multipropertygroup_addlayer", (void**)&(pWrapperTable->m_MultiPropertyGroup_AddLayer)); + if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_AddLayer == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm = (PLib3MFContentEncryptionParams_GetEncryptionAlgorithmPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getencryptionalgorithm"); - #else // _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm = (PLib3MFContentEncryptionParams_GetEncryptionAlgorithmPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getencryptionalgorithm"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm == nullptr) + eLookupError = (*pLookup)("lib3mf_multipropertygroup_getlayer", (void**)&(pWrapperTable->m_MultiPropertyGroup_GetLayer)); + if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_GetLayer == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetKey = (PLib3MFContentEncryptionParams_GetKeyPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getkey"); - #else // _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetKey = (PLib3MFContentEncryptionParams_GetKeyPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getkey"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ContentEncryptionParams_GetKey == nullptr) + eLookupError = (*pLookup)("lib3mf_multipropertygroup_removelayer", (void**)&(pWrapperTable->m_MultiPropertyGroup_RemoveLayer)); + if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_RemoveLayer == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_image3d_getname", (void**)&(pWrapperTable->m_Image3D_GetName)); + if ( (eLookupError != 0) || (pWrapperTable->m_Image3D_GetName == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_image3d_setname", (void**)&(pWrapperTable->m_Image3D_SetName)); + if ( (eLookupError != 0) || (pWrapperTable->m_Image3D_SetName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetInitializationVector = (PLib3MFContentEncryptionParams_GetInitializationVectorPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getinitializationvector"); - #else // _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetInitializationVector = (PLib3MFContentEncryptionParams_GetInitializationVectorPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getinitializationvector"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ContentEncryptionParams_GetInitializationVector == nullptr) + eLookupError = (*pLookup)("lib3mf_image3d_isimagestack", (void**)&(pWrapperTable->m_Image3D_IsImageStack)); + if ( (eLookupError != 0) || (pWrapperTable->m_Image3D_IsImageStack == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetAuthenticationTag = (PLib3MFContentEncryptionParams_GetAuthenticationTagPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getauthenticationtag"); - #else // _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetAuthenticationTag = (PLib3MFContentEncryptionParams_GetAuthenticationTagPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getauthenticationtag"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ContentEncryptionParams_GetAuthenticationTag == nullptr) + eLookupError = (*pLookup)("lib3mf_imagestack_getrowcount", (void**)&(pWrapperTable->m_ImageStack_GetRowCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImageStack_GetRowCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ContentEncryptionParams_SetAuthenticationTag = (PLib3MFContentEncryptionParams_SetAuthenticationTagPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_setauthenticationtag"); - #else // _WIN32 - pWrapperTable->m_ContentEncryptionParams_SetAuthenticationTag = (PLib3MFContentEncryptionParams_SetAuthenticationTagPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_setauthenticationtag"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ContentEncryptionParams_SetAuthenticationTag == nullptr) + eLookupError = (*pLookup)("lib3mf_imagestack_setrowcount", (void**)&(pWrapperTable->m_ImageStack_SetRowCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImageStack_SetRowCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData = (PLib3MFContentEncryptionParams_GetAdditionalAuthenticationDataPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getadditionalauthenticationdata"); - #else // _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData = (PLib3MFContentEncryptionParams_GetAdditionalAuthenticationDataPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getadditionalauthenticationdata"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData == nullptr) + eLookupError = (*pLookup)("lib3mf_imagestack_getcolumncount", (void**)&(pWrapperTable->m_ImageStack_GetColumnCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImageStack_GetColumnCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetDescriptor = (PLib3MFContentEncryptionParams_GetDescriptorPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getdescriptor"); - #else // _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetDescriptor = (PLib3MFContentEncryptionParams_GetDescriptorPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getdescriptor"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ContentEncryptionParams_GetDescriptor == nullptr) + eLookupError = (*pLookup)("lib3mf_imagestack_setcolumncount", (void**)&(pWrapperTable->m_ImageStack_SetColumnCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImageStack_SetColumnCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetKeyUUID = (PLib3MFContentEncryptionParams_GetKeyUUIDPtr) GetProcAddress(hLibrary, "lib3mf_contentencryptionparams_getkeyuuid"); - #else // _WIN32 - pWrapperTable->m_ContentEncryptionParams_GetKeyUUID = (PLib3MFContentEncryptionParams_GetKeyUUIDPtr) dlsym(hLibrary, "lib3mf_contentencryptionparams_getkeyuuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ContentEncryptionParams_GetKeyUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_imagestack_getsheetcount", (void**)&(pWrapperTable->m_ImageStack_GetSheetCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImageStack_GetSheetCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ResourceData_GetPath = (PLib3MFResourceData_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_resourcedata_getpath"); - #else // _WIN32 - pWrapperTable->m_ResourceData_GetPath = (PLib3MFResourceData_GetPathPtr) dlsym(hLibrary, "lib3mf_resourcedata_getpath"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ResourceData_GetPath == nullptr) + eLookupError = (*pLookup)("lib3mf_imagestack_getsheet", (void**)&(pWrapperTable->m_ImageStack_GetSheet)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImageStack_GetSheet == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ResourceData_GetEncryptionAlgorithm = (PLib3MFResourceData_GetEncryptionAlgorithmPtr) GetProcAddress(hLibrary, "lib3mf_resourcedata_getencryptionalgorithm"); - #else // _WIN32 - pWrapperTable->m_ResourceData_GetEncryptionAlgorithm = (PLib3MFResourceData_GetEncryptionAlgorithmPtr) dlsym(hLibrary, "lib3mf_resourcedata_getencryptionalgorithm"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ResourceData_GetEncryptionAlgorithm == nullptr) + eLookupError = (*pLookup)("lib3mf_imagestack_setsheet", (void**)&(pWrapperTable->m_ImageStack_SetSheet)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImageStack_SetSheet == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ResourceData_GetCompression = (PLib3MFResourceData_GetCompressionPtr) GetProcAddress(hLibrary, "lib3mf_resourcedata_getcompression"); - #else // _WIN32 - pWrapperTable->m_ResourceData_GetCompression = (PLib3MFResourceData_GetCompressionPtr) dlsym(hLibrary, "lib3mf_resourcedata_getcompression"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ResourceData_GetCompression == nullptr) + eLookupError = (*pLookup)("lib3mf_imagestack_createemptysheet", (void**)&(pWrapperTable->m_ImageStack_CreateEmptySheet)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImageStack_CreateEmptySheet == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ResourceData_GetAdditionalAuthenticationData = (PLib3MFResourceData_GetAdditionalAuthenticationDataPtr) GetProcAddress(hLibrary, "lib3mf_resourcedata_getadditionalauthenticationdata"); - #else // _WIN32 - pWrapperTable->m_ResourceData_GetAdditionalAuthenticationData = (PLib3MFResourceData_GetAdditionalAuthenticationDataPtr) dlsym(hLibrary, "lib3mf_resourcedata_getadditionalauthenticationdata"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ResourceData_GetAdditionalAuthenticationData == nullptr) + eLookupError = (*pLookup)("lib3mf_imagestack_createsheetfrombuffer", (void**)&(pWrapperTable->m_ImageStack_CreateSheetFromBuffer)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImageStack_CreateSheetFromBuffer == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ResourceDataGroup_GetKeyUUID = (PLib3MFResourceDataGroup_GetKeyUUIDPtr) GetProcAddress(hLibrary, "lib3mf_resourcedatagroup_getkeyuuid"); - #else // _WIN32 - pWrapperTable->m_ResourceDataGroup_GetKeyUUID = (PLib3MFResourceDataGroup_GetKeyUUIDPtr) dlsym(hLibrary, "lib3mf_resourcedatagroup_getkeyuuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ResourceDataGroup_GetKeyUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_imagestack_createsheetfromfile", (void**)&(pWrapperTable->m_ImageStack_CreateSheetFromFile)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImageStack_CreateSheetFromFile == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ResourceDataGroup_AddAccessRight = (PLib3MFResourceDataGroup_AddAccessRightPtr) GetProcAddress(hLibrary, "lib3mf_resourcedatagroup_addaccessright"); - #else // _WIN32 - pWrapperTable->m_ResourceDataGroup_AddAccessRight = (PLib3MFResourceDataGroup_AddAccessRightPtr) dlsym(hLibrary, "lib3mf_resourcedatagroup_addaccessright"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ResourceDataGroup_AddAccessRight == nullptr) + eLookupError = (*pLookup)("lib3mf_attachment_getpath", (void**)&(pWrapperTable->m_Attachment_GetPath)); + if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_GetPath == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer = (PLib3MFResourceDataGroup_FindAccessRightByConsumerPtr) GetProcAddress(hLibrary, "lib3mf_resourcedatagroup_findaccessrightbyconsumer"); - #else // _WIN32 - pWrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer = (PLib3MFResourceDataGroup_FindAccessRightByConsumerPtr) dlsym(hLibrary, "lib3mf_resourcedatagroup_findaccessrightbyconsumer"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer == nullptr) + eLookupError = (*pLookup)("lib3mf_attachment_setpath", (void**)&(pWrapperTable->m_Attachment_SetPath)); + if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_SetPath == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ResourceDataGroup_RemoveAccessRight = (PLib3MFResourceDataGroup_RemoveAccessRightPtr) GetProcAddress(hLibrary, "lib3mf_resourcedatagroup_removeaccessright"); - #else // _WIN32 - pWrapperTable->m_ResourceDataGroup_RemoveAccessRight = (PLib3MFResourceDataGroup_RemoveAccessRightPtr) dlsym(hLibrary, "lib3mf_resourcedatagroup_removeaccessright"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ResourceDataGroup_RemoveAccessRight == nullptr) + eLookupError = (*pLookup)("lib3mf_attachment_packagepart", (void**)&(pWrapperTable->m_Attachment_PackagePart)); + if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_PackagePart == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_AddConsumer = (PLib3MFKeyStore_AddConsumerPtr) GetProcAddress(hLibrary, "lib3mf_keystore_addconsumer"); - #else // _WIN32 - pWrapperTable->m_KeyStore_AddConsumer = (PLib3MFKeyStore_AddConsumerPtr) dlsym(hLibrary, "lib3mf_keystore_addconsumer"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_AddConsumer == nullptr) + eLookupError = (*pLookup)("lib3mf_attachment_getrelationshiptype", (void**)&(pWrapperTable->m_Attachment_GetRelationShipType)); + if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_GetRelationShipType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_GetConsumerCount = (PLib3MFKeyStore_GetConsumerCountPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getconsumercount"); - #else // _WIN32 - pWrapperTable->m_KeyStore_GetConsumerCount = (PLib3MFKeyStore_GetConsumerCountPtr) dlsym(hLibrary, "lib3mf_keystore_getconsumercount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_GetConsumerCount == nullptr) + eLookupError = (*pLookup)("lib3mf_attachment_setrelationshiptype", (void**)&(pWrapperTable->m_Attachment_SetRelationShipType)); + if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_SetRelationShipType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_GetConsumer = (PLib3MFKeyStore_GetConsumerPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getconsumer"); - #else // _WIN32 - pWrapperTable->m_KeyStore_GetConsumer = (PLib3MFKeyStore_GetConsumerPtr) dlsym(hLibrary, "lib3mf_keystore_getconsumer"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_GetConsumer == nullptr) + eLookupError = (*pLookup)("lib3mf_attachment_writetofile", (void**)&(pWrapperTable->m_Attachment_WriteToFile)); + if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_WriteToFile == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_RemoveConsumer = (PLib3MFKeyStore_RemoveConsumerPtr) GetProcAddress(hLibrary, "lib3mf_keystore_removeconsumer"); - #else // _WIN32 - pWrapperTable->m_KeyStore_RemoveConsumer = (PLib3MFKeyStore_RemoveConsumerPtr) dlsym(hLibrary, "lib3mf_keystore_removeconsumer"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_RemoveConsumer == nullptr) + eLookupError = (*pLookup)("lib3mf_attachment_readfromfile", (void**)&(pWrapperTable->m_Attachment_ReadFromFile)); + if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_ReadFromFile == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_FindConsumer = (PLib3MFKeyStore_FindConsumerPtr) GetProcAddress(hLibrary, "lib3mf_keystore_findconsumer"); - #else // _WIN32 - pWrapperTable->m_KeyStore_FindConsumer = (PLib3MFKeyStore_FindConsumerPtr) dlsym(hLibrary, "lib3mf_keystore_findconsumer"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_FindConsumer == nullptr) + eLookupError = (*pLookup)("lib3mf_attachment_readfromcallback", (void**)&(pWrapperTable->m_Attachment_ReadFromCallback)); + if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_ReadFromCallback == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_GetResourceDataGroupCount = (PLib3MFKeyStore_GetResourceDataGroupCountPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getresourcedatagroupcount"); - #else // _WIN32 - pWrapperTable->m_KeyStore_GetResourceDataGroupCount = (PLib3MFKeyStore_GetResourceDataGroupCountPtr) dlsym(hLibrary, "lib3mf_keystore_getresourcedatagroupcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_GetResourceDataGroupCount == nullptr) + eLookupError = (*pLookup)("lib3mf_attachment_getstreamsize", (void**)&(pWrapperTable->m_Attachment_GetStreamSize)); + if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_GetStreamSize == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_AddResourceDataGroup = (PLib3MFKeyStore_AddResourceDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_keystore_addresourcedatagroup"); - #else // _WIN32 - pWrapperTable->m_KeyStore_AddResourceDataGroup = (PLib3MFKeyStore_AddResourceDataGroupPtr) dlsym(hLibrary, "lib3mf_keystore_addresourcedatagroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_AddResourceDataGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_attachment_writetobuffer", (void**)&(pWrapperTable->m_Attachment_WriteToBuffer)); + if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_WriteToBuffer == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_GetResourceDataGroup = (PLib3MFKeyStore_GetResourceDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getresourcedatagroup"); - #else // _WIN32 - pWrapperTable->m_KeyStore_GetResourceDataGroup = (PLib3MFKeyStore_GetResourceDataGroupPtr) dlsym(hLibrary, "lib3mf_keystore_getresourcedatagroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_GetResourceDataGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_attachment_readfrombuffer", (void**)&(pWrapperTable->m_Attachment_ReadFromBuffer)); + if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_ReadFromBuffer == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_RemoveResourceDataGroup = (PLib3MFKeyStore_RemoveResourceDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_keystore_removeresourcedatagroup"); - #else // _WIN32 - pWrapperTable->m_KeyStore_RemoveResourceDataGroup = (PLib3MFKeyStore_RemoveResourceDataGroupPtr) dlsym(hLibrary, "lib3mf_keystore_removeresourcedatagroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_RemoveResourceDataGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2d_getattachment", (void**)&(pWrapperTable->m_Texture2D_GetAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_GetAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_FindResourceDataGroup = (PLib3MFKeyStore_FindResourceDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_keystore_findresourcedatagroup"); - #else // _WIN32 - pWrapperTable->m_KeyStore_FindResourceDataGroup = (PLib3MFKeyStore_FindResourceDataGroupPtr) dlsym(hLibrary, "lib3mf_keystore_findresourcedatagroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_FindResourceDataGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2d_setattachment", (void**)&(pWrapperTable->m_Texture2D_SetAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_SetAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_AddResourceData = (PLib3MFKeyStore_AddResourceDataPtr) GetProcAddress(hLibrary, "lib3mf_keystore_addresourcedata"); - #else // _WIN32 - pWrapperTable->m_KeyStore_AddResourceData = (PLib3MFKeyStore_AddResourceDataPtr) dlsym(hLibrary, "lib3mf_keystore_addresourcedata"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_AddResourceData == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2d_getcontenttype", (void**)&(pWrapperTable->m_Texture2D_GetContentType)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_GetContentType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_RemoveResourceData = (PLib3MFKeyStore_RemoveResourceDataPtr) GetProcAddress(hLibrary, "lib3mf_keystore_removeresourcedata"); - #else // _WIN32 - pWrapperTable->m_KeyStore_RemoveResourceData = (PLib3MFKeyStore_RemoveResourceDataPtr) dlsym(hLibrary, "lib3mf_keystore_removeresourcedata"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_RemoveResourceData == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2d_setcontenttype", (void**)&(pWrapperTable->m_Texture2D_SetContentType)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_SetContentType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_FindResourceData = (PLib3MFKeyStore_FindResourceDataPtr) GetProcAddress(hLibrary, "lib3mf_keystore_findresourcedata"); - #else // _WIN32 - pWrapperTable->m_KeyStore_FindResourceData = (PLib3MFKeyStore_FindResourceDataPtr) dlsym(hLibrary, "lib3mf_keystore_findresourcedata"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_FindResourceData == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2d_gettilestyleuv", (void**)&(pWrapperTable->m_Texture2D_GetTileStyleUV)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_GetTileStyleUV == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_GetResourceDataCount = (PLib3MFKeyStore_GetResourceDataCountPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getresourcedatacount"); - #else // _WIN32 - pWrapperTable->m_KeyStore_GetResourceDataCount = (PLib3MFKeyStore_GetResourceDataCountPtr) dlsym(hLibrary, "lib3mf_keystore_getresourcedatacount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_GetResourceDataCount == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2d_settilestyleuv", (void**)&(pWrapperTable->m_Texture2D_SetTileStyleUV)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_SetTileStyleUV == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_GetResourceData = (PLib3MFKeyStore_GetResourceDataPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getresourcedata"); - #else // _WIN32 - pWrapperTable->m_KeyStore_GetResourceData = (PLib3MFKeyStore_GetResourceDataPtr) dlsym(hLibrary, "lib3mf_keystore_getresourcedata"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_GetResourceData == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2d_getfilter", (void**)&(pWrapperTable->m_Texture2D_GetFilter)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_GetFilter == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_GetUUID = (PLib3MFKeyStore_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_keystore_getuuid"); - #else // _WIN32 - pWrapperTable->m_KeyStore_GetUUID = (PLib3MFKeyStore_GetUUIDPtr) dlsym(hLibrary, "lib3mf_keystore_getuuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_GetUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_texture2d_setfilter", (void**)&(pWrapperTable->m_Texture2D_SetFilter)); + if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_SetFilter == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_KeyStore_SetUUID = (PLib3MFKeyStore_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_keystore_setuuid"); - #else // _WIN32 - pWrapperTable->m_KeyStore_SetUUID = (PLib3MFKeyStore_SetUUIDPtr) dlsym(hLibrary, "lib3mf_keystore_setuuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_KeyStore_SetUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitport_getidentifier", (void**)&(pWrapperTable->m_ImplicitPort_GetIdentifier)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitPort_GetIdentifier == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_RootModelPart = (PLib3MFModel_RootModelPartPtr) GetProcAddress(hLibrary, "lib3mf_model_rootmodelpart"); - #else // _WIN32 - pWrapperTable->m_Model_RootModelPart = (PLib3MFModel_RootModelPartPtr) dlsym(hLibrary, "lib3mf_model_rootmodelpart"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_RootModelPart == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitport_setidentifier", (void**)&(pWrapperTable->m_ImplicitPort_SetIdentifier)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitPort_SetIdentifier == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_FindOrCreatePackagePart = (PLib3MFModel_FindOrCreatePackagePartPtr) GetProcAddress(hLibrary, "lib3mf_model_findorcreatepackagepart"); - #else // _WIN32 - pWrapperTable->m_Model_FindOrCreatePackagePart = (PLib3MFModel_FindOrCreatePackagePartPtr) dlsym(hLibrary, "lib3mf_model_findorcreatepackagepart"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_FindOrCreatePackagePart == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitport_getdisplayname", (void**)&(pWrapperTable->m_ImplicitPort_GetDisplayName)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitPort_GetDisplayName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_SetUnit = (PLib3MFModel_SetUnitPtr) GetProcAddress(hLibrary, "lib3mf_model_setunit"); - #else // _WIN32 - pWrapperTable->m_Model_SetUnit = (PLib3MFModel_SetUnitPtr) dlsym(hLibrary, "lib3mf_model_setunit"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_SetUnit == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitport_setdisplayname", (void**)&(pWrapperTable->m_ImplicitPort_SetDisplayName)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitPort_SetDisplayName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetUnit = (PLib3MFModel_GetUnitPtr) GetProcAddress(hLibrary, "lib3mf_model_getunit"); - #else // _WIN32 - pWrapperTable->m_Model_GetUnit = (PLib3MFModel_GetUnitPtr) dlsym(hLibrary, "lib3mf_model_getunit"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetUnit == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitport_settype", (void**)&(pWrapperTable->m_ImplicitPort_SetType)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitPort_SetType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetLanguage = (PLib3MFModel_GetLanguagePtr) GetProcAddress(hLibrary, "lib3mf_model_getlanguage"); - #else // _WIN32 - pWrapperTable->m_Model_GetLanguage = (PLib3MFModel_GetLanguagePtr) dlsym(hLibrary, "lib3mf_model_getlanguage"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetLanguage == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitport_gettype", (void**)&(pWrapperTable->m_ImplicitPort_GetType)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitPort_GetType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_SetLanguage = (PLib3MFModel_SetLanguagePtr) GetProcAddress(hLibrary, "lib3mf_model_setlanguage"); - #else // _WIN32 - pWrapperTable->m_Model_SetLanguage = (PLib3MFModel_SetLanguagePtr) dlsym(hLibrary, "lib3mf_model_setlanguage"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_SetLanguage == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitport_getreference", (void**)&(pWrapperTable->m_ImplicitPort_GetReference)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitPort_GetReference == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_QueryWriter = (PLib3MFModel_QueryWriterPtr) GetProcAddress(hLibrary, "lib3mf_model_querywriter"); - #else // _WIN32 - pWrapperTable->m_Model_QueryWriter = (PLib3MFModel_QueryWriterPtr) dlsym(hLibrary, "lib3mf_model_querywriter"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_QueryWriter == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitport_setreference", (void**)&(pWrapperTable->m_ImplicitPort_SetReference)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitPort_SetReference == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_QueryReader = (PLib3MFModel_QueryReaderPtr) GetProcAddress(hLibrary, "lib3mf_model_queryreader"); - #else // _WIN32 - pWrapperTable->m_Model_QueryReader = (PLib3MFModel_QueryReaderPtr) dlsym(hLibrary, "lib3mf_model_queryreader"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_QueryReader == nullptr) + eLookupError = (*pLookup)("lib3mf_iterator_movenext", (void**)&(pWrapperTable->m_Iterator_MoveNext)); + if ( (eLookupError != 0) || (pWrapperTable->m_Iterator_MoveNext == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetResourceByID = (PLib3MFModel_GetResourceByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getresourcebyid"); - #else // _WIN32 - pWrapperTable->m_Model_GetResourceByID = (PLib3MFModel_GetResourceByIDPtr) dlsym(hLibrary, "lib3mf_model_getresourcebyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetResourceByID == nullptr) + eLookupError = (*pLookup)("lib3mf_iterator_moveprevious", (void**)&(pWrapperTable->m_Iterator_MovePrevious)); + if ( (eLookupError != 0) || (pWrapperTable->m_Iterator_MovePrevious == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetTexture2DByID = (PLib3MFModel_GetTexture2DByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_gettexture2dbyid"); - #else // _WIN32 - pWrapperTable->m_Model_GetTexture2DByID = (PLib3MFModel_GetTexture2DByIDPtr) dlsym(hLibrary, "lib3mf_model_gettexture2dbyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetTexture2DByID == nullptr) + eLookupError = (*pLookup)("lib3mf_iterator_count", (void**)&(pWrapperTable->m_Iterator_Count)); + if ( (eLookupError != 0) || (pWrapperTable->m_Iterator_Count == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetPropertyTypeByID = (PLib3MFModel_GetPropertyTypeByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getpropertytypebyid"); - #else // _WIN32 - pWrapperTable->m_Model_GetPropertyTypeByID = (PLib3MFModel_GetPropertyTypeByIDPtr) dlsym(hLibrary, "lib3mf_model_getpropertytypebyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetPropertyTypeByID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitportiterator_getcurrent", (void**)&(pWrapperTable->m_ImplicitPortIterator_GetCurrent)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitPortIterator_GetCurrent == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetBaseMaterialGroupByID = (PLib3MFModel_GetBaseMaterialGroupByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getbasematerialgroupbyid"); - #else // _WIN32 - pWrapperTable->m_Model_GetBaseMaterialGroupByID = (PLib3MFModel_GetBaseMaterialGroupByIDPtr) dlsym(hLibrary, "lib3mf_model_getbasematerialgroupbyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetBaseMaterialGroupByID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_getidentifier", (void**)&(pWrapperTable->m_ImplicitNode_GetIdentifier)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_GetIdentifier == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetTexture2DGroupByID = (PLib3MFModel_GetTexture2DGroupByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_gettexture2dgroupbyid"); - #else // _WIN32 - pWrapperTable->m_Model_GetTexture2DGroupByID = (PLib3MFModel_GetTexture2DGroupByIDPtr) dlsym(hLibrary, "lib3mf_model_gettexture2dgroupbyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetTexture2DGroupByID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_setidentifier", (void**)&(pWrapperTable->m_ImplicitNode_SetIdentifier)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_SetIdentifier == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetCompositeMaterialsByID = (PLib3MFModel_GetCompositeMaterialsByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getcompositematerialsbyid"); - #else // _WIN32 - pWrapperTable->m_Model_GetCompositeMaterialsByID = (PLib3MFModel_GetCompositeMaterialsByIDPtr) dlsym(hLibrary, "lib3mf_model_getcompositematerialsbyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetCompositeMaterialsByID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_getdisplayname", (void**)&(pWrapperTable->m_ImplicitNode_GetDisplayName)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_GetDisplayName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetMultiPropertyGroupByID = (PLib3MFModel_GetMultiPropertyGroupByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getmultipropertygroupbyid"); - #else // _WIN32 - pWrapperTable->m_Model_GetMultiPropertyGroupByID = (PLib3MFModel_GetMultiPropertyGroupByIDPtr) dlsym(hLibrary, "lib3mf_model_getmultipropertygroupbyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetMultiPropertyGroupByID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_setdisplayname", (void**)&(pWrapperTable->m_ImplicitNode_SetDisplayName)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_SetDisplayName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetMeshObjectByID = (PLib3MFModel_GetMeshObjectByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getmeshobjectbyid"); - #else // _WIN32 - pWrapperTable->m_Model_GetMeshObjectByID = (PLib3MFModel_GetMeshObjectByIDPtr) dlsym(hLibrary, "lib3mf_model_getmeshobjectbyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetMeshObjectByID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_gettag", (void**)&(pWrapperTable->m_ImplicitNode_GetTag)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_GetTag == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetComponentsObjectByID = (PLib3MFModel_GetComponentsObjectByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getcomponentsobjectbyid"); - #else // _WIN32 - pWrapperTable->m_Model_GetComponentsObjectByID = (PLib3MFModel_GetComponentsObjectByIDPtr) dlsym(hLibrary, "lib3mf_model_getcomponentsobjectbyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetComponentsObjectByID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_settag", (void**)&(pWrapperTable->m_ImplicitNode_SetTag)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_SetTag == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetColorGroupByID = (PLib3MFModel_GetColorGroupByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getcolorgroupbyid"); - #else // _WIN32 - pWrapperTable->m_Model_GetColorGroupByID = (PLib3MFModel_GetColorGroupByIDPtr) dlsym(hLibrary, "lib3mf_model_getcolorgroupbyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetColorGroupByID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_getnodetype", (void**)&(pWrapperTable->m_ImplicitNode_GetNodeType)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_GetNodeType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetSliceStackByID = (PLib3MFModel_GetSliceStackByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getslicestackbyid"); - #else // _WIN32 - pWrapperTable->m_Model_GetSliceStackByID = (PLib3MFModel_GetSliceStackByIDPtr) dlsym(hLibrary, "lib3mf_model_getslicestackbyid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetSliceStackByID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_addinput", (void**)&(pWrapperTable->m_ImplicitNode_AddInput)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_AddInput == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetBuildUUID = (PLib3MFModel_GetBuildUUIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getbuilduuid"); - #else // _WIN32 - pWrapperTable->m_Model_GetBuildUUID = (PLib3MFModel_GetBuildUUIDPtr) dlsym(hLibrary, "lib3mf_model_getbuilduuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetBuildUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_getinputs", (void**)&(pWrapperTable->m_ImplicitNode_GetInputs)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_GetInputs == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_SetBuildUUID = (PLib3MFModel_SetBuildUUIDPtr) GetProcAddress(hLibrary, "lib3mf_model_setbuilduuid"); - #else // _WIN32 - pWrapperTable->m_Model_SetBuildUUID = (PLib3MFModel_SetBuildUUIDPtr) dlsym(hLibrary, "lib3mf_model_setbuilduuid"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_SetBuildUUID == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_addoutput", (void**)&(pWrapperTable->m_ImplicitNode_AddOutput)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_AddOutput == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetBuildItems = (PLib3MFModel_GetBuildItemsPtr) GetProcAddress(hLibrary, "lib3mf_model_getbuilditems"); - #else // _WIN32 - pWrapperTable->m_Model_GetBuildItems = (PLib3MFModel_GetBuildItemsPtr) dlsym(hLibrary, "lib3mf_model_getbuilditems"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetBuildItems == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_getoutputs", (void**)&(pWrapperTable->m_ImplicitNode_GetOutputs)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_GetOutputs == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetOutbox = (PLib3MFModel_GetOutboxPtr) GetProcAddress(hLibrary, "lib3mf_model_getoutbox"); - #else // _WIN32 - pWrapperTable->m_Model_GetOutbox = (PLib3MFModel_GetOutboxPtr) dlsym(hLibrary, "lib3mf_model_getoutbox"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetOutbox == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_findinput", (void**)&(pWrapperTable->m_ImplicitNode_FindInput)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_FindInput == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetResources = (PLib3MFModel_GetResourcesPtr) GetProcAddress(hLibrary, "lib3mf_model_getresources"); - #else // _WIN32 - pWrapperTable->m_Model_GetResources = (PLib3MFModel_GetResourcesPtr) dlsym(hLibrary, "lib3mf_model_getresources"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetResources == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_findoutput", (void**)&(pWrapperTable->m_ImplicitNode_FindOutput)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_FindOutput == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetObjects = (PLib3MFModel_GetObjectsPtr) GetProcAddress(hLibrary, "lib3mf_model_getobjects"); - #else // _WIN32 - pWrapperTable->m_Model_GetObjects = (PLib3MFModel_GetObjectsPtr) dlsym(hLibrary, "lib3mf_model_getobjects"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetObjects == nullptr) + eLookupError = (*pLookup)("lib3mf_implicitnode_aretypesvalid", (void**)&(pWrapperTable->m_ImplicitNode_AreTypesValid)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitNode_AreTypesValid == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetMeshObjects = (PLib3MFModel_GetMeshObjectsPtr) GetProcAddress(hLibrary, "lib3mf_model_getmeshobjects"); - #else // _WIN32 - pWrapperTable->m_Model_GetMeshObjects = (PLib3MFModel_GetMeshObjectsPtr) dlsym(hLibrary, "lib3mf_model_getmeshobjects"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetMeshObjects == nullptr) + eLookupError = (*pLookup)("lib3mf_oneinputnode_getinputa", (void**)&(pWrapperTable->m_OneInputNode_GetInputA)); + if ( (eLookupError != 0) || (pWrapperTable->m_OneInputNode_GetInputA == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetComponentsObjects = (PLib3MFModel_GetComponentsObjectsPtr) GetProcAddress(hLibrary, "lib3mf_model_getcomponentsobjects"); - #else // _WIN32 - pWrapperTable->m_Model_GetComponentsObjects = (PLib3MFModel_GetComponentsObjectsPtr) dlsym(hLibrary, "lib3mf_model_getcomponentsobjects"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetComponentsObjects == nullptr) + eLookupError = (*pLookup)("lib3mf_oneinputnode_getoutputresult", (void**)&(pWrapperTable->m_OneInputNode_GetOutputResult)); + if ( (eLookupError != 0) || (pWrapperTable->m_OneInputNode_GetOutputResult == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetTexture2Ds = (PLib3MFModel_GetTexture2DsPtr) GetProcAddress(hLibrary, "lib3mf_model_gettexture2ds"); - #else // _WIN32 - pWrapperTable->m_Model_GetTexture2Ds = (PLib3MFModel_GetTexture2DsPtr) dlsym(hLibrary, "lib3mf_model_gettexture2ds"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetTexture2Ds == nullptr) + eLookupError = (*pLookup)("lib3mf_resourceidnode_setresource", (void**)&(pWrapperTable->m_ResourceIdNode_SetResource)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIdNode_SetResource == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetBaseMaterialGroups = (PLib3MFModel_GetBaseMaterialGroupsPtr) GetProcAddress(hLibrary, "lib3mf_model_getbasematerialgroups"); - #else // _WIN32 - pWrapperTable->m_Model_GetBaseMaterialGroups = (PLib3MFModel_GetBaseMaterialGroupsPtr) dlsym(hLibrary, "lib3mf_model_getbasematerialgroups"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetBaseMaterialGroups == nullptr) + eLookupError = (*pLookup)("lib3mf_resourceidnode_getresource", (void**)&(pWrapperTable->m_ResourceIdNode_GetResource)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIdNode_GetResource == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetColorGroups = (PLib3MFModel_GetColorGroupsPtr) GetProcAddress(hLibrary, "lib3mf_model_getcolorgroups"); - #else // _WIN32 - pWrapperTable->m_Model_GetColorGroups = (PLib3MFModel_GetColorGroupsPtr) dlsym(hLibrary, "lib3mf_model_getcolorgroups"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetColorGroups == nullptr) + eLookupError = (*pLookup)("lib3mf_resourceidnode_getoutputvalue", (void**)&(pWrapperTable->m_ResourceIdNode_GetOutputValue)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIdNode_GetOutputValue == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetTexture2DGroups = (PLib3MFModel_GetTexture2DGroupsPtr) GetProcAddress(hLibrary, "lib3mf_model_gettexture2dgroups"); - #else // _WIN32 - pWrapperTable->m_Model_GetTexture2DGroups = (PLib3MFModel_GetTexture2DGroupsPtr) dlsym(hLibrary, "lib3mf_model_gettexture2dgroups"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetTexture2DGroups == nullptr) + eLookupError = (*pLookup)("lib3mf_twoinputnode_getinputb", (void**)&(pWrapperTable->m_TwoInputNode_GetInputB)); + if ( (eLookupError != 0) || (pWrapperTable->m_TwoInputNode_GetInputB == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetCompositeMaterials = (PLib3MFModel_GetCompositeMaterialsPtr) GetProcAddress(hLibrary, "lib3mf_model_getcompositematerials"); - #else // _WIN32 - pWrapperTable->m_Model_GetCompositeMaterials = (PLib3MFModel_GetCompositeMaterialsPtr) dlsym(hLibrary, "lib3mf_model_getcompositematerials"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetCompositeMaterials == nullptr) + eLookupError = (*pLookup)("lib3mf_selectnode_getinputb", (void**)&(pWrapperTable->m_SelectNode_GetInputB)); + if ( (eLookupError != 0) || (pWrapperTable->m_SelectNode_GetInputB == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetMultiPropertyGroups = (PLib3MFModel_GetMultiPropertyGroupsPtr) GetProcAddress(hLibrary, "lib3mf_model_getmultipropertygroups"); - #else // _WIN32 - pWrapperTable->m_Model_GetMultiPropertyGroups = (PLib3MFModel_GetMultiPropertyGroupsPtr) dlsym(hLibrary, "lib3mf_model_getmultipropertygroups"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetMultiPropertyGroups == nullptr) + eLookupError = (*pLookup)("lib3mf_selectnode_getinputc", (void**)&(pWrapperTable->m_SelectNode_GetInputC)); + if ( (eLookupError != 0) || (pWrapperTable->m_SelectNode_GetInputC == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetSliceStacks = (PLib3MFModel_GetSliceStacksPtr) GetProcAddress(hLibrary, "lib3mf_model_getslicestacks"); - #else // _WIN32 - pWrapperTable->m_Model_GetSliceStacks = (PLib3MFModel_GetSliceStacksPtr) dlsym(hLibrary, "lib3mf_model_getslicestacks"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetSliceStacks == nullptr) + eLookupError = (*pLookup)("lib3mf_selectnode_getinputd", (void**)&(pWrapperTable->m_SelectNode_GetInputD)); + if ( (eLookupError != 0) || (pWrapperTable->m_SelectNode_GetInputD == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_MergeToModel = (PLib3MFModel_MergeToModelPtr) GetProcAddress(hLibrary, "lib3mf_model_mergetomodel"); - #else // _WIN32 - pWrapperTable->m_Model_MergeToModel = (PLib3MFModel_MergeToModelPtr) dlsym(hLibrary, "lib3mf_model_mergetomodel"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_MergeToModel == nullptr) + eLookupError = (*pLookup)("lib3mf_clampnode_getinputmin", (void**)&(pWrapperTable->m_ClampNode_GetInputMin)); + if ( (eLookupError != 0) || (pWrapperTable->m_ClampNode_GetInputMin == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddMeshObject = (PLib3MFModel_AddMeshObjectPtr) GetProcAddress(hLibrary, "lib3mf_model_addmeshobject"); - #else // _WIN32 - pWrapperTable->m_Model_AddMeshObject = (PLib3MFModel_AddMeshObjectPtr) dlsym(hLibrary, "lib3mf_model_addmeshobject"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddMeshObject == nullptr) + eLookupError = (*pLookup)("lib3mf_clampnode_getinputmax", (void**)&(pWrapperTable->m_ClampNode_GetInputMax)); + if ( (eLookupError != 0) || (pWrapperTable->m_ClampNode_GetInputMax == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_composevectornode_getinputx", (void**)&(pWrapperTable->m_ComposeVectorNode_GetInputX)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeVectorNode_GetInputX == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_composevectornode_getinputy", (void**)&(pWrapperTable->m_ComposeVectorNode_GetInputY)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeVectorNode_GetInputY == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddComponentsObject = (PLib3MFModel_AddComponentsObjectPtr) GetProcAddress(hLibrary, "lib3mf_model_addcomponentsobject"); - #else // _WIN32 - pWrapperTable->m_Model_AddComponentsObject = (PLib3MFModel_AddComponentsObjectPtr) dlsym(hLibrary, "lib3mf_model_addcomponentsobject"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddComponentsObject == nullptr) + eLookupError = (*pLookup)("lib3mf_composevectornode_getinputz", (void**)&(pWrapperTable->m_ComposeVectorNode_GetInputZ)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeVectorNode_GetInputZ == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddSliceStack = (PLib3MFModel_AddSliceStackPtr) GetProcAddress(hLibrary, "lib3mf_model_addslicestack"); - #else // _WIN32 - pWrapperTable->m_Model_AddSliceStack = (PLib3MFModel_AddSliceStackPtr) dlsym(hLibrary, "lib3mf_model_addslicestack"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddSliceStack == nullptr) + eLookupError = (*pLookup)("lib3mf_composevectornode_getoutputresult", (void**)&(pWrapperTable->m_ComposeVectorNode_GetOutputResult)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeVectorNode_GetOutputResult == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddTexture2DFromAttachment = (PLib3MFModel_AddTexture2DFromAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_addtexture2dfromattachment"); - #else // _WIN32 - pWrapperTable->m_Model_AddTexture2DFromAttachment = (PLib3MFModel_AddTexture2DFromAttachmentPtr) dlsym(hLibrary, "lib3mf_model_addtexture2dfromattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddTexture2DFromAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_decomposevectornode_getinputa", (void**)&(pWrapperTable->m_DecomposeVectorNode_GetInputA)); + if ( (eLookupError != 0) || (pWrapperTable->m_DecomposeVectorNode_GetInputA == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddBaseMaterialGroup = (PLib3MFModel_AddBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_model_addbasematerialgroup"); - #else // _WIN32 - pWrapperTable->m_Model_AddBaseMaterialGroup = (PLib3MFModel_AddBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_model_addbasematerialgroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddBaseMaterialGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_decomposevectornode_getoutputx", (void**)&(pWrapperTable->m_DecomposeVectorNode_GetOutputX)); + if ( (eLookupError != 0) || (pWrapperTable->m_DecomposeVectorNode_GetOutputX == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddColorGroup = (PLib3MFModel_AddColorGroupPtr) GetProcAddress(hLibrary, "lib3mf_model_addcolorgroup"); - #else // _WIN32 - pWrapperTable->m_Model_AddColorGroup = (PLib3MFModel_AddColorGroupPtr) dlsym(hLibrary, "lib3mf_model_addcolorgroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddColorGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_decomposevectornode_getoutputy", (void**)&(pWrapperTable->m_DecomposeVectorNode_GetOutputY)); + if ( (eLookupError != 0) || (pWrapperTable->m_DecomposeVectorNode_GetOutputY == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddTexture2DGroup = (PLib3MFModel_AddTexture2DGroupPtr) GetProcAddress(hLibrary, "lib3mf_model_addtexture2dgroup"); - #else // _WIN32 - pWrapperTable->m_Model_AddTexture2DGroup = (PLib3MFModel_AddTexture2DGroupPtr) dlsym(hLibrary, "lib3mf_model_addtexture2dgroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddTexture2DGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_decomposevectornode_getoutputz", (void**)&(pWrapperTable->m_DecomposeVectorNode_GetOutputZ)); + if ( (eLookupError != 0) || (pWrapperTable->m_DecomposeVectorNode_GetOutputZ == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddCompositeMaterials = (PLib3MFModel_AddCompositeMaterialsPtr) GetProcAddress(hLibrary, "lib3mf_model_addcompositematerials"); - #else // _WIN32 - pWrapperTable->m_Model_AddCompositeMaterials = (PLib3MFModel_AddCompositeMaterialsPtr) dlsym(hLibrary, "lib3mf_model_addcompositematerials"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddCompositeMaterials == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm00", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM00)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM00 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddMultiPropertyGroup = (PLib3MFModel_AddMultiPropertyGroupPtr) GetProcAddress(hLibrary, "lib3mf_model_addmultipropertygroup"); - #else // _WIN32 - pWrapperTable->m_Model_AddMultiPropertyGroup = (PLib3MFModel_AddMultiPropertyGroupPtr) dlsym(hLibrary, "lib3mf_model_addmultipropertygroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddMultiPropertyGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm01", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM01)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM01 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddBuildItem = (PLib3MFModel_AddBuildItemPtr) GetProcAddress(hLibrary, "lib3mf_model_addbuilditem"); - #else // _WIN32 - pWrapperTable->m_Model_AddBuildItem = (PLib3MFModel_AddBuildItemPtr) dlsym(hLibrary, "lib3mf_model_addbuilditem"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddBuildItem == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm02", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM02)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM02 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_RemoveBuildItem = (PLib3MFModel_RemoveBuildItemPtr) GetProcAddress(hLibrary, "lib3mf_model_removebuilditem"); - #else // _WIN32 - pWrapperTable->m_Model_RemoveBuildItem = (PLib3MFModel_RemoveBuildItemPtr) dlsym(hLibrary, "lib3mf_model_removebuilditem"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_RemoveBuildItem == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm03", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM03)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM03 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetMetaDataGroup = (PLib3MFModel_GetMetaDataGroupPtr) GetProcAddress(hLibrary, "lib3mf_model_getmetadatagroup"); - #else // _WIN32 - pWrapperTable->m_Model_GetMetaDataGroup = (PLib3MFModel_GetMetaDataGroupPtr) dlsym(hLibrary, "lib3mf_model_getmetadatagroup"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetMetaDataGroup == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm10", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM10)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM10 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddAttachment = (PLib3MFModel_AddAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_addattachment"); - #else // _WIN32 - pWrapperTable->m_Model_AddAttachment = (PLib3MFModel_AddAttachmentPtr) dlsym(hLibrary, "lib3mf_model_addattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm11", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM11)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM11 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_RemoveAttachment = (PLib3MFModel_RemoveAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_removeattachment"); - #else // _WIN32 - pWrapperTable->m_Model_RemoveAttachment = (PLib3MFModel_RemoveAttachmentPtr) dlsym(hLibrary, "lib3mf_model_removeattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_RemoveAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm12", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM12)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM12 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetAttachment = (PLib3MFModel_GetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_getattachment"); - #else // _WIN32 - pWrapperTable->m_Model_GetAttachment = (PLib3MFModel_GetAttachmentPtr) dlsym(hLibrary, "lib3mf_model_getattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm13", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM13)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM13 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_FindAttachment = (PLib3MFModel_FindAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_findattachment"); - #else // _WIN32 - pWrapperTable->m_Model_FindAttachment = (PLib3MFModel_FindAttachmentPtr) dlsym(hLibrary, "lib3mf_model_findattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_FindAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm20", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM20)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM20 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetAttachmentCount = (PLib3MFModel_GetAttachmentCountPtr) GetProcAddress(hLibrary, "lib3mf_model_getattachmentcount"); - #else // _WIN32 - pWrapperTable->m_Model_GetAttachmentCount = (PLib3MFModel_GetAttachmentCountPtr) dlsym(hLibrary, "lib3mf_model_getattachmentcount"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetAttachmentCount == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm21", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM21)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM21 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_HasPackageThumbnailAttachment = (PLib3MFModel_HasPackageThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_haspackagethumbnailattachment"); - #else // _WIN32 - pWrapperTable->m_Model_HasPackageThumbnailAttachment = (PLib3MFModel_HasPackageThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_model_haspackagethumbnailattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_HasPackageThumbnailAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm22", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM22)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM22 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_CreatePackageThumbnailAttachment = (PLib3MFModel_CreatePackageThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_createpackagethumbnailattachment"); - #else // _WIN32 - pWrapperTable->m_Model_CreatePackageThumbnailAttachment = (PLib3MFModel_CreatePackageThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_model_createpackagethumbnailattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_CreatePackageThumbnailAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm23", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM23)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM23 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetPackageThumbnailAttachment = (PLib3MFModel_GetPackageThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_getpackagethumbnailattachment"); - #else // _WIN32 - pWrapperTable->m_Model_GetPackageThumbnailAttachment = (PLib3MFModel_GetPackageThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_model_getpackagethumbnailattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetPackageThumbnailAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm30", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM30)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM30 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_RemovePackageThumbnailAttachment = (PLib3MFModel_RemovePackageThumbnailAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_model_removepackagethumbnailattachment"); - #else // _WIN32 - pWrapperTable->m_Model_RemovePackageThumbnailAttachment = (PLib3MFModel_RemovePackageThumbnailAttachmentPtr) dlsym(hLibrary, "lib3mf_model_removepackagethumbnailattachment"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_RemovePackageThumbnailAttachment == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm31", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM31)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM31 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_AddCustomContentType = (PLib3MFModel_AddCustomContentTypePtr) GetProcAddress(hLibrary, "lib3mf_model_addcustomcontenttype"); - #else // _WIN32 - pWrapperTable->m_Model_AddCustomContentType = (PLib3MFModel_AddCustomContentTypePtr) dlsym(hLibrary, "lib3mf_model_addcustomcontenttype"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_AddCustomContentType == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm32", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM32)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM32 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_RemoveCustomContentType = (PLib3MFModel_RemoveCustomContentTypePtr) GetProcAddress(hLibrary, "lib3mf_model_removecustomcontenttype"); - #else // _WIN32 - pWrapperTable->m_Model_RemoveCustomContentType = (PLib3MFModel_RemoveCustomContentTypePtr) dlsym(hLibrary, "lib3mf_model_removecustomcontenttype"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_RemoveCustomContentType == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getinputm33", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetInputM33)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetInputM33 == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_SetRandomNumberCallback = (PLib3MFModel_SetRandomNumberCallbackPtr) GetProcAddress(hLibrary, "lib3mf_model_setrandomnumbercallback"); - #else // _WIN32 - pWrapperTable->m_Model_SetRandomNumberCallback = (PLib3MFModel_SetRandomNumberCallbackPtr) dlsym(hLibrary, "lib3mf_model_setrandomnumbercallback"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_SetRandomNumberCallback == nullptr) + eLookupError = (*pLookup)("lib3mf_composematrixnode_getoutputresult", (void**)&(pWrapperTable->m_ComposeMatrixNode_GetOutputResult)); + if ( (eLookupError != 0) || (pWrapperTable->m_ComposeMatrixNode_GetOutputResult == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Model_GetKeyStore = (PLib3MFModel_GetKeyStorePtr) GetProcAddress(hLibrary, "lib3mf_model_getkeystore"); - #else // _WIN32 - pWrapperTable->m_Model_GetKeyStore = (PLib3MFModel_GetKeyStorePtr) dlsym(hLibrary, "lib3mf_model_getkeystore"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Model_GetKeyStore == nullptr) + eLookupError = (*pLookup)("lib3mf_matrixfromrowsnode_getinputa", (void**)&(pWrapperTable->m_MatrixFromRowsNode_GetInputA)); + if ( (eLookupError != 0) || (pWrapperTable->m_MatrixFromRowsNode_GetInputA == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_GetLibraryVersion = (PLib3MFGetLibraryVersionPtr) GetProcAddress(hLibrary, "lib3mf_getlibraryversion"); - #else // _WIN32 - pWrapperTable->m_GetLibraryVersion = (PLib3MFGetLibraryVersionPtr) dlsym(hLibrary, "lib3mf_getlibraryversion"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_GetLibraryVersion == nullptr) + eLookupError = (*pLookup)("lib3mf_matrixfromrowsnode_getinputb", (void**)&(pWrapperTable->m_MatrixFromRowsNode_GetInputB)); + if ( (eLookupError != 0) || (pWrapperTable->m_MatrixFromRowsNode_GetInputB == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_GetPrereleaseInformation = (PLib3MFGetPrereleaseInformationPtr) GetProcAddress(hLibrary, "lib3mf_getprereleaseinformation"); - #else // _WIN32 - pWrapperTable->m_GetPrereleaseInformation = (PLib3MFGetPrereleaseInformationPtr) dlsym(hLibrary, "lib3mf_getprereleaseinformation"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_GetPrereleaseInformation == nullptr) + eLookupError = (*pLookup)("lib3mf_matrixfromrowsnode_getinputc", (void**)&(pWrapperTable->m_MatrixFromRowsNode_GetInputC)); + if ( (eLookupError != 0) || (pWrapperTable->m_MatrixFromRowsNode_GetInputC == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_GetBuildInformation = (PLib3MFGetBuildInformationPtr) GetProcAddress(hLibrary, "lib3mf_getbuildinformation"); - #else // _WIN32 - pWrapperTable->m_GetBuildInformation = (PLib3MFGetBuildInformationPtr) dlsym(hLibrary, "lib3mf_getbuildinformation"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_GetBuildInformation == nullptr) + eLookupError = (*pLookup)("lib3mf_matrixfromrowsnode_getinputd", (void**)&(pWrapperTable->m_MatrixFromRowsNode_GetInputD)); + if ( (eLookupError != 0) || (pWrapperTable->m_MatrixFromRowsNode_GetInputD == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_GetSpecificationVersion = (PLib3MFGetSpecificationVersionPtr) GetProcAddress(hLibrary, "lib3mf_getspecificationversion"); - #else // _WIN32 - pWrapperTable->m_GetSpecificationVersion = (PLib3MFGetSpecificationVersionPtr) dlsym(hLibrary, "lib3mf_getspecificationversion"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_GetSpecificationVersion == nullptr) + eLookupError = (*pLookup)("lib3mf_matrixfromrowsnode_getoutputresult", (void**)&(pWrapperTable->m_MatrixFromRowsNode_GetOutputResult)); + if ( (eLookupError != 0) || (pWrapperTable->m_MatrixFromRowsNode_GetOutputResult == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_CreateModel = (PLib3MFCreateModelPtr) GetProcAddress(hLibrary, "lib3mf_createmodel"); - #else // _WIN32 - pWrapperTable->m_CreateModel = (PLib3MFCreateModelPtr) dlsym(hLibrary, "lib3mf_createmodel"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_CreateModel == nullptr) + eLookupError = (*pLookup)("lib3mf_matrixfromcolumnsnode_getinputa", (void**)&(pWrapperTable->m_MatrixFromColumnsNode_GetInputA)); + if ( (eLookupError != 0) || (pWrapperTable->m_MatrixFromColumnsNode_GetInputA == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Release = (PLib3MFReleasePtr) GetProcAddress(hLibrary, "lib3mf_release"); - #else // _WIN32 - pWrapperTable->m_Release = (PLib3MFReleasePtr) dlsym(hLibrary, "lib3mf_release"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Release == nullptr) + eLookupError = (*pLookup)("lib3mf_matrixfromcolumnsnode_getinputb", (void**)&(pWrapperTable->m_MatrixFromColumnsNode_GetInputB)); + if ( (eLookupError != 0) || (pWrapperTable->m_MatrixFromColumnsNode_GetInputB == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_Acquire = (PLib3MFAcquirePtr) GetProcAddress(hLibrary, "lib3mf_acquire"); - #else // _WIN32 - pWrapperTable->m_Acquire = (PLib3MFAcquirePtr) dlsym(hLibrary, "lib3mf_acquire"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_Acquire == nullptr) + eLookupError = (*pLookup)("lib3mf_matrixfromcolumnsnode_getinputc", (void**)&(pWrapperTable->m_MatrixFromColumnsNode_GetInputC)); + if ( (eLookupError != 0) || (pWrapperTable->m_MatrixFromColumnsNode_GetInputC == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_SetJournal = (PLib3MFSetJournalPtr) GetProcAddress(hLibrary, "lib3mf_setjournal"); - #else // _WIN32 - pWrapperTable->m_SetJournal = (PLib3MFSetJournalPtr) dlsym(hLibrary, "lib3mf_setjournal"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_SetJournal == nullptr) + eLookupError = (*pLookup)("lib3mf_matrixfromcolumnsnode_getinputd", (void**)&(pWrapperTable->m_MatrixFromColumnsNode_GetInputD)); + if ( (eLookupError != 0) || (pWrapperTable->m_MatrixFromColumnsNode_GetInputD == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_GetLastError = (PLib3MFGetLastErrorPtr) GetProcAddress(hLibrary, "lib3mf_getlasterror"); - #else // _WIN32 - pWrapperTable->m_GetLastError = (PLib3MFGetLastErrorPtr) dlsym(hLibrary, "lib3mf_getlasterror"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_GetLastError == nullptr) + eLookupError = (*pLookup)("lib3mf_matrixfromcolumnsnode_getoutputresult", (void**)&(pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult)); + if ( (eLookupError != 0) || (pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_GetSymbolLookupMethod = (PLib3MFGetSymbolLookupMethodPtr) GetProcAddress(hLibrary, "lib3mf_getsymbollookupmethod"); - #else // _WIN32 - pWrapperTable->m_GetSymbolLookupMethod = (PLib3MFGetSymbolLookupMethodPtr) dlsym(hLibrary, "lib3mf_getsymbollookupmethod"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_GetSymbolLookupMethod == nullptr) + eLookupError = (*pLookup)("lib3mf_constantnode_setconstant", (void**)&(pWrapperTable->m_ConstantNode_SetConstant)); + if ( (eLookupError != 0) || (pWrapperTable->m_ConstantNode_SetConstant == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_RetrieveProgressMessage = (PLib3MFRetrieveProgressMessagePtr) GetProcAddress(hLibrary, "lib3mf_retrieveprogressmessage"); - #else // _WIN32 - pWrapperTable->m_RetrieveProgressMessage = (PLib3MFRetrieveProgressMessagePtr) dlsym(hLibrary, "lib3mf_retrieveprogressmessage"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_RetrieveProgressMessage == nullptr) + eLookupError = (*pLookup)("lib3mf_constantnode_getconstant", (void**)&(pWrapperTable->m_ConstantNode_GetConstant)); + if ( (eLookupError != 0) || (pWrapperTable->m_ConstantNode_GetConstant == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_RGBAToColor = (PLib3MFRGBAToColorPtr) GetProcAddress(hLibrary, "lib3mf_rgbatocolor"); - #else // _WIN32 - pWrapperTable->m_RGBAToColor = (PLib3MFRGBAToColorPtr) dlsym(hLibrary, "lib3mf_rgbatocolor"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_RGBAToColor == nullptr) + eLookupError = (*pLookup)("lib3mf_constantnode_getoutputvalue", (void**)&(pWrapperTable->m_ConstantNode_GetOutputValue)); + if ( (eLookupError != 0) || (pWrapperTable->m_ConstantNode_GetOutputValue == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_constvecnode_setvector", (void**)&(pWrapperTable->m_ConstVecNode_SetVector)); + if ( (eLookupError != 0) || (pWrapperTable->m_ConstVecNode_SetVector == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_constvecnode_getvector", (void**)&(pWrapperTable->m_ConstVecNode_GetVector)); + if ( (eLookupError != 0) || (pWrapperTable->m_ConstVecNode_GetVector == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_FloatRGBAToColor = (PLib3MFFloatRGBAToColorPtr) GetProcAddress(hLibrary, "lib3mf_floatrgbatocolor"); - #else // _WIN32 - pWrapperTable->m_FloatRGBAToColor = (PLib3MFFloatRGBAToColorPtr) dlsym(hLibrary, "lib3mf_floatrgbatocolor"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_FloatRGBAToColor == nullptr) + eLookupError = (*pLookup)("lib3mf_constvecnode_getoutputvector", (void**)&(pWrapperTable->m_ConstVecNode_GetOutputVector)); + if ( (eLookupError != 0) || (pWrapperTable->m_ConstVecNode_GetOutputVector == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ColorToRGBA = (PLib3MFColorToRGBAPtr) GetProcAddress(hLibrary, "lib3mf_colortorgba"); - #else // _WIN32 - pWrapperTable->m_ColorToRGBA = (PLib3MFColorToRGBAPtr) dlsym(hLibrary, "lib3mf_colortorgba"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ColorToRGBA == nullptr) + eLookupError = (*pLookup)("lib3mf_constmatnode_setmatrix", (void**)&(pWrapperTable->m_ConstMatNode_SetMatrix)); + if ( (eLookupError != 0) || (pWrapperTable->m_ConstMatNode_SetMatrix == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_ColorToFloatRGBA = (PLib3MFColorToFloatRGBAPtr) GetProcAddress(hLibrary, "lib3mf_colortofloatrgba"); - #else // _WIN32 - pWrapperTable->m_ColorToFloatRGBA = (PLib3MFColorToFloatRGBAPtr) dlsym(hLibrary, "lib3mf_colortofloatrgba"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_ColorToFloatRGBA == nullptr) + eLookupError = (*pLookup)("lib3mf_constmatnode_getmatrix", (void**)&(pWrapperTable->m_ConstMatNode_GetMatrix)); + if ( (eLookupError != 0) || (pWrapperTable->m_ConstMatNode_GetMatrix == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_GetIdentityTransform = (PLib3MFGetIdentityTransformPtr) GetProcAddress(hLibrary, "lib3mf_getidentitytransform"); - #else // _WIN32 - pWrapperTable->m_GetIdentityTransform = (PLib3MFGetIdentityTransformPtr) dlsym(hLibrary, "lib3mf_getidentitytransform"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_GetIdentityTransform == nullptr) + eLookupError = (*pLookup)("lib3mf_constmatnode_getoutputmatrix", (void**)&(pWrapperTable->m_ConstMatNode_GetOutputMatrix)); + if ( (eLookupError != 0) || (pWrapperTable->m_ConstMatNode_GetOutputMatrix == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_GetUniformScaleTransform = (PLib3MFGetUniformScaleTransformPtr) GetProcAddress(hLibrary, "lib3mf_getuniformscaletransform"); - #else // _WIN32 - pWrapperTable->m_GetUniformScaleTransform = (PLib3MFGetUniformScaleTransformPtr) dlsym(hLibrary, "lib3mf_getuniformscaletransform"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_GetUniformScaleTransform == nullptr) + eLookupError = (*pLookup)("lib3mf_meshnode_getinputmesh", (void**)&(pWrapperTable->m_MeshNode_GetInputMesh)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshNode_GetInputMesh == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_GetScaleTransform = (PLib3MFGetScaleTransformPtr) GetProcAddress(hLibrary, "lib3mf_getscaletransform"); - #else // _WIN32 - pWrapperTable->m_GetScaleTransform = (PLib3MFGetScaleTransformPtr) dlsym(hLibrary, "lib3mf_getscaletransform"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_GetScaleTransform == nullptr) + eLookupError = (*pLookup)("lib3mf_meshnode_getinputpos", (void**)&(pWrapperTable->m_MeshNode_GetInputPos)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshNode_GetInputPos == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - #ifdef _WIN32 - pWrapperTable->m_GetTranslationTransform = (PLib3MFGetTranslationTransformPtr) GetProcAddress(hLibrary, "lib3mf_gettranslationtransform"); - #else // _WIN32 - pWrapperTable->m_GetTranslationTransform = (PLib3MFGetTranslationTransformPtr) dlsym(hLibrary, "lib3mf_gettranslationtransform"); - dlerror(); - #endif // _WIN32 - if (pWrapperTable->m_GetTranslationTransform == nullptr) + eLookupError = (*pLookup)("lib3mf_meshnode_getoutputdistance", (void**)&(pWrapperTable->m_MeshNode_GetOutputDistance)); + if ( (eLookupError != 0) || (pWrapperTable->m_MeshNode_GetOutputDistance == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - pWrapperTable->m_LibraryHandle = hLibrary; - return LIB3MF_SUCCESS; - } - - inline Lib3MFResult CWrapper::loadWrapperTableFromSymbolLookupMethod(sLib3MFDynamicWrapperTable * pWrapperTable, void* pSymbolLookupMethod) -{ - if (pWrapperTable == nullptr) - return LIB3MF_ERROR_INVALIDPARAM; - if (pSymbolLookupMethod == nullptr) - return LIB3MF_ERROR_INVALIDPARAM; + eLookupError = (*pLookup)("lib3mf_unsignedmeshnode_getinputmesh", (void**)&(pWrapperTable->m_UnsignedMeshNode_GetInputMesh)); + if ( (eLookupError != 0) || (pWrapperTable->m_UnsignedMeshNode_GetInputMesh == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - typedef Lib3MFResult(*SymbolLookupType)(const char*, void**); + eLookupError = (*pLookup)("lib3mf_unsignedmeshnode_getinputpos", (void**)&(pWrapperTable->m_UnsignedMeshNode_GetInputPos)); + if ( (eLookupError != 0) || (pWrapperTable->m_UnsignedMeshNode_GetInputPos == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - SymbolLookupType pLookup = (SymbolLookupType)pSymbolLookupMethod; + eLookupError = (*pLookup)("lib3mf_unsignedmeshnode_getoutputdistance", (void**)&(pWrapperTable->m_UnsignedMeshNode_GetOutputDistance)); + if ( (eLookupError != 0) || (pWrapperTable->m_UnsignedMeshNode_GetOutputDistance == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - Lib3MFResult eLookupError = LIB3MF_SUCCESS; - eLookupError = (*pLookup)("lib3mf_base_classtypeid", (void**)&(pWrapperTable->m_Base_ClassTypeId)); - if ( (eLookupError != 0) || (pWrapperTable->m_Base_ClassTypeId == nullptr) ) + eLookupError = (*pLookup)("lib3mf_functioncallnode_getinputfunctionid", (void**)&(pWrapperTable->m_FunctionCallNode_GetInputFunctionID)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionCallNode_GetInputFunctionID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_writetofile", (void**)&(pWrapperTable->m_Writer_WriteToFile)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_WriteToFile == nullptr) ) + eLookupError = (*pLookup)("lib3mf_nodeiterator_getcurrent", (void**)&(pWrapperTable->m_NodeIterator_GetCurrent)); + if ( (eLookupError != 0) || (pWrapperTable->m_NodeIterator_GetCurrent == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_getstreamsize", (void**)&(pWrapperTable->m_Writer_GetStreamSize)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_GetStreamSize == nullptr) ) + eLookupError = (*pLookup)("lib3mf_function_getdisplayname", (void**)&(pWrapperTable->m_Function_GetDisplayName)); + if ( (eLookupError != 0) || (pWrapperTable->m_Function_GetDisplayName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_writetobuffer", (void**)&(pWrapperTable->m_Writer_WriteToBuffer)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_WriteToBuffer == nullptr) ) + eLookupError = (*pLookup)("lib3mf_function_setdisplayname", (void**)&(pWrapperTable->m_Function_SetDisplayName)); + if ( (eLookupError != 0) || (pWrapperTable->m_Function_SetDisplayName == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_writetocallback", (void**)&(pWrapperTable->m_Writer_WriteToCallback)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_WriteToCallback == nullptr) ) + eLookupError = (*pLookup)("lib3mf_function_addinput", (void**)&(pWrapperTable->m_Function_AddInput)); + if ( (eLookupError != 0) || (pWrapperTable->m_Function_AddInput == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_setprogresscallback", (void**)&(pWrapperTable->m_Writer_SetProgressCallback)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_SetProgressCallback == nullptr) ) + eLookupError = (*pLookup)("lib3mf_function_getinputs", (void**)&(pWrapperTable->m_Function_GetInputs)); + if ( (eLookupError != 0) || (pWrapperTable->m_Function_GetInputs == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_getdecimalprecision", (void**)&(pWrapperTable->m_Writer_GetDecimalPrecision)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_GetDecimalPrecision == nullptr) ) + eLookupError = (*pLookup)("lib3mf_function_removeinput", (void**)&(pWrapperTable->m_Function_RemoveInput)); + if ( (eLookupError != 0) || (pWrapperTable->m_Function_RemoveInput == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_setdecimalprecision", (void**)&(pWrapperTable->m_Writer_SetDecimalPrecision)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_SetDecimalPrecision == nullptr) ) + eLookupError = (*pLookup)("lib3mf_function_addoutput", (void**)&(pWrapperTable->m_Function_AddOutput)); + if ( (eLookupError != 0) || (pWrapperTable->m_Function_AddOutput == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_setstrictmodeactive", (void**)&(pWrapperTable->m_Writer_SetStrictModeActive)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_SetStrictModeActive == nullptr) ) + eLookupError = (*pLookup)("lib3mf_function_getoutputs", (void**)&(pWrapperTable->m_Function_GetOutputs)); + if ( (eLookupError != 0) || (pWrapperTable->m_Function_GetOutputs == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_getstrictmodeactive", (void**)&(pWrapperTable->m_Writer_GetStrictModeActive)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_GetStrictModeActive == nullptr) ) + eLookupError = (*pLookup)("lib3mf_function_removeoutput", (void**)&(pWrapperTable->m_Function_RemoveOutput)); + if ( (eLookupError != 0) || (pWrapperTable->m_Function_RemoveOutput == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_getwarning", (void**)&(pWrapperTable->m_Writer_GetWarning)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_GetWarning == nullptr) ) + eLookupError = (*pLookup)("lib3mf_function_findinput", (void**)&(pWrapperTable->m_Function_FindInput)); + if ( (eLookupError != 0) || (pWrapperTable->m_Function_FindInput == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_getwarningcount", (void**)&(pWrapperTable->m_Writer_GetWarningCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_GetWarningCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_function_findoutput", (void**)&(pWrapperTable->m_Function_FindOutput)); + if ( (eLookupError != 0) || (pWrapperTable->m_Function_FindOutput == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_addkeywrappingcallback", (void**)&(pWrapperTable->m_Writer_AddKeyWrappingCallback)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_AddKeyWrappingCallback == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_getidentifier", (void**)&(pWrapperTable->m_ImplicitFunction_GetIdentifier)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_GetIdentifier == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_writer_setcontentencryptioncallback", (void**)&(pWrapperTable->m_Writer_SetContentEncryptionCallback)); - if ( (eLookupError != 0) || (pWrapperTable->m_Writer_SetContentEncryptionCallback == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_setidentifier", (void**)&(pWrapperTable->m_ImplicitFunction_SetIdentifier)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_SetIdentifier == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_readfromfile", (void**)&(pWrapperTable->m_Reader_ReadFromFile)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_ReadFromFile == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_readfrombuffer", (void**)&(pWrapperTable->m_Reader_ReadFromBuffer)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_ReadFromBuffer == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addsinnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddSinNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddSinNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_readfromcallback", (void**)&(pWrapperTable->m_Reader_ReadFromCallback)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_ReadFromCallback == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addcosnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddCosNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddCosNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_setprogresscallback", (void**)&(pWrapperTable->m_Reader_SetProgressCallback)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_SetProgressCallback == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addtannode", (void**)&(pWrapperTable->m_ImplicitFunction_AddTanNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddTanNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_addrelationtoread", (void**)&(pWrapperTable->m_Reader_AddRelationToRead)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_AddRelationToRead == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addarcsinnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddArcSinNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddArcSinNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_removerelationtoread", (void**)&(pWrapperTable->m_Reader_RemoveRelationToRead)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_RemoveRelationToRead == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addarccosnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddArcCosNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddArcCosNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_setstrictmodeactive", (void**)&(pWrapperTable->m_Reader_SetStrictModeActive)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_SetStrictModeActive == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addarctan2node", (void**)&(pWrapperTable->m_ImplicitFunction_AddArcTan2Node)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddArcTan2Node == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_getstrictmodeactive", (void**)&(pWrapperTable->m_Reader_GetStrictModeActive)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_GetStrictModeActive == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addsinhnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddSinhNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddSinhNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_getwarning", (void**)&(pWrapperTable->m_Reader_GetWarning)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_GetWarning == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addcoshnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddCoshNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddCoshNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_getwarningcount", (void**)&(pWrapperTable->m_Reader_GetWarningCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_GetWarningCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addtanhnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddTanhNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddTanhNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_addkeywrappingcallback", (void**)&(pWrapperTable->m_Reader_AddKeyWrappingCallback)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_AddKeyWrappingCallback == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addroundnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddRoundNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddRoundNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_reader_setcontentencryptioncallback", (void**)&(pWrapperTable->m_Reader_SetContentEncryptionCallback)); - if ( (eLookupError != 0) || (pWrapperTable->m_Reader_SetContentEncryptionCallback == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addceilnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddCeilNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddCeilNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_packagepart_getpath", (void**)&(pWrapperTable->m_PackagePart_GetPath)); - if ( (eLookupError != 0) || (pWrapperTable->m_PackagePart_GetPath == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addfloornode", (void**)&(pWrapperTable->m_ImplicitFunction_AddFloorNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddFloorNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_packagepart_setpath", (void**)&(pWrapperTable->m_PackagePart_SetPath)); - if ( (eLookupError != 0) || (pWrapperTable->m_PackagePart_SetPath == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addsignnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddSignNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddSignNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_resource_getresourceid", (void**)&(pWrapperTable->m_Resource_GetResourceID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Resource_GetResourceID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addfractnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddFractNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddFractNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_resource_getuniqueresourceid", (void**)&(pWrapperTable->m_Resource_GetUniqueResourceID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Resource_GetUniqueResourceID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addabsnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddAbsNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddAbsNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_resource_packagepart", (void**)&(pWrapperTable->m_Resource_PackagePart)); - if ( (eLookupError != 0) || (pWrapperTable->m_Resource_PackagePart == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addexpnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddExpNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddExpNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_resource_setpackagepart", (void**)&(pWrapperTable->m_Resource_SetPackagePart)); - if ( (eLookupError != 0) || (pWrapperTable->m_Resource_SetPackagePart == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addlognode", (void**)&(pWrapperTable->m_ImplicitFunction_AddLogNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddLogNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_resource_getmodelresourceid", (void**)&(pWrapperTable->m_Resource_GetModelResourceID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Resource_GetModelResourceID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addlog2node", (void**)&(pWrapperTable->m_ImplicitFunction_AddLog2Node)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddLog2Node == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_resourceiterator_movenext", (void**)&(pWrapperTable->m_ResourceIterator_MoveNext)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIterator_MoveNext == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addlog10node", (void**)&(pWrapperTable->m_ImplicitFunction_AddLog10Node)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddLog10Node == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_resourceiterator_moveprevious", (void**)&(pWrapperTable->m_ResourceIterator_MovePrevious)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIterator_MovePrevious == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addlengthnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddLengthNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddLengthNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_resourceiterator_getcurrent", (void**)&(pWrapperTable->m_ResourceIterator_GetCurrent)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIterator_GetCurrent == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addtransposenode", (void**)&(pWrapperTable->m_ImplicitFunction_AddTransposeNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddTransposeNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_resourceiterator_clone", (void**)&(pWrapperTable->m_ResourceIterator_Clone)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIterator_Clone == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_inversenode", (void**)&(pWrapperTable->m_ImplicitFunction_InverseNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_InverseNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_resourceiterator_count", (void**)&(pWrapperTable->m_ResourceIterator_Count)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceIterator_Count == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addsqrtnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddSqrtNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddSqrtNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slicestackiterator_getcurrentslicestack", (void**)&(pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack)); - if ( (eLookupError != 0) || (pWrapperTable->m_SliceStackIterator_GetCurrentSliceStack == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addresourceidnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddResourceIdNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddResourceIdNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_objectiterator_getcurrentobject", (void**)&(pWrapperTable->m_ObjectIterator_GetCurrentObject)); - if ( (eLookupError != 0) || (pWrapperTable->m_ObjectIterator_GetCurrentObject == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addadditionnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddAdditionNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddAdditionNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobjectiterator_getcurrentmeshobject", (void**)&(pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObjectIterator_GetCurrentMeshObject == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addsubtractionnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddSubtractionNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddSubtractionNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_componentsobjectiterator_getcurrentcomponentsobject", (void**)&(pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject)); - if ( (eLookupError != 0) || (pWrapperTable->m_ComponentsObjectIterator_GetCurrentComponentsObject == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addmultiplicationnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddMultiplicationNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddMultiplicationNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2diterator_getcurrenttexture2d", (void**)&(pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DIterator_GetCurrentTexture2D == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_adddivisionnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddDivisionNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddDivisionNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup", (void**)&(pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_adddotnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddDotNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddDotNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_colorgroupiterator_getcurrentcolorgroup", (void**)&(pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroupIterator_GetCurrentColorGroup == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addcrossnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddCrossNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddCrossNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup", (void**)&(pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addmatvecmultiplicationnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_compositematerialsiterator_getcurrentcompositematerials", (void**)&(pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials)); - if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addminnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddMinNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddMinNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup", (void**)&(pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addmaxnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddMaxNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddMaxNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadata_getnamespace", (void**)&(pWrapperTable->m_MetaData_GetNameSpace)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetNameSpace == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addfmodnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddFmodNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddFmodNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadata_setnamespace", (void**)&(pWrapperTable->m_MetaData_SetNameSpace)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_SetNameSpace == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addpownode", (void**)&(pWrapperTable->m_ImplicitFunction_AddPowNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddPowNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadata_getname", (void**)&(pWrapperTable->m_MetaData_GetName)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetName == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addselectnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddSelectNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddSelectNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadata_setname", (void**)&(pWrapperTable->m_MetaData_SetName)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_SetName == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addclampnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddClampNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddClampNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadata_getkey", (void**)&(pWrapperTable->m_MetaData_GetKey)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetKey == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addcomposevectornode", (void**)&(pWrapperTable->m_ImplicitFunction_AddComposeVectorNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddComposeVectorNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadata_getmustpreserve", (void**)&(pWrapperTable->m_MetaData_GetMustPreserve)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetMustPreserve == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addvectorfromscalarnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadata_setmustpreserve", (void**)&(pWrapperTable->m_MetaData_SetMustPreserve)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_SetMustPreserve == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_adddecomposevectornode", (void**)&(pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadata_gettype", (void**)&(pWrapperTable->m_MetaData_GetType)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetType == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addcomposematrixnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadata_settype", (void**)&(pWrapperTable->m_MetaData_SetType)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_SetType == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addmatrixfromrowsnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadata_getvalue", (void**)&(pWrapperTable->m_MetaData_GetValue)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_GetValue == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addmatrixfromcolumnsnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadata_setvalue", (void**)&(pWrapperTable->m_MetaData_SetValue)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaData_SetValue == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addconstantnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddConstantNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddConstantNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadatagroup_getmetadatacount", (void**)&(pWrapperTable->m_MetaDataGroup_GetMetaDataCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_GetMetaDataCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addconstvecnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddConstVecNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddConstVecNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadatagroup_getmetadata", (void**)&(pWrapperTable->m_MetaDataGroup_GetMetaData)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_GetMetaData == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addconstmatnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddConstMatNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddConstMatNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadatagroup_getmetadatabykey", (void**)&(pWrapperTable->m_MetaDataGroup_GetMetaDataByKey)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_GetMetaDataByKey == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addmeshnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddMeshNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddMeshNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadatagroup_removemetadatabyindex", (void**)&(pWrapperTable->m_MetaDataGroup_RemoveMetaDataByIndex)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_RemoveMetaDataByIndex == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addunsignedmeshnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadatagroup_removemetadata", (void**)&(pWrapperTable->m_MetaDataGroup_RemoveMetaData)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_RemoveMetaData == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addfunctioncallnode", (void**)&(pWrapperTable->m_ImplicitFunction_AddFunctionCallNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddFunctionCallNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_metadatagroup_addmetadata", (void**)&(pWrapperTable->m_MetaDataGroup_AddMetaData)); - if ( (eLookupError != 0) || (pWrapperTable->m_MetaDataGroup_AddMetaData == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_getnodes", (void**)&(pWrapperTable->m_ImplicitFunction_GetNodes)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_GetNodes == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_gettype", (void**)&(pWrapperTable->m_Object_GetType)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetType == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_removenode", (void**)&(pWrapperTable->m_ImplicitFunction_RemoveNode)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_RemoveNode == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_settype", (void**)&(pWrapperTable->m_Object_SetType)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetType == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addlink", (void**)&(pWrapperTable->m_ImplicitFunction_AddLink)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddLink == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_getname", (void**)&(pWrapperTable->m_Object_GetName)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetName == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_addlinkbynames", (void**)&(pWrapperTable->m_ImplicitFunction_AddLinkByNames)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_AddLinkByNames == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_setname", (void**)&(pWrapperTable->m_Object_SetName)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetName == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_clear", (void**)&(pWrapperTable->m_ImplicitFunction_Clear)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_Clear == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_getpartnumber", (void**)&(pWrapperTable->m_Object_GetPartNumber)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetPartNumber == nullptr) ) + eLookupError = (*pLookup)("lib3mf_implicitfunction_sortnodestopologically", (void**)&(pWrapperTable->m_ImplicitFunction_SortNodesTopologically)); + if ( (eLookupError != 0) || (pWrapperTable->m_ImplicitFunction_SortNodesTopologically == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_setpartnumber", (void**)&(pWrapperTable->m_Object_SetPartNumber)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetPartNumber == nullptr) ) + eLookupError = (*pLookup)("lib3mf_functionfromimage3d_getimage3d", (void**)&(pWrapperTable->m_FunctionFromImage3D_GetImage3D)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionFromImage3D_GetImage3D == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_ismeshobject", (void**)&(pWrapperTable->m_Object_IsMeshObject)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_IsMeshObject == nullptr) ) + eLookupError = (*pLookup)("lib3mf_functionfromimage3d_setimage3d", (void**)&(pWrapperTable->m_FunctionFromImage3D_SetImage3D)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionFromImage3D_SetImage3D == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_iscomponentsobject", (void**)&(pWrapperTable->m_Object_IsComponentsObject)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_IsComponentsObject == nullptr) ) + eLookupError = (*pLookup)("lib3mf_functionfromimage3d_setfilter", (void**)&(pWrapperTable->m_FunctionFromImage3D_SetFilter)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionFromImage3D_SetFilter == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_isvalid", (void**)&(pWrapperTable->m_Object_IsValid)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_IsValid == nullptr) ) + eLookupError = (*pLookup)("lib3mf_functionfromimage3d_getfilter", (void**)&(pWrapperTable->m_FunctionFromImage3D_GetFilter)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionFromImage3D_GetFilter == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_setattachmentasthumbnail", (void**)&(pWrapperTable->m_Object_SetAttachmentAsThumbnail)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetAttachmentAsThumbnail == nullptr) ) + eLookupError = (*pLookup)("lib3mf_functionfromimage3d_settilestyles", (void**)&(pWrapperTable->m_FunctionFromImage3D_SetTileStyles)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionFromImage3D_SetTileStyles == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_getthumbnailattachment", (void**)&(pWrapperTable->m_Object_GetThumbnailAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetThumbnailAttachment == nullptr) ) + eLookupError = (*pLookup)("lib3mf_functionfromimage3d_gettilestyles", (void**)&(pWrapperTable->m_FunctionFromImage3D_GetTileStyles)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionFromImage3D_GetTileStyles == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_clearthumbnailattachment", (void**)&(pWrapperTable->m_Object_ClearThumbnailAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_ClearThumbnailAttachment == nullptr) ) + eLookupError = (*pLookup)("lib3mf_functionfromimage3d_getoffset", (void**)&(pWrapperTable->m_FunctionFromImage3D_GetOffset)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionFromImage3D_GetOffset == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_getoutbox", (void**)&(pWrapperTable->m_Object_GetOutbox)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetOutbox == nullptr) ) + eLookupError = (*pLookup)("lib3mf_functionfromimage3d_setoffset", (void**)&(pWrapperTable->m_FunctionFromImage3D_SetOffset)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionFromImage3D_SetOffset == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_getuuid", (void**)&(pWrapperTable->m_Object_GetUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetUUID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_functionfromimage3d_getscale", (void**)&(pWrapperTable->m_FunctionFromImage3D_GetScale)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionFromImage3D_GetScale == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_setuuid", (void**)&(pWrapperTable->m_Object_SetUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetUUID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_functionfromimage3d_setscale", (void**)&(pWrapperTable->m_FunctionFromImage3D_SetScale)); + if ( (eLookupError != 0) || (pWrapperTable->m_FunctionFromImage3D_SetScale == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_getmetadatagroup", (void**)&(pWrapperTable->m_Object_GetMetaDataGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetMetaDataGroup == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditem_getobjectresource", (void**)&(pWrapperTable->m_BuildItem_GetObjectResource)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetObjectResource == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_setslicesmeshresolution", (void**)&(pWrapperTable->m_Object_SetSlicesMeshResolution)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_SetSlicesMeshResolution == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditem_getuuid", (void**)&(pWrapperTable->m_BuildItem_GetUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_getslicesmeshresolution", (void**)&(pWrapperTable->m_Object_GetSlicesMeshResolution)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetSlicesMeshResolution == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditem_setuuid", (void**)&(pWrapperTable->m_BuildItem_SetUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_SetUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_hasslices", (void**)&(pWrapperTable->m_Object_HasSlices)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_HasSlices == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditem_getobjectresourceid", (void**)&(pWrapperTable->m_BuildItem_GetObjectResourceID)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetObjectResourceID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_clearslicestack", (void**)&(pWrapperTable->m_Object_ClearSliceStack)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_ClearSliceStack == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditem_hasobjecttransform", (void**)&(pWrapperTable->m_BuildItem_HasObjectTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_HasObjectTransform == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_builditem_getobjecttransform", (void**)&(pWrapperTable->m_BuildItem_GetObjectTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetObjectTransform == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_builditem_setobjecttransform", (void**)&(pWrapperTable->m_BuildItem_SetObjectTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_SetObjectTransform == nullptr) ) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + eLookupError = (*pLookup)("lib3mf_builditem_getpartnumber", (void**)&(pWrapperTable->m_BuildItem_GetPartNumber)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetPartNumber == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_getslicestack", (void**)&(pWrapperTable->m_Object_GetSliceStack)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_GetSliceStack == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditem_setpartnumber", (void**)&(pWrapperTable->m_BuildItem_SetPartNumber)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_SetPartNumber == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_object_assignslicestack", (void**)&(pWrapperTable->m_Object_AssignSliceStack)); - if ( (eLookupError != 0) || (pWrapperTable->m_Object_AssignSliceStack == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditem_getmetadatagroup", (void**)&(pWrapperTable->m_BuildItem_GetMetaDataGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetMetaDataGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_getvertexcount", (void**)&(pWrapperTable->m_MeshObject_GetVertexCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetVertexCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditem_getoutbox", (void**)&(pWrapperTable->m_BuildItem_GetOutbox)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetOutbox == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_gettrianglecount", (void**)&(pWrapperTable->m_MeshObject_GetTriangleCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetTriangleCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditemiterator_movenext", (void**)&(pWrapperTable->m_BuildItemIterator_MoveNext)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItemIterator_MoveNext == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_getvertex", (void**)&(pWrapperTable->m_MeshObject_GetVertex)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetVertex == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditemiterator_moveprevious", (void**)&(pWrapperTable->m_BuildItemIterator_MovePrevious)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItemIterator_MovePrevious == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_setvertex", (void**)&(pWrapperTable->m_MeshObject_SetVertex)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetVertex == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditemiterator_getcurrent", (void**)&(pWrapperTable->m_BuildItemIterator_GetCurrent)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItemIterator_GetCurrent == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_addvertex", (void**)&(pWrapperTable->m_MeshObject_AddVertex)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_AddVertex == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditemiterator_clone", (void**)&(pWrapperTable->m_BuildItemIterator_Clone)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItemIterator_Clone == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_getvertices", (void**)&(pWrapperTable->m_MeshObject_GetVertices)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetVertices == nullptr) ) + eLookupError = (*pLookup)("lib3mf_builditemiterator_count", (void**)&(pWrapperTable->m_BuildItemIterator_Count)); + if ( (eLookupError != 0) || (pWrapperTable->m_BuildItemIterator_Count == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_gettriangle", (void**)&(pWrapperTable->m_MeshObject_GetTriangle)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetTriangle == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slice_setvertices", (void**)&(pWrapperTable->m_Slice_SetVertices)); + if ( (eLookupError != 0) || (pWrapperTable->m_Slice_SetVertices == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_settriangle", (void**)&(pWrapperTable->m_MeshObject_SetTriangle)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetTriangle == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slice_getvertices", (void**)&(pWrapperTable->m_Slice_GetVertices)); + if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetVertices == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_addtriangle", (void**)&(pWrapperTable->m_MeshObject_AddTriangle)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_AddTriangle == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slice_getvertexcount", (void**)&(pWrapperTable->m_Slice_GetVertexCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetVertexCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_gettriangleindices", (void**)&(pWrapperTable->m_MeshObject_GetTriangleIndices)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetTriangleIndices == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slice_addpolygon", (void**)&(pWrapperTable->m_Slice_AddPolygon)); + if ( (eLookupError != 0) || (pWrapperTable->m_Slice_AddPolygon == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_setobjectlevelproperty", (void**)&(pWrapperTable->m_MeshObject_SetObjectLevelProperty)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetObjectLevelProperty == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slice_getpolygoncount", (void**)&(pWrapperTable->m_Slice_GetPolygonCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetPolygonCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_getobjectlevelproperty", (void**)&(pWrapperTable->m_MeshObject_GetObjectLevelProperty)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetObjectLevelProperty == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slice_setpolygonindices", (void**)&(pWrapperTable->m_Slice_SetPolygonIndices)); + if ( (eLookupError != 0) || (pWrapperTable->m_Slice_SetPolygonIndices == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_settriangleproperties", (void**)&(pWrapperTable->m_MeshObject_SetTriangleProperties)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetTriangleProperties == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slice_getpolygonindices", (void**)&(pWrapperTable->m_Slice_GetPolygonIndices)); + if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetPolygonIndices == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_gettriangleproperties", (void**)&(pWrapperTable->m_MeshObject_GetTriangleProperties)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetTriangleProperties == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slice_getpolygonindexcount", (void**)&(pWrapperTable->m_Slice_GetPolygonIndexCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetPolygonIndexCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_setalltriangleproperties", (void**)&(pWrapperTable->m_MeshObject_SetAllTriangleProperties)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetAllTriangleProperties == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slice_getztop", (void**)&(pWrapperTable->m_Slice_GetZTop)); + if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetZTop == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_getalltriangleproperties", (void**)&(pWrapperTable->m_MeshObject_GetAllTriangleProperties)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_GetAllTriangleProperties == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slicestack_getbottomz", (void**)&(pWrapperTable->m_SliceStack_GetBottomZ)); + if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetBottomZ == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_clearallproperties", (void**)&(pWrapperTable->m_MeshObject_ClearAllProperties)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_ClearAllProperties == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slicestack_getslicecount", (void**)&(pWrapperTable->m_SliceStack_GetSliceCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetSliceCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_setgeometry", (void**)&(pWrapperTable->m_MeshObject_SetGeometry)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_SetGeometry == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slicestack_getslice", (void**)&(pWrapperTable->m_SliceStack_GetSlice)); + if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetSlice == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_ismanifoldandoriented", (void**)&(pWrapperTable->m_MeshObject_IsManifoldAndOriented)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_IsManifoldAndOriented == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slicestack_addslice", (void**)&(pWrapperTable->m_SliceStack_AddSlice)); + if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_AddSlice == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_meshobject_beamlattice", (void**)&(pWrapperTable->m_MeshObject_BeamLattice)); - if ( (eLookupError != 0) || (pWrapperTable->m_MeshObject_BeamLattice == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slicestack_getslicerefcount", (void**)&(pWrapperTable->m_SliceStack_GetSliceRefCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetSliceRefCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getminlength", (void**)&(pWrapperTable->m_BeamLattice_GetMinLength)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetMinLength == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slicestack_addslicestackreference", (void**)&(pWrapperTable->m_SliceStack_AddSliceStackReference)); + if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_AddSliceStackReference == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_setminlength", (void**)&(pWrapperTable->m_BeamLattice_SetMinLength)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetMinLength == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slicestack_getslicestackreference", (void**)&(pWrapperTable->m_SliceStack_GetSliceStackReference)); + if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetSliceStackReference == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getclipping", (void**)&(pWrapperTable->m_BeamLattice_GetClipping)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetClipping == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slicestack_collapseslicereferences", (void**)&(pWrapperTable->m_SliceStack_CollapseSliceReferences)); + if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_CollapseSliceReferences == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_setclipping", (void**)&(pWrapperTable->m_BeamLattice_SetClipping)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetClipping == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slicestack_setownpath", (void**)&(pWrapperTable->m_SliceStack_SetOwnPath)); + if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_SetOwnPath == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getrepresentation", (void**)&(pWrapperTable->m_BeamLattice_GetRepresentation)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetRepresentation == nullptr) ) + eLookupError = (*pLookup)("lib3mf_slicestack_getownpath", (void**)&(pWrapperTable->m_SliceStack_GetOwnPath)); + if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetOwnPath == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_setrepresentation", (void**)&(pWrapperTable->m_BeamLattice_SetRepresentation)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetRepresentation == nullptr) ) + eLookupError = (*pLookup)("lib3mf_consumer_getconsumerid", (void**)&(pWrapperTable->m_Consumer_GetConsumerID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Consumer_GetConsumerID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getballoptions", (void**)&(pWrapperTable->m_BeamLattice_GetBallOptions)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBallOptions == nullptr) ) + eLookupError = (*pLookup)("lib3mf_consumer_getkeyid", (void**)&(pWrapperTable->m_Consumer_GetKeyID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Consumer_GetKeyID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_setballoptions", (void**)&(pWrapperTable->m_BeamLattice_SetBallOptions)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetBallOptions == nullptr) ) + eLookupError = (*pLookup)("lib3mf_consumer_getkeyvalue", (void**)&(pWrapperTable->m_Consumer_GetKeyValue)); + if ( (eLookupError != 0) || (pWrapperTable->m_Consumer_GetKeyValue == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getbeamcount", (void**)&(pWrapperTable->m_BeamLattice_GetBeamCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBeamCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_accessright_getconsumer", (void**)&(pWrapperTable->m_AccessRight_GetConsumer)); + if ( (eLookupError != 0) || (pWrapperTable->m_AccessRight_GetConsumer == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getbeam", (void**)&(pWrapperTable->m_BeamLattice_GetBeam)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBeam == nullptr) ) + eLookupError = (*pLookup)("lib3mf_accessright_getwrappingalgorithm", (void**)&(pWrapperTable->m_AccessRight_GetWrappingAlgorithm)); + if ( (eLookupError != 0) || (pWrapperTable->m_AccessRight_GetWrappingAlgorithm == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_addbeam", (void**)&(pWrapperTable->m_BeamLattice_AddBeam)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_AddBeam == nullptr) ) + eLookupError = (*pLookup)("lib3mf_accessright_getmgfalgorithm", (void**)&(pWrapperTable->m_AccessRight_GetMgfAlgorithm)); + if ( (eLookupError != 0) || (pWrapperTable->m_AccessRight_GetMgfAlgorithm == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_setbeam", (void**)&(pWrapperTable->m_BeamLattice_SetBeam)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetBeam == nullptr) ) + eLookupError = (*pLookup)("lib3mf_accessright_getdigestmethod", (void**)&(pWrapperTable->m_AccessRight_GetDigestMethod)); + if ( (eLookupError != 0) || (pWrapperTable->m_AccessRight_GetDigestMethod == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_setbeams", (void**)&(pWrapperTable->m_BeamLattice_SetBeams)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetBeams == nullptr) ) + eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getencryptionalgorithm", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm)); + if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getbeams", (void**)&(pWrapperTable->m_BeamLattice_GetBeams)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBeams == nullptr) ) + eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getkey", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetKey)); + if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetKey == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getballcount", (void**)&(pWrapperTable->m_BeamLattice_GetBallCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBallCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getinitializationvector", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetInitializationVector)); + if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetInitializationVector == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getball", (void**)&(pWrapperTable->m_BeamLattice_GetBall)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBall == nullptr) ) + eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getauthenticationtag", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetAuthenticationTag)); + if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetAuthenticationTag == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_addball", (void**)&(pWrapperTable->m_BeamLattice_AddBall)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_AddBall == nullptr) ) + eLookupError = (*pLookup)("lib3mf_contentencryptionparams_setauthenticationtag", (void**)&(pWrapperTable->m_ContentEncryptionParams_SetAuthenticationTag)); + if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_SetAuthenticationTag == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_setball", (void**)&(pWrapperTable->m_BeamLattice_SetBall)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetBall == nullptr) ) + eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getadditionalauthenticationdata", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData)); + if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_setballs", (void**)&(pWrapperTable->m_BeamLattice_SetBalls)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_SetBalls == nullptr) ) + eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getdescriptor", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetDescriptor)); + if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetDescriptor == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getballs", (void**)&(pWrapperTable->m_BeamLattice_GetBalls)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBalls == nullptr) ) + eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getkeyuuid", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetKeyUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetKeyUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getbeamsetcount", (void**)&(pWrapperTable->m_BeamLattice_GetBeamSetCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBeamSetCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_resourcedata_getpath", (void**)&(pWrapperTable->m_ResourceData_GetPath)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceData_GetPath == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_addbeamset", (void**)&(pWrapperTable->m_BeamLattice_AddBeamSet)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_AddBeamSet == nullptr) ) + eLookupError = (*pLookup)("lib3mf_resourcedata_getencryptionalgorithm", (void**)&(pWrapperTable->m_ResourceData_GetEncryptionAlgorithm)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceData_GetEncryptionAlgorithm == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamlattice_getbeamset", (void**)&(pWrapperTable->m_BeamLattice_GetBeamSet)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamLattice_GetBeamSet == nullptr) ) + eLookupError = (*pLookup)("lib3mf_resourcedata_getcompression", (void**)&(pWrapperTable->m_ResourceData_GetCompression)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceData_GetCompression == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_component_getobjectresource", (void**)&(pWrapperTable->m_Component_GetObjectResource)); - if ( (eLookupError != 0) || (pWrapperTable->m_Component_GetObjectResource == nullptr) ) + eLookupError = (*pLookup)("lib3mf_resourcedata_getadditionalauthenticationdata", (void**)&(pWrapperTable->m_ResourceData_GetAdditionalAuthenticationData)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceData_GetAdditionalAuthenticationData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_component_getobjectresourceid", (void**)&(pWrapperTable->m_Component_GetObjectResourceID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Component_GetObjectResourceID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_resourcedatagroup_getkeyuuid", (void**)&(pWrapperTable->m_ResourceDataGroup_GetKeyUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceDataGroup_GetKeyUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_component_getuuid", (void**)&(pWrapperTable->m_Component_GetUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Component_GetUUID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_resourcedatagroup_addaccessright", (void**)&(pWrapperTable->m_ResourceDataGroup_AddAccessRight)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceDataGroup_AddAccessRight == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_component_setuuid", (void**)&(pWrapperTable->m_Component_SetUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Component_SetUUID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_resourcedatagroup_findaccessrightbyconsumer", (void**)&(pWrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_component_hastransform", (void**)&(pWrapperTable->m_Component_HasTransform)); - if ( (eLookupError != 0) || (pWrapperTable->m_Component_HasTransform == nullptr) ) + eLookupError = (*pLookup)("lib3mf_resourcedatagroup_removeaccessright", (void**)&(pWrapperTable->m_ResourceDataGroup_RemoveAccessRight)); + if ( (eLookupError != 0) || (pWrapperTable->m_ResourceDataGroup_RemoveAccessRight == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_component_gettransform", (void**)&(pWrapperTable->m_Component_GetTransform)); - if ( (eLookupError != 0) || (pWrapperTable->m_Component_GetTransform == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_addconsumer", (void**)&(pWrapperTable->m_KeyStore_AddConsumer)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_AddConsumer == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_component_settransform", (void**)&(pWrapperTable->m_Component_SetTransform)); - if ( (eLookupError != 0) || (pWrapperTable->m_Component_SetTransform == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_getconsumercount", (void**)&(pWrapperTable->m_KeyStore_GetConsumerCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetConsumerCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_componentsobject_addcomponent", (void**)&(pWrapperTable->m_ComponentsObject_AddComponent)); - if ( (eLookupError != 0) || (pWrapperTable->m_ComponentsObject_AddComponent == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_getconsumer", (void**)&(pWrapperTable->m_KeyStore_GetConsumer)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetConsumer == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_componentsobject_getcomponent", (void**)&(pWrapperTable->m_ComponentsObject_GetComponent)); - if ( (eLookupError != 0) || (pWrapperTable->m_ComponentsObject_GetComponent == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_removeconsumer", (void**)&(pWrapperTable->m_KeyStore_RemoveConsumer)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_RemoveConsumer == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_componentsobject_getcomponentcount", (void**)&(pWrapperTable->m_ComponentsObject_GetComponentCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_ComponentsObject_GetComponentCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_findconsumer", (void**)&(pWrapperTable->m_KeyStore_FindConsumer)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_FindConsumer == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamset_setname", (void**)&(pWrapperTable->m_BeamSet_SetName)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_SetName == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_getresourcedatagroupcount", (void**)&(pWrapperTable->m_KeyStore_GetResourceDataGroupCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetResourceDataGroupCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamset_getname", (void**)&(pWrapperTable->m_BeamSet_GetName)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetName == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_addresourcedatagroup", (void**)&(pWrapperTable->m_KeyStore_AddResourceDataGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_AddResourceDataGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamset_setidentifier", (void**)&(pWrapperTable->m_BeamSet_SetIdentifier)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_SetIdentifier == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_getresourcedatagroup", (void**)&(pWrapperTable->m_KeyStore_GetResourceDataGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetResourceDataGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamset_getidentifier", (void**)&(pWrapperTable->m_BeamSet_GetIdentifier)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetIdentifier == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_removeresourcedatagroup", (void**)&(pWrapperTable->m_KeyStore_RemoveResourceDataGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_RemoveResourceDataGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamset_getreferencecount", (void**)&(pWrapperTable->m_BeamSet_GetReferenceCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetReferenceCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_findresourcedatagroup", (void**)&(pWrapperTable->m_KeyStore_FindResourceDataGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_FindResourceDataGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamset_setreferences", (void**)&(pWrapperTable->m_BeamSet_SetReferences)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_SetReferences == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_addresourcedata", (void**)&(pWrapperTable->m_KeyStore_AddResourceData)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_AddResourceData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamset_getreferences", (void**)&(pWrapperTable->m_BeamSet_GetReferences)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetReferences == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_removeresourcedata", (void**)&(pWrapperTable->m_KeyStore_RemoveResourceData)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_RemoveResourceData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamset_getballreferencecount", (void**)&(pWrapperTable->m_BeamSet_GetBallReferenceCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetBallReferenceCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_findresourcedata", (void**)&(pWrapperTable->m_KeyStore_FindResourceData)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_FindResourceData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - - eLookupError = (*pLookup)("lib3mf_beamset_setballreferences", (void**)&(pWrapperTable->m_BeamSet_SetBallReferences)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_SetBallReferences == nullptr) ) + + eLookupError = (*pLookup)("lib3mf_keystore_getresourcedatacount", (void**)&(pWrapperTable->m_KeyStore_GetResourceDataCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetResourceDataCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_beamset_getballreferences", (void**)&(pWrapperTable->m_BeamSet_GetBallReferences)); - if ( (eLookupError != 0) || (pWrapperTable->m_BeamSet_GetBallReferences == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_getresourcedata", (void**)&(pWrapperTable->m_KeyStore_GetResourceData)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetResourceData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_basematerialgroup_getcount", (void**)&(pWrapperTable->m_BaseMaterialGroup_GetCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_GetCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_getuuid", (void**)&(pWrapperTable->m_KeyStore_GetUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_basematerialgroup_getallpropertyids", (void**)&(pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs)); - if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == nullptr) ) + eLookupError = (*pLookup)("lib3mf_keystore_setuuid", (void**)&(pWrapperTable->m_KeyStore_SetUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_SetUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_basematerialgroup_addmaterial", (void**)&(pWrapperTable->m_BaseMaterialGroup_AddMaterial)); - if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_AddMaterial == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_rootmodelpart", (void**)&(pWrapperTable->m_Model_RootModelPart)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_RootModelPart == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_basematerialgroup_removematerial", (void**)&(pWrapperTable->m_BaseMaterialGroup_RemoveMaterial)); - if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_RemoveMaterial == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_findorcreatepackagepart", (void**)&(pWrapperTable->m_Model_FindOrCreatePackagePart)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_FindOrCreatePackagePart == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_basematerialgroup_getname", (void**)&(pWrapperTable->m_BaseMaterialGroup_GetName)); - if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_GetName == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_setunit", (void**)&(pWrapperTable->m_Model_SetUnit)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_SetUnit == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_basematerialgroup_setname", (void**)&(pWrapperTable->m_BaseMaterialGroup_SetName)); - if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_SetName == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getunit", (void**)&(pWrapperTable->m_Model_GetUnit)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetUnit == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_basematerialgroup_setdisplaycolor", (void**)&(pWrapperTable->m_BaseMaterialGroup_SetDisplayColor)); - if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_SetDisplayColor == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getlanguage", (void**)&(pWrapperTable->m_Model_GetLanguage)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetLanguage == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_basematerialgroup_getdisplaycolor", (void**)&(pWrapperTable->m_BaseMaterialGroup_GetDisplayColor)); - if ( (eLookupError != 0) || (pWrapperTable->m_BaseMaterialGroup_GetDisplayColor == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_setlanguage", (void**)&(pWrapperTable->m_Model_SetLanguage)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_SetLanguage == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_colorgroup_getcount", (void**)&(pWrapperTable->m_ColorGroup_GetCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_GetCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_querywriter", (void**)&(pWrapperTable->m_Model_QueryWriter)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_QueryWriter == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_colorgroup_getallpropertyids", (void**)&(pWrapperTable->m_ColorGroup_GetAllPropertyIDs)); - if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_GetAllPropertyIDs == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_queryreader", (void**)&(pWrapperTable->m_Model_QueryReader)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_QueryReader == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_colorgroup_addcolor", (void**)&(pWrapperTable->m_ColorGroup_AddColor)); - if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_AddColor == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getresourcebyid", (void**)&(pWrapperTable->m_Model_GetResourceByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetResourceByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_colorgroup_removecolor", (void**)&(pWrapperTable->m_ColorGroup_RemoveColor)); - if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_RemoveColor == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_gettexture2dbyid", (void**)&(pWrapperTable->m_Model_GetTexture2DByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetTexture2DByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_colorgroup_setcolor", (void**)&(pWrapperTable->m_ColorGroup_SetColor)); - if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_SetColor == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getpropertytypebyid", (void**)&(pWrapperTable->m_Model_GetPropertyTypeByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetPropertyTypeByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_colorgroup_getcolor", (void**)&(pWrapperTable->m_ColorGroup_GetColor)); - if ( (eLookupError != 0) || (pWrapperTable->m_ColorGroup_GetColor == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getbasematerialgroupbyid", (void**)&(pWrapperTable->m_Model_GetBaseMaterialGroupByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetBaseMaterialGroupByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2dgroup_getcount", (void**)&(pWrapperTable->m_Texture2DGroup_GetCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_GetCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_gettexture2dgroupbyid", (void**)&(pWrapperTable->m_Model_GetTexture2DGroupByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetTexture2DGroupByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2dgroup_getallpropertyids", (void**)&(pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getcompositematerialsbyid", (void**)&(pWrapperTable->m_Model_GetCompositeMaterialsByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetCompositeMaterialsByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2dgroup_addtex2coord", (void**)&(pWrapperTable->m_Texture2DGroup_AddTex2Coord)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_AddTex2Coord == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getmultipropertygroupbyid", (void**)&(pWrapperTable->m_Model_GetMultiPropertyGroupByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetMultiPropertyGroupByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2dgroup_gettex2coord", (void**)&(pWrapperTable->m_Texture2DGroup_GetTex2Coord)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_GetTex2Coord == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getmeshobjectbyid", (void**)&(pWrapperTable->m_Model_GetMeshObjectByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetMeshObjectByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2dgroup_removetex2coord", (void**)&(pWrapperTable->m_Texture2DGroup_RemoveTex2Coord)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_RemoveTex2Coord == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getcomponentsobjectbyid", (void**)&(pWrapperTable->m_Model_GetComponentsObjectByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetComponentsObjectByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2dgroup_gettexture2d", (void**)&(pWrapperTable->m_Texture2DGroup_GetTexture2D)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2DGroup_GetTexture2D == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getcolorgroupbyid", (void**)&(pWrapperTable->m_Model_GetColorGroupByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetColorGroupByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_compositematerials_getcount", (void**)&(pWrapperTable->m_CompositeMaterials_GetCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_GetCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getslicestackbyid", (void**)&(pWrapperTable->m_Model_GetSliceStackByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetSliceStackByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_compositematerials_getallpropertyids", (void**)&(pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs)); - if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getlevelsetbyid", (void**)&(pWrapperTable->m_Model_GetLevelSetByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetLevelSetByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_compositematerials_getbasematerialgroup", (void**)&(pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getbuilduuid", (void**)&(pWrapperTable->m_Model_GetBuildUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetBuildUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_compositematerials_addcomposite", (void**)&(pWrapperTable->m_CompositeMaterials_AddComposite)); - if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_AddComposite == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_setbuilduuid", (void**)&(pWrapperTable->m_Model_SetBuildUUID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_SetBuildUUID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_compositematerials_removecomposite", (void**)&(pWrapperTable->m_CompositeMaterials_RemoveComposite)); - if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_RemoveComposite == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getbuilditems", (void**)&(pWrapperTable->m_Model_GetBuildItems)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetBuildItems == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_compositematerials_getcomposite", (void**)&(pWrapperTable->m_CompositeMaterials_GetComposite)); - if ( (eLookupError != 0) || (pWrapperTable->m_CompositeMaterials_GetComposite == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getoutbox", (void**)&(pWrapperTable->m_Model_GetOutbox)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetOutbox == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_multipropertygroup_getcount", (void**)&(pWrapperTable->m_MultiPropertyGroup_GetCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_GetCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getresources", (void**)&(pWrapperTable->m_Model_GetResources)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetResources == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_multipropertygroup_getallpropertyids", (void**)&(pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs)); - if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getobjects", (void**)&(pWrapperTable->m_Model_GetObjects)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetObjects == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_multipropertygroup_addmultiproperty", (void**)&(pWrapperTable->m_MultiPropertyGroup_AddMultiProperty)); - if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_AddMultiProperty == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getmeshobjects", (void**)&(pWrapperTable->m_Model_GetMeshObjects)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetMeshObjects == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_multipropertygroup_setmultiproperty", (void**)&(pWrapperTable->m_MultiPropertyGroup_SetMultiProperty)); - if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_SetMultiProperty == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getcomponentsobjects", (void**)&(pWrapperTable->m_Model_GetComponentsObjects)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetComponentsObjects == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_multipropertygroup_getmultiproperty", (void**)&(pWrapperTable->m_MultiPropertyGroup_GetMultiProperty)); - if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_GetMultiProperty == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_gettexture2ds", (void**)&(pWrapperTable->m_Model_GetTexture2Ds)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetTexture2Ds == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_multipropertygroup_removemultiproperty", (void**)&(pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty)); - if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getbasematerialgroups", (void**)&(pWrapperTable->m_Model_GetBaseMaterialGroups)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetBaseMaterialGroups == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_multipropertygroup_getlayercount", (void**)&(pWrapperTable->m_MultiPropertyGroup_GetLayerCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_GetLayerCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getcolorgroups", (void**)&(pWrapperTable->m_Model_GetColorGroups)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetColorGroups == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_multipropertygroup_addlayer", (void**)&(pWrapperTable->m_MultiPropertyGroup_AddLayer)); - if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_AddLayer == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_gettexture2dgroups", (void**)&(pWrapperTable->m_Model_GetTexture2DGroups)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetTexture2DGroups == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_multipropertygroup_getlayer", (void**)&(pWrapperTable->m_MultiPropertyGroup_GetLayer)); - if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_GetLayer == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getcompositematerials", (void**)&(pWrapperTable->m_Model_GetCompositeMaterials)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetCompositeMaterials == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_multipropertygroup_removelayer", (void**)&(pWrapperTable->m_MultiPropertyGroup_RemoveLayer)); - if ( (eLookupError != 0) || (pWrapperTable->m_MultiPropertyGroup_RemoveLayer == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getmultipropertygroups", (void**)&(pWrapperTable->m_Model_GetMultiPropertyGroups)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetMultiPropertyGroups == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_attachment_getpath", (void**)&(pWrapperTable->m_Attachment_GetPath)); - if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_GetPath == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getslicestacks", (void**)&(pWrapperTable->m_Model_GetSliceStacks)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetSliceStacks == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_attachment_setpath", (void**)&(pWrapperTable->m_Attachment_SetPath)); - if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_SetPath == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getimage3ds", (void**)&(pWrapperTable->m_Model_GetImage3Ds)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetImage3Ds == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_attachment_packagepart", (void**)&(pWrapperTable->m_Attachment_PackagePart)); - if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_PackagePart == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_mergetomodel", (void**)&(pWrapperTable->m_Model_MergeToModel)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_MergeToModel == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_attachment_getrelationshiptype", (void**)&(pWrapperTable->m_Attachment_GetRelationShipType)); - if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_GetRelationShipType == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_mergefrommodel", (void**)&(pWrapperTable->m_Model_MergeFromModel)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_MergeFromModel == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_attachment_setrelationshiptype", (void**)&(pWrapperTable->m_Attachment_SetRelationShipType)); - if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_SetRelationShipType == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addmeshobject", (void**)&(pWrapperTable->m_Model_AddMeshObject)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddMeshObject == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_attachment_writetofile", (void**)&(pWrapperTable->m_Attachment_WriteToFile)); - if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_WriteToFile == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addcomponentsobject", (void**)&(pWrapperTable->m_Model_AddComponentsObject)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddComponentsObject == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_attachment_readfromfile", (void**)&(pWrapperTable->m_Attachment_ReadFromFile)); - if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_ReadFromFile == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addslicestack", (void**)&(pWrapperTable->m_Model_AddSliceStack)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddSliceStack == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_attachment_readfromcallback", (void**)&(pWrapperTable->m_Attachment_ReadFromCallback)); - if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_ReadFromCallback == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addtexture2dfromattachment", (void**)&(pWrapperTable->m_Model_AddTexture2DFromAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddTexture2DFromAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_attachment_getstreamsize", (void**)&(pWrapperTable->m_Attachment_GetStreamSize)); - if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_GetStreamSize == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addbasematerialgroup", (void**)&(pWrapperTable->m_Model_AddBaseMaterialGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddBaseMaterialGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_attachment_writetobuffer", (void**)&(pWrapperTable->m_Attachment_WriteToBuffer)); - if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_WriteToBuffer == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addcolorgroup", (void**)&(pWrapperTable->m_Model_AddColorGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddColorGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_attachment_readfrombuffer", (void**)&(pWrapperTable->m_Attachment_ReadFromBuffer)); - if ( (eLookupError != 0) || (pWrapperTable->m_Attachment_ReadFromBuffer == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addtexture2dgroup", (void**)&(pWrapperTable->m_Model_AddTexture2DGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddTexture2DGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2d_getattachment", (void**)&(pWrapperTable->m_Texture2D_GetAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_GetAttachment == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addcompositematerials", (void**)&(pWrapperTable->m_Model_AddCompositeMaterials)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddCompositeMaterials == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2d_setattachment", (void**)&(pWrapperTable->m_Texture2D_SetAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_SetAttachment == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addmultipropertygroup", (void**)&(pWrapperTable->m_Model_AddMultiPropertyGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddMultiPropertyGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2d_getcontenttype", (void**)&(pWrapperTable->m_Texture2D_GetContentType)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_GetContentType == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addimagestack", (void**)&(pWrapperTable->m_Model_AddImageStack)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddImageStack == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2d_setcontenttype", (void**)&(pWrapperTable->m_Texture2D_SetContentType)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_SetContentType == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getimagestackbyid", (void**)&(pWrapperTable->m_Model_GetImageStackByID)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetImageStackByID == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2d_gettilestyleuv", (void**)&(pWrapperTable->m_Texture2D_GetTileStyleUV)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_GetTileStyleUV == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addbuilditem", (void**)&(pWrapperTable->m_Model_AddBuildItem)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddBuildItem == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2d_settilestyleuv", (void**)&(pWrapperTable->m_Texture2D_SetTileStyleUV)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_SetTileStyleUV == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_removebuilditem", (void**)&(pWrapperTable->m_Model_RemoveBuildItem)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_RemoveBuildItem == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2d_getfilter", (void**)&(pWrapperTable->m_Texture2D_GetFilter)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_GetFilter == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getmetadatagroup", (void**)&(pWrapperTable->m_Model_GetMetaDataGroup)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetMetaDataGroup == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_texture2d_setfilter", (void**)&(pWrapperTable->m_Texture2D_SetFilter)); - if ( (eLookupError != 0) || (pWrapperTable->m_Texture2D_SetFilter == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addattachment", (void**)&(pWrapperTable->m_Model_AddAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditem_getobjectresource", (void**)&(pWrapperTable->m_BuildItem_GetObjectResource)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetObjectResource == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_removeattachment", (void**)&(pWrapperTable->m_Model_RemoveAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_RemoveAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditem_getuuid", (void**)&(pWrapperTable->m_BuildItem_GetUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetUUID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getattachment", (void**)&(pWrapperTable->m_Model_GetAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditem_setuuid", (void**)&(pWrapperTable->m_BuildItem_SetUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_SetUUID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_findattachment", (void**)&(pWrapperTable->m_Model_FindAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_FindAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditem_getobjectresourceid", (void**)&(pWrapperTable->m_BuildItem_GetObjectResourceID)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetObjectResourceID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getattachmentcount", (void**)&(pWrapperTable->m_Model_GetAttachmentCount)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetAttachmentCount == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditem_hasobjecttransform", (void**)&(pWrapperTable->m_BuildItem_HasObjectTransform)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_HasObjectTransform == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_haspackagethumbnailattachment", (void**)&(pWrapperTable->m_Model_HasPackageThumbnailAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_HasPackageThumbnailAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditem_getobjecttransform", (void**)&(pWrapperTable->m_BuildItem_GetObjectTransform)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetObjectTransform == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_createpackagethumbnailattachment", (void**)&(pWrapperTable->m_Model_CreatePackageThumbnailAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_CreatePackageThumbnailAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditem_setobjecttransform", (void**)&(pWrapperTable->m_BuildItem_SetObjectTransform)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_SetObjectTransform == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getpackagethumbnailattachment", (void**)&(pWrapperTable->m_Model_GetPackageThumbnailAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetPackageThumbnailAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditem_getpartnumber", (void**)&(pWrapperTable->m_BuildItem_GetPartNumber)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetPartNumber == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_removepackagethumbnailattachment", (void**)&(pWrapperTable->m_Model_RemovePackageThumbnailAttachment)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_RemovePackageThumbnailAttachment == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditem_setpartnumber", (void**)&(pWrapperTable->m_BuildItem_SetPartNumber)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_SetPartNumber == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addcustomcontenttype", (void**)&(pWrapperTable->m_Model_AddCustomContentType)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddCustomContentType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditem_getmetadatagroup", (void**)&(pWrapperTable->m_BuildItem_GetMetaDataGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetMetaDataGroup == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_removecustomcontenttype", (void**)&(pWrapperTable->m_Model_RemoveCustomContentType)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_RemoveCustomContentType == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditem_getoutbox", (void**)&(pWrapperTable->m_BuildItem_GetOutbox)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItem_GetOutbox == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_setrandomnumbercallback", (void**)&(pWrapperTable->m_Model_SetRandomNumberCallback)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_SetRandomNumberCallback == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditemiterator_movenext", (void**)&(pWrapperTable->m_BuildItemIterator_MoveNext)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItemIterator_MoveNext == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getkeystore", (void**)&(pWrapperTable->m_Model_GetKeyStore)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetKeyStore == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditemiterator_moveprevious", (void**)&(pWrapperTable->m_BuildItemIterator_MovePrevious)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItemIterator_MovePrevious == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getfunctions", (void**)&(pWrapperTable->m_Model_GetFunctions)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetFunctions == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditemiterator_getcurrent", (void**)&(pWrapperTable->m_BuildItemIterator_GetCurrent)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItemIterator_GetCurrent == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addimplicitfunction", (void**)&(pWrapperTable->m_Model_AddImplicitFunction)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddImplicitFunction == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditemiterator_clone", (void**)&(pWrapperTable->m_BuildItemIterator_Clone)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItemIterator_Clone == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addfunctionfromimage3d", (void**)&(pWrapperTable->m_Model_AddFunctionFromImage3D)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddFunctionFromImage3D == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_builditemiterator_count", (void**)&(pWrapperTable->m_BuildItemIterator_Count)); - if ( (eLookupError != 0) || (pWrapperTable->m_BuildItemIterator_Count == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addvolumedata", (void**)&(pWrapperTable->m_Model_AddVolumeData)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddVolumeData == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slice_setvertices", (void**)&(pWrapperTable->m_Slice_SetVertices)); - if ( (eLookupError != 0) || (pWrapperTable->m_Slice_SetVertices == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_addlevelset", (void**)&(pWrapperTable->m_Model_AddLevelSet)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddLevelSet == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slice_getvertices", (void**)&(pWrapperTable->m_Slice_GetVertices)); - if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetVertices == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_getlevelsets", (void**)&(pWrapperTable->m_Model_GetLevelSets)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetLevelSets == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slice_getvertexcount", (void**)&(pWrapperTable->m_Slice_GetVertexCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetVertexCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_model_removeresource", (void**)&(pWrapperTable->m_Model_RemoveResource)); + if ( (eLookupError != 0) || (pWrapperTable->m_Model_RemoveResource == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slice_addpolygon", (void**)&(pWrapperTable->m_Slice_AddPolygon)); - if ( (eLookupError != 0) || (pWrapperTable->m_Slice_AddPolygon == nullptr) ) + eLookupError = (*pLookup)("lib3mf_getlibraryversion", (void**)&(pWrapperTable->m_GetLibraryVersion)); + if ( (eLookupError != 0) || (pWrapperTable->m_GetLibraryVersion == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slice_getpolygoncount", (void**)&(pWrapperTable->m_Slice_GetPolygonCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetPolygonCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_getprereleaseinformation", (void**)&(pWrapperTable->m_GetPrereleaseInformation)); + if ( (eLookupError != 0) || (pWrapperTable->m_GetPrereleaseInformation == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slice_setpolygonindices", (void**)&(pWrapperTable->m_Slice_SetPolygonIndices)); - if ( (eLookupError != 0) || (pWrapperTable->m_Slice_SetPolygonIndices == nullptr) ) + eLookupError = (*pLookup)("lib3mf_getbuildinformation", (void**)&(pWrapperTable->m_GetBuildInformation)); + if ( (eLookupError != 0) || (pWrapperTable->m_GetBuildInformation == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slice_getpolygonindices", (void**)&(pWrapperTable->m_Slice_GetPolygonIndices)); - if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetPolygonIndices == nullptr) ) + eLookupError = (*pLookup)("lib3mf_getspecificationversion", (void**)&(pWrapperTable->m_GetSpecificationVersion)); + if ( (eLookupError != 0) || (pWrapperTable->m_GetSpecificationVersion == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slice_getpolygonindexcount", (void**)&(pWrapperTable->m_Slice_GetPolygonIndexCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetPolygonIndexCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_createmodel", (void**)&(pWrapperTable->m_CreateModel)); + if ( (eLookupError != 0) || (pWrapperTable->m_CreateModel == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slice_getztop", (void**)&(pWrapperTable->m_Slice_GetZTop)); - if ( (eLookupError != 0) || (pWrapperTable->m_Slice_GetZTop == nullptr) ) + eLookupError = (*pLookup)("lib3mf_release", (void**)&(pWrapperTable->m_Release)); + if ( (eLookupError != 0) || (pWrapperTable->m_Release == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slicestack_getbottomz", (void**)&(pWrapperTable->m_SliceStack_GetBottomZ)); - if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetBottomZ == nullptr) ) + eLookupError = (*pLookup)("lib3mf_acquire", (void**)&(pWrapperTable->m_Acquire)); + if ( (eLookupError != 0) || (pWrapperTable->m_Acquire == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slicestack_getslicecount", (void**)&(pWrapperTable->m_SliceStack_GetSliceCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetSliceCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_setjournal", (void**)&(pWrapperTable->m_SetJournal)); + if ( (eLookupError != 0) || (pWrapperTable->m_SetJournal == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slicestack_getslice", (void**)&(pWrapperTable->m_SliceStack_GetSlice)); - if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetSlice == nullptr) ) + eLookupError = (*pLookup)("lib3mf_getlasterror", (void**)&(pWrapperTable->m_GetLastError)); + if ( (eLookupError != 0) || (pWrapperTable->m_GetLastError == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slicestack_addslice", (void**)&(pWrapperTable->m_SliceStack_AddSlice)); - if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_AddSlice == nullptr) ) + eLookupError = (*pLookup)("lib3mf_getsymbollookupmethod", (void**)&(pWrapperTable->m_GetSymbolLookupMethod)); + if ( (eLookupError != 0) || (pWrapperTable->m_GetSymbolLookupMethod == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slicestack_getslicerefcount", (void**)&(pWrapperTable->m_SliceStack_GetSliceRefCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetSliceRefCount == nullptr) ) + eLookupError = (*pLookup)("lib3mf_retrieveprogressmessage", (void**)&(pWrapperTable->m_RetrieveProgressMessage)); + if ( (eLookupError != 0) || (pWrapperTable->m_RetrieveProgressMessage == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slicestack_addslicestackreference", (void**)&(pWrapperTable->m_SliceStack_AddSliceStackReference)); - if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_AddSliceStackReference == nullptr) ) + eLookupError = (*pLookup)("lib3mf_rgbatocolor", (void**)&(pWrapperTable->m_RGBAToColor)); + if ( (eLookupError != 0) || (pWrapperTable->m_RGBAToColor == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slicestack_getslicestackreference", (void**)&(pWrapperTable->m_SliceStack_GetSliceStackReference)); - if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetSliceStackReference == nullptr) ) + eLookupError = (*pLookup)("lib3mf_floatrgbatocolor", (void**)&(pWrapperTable->m_FloatRGBAToColor)); + if ( (eLookupError != 0) || (pWrapperTable->m_FloatRGBAToColor == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slicestack_collapseslicereferences", (void**)&(pWrapperTable->m_SliceStack_CollapseSliceReferences)); - if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_CollapseSliceReferences == nullptr) ) + eLookupError = (*pLookup)("lib3mf_colortorgba", (void**)&(pWrapperTable->m_ColorToRGBA)); + if ( (eLookupError != 0) || (pWrapperTable->m_ColorToRGBA == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slicestack_setownpath", (void**)&(pWrapperTable->m_SliceStack_SetOwnPath)); - if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_SetOwnPath == nullptr) ) + eLookupError = (*pLookup)("lib3mf_colortofloatrgba", (void**)&(pWrapperTable->m_ColorToFloatRGBA)); + if ( (eLookupError != 0) || (pWrapperTable->m_ColorToFloatRGBA == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_slicestack_getownpath", (void**)&(pWrapperTable->m_SliceStack_GetOwnPath)); - if ( (eLookupError != 0) || (pWrapperTable->m_SliceStack_GetOwnPath == nullptr) ) + eLookupError = (*pLookup)("lib3mf_getidentitytransform", (void**)&(pWrapperTable->m_GetIdentityTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_GetIdentityTransform == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_consumer_getconsumerid", (void**)&(pWrapperTable->m_Consumer_GetConsumerID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Consumer_GetConsumerID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_getuniformscaletransform", (void**)&(pWrapperTable->m_GetUniformScaleTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_GetUniformScaleTransform == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_consumer_getkeyid", (void**)&(pWrapperTable->m_Consumer_GetKeyID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Consumer_GetKeyID == nullptr) ) + eLookupError = (*pLookup)("lib3mf_getscaletransform", (void**)&(pWrapperTable->m_GetScaleTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_GetScaleTransform == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_consumer_getkeyvalue", (void**)&(pWrapperTable->m_Consumer_GetKeyValue)); - if ( (eLookupError != 0) || (pWrapperTable->m_Consumer_GetKeyValue == nullptr) ) + eLookupError = (*pLookup)("lib3mf_gettranslationtransform", (void**)&(pWrapperTable->m_GetTranslationTransform)); + if ( (eLookupError != 0) || (pWrapperTable->m_GetTranslationTransform == nullptr) ) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; - eLookupError = (*pLookup)("lib3mf_accessright_getconsumer", (void**)&(pWrapperTable->m_AccessRight_GetConsumer)); - if ( (eLookupError != 0) || (pWrapperTable->m_AccessRight_GetConsumer == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return LIB3MF_SUCCESS; +} + + + + /** + * Method definitions for class CBase + */ + + /** + * CBase::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 CBase::ClassTypeId() + { + Lib3MF_uint64 resultClassTypeId = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Base_ClassTypeId(m_pHandle, &resultClassTypeId)); + + return resultClassTypeId; + } + + /** + * Method definitions for class CWriter + */ + + /** + * CWriter::WriteToFile - Writes out the model as file. The file type is specified by the Model Writer class. + * @param[in] sFilename - Filename to write into + */ + void CWriter::WriteToFile(const std::string & sFilename) + { + CheckError(m_pWrapper->m_WrapperTable.m_Writer_WriteToFile(m_pHandle, sFilename.c_str())); + } + + /** + * CWriter::GetStreamSize - Retrieves the size of the full 3MF file stream. + * @return the stream size + */ + Lib3MF_uint64 CWriter::GetStreamSize() + { + Lib3MF_uint64 resultStreamSize = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetStreamSize(m_pHandle, &resultStreamSize)); + + return resultStreamSize; + } + + /** + * CWriter::WriteToBuffer - Writes out the 3MF file into a memory buffer + * @param[out] BufferBuffer - buffer to write into + */ + void CWriter::WriteToBuffer(std::vector & BufferBuffer) + { + Lib3MF_uint64 elementsNeededBuffer = 0; + Lib3MF_uint64 elementsWrittenBuffer = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Writer_WriteToBuffer(m_pHandle, 0, &elementsNeededBuffer, nullptr)); + BufferBuffer.resize((size_t) elementsNeededBuffer); + CheckError(m_pWrapper->m_WrapperTable.m_Writer_WriteToBuffer(m_pHandle, elementsNeededBuffer, &elementsWrittenBuffer, BufferBuffer.data())); + } + + /** + * CWriter::WriteToCallback - Writes out the model and passes the data to a provided callback function. The file type is specified by the Model Writer class. + * @param[in] pTheWriteCallback - Callback to call for writing a data chunk + * @param[in] pTheSeekCallback - Callback to call for seeking in the stream + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CWriter::WriteToCallback(const WriteCallback pTheWriteCallback, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) + { + CheckError(m_pWrapper->m_WrapperTable.m_Writer_WriteToCallback(m_pHandle, pTheWriteCallback, pTheSeekCallback, pUserData)); + } + + /** + * CWriter::SetProgressCallback - Set the progress callback for calls to this writer + * @param[in] pProgressCallback - pointer to the callback function. + * @param[in] pUserData - pointer to arbitrary user data that is passed without modification to the callback. + */ + void CWriter::SetProgressCallback(const ProgressCallback pProgressCallback, const Lib3MF_pvoid pUserData) + { + CheckError(m_pWrapper->m_WrapperTable.m_Writer_SetProgressCallback(m_pHandle, pProgressCallback, pUserData)); + } + + /** + * CWriter::GetDecimalPrecision - Returns the number of digits after the decimal point to be written in each vertex coordinate-value. + * @return The number of digits to be written in each vertex coordinate-value after the decimal point. + */ + Lib3MF_uint32 CWriter::GetDecimalPrecision() + { + Lib3MF_uint32 resultDecimalPrecision = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetDecimalPrecision(m_pHandle, &resultDecimalPrecision)); + + return resultDecimalPrecision; + } + + /** + * CWriter::SetDecimalPrecision - Sets the number of digits after the decimal point to be written in each vertex coordinate-value. + * @param[in] nDecimalPrecision - The number of digits to be written in each vertex coordinate-value after the decimal point. + */ + void CWriter::SetDecimalPrecision(const Lib3MF_uint32 nDecimalPrecision) + { + CheckError(m_pWrapper->m_WrapperTable.m_Writer_SetDecimalPrecision(m_pHandle, nDecimalPrecision)); + } + + /** + * CWriter::SetStrictModeActive - Activates (deactivates) the strict mode of the reader. + * @param[in] bStrictModeActive - flag whether strict mode is active or not. + */ + void CWriter::SetStrictModeActive(const bool bStrictModeActive) + { + CheckError(m_pWrapper->m_WrapperTable.m_Writer_SetStrictModeActive(m_pHandle, bStrictModeActive)); + } + + /** + * CWriter::GetStrictModeActive - Queries whether the strict mode of the reader is active or not + * @return returns flag whether strict mode is active or not. + */ + bool CWriter::GetStrictModeActive() + { + bool resultStrictModeActive = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetStrictModeActive(m_pHandle, &resultStrictModeActive)); + + return resultStrictModeActive; + } + + /** + * CWriter::GetWarning - Returns Warning and Error Information of the read process + * @param[in] nIndex - Index of the Warning. Valid values are 0 to WarningCount - 1 + * @param[out] nErrorCode - filled with the error code of the warning + * @return the message of the warning + */ + std::string CWriter::GetWarning(const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode) + { + Lib3MF_uint32 bytesNeededWarning = 0; + Lib3MF_uint32 bytesWrittenWarning = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetWarning(m_pHandle, nIndex, &nErrorCode, 0, &bytesNeededWarning, nullptr)); + std::vector bufferWarning(bytesNeededWarning); + CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetWarning(m_pHandle, nIndex, &nErrorCode, bytesNeededWarning, &bytesWrittenWarning, &bufferWarning[0])); + + return std::string(&bufferWarning[0]); + } + + /** + * CWriter::GetWarningCount - Returns Warning and Error Count of the read process + * @return filled with the count of the occurred warnings. + */ + Lib3MF_uint32 CWriter::GetWarningCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetWarningCount(m_pHandle, &resultCount)); + + return resultCount; + } + + /** + * CWriter::AddKeyWrappingCallback - Registers a callback to deal with data key encryption/decryption from keystore + * @param[in] sConsumerID - The ConsumerID to register for + * @param[in] pTheCallback - The callback to be callede for wrapping and encryption key + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CWriter::AddKeyWrappingCallback(const std::string & sConsumerID, const KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData) + { + CheckError(m_pWrapper->m_WrapperTable.m_Writer_AddKeyWrappingCallback(m_pHandle, sConsumerID.c_str(), pTheCallback, pUserData)); + } + + /** + * CWriter::SetContentEncryptionCallback - Registers a callback to deal with encryption of content + * @param[in] pTheCallback - The callback used to encrypt content + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CWriter::SetContentEncryptionCallback(const ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData) + { + CheckError(m_pWrapper->m_WrapperTable.m_Writer_SetContentEncryptionCallback(m_pHandle, pTheCallback, pUserData)); + } + + /** + * Method definitions for class CReader + */ + + /** + * CReader::ReadFromFile - Reads a model from a file. The file type is specified by the Model Reader class + * @param[in] sFilename - Filename to read from + */ + void CReader::ReadFromFile(const std::string & sFilename) + { + CheckError(m_pWrapper->m_WrapperTable.m_Reader_ReadFromFile(m_pHandle, sFilename.c_str())); + } + + /** + * CReader::ReadFromBuffer - Reads a model from a memory buffer. + * @param[in] BufferBuffer - Buffer to read from + */ + void CReader::ReadFromBuffer(const CInputVector & BufferBuffer) + { + CheckError(m_pWrapper->m_WrapperTable.m_Reader_ReadFromBuffer(m_pHandle, (Lib3MF_uint64)BufferBuffer.size(), BufferBuffer.data())); + } + + /** + * CReader::ReadFromCallback - Reads a model and from the data provided by a callback function + * @param[in] pTheReadCallback - Callback to call for reading a data chunk + * @param[in] nStreamSize - number of bytes the callback returns + * @param[in] pTheSeekCallback - Callback to call for seeking in the stream. + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CReader::ReadFromCallback(const ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) + { + CheckError(m_pWrapper->m_WrapperTable.m_Reader_ReadFromCallback(m_pHandle, pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData)); + } + + /** + * CReader::SetProgressCallback - Set the progress callback for calls to this writer + * @param[in] pProgressCallback - pointer to the callback function. + * @param[in] pUserData - pointer to arbitrary user data that is passed without modification to the callback. + */ + void CReader::SetProgressCallback(const ProgressCallback pProgressCallback, const Lib3MF_pvoid pUserData) + { + CheckError(m_pWrapper->m_WrapperTable.m_Reader_SetProgressCallback(m_pHandle, pProgressCallback, pUserData)); + } + + /** + * CReader::AddRelationToRead - Adds a relationship type which shall be read as attachment in memory while loading + * @param[in] sRelationShipType - String of the relationship type + */ + void CReader::AddRelationToRead(const std::string & sRelationShipType) + { + CheckError(m_pWrapper->m_WrapperTable.m_Reader_AddRelationToRead(m_pHandle, sRelationShipType.c_str())); + } + + /** + * CReader::RemoveRelationToRead - Removes a relationship type which shall be read as attachment in memory while loading + * @param[in] sRelationShipType - String of the relationship type + */ + void CReader::RemoveRelationToRead(const std::string & sRelationShipType) + { + CheckError(m_pWrapper->m_WrapperTable.m_Reader_RemoveRelationToRead(m_pHandle, sRelationShipType.c_str())); + } + + /** + * CReader::SetStrictModeActive - Activates (deactivates) the strict mode of the reader. + * @param[in] bStrictModeActive - flag whether strict mode is active or not. + */ + void CReader::SetStrictModeActive(const bool bStrictModeActive) + { + CheckError(m_pWrapper->m_WrapperTable.m_Reader_SetStrictModeActive(m_pHandle, bStrictModeActive)); + } + + /** + * CReader::GetStrictModeActive - Queries whether the strict mode of the reader is active or not + * @return returns flag whether strict mode is active or not. + */ + bool CReader::GetStrictModeActive() + { + bool resultStrictModeActive = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Reader_GetStrictModeActive(m_pHandle, &resultStrictModeActive)); + + return resultStrictModeActive; + } + + /** + * CReader::GetWarning - Returns Warning and Error Information of the read process + * @param[in] nIndex - Index of the Warning. Valid values are 0 to WarningCount - 1 + * @param[out] nErrorCode - filled with the error code of the warning + * @return the message of the warning + */ + std::string CReader::GetWarning(const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode) + { + Lib3MF_uint32 bytesNeededWarning = 0; + Lib3MF_uint32 bytesWrittenWarning = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Reader_GetWarning(m_pHandle, nIndex, &nErrorCode, 0, &bytesNeededWarning, nullptr)); + std::vector bufferWarning(bytesNeededWarning); + CheckError(m_pWrapper->m_WrapperTable.m_Reader_GetWarning(m_pHandle, nIndex, &nErrorCode, bytesNeededWarning, &bytesWrittenWarning, &bufferWarning[0])); - eLookupError = (*pLookup)("lib3mf_accessright_getwrappingalgorithm", (void**)&(pWrapperTable->m_AccessRight_GetWrappingAlgorithm)); - if ( (eLookupError != 0) || (pWrapperTable->m_AccessRight_GetWrappingAlgorithm == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferWarning[0]); + } + + /** + * CReader::GetWarningCount - Returns Warning and Error Count of the read process + * @return filled with the count of the occurred warnings. + */ + Lib3MF_uint32 CReader::GetWarningCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Reader_GetWarningCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_accessright_getmgfalgorithm", (void**)&(pWrapperTable->m_AccessRight_GetMgfAlgorithm)); - if ( (eLookupError != 0) || (pWrapperTable->m_AccessRight_GetMgfAlgorithm == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CReader::AddKeyWrappingCallback - Registers a callback to deal with key wrapping mechanism from keystore + * @param[in] sConsumerID - The ConsumerID to register for + * @param[in] pTheCallback - The callback used to decrypt data key + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CReader::AddKeyWrappingCallback(const std::string & sConsumerID, const KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData) + { + CheckError(m_pWrapper->m_WrapperTable.m_Reader_AddKeyWrappingCallback(m_pHandle, sConsumerID.c_str(), pTheCallback, pUserData)); + } + + /** + * CReader::SetContentEncryptionCallback - Registers a callback to deal with encryption of content + * @param[in] pTheCallback - The callback used to encrypt content + * @param[in] pUserData - Userdata that is passed to the callback function + */ + void CReader::SetContentEncryptionCallback(const ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData) + { + CheckError(m_pWrapper->m_WrapperTable.m_Reader_SetContentEncryptionCallback(m_pHandle, pTheCallback, pUserData)); + } + + /** + * Method definitions for class CPackagePart + */ + + /** + * CPackagePart::GetPath - Returns the absolute path of this PackagePart. + * @return Returns the absolute path of this PackagePart + */ + std::string CPackagePart::GetPath() + { + Lib3MF_uint32 bytesNeededPath = 0; + Lib3MF_uint32 bytesWrittenPath = 0; + CheckError(m_pWrapper->m_WrapperTable.m_PackagePart_GetPath(m_pHandle, 0, &bytesNeededPath, nullptr)); + std::vector bufferPath(bytesNeededPath); + CheckError(m_pWrapper->m_WrapperTable.m_PackagePart_GetPath(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); - eLookupError = (*pLookup)("lib3mf_accessright_getdigestmethod", (void**)&(pWrapperTable->m_AccessRight_GetDigestMethod)); - if ( (eLookupError != 0) || (pWrapperTable->m_AccessRight_GetDigestMethod == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferPath[0]); + } + + /** + * CPackagePart::SetPath - Sets the absolute path of this PackagePart. + * @param[in] sPath - Sets the absolute path of this PackagePart. + */ + void CPackagePart::SetPath(const std::string & sPath) + { + CheckError(m_pWrapper->m_WrapperTable.m_PackagePart_SetPath(m_pHandle, sPath.c_str())); + } + + /** + * Method definitions for class CResource + */ + + /** + * CResource::GetResourceID - Retrieves the unique id of this resource within a package. This function will be removed in a later release in favor of GetUniqueResourceID + * @return Retrieves the unique id of this resource within a package. + */ + Lib3MF_uint32 CResource::GetResourceID() + { + Lib3MF_uint32 resultUniqueResourceID = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Resource_GetResourceID(m_pHandle, &resultUniqueResourceID)); - eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getencryptionalgorithm", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm)); - if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultUniqueResourceID; + } + + /** + * CResource::GetUniqueResourceID - Retrieves the unique id of this resource within a package. + * @return Retrieves the unique id of this resource within a package. + */ + Lib3MF_uint32 CResource::GetUniqueResourceID() + { + Lib3MF_uint32 resultUniqueResourceID = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Resource_GetUniqueResourceID(m_pHandle, &resultUniqueResourceID)); - eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getkey", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetKey)); - if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetKey == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultUniqueResourceID; + } + + /** + * CResource::PackagePart - Returns the PackagePart within which this resource resides + * @return the PackagePart within which this resource resides. + */ + PPackagePart CResource::PackagePart() + { + Lib3MFHandle hPackagePart = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Resource_PackagePart(m_pHandle, &hPackagePart)); - eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getinitializationvector", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetInitializationVector)); - if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetInitializationVector == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hPackagePart) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPackagePart))); + } + + /** + * CResource::SetPackagePart - Sets the new PackagePart within which this resource resides + * @param[in] pPackagePart - the new PackagePart within which this resource resides. + */ + void CResource::SetPackagePart(classParam pPackagePart) + { + Lib3MFHandle hPackagePart = pPackagePart.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_Resource_SetPackagePart(m_pHandle, hPackagePart)); + } + + /** + * CResource::GetModelResourceID - Retrieves the id of this resource within a model. + * @return Retrieves the id of this resource within a model. + */ + Lib3MF_uint32 CResource::GetModelResourceID() + { + Lib3MF_uint32 resultModelResourceId = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Resource_GetModelResourceID(m_pHandle, &resultModelResourceId)); - eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getauthenticationtag", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetAuthenticationTag)); - if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetAuthenticationTag == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultModelResourceId; + } + + /** + * Method definitions for class CResourceIterator + */ + + /** + * CResourceIterator::MoveNext - Iterates to the next resource in the list. + * @return Iterates to the next resource in the list. + */ + bool CResourceIterator::MoveNext() + { + bool resultHasNext = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ResourceIterator_MoveNext(m_pHandle, &resultHasNext)); - eLookupError = (*pLookup)("lib3mf_contentencryptionparams_setauthenticationtag", (void**)&(pWrapperTable->m_ContentEncryptionParams_SetAuthenticationTag)); - if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_SetAuthenticationTag == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultHasNext; + } + + /** + * CResourceIterator::MovePrevious - Iterates to the previous resource in the list. + * @return Iterates to the previous resource in the list. + */ + bool CResourceIterator::MovePrevious() + { + bool resultHasPrevious = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ResourceIterator_MovePrevious(m_pHandle, &resultHasPrevious)); - eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getadditionalauthenticationdata", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData)); - if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultHasPrevious; + } + + /** + * CResourceIterator::GetCurrent - Returns the resource the iterator points at. + * @return returns the resource instance. + */ + PResource CResourceIterator::GetCurrent() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ResourceIterator_GetCurrent(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getdescriptor", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetDescriptor)); - if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetDescriptor == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * CResourceIterator::Clone - Creates a new resource iterator with the same resource list. + * @return returns the cloned Iterator instance + */ + PResourceIterator CResourceIterator::Clone() + { + Lib3MFHandle hOutResourceIterator = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ResourceIterator_Clone(m_pHandle, &hOutResourceIterator)); - eLookupError = (*pLookup)("lib3mf_contentencryptionparams_getkeyuuid", (void**)&(pWrapperTable->m_ContentEncryptionParams_GetKeyUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_ContentEncryptionParams_GetKeyUUID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hOutResourceIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hOutResourceIterator))); + } + + /** + * CResourceIterator::Count - Returns the number of resoucres the iterator captures. + * @return returns the number of resoucres the iterator captures. + */ + Lib3MF_uint64 CResourceIterator::Count() + { + Lib3MF_uint64 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ResourceIterator_Count(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_resourcedata_getpath", (void**)&(pWrapperTable->m_ResourceData_GetPath)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceData_GetPath == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * Method definitions for class CSliceStackIterator + */ + + /** + * CSliceStackIterator::GetCurrentSliceStack - Returns the SliceStack the iterator points at. + * @return returns the SliceStack instance. + */ + PSliceStack CSliceStackIterator::GetCurrentSliceStack() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_SliceStackIterator_GetCurrentSliceStack(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_resourcedata_getencryptionalgorithm", (void**)&(pWrapperTable->m_ResourceData_GetEncryptionAlgorithm)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceData_GetEncryptionAlgorithm == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CObjectIterator + */ + + /** + * CObjectIterator::GetCurrentObject - Returns the Object the iterator points at. + * @return returns the Object instance. + */ + PObject CObjectIterator::GetCurrentObject() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ObjectIterator_GetCurrentObject(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_resourcedata_getcompression", (void**)&(pWrapperTable->m_ResourceData_GetCompression)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceData_GetCompression == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CMeshObjectIterator + */ + + /** + * CMeshObjectIterator::GetCurrentMeshObject - Returns the MeshObject the iterator points at. + * @return returns the MeshObject instance. + */ + PMeshObject CMeshObjectIterator::GetCurrentMeshObject() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObjectIterator_GetCurrentMeshObject(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_resourcedata_getadditionalauthenticationdata", (void**)&(pWrapperTable->m_ResourceData_GetAdditionalAuthenticationData)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceData_GetAdditionalAuthenticationData == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CComponentsObjectIterator + */ + + /** + * CComponentsObjectIterator::GetCurrentComponentsObject - Returns the ComponentsObject the iterator points at. + * @return returns the ComponentsObject instance. + */ + PComponentsObject CComponentsObjectIterator::GetCurrentComponentsObject() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComponentsObjectIterator_GetCurrentComponentsObject(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_resourcedatagroup_getkeyuuid", (void**)&(pWrapperTable->m_ResourceDataGroup_GetKeyUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceDataGroup_GetKeyUUID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CTexture2DIterator + */ + + /** + * CTexture2DIterator::GetCurrentTexture2D - Returns the Texture2D the iterator points at. + * @return returns the Texture2D instance. + */ + PTexture2D CTexture2DIterator::GetCurrentTexture2D() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Texture2DIterator_GetCurrentTexture2D(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_resourcedatagroup_addaccessright", (void**)&(pWrapperTable->m_ResourceDataGroup_AddAccessRight)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceDataGroup_AddAccessRight == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CBaseMaterialGroupIterator + */ + + /** + * CBaseMaterialGroupIterator::GetCurrentBaseMaterialGroup - Returns the MaterialGroup the iterator points at. + * @return returns the BaseMaterialGroup instance. + */ + PBaseMaterialGroup CBaseMaterialGroupIterator::GetCurrentBaseMaterialGroup() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_resourcedatagroup_findaccessrightbyconsumer", (void**)&(pWrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CColorGroupIterator + */ + + /** + * CColorGroupIterator::GetCurrentColorGroup - Returns the ColorGroup the iterator points at. + * @return returns the ColorGroup instance. + */ + PColorGroup CColorGroupIterator::GetCurrentColorGroup() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ColorGroupIterator_GetCurrentColorGroup(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_resourcedatagroup_removeaccessright", (void**)&(pWrapperTable->m_ResourceDataGroup_RemoveAccessRight)); - if ( (eLookupError != 0) || (pWrapperTable->m_ResourceDataGroup_RemoveAccessRight == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CTexture2DGroupIterator + */ + + /** + * CTexture2DGroupIterator::GetCurrentTexture2DGroup - Returns the Texture2DGroup the iterator points at. + * @return returns the Texture2DGroup instance. + */ + PTexture2DGroup CTexture2DGroupIterator::GetCurrentTexture2DGroup() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroupIterator_GetCurrentTexture2DGroup(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_keystore_addconsumer", (void**)&(pWrapperTable->m_KeyStore_AddConsumer)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_AddConsumer == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CCompositeMaterialsIterator + */ + + /** + * CCompositeMaterialsIterator::GetCurrentCompositeMaterials - Returns the CompositeMaterials the iterator points at. + * @return returns the CompositeMaterials instance. + */ + PCompositeMaterials CCompositeMaterialsIterator::GetCurrentCompositeMaterials() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterialsIterator_GetCurrentCompositeMaterials(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_keystore_getconsumercount", (void**)&(pWrapperTable->m_KeyStore_GetConsumerCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetConsumerCount == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CMultiPropertyGroupIterator + */ + + /** + * CMultiPropertyGroupIterator::GetCurrentMultiPropertyGroup - Returns the MultiPropertyGroup the iterator points at. + * @return returns the MultiPropertyGroup instance. + */ + PMultiPropertyGroup CMultiPropertyGroupIterator::GetCurrentMultiPropertyGroup() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_keystore_getconsumer", (void**)&(pWrapperTable->m_KeyStore_GetConsumer)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetConsumer == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CImage3DIterator + */ + + /** + * CImage3DIterator::GetCurrentImage3D - Returns the Image3D the iterator points at. + * @return returns the Image3D instance. + */ + PImage3D CImage3DIterator::GetCurrentImage3D() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Image3DIterator_GetCurrentImage3D(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_keystore_removeconsumer", (void**)&(pWrapperTable->m_KeyStore_RemoveConsumer)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_RemoveConsumer == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CFunctionIterator + */ + + /** + * CFunctionIterator::GetCurrentFunction - Returns the Function the iterator points at. + * @return returns the Function instance. + */ + PFunction CFunctionIterator::GetCurrentFunction() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionIterator_GetCurrentFunction(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_keystore_findconsumer", (void**)&(pWrapperTable->m_KeyStore_FindConsumer)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_FindConsumer == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CLevelSetIterator + */ + + /** + * CLevelSetIterator::GetCurrentLevelSet - Returns the LevelSet the iterator points at. + * @return returns the MeshObject instance. + */ + PLevelSet CLevelSetIterator::GetCurrentLevelSet() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_LevelSetIterator_GetCurrentLevelSet(m_pHandle, &hResource)); - eLookupError = (*pLookup)("lib3mf_keystore_getresourcedatagroupcount", (void**)&(pWrapperTable->m_KeyStore_GetResourceDataGroupCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetResourceDataGroupCount == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + } + + /** + * Method definitions for class CMetaData + */ + + /** + * CMetaData::GetNameSpace - returns the namespace URL of the metadata + * @return the namespace URL of the metadata + */ + std::string CMetaData::GetNameSpace() + { + Lib3MF_uint32 bytesNeededNameSpace = 0; + Lib3MF_uint32 bytesWrittenNameSpace = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetNameSpace(m_pHandle, 0, &bytesNeededNameSpace, nullptr)); + std::vector bufferNameSpace(bytesNeededNameSpace); + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetNameSpace(m_pHandle, bytesNeededNameSpace, &bytesWrittenNameSpace, &bufferNameSpace[0])); - eLookupError = (*pLookup)("lib3mf_keystore_addresourcedatagroup", (void**)&(pWrapperTable->m_KeyStore_AddResourceDataGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_AddResourceDataGroup == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferNameSpace[0]); + } + + /** + * CMetaData::SetNameSpace - sets a new namespace URL of the metadata + * @param[in] sNameSpace - the new namespace URL of the metadata + */ + void CMetaData::SetNameSpace(const std::string & sNameSpace) + { + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_SetNameSpace(m_pHandle, sNameSpace.c_str())); + } + + /** + * CMetaData::GetName - returns the name of a metadata + * @return the name of the metadata + */ + std::string CMetaData::GetName() + { + Lib3MF_uint32 bytesNeededName = 0; + Lib3MF_uint32 bytesWrittenName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetName(m_pHandle, 0, &bytesNeededName, nullptr)); + std::vector bufferName(bytesNeededName); + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetName(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); - eLookupError = (*pLookup)("lib3mf_keystore_getresourcedatagroup", (void**)&(pWrapperTable->m_KeyStore_GetResourceDataGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetResourceDataGroup == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferName[0]); + } + + /** + * CMetaData::SetName - sets a new name of a metadata + * @param[in] sName - the new name of the metadata + */ + void CMetaData::SetName(const std::string & sName) + { + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_SetName(m_pHandle, sName.c_str())); + } + + /** + * CMetaData::GetKey - returns the (namespace+name) of a metadata + * @return the key (namespace+name) of the metadata + */ + std::string CMetaData::GetKey() + { + Lib3MF_uint32 bytesNeededKey = 0; + Lib3MF_uint32 bytesWrittenKey = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetKey(m_pHandle, 0, &bytesNeededKey, nullptr)); + std::vector bufferKey(bytesNeededKey); + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetKey(m_pHandle, bytesNeededKey, &bytesWrittenKey, &bufferKey[0])); - eLookupError = (*pLookup)("lib3mf_keystore_removeresourcedatagroup", (void**)&(pWrapperTable->m_KeyStore_RemoveResourceDataGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_RemoveResourceDataGroup == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferKey[0]); + } + + /** + * CMetaData::GetMustPreserve - returns, whether a metadata must be preserved + * @return returns, whether a metadata must be preserved + */ + bool CMetaData::GetMustPreserve() + { + bool resultMustPreserve = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetMustPreserve(m_pHandle, &resultMustPreserve)); - eLookupError = (*pLookup)("lib3mf_keystore_findresourcedatagroup", (void**)&(pWrapperTable->m_KeyStore_FindResourceDataGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_FindResourceDataGroup == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultMustPreserve; + } + + /** + * CMetaData::SetMustPreserve - sets whether a metadata must be preserved + * @param[in] bMustPreserve - a new value whether a metadata must be preserved + */ + void CMetaData::SetMustPreserve(const bool bMustPreserve) + { + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_SetMustPreserve(m_pHandle, bMustPreserve)); + } + + /** + * CMetaData::GetType - returns the type of a metadata + * @return the type of the metadata + */ + std::string CMetaData::GetType() + { + Lib3MF_uint32 bytesNeededType = 0; + Lib3MF_uint32 bytesWrittenType = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetType(m_pHandle, 0, &bytesNeededType, nullptr)); + std::vector bufferType(bytesNeededType); + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetType(m_pHandle, bytesNeededType, &bytesWrittenType, &bufferType[0])); - eLookupError = (*pLookup)("lib3mf_keystore_addresourcedata", (void**)&(pWrapperTable->m_KeyStore_AddResourceData)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_AddResourceData == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferType[0]); + } + + /** + * CMetaData::SetType - sets a new type of a metadata. This must be a simple XML type + * @param[in] sType - a new type of the metadata + */ + void CMetaData::SetType(const std::string & sType) + { + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_SetType(m_pHandle, sType.c_str())); + } + + /** + * CMetaData::GetValue - returns the value of the metadata + * @return the value of the metadata + */ + std::string CMetaData::GetValue() + { + Lib3MF_uint32 bytesNeededValue = 0; + Lib3MF_uint32 bytesWrittenValue = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetValue(m_pHandle, 0, &bytesNeededValue, nullptr)); + std::vector bufferValue(bytesNeededValue); + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetValue(m_pHandle, bytesNeededValue, &bytesWrittenValue, &bufferValue[0])); - eLookupError = (*pLookup)("lib3mf_keystore_removeresourcedata", (void**)&(pWrapperTable->m_KeyStore_RemoveResourceData)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_RemoveResourceData == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferValue[0]); + } + + /** + * CMetaData::SetValue - sets a new value of the metadata + * @param[in] sValue - a new value of the metadata + */ + void CMetaData::SetValue(const std::string & sValue) + { + CheckError(m_pWrapper->m_WrapperTable.m_MetaData_SetValue(m_pHandle, sValue.c_str())); + } + + /** + * Method definitions for class CMetaDataGroup + */ + + /** + * CMetaDataGroup::GetMetaDataCount - returns the number of metadata in this metadatagroup + * @return returns the number metadata + */ + Lib3MF_uint32 CMetaDataGroup::GetMetaDataCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_GetMetaDataCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_keystore_findresourcedata", (void**)&(pWrapperTable->m_KeyStore_FindResourceData)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_FindResourceData == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CMetaDataGroup::GetMetaData - returns a metadata value within this metadatagroup + * @param[in] nIndex - Index of the Metadata. + * @return an instance of the metadata + */ + PMetaData CMetaDataGroup::GetMetaData(const Lib3MF_uint32 nIndex) + { + Lib3MFHandle hMetaData = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_GetMetaData(m_pHandle, nIndex, &hMetaData)); - eLookupError = (*pLookup)("lib3mf_keystore_getresourcedatacount", (void**)&(pWrapperTable->m_KeyStore_GetResourceDataCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetResourceDataCount == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hMetaData) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); + } + + /** + * CMetaDataGroup::GetMetaDataByKey - returns a metadata value within this metadatagroup + * @param[in] sNameSpace - the namespace of the metadata + * @param[in] sName - the name of the Metadata + * @return an instance of the metadata + */ + PMetaData CMetaDataGroup::GetMetaDataByKey(const std::string & sNameSpace, const std::string & sName) + { + Lib3MFHandle hMetaData = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_GetMetaDataByKey(m_pHandle, sNameSpace.c_str(), sName.c_str(), &hMetaData)); - eLookupError = (*pLookup)("lib3mf_keystore_getresourcedata", (void**)&(pWrapperTable->m_KeyStore_GetResourceData)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetResourceData == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hMetaData) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); + } + + /** + * CMetaDataGroup::RemoveMetaDataByIndex - removes metadata by index from the model. + * @param[in] nIndex - Index of the metadata to remove + */ + void CMetaDataGroup::RemoveMetaDataByIndex(const Lib3MF_uint32 nIndex) + { + CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_RemoveMetaDataByIndex(m_pHandle, nIndex)); + } + + /** + * CMetaDataGroup::RemoveMetaData - removes metadata from the model. + * @param[in] pTheMetaData - The metadata to remove + */ + void CMetaDataGroup::RemoveMetaData(classParam pTheMetaData) + { + Lib3MFHandle hTheMetaData = pTheMetaData.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_RemoveMetaData(m_pHandle, hTheMetaData)); + } + + /** + * CMetaDataGroup::AddMetaData - adds a new metadata to this metadatagroup + * @param[in] sNameSpace - the namespace of the metadata + * @param[in] sName - the name of the metadata + * @param[in] sValue - the value of the metadata + * @param[in] sType - the type of the metadata + * @param[in] bMustPreserve - shuold the metadata be preserved + * @return a new instance of the metadata + */ + PMetaData CMetaDataGroup::AddMetaData(const std::string & sNameSpace, const std::string & sName, const std::string & sValue, const std::string & sType, const bool bMustPreserve) + { + Lib3MFHandle hMetaData = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_AddMetaData(m_pHandle, sNameSpace.c_str(), sName.c_str(), sValue.c_str(), sType.c_str(), bMustPreserve, &hMetaData)); - eLookupError = (*pLookup)("lib3mf_keystore_getuuid", (void**)&(pWrapperTable->m_KeyStore_GetUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_GetUUID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hMetaData) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); + } + + /** + * Method definitions for class CObject + */ + + /** + * CObject::GetType - Retrieves an object's type + * @return returns object type enum. + */ + eObjectType CObject::GetType() + { + eObjectType resultObjectType = (eObjectType) 0; + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetType(m_pHandle, &resultObjectType)); - eLookupError = (*pLookup)("lib3mf_keystore_setuuid", (void**)&(pWrapperTable->m_KeyStore_SetUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_KeyStore_SetUUID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultObjectType; + } + + /** + * CObject::SetType - Sets an object's type + * @param[in] eObjectType - object type enum. + */ + void CObject::SetType(const eObjectType eObjectType) + { + CheckError(m_pWrapper->m_WrapperTable.m_Object_SetType(m_pHandle, eObjectType)); + } + + /** + * CObject::GetName - Retrieves an object's name + * @return returns object name. + */ + std::string CObject::GetName() + { + Lib3MF_uint32 bytesNeededName = 0; + Lib3MF_uint32 bytesWrittenName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetName(m_pHandle, 0, &bytesNeededName, nullptr)); + std::vector bufferName(bytesNeededName); + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetName(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); - eLookupError = (*pLookup)("lib3mf_model_rootmodelpart", (void**)&(pWrapperTable->m_Model_RootModelPart)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_RootModelPart == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferName[0]); + } + + /** + * CObject::SetName - Sets an object's name string + * @param[in] sName - new object name. + */ + void CObject::SetName(const std::string & sName) + { + CheckError(m_pWrapper->m_WrapperTable.m_Object_SetName(m_pHandle, sName.c_str())); + } + + /** + * CObject::GetPartNumber - Retrieves an object's part number + * @return returns object part number. + */ + std::string CObject::GetPartNumber() + { + Lib3MF_uint32 bytesNeededPartNumber = 0; + Lib3MF_uint32 bytesWrittenPartNumber = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetPartNumber(m_pHandle, 0, &bytesNeededPartNumber, nullptr)); + std::vector bufferPartNumber(bytesNeededPartNumber); + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetPartNumber(m_pHandle, bytesNeededPartNumber, &bytesWrittenPartNumber, &bufferPartNumber[0])); - eLookupError = (*pLookup)("lib3mf_model_findorcreatepackagepart", (void**)&(pWrapperTable->m_Model_FindOrCreatePackagePart)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_FindOrCreatePackagePart == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferPartNumber[0]); + } + + /** + * CObject::SetPartNumber - Sets an objects partnumber string + * @param[in] sPartNumber - new object part number. + */ + void CObject::SetPartNumber(const std::string & sPartNumber) + { + CheckError(m_pWrapper->m_WrapperTable.m_Object_SetPartNumber(m_pHandle, sPartNumber.c_str())); + } + + /** + * CObject::IsMeshObject - Retrieves, if an object is a mesh object + * @return returns, whether the object is a mesh object + */ + bool CObject::IsMeshObject() + { + bool resultIsMeshObject = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Object_IsMeshObject(m_pHandle, &resultIsMeshObject)); - eLookupError = (*pLookup)("lib3mf_model_setunit", (void**)&(pWrapperTable->m_Model_SetUnit)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_SetUnit == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultIsMeshObject; + } + + /** + * CObject::IsComponentsObject - Retrieves, if an object is a components object + * @return returns, whether the object is a components object + */ + bool CObject::IsComponentsObject() + { + bool resultIsComponentsObject = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Object_IsComponentsObject(m_pHandle, &resultIsComponentsObject)); - eLookupError = (*pLookup)("lib3mf_model_getunit", (void**)&(pWrapperTable->m_Model_GetUnit)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetUnit == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultIsComponentsObject; + } + + /** + * CObject::IsLevelSetObject - Retrieves, if an object is a level set object + * @return returns, whether the object is a level set object + */ + bool CObject::IsLevelSetObject() + { + bool resultIsLevelSetObject = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Object_IsLevelSetObject(m_pHandle, &resultIsLevelSetObject)); - eLookupError = (*pLookup)("lib3mf_model_getlanguage", (void**)&(pWrapperTable->m_Model_GetLanguage)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetLanguage == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultIsLevelSetObject; + } + + /** + * CObject::IsValid - Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. + * @return returns whether the object is a valid object description + */ + bool CObject::IsValid() + { + bool resultIsValid = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Object_IsValid(m_pHandle, &resultIsValid)); - eLookupError = (*pLookup)("lib3mf_model_setlanguage", (void**)&(pWrapperTable->m_Model_SetLanguage)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_SetLanguage == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultIsValid; + } + + /** + * CObject::SetAttachmentAsThumbnail - Use an existing attachment as thumbnail for this object + * @param[in] pAttachment - Instance of a new or the existing thumbnailattachment object. + */ + void CObject::SetAttachmentAsThumbnail(classParam pAttachment) + { + Lib3MFHandle hAttachment = pAttachment.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_Object_SetAttachmentAsThumbnail(m_pHandle, hAttachment)); + } + + /** + * CObject::GetThumbnailAttachment - Get the attachment containing the object thumbnail. + * @return Instance of the thumbnailattachment object or NULL. + */ + PAttachment CObject::GetThumbnailAttachment() + { + Lib3MFHandle hAttachment = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetThumbnailAttachment(m_pHandle, &hAttachment)); - eLookupError = (*pLookup)("lib3mf_model_querywriter", (void**)&(pWrapperTable->m_Model_QueryWriter)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_QueryWriter == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (hAttachment) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hAttachment))); + } else { + return nullptr; + } + } + + /** + * CObject::ClearThumbnailAttachment - Clears the attachment. The attachment instance is not removed from the package. + */ + void CObject::ClearThumbnailAttachment() + { + CheckError(m_pWrapper->m_WrapperTable.m_Object_ClearThumbnailAttachment(m_pHandle)); + } + + /** + * CObject::GetOutbox - Returns the outbox of a build item + * @return Outbox of this build item + */ + sBox CObject::GetOutbox() + { + sBox resultOutbox; + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetOutbox(m_pHandle, &resultOutbox)); - eLookupError = (*pLookup)("lib3mf_model_queryreader", (void**)&(pWrapperTable->m_Model_QueryReader)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_QueryReader == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultOutbox; + } + + /** + * CObject::GetUUID - Retrieves an object's uuid string (see production extension specification) + * @param[out] bHasUUID - flag whether the build item has a UUID + * @return returns object uuid. + */ + std::string CObject::GetUUID(bool & bHasUUID) + { + Lib3MF_uint32 bytesNeededUUID = 0; + Lib3MF_uint32 bytesWrittenUUID = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetUUID(m_pHandle, &bHasUUID, 0, &bytesNeededUUID, nullptr)); + std::vector bufferUUID(bytesNeededUUID); + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetUUID(m_pHandle, &bHasUUID, bytesNeededUUID, &bytesWrittenUUID, &bufferUUID[0])); - eLookupError = (*pLookup)("lib3mf_model_getresourcebyid", (void**)&(pWrapperTable->m_Model_GetResourceByID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetResourceByID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferUUID[0]); + } + + /** + * CObject::SetUUID - Sets a build object's uuid string (see production extension specification) + * @param[in] sUUID - new object uuid string. + */ + void CObject::SetUUID(const std::string & sUUID) + { + CheckError(m_pWrapper->m_WrapperTable.m_Object_SetUUID(m_pHandle, sUUID.c_str())); + } + + /** + * CObject::GetMetaDataGroup - Returns the metadatagroup of this object + * @return returns an Instance of the metadatagroup of this object + */ + PMetaDataGroup CObject::GetMetaDataGroup() + { + Lib3MFHandle hMetaDataGroup = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetMetaDataGroup(m_pHandle, &hMetaDataGroup)); - eLookupError = (*pLookup)("lib3mf_model_gettexture2dbyid", (void**)&(pWrapperTable->m_Model_GetTexture2DByID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetTexture2DByID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hMetaDataGroup) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaDataGroup))); + } + + /** + * CObject::SetSlicesMeshResolution - set the meshresolution of the mesh object + * @param[in] eMeshResolution - meshresolution of this object + */ + void CObject::SetSlicesMeshResolution(const eSlicesMeshResolution eMeshResolution) + { + CheckError(m_pWrapper->m_WrapperTable.m_Object_SetSlicesMeshResolution(m_pHandle, eMeshResolution)); + } + + /** + * CObject::GetSlicesMeshResolution - get the meshresolution of the mesh object + * @return meshresolution of this object + */ + eSlicesMeshResolution CObject::GetSlicesMeshResolution() + { + eSlicesMeshResolution resultMeshResolution = (eSlicesMeshResolution) 0; + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetSlicesMeshResolution(m_pHandle, &resultMeshResolution)); - eLookupError = (*pLookup)("lib3mf_model_getpropertytypebyid", (void**)&(pWrapperTable->m_Model_GetPropertyTypeByID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetPropertyTypeByID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultMeshResolution; + } + + /** + * CObject::HasSlices - returns whether the Object has a slice stack. If Recursive is true, also checks whether any references object has a slice stack + * @param[in] bRecursive - check also all referenced objects? + * @return does the object have a slice stack? + */ + bool CObject::HasSlices(const bool bRecursive) + { + bool resultHasSlices = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Object_HasSlices(m_pHandle, bRecursive, &resultHasSlices)); - eLookupError = (*pLookup)("lib3mf_model_getbasematerialgroupbyid", (void**)&(pWrapperTable->m_Model_GetBaseMaterialGroupByID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetBaseMaterialGroupByID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultHasSlices; + } + + /** + * CObject::ClearSliceStack - unlinks the attached slicestack from this object. If no slice stack is attached, do noting. + */ + void CObject::ClearSliceStack() + { + CheckError(m_pWrapper->m_WrapperTable.m_Object_ClearSliceStack(m_pHandle)); + } + + /** + * CObject::GetSliceStack - get the Slicestack attached to the object + * @return returns the slicestack instance + */ + PSliceStack CObject::GetSliceStack() + { + Lib3MFHandle hSliceStackInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Object_GetSliceStack(m_pHandle, &hSliceStackInstance)); - eLookupError = (*pLookup)("lib3mf_model_gettexture2dgroupbyid", (void**)&(pWrapperTable->m_Model_GetTexture2DGroupByID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetTexture2DGroupByID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hSliceStackInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSliceStackInstance))); + } + + /** + * CObject::AssignSliceStack - assigns a slicestack to the object + * @param[in] pSliceStackInstance - the new slice stack of this Object + */ + void CObject::AssignSliceStack(classParam pSliceStackInstance) + { + Lib3MFHandle hSliceStackInstance = pSliceStackInstance.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_Object_AssignSliceStack(m_pHandle, hSliceStackInstance)); + } + + /** + * Method definitions for class CMeshObject + */ + + /** + * CMeshObject::GetVertexCount - Returns the vertex count of a mesh object. + * @return filled with the vertex count. + */ + Lib3MF_uint32 CMeshObject::GetVertexCount() + { + Lib3MF_uint32 resultVertexCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetVertexCount(m_pHandle, &resultVertexCount)); - eLookupError = (*pLookup)("lib3mf_model_getcompositematerialsbyid", (void**)&(pWrapperTable->m_Model_GetCompositeMaterialsByID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetCompositeMaterialsByID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultVertexCount; + } + + /** + * CMeshObject::GetTriangleCount - Returns the triangle count of a mesh object. + * @return filled with the triangle count. + */ + Lib3MF_uint32 CMeshObject::GetTriangleCount() + { + Lib3MF_uint32 resultVertexCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetTriangleCount(m_pHandle, &resultVertexCount)); - eLookupError = (*pLookup)("lib3mf_model_getmultipropertygroupbyid", (void**)&(pWrapperTable->m_Model_GetMultiPropertyGroupByID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetMultiPropertyGroupByID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultVertexCount; + } + + /** + * CMeshObject::GetVertex - Returns the vertex count of a mesh object. + * @param[in] nIndex - Index of the vertex (0 to vertexcount - 1) + * @return filled with the vertex coordinates. + */ + sPosition CMeshObject::GetVertex(const Lib3MF_uint32 nIndex) + { + sPosition resultCoordinates; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetVertex(m_pHandle, nIndex, &resultCoordinates)); - eLookupError = (*pLookup)("lib3mf_model_getmeshobjectbyid", (void**)&(pWrapperTable->m_Model_GetMeshObjectByID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetMeshObjectByID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCoordinates; + } + + /** + * CMeshObject::SetVertex - Sets the coordinates of a single vertex of a mesh object + * @param[in] nIndex - Index of the vertex (0 to vertexcount - 1) + * @param[in] Coordinates - contains the vertex coordinates. + */ + void CMeshObject::SetVertex(const Lib3MF_uint32 nIndex, const sPosition & Coordinates) + { + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetVertex(m_pHandle, nIndex, &Coordinates)); + } + + /** + * CMeshObject::AddVertex - Adds a single vertex to a mesh object + * @param[in] Coordinates - contains the vertex coordinates. + * @return Index of the new vertex + */ + Lib3MF_uint32 CMeshObject::AddVertex(const sPosition & Coordinates) + { + Lib3MF_uint32 resultNewIndex = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_AddVertex(m_pHandle, &Coordinates, &resultNewIndex)); - eLookupError = (*pLookup)("lib3mf_model_getcomponentsobjectbyid", (void**)&(pWrapperTable->m_Model_GetComponentsObjectByID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetComponentsObjectByID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultNewIndex; + } + + /** + * CMeshObject::GetVertices - Obtains all vertex positions of a mesh object + * @param[out] VerticesBuffer - contains the vertex coordinates. + */ + void CMeshObject::GetVertices(std::vector & VerticesBuffer) + { + Lib3MF_uint64 elementsNeededVertices = 0; + Lib3MF_uint64 elementsWrittenVertices = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetVertices(m_pHandle, 0, &elementsNeededVertices, nullptr)); + VerticesBuffer.resize((size_t) elementsNeededVertices); + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetVertices(m_pHandle, elementsNeededVertices, &elementsWrittenVertices, VerticesBuffer.data())); + } + + /** + * CMeshObject::GetTriangle - Returns indices of a single triangle of a mesh object. + * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) + * @return filled with the triangle indices. + */ + sTriangle CMeshObject::GetTriangle(const Lib3MF_uint32 nIndex) + { + sTriangle resultIndices; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetTriangle(m_pHandle, nIndex, &resultIndices)); - eLookupError = (*pLookup)("lib3mf_model_getcolorgroupbyid", (void**)&(pWrapperTable->m_Model_GetColorGroupByID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetColorGroupByID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultIndices; + } + + /** + * CMeshObject::SetTriangle - Sets the indices of a single triangle of a mesh object. + * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) + * @param[in] Indices - contains the triangle indices. + */ + void CMeshObject::SetTriangle(const Lib3MF_uint32 nIndex, const sTriangle & Indices) + { + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetTriangle(m_pHandle, nIndex, &Indices)); + } + + /** + * CMeshObject::AddTriangle - Adds a single triangle to a mesh object + * @param[in] Indices - contains the triangle indices. + * @return Index of the new triangle + */ + Lib3MF_uint32 CMeshObject::AddTriangle(const sTriangle & Indices) + { + Lib3MF_uint32 resultNewIndex = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_AddTriangle(m_pHandle, &Indices, &resultNewIndex)); - eLookupError = (*pLookup)("lib3mf_model_getslicestackbyid", (void**)&(pWrapperTable->m_Model_GetSliceStackByID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetSliceStackByID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultNewIndex; + } + + /** + * CMeshObject::GetTriangleIndices - Get all triangles of a mesh object + * @param[out] IndicesBuffer - contains the triangle indices. + */ + void CMeshObject::GetTriangleIndices(std::vector & IndicesBuffer) + { + Lib3MF_uint64 elementsNeededIndices = 0; + Lib3MF_uint64 elementsWrittenIndices = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetTriangleIndices(m_pHandle, 0, &elementsNeededIndices, nullptr)); + IndicesBuffer.resize((size_t) elementsNeededIndices); + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetTriangleIndices(m_pHandle, elementsNeededIndices, &elementsWrittenIndices, IndicesBuffer.data())); + } + + /** + * CMeshObject::SetObjectLevelProperty - Sets the property at the object-level of the mesh object. + * @param[in] nUniqueResourceID - the object-level Property UniqueResourceID. + * @param[in] nPropertyID - the object-level PropertyID. + */ + void CMeshObject::SetObjectLevelProperty(const Lib3MF_uint32 nUniqueResourceID, const Lib3MF_uint32 nPropertyID) + { + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetObjectLevelProperty(m_pHandle, nUniqueResourceID, nPropertyID)); + } + + /** + * CMeshObject::GetObjectLevelProperty - Gets the property at the object-level of the mesh object. + * @param[out] nUniqueResourceID - the object-level Property UniqueResourceID. + * @param[out] nPropertyID - the object-level PropertyID. + * @return Has an object-level property been specified? + */ + bool CMeshObject::GetObjectLevelProperty(Lib3MF_uint32 & nUniqueResourceID, Lib3MF_uint32 & nPropertyID) + { + bool resultHasObjectLevelProperty = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetObjectLevelProperty(m_pHandle, &nUniqueResourceID, &nPropertyID, &resultHasObjectLevelProperty)); - eLookupError = (*pLookup)("lib3mf_model_getbuilduuid", (void**)&(pWrapperTable->m_Model_GetBuildUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetBuildUUID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultHasObjectLevelProperty; + } + + /** + * CMeshObject::SetTriangleProperties - Sets the properties of a single triangle of a mesh object. + * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) + * @param[in] Properties - contains the triangle properties. + */ + void CMeshObject::SetTriangleProperties(const Lib3MF_uint32 nIndex, const sTriangleProperties & Properties) + { + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetTriangleProperties(m_pHandle, nIndex, &Properties)); + } + + /** + * CMeshObject::GetTriangleProperties - Gets the properties of a single triangle of a mesh object. + * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) + * @param[out] Property - returns the triangle properties. + */ + void CMeshObject::GetTriangleProperties(const Lib3MF_uint32 nIndex, sTriangleProperties & Property) + { + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetTriangleProperties(m_pHandle, nIndex, &Property)); + } + + /** + * CMeshObject::SetAllTriangleProperties - Sets the properties of all triangles of a mesh object. Sets the object level property to the first entry of the passed triangle properties, if not yet specified. + * @param[in] PropertiesArrayBuffer - contains the triangle properties array. Must have trianglecount elements. + */ + void CMeshObject::SetAllTriangleProperties(const CInputVector & PropertiesArrayBuffer) + { + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetAllTriangleProperties(m_pHandle, (Lib3MF_uint64)PropertiesArrayBuffer.size(), PropertiesArrayBuffer.data())); + } + + /** + * CMeshObject::GetAllTriangleProperties - Gets the properties of all triangles of a mesh object. + * @param[out] PropertiesArrayBuffer - returns the triangle properties array. Must have trianglecount elements. + */ + void CMeshObject::GetAllTriangleProperties(std::vector & PropertiesArrayBuffer) + { + Lib3MF_uint64 elementsNeededPropertiesArray = 0; + Lib3MF_uint64 elementsWrittenPropertiesArray = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetAllTriangleProperties(m_pHandle, 0, &elementsNeededPropertiesArray, nullptr)); + PropertiesArrayBuffer.resize((size_t) elementsNeededPropertiesArray); + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetAllTriangleProperties(m_pHandle, elementsNeededPropertiesArray, &elementsWrittenPropertiesArray, PropertiesArrayBuffer.data())); + } + + /** + * CMeshObject::ClearAllProperties - Clears all properties of this mesh object (triangle and object-level). + */ + void CMeshObject::ClearAllProperties() + { + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_ClearAllProperties(m_pHandle)); + } + + /** + * CMeshObject::SetGeometry - Set all triangles of a mesh object + * @param[in] VerticesBuffer - contains the positions. + * @param[in] IndicesBuffer - contains the triangle indices. + */ + void CMeshObject::SetGeometry(const CInputVector & VerticesBuffer, const CInputVector & IndicesBuffer) + { + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetGeometry(m_pHandle, (Lib3MF_uint64)VerticesBuffer.size(), VerticesBuffer.data(), (Lib3MF_uint64)IndicesBuffer.size(), IndicesBuffer.data())); + } + + /** + * CMeshObject::IsManifoldAndOriented - Retrieves, if an object describes a topologically oriented and manifold mesh, according to the core spec. + * @return returns, if the object is oriented and manifold. + */ + bool CMeshObject::IsManifoldAndOriented() + { + bool resultIsManifoldAndOriented = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_IsManifoldAndOriented(m_pHandle, &resultIsManifoldAndOriented)); - eLookupError = (*pLookup)("lib3mf_model_setbuilduuid", (void**)&(pWrapperTable->m_Model_SetBuildUUID)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_SetBuildUUID == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultIsManifoldAndOriented; + } + + /** + * CMeshObject::BeamLattice - Retrieves the BeamLattice within this MeshObject. + * @return the BeamLattice within this MeshObject + */ + PBeamLattice CMeshObject::BeamLattice() + { + Lib3MFHandle hTheBeamLattice = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_BeamLattice(m_pHandle, &hTheBeamLattice)); - eLookupError = (*pLookup)("lib3mf_model_getbuilditems", (void**)&(pWrapperTable->m_Model_GetBuildItems)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetBuildItems == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hTheBeamLattice) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheBeamLattice))); + } + + /** + * CMeshObject::GetVolumeData - Retrieves the VolumeData of this MeshObject. + * @return the VolumeData of this MeshObject + */ + PVolumeData CMeshObject::GetVolumeData() + { + Lib3MFHandle hTheVolumeData = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetVolumeData(m_pHandle, &hTheVolumeData)); - eLookupError = (*pLookup)("lib3mf_model_getoutbox", (void**)&(pWrapperTable->m_Model_GetOutbox)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetOutbox == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (hTheVolumeData) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheVolumeData))); + } else { + return nullptr; + } + } + + /** + * CMeshObject::SetVolumeData - Sets the VolumeData of this MeshObject. + * @param[in] pTheVolumeData - the VolumeData of this MeshObject + */ + void CMeshObject::SetVolumeData(classParam pTheVolumeData) + { + Lib3MFHandle hTheVolumeData = pTheVolumeData.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetVolumeData(m_pHandle, hTheVolumeData)); + } + + /** + * Method definitions for class CLevelSet + */ + + /** + * CLevelSet::GetFunction - Returns the function that is used as boundary shape. + * @return the function to use as boundary shape + */ + PFunction CLevelSet::GetFunction() + { + Lib3MFHandle hTheFunction = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_GetFunction(m_pHandle, &hTheFunction)); - eLookupError = (*pLookup)("lib3mf_model_getresources", (void**)&(pWrapperTable->m_Model_GetResources)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetResources == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (hTheFunction) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheFunction))); + } else { + return nullptr; + } + } + + /** + * CLevelSet::SetFunction - Sets the function to use as boundary shape. + * @param[in] pTheFunction - the function to use as boundary shape + */ + void CLevelSet::SetFunction(classParam pTheFunction) + { + Lib3MFHandle hTheFunction = pTheFunction.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_SetFunction(m_pHandle, hTheFunction)); + } + + /** + * CLevelSet::GetTransform - Returns the transformation matrix into the coordinate system of the referenced Function. + * @return the transformation matrix + */ + sTransform CLevelSet::GetTransform() + { + sTransform resultTransform; + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_GetTransform(m_pHandle, &resultTransform)); - eLookupError = (*pLookup)("lib3mf_model_getobjects", (void**)&(pWrapperTable->m_Model_GetObjects)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetObjects == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultTransform; + } + + /** + * CLevelSet::SetTransform - Sets the transformation matrix into the coordinate system of the referenced Function. + * @param[in] Transform - new transformation matrix + */ + void CLevelSet::SetTransform(const sTransform & Transform) + { + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_SetTransform(m_pHandle, &Transform)); + } + + /** + * CLevelSet::GetChannelName - Returns the name of the function output channel to use. + * @return the name of the function output channel + */ + std::string CLevelSet::GetChannelName() + { + Lib3MF_uint32 bytesNeededChannelName = 0; + Lib3MF_uint32 bytesWrittenChannelName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_GetChannelName(m_pHandle, 0, &bytesNeededChannelName, nullptr)); + std::vector bufferChannelName(bytesNeededChannelName); + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_GetChannelName(m_pHandle, bytesNeededChannelName, &bytesWrittenChannelName, &bufferChannelName[0])); - eLookupError = (*pLookup)("lib3mf_model_getmeshobjects", (void**)&(pWrapperTable->m_Model_GetMeshObjects)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetMeshObjects == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferChannelName[0]); + } + + /** + * CLevelSet::SetChannelName - Sets the name of the function output channel to use. + * @param[in] sChannelName - new name of the function output channel + */ + void CLevelSet::SetChannelName(const std::string & sChannelName) + { + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_SetChannelName(m_pHandle, sChannelName.c_str())); + } + + /** + * CLevelSet::SetMinFeatureSize - Sets the minimal feature size as a hint for the function evaluator + * @param[in] dMinFeatureSize - minimal feature size + */ + void CLevelSet::SetMinFeatureSize(const Lib3MF_double dMinFeatureSize) + { + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_SetMinFeatureSize(m_pHandle, dMinFeatureSize)); + } + + /** + * CLevelSet::GetMinFeatureSize - Returns the minimal feature size as a hint for the function evaluator + * @return minimal feature size + */ + Lib3MF_double CLevelSet::GetMinFeatureSize() + { + Lib3MF_double resultMinFeatureSize = 0; + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_GetMinFeatureSize(m_pHandle, &resultMinFeatureSize)); - eLookupError = (*pLookup)("lib3mf_model_getcomponentsobjects", (void**)&(pWrapperTable->m_Model_GetComponentsObjects)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetComponentsObjects == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultMinFeatureSize; + } + + /** + * CLevelSet::SetFallBackValue - Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @param[in] dFallBackValue - fallback value + */ + void CLevelSet::SetFallBackValue(const Lib3MF_double dFallBackValue) + { + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_SetFallBackValue(m_pHandle, dFallBackValue)); + } + + /** + * CLevelSet::GetFallBackValue - Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @return fallback value + */ + Lib3MF_double CLevelSet::GetFallBackValue() + { + Lib3MF_double resultFallBackValue = 0; + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_GetFallBackValue(m_pHandle, &resultFallBackValue)); - eLookupError = (*pLookup)("lib3mf_model_gettexture2ds", (void**)&(pWrapperTable->m_Model_GetTexture2Ds)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetTexture2Ds == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultFallBackValue; + } + + /** + * CLevelSet::SetMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + * @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + */ + void CLevelSet::SetMeshBBoxOnly(const bool bMeshBBoxOnly) + { + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_SetMeshBBoxOnly(m_pHandle, bMeshBBoxOnly)); + } + + /** + * CLevelSet::GetMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + * @return If set only the bounding box of the mesh is intersected with the boundary + */ + bool CLevelSet::GetMeshBBoxOnly() + { + bool resultMeshBBoxOnly = 0; + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_GetMeshBBoxOnly(m_pHandle, &resultMeshBBoxOnly)); - eLookupError = (*pLookup)("lib3mf_model_getbasematerialgroups", (void**)&(pWrapperTable->m_Model_GetBaseMaterialGroups)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetBaseMaterialGroups == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultMeshBBoxOnly; + } + + /** + * CLevelSet::SetMesh - Sets the mesh to use as evaluation domain + * @param[in] pTheMesh - The mesh + */ + void CLevelSet::SetMesh(classParam pTheMesh) + { + Lib3MFHandle hTheMesh = pTheMesh.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_SetMesh(m_pHandle, hTheMesh)); + } + + /** + * CLevelSet::GetMesh - Returns the mesh that is used as evaluation domain + * @return The mesh + */ + PMeshObject CLevelSet::GetMesh() + { + Lib3MFHandle hTheMesh = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_GetMesh(m_pHandle, &hTheMesh)); - eLookupError = (*pLookup)("lib3mf_model_getcolorgroups", (void**)&(pWrapperTable->m_Model_GetColorGroups)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetColorGroups == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (hTheMesh) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheMesh))); + } else { + return nullptr; + } + } + + /** + * CLevelSet::GetVolumeData - Retrieves the VolumeData this Object. + * @return the VolumeData of this Object + */ + PVolumeData CLevelSet::GetVolumeData() + { + Lib3MFHandle hTheVolumeData = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_GetVolumeData(m_pHandle, &hTheVolumeData)); - eLookupError = (*pLookup)("lib3mf_model_gettexture2dgroups", (void**)&(pWrapperTable->m_Model_GetTexture2DGroups)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetTexture2DGroups == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (hTheVolumeData) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheVolumeData))); + } else { + return nullptr; + } + } + + /** + * CLevelSet::SetVolumeData - Sets the VolumeData of this LevelSet. + * @param[in] pTheVolumeData - the VolumeData of this MeshObject + */ + void CLevelSet::SetVolumeData(classParam pTheVolumeData) + { + Lib3MFHandle hTheVolumeData = pTheVolumeData.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_LevelSet_SetVolumeData(m_pHandle, hTheVolumeData)); + } + + /** + * Method definitions for class CBeamLattice + */ + + /** + * CBeamLattice::GetMinLength - Returns the minimal length of beams for the beamlattice. + * @return minimal length of beams for the beamlattice + */ + Lib3MF_double CBeamLattice::GetMinLength() + { + Lib3MF_double resultMinLength = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetMinLength(m_pHandle, &resultMinLength)); - eLookupError = (*pLookup)("lib3mf_model_getcompositematerials", (void**)&(pWrapperTable->m_Model_GetCompositeMaterials)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetCompositeMaterials == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultMinLength; + } + + /** + * CBeamLattice::SetMinLength - Sets the minimal length of beams for the beamlattice. + * @param[in] dMinLength - minimal length of beams for the beamlattice + */ + void CBeamLattice::SetMinLength(const Lib3MF_double dMinLength) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetMinLength(m_pHandle, dMinLength)); + } + + /** + * CBeamLattice::GetClipping - Returns the clipping mode and the clipping-mesh for the beamlattice of this mesh. + * @param[out] eClipMode - contains the clip mode of this mesh + * @param[out] nUniqueResourceID - filled with the UniqueResourceID of the clipping mesh-object or an undefined value if pClipMode is MODELBEAMLATTICECLIPMODE_NONE + */ + void CBeamLattice::GetClipping(eBeamLatticeClipMode & eClipMode, Lib3MF_uint32 & nUniqueResourceID) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetClipping(m_pHandle, &eClipMode, &nUniqueResourceID)); + } + + /** + * CBeamLattice::SetClipping - Sets the clipping mode and the clipping-mesh for the beamlattice of this mesh. + * @param[in] eClipMode - contains the clip mode of this mesh + * @param[in] nUniqueResourceID - the UniqueResourceID of the clipping mesh-object. This mesh-object has to be defined before setting the Clipping. + */ + void CBeamLattice::SetClipping(const eBeamLatticeClipMode eClipMode, const Lib3MF_uint32 nUniqueResourceID) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetClipping(m_pHandle, eClipMode, nUniqueResourceID)); + } + + /** + * CBeamLattice::GetRepresentation - Returns the representation-mesh for the beamlattice of this mesh. + * @return flag whether the beamlattice has a representation mesh. + * @param[out] nUniqueResourceID - filled with the UniqueResourceID of the clipping mesh-object. + */ + bool CBeamLattice::GetRepresentation(Lib3MF_uint32 & nUniqueResourceID) + { + bool resultHasRepresentation = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetRepresentation(m_pHandle, &resultHasRepresentation, &nUniqueResourceID)); - eLookupError = (*pLookup)("lib3mf_model_getmultipropertygroups", (void**)&(pWrapperTable->m_Model_GetMultiPropertyGroups)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetMultiPropertyGroups == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultHasRepresentation; + } + + /** + * CBeamLattice::SetRepresentation - Sets the representation-mesh for the beamlattice of this mesh. + * @param[in] nUniqueResourceID - the UniqueResourceID of the representation mesh-object. This mesh-object has to be defined before setting the representation. + */ + void CBeamLattice::SetRepresentation(const Lib3MF_uint32 nUniqueResourceID) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetRepresentation(m_pHandle, nUniqueResourceID)); + } + + /** + * CBeamLattice::GetBallOptions - Returns the ball mode and the default ball radius for the beamlattice of this mesh. + * @param[out] eBallMode - contains the ball mode of this mesh + * @param[out] dBallRadius - default ball radius of balls for the beamlattice + */ + void CBeamLattice::GetBallOptions(eBeamLatticeBallMode & eBallMode, Lib3MF_double & dBallRadius) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBallOptions(m_pHandle, &eBallMode, &dBallRadius)); + } + + /** + * CBeamLattice::SetBallOptions - Sets the ball mode and thedefault ball radius for the beamlattice. + * @param[in] eBallMode - contains the ball mode of this mesh + * @param[in] dBallRadius - default ball radius of balls for the beamlattice + */ + void CBeamLattice::SetBallOptions(const eBeamLatticeBallMode eBallMode, const Lib3MF_double dBallRadius) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetBallOptions(m_pHandle, eBallMode, dBallRadius)); + } + + /** + * CBeamLattice::GetBeamCount - Returns the beam count of a mesh object. + * @return filled with the beam count. + */ + Lib3MF_uint32 CBeamLattice::GetBeamCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeamCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_model_getslicestacks", (void**)&(pWrapperTable->m_Model_GetSliceStacks)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetSliceStacks == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CBeamLattice::GetBeam - Returns indices, radii and capmodes of a single beam of a mesh object. + * @param[in] nIndex - Index of the beam (0 to beamcount - 1). + * @return filled with the beam indices, radii and capmodes. + */ + sBeam CBeamLattice::GetBeam(const Lib3MF_uint32 nIndex) + { + sBeam resultBeamInfo; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeam(m_pHandle, nIndex, &resultBeamInfo)); - eLookupError = (*pLookup)("lib3mf_model_mergetomodel", (void**)&(pWrapperTable->m_Model_MergeToModel)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_MergeToModel == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultBeamInfo; + } + + /** + * CBeamLattice::AddBeam - Adds a single beam to a mesh object. + * @param[in] BeamInfo - contains the node indices, radii and capmodes. + * @return filled with the new Index of the beam. + */ + Lib3MF_uint32 CBeamLattice::AddBeam(const sBeam & BeamInfo) + { + Lib3MF_uint32 resultIndex = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_AddBeam(m_pHandle, &BeamInfo, &resultIndex)); - eLookupError = (*pLookup)("lib3mf_model_addmeshobject", (void**)&(pWrapperTable->m_Model_AddMeshObject)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddMeshObject == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultIndex; + } + + /** + * CBeamLattice::SetBeam - Sets the indices, radii and capmodes of a single beam of a mesh object. + * @param[in] nIndex - Index of the beam (0 to beamcount - 1). + * @param[in] BeamInfo - filled with the beam indices, radii and capmodes. + */ + void CBeamLattice::SetBeam(const Lib3MF_uint32 nIndex, const sBeam & BeamInfo) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetBeam(m_pHandle, nIndex, &BeamInfo)); + } + + /** + * CBeamLattice::SetBeams - Sets all beam indices, radii and capmodes of a mesh object. + * @param[in] BeamInfoBuffer - contains information of a number of beams + */ + void CBeamLattice::SetBeams(const CInputVector & BeamInfoBuffer) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetBeams(m_pHandle, (Lib3MF_uint64)BeamInfoBuffer.size(), BeamInfoBuffer.data())); + } + + /** + * CBeamLattice::GetBeams - obtains all beam indices, radii and capmodes of a mesh object. + * @param[out] BeamInfoBuffer - contains information of all beams + */ + void CBeamLattice::GetBeams(std::vector & BeamInfoBuffer) + { + Lib3MF_uint64 elementsNeededBeamInfo = 0; + Lib3MF_uint64 elementsWrittenBeamInfo = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeams(m_pHandle, 0, &elementsNeededBeamInfo, nullptr)); + BeamInfoBuffer.resize((size_t) elementsNeededBeamInfo); + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeams(m_pHandle, elementsNeededBeamInfo, &elementsWrittenBeamInfo, BeamInfoBuffer.data())); + } + + /** + * CBeamLattice::GetBallCount - Returns the ball count of a mesh object. + * @return filled with the ball count. + */ + Lib3MF_uint32 CBeamLattice::GetBallCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBallCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_model_addcomponentsobject", (void**)&(pWrapperTable->m_Model_AddComponentsObject)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddComponentsObject == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CBeamLattice::GetBall - Returns index and radius of a single ball of a mesh object. + * @param[in] nIndex - Index of the ball (0 to ballcount - 1). + * @return filled with the ball node index and radius. + */ + sBall CBeamLattice::GetBall(const Lib3MF_uint32 nIndex) + { + sBall resultBallInfo; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBall(m_pHandle, nIndex, &resultBallInfo)); - eLookupError = (*pLookup)("lib3mf_model_addslicestack", (void**)&(pWrapperTable->m_Model_AddSliceStack)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddSliceStack == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultBallInfo; + } + + /** + * CBeamLattice::AddBall - Adds a single ball to a mesh object. + * @param[in] BallInfo - contains the node index and radius. + * @return filled with the new Index of the ball. + */ + Lib3MF_uint32 CBeamLattice::AddBall(const sBall & BallInfo) + { + Lib3MF_uint32 resultIndex = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_AddBall(m_pHandle, &BallInfo, &resultIndex)); - eLookupError = (*pLookup)("lib3mf_model_addtexture2dfromattachment", (void**)&(pWrapperTable->m_Model_AddTexture2DFromAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddTexture2DFromAttachment == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultIndex; + } + + /** + * CBeamLattice::SetBall - Sets the index and radius of a single ball of a mesh object. + * @param[in] nIndex - Index of the ball (0 to ballcount - 1). + * @param[in] BallInfo - filled with the ball node index and radius. + */ + void CBeamLattice::SetBall(const Lib3MF_uint32 nIndex, const sBall & BallInfo) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetBall(m_pHandle, nIndex, &BallInfo)); + } + + /** + * CBeamLattice::SetBalls - Sets all ball indices and radii of a mesh object. + * @param[in] BallInfoBuffer - contains information of a number of balls + */ + void CBeamLattice::SetBalls(const CInputVector & BallInfoBuffer) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetBalls(m_pHandle, (Lib3MF_uint64)BallInfoBuffer.size(), BallInfoBuffer.data())); + } + + /** + * CBeamLattice::GetBalls - obtains all ball indices and radii of a mesh object. + * @param[out] BallInfoBuffer - contains information of all balls + */ + void CBeamLattice::GetBalls(std::vector & BallInfoBuffer) + { + Lib3MF_uint64 elementsNeededBallInfo = 0; + Lib3MF_uint64 elementsWrittenBallInfo = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBalls(m_pHandle, 0, &elementsNeededBallInfo, nullptr)); + BallInfoBuffer.resize((size_t) elementsNeededBallInfo); + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBalls(m_pHandle, elementsNeededBallInfo, &elementsWrittenBallInfo, BallInfoBuffer.data())); + } + + /** + * CBeamLattice::GetBeamSetCount - Returns the number of beamsets of a mesh object. + * @return filled with the beamset count. + */ + Lib3MF_uint32 CBeamLattice::GetBeamSetCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeamSetCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_model_addbasematerialgroup", (void**)&(pWrapperTable->m_Model_AddBaseMaterialGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddBaseMaterialGroup == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CBeamLattice::AddBeamSet - Adds an empty beamset to a mesh object + * @return the new beamset + */ + PBeamSet CBeamLattice::AddBeamSet() + { + Lib3MFHandle hBeamSet = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_AddBeamSet(m_pHandle, &hBeamSet)); + + if (!hBeamSet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBeamSet))); + } + + /** + * CBeamLattice::GetBeamSet - Returns a beamset of a mesh object + * @param[in] nIndex - index of the requested beamset (0 ... beamsetcount-1). + * @return the requested beamset + */ + PBeamSet CBeamLattice::GetBeamSet(const Lib3MF_uint32 nIndex) + { + Lib3MFHandle hBeamSet = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeamSet(m_pHandle, nIndex, &hBeamSet)); - eLookupError = (*pLookup)("lib3mf_model_addcolorgroup", (void**)&(pWrapperTable->m_Model_AddColorGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddColorGroup == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hBeamSet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBeamSet))); + } + + /** + * Method definitions for class CFunctionReference + */ + + /** + * CFunctionReference::GetFunctionResourceID - Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. + * @return returns the UniqueResourceID. + */ + Lib3MF_uint32 CFunctionReference::GetFunctionResourceID() + { + Lib3MF_uint32 resultUniqueResourceID = 0; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionReference_GetFunctionResourceID(m_pHandle, &resultUniqueResourceID)); - eLookupError = (*pLookup)("lib3mf_model_addtexture2dgroup", (void**)&(pWrapperTable->m_Model_AddTexture2DGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddTexture2DGroup == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultUniqueResourceID; + } + + /** + * CFunctionReference::SetFunctionResourceID - Sets the UniqueResourceID to refer to. + * @param[in] nUniqueResourceID - UniqueResourceID of the function + */ + void CFunctionReference::SetFunctionResourceID(const Lib3MF_uint32 nUniqueResourceID) + { + CheckError(m_pWrapper->m_WrapperTable.m_FunctionReference_SetFunctionResourceID(m_pHandle, nUniqueResourceID)); + } + + /** + * CFunctionReference::GetTransform - Returns the transformation matrix into the coordinate system of the referenced Function. + * @return the transformation matrix + */ + sTransform CFunctionReference::GetTransform() + { + sTransform resultTransform; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionReference_GetTransform(m_pHandle, &resultTransform)); - eLookupError = (*pLookup)("lib3mf_model_addcompositematerials", (void**)&(pWrapperTable->m_Model_AddCompositeMaterials)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddCompositeMaterials == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultTransform; + } + + /** + * CFunctionReference::SetTransform - Sets the transformation matrix into the coordinate system of the referenced Function. + * @param[in] Transform - new transformation matrix + */ + void CFunctionReference::SetTransform(const sTransform & Transform) + { + CheckError(m_pWrapper->m_WrapperTable.m_FunctionReference_SetTransform(m_pHandle, &Transform)); + } + + /** + * CFunctionReference::GetChannelName - Returns the name of the function output channel to use. + * @return the name of the function output channel + */ + std::string CFunctionReference::GetChannelName() + { + Lib3MF_uint32 bytesNeededChannelName = 0; + Lib3MF_uint32 bytesWrittenChannelName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionReference_GetChannelName(m_pHandle, 0, &bytesNeededChannelName, nullptr)); + std::vector bufferChannelName(bytesNeededChannelName); + CheckError(m_pWrapper->m_WrapperTable.m_FunctionReference_GetChannelName(m_pHandle, bytesNeededChannelName, &bytesWrittenChannelName, &bufferChannelName[0])); - eLookupError = (*pLookup)("lib3mf_model_addmultipropertygroup", (void**)&(pWrapperTable->m_Model_AddMultiPropertyGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddMultiPropertyGroup == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferChannelName[0]); + } + + /** + * CFunctionReference::SetChannelName - Sets the name of the function output channel to use. + * @param[in] sChannelName - new name of the function output channel + */ + void CFunctionReference::SetChannelName(const std::string & sChannelName) + { + CheckError(m_pWrapper->m_WrapperTable.m_FunctionReference_SetChannelName(m_pHandle, sChannelName.c_str())); + } + + /** + * CFunctionReference::SetMinFeatureSize - Sets the minimal feature size as a hint for the function evaluator + * @param[in] dMinFeatureSize - minimal feature size + */ + void CFunctionReference::SetMinFeatureSize(const Lib3MF_double dMinFeatureSize) + { + CheckError(m_pWrapper->m_WrapperTable.m_FunctionReference_SetMinFeatureSize(m_pHandle, dMinFeatureSize)); + } + + /** + * CFunctionReference::GetMinFeatureSize - Returns the minimal feature size as a hint for the function evaluator + * @return minimal feature size + */ + Lib3MF_double CFunctionReference::GetMinFeatureSize() + { + Lib3MF_double resultMinFeatureSize = 0; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionReference_GetMinFeatureSize(m_pHandle, &resultMinFeatureSize)); - eLookupError = (*pLookup)("lib3mf_model_addbuilditem", (void**)&(pWrapperTable->m_Model_AddBuildItem)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddBuildItem == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultMinFeatureSize; + } + + /** + * CFunctionReference::SetFallBackValue - Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @param[in] dFallBackValue - fallback value + */ + void CFunctionReference::SetFallBackValue(const Lib3MF_double dFallBackValue) + { + CheckError(m_pWrapper->m_WrapperTable.m_FunctionReference_SetFallBackValue(m_pHandle, dFallBackValue)); + } + + /** + * CFunctionReference::GetFallBackValue - Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @return fallback value + */ + Lib3MF_double CFunctionReference::GetFallBackValue() + { + Lib3MF_double resultFallBackValue = 0; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionReference_GetFallBackValue(m_pHandle, &resultFallBackValue)); - eLookupError = (*pLookup)("lib3mf_model_removebuilditem", (void**)&(pWrapperTable->m_Model_RemoveBuildItem)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_RemoveBuildItem == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultFallBackValue; + } + + /** + * Method definitions for class CVolumeDataColor + */ + + /** + * Method definitions for class CMaterialMapping + */ + + /** + * Method definitions for class CVolumeDataComposite + */ + + /** + * CVolumeDataComposite::GetBaseMaterialGroup - Returns the BaseMaterialGroup used within this volume data item + * @return The BaseMaterialGroup instance of this VolumeDataComposite element + */ + PBaseMaterialGroup CVolumeDataComposite::GetBaseMaterialGroup() + { + Lib3MFHandle hBaseMaterialGroupInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeDataComposite_GetBaseMaterialGroup(m_pHandle, &hBaseMaterialGroupInstance)); - eLookupError = (*pLookup)("lib3mf_model_getmetadatagroup", (void**)&(pWrapperTable->m_Model_GetMetaDataGroup)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetMetaDataGroup == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hBaseMaterialGroupInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBaseMaterialGroupInstance))); + } + + /** + * CVolumeDataComposite::SetBaseMaterialGroup - Sets the BaseMaterialGroup to use within this volume data item. + * @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element + */ + void CVolumeDataComposite::SetBaseMaterialGroup(classParam pBaseMaterialGroupInstance) + { + Lib3MFHandle hBaseMaterialGroupInstance = pBaseMaterialGroupInstance.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_VolumeDataComposite_SetBaseMaterialGroup(m_pHandle, hBaseMaterialGroupInstance)); + } + + /** + * CVolumeDataComposite::GetMaterialMappingCount - Returns the number of material mappings of this VolumeDataComposite element + * @return the number of material mappings. + */ + Lib3MF_uint32 CVolumeDataComposite::GetMaterialMappingCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeDataComposite_GetMaterialMappingCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_model_addattachment", (void**)&(pWrapperTable->m_Model_AddAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddAttachment == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CVolumeDataComposite::GetMaterialMapping - Returns MaterialMappting with given index + * @param[in] nIndex - Index of the MaterialMapping in question. + * @return MaterialMapping used in this element + */ + PMaterialMapping CVolumeDataComposite::GetMaterialMapping(const Lib3MF_uint32 nIndex) + { + Lib3MFHandle hTheMaterialMapping = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeDataComposite_GetMaterialMapping(m_pHandle, nIndex, &hTheMaterialMapping)); - eLookupError = (*pLookup)("lib3mf_model_removeattachment", (void**)&(pWrapperTable->m_Model_RemoveAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_RemoveAttachment == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hTheMaterialMapping) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheMaterialMapping))); + } + + /** + * CVolumeDataComposite::AddMaterialMapping - Adds a the MaterialMapping + * @param[in] Transform - new transformation matrix + * @return The new MaterialMapping + */ + PMaterialMapping CVolumeDataComposite::AddMaterialMapping(const sTransform & Transform) + { + Lib3MFHandle hTheMaterialMapping = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeDataComposite_AddMaterialMapping(m_pHandle, &Transform, &hTheMaterialMapping)); - eLookupError = (*pLookup)("lib3mf_model_getattachment", (void**)&(pWrapperTable->m_Model_GetAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetAttachment == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hTheMaterialMapping) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheMaterialMapping))); + } + + /** + * CVolumeDataComposite::RemoveMaterialMapping - Removes the MaterialMapping with given index + * @param[in] nIndex - The index of the MaterialMapping to be removed. + */ + void CVolumeDataComposite::RemoveMaterialMapping(const Lib3MF_uint32 nIndex) + { + CheckError(m_pWrapper->m_WrapperTable.m_VolumeDataComposite_RemoveMaterialMapping(m_pHandle, nIndex)); + } + + /** + * Method definitions for class CVolumeDataProperty + */ + + /** + * CVolumeDataProperty::GetName - Gets the qualified name of this property. + * @return The qualified name of this property. + */ + std::string CVolumeDataProperty::GetName() + { + Lib3MF_uint32 bytesNeededPropertyName = 0; + Lib3MF_uint32 bytesWrittenPropertyName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeDataProperty_GetName(m_pHandle, 0, &bytesNeededPropertyName, nullptr)); + std::vector bufferPropertyName(bytesNeededPropertyName); + CheckError(m_pWrapper->m_WrapperTable.m_VolumeDataProperty_GetName(m_pHandle, bytesNeededPropertyName, &bytesWrittenPropertyName, &bufferPropertyName[0])); - eLookupError = (*pLookup)("lib3mf_model_findattachment", (void**)&(pWrapperTable->m_Model_FindAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_FindAttachment == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferPropertyName[0]); + } + + /** + * CVolumeDataProperty::SetIsRequired - Sets whether this property is required to process this 3MF document instance. + * @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. + */ + void CVolumeDataProperty::SetIsRequired(const bool bIsRequired) + { + CheckError(m_pWrapper->m_WrapperTable.m_VolumeDataProperty_SetIsRequired(m_pHandle, bIsRequired)); + } + + /** + * CVolumeDataProperty::IsRequired - Returns whether this property is required to process this 3MF document instance. + * @return Is this property required to process this 3MF document instance? + */ + bool CVolumeDataProperty::IsRequired() + { + bool resultIsRequired = 0; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeDataProperty_IsRequired(m_pHandle, &resultIsRequired)); - eLookupError = (*pLookup)("lib3mf_model_getattachmentcount", (void**)&(pWrapperTable->m_Model_GetAttachmentCount)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetAttachmentCount == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultIsRequired; + } + + /** + * Method definitions for class CVolumeData + */ + + /** + * CVolumeData::GetComposite - Returns the VolumeDataComposite of this VolumeData instance + * @return filled with the VolumeDataComposite of this VolumeData instance. + */ + PVolumeDataComposite CVolumeData::GetComposite() + { + Lib3MFHandle hTheCompositeData = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeData_GetComposite(m_pHandle, &hTheCompositeData)); - eLookupError = (*pLookup)("lib3mf_model_haspackagethumbnailattachment", (void**)&(pWrapperTable->m_Model_HasPackageThumbnailAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_HasPackageThumbnailAttachment == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (hTheCompositeData) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheCompositeData))); + } else { + return nullptr; + } + } + + /** + * CVolumeData::CreateNewComposite - Creates a new VolumeDataComposite for this VolumeData instance + * @return The new VolumeDataComposite of this VolumeData instance. + */ + PVolumeDataComposite CVolumeData::CreateNewComposite() + { + Lib3MFHandle hTheCompositeData = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeData_CreateNewComposite(m_pHandle, &hTheCompositeData)); - eLookupError = (*pLookup)("lib3mf_model_createpackagethumbnailattachment", (void**)&(pWrapperTable->m_Model_CreatePackageThumbnailAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_CreatePackageThumbnailAttachment == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hTheCompositeData) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheCompositeData))); + } + + /** + * CVolumeData::RemoveComposite - Removes the VolumeDataComposite of this VolumeData instance + */ + void CVolumeData::RemoveComposite() + { + CheckError(m_pWrapper->m_WrapperTable.m_VolumeData_RemoveComposite(m_pHandle)); + } + + /** + * CVolumeData::GetColor - Returns the VolumeDataColor of this VolumeData instance + * @return filled with the VolumeDataColor of this VolumeData instance. + */ + PVolumeDataColor CVolumeData::GetColor() + { + Lib3MFHandle hTheColorData = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeData_GetColor(m_pHandle, &hTheColorData)); - eLookupError = (*pLookup)("lib3mf_model_getpackagethumbnailattachment", (void**)&(pWrapperTable->m_Model_GetPackageThumbnailAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetPackageThumbnailAttachment == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (hTheColorData) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheColorData))); + } else { + return nullptr; + } + } + + /** + * CVolumeData::CreateNewColor - Creates a new VolumeDataColor for this VolumeData instance + * @param[in] pTheFunction - Function used in this element + * @return The new VolumeDataColor of this VolumeData instance. + */ + PVolumeDataColor CVolumeData::CreateNewColor(classParam pTheFunction) + { + Lib3MFHandle hTheFunction = pTheFunction.GetHandle(); + Lib3MFHandle hTheColorData = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeData_CreateNewColor(m_pHandle, hTheFunction, &hTheColorData)); - eLookupError = (*pLookup)("lib3mf_model_removepackagethumbnailattachment", (void**)&(pWrapperTable->m_Model_RemovePackageThumbnailAttachment)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_RemovePackageThumbnailAttachment == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hTheColorData) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheColorData))); + } + + /** + * CVolumeData::RemoveColor - Removes the VolumeDataColor of this VolumeData instance + */ + void CVolumeData::RemoveColor() + { + CheckError(m_pWrapper->m_WrapperTable.m_VolumeData_RemoveColor(m_pHandle)); + } + + /** + * CVolumeData::GetPropertyCount - Returns the number of VolumeDataProperty + * @return the number of VolumeDataProperty-elements within this VolumdeData + */ + Lib3MF_uint32 CVolumeData::GetPropertyCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeData_GetPropertyCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_model_addcustomcontenttype", (void**)&(pWrapperTable->m_Model_AddCustomContentType)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_AddCustomContentType == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CVolumeData::GetProperty - Returns the VolumeDataProperty at a given Index + * @param[in] nIndex - the index of the VolumeDataProperty to be returned. + * @return the VolumeDataProperty at the given index. + */ + PVolumeDataProperty CVolumeData::GetProperty(const Lib3MF_uint32 nIndex) + { + Lib3MFHandle hTheVolumeDataProperty = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeData_GetProperty(m_pHandle, nIndex, &hTheVolumeDataProperty)); - eLookupError = (*pLookup)("lib3mf_model_removecustomcontenttype", (void**)&(pWrapperTable->m_Model_RemoveCustomContentType)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_RemoveCustomContentType == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hTheVolumeDataProperty) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheVolumeDataProperty))); + } + + /** + * CVolumeData::AddPropertyFromFunction - Adds a new VolumeDataProperty from a Function + * @param[in] sName - the qualified name (namespace+name) of the Property + * @param[in] pTheFunction - Function used in this element + * @return the newly created VolumeDataProperty. + */ + PVolumeDataProperty CVolumeData::AddPropertyFromFunction(const std::string & sName, classParam pTheFunction) + { + Lib3MFHandle hTheFunction = pTheFunction.GetHandle(); + Lib3MFHandle hTheVolumeDataProperty = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_VolumeData_AddPropertyFromFunction(m_pHandle, sName.c_str(), hTheFunction, &hTheVolumeDataProperty)); - eLookupError = (*pLookup)("lib3mf_model_setrandomnumbercallback", (void**)&(pWrapperTable->m_Model_SetRandomNumberCallback)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_SetRandomNumberCallback == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hTheVolumeDataProperty) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheVolumeDataProperty))); + } + + /** + * CVolumeData::RemoveProperty - Removes the VolumeDataProperty with a given index + * @param[in] nIndex - the index of the VolumeDataProperty to be removed. + */ + void CVolumeData::RemoveProperty(const Lib3MF_uint32 nIndex) + { + CheckError(m_pWrapper->m_WrapperTable.m_VolumeData_RemoveProperty(m_pHandle, nIndex)); + } + + /** + * Method definitions for class CComponent + */ + + /** + * CComponent::GetObjectResource - Returns the Resource Instance of the component. + * @return filled with the Resource Instance. + */ + PObject CComponent::GetObjectResource() + { + Lib3MFHandle hObjectResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Component_GetObjectResource(m_pHandle, &hObjectResource)); - eLookupError = (*pLookup)("lib3mf_model_getkeystore", (void**)&(pWrapperTable->m_Model_GetKeyStore)); - if ( (eLookupError != 0) || (pWrapperTable->m_Model_GetKeyStore == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hObjectResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hObjectResource))); + } + + /** + * CComponent::GetObjectResourceID - Returns the UniqueResourceID of the component. + * @return returns the UniqueResourceID. + */ + Lib3MF_uint32 CComponent::GetObjectResourceID() + { + Lib3MF_uint32 resultUniqueResourceID = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Component_GetObjectResourceID(m_pHandle, &resultUniqueResourceID)); - eLookupError = (*pLookup)("lib3mf_getlibraryversion", (void**)&(pWrapperTable->m_GetLibraryVersion)); - if ( (eLookupError != 0) || (pWrapperTable->m_GetLibraryVersion == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultUniqueResourceID; + } + + /** + * CComponent::GetUUID - returns, whether a component has a UUID and, if true, the component's UUID + * @param[out] bHasUUID - flag whether the component has a UUID + * @return the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + std::string CComponent::GetUUID(bool & bHasUUID) + { + Lib3MF_uint32 bytesNeededUUID = 0; + Lib3MF_uint32 bytesWrittenUUID = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Component_GetUUID(m_pHandle, &bHasUUID, 0, &bytesNeededUUID, nullptr)); + std::vector bufferUUID(bytesNeededUUID); + CheckError(m_pWrapper->m_WrapperTable.m_Component_GetUUID(m_pHandle, &bHasUUID, bytesNeededUUID, &bytesWrittenUUID, &bufferUUID[0])); - eLookupError = (*pLookup)("lib3mf_getprereleaseinformation", (void**)&(pWrapperTable->m_GetPrereleaseInformation)); - if ( (eLookupError != 0) || (pWrapperTable->m_GetPrereleaseInformation == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferUUID[0]); + } + + /** + * CComponent::SetUUID - sets the component's UUID + * @param[in] sUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + void CComponent::SetUUID(const std::string & sUUID) + { + CheckError(m_pWrapper->m_WrapperTable.m_Component_SetUUID(m_pHandle, sUUID.c_str())); + } + + /** + * CComponent::HasTransform - Returns, if the component has a different transformation than the identity matrix + * @return if true is returned, the transformation is not equal than the identity + */ + bool CComponent::HasTransform() + { + bool resultHasTransform = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Component_HasTransform(m_pHandle, &resultHasTransform)); - eLookupError = (*pLookup)("lib3mf_getbuildinformation", (void**)&(pWrapperTable->m_GetBuildInformation)); - if ( (eLookupError != 0) || (pWrapperTable->m_GetBuildInformation == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultHasTransform; + } + + /** + * CComponent::GetTransform - Returns the transformation matrix of the component. + * @return filled with the component transformation matrix + */ + sTransform CComponent::GetTransform() + { + sTransform resultTransform; + CheckError(m_pWrapper->m_WrapperTable.m_Component_GetTransform(m_pHandle, &resultTransform)); - eLookupError = (*pLookup)("lib3mf_getspecificationversion", (void**)&(pWrapperTable->m_GetSpecificationVersion)); - if ( (eLookupError != 0) || (pWrapperTable->m_GetSpecificationVersion == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultTransform; + } + + /** + * CComponent::SetTransform - Sets the transformation matrix of the component. + * @param[in] Transform - new transformation matrix + */ + void CComponent::SetTransform(const sTransform & Transform) + { + CheckError(m_pWrapper->m_WrapperTable.m_Component_SetTransform(m_pHandle, &Transform)); + } + + /** + * Method definitions for class CComponentsObject + */ + + /** + * CComponentsObject::AddComponent - Adds a new component to a components object. + * @param[in] pObjectResource - object to add as component. Must not lead to circular references! + * @param[in] Transform - optional transform matrix for the component. + * @return new component instance + */ + PComponent CComponentsObject::AddComponent(classParam pObjectResource, const sTransform & Transform) + { + Lib3MFHandle hObjectResource = pObjectResource.GetHandle(); + Lib3MFHandle hComponentInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComponentsObject_AddComponent(m_pHandle, hObjectResource, &Transform, &hComponentInstance)); - eLookupError = (*pLookup)("lib3mf_createmodel", (void**)&(pWrapperTable->m_CreateModel)); - if ( (eLookupError != 0) || (pWrapperTable->m_CreateModel == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hComponentInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hComponentInstance))); + } + + /** + * CComponentsObject::GetComponent - Retrieves a component from a component object. + * @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) + * @return component instance + */ + PComponent CComponentsObject::GetComponent(const Lib3MF_uint32 nIndex) + { + Lib3MFHandle hComponentInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComponentsObject_GetComponent(m_pHandle, nIndex, &hComponentInstance)); - eLookupError = (*pLookup)("lib3mf_release", (void**)&(pWrapperTable->m_Release)); - if ( (eLookupError != 0) || (pWrapperTable->m_Release == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + if (!hComponentInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hComponentInstance))); + } + + /** + * CComponentsObject::GetComponentCount - Retrieves a component count of a component object. + * @return returns the component count + */ + Lib3MF_uint32 CComponentsObject::GetComponentCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ComponentsObject_GetComponentCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_acquire", (void**)&(pWrapperTable->m_Acquire)); - if ( (eLookupError != 0) || (pWrapperTable->m_Acquire == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * Method definitions for class CBeamSet + */ + + /** + * CBeamSet::SetName - Sets a beamset's name string + * @param[in] sName - new name of the beamset. + */ + void CBeamSet::SetName(const std::string & sName) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_SetName(m_pHandle, sName.c_str())); + } + + /** + * CBeamSet::GetName - Retrieves a beamset's name string + * @return returns the name of the beamset. + */ + std::string CBeamSet::GetName() + { + Lib3MF_uint32 bytesNeededName = 0; + Lib3MF_uint32 bytesWrittenName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetName(m_pHandle, 0, &bytesNeededName, nullptr)); + std::vector bufferName(bytesNeededName); + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetName(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); - eLookupError = (*pLookup)("lib3mf_setjournal", (void**)&(pWrapperTable->m_SetJournal)); - if ( (eLookupError != 0) || (pWrapperTable->m_SetJournal == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferName[0]); + } + + /** + * CBeamSet::SetIdentifier - Sets a beamset's identifier string + * @param[in] sIdentifier - new name of the beamset. + */ + void CBeamSet::SetIdentifier(const std::string & sIdentifier) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_SetIdentifier(m_pHandle, sIdentifier.c_str())); + } + + /** + * CBeamSet::GetIdentifier - Retrieves a beamset's identifier string + * @return returns the identifier of the beamset. + */ + std::string CBeamSet::GetIdentifier() + { + Lib3MF_uint32 bytesNeededIdentifier = 0; + Lib3MF_uint32 bytesWrittenIdentifier = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetIdentifier(m_pHandle, 0, &bytesNeededIdentifier, nullptr)); + std::vector bufferIdentifier(bytesNeededIdentifier); + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetIdentifier(m_pHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0])); - eLookupError = (*pLookup)("lib3mf_getlasterror", (void**)&(pWrapperTable->m_GetLastError)); - if ( (eLookupError != 0) || (pWrapperTable->m_GetLastError == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferIdentifier[0]); + } + + /** + * CBeamSet::GetReferenceCount - Retrieves the reference count of a beamset + * @return returns the reference count + */ + Lib3MF_uint32 CBeamSet::GetReferenceCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetReferenceCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_getsymbollookupmethod", (void**)&(pWrapperTable->m_GetSymbolLookupMethod)); - if ( (eLookupError != 0) || (pWrapperTable->m_GetSymbolLookupMethod == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CBeamSet::SetReferences - Sets the references of a beamset + * @param[in] ReferencesBuffer - the new indices of all beams in this beamset + */ + void CBeamSet::SetReferences(const CInputVector & ReferencesBuffer) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_SetReferences(m_pHandle, (Lib3MF_uint64)ReferencesBuffer.size(), ReferencesBuffer.data())); + } + + /** + * CBeamSet::GetReferences - Retrieves the references of a beamset + * @param[out] ReferencesBuffer - retrieves the indices of all beams in this beamset + */ + void CBeamSet::GetReferences(std::vector & ReferencesBuffer) + { + Lib3MF_uint64 elementsNeededReferences = 0; + Lib3MF_uint64 elementsWrittenReferences = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetReferences(m_pHandle, 0, &elementsNeededReferences, nullptr)); + ReferencesBuffer.resize((size_t) elementsNeededReferences); + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetReferences(m_pHandle, elementsNeededReferences, &elementsWrittenReferences, ReferencesBuffer.data())); + } + + /** + * CBeamSet::GetBallReferenceCount - Retrieves the ball reference count of a beamset + * @return returns the ball reference count + */ + Lib3MF_uint32 CBeamSet::GetBallReferenceCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetBallReferenceCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_retrieveprogressmessage", (void**)&(pWrapperTable->m_RetrieveProgressMessage)); - if ( (eLookupError != 0) || (pWrapperTable->m_RetrieveProgressMessage == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CBeamSet::SetBallReferences - Sets the ball references of a beamset + * @param[in] BallReferencesBuffer - the new indices of all balls in this beamset + */ + void CBeamSet::SetBallReferences(const CInputVector & BallReferencesBuffer) + { + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_SetBallReferences(m_pHandle, (Lib3MF_uint64)BallReferencesBuffer.size(), BallReferencesBuffer.data())); + } + + /** + * CBeamSet::GetBallReferences - Retrieves the ball references of a beamset + * @param[out] BallReferencesBuffer - retrieves the indices of all balls in this beamset + */ + void CBeamSet::GetBallReferences(std::vector & BallReferencesBuffer) + { + Lib3MF_uint64 elementsNeededBallReferences = 0; + Lib3MF_uint64 elementsWrittenBallReferences = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetBallReferences(m_pHandle, 0, &elementsNeededBallReferences, nullptr)); + BallReferencesBuffer.resize((size_t) elementsNeededBallReferences); + CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetBallReferences(m_pHandle, elementsNeededBallReferences, &elementsWrittenBallReferences, BallReferencesBuffer.data())); + } + + /** + * Method definitions for class CBaseMaterialGroup + */ + + /** + * CBaseMaterialGroup::GetCount - Retrieves the count of base materials in the material group. + * @return returns the count of base materials. + */ + Lib3MF_uint32 CBaseMaterialGroup::GetCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_rgbatocolor", (void**)&(pWrapperTable->m_RGBAToColor)); - if ( (eLookupError != 0) || (pWrapperTable->m_RGBAToColor == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CBaseMaterialGroup::GetAllPropertyIDs - returns all the PropertyIDs of all materials in this group + * @param[out] PropertyIDsBuffer - PropertyID of the material in the material group. + */ + void CBaseMaterialGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + { + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetAllPropertyIDs(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetAllPropertyIDs(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + } + + /** + * CBaseMaterialGroup::AddMaterial - Adds a new material to the material group + * @param[in] sName - new name of the base material. + * @param[in] DisplayColor - Display color of the material + * @return returns new PropertyID of the new material in the material group. + */ + Lib3MF_uint32 CBaseMaterialGroup::AddMaterial(const std::string & sName, const sColor & DisplayColor) + { + Lib3MF_uint32 resultPropertyID = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_AddMaterial(m_pHandle, sName.c_str(), &DisplayColor, &resultPropertyID)); - eLookupError = (*pLookup)("lib3mf_floatrgbatocolor", (void**)&(pWrapperTable->m_FloatRGBAToColor)); - if ( (eLookupError != 0) || (pWrapperTable->m_FloatRGBAToColor == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultPropertyID; + } + + /** + * CBaseMaterialGroup::RemoveMaterial - Removes a material from the material group. + * @param[in] nPropertyID - PropertyID of the material in the material group. + */ + void CBaseMaterialGroup::RemoveMaterial(const Lib3MF_uint32 nPropertyID) + { + CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_RemoveMaterial(m_pHandle, nPropertyID)); + } + + /** + * CBaseMaterialGroup::GetName - Returns the base material's name + * @param[in] nPropertyID - PropertyID of the material in the material group. + * @return returns the name of the base material. + */ + std::string CBaseMaterialGroup::GetName(const Lib3MF_uint32 nPropertyID) + { + Lib3MF_uint32 bytesNeededName = 0; + Lib3MF_uint32 bytesWrittenName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetName(m_pHandle, nPropertyID, 0, &bytesNeededName, nullptr)); + std::vector bufferName(bytesNeededName); + CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetName(m_pHandle, nPropertyID, bytesNeededName, &bytesWrittenName, &bufferName[0])); - eLookupError = (*pLookup)("lib3mf_colortorgba", (void**)&(pWrapperTable->m_ColorToRGBA)); - if ( (eLookupError != 0) || (pWrapperTable->m_ColorToRGBA == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return std::string(&bufferName[0]); + } + + /** + * CBaseMaterialGroup::SetName - Sets a base material's name + * @param[in] nPropertyID - PropertyID of the material in the material group. + * @param[in] sName - new name of the base material. + */ + void CBaseMaterialGroup::SetName(const Lib3MF_uint32 nPropertyID, const std::string & sName) + { + CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_SetName(m_pHandle, nPropertyID, sName.c_str())); + } + + /** + * CBaseMaterialGroup::SetDisplayColor - Sets a base material's display color. + * @param[in] nPropertyID - PropertyID of the material in the material group. + * @param[in] TheColor - The base material's display color + */ + void CBaseMaterialGroup::SetDisplayColor(const Lib3MF_uint32 nPropertyID, const sColor & TheColor) + { + CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_SetDisplayColor(m_pHandle, nPropertyID, &TheColor)); + } + + /** + * CBaseMaterialGroup::GetDisplayColor - Returns a base material's display color. + * @param[in] nPropertyID - PropertyID of the material in the material group. + * @return The base material's display color + */ + sColor CBaseMaterialGroup::GetDisplayColor(const Lib3MF_uint32 nPropertyID) + { + sColor resultTheColor; + CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetDisplayColor(m_pHandle, nPropertyID, &resultTheColor)); - eLookupError = (*pLookup)("lib3mf_colortofloatrgba", (void**)&(pWrapperTable->m_ColorToFloatRGBA)); - if ( (eLookupError != 0) || (pWrapperTable->m_ColorToFloatRGBA == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultTheColor; + } + + /** + * Method definitions for class CColorGroup + */ + + /** + * CColorGroup::GetCount - Retrieves the count of base materials in this Color Group. + * @return returns the count of colors within this color group. + */ + Lib3MF_uint32 CColorGroup::GetCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_GetCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_getidentitytransform", (void**)&(pWrapperTable->m_GetIdentityTransform)); - if ( (eLookupError != 0) || (pWrapperTable->m_GetIdentityTransform == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CColorGroup::GetAllPropertyIDs - returns all the PropertyIDs of all colors within this group + * @param[out] PropertyIDsBuffer - PropertyID of the color in the color group. + */ + void CColorGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + { + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_GetAllPropertyIDs(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_GetAllPropertyIDs(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + } + + /** + * CColorGroup::AddColor - Adds a new value. + * @param[in] TheColor - The new color + * @return PropertyID of the new color within this color group. + */ + Lib3MF_uint32 CColorGroup::AddColor(const sColor & TheColor) + { + Lib3MF_uint32 resultPropertyID = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_AddColor(m_pHandle, &TheColor, &resultPropertyID)); - eLookupError = (*pLookup)("lib3mf_getuniformscaletransform", (void**)&(pWrapperTable->m_GetUniformScaleTransform)); - if ( (eLookupError != 0) || (pWrapperTable->m_GetUniformScaleTransform == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultPropertyID; + } + + /** + * CColorGroup::RemoveColor - Removes a color from the color group. + * @param[in] nPropertyID - PropertyID of the color to be removed from the color group. + */ + void CColorGroup::RemoveColor(const Lib3MF_uint32 nPropertyID) + { + CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_RemoveColor(m_pHandle, nPropertyID)); + } + + /** + * CColorGroup::SetColor - Sets a color value. + * @param[in] nPropertyID - PropertyID of a color within this color group. + * @param[in] TheColor - The color + */ + void CColorGroup::SetColor(const Lib3MF_uint32 nPropertyID, const sColor & TheColor) + { + CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_SetColor(m_pHandle, nPropertyID, &TheColor)); + } + + /** + * CColorGroup::GetColor - Sets a color value. + * @param[in] nPropertyID - PropertyID of a color within this color group. + * @return The color + */ + sColor CColorGroup::GetColor(const Lib3MF_uint32 nPropertyID) + { + sColor resultTheColor; + CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_GetColor(m_pHandle, nPropertyID, &resultTheColor)); - eLookupError = (*pLookup)("lib3mf_getscaletransform", (void**)&(pWrapperTable->m_GetScaleTransform)); - if ( (eLookupError != 0) || (pWrapperTable->m_GetScaleTransform == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultTheColor; + } + + /** + * Method definitions for class CTexture2DGroup + */ + + /** + * CTexture2DGroup::GetCount - Retrieves the count of tex2coords in the Texture2DGroup. + * @return returns the count of tex2coords. + */ + Lib3MF_uint32 CTexture2DGroup::GetCount() + { + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_GetCount(m_pHandle, &resultCount)); - eLookupError = (*pLookup)("lib3mf_gettranslationtransform", (void**)&(pWrapperTable->m_GetTranslationTransform)); - if ( (eLookupError != 0) || (pWrapperTable->m_GetTranslationTransform == nullptr) ) - return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + return resultCount; + } + + /** + * CTexture2DGroup::GetAllPropertyIDs - returns all the PropertyIDs of all tex2coords in this Texture2DGroup + * @param[out] PropertyIDsBuffer - PropertyID of the tex2coords in the Texture2DGroup. + */ + void CTexture2DGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + { + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_GetAllPropertyIDs(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_GetAllPropertyIDs(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + } + + /** + * CTexture2DGroup::AddTex2Coord - Adds a new tex2coord to the Texture2DGroup + * @param[in] UVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. + * @return returns new PropertyID of the new tex2coord in the Texture2DGroup. + */ + Lib3MF_uint32 CTexture2DGroup::AddTex2Coord(const sTex2Coord & UVCoordinate) + { + Lib3MF_uint32 resultPropertyID = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_AddTex2Coord(m_pHandle, &UVCoordinate, &resultPropertyID)); - return LIB3MF_SUCCESS; -} - + return resultPropertyID; + } + /** + * CTexture2DGroup::GetTex2Coord - Obtains a tex2coord to the Texture2DGroup + * @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. + * @return The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. + */ + sTex2Coord CTexture2DGroup::GetTex2Coord(const Lib3MF_uint32 nPropertyID) + { + sTex2Coord resultUVCoordinate; + CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_GetTex2Coord(m_pHandle, nPropertyID, &resultUVCoordinate)); + + return resultUVCoordinate; + } /** - * Method definitions for class CBase - */ + * CTexture2DGroup::RemoveTex2Coord - Removes a tex2coords from the Texture2DGroup. + * @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. + */ + void CTexture2DGroup::RemoveTex2Coord(const Lib3MF_uint32 nPropertyID) + { + CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_RemoveTex2Coord(m_pHandle, nPropertyID)); + } /** - * CBase::ClassTypeId - Get Class Type Id - * @return Class type as a 64 bits integer + * CTexture2DGroup::GetTexture2D - Obtains the texture2D instance of this group. + * @return the texture2D instance of this group. */ - Lib3MF_uint64 CBase::ClassTypeId() + PTexture2D CTexture2DGroup::GetTexture2D() { - Lib3MF_uint64 resultClassTypeId = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Base_ClassTypeId(m_pHandle, &resultClassTypeId)); + Lib3MFHandle hTexture2DInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_GetTexture2D(m_pHandle, &hTexture2DInstance)); - return resultClassTypeId; + if (!hTexture2DInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTexture2DInstance))); } /** - * Method definitions for class CWriter + * Method definitions for class CCompositeMaterials */ /** - * CWriter::WriteToFile - Writes out the model as file. The file type is specified by the Model Writer class. - * @param[in] sFilename - Filename to write into + * CCompositeMaterials::GetCount - Retrieves the count of Composite-s in the CompositeMaterials. + * @return returns the count of Composite-s */ - void CWriter::WriteToFile(const std::string & sFilename) + Lib3MF_uint32 CCompositeMaterials::GetCount() { - CheckError(m_pWrapper->m_WrapperTable.m_Writer_WriteToFile(m_pHandle, sFilename.c_str())); + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetCount(m_pHandle, &resultCount)); + + return resultCount; } /** - * CWriter::GetStreamSize - Retrieves the size of the full 3MF file stream. - * @return the stream size + * CCompositeMaterials::GetAllPropertyIDs - returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials + * @param[out] PropertyIDsBuffer - PropertyID of the Composite-Mixing Values in the CompositeMaterials. */ - Lib3MF_uint64 CWriter::GetStreamSize() + void CCompositeMaterials::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) { - Lib3MF_uint64 resultStreamSize = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetStreamSize(m_pHandle, &resultStreamSize)); + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetAllPropertyIDs(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetAllPropertyIDs(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + } + + /** + * CCompositeMaterials::GetBaseMaterialGroup - Obtains the BaseMaterialGroup instance of this CompositeMaterials. + * @return returns the BaseMaterialGroup instance of this CompositeMaterials + */ + PBaseMaterialGroup CCompositeMaterials::GetBaseMaterialGroup() + { + Lib3MFHandle hBaseMaterialGroupInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetBaseMaterialGroup(m_pHandle, &hBaseMaterialGroupInstance)); - return resultStreamSize; + if (!hBaseMaterialGroupInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBaseMaterialGroupInstance))); } /** - * CWriter::WriteToBuffer - Writes out the 3MF file into a memory buffer - * @param[out] BufferBuffer - buffer to write into + * CCompositeMaterials::AddComposite - Adds a new Composite-Mixing Values to the CompositeMaterials. + * @param[in] CompositeBuffer - The Composite Constituents to be added as composite + * @return returns new PropertyID of the new Composite in the CompositeMaterials. */ - void CWriter::WriteToBuffer(std::vector & BufferBuffer) + Lib3MF_uint32 CCompositeMaterials::AddComposite(const CInputVector & CompositeBuffer) { - Lib3MF_uint64 elementsNeededBuffer = 0; - Lib3MF_uint64 elementsWrittenBuffer = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Writer_WriteToBuffer(m_pHandle, 0, &elementsNeededBuffer, nullptr)); - BufferBuffer.resize((size_t) elementsNeededBuffer); - CheckError(m_pWrapper->m_WrapperTable.m_Writer_WriteToBuffer(m_pHandle, elementsNeededBuffer, &elementsWrittenBuffer, BufferBuffer.data())); + Lib3MF_uint32 resultPropertyID = 0; + CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_AddComposite(m_pHandle, (Lib3MF_uint64)CompositeBuffer.size(), CompositeBuffer.data(), &resultPropertyID)); + + return resultPropertyID; } /** - * CWriter::WriteToCallback - Writes out the model and passes the data to a provided callback function. The file type is specified by the Model Writer class. - * @param[in] pTheWriteCallback - Callback to call for writing a data chunk - * @param[in] pTheSeekCallback - Callback to call for seeking in the stream - * @param[in] pUserData - Userdata that is passed to the callback function + * CCompositeMaterials::RemoveComposite - Removes a Composite-Maxing Ratio from the CompositeMaterials. + * @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. */ - void CWriter::WriteToCallback(const WriteCallback pTheWriteCallback, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) + void CCompositeMaterials::RemoveComposite(const Lib3MF_uint32 nPropertyID) { - CheckError(m_pWrapper->m_WrapperTable.m_Writer_WriteToCallback(m_pHandle, pTheWriteCallback, pTheSeekCallback, pUserData)); + CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_RemoveComposite(m_pHandle, nPropertyID)); } /** - * CWriter::SetProgressCallback - Set the progress callback for calls to this writer - * @param[in] pProgressCallback - pointer to the callback function. - * @param[in] pUserData - pointer to arbitrary user data that is passed without modification to the callback. + * CCompositeMaterials::GetComposite - Obtains a Composite-Maxing Ratio of this CompositeMaterials. + * @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. + * @param[out] CompositeBuffer - The Composite-Mixing Values with the given PropertyID */ - void CWriter::SetProgressCallback(const ProgressCallback pProgressCallback, const Lib3MF_pvoid pUserData) + void CCompositeMaterials::GetComposite(const Lib3MF_uint32 nPropertyID, std::vector & CompositeBuffer) { - CheckError(m_pWrapper->m_WrapperTable.m_Writer_SetProgressCallback(m_pHandle, pProgressCallback, pUserData)); + Lib3MF_uint64 elementsNeededComposite = 0; + Lib3MF_uint64 elementsWrittenComposite = 0; + CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetComposite(m_pHandle, nPropertyID, 0, &elementsNeededComposite, nullptr)); + CompositeBuffer.resize((size_t) elementsNeededComposite); + CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetComposite(m_pHandle, nPropertyID, elementsNeededComposite, &elementsWrittenComposite, CompositeBuffer.data())); } /** - * CWriter::GetDecimalPrecision - Returns the number of digits after the decimal point to be written in each vertex coordinate-value. - * @return The number of digits to be written in each vertex coordinate-value after the decimal point. + * Method definitions for class CMultiPropertyGroup + */ + + /** + * CMultiPropertyGroup::GetCount - Retrieves the count of MultiProperty-s in the MultiPropertyGroup. + * @return returns the count of MultiProperty-s */ - Lib3MF_uint32 CWriter::GetDecimalPrecision() + Lib3MF_uint32 CMultiPropertyGroup::GetCount() { - Lib3MF_uint32 resultDecimalPrecision = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetDecimalPrecision(m_pHandle, &resultDecimalPrecision)); + Lib3MF_uint32 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetCount(m_pHandle, &resultCount)); - return resultDecimalPrecision; + return resultCount; } /** - * CWriter::SetDecimalPrecision - Sets the number of digits after the decimal point to be written in each vertex coordinate-value. - * @param[in] nDecimalPrecision - The number of digits to be written in each vertex coordinate-value after the decimal point. + * CMultiPropertyGroup::GetAllPropertyIDs - returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup + * @param[out] PropertyIDsBuffer - PropertyID of the MultiProperty-s in the MultiPropertyGroup. */ - void CWriter::SetDecimalPrecision(const Lib3MF_uint32 nDecimalPrecision) + void CMultiPropertyGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) { - CheckError(m_pWrapper->m_WrapperTable.m_Writer_SetDecimalPrecision(m_pHandle, nDecimalPrecision)); + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetAllPropertyIDs(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetAllPropertyIDs(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); } /** - * CWriter::SetStrictModeActive - Activates (deactivates) the strict mode of the reader. - * @param[in] bStrictModeActive - flag whether strict mode is active or not. + * CMultiPropertyGroup::AddMultiProperty - Adds a new MultiProperty to the MultiPropertyGroup. + * @param[in] PropertyIDsBuffer - The PropertyIDs of the new MultiProperty. + * @return returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. */ - void CWriter::SetStrictModeActive(const bool bStrictModeActive) + Lib3MF_uint32 CMultiPropertyGroup::AddMultiProperty(const CInputVector & PropertyIDsBuffer) { - CheckError(m_pWrapper->m_WrapperTable.m_Writer_SetStrictModeActive(m_pHandle, bStrictModeActive)); + Lib3MF_uint32 resultPropertyID = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_AddMultiProperty(m_pHandle, (Lib3MF_uint64)PropertyIDsBuffer.size(), PropertyIDsBuffer.data(), &resultPropertyID)); + + return resultPropertyID; } /** - * CWriter::GetStrictModeActive - Queries whether the strict mode of the reader is active or not - * @return returns flag whether strict mode is active or not. + * CMultiPropertyGroup::SetMultiProperty - Sets the PropertyIDs of a MultiProperty. + * @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. + * @param[in] PropertyIDsBuffer - The new PropertyIDs of the MultiProperty */ - bool CWriter::GetStrictModeActive() + void CMultiPropertyGroup::SetMultiProperty(const Lib3MF_uint32 nPropertyID, const CInputVector & PropertyIDsBuffer) { - bool resultStrictModeActive = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetStrictModeActive(m_pHandle, &resultStrictModeActive)); - - return resultStrictModeActive; + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_SetMultiProperty(m_pHandle, nPropertyID, (Lib3MF_uint64)PropertyIDsBuffer.size(), PropertyIDsBuffer.data())); } /** - * CWriter::GetWarning - Returns Warning and Error Information of the read process - * @param[in] nIndex - Index of the Warning. Valid values are 0 to WarningCount - 1 - * @param[out] nErrorCode - filled with the error code of the warning - * @return the message of the warning + * CMultiPropertyGroup::GetMultiProperty - Obtains the PropertyIDs of a MultiProperty. + * @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. + * @param[out] PropertyIDsBuffer - The PropertyIDs of the MultiProperty */ - std::string CWriter::GetWarning(const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode) + void CMultiPropertyGroup::GetMultiProperty(const Lib3MF_uint32 nPropertyID, std::vector & PropertyIDsBuffer) { - Lib3MF_uint32 bytesNeededWarning = 0; - Lib3MF_uint32 bytesWrittenWarning = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetWarning(m_pHandle, nIndex, &nErrorCode, 0, &bytesNeededWarning, nullptr)); - std::vector bufferWarning(bytesNeededWarning); - CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetWarning(m_pHandle, nIndex, &nErrorCode, bytesNeededWarning, &bytesWrittenWarning, &bufferWarning[0])); - - return std::string(&bufferWarning[0]); + Lib3MF_uint64 elementsNeededPropertyIDs = 0; + Lib3MF_uint64 elementsWrittenPropertyIDs = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetMultiProperty(m_pHandle, nPropertyID, 0, &elementsNeededPropertyIDs, nullptr)); + PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetMultiProperty(m_pHandle, nPropertyID, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); } /** - * CWriter::GetWarningCount - Returns Warning and Error Count of the read process - * @return filled with the count of the occurred warnings. + * CMultiPropertyGroup::RemoveMultiProperty - Removes a MultiProperty from this MultiPropertyGroup. + * @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. */ - Lib3MF_uint32 CWriter::GetWarningCount() + void CMultiPropertyGroup::RemoveMultiProperty(const Lib3MF_uint32 nPropertyID) + { + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_RemoveMultiProperty(m_pHandle, nPropertyID)); + } + + /** + * CMultiPropertyGroup::GetLayerCount - Retrieves the number of layers of this MultiPropertyGroup. + * @return returns the number of layers + */ + Lib3MF_uint32 CMultiPropertyGroup::GetLayerCount() { Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Writer_GetWarningCount(m_pHandle, &resultCount)); + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetLayerCount(m_pHandle, &resultCount)); return resultCount; } /** - * CWriter::AddKeyWrappingCallback - Registers a callback to deal with data key encryption/decryption from keystore - * @param[in] sConsumerID - The ConsumerID to register for - * @param[in] pTheCallback - The callback to be callede for wrapping and encryption key - * @param[in] pUserData - Userdata that is passed to the callback function + * CMultiPropertyGroup::AddLayer - Adds a MultiPropertyLayer to this MultiPropertyGroup. + * @param[in] TheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup + * @return returns the index of this MultiPropertyLayer */ - void CWriter::AddKeyWrappingCallback(const std::string & sConsumerID, const KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData) + Lib3MF_uint32 CMultiPropertyGroup::AddLayer(const sMultiPropertyLayer & TheLayer) { - CheckError(m_pWrapper->m_WrapperTable.m_Writer_AddKeyWrappingCallback(m_pHandle, sConsumerID.c_str(), pTheCallback, pUserData)); + Lib3MF_uint32 resultLayerIndex = 0; + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_AddLayer(m_pHandle, &TheLayer, &resultLayerIndex)); + + return resultLayerIndex; + } + + /** + * CMultiPropertyGroup::GetLayer - Obtains a MultiPropertyLayer of this MultiPropertyGroup. + * @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried + * @return The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup + */ + sMultiPropertyLayer CMultiPropertyGroup::GetLayer(const Lib3MF_uint32 nLayerIndex) + { + sMultiPropertyLayer resultTheLayer; + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetLayer(m_pHandle, nLayerIndex, &resultTheLayer)); + + return resultTheLayer; } /** - * CWriter::SetContentEncryptionCallback - Registers a callback to deal with encryption of content - * @param[in] pTheCallback - The callback used to encrypt content - * @param[in] pUserData - Userdata that is passed to the callback function + * CMultiPropertyGroup::RemoveLayer - Removes a MultiPropertyLayer from this MultiPropertyGroup. + * @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed */ - void CWriter::SetContentEncryptionCallback(const ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData) + void CMultiPropertyGroup::RemoveLayer(const Lib3MF_uint32 nLayerIndex) { - CheckError(m_pWrapper->m_WrapperTable.m_Writer_SetContentEncryptionCallback(m_pHandle, pTheCallback, pUserData)); + CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_RemoveLayer(m_pHandle, nLayerIndex)); } /** - * Method definitions for class CReader + * Method definitions for class CImage3D */ /** - * CReader::ReadFromFile - Reads a model from a file. The file type is specified by the Model Reader class - * @param[in] sFilename - Filename to read from + * CImage3D::GetName - returns the name of this Image3D + * @return the name of this Image3D */ - void CReader::ReadFromFile(const std::string & sFilename) + std::string CImage3D::GetName() { - CheckError(m_pWrapper->m_WrapperTable.m_Reader_ReadFromFile(m_pHandle, sFilename.c_str())); + Lib3MF_uint32 bytesNeededName = 0; + Lib3MF_uint32 bytesWrittenName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Image3D_GetName(m_pHandle, 0, &bytesNeededName, nullptr)); + std::vector bufferName(bytesNeededName); + CheckError(m_pWrapper->m_WrapperTable.m_Image3D_GetName(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); + + return std::string(&bufferName[0]); } /** - * CReader::ReadFromBuffer - Reads a model from a memory buffer. - * @param[in] BufferBuffer - Buffer to read from + * CImage3D::SetName - sets a new name of this Image3D + * @param[in] sName - the new name of this Image3D */ - void CReader::ReadFromBuffer(const CInputVector & BufferBuffer) + void CImage3D::SetName(const std::string & sName) { - CheckError(m_pWrapper->m_WrapperTable.m_Reader_ReadFromBuffer(m_pHandle, (Lib3MF_uint64)BufferBuffer.size(), BufferBuffer.data())); + CheckError(m_pWrapper->m_WrapperTable.m_Image3D_SetName(m_pHandle, sName.c_str())); } /** - * CReader::ReadFromCallback - Reads a model and from the data provided by a callback function - * @param[in] pTheReadCallback - Callback to call for reading a data chunk - * @param[in] nStreamSize - number of bytes the callback returns - * @param[in] pTheSeekCallback - Callback to call for seeking in the stream. - * @param[in] pUserData - Userdata that is passed to the callback function + * CImage3D::IsImageStack - Retrieves, if this Image3D is a ImageStack + * @return returns, whether the Image3D is an ImageStack */ - void CReader::ReadFromCallback(const ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) + bool CImage3D::IsImageStack() { - CheckError(m_pWrapper->m_WrapperTable.m_Reader_ReadFromCallback(m_pHandle, pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData)); + bool resultIsImageStack = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Image3D_IsImageStack(m_pHandle, &resultIsImageStack)); + + return resultIsImageStack; } /** - * CReader::SetProgressCallback - Set the progress callback for calls to this writer - * @param[in] pProgressCallback - pointer to the callback function. - * @param[in] pUserData - pointer to arbitrary user data that is passed without modification to the callback. - */ - void CReader::SetProgressCallback(const ProgressCallback pProgressCallback, const Lib3MF_pvoid pUserData) - { - CheckError(m_pWrapper->m_WrapperTable.m_Reader_SetProgressCallback(m_pHandle, pProgressCallback, pUserData)); - } + * Method definitions for class CImageStack + */ /** - * CReader::AddRelationToRead - Adds a relationship type which shall be read as attachment in memory while loading - * @param[in] sRelationShipType - String of the relationship type + * CImageStack::GetRowCount - Retrieves the number of rows in each image of this image3d + * @return number of rows */ - void CReader::AddRelationToRead(const std::string & sRelationShipType) + Lib3MF_uint32 CImageStack::GetRowCount() { - CheckError(m_pWrapper->m_WrapperTable.m_Reader_AddRelationToRead(m_pHandle, sRelationShipType.c_str())); + Lib3MF_uint32 resultRowCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImageStack_GetRowCount(m_pHandle, &resultRowCount)); + + return resultRowCount; } /** - * CReader::RemoveRelationToRead - Removes a relationship type which shall be read as attachment in memory while loading - * @param[in] sRelationShipType - String of the relationship type + * CImageStack::SetRowCount - Sets the number of rows in each image of this image3d + * @param[in] nRowCount - number of rows */ - void CReader::RemoveRelationToRead(const std::string & sRelationShipType) + void CImageStack::SetRowCount(const Lib3MF_uint32 nRowCount) { - CheckError(m_pWrapper->m_WrapperTable.m_Reader_RemoveRelationToRead(m_pHandle, sRelationShipType.c_str())); + CheckError(m_pWrapper->m_WrapperTable.m_ImageStack_SetRowCount(m_pHandle, nRowCount)); } /** - * CReader::SetStrictModeActive - Activates (deactivates) the strict mode of the reader. - * @param[in] bStrictModeActive - flag whether strict mode is active or not. + * CImageStack::GetColumnCount - Retrieves the number of columns in each image of this image3d + * @return number of columns */ - void CReader::SetStrictModeActive(const bool bStrictModeActive) + Lib3MF_uint32 CImageStack::GetColumnCount() { - CheckError(m_pWrapper->m_WrapperTable.m_Reader_SetStrictModeActive(m_pHandle, bStrictModeActive)); + Lib3MF_uint32 resultColumnCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImageStack_GetColumnCount(m_pHandle, &resultColumnCount)); + + return resultColumnCount; } /** - * CReader::GetStrictModeActive - Queries whether the strict mode of the reader is active or not - * @return returns flag whether strict mode is active or not. + * CImageStack::SetColumnCount - Sets the number of columns in each image of this image3d + * @param[in] nColumnCount - number of columns */ - bool CReader::GetStrictModeActive() + void CImageStack::SetColumnCount(const Lib3MF_uint32 nColumnCount) { - bool resultStrictModeActive = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Reader_GetStrictModeActive(m_pHandle, &resultStrictModeActive)); - - return resultStrictModeActive; + CheckError(m_pWrapper->m_WrapperTable.m_ImageStack_SetColumnCount(m_pHandle, nColumnCount)); } /** - * CReader::GetWarning - Returns Warning and Error Information of the read process - * @param[in] nIndex - Index of the Warning. Valid values are 0 to WarningCount - 1 - * @param[out] nErrorCode - filled with the error code of the warning - * @return the message of the warning + * CImageStack::GetSheetCount - Retrieves the number of images in the stack. + * @return number of images */ - std::string CReader::GetWarning(const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode) + Lib3MF_uint32 CImageStack::GetSheetCount() { - Lib3MF_uint32 bytesNeededWarning = 0; - Lib3MF_uint32 bytesWrittenWarning = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Reader_GetWarning(m_pHandle, nIndex, &nErrorCode, 0, &bytesNeededWarning, nullptr)); - std::vector bufferWarning(bytesNeededWarning); - CheckError(m_pWrapper->m_WrapperTable.m_Reader_GetWarning(m_pHandle, nIndex, &nErrorCode, bytesNeededWarning, &bytesWrittenWarning, &bufferWarning[0])); + Lib3MF_uint32 resultSheetCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImageStack_GetSheetCount(m_pHandle, &resultSheetCount)); - return std::string(&bufferWarning[0]); + return resultSheetCount; } /** - * CReader::GetWarningCount - Returns Warning and Error Count of the read process - * @return filled with the count of the occurred warnings. + * CImageStack::GetSheet - Retrieves a sheet of the stack. Raises an error if sheet is not set. + * @param[in] nIndex - index of the image (0-based) + * @return attachment containing the image */ - Lib3MF_uint32 CReader::GetWarningCount() + PAttachment CImageStack::GetSheet(const Lib3MF_uint32 nIndex) { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Reader_GetWarningCount(m_pHandle, &resultCount)); + Lib3MFHandle hSheet = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImageStack_GetSheet(m_pHandle, nIndex, &hSheet)); - return resultCount; + if (!hSheet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSheet))); } /** - * CReader::AddKeyWrappingCallback - Registers a callback to deal with key wrapping mechanism from keystore - * @param[in] sConsumerID - The ConsumerID to register for - * @param[in] pTheCallback - The callback used to decrypt data key - * @param[in] pUserData - Userdata that is passed to the callback function + * CImageStack::SetSheet - Sets a sheet to an existing attachment. + * @param[in] nIndex - index of the image (0-based) + * @param[in] pSheet - attachment containing the image */ - void CReader::AddKeyWrappingCallback(const std::string & sConsumerID, const KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData) + void CImageStack::SetSheet(const Lib3MF_uint32 nIndex, classParam pSheet) { - CheckError(m_pWrapper->m_WrapperTable.m_Reader_AddKeyWrappingCallback(m_pHandle, sConsumerID.c_str(), pTheCallback, pUserData)); + Lib3MFHandle hSheet = pSheet.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_ImageStack_SetSheet(m_pHandle, nIndex, hSheet)); } /** - * CReader::SetContentEncryptionCallback - Registers a callback to deal with encryption of content - * @param[in] pTheCallback - The callback used to encrypt content - * @param[in] pUserData - Userdata that is passed to the callback function + * CImageStack::CreateEmptySheet - Creates a new sheet attachment with empty data. + * @param[in] nIndex - index of the image (0-based) + * @param[in] sPath - path of part in the package + * @return attachment containing the image */ - void CReader::SetContentEncryptionCallback(const ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData) + PAttachment CImageStack::CreateEmptySheet(const Lib3MF_uint32 nIndex, const std::string & sPath) { - CheckError(m_pWrapper->m_WrapperTable.m_Reader_SetContentEncryptionCallback(m_pHandle, pTheCallback, pUserData)); + Lib3MFHandle hSheet = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImageStack_CreateEmptySheet(m_pHandle, nIndex, sPath.c_str(), &hSheet)); + + if (!hSheet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSheet))); } /** - * Method definitions for class CPackagePart - */ - - /** - * CPackagePart::GetPath - Returns the absolute path of this PackagePart. - * @return Returns the absolute path of this PackagePart + * CImageStack::CreateSheetFromBuffer - Creates a new sheet attachment from a memory buffer. + * @param[in] nIndex - index of the image (0-based) + * @param[in] sPath - path of part in the package + * @param[in] DataBuffer - binary image data + * @return attachment containing the image */ - std::string CPackagePart::GetPath() + PAttachment CImageStack::CreateSheetFromBuffer(const Lib3MF_uint32 nIndex, const std::string & sPath, const CInputVector & DataBuffer) { - Lib3MF_uint32 bytesNeededPath = 0; - Lib3MF_uint32 bytesWrittenPath = 0; - CheckError(m_pWrapper->m_WrapperTable.m_PackagePart_GetPath(m_pHandle, 0, &bytesNeededPath, nullptr)); - std::vector bufferPath(bytesNeededPath); - CheckError(m_pWrapper->m_WrapperTable.m_PackagePart_GetPath(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); + Lib3MFHandle hSheet = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImageStack_CreateSheetFromBuffer(m_pHandle, nIndex, sPath.c_str(), (Lib3MF_uint64)DataBuffer.size(), DataBuffer.data(), &hSheet)); - return std::string(&bufferPath[0]); + if (!hSheet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSheet))); } /** - * CPackagePart::SetPath - Sets the absolute path of this PackagePart. - * @param[in] sPath - Sets the absolute path of this PackagePart. + * CImageStack::CreateSheetFromFile - Creates a new sheet attachment from a file on disk. + * @param[in] nIndex - index of the image (0-based) + * @param[in] sPath - path of part in the package + * @param[in] sFileName - file name to read from + * @return attachment containing the image */ - void CPackagePart::SetPath(const std::string & sPath) + PAttachment CImageStack::CreateSheetFromFile(const Lib3MF_uint32 nIndex, const std::string & sPath, const std::string & sFileName) { - CheckError(m_pWrapper->m_WrapperTable.m_PackagePart_SetPath(m_pHandle, sPath.c_str())); + Lib3MFHandle hSheet = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImageStack_CreateSheetFromFile(m_pHandle, nIndex, sPath.c_str(), sFileName.c_str(), &hSheet)); + + if (!hSheet) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSheet))); } /** - * Method definitions for class CResource + * Method definitions for class CAttachment */ /** - * CResource::GetResourceID - Retrieves the unique id of this resource within a package. This function will be removed in a later release in favor of GetUniqueResourceID - * @return Retrieves the unique id of this resource within a package. + * CAttachment::GetPath - Retrieves an attachment's package path. This function will be removed in a later release. + * @return returns the attachment's package path string */ - Lib3MF_uint32 CResource::GetResourceID() + std::string CAttachment::GetPath() { - Lib3MF_uint32 resultUniqueResourceID = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Resource_GetResourceID(m_pHandle, &resultUniqueResourceID)); + Lib3MF_uint32 bytesNeededPath = 0; + Lib3MF_uint32 bytesWrittenPath = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_GetPath(m_pHandle, 0, &bytesNeededPath, nullptr)); + std::vector bufferPath(bytesNeededPath); + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_GetPath(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); - return resultUniqueResourceID; + return std::string(&bufferPath[0]); } /** - * CResource::GetUniqueResourceID - Retrieves the unique id of this resource within a package. - * @return Retrieves the unique id of this resource within a package. + * CAttachment::SetPath - Sets an attachment's package path. This function will be removed in a later release. + * @param[in] sPath - new path of the attachment. */ - Lib3MF_uint32 CResource::GetUniqueResourceID() + void CAttachment::SetPath(const std::string & sPath) { - Lib3MF_uint32 resultUniqueResourceID = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Resource_GetUniqueResourceID(m_pHandle, &resultUniqueResourceID)); - - return resultUniqueResourceID; + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_SetPath(m_pHandle, sPath.c_str())); } /** - * CResource::PackagePart - Returns the PackagePart within which this resource resides - * @return the PackagePart within which this resource resides. + * CAttachment::PackagePart - Returns the PackagePart that is this attachment. + * @return The PackagePart of this attachment. */ - PPackagePart CResource::PackagePart() + PPackagePart CAttachment::PackagePart() { Lib3MFHandle hPackagePart = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_Resource_PackagePart(m_pHandle, &hPackagePart)); + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_PackagePart(m_pHandle, &hPackagePart)); if (!hPackagePart) { CheckError(LIB3MF_ERROR_INVALIDPARAM); @@ -7456,2215 +15594,2949 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } /** - * CResource::SetPackagePart - Sets the new PackagePart within which this resource resides - * @param[in] pPackagePart - the new PackagePart within which this resource resides. + * CAttachment::GetRelationShipType - Retrieves an attachment's relationship type + * @return returns the attachment's package relationship type string */ - void CResource::SetPackagePart(classParam pPackagePart) + std::string CAttachment::GetRelationShipType() { - Lib3MFHandle hPackagePart = pPackagePart.GetHandle(); - CheckError(m_pWrapper->m_WrapperTable.m_Resource_SetPackagePart(m_pHandle, hPackagePart)); + Lib3MF_uint32 bytesNeededPath = 0; + Lib3MF_uint32 bytesWrittenPath = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_GetRelationShipType(m_pHandle, 0, &bytesNeededPath, nullptr)); + std::vector bufferPath(bytesNeededPath); + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_GetRelationShipType(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); + + return std::string(&bufferPath[0]); } /** - * CResource::GetModelResourceID - Retrieves the id of this resource within a model. - * @return Retrieves the id of this resource within a model. + * CAttachment::SetRelationShipType - Sets an attachment's relationship type. + * @param[in] sPath - new relationship type string. */ - Lib3MF_uint32 CResource::GetModelResourceID() + void CAttachment::SetRelationShipType(const std::string & sPath) { - Lib3MF_uint32 resultModelResourceId = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Resource_GetModelResourceID(m_pHandle, &resultModelResourceId)); - - return resultModelResourceId; + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_SetRelationShipType(m_pHandle, sPath.c_str())); } /** - * Method definitions for class CResourceIterator - */ + * CAttachment::WriteToFile - Writes out the attachment as file. + * @param[in] sFileName - file to write into. + */ + void CAttachment::WriteToFile(const std::string & sFileName) + { + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_WriteToFile(m_pHandle, sFileName.c_str())); + } /** - * CResourceIterator::MoveNext - Iterates to the next resource in the list. - * @return Iterates to the next resource in the list. + * CAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * @param[in] sFileName - file to read from. */ - bool CResourceIterator::MoveNext() + void CAttachment::ReadFromFile(const std::string & sFileName) { - bool resultHasNext = 0; - CheckError(m_pWrapper->m_WrapperTable.m_ResourceIterator_MoveNext(m_pHandle, &resultHasNext)); - - return resultHasNext; + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_ReadFromFile(m_pHandle, sFileName.c_str())); } /** - * CResourceIterator::MovePrevious - Iterates to the previous resource in the list. - * @return Iterates to the previous resource in the list. + * CAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * @param[in] pTheReadCallback - Callback to call for reading a data chunk + * @param[in] nStreamSize - number of bytes the callback returns + * @param[in] pTheSeekCallback - Callback to call for seeking in the stream. + * @param[in] pUserData - Userdata that is passed to the callback function */ - bool CResourceIterator::MovePrevious() + void CAttachment::ReadFromCallback(const ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) { - bool resultHasPrevious = 0; - CheckError(m_pWrapper->m_WrapperTable.m_ResourceIterator_MovePrevious(m_pHandle, &resultHasPrevious)); - - return resultHasPrevious; + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_ReadFromCallback(m_pHandle, pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData)); } /** - * CResourceIterator::GetCurrent - Returns the resource the iterator points at. - * @return returns the resource instance. + * CAttachment::GetStreamSize - Retrieves the size of the attachment stream + * @return the stream size */ - PResource CResourceIterator::GetCurrent() + Lib3MF_uint64 CAttachment::GetStreamSize() { - Lib3MFHandle hResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_ResourceIterator_GetCurrent(m_pHandle, &hResource)); + Lib3MF_uint64 resultStreamSize = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_GetStreamSize(m_pHandle, &resultStreamSize)); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return resultStreamSize; } /** - * CResourceIterator::Clone - Creates a new resource iterator with the same resource list. - * @return returns the cloned Iterator instance + * CAttachment::WriteToBuffer - Writes out the attachment into a buffer + * @param[out] BufferBuffer - Buffer to write into */ - PResourceIterator CResourceIterator::Clone() + void CAttachment::WriteToBuffer(std::vector & BufferBuffer) { - Lib3MFHandle hOutResourceIterator = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_ResourceIterator_Clone(m_pHandle, &hOutResourceIterator)); - - if (!hOutResourceIterator) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hOutResourceIterator))); + Lib3MF_uint64 elementsNeededBuffer = 0; + Lib3MF_uint64 elementsWrittenBuffer = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_WriteToBuffer(m_pHandle, 0, &elementsNeededBuffer, nullptr)); + BufferBuffer.resize((size_t) elementsNeededBuffer); + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_WriteToBuffer(m_pHandle, elementsNeededBuffer, &elementsWrittenBuffer, BufferBuffer.data())); } /** - * CResourceIterator::Count - Returns the number of resoucres the iterator captures. - * @return returns the number of resoucres the iterator captures. + * CAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). + * @param[in] BufferBuffer - Buffer to read from */ - Lib3MF_uint64 CResourceIterator::Count() + void CAttachment::ReadFromBuffer(const CInputVector & BufferBuffer) { - Lib3MF_uint64 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_ResourceIterator_Count(m_pHandle, &resultCount)); - - return resultCount; + CheckError(m_pWrapper->m_WrapperTable.m_Attachment_ReadFromBuffer(m_pHandle, (Lib3MF_uint64)BufferBuffer.size(), BufferBuffer.data())); } /** - * Method definitions for class CSliceStackIterator + * Method definitions for class CTexture2D */ /** - * CSliceStackIterator::GetCurrentSliceStack - Returns the SliceStack the iterator points at. - * @return returns the SliceStack instance. + * CTexture2D::GetAttachment - Retrieves the attachment located at the path of the texture. + * @return attachment that holds the texture's image information. */ - PSliceStack CSliceStackIterator::GetCurrentSliceStack() + PAttachment CTexture2D::GetAttachment() { - Lib3MFHandle hResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_SliceStackIterator_GetCurrentSliceStack(m_pHandle, &hResource)); + Lib3MFHandle hAttachment = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_GetAttachment(m_pHandle, &hAttachment)); - if (!hResource) { + if (!hAttachment) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hAttachment))); } /** - * Method definitions for class CObjectIterator - */ + * CTexture2D::SetAttachment - Sets the texture's package path to the path of the attachment. + * @param[in] pAttachment - attachment that holds the texture's image information. + */ + void CTexture2D::SetAttachment(classParam pAttachment) + { + Lib3MFHandle hAttachment = pAttachment.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_SetAttachment(m_pHandle, hAttachment)); + } /** - * CObjectIterator::GetCurrentObject - Returns the Object the iterator points at. - * @return returns the Object instance. + * CTexture2D::GetContentType - Retrieves a texture's content type. + * @return returns content type enum. */ - PObject CObjectIterator::GetCurrentObject() + eTextureType CTexture2D::GetContentType() { - Lib3MFHandle hResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_ObjectIterator_GetCurrentObject(m_pHandle, &hResource)); + eTextureType resultContentType = (eTextureType) 0; + CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_GetContentType(m_pHandle, &resultContentType)); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return resultContentType; } /** - * Method definitions for class CMeshObjectIterator - */ + * CTexture2D::SetContentType - Retrieves a texture's content type. + * @param[in] eContentType - new Content Type + */ + void CTexture2D::SetContentType(const eTextureType eContentType) + { + CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_SetContentType(m_pHandle, eContentType)); + } /** - * CMeshObjectIterator::GetCurrentMeshObject - Returns the MeshObject the iterator points at. - * @return returns the MeshObject instance. + * CTexture2D::GetTileStyleUV - Retrieves a texture's tilestyle type. + * @param[out] eTileStyleU - returns tilestyle type enum. + * @param[out] eTileStyleV - returns tilestyle type enum. */ - PMeshObject CMeshObjectIterator::GetCurrentMeshObject() + void CTexture2D::GetTileStyleUV(eTextureTileStyle & eTileStyleU, eTextureTileStyle & eTileStyleV) { - Lib3MFHandle hResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObjectIterator_GetCurrentMeshObject(m_pHandle, &hResource)); - - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_GetTileStyleUV(m_pHandle, &eTileStyleU, &eTileStyleV)); } /** - * Method definitions for class CComponentsObjectIterator - */ + * CTexture2D::SetTileStyleUV - Sets a texture's tilestyle type. + * @param[in] eTileStyleU - new tilestyle type enum. + * @param[in] eTileStyleV - new tilestyle type enum. + */ + void CTexture2D::SetTileStyleUV(const eTextureTileStyle eTileStyleU, const eTextureTileStyle eTileStyleV) + { + CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_SetTileStyleUV(m_pHandle, eTileStyleU, eTileStyleV)); + } /** - * CComponentsObjectIterator::GetCurrentComponentsObject - Returns the ComponentsObject the iterator points at. - * @return returns the ComponentsObject instance. + * CTexture2D::GetFilter - Retrieves a texture's filter type. + * @return returns filter type enum. */ - PComponentsObject CComponentsObjectIterator::GetCurrentComponentsObject() + eTextureFilter CTexture2D::GetFilter() { - Lib3MFHandle hResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_ComponentsObjectIterator_GetCurrentComponentsObject(m_pHandle, &hResource)); + eTextureFilter resultFilter = (eTextureFilter) 0; + CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_GetFilter(m_pHandle, &resultFilter)); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return resultFilter; } /** - * Method definitions for class CTexture2DIterator - */ - - /** - * CTexture2DIterator::GetCurrentTexture2D - Returns the Texture2D the iterator points at. - * @return returns the Texture2D instance. + * CTexture2D::SetFilter - Sets a texture's filter type. + * @param[in] eFilter - sets new filter type enum. */ - PTexture2D CTexture2DIterator::GetCurrentTexture2D() + void CTexture2D::SetFilter(const eTextureFilter eFilter) { - Lib3MFHandle hResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_Texture2DIterator_GetCurrentTexture2D(m_pHandle, &hResource)); - - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_SetFilter(m_pHandle, eFilter)); } /** - * Method definitions for class CBaseMaterialGroupIterator + * Method definitions for class CImplicitPort */ /** - * CBaseMaterialGroupIterator::GetCurrentBaseMaterialGroup - Returns the MaterialGroup the iterator points at. - * @return returns the BaseMaterialGroup instance. + * CImplicitPort::GetIdentifier - Retrieves the identifier of the port + * @return the identifier */ - PBaseMaterialGroup CBaseMaterialGroupIterator::GetCurrentBaseMaterialGroup() + std::string CImplicitPort::GetIdentifier() { - Lib3MFHandle hResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroupIterator_GetCurrentBaseMaterialGroup(m_pHandle, &hResource)); + Lib3MF_uint32 bytesNeededIdentifier = 0; + Lib3MF_uint32 bytesWrittenIdentifier = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPort_GetIdentifier(m_pHandle, 0, &bytesNeededIdentifier, nullptr)); + std::vector bufferIdentifier(bytesNeededIdentifier); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPort_GetIdentifier(m_pHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0])); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return std::string(&bufferIdentifier[0]); } /** - * Method definitions for class CColorGroupIterator - */ + * CImplicitPort::SetIdentifier - Sets the identifier of the port + * @param[in] sIdentifier - the identifier + */ + void CImplicitPort::SetIdentifier(const std::string & sIdentifier) + { + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPort_SetIdentifier(m_pHandle, sIdentifier.c_str())); + } /** - * CColorGroupIterator::GetCurrentColorGroup - Returns the ColorGroup the iterator points at. - * @return returns the ColorGroup instance. + * CImplicitPort::GetDisplayName - Retrieves the display name of the port + * @return the display name */ - PColorGroup CColorGroupIterator::GetCurrentColorGroup() + std::string CImplicitPort::GetDisplayName() { - Lib3MFHandle hResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_ColorGroupIterator_GetCurrentColorGroup(m_pHandle, &hResource)); + Lib3MF_uint32 bytesNeededDisplayName = 0; + Lib3MF_uint32 bytesWrittenDisplayName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPort_GetDisplayName(m_pHandle, 0, &bytesNeededDisplayName, nullptr)); + std::vector bufferDisplayName(bytesNeededDisplayName); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPort_GetDisplayName(m_pHandle, bytesNeededDisplayName, &bytesWrittenDisplayName, &bufferDisplayName[0])); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return std::string(&bufferDisplayName[0]); } /** - * Method definitions for class CTexture2DGroupIterator - */ - - /** - * CTexture2DGroupIterator::GetCurrentTexture2DGroup - Returns the Texture2DGroup the iterator points at. - * @return returns the Texture2DGroup instance. + * CImplicitPort::SetDisplayName - Sets the display name of the port + * @param[in] sDisplayName - the display name */ - PTexture2DGroup CTexture2DGroupIterator::GetCurrentTexture2DGroup() + void CImplicitPort::SetDisplayName(const std::string & sDisplayName) { - Lib3MFHandle hResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroupIterator_GetCurrentTexture2DGroup(m_pHandle, &hResource)); - - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPort_SetDisplayName(m_pHandle, sDisplayName.c_str())); } /** - * Method definitions for class CCompositeMaterialsIterator - */ + * CImplicitPort::SetType - Sets the type of the port + * @param[in] eImplicitPortType - the type + */ + void CImplicitPort::SetType(const eImplicitPortType eImplicitPortType) + { + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPort_SetType(m_pHandle, eImplicitPortType)); + } /** - * CCompositeMaterialsIterator::GetCurrentCompositeMaterials - Returns the CompositeMaterials the iterator points at. - * @return returns the CompositeMaterials instance. + * CImplicitPort::GetType - Retrieves the type of the port + * @return the type */ - PCompositeMaterials CCompositeMaterialsIterator::GetCurrentCompositeMaterials() + eImplicitPortType CImplicitPort::GetType() { - Lib3MFHandle hResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterialsIterator_GetCurrentCompositeMaterials(m_pHandle, &hResource)); + eImplicitPortType resultImplicitPortType = (eImplicitPortType) 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPort_GetType(m_pHandle, &resultImplicitPortType)); - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + return resultImplicitPortType; } /** - * Method definitions for class CMultiPropertyGroupIterator - */ + * CImplicitPort::GetReference - Retrieves the reference of the port, only used for input ports + * @return the reference + */ + std::string CImplicitPort::GetReference() + { + Lib3MF_uint32 bytesNeededReference = 0; + Lib3MF_uint32 bytesWrittenReference = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPort_GetReference(m_pHandle, 0, &bytesNeededReference, nullptr)); + std::vector bufferReference(bytesNeededReference); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPort_GetReference(m_pHandle, bytesNeededReference, &bytesWrittenReference, &bufferReference[0])); + + return std::string(&bufferReference[0]); + } /** - * CMultiPropertyGroupIterator::GetCurrentMultiPropertyGroup - Returns the MultiPropertyGroup the iterator points at. - * @return returns the MultiPropertyGroup instance. + * CImplicitPort::SetReference - Sets the reference of the port, only used for input ports + * @param[in] sReference - the reference */ - PMultiPropertyGroup CMultiPropertyGroupIterator::GetCurrentMultiPropertyGroup() + void CImplicitPort::SetReference(const std::string & sReference) { - Lib3MFHandle hResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup(m_pHandle, &hResource)); - - if (!hResource) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); - } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPort_SetReference(m_pHandle, sReference.c_str())); } /** - * Method definitions for class CMetaData + * Method definitions for class CIterator */ /** - * CMetaData::GetNameSpace - returns the namespace URL of the metadata - * @return the namespace URL of the metadata + * CIterator::MoveNext - Iterates to the next item in the list. + * @return Iterates to the next item in the list. */ - std::string CMetaData::GetNameSpace() + bool CIterator::MoveNext() { - Lib3MF_uint32 bytesNeededNameSpace = 0; - Lib3MF_uint32 bytesWrittenNameSpace = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetNameSpace(m_pHandle, 0, &bytesNeededNameSpace, nullptr)); - std::vector bufferNameSpace(bytesNeededNameSpace); - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetNameSpace(m_pHandle, bytesNeededNameSpace, &bytesWrittenNameSpace, &bufferNameSpace[0])); + bool resultHasNext = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Iterator_MoveNext(m_pHandle, &resultHasNext)); - return std::string(&bufferNameSpace[0]); + return resultHasNext; } /** - * CMetaData::SetNameSpace - sets a new namespace URL of the metadata - * @param[in] sNameSpace - the new namespace URL of the metadata + * CIterator::MovePrevious - Iterates to the previous item in the list. + * @return Iterates to the previous item in the list. */ - void CMetaData::SetNameSpace(const std::string & sNameSpace) + bool CIterator::MovePrevious() { - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_SetNameSpace(m_pHandle, sNameSpace.c_str())); + bool resultHasPrevious = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Iterator_MovePrevious(m_pHandle, &resultHasPrevious)); + + return resultHasPrevious; } /** - * CMetaData::GetName - returns the name of a metadata - * @return the name of the metadata + * CIterator::Count - Returns the number of items the iterator captures. + * @return returns the number of items the iterator captures. */ - std::string CMetaData::GetName() + Lib3MF_uint64 CIterator::Count() { - Lib3MF_uint32 bytesNeededName = 0; - Lib3MF_uint32 bytesWrittenName = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetName(m_pHandle, 0, &bytesNeededName, nullptr)); - std::vector bufferName(bytesNeededName); - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetName(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); + Lib3MF_uint64 resultCount = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Iterator_Count(m_pHandle, &resultCount)); - return std::string(&bufferName[0]); + return resultCount; } /** - * CMetaData::SetName - sets a new name of a metadata - * @param[in] sName - the new name of the metadata - */ - void CMetaData::SetName(const std::string & sName) - { - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_SetName(m_pHandle, sName.c_str())); - } + * Method definitions for class CImplicitPortIterator + */ /** - * CMetaData::GetKey - returns the (namespace+name) of a metadata - * @return the key (namespace+name) of the metadata + * CImplicitPortIterator::GetCurrent - Returns the current element + * @return The current element */ - std::string CMetaData::GetKey() + PImplicitPort CImplicitPortIterator::GetCurrent() { - Lib3MF_uint32 bytesNeededKey = 0; - Lib3MF_uint32 bytesWrittenKey = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetKey(m_pHandle, 0, &bytesNeededKey, nullptr)); - std::vector bufferKey(bytesNeededKey); - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetKey(m_pHandle, bytesNeededKey, &bytesWrittenKey, &bufferKey[0])); + Lib3MFHandle hPort = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitPortIterator_GetCurrent(m_pHandle, &hPort)); - return std::string(&bufferKey[0]); + if (!hPort) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPort))); } /** - * CMetaData::GetMustPreserve - returns, whether a metadata must be preserved - * @return returns, whether a metadata must be preserved + * Method definitions for class CImplicitNode + */ + + /** + * CImplicitNode::GetIdentifier - Retrieves the identifier of the node + * @return the identifier */ - bool CMetaData::GetMustPreserve() + std::string CImplicitNode::GetIdentifier() { - bool resultMustPreserve = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetMustPreserve(m_pHandle, &resultMustPreserve)); + Lib3MF_uint32 bytesNeededIdentifier = 0; + Lib3MF_uint32 bytesWrittenIdentifier = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_GetIdentifier(m_pHandle, 0, &bytesNeededIdentifier, nullptr)); + std::vector bufferIdentifier(bytesNeededIdentifier); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_GetIdentifier(m_pHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0])); - return resultMustPreserve; + return std::string(&bufferIdentifier[0]); } /** - * CMetaData::SetMustPreserve - sets whether a metadata must be preserved - * @param[in] bMustPreserve - a new value whether a metadata must be preserved + * CImplicitNode::SetIdentifier - Sets the identifier of the node + * @param[in] sIdentifier - the identifier */ - void CMetaData::SetMustPreserve(const bool bMustPreserve) + void CImplicitNode::SetIdentifier(const std::string & sIdentifier) { - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_SetMustPreserve(m_pHandle, bMustPreserve)); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_SetIdentifier(m_pHandle, sIdentifier.c_str())); } /** - * CMetaData::GetType - returns the type of a metadata - * @return the type of the metadata + * CImplicitNode::GetDisplayName - Retrieves the display name of the node + * @return the display name */ - std::string CMetaData::GetType() - { - Lib3MF_uint32 bytesNeededType = 0; - Lib3MF_uint32 bytesWrittenType = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetType(m_pHandle, 0, &bytesNeededType, nullptr)); - std::vector bufferType(bytesNeededType); - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetType(m_pHandle, bytesNeededType, &bytesWrittenType, &bufferType[0])); + std::string CImplicitNode::GetDisplayName() + { + Lib3MF_uint32 bytesNeededDisplayName = 0; + Lib3MF_uint32 bytesWrittenDisplayName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_GetDisplayName(m_pHandle, 0, &bytesNeededDisplayName, nullptr)); + std::vector bufferDisplayName(bytesNeededDisplayName); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_GetDisplayName(m_pHandle, bytesNeededDisplayName, &bytesWrittenDisplayName, &bufferDisplayName[0])); - return std::string(&bufferType[0]); + return std::string(&bufferDisplayName[0]); } /** - * CMetaData::SetType - sets a new type of a metadata. This must be a simple XML type - * @param[in] sType - a new type of the metadata + * CImplicitNode::SetDisplayName - Sets the display name of the node + * @param[in] sDisplayName - the display name */ - void CMetaData::SetType(const std::string & sType) + void CImplicitNode::SetDisplayName(const std::string & sDisplayName) { - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_SetType(m_pHandle, sType.c_str())); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_SetDisplayName(m_pHandle, sDisplayName.c_str())); } /** - * CMetaData::GetValue - returns the value of the metadata - * @return the value of the metadata + * CImplicitNode::GetTag - Retrieves the tag of the node + * @return the tag */ - std::string CMetaData::GetValue() + std::string CImplicitNode::GetTag() { - Lib3MF_uint32 bytesNeededValue = 0; - Lib3MF_uint32 bytesWrittenValue = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetValue(m_pHandle, 0, &bytesNeededValue, nullptr)); - std::vector bufferValue(bytesNeededValue); - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_GetValue(m_pHandle, bytesNeededValue, &bytesWrittenValue, &bufferValue[0])); + Lib3MF_uint32 bytesNeededTag = 0; + Lib3MF_uint32 bytesWrittenTag = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_GetTag(m_pHandle, 0, &bytesNeededTag, nullptr)); + std::vector bufferTag(bytesNeededTag); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_GetTag(m_pHandle, bytesNeededTag, &bytesWrittenTag, &bufferTag[0])); - return std::string(&bufferValue[0]); + return std::string(&bufferTag[0]); } /** - * CMetaData::SetValue - sets a new value of the metadata - * @param[in] sValue - a new value of the metadata + * CImplicitNode::SetTag - Sets the tag of the node + * @param[in] sTag - the tag */ - void CMetaData::SetValue(const std::string & sValue) + void CImplicitNode::SetTag(const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_MetaData_SetValue(m_pHandle, sValue.c_str())); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_SetTag(m_pHandle, sTag.c_str())); } /** - * Method definitions for class CMetaDataGroup - */ + * CImplicitNode::GetNodeType - Retrieves the type of the node + * @return the type of the node + */ + eImplicitNodeType CImplicitNode::GetNodeType() + { + eImplicitNodeType resultType = (eImplicitNodeType) 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_GetNodeType(m_pHandle, &resultType)); + + return resultType; + } /** - * CMetaDataGroup::GetMetaDataCount - returns the number of metadata in this metadatagroup - * @return returns the number metadata + * CImplicitNode::AddInput - Add an input + * @param[in] sIdentifier - the identifier of the input + * @param[in] sDisplayName - the display name of the input + * @return */ - Lib3MF_uint32 CMetaDataGroup::GetMetaDataCount() + PImplicitPort CImplicitNode::AddInput(const std::string & sIdentifier, const std::string & sDisplayName) { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_GetMetaDataCount(m_pHandle, &resultCount)); + Lib3MFHandle hPort = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_AddInput(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), &hPort)); - return resultCount; + if (!hPort) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPort))); } /** - * CMetaDataGroup::GetMetaData - returns a metadata value within this metadatagroup - * @param[in] nIndex - Index of the Metadata. - * @return an instance of the metadata + * CImplicitNode::GetInputs - Retrieves the inputs + * @return the iterator for the inputs */ - PMetaData CMetaDataGroup::GetMetaData(const Lib3MF_uint32 nIndex) + PImplicitPortIterator CImplicitNode::GetInputs() { - Lib3MFHandle hMetaData = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_GetMetaData(m_pHandle, nIndex, &hMetaData)); + Lib3MFHandle hIterator = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_GetInputs(m_pHandle, &hIterator)); - if (!hMetaData) { + if (!hIterator) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hIterator))); } /** - * CMetaDataGroup::GetMetaDataByKey - returns a metadata value within this metadatagroup - * @param[in] sNameSpace - the namespace of the metadata - * @param[in] sName - the name of the Metadata - * @return an instance of the metadata + * CImplicitNode::AddOutput - Add an output + * @param[in] sIdentifier - the identifier of the output + * @param[in] sDisplayName - the display name of the output + * @return */ - PMetaData CMetaDataGroup::GetMetaDataByKey(const std::string & sNameSpace, const std::string & sName) + PImplicitPort CImplicitNode::AddOutput(const std::string & sIdentifier, const std::string & sDisplayName) { - Lib3MFHandle hMetaData = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_GetMetaDataByKey(m_pHandle, sNameSpace.c_str(), sName.c_str(), &hMetaData)); + Lib3MFHandle hPort = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_AddOutput(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), &hPort)); - if (!hMetaData) { + if (!hPort) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPort))); } /** - * CMetaDataGroup::RemoveMetaDataByIndex - removes metadata by index from the model. - * @param[in] nIndex - Index of the metadata to remove + * CImplicitNode::GetOutputs - Retrieves the outputs + * @return the iterator the outputs */ - void CMetaDataGroup::RemoveMetaDataByIndex(const Lib3MF_uint32 nIndex) + PImplicitPortIterator CImplicitNode::GetOutputs() { - CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_RemoveMetaDataByIndex(m_pHandle, nIndex)); + Lib3MFHandle hIterator = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_GetOutputs(m_pHandle, &hIterator)); + + if (!hIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hIterator))); } /** - * CMetaDataGroup::RemoveMetaData - removes metadata from the model. - * @param[in] pTheMetaData - The metadata to remove + * CImplicitNode::FindInput - Retrieves an input + * @param[in] sIdentifier - the identifier of the input + * @return the input port */ - void CMetaDataGroup::RemoveMetaData(classParam pTheMetaData) + PImplicitPort CImplicitNode::FindInput(const std::string & sIdentifier) { - Lib3MFHandle hTheMetaData = pTheMetaData.GetHandle(); - CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_RemoveMetaData(m_pHandle, hTheMetaData)); + Lib3MFHandle hInput = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_FindInput(m_pHandle, sIdentifier.c_str(), &hInput)); + + if (hInput) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hInput))); + } else { + return nullptr; + } } /** - * CMetaDataGroup::AddMetaData - adds a new metadata to this metadatagroup - * @param[in] sNameSpace - the namespace of the metadata - * @param[in] sName - the name of the metadata - * @param[in] sValue - the value of the metadata - * @param[in] sType - the type of the metadata - * @param[in] bMustPreserve - shuold the metadata be preserved - * @return a new instance of the metadata + * CImplicitNode::FindOutput - Retrieves an output + * @param[in] sIdentifier - the identifier of the output + * @return the output port */ - PMetaData CMetaDataGroup::AddMetaData(const std::string & sNameSpace, const std::string & sName, const std::string & sValue, const std::string & sType, const bool bMustPreserve) + PImplicitPort CImplicitNode::FindOutput(const std::string & sIdentifier) { - Lib3MFHandle hMetaData = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_MetaDataGroup_AddMetaData(m_pHandle, sNameSpace.c_str(), sName.c_str(), sValue.c_str(), sType.c_str(), bMustPreserve, &hMetaData)); + Lib3MFHandle hOutput = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_FindOutput(m_pHandle, sIdentifier.c_str(), &hOutput)); - if (!hMetaData) { - CheckError(LIB3MF_ERROR_INVALIDPARAM); + if (hOutput) { + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hOutput))); + } else { + return nullptr; } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaData))); } /** - * Method definitions for class CObject + * CImplicitNode::AreTypesValid - Checks if the types of the input and output ports are valid for the node type + * @return true, if the types are valid + */ + bool CImplicitNode::AreTypesValid() + { + bool resultValid = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitNode_AreTypesValid(m_pHandle, &resultValid)); + + return resultValid; + } + + /** + * Method definitions for class COneInputNode */ /** - * CObject::GetType - Retrieves an object's type - * @return returns object type enum. + * COneInputNode::GetInputA - Retrieves the input + * @return the input */ - eObjectType CObject::GetType() + PImplicitPort COneInputNode::GetInputA() { - eObjectType resultObjectType = (eObjectType) 0; - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetType(m_pHandle, &resultObjectType)); + Lib3MFHandle hInput = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_OneInputNode_GetInputA(m_pHandle, &hInput)); - return resultObjectType; + if (!hInput) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hInput))); } /** - * CObject::SetType - Sets an object's type - * @param[in] eObjectType - object type enum. + * COneInputNode::GetOutputResult - Retrieves the output + * @return the output */ - void CObject::SetType(const eObjectType eObjectType) + PImplicitPort COneInputNode::GetOutputResult() { - CheckError(m_pWrapper->m_WrapperTable.m_Object_SetType(m_pHandle, eObjectType)); + Lib3MFHandle hResult = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_OneInputNode_GetOutputResult(m_pHandle, &hResult)); + + if (!hResult) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); } /** - * CObject::GetName - Retrieves an object's name - * @return returns object name. + * Method definitions for class CSinNode + */ + + /** + * Method definitions for class CCosNode + */ + + /** + * Method definitions for class CTanNode + */ + + /** + * Method definitions for class CArcSinNode + */ + + /** + * Method definitions for class CArcCosNode + */ + + /** + * Method definitions for class CArcTanNode + */ + + /** + * Method definitions for class CSinhNode + */ + + /** + * Method definitions for class CCoshNode + */ + + /** + * Method definitions for class CTanhNode + */ + + /** + * Method definitions for class CRoundNode + */ + + /** + * Method definitions for class CCeilNode + */ + + /** + * Method definitions for class CFloorNode + */ + + /** + * Method definitions for class CSignNode + */ + + /** + * Method definitions for class CFractNode + */ + + /** + * Method definitions for class CAbsNode + */ + + /** + * Method definitions for class CExpNode + */ + + /** + * Method definitions for class CLogNode + */ + + /** + * Method definitions for class CLog2Node + */ + + /** + * Method definitions for class CLog10Node + */ + + /** + * Method definitions for class CLengthNode + */ + + /** + * Method definitions for class CTransposeNode + */ + + /** + * Method definitions for class CInverseNode + */ + + /** + * Method definitions for class CSqrtNode + */ + + /** + * Method definitions for class CResourceIdNode + */ + + /** + * CResourceIdNode::SetResource - Sets the Resource that the resourceid attribute of the node will point to + * @param[in] pResource - the resource */ - std::string CObject::GetName() + void CResourceIdNode::SetResource(classParam pResource) { - Lib3MF_uint32 bytesNeededName = 0; - Lib3MF_uint32 bytesWrittenName = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetName(m_pHandle, 0, &bytesNeededName, nullptr)); - std::vector bufferName(bytesNeededName); - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetName(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); + Lib3MFHandle hResource = pResource.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_ResourceIdNode_SetResource(m_pHandle, hResource)); + } + + /** + * CResourceIdNode::GetResource - Retrieves the resource of the node + * @return the resource + */ + PResource CResourceIdNode::GetResource() + { + Lib3MFHandle hResource = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ResourceIdNode_GetResource(m_pHandle, &hResource)); - return std::string(&bufferName[0]); + if (!hResource) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResource))); } /** - * CObject::SetName - Sets an object's name string - * @param[in] sName - new object name. + * CResourceIdNode::GetOutputValue - Retrieves the output + * @return the output */ - void CObject::SetName(const std::string & sName) + PImplicitPort CResourceIdNode::GetOutputValue() { - CheckError(m_pWrapper->m_WrapperTable.m_Object_SetName(m_pHandle, sName.c_str())); + Lib3MFHandle hValue = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ResourceIdNode_GetOutputValue(m_pHandle, &hValue)); + + if (!hValue) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hValue))); } /** - * CObject::GetPartNumber - Retrieves an object's part number - * @return returns object part number. + * Method definitions for class CTwoInputNode + */ + + /** + * CTwoInputNode::GetInputB - Retrieves the second input + * @return the second input */ - std::string CObject::GetPartNumber() + PImplicitPort CTwoInputNode::GetInputB() { - Lib3MF_uint32 bytesNeededPartNumber = 0; - Lib3MF_uint32 bytesWrittenPartNumber = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetPartNumber(m_pHandle, 0, &bytesNeededPartNumber, nullptr)); - std::vector bufferPartNumber(bytesNeededPartNumber); - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetPartNumber(m_pHandle, bytesNeededPartNumber, &bytesWrittenPartNumber, &bufferPartNumber[0])); + Lib3MFHandle hB = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_TwoInputNode_GetInputB(m_pHandle, &hB)); - return std::string(&bufferPartNumber[0]); + if (!hB) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hB))); } /** - * CObject::SetPartNumber - Sets an objects partnumber string - * @param[in] sPartNumber - new object part number. - */ - void CObject::SetPartNumber(const std::string & sPartNumber) - { - CheckError(m_pWrapper->m_WrapperTable.m_Object_SetPartNumber(m_pHandle, sPartNumber.c_str())); - } + * Method definitions for class CAdditionNode + */ + + /** + * Method definitions for class CSubtractionNode + */ + + /** + * Method definitions for class CMultiplicationNode + */ + + /** + * Method definitions for class CDivisionNode + */ + + /** + * Method definitions for class CDotNode + */ + + /** + * Method definitions for class CCrossNode + */ + + /** + * Method definitions for class CArcTan2Node + */ + + /** + * Method definitions for class CMatVecMultiplicationNode + */ + + /** + * Method definitions for class CMinNode + */ + + /** + * Method definitions for class CMaxNode + */ + + /** + * Method definitions for class CFmodNode + */ + + /** + * Method definitions for class CModNode + */ + + /** + * Method definitions for class CPowNode + */ + + /** + * Method definitions for class CSelectNode + */ /** - * CObject::IsMeshObject - Retrieves, if an object is a mesh object - * @return returns, whether the object is a mesh object + * CSelectNode::GetInputB - Retrieves the second input + * @return the second input */ - bool CObject::IsMeshObject() + PImplicitPort CSelectNode::GetInputB() { - bool resultIsMeshObject = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Object_IsMeshObject(m_pHandle, &resultIsMeshObject)); + Lib3MFHandle hB = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_SelectNode_GetInputB(m_pHandle, &hB)); - return resultIsMeshObject; + if (!hB) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hB))); } /** - * CObject::IsComponentsObject - Retrieves, if an object is a components object - * @return returns, whether the object is a components object + * CSelectNode::GetInputC - Retrieves the third input + * @return the third input */ - bool CObject::IsComponentsObject() + PImplicitPort CSelectNode::GetInputC() { - bool resultIsComponentsObject = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Object_IsComponentsObject(m_pHandle, &resultIsComponentsObject)); + Lib3MFHandle hC = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_SelectNode_GetInputC(m_pHandle, &hC)); - return resultIsComponentsObject; + if (!hC) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hC))); } /** - * CObject::IsValid - Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. - * @return returns whether the object is a valid object description + * CSelectNode::GetInputD - Retrieves the fourth input + * @return the fourth input */ - bool CObject::IsValid() + PImplicitPort CSelectNode::GetInputD() { - bool resultIsValid = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Object_IsValid(m_pHandle, &resultIsValid)); + Lib3MFHandle hD = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_SelectNode_GetInputD(m_pHandle, &hD)); - return resultIsValid; + if (!hD) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hD))); } /** - * CObject::SetAttachmentAsThumbnail - Use an existing attachment as thumbnail for this object - * @param[in] pAttachment - Instance of a new or the existing thumbnailattachment object. - */ - void CObject::SetAttachmentAsThumbnail(classParam pAttachment) - { - Lib3MFHandle hAttachment = pAttachment.GetHandle(); - CheckError(m_pWrapper->m_WrapperTable.m_Object_SetAttachmentAsThumbnail(m_pHandle, hAttachment)); - } + * Method definitions for class CClampNode + */ /** - * CObject::GetThumbnailAttachment - Get the attachment containing the object thumbnail. - * @return Instance of the thumbnailattachment object or NULL. + * CClampNode::GetInputMin - Retrieves the input for the lower limit + * @return the input for the lower limit */ - PAttachment CObject::GetThumbnailAttachment() + PImplicitPort CClampNode::GetInputMin() { - Lib3MFHandle hAttachment = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetThumbnailAttachment(m_pHandle, &hAttachment)); + Lib3MFHandle hMin = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ClampNode_GetInputMin(m_pHandle, &hMin)); - if (hAttachment) { - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hAttachment))); - } else { - return nullptr; + if (!hMin) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMin))); } /** - * CObject::ClearThumbnailAttachment - Clears the attachment. The attachment instance is not removed from the package. + * CClampNode::GetInputMax - Retrieves the input for the upper limit + * @return the input for the upper limit */ - void CObject::ClearThumbnailAttachment() + PImplicitPort CClampNode::GetInputMax() { - CheckError(m_pWrapper->m_WrapperTable.m_Object_ClearThumbnailAttachment(m_pHandle)); + Lib3MFHandle hMax = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ClampNode_GetInputMax(m_pHandle, &hMax)); + + if (!hMax) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMax))); } /** - * CObject::GetOutbox - Returns the outbox of a build item - * @return Outbox of this build item + * Method definitions for class CComposeVectorNode + */ + + /** + * CComposeVectorNode::GetInputX - Retrieves the input for the x component + * @return the input for the x component */ - sBox CObject::GetOutbox() + PImplicitPort CComposeVectorNode::GetInputX() { - sBox resultOutbox; - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetOutbox(m_pHandle, &resultOutbox)); + Lib3MFHandle hX = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeVectorNode_GetInputX(m_pHandle, &hX)); - return resultOutbox; + if (!hX) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hX))); } /** - * CObject::GetUUID - Retrieves an object's uuid string (see production extension specification) - * @param[out] bHasUUID - flag whether the build item has a UUID - * @return returns object uuid. + * CComposeVectorNode::GetInputY - Retrieves the input for the y component + * @return the input for the y component */ - std::string CObject::GetUUID(bool & bHasUUID) + PImplicitPort CComposeVectorNode::GetInputY() { - Lib3MF_uint32 bytesNeededUUID = 0; - Lib3MF_uint32 bytesWrittenUUID = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetUUID(m_pHandle, &bHasUUID, 0, &bytesNeededUUID, nullptr)); - std::vector bufferUUID(bytesNeededUUID); - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetUUID(m_pHandle, &bHasUUID, bytesNeededUUID, &bytesWrittenUUID, &bufferUUID[0])); + Lib3MFHandle hY = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeVectorNode_GetInputY(m_pHandle, &hY)); - return std::string(&bufferUUID[0]); + if (!hY) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hY))); } /** - * CObject::SetUUID - Sets a build object's uuid string (see production extension specification) - * @param[in] sUUID - new object uuid string. + * CComposeVectorNode::GetInputZ - Retrieves the input for the z component + * @return the input for the z component */ - void CObject::SetUUID(const std::string & sUUID) + PImplicitPort CComposeVectorNode::GetInputZ() { - CheckError(m_pWrapper->m_WrapperTable.m_Object_SetUUID(m_pHandle, sUUID.c_str())); + Lib3MFHandle hZ = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeVectorNode_GetInputZ(m_pHandle, &hZ)); + + if (!hZ) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hZ))); } /** - * CObject::GetMetaDataGroup - Returns the metadatagroup of this object - * @return returns an Instance of the metadatagroup of this object + * CComposeVectorNode::GetOutputResult - Retrieves the output + * @return the output */ - PMetaDataGroup CObject::GetMetaDataGroup() + PImplicitPort CComposeVectorNode::GetOutputResult() { - Lib3MFHandle hMetaDataGroup = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetMetaDataGroup(m_pHandle, &hMetaDataGroup)); + Lib3MFHandle hResult = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeVectorNode_GetOutputResult(m_pHandle, &hResult)); - if (!hMetaDataGroup) { + if (!hResult) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMetaDataGroup))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); } /** - * CObject::SetSlicesMeshResolution - set the meshresolution of the mesh object - * @param[in] eMeshResolution - meshresolution of this object + * Method definitions for class CVectorFromScalarNode + */ + + /** + * Method definitions for class CDecomposeVectorNode + */ + + /** + * CDecomposeVectorNode::GetInputA - Retrieves the input + * @return the input port for the vector to decompose */ - void CObject::SetSlicesMeshResolution(const eSlicesMeshResolution eMeshResolution) + PImplicitPort CDecomposeVectorNode::GetInputA() { - CheckError(m_pWrapper->m_WrapperTable.m_Object_SetSlicesMeshResolution(m_pHandle, eMeshResolution)); + Lib3MFHandle hA = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_DecomposeVectorNode_GetInputA(m_pHandle, &hA)); + + if (!hA) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hA))); } /** - * CObject::GetSlicesMeshResolution - get the meshresolution of the mesh object - * @return meshresolution of this object + * CDecomposeVectorNode::GetOutputX - Retrieves the output for the x component + * @return the output for the x component */ - eSlicesMeshResolution CObject::GetSlicesMeshResolution() + PImplicitPort CDecomposeVectorNode::GetOutputX() { - eSlicesMeshResolution resultMeshResolution = (eSlicesMeshResolution) 0; - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetSlicesMeshResolution(m_pHandle, &resultMeshResolution)); + Lib3MFHandle hX = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_DecomposeVectorNode_GetOutputX(m_pHandle, &hX)); - return resultMeshResolution; + if (!hX) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hX))); } /** - * CObject::HasSlices - returns whether the Object has a slice stack. If Recursive is true, also checks whether any references object has a slice stack - * @param[in] bRecursive - check also all referenced objects? - * @return does the object have a slice stack? + * CDecomposeVectorNode::GetOutputY - Retrieves the output for the y component + * @return the output for the y component */ - bool CObject::HasSlices(const bool bRecursive) + PImplicitPort CDecomposeVectorNode::GetOutputY() { - bool resultHasSlices = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Object_HasSlices(m_pHandle, bRecursive, &resultHasSlices)); + Lib3MFHandle hY = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_DecomposeVectorNode_GetOutputY(m_pHandle, &hY)); - return resultHasSlices; + if (!hY) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hY))); } /** - * CObject::ClearSliceStack - unlinks the attached slicestack from this object. If no slice stack is attached, do noting. + * CDecomposeVectorNode::GetOutputZ - Retrieves the output for the z component + * @return the output for the z component */ - void CObject::ClearSliceStack() + PImplicitPort CDecomposeVectorNode::GetOutputZ() { - CheckError(m_pWrapper->m_WrapperTable.m_Object_ClearSliceStack(m_pHandle)); + Lib3MFHandle hZ = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_DecomposeVectorNode_GetOutputZ(m_pHandle, &hZ)); + + if (!hZ) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hZ))); } /** - * CObject::GetSliceStack - get the Slicestack attached to the object - * @return returns the slicestack instance + * Method definitions for class CComposeMatrixNode + */ + + /** + * CComposeMatrixNode::GetInputM00 - Retrieves the input for the element 0 0 + * @return the input for the m00 element */ - PSliceStack CObject::GetSliceStack() + PImplicitPort CComposeMatrixNode::GetInputM00() { - Lib3MFHandle hSliceStackInstance = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_Object_GetSliceStack(m_pHandle, &hSliceStackInstance)); + Lib3MFHandle hM00 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM00(m_pHandle, &hM00)); - if (!hSliceStackInstance) { + if (!hM00) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSliceStackInstance))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM00))); } /** - * CObject::AssignSliceStack - assigns a slicestack to the object - * @param[in] pSliceStackInstance - the new slice stack of this Object + * CComposeMatrixNode::GetInputM01 - Retrieves the input for the element 0 1 + * @return the input for the m01 element */ - void CObject::AssignSliceStack(classParam pSliceStackInstance) + PImplicitPort CComposeMatrixNode::GetInputM01() { - Lib3MFHandle hSliceStackInstance = pSliceStackInstance.GetHandle(); - CheckError(m_pWrapper->m_WrapperTable.m_Object_AssignSliceStack(m_pHandle, hSliceStackInstance)); + Lib3MFHandle hM01 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM01(m_pHandle, &hM01)); + + if (!hM01) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM01))); } /** - * Method definitions for class CMeshObject - */ - - /** - * CMeshObject::GetVertexCount - Returns the vertex count of a mesh object. - * @return filled with the vertex count. + * CComposeMatrixNode::GetInputM02 - Retrieves the input for the element 0 2 + * @return the input for the m02 element */ - Lib3MF_uint32 CMeshObject::GetVertexCount() + PImplicitPort CComposeMatrixNode::GetInputM02() { - Lib3MF_uint32 resultVertexCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetVertexCount(m_pHandle, &resultVertexCount)); + Lib3MFHandle hM02 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM02(m_pHandle, &hM02)); - return resultVertexCount; + if (!hM02) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM02))); } /** - * CMeshObject::GetTriangleCount - Returns the triangle count of a mesh object. - * @return filled with the triangle count. + * CComposeMatrixNode::GetInputM03 - Retrieves the input for the element 0 3 + * @return the input for the m03 element */ - Lib3MF_uint32 CMeshObject::GetTriangleCount() + PImplicitPort CComposeMatrixNode::GetInputM03() { - Lib3MF_uint32 resultVertexCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetTriangleCount(m_pHandle, &resultVertexCount)); + Lib3MFHandle hM03 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM03(m_pHandle, &hM03)); - return resultVertexCount; + if (!hM03) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM03))); } /** - * CMeshObject::GetVertex - Returns the vertex count of a mesh object. - * @param[in] nIndex - Index of the vertex (0 to vertexcount - 1) - * @return filled with the vertex coordinates. + * CComposeMatrixNode::GetInputM10 - Retrieves the input for the element 1 0 + * @return the input for the m10 element */ - sPosition CMeshObject::GetVertex(const Lib3MF_uint32 nIndex) + PImplicitPort CComposeMatrixNode::GetInputM10() { - sPosition resultCoordinates; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetVertex(m_pHandle, nIndex, &resultCoordinates)); + Lib3MFHandle hM10 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM10(m_pHandle, &hM10)); - return resultCoordinates; + if (!hM10) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM10))); } /** - * CMeshObject::SetVertex - Sets the coordinates of a single vertex of a mesh object - * @param[in] nIndex - Index of the vertex (0 to vertexcount - 1) - * @param[in] Coordinates - contains the vertex coordinates. + * CComposeMatrixNode::GetInputM11 - Retrieves the input for the element 1 1 + * @return the input for the m11 element */ - void CMeshObject::SetVertex(const Lib3MF_uint32 nIndex, const sPosition & Coordinates) + PImplicitPort CComposeMatrixNode::GetInputM11() { - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetVertex(m_pHandle, nIndex, &Coordinates)); + Lib3MFHandle hM11 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM11(m_pHandle, &hM11)); + + if (!hM11) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM11))); } /** - * CMeshObject::AddVertex - Adds a single vertex to a mesh object - * @param[in] Coordinates - contains the vertex coordinates. - * @return Index of the new vertex + * CComposeMatrixNode::GetInputM12 - Retrieves the input for the element 1 2 + * @return the input for the m12 element */ - Lib3MF_uint32 CMeshObject::AddVertex(const sPosition & Coordinates) + PImplicitPort CComposeMatrixNode::GetInputM12() { - Lib3MF_uint32 resultNewIndex = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_AddVertex(m_pHandle, &Coordinates, &resultNewIndex)); + Lib3MFHandle hM12 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM12(m_pHandle, &hM12)); - return resultNewIndex; + if (!hM12) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM12))); } /** - * CMeshObject::GetVertices - Obtains all vertex positions of a mesh object - * @param[out] VerticesBuffer - contains the vertex coordinates. + * CComposeMatrixNode::GetInputM13 - Retrieves the input for the element 1 3 + * @return the input for the m3 element */ - void CMeshObject::GetVertices(std::vector & VerticesBuffer) + PImplicitPort CComposeMatrixNode::GetInputM13() { - Lib3MF_uint64 elementsNeededVertices = 0; - Lib3MF_uint64 elementsWrittenVertices = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetVertices(m_pHandle, 0, &elementsNeededVertices, nullptr)); - VerticesBuffer.resize((size_t) elementsNeededVertices); - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetVertices(m_pHandle, elementsNeededVertices, &elementsWrittenVertices, VerticesBuffer.data())); + Lib3MFHandle hM13 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM13(m_pHandle, &hM13)); + + if (!hM13) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM13))); } /** - * CMeshObject::GetTriangle - Returns indices of a single triangle of a mesh object. - * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) - * @return filled with the triangle indices. + * CComposeMatrixNode::GetInputM20 - Retrieves the input for the element 2 0 + * @return the input for the m2 element */ - sTriangle CMeshObject::GetTriangle(const Lib3MF_uint32 nIndex) + PImplicitPort CComposeMatrixNode::GetInputM20() { - sTriangle resultIndices; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetTriangle(m_pHandle, nIndex, &resultIndices)); + Lib3MFHandle hM20 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM20(m_pHandle, &hM20)); - return resultIndices; + if (!hM20) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM20))); } /** - * CMeshObject::SetTriangle - Sets the indices of a single triangle of a mesh object. - * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) - * @param[in] Indices - contains the triangle indices. + * CComposeMatrixNode::GetInputM21 - Retrieves the input for the element 2 1 + * @return */ - void CMeshObject::SetTriangle(const Lib3MF_uint32 nIndex, const sTriangle & Indices) + PImplicitPort CComposeMatrixNode::GetInputM21() { - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetTriangle(m_pHandle, nIndex, &Indices)); + Lib3MFHandle hM21 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM21(m_pHandle, &hM21)); + + if (!hM21) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM21))); } /** - * CMeshObject::AddTriangle - Adds a single triangle to a mesh object - * @param[in] Indices - contains the triangle indices. - * @return Index of the new triangle + * CComposeMatrixNode::GetInputM22 - Retrieves the input for the element 2 2 + * @return the input for the m22 element */ - Lib3MF_uint32 CMeshObject::AddTriangle(const sTriangle & Indices) + PImplicitPort CComposeMatrixNode::GetInputM22() { - Lib3MF_uint32 resultNewIndex = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_AddTriangle(m_pHandle, &Indices, &resultNewIndex)); + Lib3MFHandle hM22 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM22(m_pHandle, &hM22)); - return resultNewIndex; + if (!hM22) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM22))); } /** - * CMeshObject::GetTriangleIndices - Get all triangles of a mesh object - * @param[out] IndicesBuffer - contains the triangle indices. + * CComposeMatrixNode::GetInputM23 - Retrieves the input for the element 2 3 + * @return the input for the m23 element */ - void CMeshObject::GetTriangleIndices(std::vector & IndicesBuffer) + PImplicitPort CComposeMatrixNode::GetInputM23() { - Lib3MF_uint64 elementsNeededIndices = 0; - Lib3MF_uint64 elementsWrittenIndices = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetTriangleIndices(m_pHandle, 0, &elementsNeededIndices, nullptr)); - IndicesBuffer.resize((size_t) elementsNeededIndices); - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetTriangleIndices(m_pHandle, elementsNeededIndices, &elementsWrittenIndices, IndicesBuffer.data())); + Lib3MFHandle hM23 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM23(m_pHandle, &hM23)); + + if (!hM23) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM23))); } /** - * CMeshObject::SetObjectLevelProperty - Sets the property at the object-level of the mesh object. - * @param[in] nUniqueResourceID - the object-level Property UniqueResourceID. - * @param[in] nPropertyID - the object-level PropertyID. + * CComposeMatrixNode::GetInputM30 - Retrieves the input for the element 3 0 + * @return the input for the m30 element */ - void CMeshObject::SetObjectLevelProperty(const Lib3MF_uint32 nUniqueResourceID, const Lib3MF_uint32 nPropertyID) + PImplicitPort CComposeMatrixNode::GetInputM30() { - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetObjectLevelProperty(m_pHandle, nUniqueResourceID, nPropertyID)); + Lib3MFHandle hM30 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM30(m_pHandle, &hM30)); + + if (!hM30) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM30))); } - /** - * CMeshObject::GetObjectLevelProperty - Gets the property at the object-level of the mesh object. - * @param[out] nUniqueResourceID - the object-level Property UniqueResourceID. - * @param[out] nPropertyID - the object-level PropertyID. - * @return Has an object-level property been specified? + /** + * CComposeMatrixNode::GetInputM31 - Retrieves the input for the element 3 1 + * @return the input for the m31 element */ - bool CMeshObject::GetObjectLevelProperty(Lib3MF_uint32 & nUniqueResourceID, Lib3MF_uint32 & nPropertyID) + PImplicitPort CComposeMatrixNode::GetInputM31() { - bool resultHasObjectLevelProperty = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetObjectLevelProperty(m_pHandle, &nUniqueResourceID, &nPropertyID, &resultHasObjectLevelProperty)); + Lib3MFHandle hM31 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM31(m_pHandle, &hM31)); - return resultHasObjectLevelProperty; + if (!hM31) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM31))); } /** - * CMeshObject::SetTriangleProperties - Sets the properties of a single triangle of a mesh object. - * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) - * @param[in] Properties - contains the triangle properties. + * CComposeMatrixNode::GetInputM32 - Retrieves the input for the element 3 2 + * @return the input for the m32 element */ - void CMeshObject::SetTriangleProperties(const Lib3MF_uint32 nIndex, const sTriangleProperties & Properties) + PImplicitPort CComposeMatrixNode::GetInputM32() { - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetTriangleProperties(m_pHandle, nIndex, &Properties)); + Lib3MFHandle hM32 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM32(m_pHandle, &hM32)); + + if (!hM32) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM32))); } /** - * CMeshObject::GetTriangleProperties - Gets the properties of a single triangle of a mesh object. - * @param[in] nIndex - Index of the triangle (0 to trianglecount - 1) - * @param[out] Property - returns the triangle properties. + * CComposeMatrixNode::GetInputM33 - Retrieves the input for the element 3 3 + * @return the input for the m33 element */ - void CMeshObject::GetTriangleProperties(const Lib3MF_uint32 nIndex, sTriangleProperties & Property) + PImplicitPort CComposeMatrixNode::GetInputM33() { - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetTriangleProperties(m_pHandle, nIndex, &Property)); + Lib3MFHandle hM33 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetInputM33(m_pHandle, &hM33)); + + if (!hM33) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hM33))); } /** - * CMeshObject::SetAllTriangleProperties - Sets the properties of all triangles of a mesh object. Sets the object level property to the first entry of the passed triangle properties, if not yet specified. - * @param[in] PropertiesArrayBuffer - contains the triangle properties array. Must have trianglecount elements. + * CComposeMatrixNode::GetOutputResult - Retrieves the output + * @return the output */ - void CMeshObject::SetAllTriangleProperties(const CInputVector & PropertiesArrayBuffer) + PImplicitPort CComposeMatrixNode::GetOutputResult() { - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetAllTriangleProperties(m_pHandle, (Lib3MF_uint64)PropertiesArrayBuffer.size(), PropertiesArrayBuffer.data())); + Lib3MFHandle hResult = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ComposeMatrixNode_GetOutputResult(m_pHandle, &hResult)); + + if (!hResult) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); } /** - * CMeshObject::GetAllTriangleProperties - Gets the properties of all triangles of a mesh object. - * @param[out] PropertiesArrayBuffer - returns the triangle properties array. Must have trianglecount elements. + * Method definitions for class CMatrixFromRowsNode + */ + + /** + * CMatrixFromRowsNode::GetInputA - Retrieves the input for the first row + * @return the input for the first row */ - void CMeshObject::GetAllTriangleProperties(std::vector & PropertiesArrayBuffer) + PImplicitPort CMatrixFromRowsNode::GetInputA() { - Lib3MF_uint64 elementsNeededPropertiesArray = 0; - Lib3MF_uint64 elementsWrittenPropertiesArray = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetAllTriangleProperties(m_pHandle, 0, &elementsNeededPropertiesArray, nullptr)); - PropertiesArrayBuffer.resize((size_t) elementsNeededPropertiesArray); - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_GetAllTriangleProperties(m_pHandle, elementsNeededPropertiesArray, &elementsWrittenPropertiesArray, PropertiesArrayBuffer.data())); + Lib3MFHandle hRow0 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MatrixFromRowsNode_GetInputA(m_pHandle, &hRow0)); + + if (!hRow0) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hRow0))); } /** - * CMeshObject::ClearAllProperties - Clears all properties of this mesh object (triangle and object-level). + * CMatrixFromRowsNode::GetInputB - Retrieves the input for the second row + * @return the input for the second row */ - void CMeshObject::ClearAllProperties() + PImplicitPort CMatrixFromRowsNode::GetInputB() { - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_ClearAllProperties(m_pHandle)); + Lib3MFHandle hRow1 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MatrixFromRowsNode_GetInputB(m_pHandle, &hRow1)); + + if (!hRow1) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hRow1))); } /** - * CMeshObject::SetGeometry - Set all triangles of a mesh object - * @param[in] VerticesBuffer - contains the positions. - * @param[in] IndicesBuffer - contains the triangle indices. + * CMatrixFromRowsNode::GetInputC - Retrieves the input for the third row + * @return the input for the third row */ - void CMeshObject::SetGeometry(const CInputVector & VerticesBuffer, const CInputVector & IndicesBuffer) + PImplicitPort CMatrixFromRowsNode::GetInputC() { - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_SetGeometry(m_pHandle, (Lib3MF_uint64)VerticesBuffer.size(), VerticesBuffer.data(), (Lib3MF_uint64)IndicesBuffer.size(), IndicesBuffer.data())); + Lib3MFHandle hRow2 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MatrixFromRowsNode_GetInputC(m_pHandle, &hRow2)); + + if (!hRow2) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hRow2))); } /** - * CMeshObject::IsManifoldAndOriented - Retrieves, if an object describes a topologically oriented and manifold mesh, according to the core spec. - * @return returns, if the object is oriented and manifold. + * CMatrixFromRowsNode::GetInputD - Retrieves the input for the fourth row + * @return the input for the fourth row */ - bool CMeshObject::IsManifoldAndOriented() + PImplicitPort CMatrixFromRowsNode::GetInputD() { - bool resultIsManifoldAndOriented = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_IsManifoldAndOriented(m_pHandle, &resultIsManifoldAndOriented)); + Lib3MFHandle hRow3 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MatrixFromRowsNode_GetInputD(m_pHandle, &hRow3)); - return resultIsManifoldAndOriented; + if (!hRow3) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hRow3))); } /** - * CMeshObject::BeamLattice - Retrieves the BeamLattice within this MeshObject. - * @return the BeamLattice within this MeshObject + * CMatrixFromRowsNode::GetOutputResult - Retrieves the output + * @return the output */ - PBeamLattice CMeshObject::BeamLattice() + PImplicitPort CMatrixFromRowsNode::GetOutputResult() { - Lib3MFHandle hTheBeamLattice = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_MeshObject_BeamLattice(m_pHandle, &hTheBeamLattice)); + Lib3MFHandle hResult = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MatrixFromRowsNode_GetOutputResult(m_pHandle, &hResult)); - if (!hTheBeamLattice) { + if (!hResult) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheBeamLattice))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); } /** - * Method definitions for class CBeamLattice + * Method definitions for class CMatrixFromColumnsNode */ /** - * CBeamLattice::GetMinLength - Returns the minimal length of beams for the beamlattice. - * @return minimal length of beams for the beamlattice + * CMatrixFromColumnsNode::GetInputA - Retrieves the input for the first column + * @return the input for the first column */ - Lib3MF_double CBeamLattice::GetMinLength() + PImplicitPort CMatrixFromColumnsNode::GetInputA() { - Lib3MF_double resultMinLength = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetMinLength(m_pHandle, &resultMinLength)); + Lib3MFHandle hColumn0 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MatrixFromColumnsNode_GetInputA(m_pHandle, &hColumn0)); - return resultMinLength; + if (!hColumn0) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hColumn0))); } /** - * CBeamLattice::SetMinLength - Sets the minimal length of beams for the beamlattice. - * @param[in] dMinLength - minimal length of beams for the beamlattice + * CMatrixFromColumnsNode::GetInputB - Retrieves the input for the second column + * @return the input for the second column */ - void CBeamLattice::SetMinLength(const Lib3MF_double dMinLength) + PImplicitPort CMatrixFromColumnsNode::GetInputB() { - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetMinLength(m_pHandle, dMinLength)); + Lib3MFHandle hColumn1 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MatrixFromColumnsNode_GetInputB(m_pHandle, &hColumn1)); + + if (!hColumn1) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hColumn1))); } /** - * CBeamLattice::GetClipping - Returns the clipping mode and the clipping-mesh for the beamlattice of this mesh. - * @param[out] eClipMode - contains the clip mode of this mesh - * @param[out] nUniqueResourceID - filled with the UniqueResourceID of the clipping mesh-object or an undefined value if pClipMode is MODELBEAMLATTICECLIPMODE_NONE + * CMatrixFromColumnsNode::GetInputC - Retrieves the input for the third column + * @return the input for the third column */ - void CBeamLattice::GetClipping(eBeamLatticeClipMode & eClipMode, Lib3MF_uint32 & nUniqueResourceID) + PImplicitPort CMatrixFromColumnsNode::GetInputC() { - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetClipping(m_pHandle, &eClipMode, &nUniqueResourceID)); + Lib3MFHandle hColumn2 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MatrixFromColumnsNode_GetInputC(m_pHandle, &hColumn2)); + + if (!hColumn2) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hColumn2))); } /** - * CBeamLattice::SetClipping - Sets the clipping mode and the clipping-mesh for the beamlattice of this mesh. - * @param[in] eClipMode - contains the clip mode of this mesh - * @param[in] nUniqueResourceID - the UniqueResourceID of the clipping mesh-object. This mesh-object has to be defined before setting the Clipping. + * CMatrixFromColumnsNode::GetInputD - Retrieves the input for the fourth column + * @return the input for the fourth column */ - void CBeamLattice::SetClipping(const eBeamLatticeClipMode eClipMode, const Lib3MF_uint32 nUniqueResourceID) + PImplicitPort CMatrixFromColumnsNode::GetInputD() { - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetClipping(m_pHandle, eClipMode, nUniqueResourceID)); + Lib3MFHandle hColumn3 = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MatrixFromColumnsNode_GetInputD(m_pHandle, &hColumn3)); + + if (!hColumn3) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hColumn3))); } /** - * CBeamLattice::GetRepresentation - Returns the representation-mesh for the beamlattice of this mesh. - * @return flag whether the beamlattice has a representation mesh. - * @param[out] nUniqueResourceID - filled with the UniqueResourceID of the clipping mesh-object. + * CMatrixFromColumnsNode::GetOutputResult - Retrieves the output + * @return the output */ - bool CBeamLattice::GetRepresentation(Lib3MF_uint32 & nUniqueResourceID) + PImplicitPort CMatrixFromColumnsNode::GetOutputResult() { - bool resultHasRepresentation = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetRepresentation(m_pHandle, &resultHasRepresentation, &nUniqueResourceID)); + Lib3MFHandle hResult = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MatrixFromColumnsNode_GetOutputResult(m_pHandle, &hResult)); - return resultHasRepresentation; + if (!hResult) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResult))); } /** - * CBeamLattice::SetRepresentation - Sets the representation-mesh for the beamlattice of this mesh. - * @param[in] nUniqueResourceID - the UniqueResourceID of the representation mesh-object. This mesh-object has to be defined before setting the representation. - */ - void CBeamLattice::SetRepresentation(const Lib3MF_uint32 nUniqueResourceID) - { - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetRepresentation(m_pHandle, nUniqueResourceID)); - } + * Method definitions for class CConstantNode + */ /** - * CBeamLattice::GetBallOptions - Returns the ball mode and the default ball radius for the beamlattice of this mesh. - * @param[out] eBallMode - contains the ball mode of this mesh - * @param[out] dBallRadius - default ball radius of balls for the beamlattice + * CConstantNode::SetConstant - Sets the constant value of the node + * @param[in] dValue - the value */ - void CBeamLattice::GetBallOptions(eBeamLatticeBallMode & eBallMode, Lib3MF_double & dBallRadius) + void CConstantNode::SetConstant(const Lib3MF_double dValue) { - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBallOptions(m_pHandle, &eBallMode, &dBallRadius)); + CheckError(m_pWrapper->m_WrapperTable.m_ConstantNode_SetConstant(m_pHandle, dValue)); } /** - * CBeamLattice::SetBallOptions - Sets the ball mode and thedefault ball radius for the beamlattice. - * @param[in] eBallMode - contains the ball mode of this mesh - * @param[in] dBallRadius - default ball radius of balls for the beamlattice + * CConstantNode::GetConstant - Retrieves the constant value of the node + * @return the value */ - void CBeamLattice::SetBallOptions(const eBeamLatticeBallMode eBallMode, const Lib3MF_double dBallRadius) + Lib3MF_double CConstantNode::GetConstant() { - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetBallOptions(m_pHandle, eBallMode, dBallRadius)); + Lib3MF_double resultValue = 0; + CheckError(m_pWrapper->m_WrapperTable.m_ConstantNode_GetConstant(m_pHandle, &resultValue)); + + return resultValue; } /** - * CBeamLattice::GetBeamCount - Returns the beam count of a mesh object. - * @return filled with the beam count. + * CConstantNode::GetOutputValue - Retrieves the output + * @return the output */ - Lib3MF_uint32 CBeamLattice::GetBeamCount() + PImplicitPort CConstantNode::GetOutputValue() { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeamCount(m_pHandle, &resultCount)); + Lib3MFHandle hValue = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ConstantNode_GetOutputValue(m_pHandle, &hValue)); - return resultCount; + if (!hValue) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hValue))); } /** - * CBeamLattice::GetBeam - Returns indices, radii and capmodes of a single beam of a mesh object. - * @param[in] nIndex - Index of the beam (0 to beamcount - 1). - * @return filled with the beam indices, radii and capmodes. + * Method definitions for class CConstVecNode + */ + + /** + * CConstVecNode::SetVector - Sets the vector value of the node + * @param[in] Value - the value */ - sBeam CBeamLattice::GetBeam(const Lib3MF_uint32 nIndex) + void CConstVecNode::SetVector(const sVector & Value) { - sBeam resultBeamInfo; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeam(m_pHandle, nIndex, &resultBeamInfo)); - - return resultBeamInfo; + CheckError(m_pWrapper->m_WrapperTable.m_ConstVecNode_SetVector(m_pHandle, &Value)); } /** - * CBeamLattice::AddBeam - Adds a single beam to a mesh object. - * @param[in] BeamInfo - contains the node indices, radii and capmodes. - * @return filled with the new Index of the beam. + * CConstVecNode::GetVector - Retrieves the vector value of the node + * @return the value */ - Lib3MF_uint32 CBeamLattice::AddBeam(const sBeam & BeamInfo) + sVector CConstVecNode::GetVector() { - Lib3MF_uint32 resultIndex = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_AddBeam(m_pHandle, &BeamInfo, &resultIndex)); + sVector resultValue; + CheckError(m_pWrapper->m_WrapperTable.m_ConstVecNode_GetVector(m_pHandle, &resultValue)); - return resultIndex; + return resultValue; } /** - * CBeamLattice::SetBeam - Sets the indices, radii and capmodes of a single beam of a mesh object. - * @param[in] nIndex - Index of the beam (0 to beamcount - 1). - * @param[in] BeamInfo - filled with the beam indices, radii and capmodes. + * CConstVecNode::GetOutputVector - Retrieves the output + * @return the output */ - void CBeamLattice::SetBeam(const Lib3MF_uint32 nIndex, const sBeam & BeamInfo) + PImplicitPort CConstVecNode::GetOutputVector() { - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetBeam(m_pHandle, nIndex, &BeamInfo)); + Lib3MFHandle hVector = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ConstVecNode_GetOutputVector(m_pHandle, &hVector)); + + if (!hVector) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hVector))); } /** - * CBeamLattice::SetBeams - Sets all beam indices, radii and capmodes of a mesh object. - * @param[in] BeamInfoBuffer - contains information of a number of beams - */ - void CBeamLattice::SetBeams(const CInputVector & BeamInfoBuffer) - { - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetBeams(m_pHandle, (Lib3MF_uint64)BeamInfoBuffer.size(), BeamInfoBuffer.data())); - } + * Method definitions for class CConstMatNode + */ /** - * CBeamLattice::GetBeams - obtains all beam indices, radii and capmodes of a mesh object. - * @param[out] BeamInfoBuffer - contains information of all beams + * CConstMatNode::SetMatrix - Sets the matrix value of the node + * @param[in] Value - the value */ - void CBeamLattice::GetBeams(std::vector & BeamInfoBuffer) + void CConstMatNode::SetMatrix(const sMatrix4x4 & Value) { - Lib3MF_uint64 elementsNeededBeamInfo = 0; - Lib3MF_uint64 elementsWrittenBeamInfo = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeams(m_pHandle, 0, &elementsNeededBeamInfo, nullptr)); - BeamInfoBuffer.resize((size_t) elementsNeededBeamInfo); - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeams(m_pHandle, elementsNeededBeamInfo, &elementsWrittenBeamInfo, BeamInfoBuffer.data())); + CheckError(m_pWrapper->m_WrapperTable.m_ConstMatNode_SetMatrix(m_pHandle, &Value)); } /** - * CBeamLattice::GetBallCount - Returns the ball count of a mesh object. - * @return filled with the ball count. + * CConstMatNode::GetMatrix - Retrieves the matrix value of the node + * @return the matrix */ - Lib3MF_uint32 CBeamLattice::GetBallCount() + sMatrix4x4 CConstMatNode::GetMatrix() { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBallCount(m_pHandle, &resultCount)); + sMatrix4x4 resultValue; + CheckError(m_pWrapper->m_WrapperTable.m_ConstMatNode_GetMatrix(m_pHandle, &resultValue)); - return resultCount; + return resultValue; } /** - * CBeamLattice::GetBall - Returns index and radius of a single ball of a mesh object. - * @param[in] nIndex - Index of the ball (0 to ballcount - 1). - * @return filled with the ball node index and radius. + * CConstMatNode::GetOutputMatrix - Retrieves the output + * @return the output */ - sBall CBeamLattice::GetBall(const Lib3MF_uint32 nIndex) + PImplicitPort CConstMatNode::GetOutputMatrix() { - sBall resultBallInfo; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBall(m_pHandle, nIndex, &resultBallInfo)); + Lib3MFHandle hMatrix = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ConstMatNode_GetOutputMatrix(m_pHandle, &hMatrix)); - return resultBallInfo; + if (!hMatrix) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMatrix))); } /** - * CBeamLattice::AddBall - Adds a single ball to a mesh object. - * @param[in] BallInfo - contains the node index and radius. - * @return filled with the new Index of the ball. + * Method definitions for class CMeshNode + */ + + /** + * CMeshNode::GetInputMesh - Retrieves the input for the model resource id of the mesh + * @return the input port for the model resource id of the mesh */ - Lib3MF_uint32 CBeamLattice::AddBall(const sBall & BallInfo) + PImplicitPort CMeshNode::GetInputMesh() { - Lib3MF_uint32 resultIndex = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_AddBall(m_pHandle, &BallInfo, &resultIndex)); + Lib3MFHandle hMesh = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MeshNode_GetInputMesh(m_pHandle, &hMesh)); - return resultIndex; + if (!hMesh) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMesh))); } /** - * CBeamLattice::SetBall - Sets the index and radius of a single ball of a mesh object. - * @param[in] nIndex - Index of the ball (0 to ballcount - 1). - * @param[in] BallInfo - filled with the ball node index and radius. + * CMeshNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position */ - void CBeamLattice::SetBall(const Lib3MF_uint32 nIndex, const sBall & BallInfo) + PImplicitPort CMeshNode::GetInputPos() { - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetBall(m_pHandle, nIndex, &BallInfo)); + Lib3MFHandle hPos = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MeshNode_GetInputPos(m_pHandle, &hPos)); + + if (!hPos) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPos))); } /** - * CBeamLattice::SetBalls - Sets all ball indices and radii of a mesh object. - * @param[in] BallInfoBuffer - contains information of a number of balls + * CMeshNode::GetOutputDistance - Retrieves the output + * @return the output port for the signed distance to the mesh */ - void CBeamLattice::SetBalls(const CInputVector & BallInfoBuffer) + PImplicitPort CMeshNode::GetOutputDistance() { - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_SetBalls(m_pHandle, (Lib3MF_uint64)BallInfoBuffer.size(), BallInfoBuffer.data())); + Lib3MFHandle hDistance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_MeshNode_GetOutputDistance(m_pHandle, &hDistance)); + + if (!hDistance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hDistance))); } /** - * CBeamLattice::GetBalls - obtains all ball indices and radii of a mesh object. - * @param[out] BallInfoBuffer - contains information of all balls - */ - void CBeamLattice::GetBalls(std::vector & BallInfoBuffer) - { - Lib3MF_uint64 elementsNeededBallInfo = 0; - Lib3MF_uint64 elementsWrittenBallInfo = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBalls(m_pHandle, 0, &elementsNeededBallInfo, nullptr)); - BallInfoBuffer.resize((size_t) elementsNeededBallInfo); - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBalls(m_pHandle, elementsNeededBallInfo, &elementsWrittenBallInfo, BallInfoBuffer.data())); - } + * Method definitions for class CUnsignedMeshNode + */ /** - * CBeamLattice::GetBeamSetCount - Returns the number of beamsets of a mesh object. - * @return filled with the beamset count. + * CUnsignedMeshNode::GetInputMesh - Retrieves the input for the model resource id of the mesh + * @return the input port for the model resource id of the mesh */ - Lib3MF_uint32 CBeamLattice::GetBeamSetCount() + PImplicitPort CUnsignedMeshNode::GetInputMesh() { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeamSetCount(m_pHandle, &resultCount)); + Lib3MFHandle hMesh = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_UnsignedMeshNode_GetInputMesh(m_pHandle, &hMesh)); - return resultCount; + if (!hMesh) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMesh))); } /** - * CBeamLattice::AddBeamSet - Adds an empty beamset to a mesh object - * @return the new beamset + * CUnsignedMeshNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position */ - PBeamSet CBeamLattice::AddBeamSet() + PImplicitPort CUnsignedMeshNode::GetInputPos() { - Lib3MFHandle hBeamSet = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_AddBeamSet(m_pHandle, &hBeamSet)); + Lib3MFHandle hPos = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_UnsignedMeshNode_GetInputPos(m_pHandle, &hPos)); - if (!hBeamSet) { + if (!hPos) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBeamSet))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPos))); } /** - * CBeamLattice::GetBeamSet - Returns a beamset of a mesh object - * @param[in] nIndex - index of the requested beamset (0 ... beamsetcount-1). - * @return the requested beamset + * CUnsignedMeshNode::GetOutputDistance - Retrieves the output + * @return the output port for the unsigned distance to the mesh */ - PBeamSet CBeamLattice::GetBeamSet(const Lib3MF_uint32 nIndex) + PImplicitPort CUnsignedMeshNode::GetOutputDistance() { - Lib3MFHandle hBeamSet = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_BeamLattice_GetBeamSet(m_pHandle, nIndex, &hBeamSet)); + Lib3MFHandle hDistance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_UnsignedMeshNode_GetOutputDistance(m_pHandle, &hDistance)); - if (!hBeamSet) { + if (!hDistance) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBeamSet))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hDistance))); } /** - * Method definitions for class CComponent + * Method definitions for class CFunctionCallNode */ /** - * CComponent::GetObjectResource - Returns the Resource Instance of the component. - * @return filled with the Resource Instance. + * CFunctionCallNode::GetInputFunctionID - Retrieves the input for the function id + * @return the input port for the function */ - PObject CComponent::GetObjectResource() + PImplicitPort CFunctionCallNode::GetInputFunctionID() { - Lib3MFHandle hObjectResource = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_Component_GetObjectResource(m_pHandle, &hObjectResource)); + Lib3MFHandle hFunction = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionCallNode_GetInputFunctionID(m_pHandle, &hFunction)); - if (!hObjectResource) { + if (!hFunction) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hObjectResource))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hFunction))); } /** - * CComponent::GetObjectResourceID - Returns the UniqueResourceID of the component. - * @return returns the UniqueResourceID. + * Method definitions for class CNodeIterator + */ + + /** + * CNodeIterator::GetCurrent - Returns the current element + * @return The current element */ - Lib3MF_uint32 CComponent::GetObjectResourceID() + PImplicitNode CNodeIterator::GetCurrent() { - Lib3MF_uint32 resultUniqueResourceID = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Component_GetObjectResourceID(m_pHandle, &resultUniqueResourceID)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_NodeIterator_GetCurrent(m_pHandle, &hNode)); - return resultUniqueResourceID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CComponent::GetUUID - returns, whether a component has a UUID and, if true, the component's UUID - * @param[out] bHasUUID - flag whether the component has a UUID - * @return the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * Method definitions for class CFunction + */ + + /** + * CFunction::GetDisplayName - Retrieves the display name of the function + * @return the display name */ - std::string CComponent::GetUUID(bool & bHasUUID) + std::string CFunction::GetDisplayName() { - Lib3MF_uint32 bytesNeededUUID = 0; - Lib3MF_uint32 bytesWrittenUUID = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Component_GetUUID(m_pHandle, &bHasUUID, 0, &bytesNeededUUID, nullptr)); - std::vector bufferUUID(bytesNeededUUID); - CheckError(m_pWrapper->m_WrapperTable.m_Component_GetUUID(m_pHandle, &bHasUUID, bytesNeededUUID, &bytesWrittenUUID, &bufferUUID[0])); + Lib3MF_uint32 bytesNeededDisplayName = 0; + Lib3MF_uint32 bytesWrittenDisplayName = 0; + CheckError(m_pWrapper->m_WrapperTable.m_Function_GetDisplayName(m_pHandle, 0, &bytesNeededDisplayName, nullptr)); + std::vector bufferDisplayName(bytesNeededDisplayName); + CheckError(m_pWrapper->m_WrapperTable.m_Function_GetDisplayName(m_pHandle, bytesNeededDisplayName, &bytesWrittenDisplayName, &bufferDisplayName[0])); - return std::string(&bufferUUID[0]); + return std::string(&bufferDisplayName[0]); } /** - * CComponent::SetUUID - sets the component's UUID - * @param[in] sUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * CFunction::SetDisplayName - Sets the display name of the function + * @param[in] sDisplayName - the display name */ - void CComponent::SetUUID(const std::string & sUUID) + void CFunction::SetDisplayName(const std::string & sDisplayName) { - CheckError(m_pWrapper->m_WrapperTable.m_Component_SetUUID(m_pHandle, sUUID.c_str())); + CheckError(m_pWrapper->m_WrapperTable.m_Function_SetDisplayName(m_pHandle, sDisplayName.c_str())); } /** - * CComponent::HasTransform - Returns, if the component has a different transformation than the identity matrix - * @return if true is returned, the transformation is not equal than the identity + * CFunction::AddInput - Add an input + * @param[in] sIdentifier - the identifier of the input + * @param[in] sDisplayName - the display name of the input + * @param[in] eType - the type of the input + * @return The added input port */ - bool CComponent::HasTransform() + PImplicitPort CFunction::AddInput(const std::string & sIdentifier, const std::string & sDisplayName, const eImplicitPortType eType) { - bool resultHasTransform = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Component_HasTransform(m_pHandle, &resultHasTransform)); + Lib3MFHandle hPort = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Function_AddInput(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), eType, &hPort)); - return resultHasTransform; + if (!hPort) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPort))); } /** - * CComponent::GetTransform - Returns the transformation matrix of the component. - * @return filled with the component transformation matrix + * CFunction::GetInputs - Retrieves the inputs + * @return iterator for the list of inputs */ - sTransform CComponent::GetTransform() + PImplicitPortIterator CFunction::GetInputs() { - sTransform resultTransform; - CheckError(m_pWrapper->m_WrapperTable.m_Component_GetTransform(m_pHandle, &resultTransform)); + Lib3MFHandle hIterator = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Function_GetInputs(m_pHandle, &hIterator)); - return resultTransform; + if (!hIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hIterator))); } /** - * CComponent::SetTransform - Sets the transformation matrix of the component. - * @param[in] Transform - new transformation matrix + * CFunction::RemoveInput - Removes an input + * @param[in] pInput - The input to be removed */ - void CComponent::SetTransform(const sTransform & Transform) + void CFunction::RemoveInput(classParam pInput) { - CheckError(m_pWrapper->m_WrapperTable.m_Component_SetTransform(m_pHandle, &Transform)); + Lib3MFHandle hInput = pInput.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_Function_RemoveInput(m_pHandle, hInput)); } /** - * Method definitions for class CComponentsObject - */ - - /** - * CComponentsObject::AddComponent - Adds a new component to a components object. - * @param[in] pObjectResource - object to add as component. Must not lead to circular references! - * @param[in] Transform - optional transform matrix for the component. - * @return new component instance + * CFunction::AddOutput - Add an output + * @param[in] sIdentifier - the identifier of the output + * @param[in] sDisplayName - the display name of the output + * @param[in] eType - the type of the input + * @return The added input port */ - PComponent CComponentsObject::AddComponent(classParam pObjectResource, const sTransform & Transform) + PImplicitPort CFunction::AddOutput(const std::string & sIdentifier, const std::string & sDisplayName, const eImplicitPortType eType) { - Lib3MFHandle hObjectResource = pObjectResource.GetHandle(); - Lib3MFHandle hComponentInstance = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_ComponentsObject_AddComponent(m_pHandle, hObjectResource, &Transform, &hComponentInstance)); + Lib3MFHandle hPort = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Function_AddOutput(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), eType, &hPort)); - if (!hComponentInstance) { + if (!hPort) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hComponentInstance))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPort))); } /** - * CComponentsObject::GetComponent - Retrieves a component from a component object. - * @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) - * @return component instance + * CFunction::GetOutputs - Retrieves the outputs + * @return iterator for the outputs */ - PComponent CComponentsObject::GetComponent(const Lib3MF_uint32 nIndex) + PImplicitPortIterator CFunction::GetOutputs() { - Lib3MFHandle hComponentInstance = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_ComponentsObject_GetComponent(m_pHandle, nIndex, &hComponentInstance)); + Lib3MFHandle hIterator = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Function_GetOutputs(m_pHandle, &hIterator)); - if (!hComponentInstance) { + if (!hIterator) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hComponentInstance))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hIterator))); } /** - * CComponentsObject::GetComponentCount - Retrieves a component count of a component object. - * @return returns the component count + * CFunction::RemoveOutput - Removes an output + * @param[in] pOutput - The output to be removed */ - Lib3MF_uint32 CComponentsObject::GetComponentCount() + void CFunction::RemoveOutput(classParam pOutput) { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_ComponentsObject_GetComponentCount(m_pHandle, &resultCount)); - - return resultCount; + Lib3MFHandle hOutput = pOutput.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_Function_RemoveOutput(m_pHandle, hOutput)); } /** - * Method definitions for class CBeamSet - */ - - /** - * CBeamSet::SetName - Sets a beamset's name string - * @param[in] sName - new name of the beamset. + * CFunction::FindInput - Retrieves an input + * @param[in] sIdentifier - the identifier of the input + * @return the input port */ - void CBeamSet::SetName(const std::string & sName) + PImplicitPort CFunction::FindInput(const std::string & sIdentifier) { - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_SetName(m_pHandle, sName.c_str())); + Lib3MFHandle hInput = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Function_FindInput(m_pHandle, sIdentifier.c_str(), &hInput)); + + if (!hInput) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hInput))); } /** - * CBeamSet::GetName - Retrieves a beamset's name string - * @return returns the name of the beamset. + * CFunction::FindOutput - Retrieves an output + * @param[in] sIdentifier - the identifier of the output + * @return the output port */ - std::string CBeamSet::GetName() + PImplicitPort CFunction::FindOutput(const std::string & sIdentifier) { - Lib3MF_uint32 bytesNeededName = 0; - Lib3MF_uint32 bytesWrittenName = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetName(m_pHandle, 0, &bytesNeededName, nullptr)); - std::vector bufferName(bytesNeededName); - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetName(m_pHandle, bytesNeededName, &bytesWrittenName, &bufferName[0])); + Lib3MFHandle hOutput = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Function_FindOutput(m_pHandle, sIdentifier.c_str(), &hOutput)); - return std::string(&bufferName[0]); + if (!hOutput) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hOutput))); } /** - * CBeamSet::SetIdentifier - Sets a beamset's identifier string - * @param[in] sIdentifier - new name of the beamset. - */ - void CBeamSet::SetIdentifier(const std::string & sIdentifier) - { - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_SetIdentifier(m_pHandle, sIdentifier.c_str())); - } + * Method definitions for class CImplicitFunction + */ /** - * CBeamSet::GetIdentifier - Retrieves a beamset's identifier string - * @return returns the identifier of the beamset. + * CImplicitFunction::GetIdentifier - Retrieves the identifier of the function + * @return the identifier */ - std::string CBeamSet::GetIdentifier() + std::string CImplicitFunction::GetIdentifier() { Lib3MF_uint32 bytesNeededIdentifier = 0; Lib3MF_uint32 bytesWrittenIdentifier = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetIdentifier(m_pHandle, 0, &bytesNeededIdentifier, nullptr)); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_GetIdentifier(m_pHandle, 0, &bytesNeededIdentifier, nullptr)); std::vector bufferIdentifier(bytesNeededIdentifier); - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetIdentifier(m_pHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0])); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_GetIdentifier(m_pHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0])); return std::string(&bufferIdentifier[0]); } /** - * CBeamSet::GetReferenceCount - Retrieves the reference count of a beamset - * @return returns the reference count + * CImplicitFunction::SetIdentifier - Sets the identifier of the function + * @param[in] sIdentifier - the identifier */ - Lib3MF_uint32 CBeamSet::GetReferenceCount() + void CImplicitFunction::SetIdentifier(const std::string & sIdentifier) { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetReferenceCount(m_pHandle, &resultCount)); - - return resultCount; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_SetIdentifier(m_pHandle, sIdentifier.c_str())); } /** - * CBeamSet::SetReferences - Sets the references of a beamset - * @param[in] ReferencesBuffer - the new indices of all beams in this beamset + * CImplicitFunction::AddNode - Add a node + * @param[in] eNodeType - the type of the node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBeamSet::SetReferences(const CInputVector & ReferencesBuffer) + PImplicitNode CImplicitFunction::AddNode(const eImplicitNodeType eNodeType, const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_SetReferences(m_pHandle, (Lib3MF_uint64)ReferencesBuffer.size(), ReferencesBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddNode(m_pHandle, eNodeType, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBeamSet::GetReferences - Retrieves the references of a beamset - * @param[out] ReferencesBuffer - retrieves the indices of all beams in this beamset + * CImplicitFunction::AddSinNode - Add a SinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBeamSet::GetReferences(std::vector & ReferencesBuffer) + PSinNode CImplicitFunction::AddSinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededReferences = 0; - Lib3MF_uint64 elementsWrittenReferences = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetReferences(m_pHandle, 0, &elementsNeededReferences, nullptr)); - ReferencesBuffer.resize((size_t) elementsNeededReferences); - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetReferences(m_pHandle, elementsNeededReferences, &elementsWrittenReferences, ReferencesBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddSinNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBeamSet::GetBallReferenceCount - Retrieves the ball reference count of a beamset - * @return returns the ball reference count + * CImplicitFunction::AddCosNode - Add a CosNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CBeamSet::GetBallReferenceCount() + PCosNode CImplicitFunction::AddCosNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetBallReferenceCount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddCosNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBeamSet::SetBallReferences - Sets the ball references of a beamset - * @param[in] BallReferencesBuffer - the new indices of all balls in this beamset + * CImplicitFunction::AddTanNode - Add a TanNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBeamSet::SetBallReferences(const CInputVector & BallReferencesBuffer) + PTanNode CImplicitFunction::AddTanNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_SetBallReferences(m_pHandle, (Lib3MF_uint64)BallReferencesBuffer.size(), BallReferencesBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddTanNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBeamSet::GetBallReferences - Retrieves the ball references of a beamset - * @param[out] BallReferencesBuffer - retrieves the indices of all balls in this beamset + * CImplicitFunction::AddArcSinNode - Add a ArcSinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBeamSet::GetBallReferences(std::vector & BallReferencesBuffer) + PArcSinNode CImplicitFunction::AddArcSinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededBallReferences = 0; - Lib3MF_uint64 elementsWrittenBallReferences = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetBallReferences(m_pHandle, 0, &elementsNeededBallReferences, nullptr)); - BallReferencesBuffer.resize((size_t) elementsNeededBallReferences); - CheckError(m_pWrapper->m_WrapperTable.m_BeamSet_GetBallReferences(m_pHandle, elementsNeededBallReferences, &elementsWrittenBallReferences, BallReferencesBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddArcSinNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CBaseMaterialGroup - */ + * CImplicitFunction::AddArcCosNode - Add a ArcCosNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PArcCosNode CImplicitFunction::AddArcCosNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddArcCosNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } /** - * CBaseMaterialGroup::GetCount - Retrieves the count of base materials in the material group. - * @return returns the count of base materials. + * CImplicitFunction::AddArcTan2Node - Add a ArcTan2Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CBaseMaterialGroup::GetCount() + PArcTan2Node CImplicitFunction::AddArcTan2Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetCount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddArcTan2Node(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::GetAllPropertyIDs - returns all the PropertyIDs of all materials in this group - * @param[out] PropertyIDsBuffer - PropertyID of the material in the material group. + * CImplicitFunction::AddSinhNode - Add a SinhNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBaseMaterialGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + PSinhNode CImplicitFunction::AddSinhNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetAllPropertyIDs(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetAllPropertyIDs(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddSinhNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::AddMaterial - Adds a new material to the material group - * @param[in] sName - new name of the base material. - * @param[in] DisplayColor - Display color of the material - * @return returns new PropertyID of the new material in the material group. + * CImplicitFunction::AddCoshNode - Add a CoshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CBaseMaterialGroup::AddMaterial(const std::string & sName, const sColor & DisplayColor) + PCoshNode CImplicitFunction::AddCoshNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultPropertyID = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_AddMaterial(m_pHandle, sName.c_str(), &DisplayColor, &resultPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddCoshNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultPropertyID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::RemoveMaterial - Removes a material from the material group. - * @param[in] nPropertyID - PropertyID of the material in the material group. + * CImplicitFunction::AddTanhNode - Add a TanhNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBaseMaterialGroup::RemoveMaterial(const Lib3MF_uint32 nPropertyID) + PTanhNode CImplicitFunction::AddTanhNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_RemoveMaterial(m_pHandle, nPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddTanhNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::GetName - Returns the base material's name - * @param[in] nPropertyID - PropertyID of the material in the material group. - * @return returns the name of the base material. + * CImplicitFunction::AddRoundNode - Add a RoundNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - std::string CBaseMaterialGroup::GetName(const Lib3MF_uint32 nPropertyID) + PRoundNode CImplicitFunction::AddRoundNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 bytesNeededName = 0; - Lib3MF_uint32 bytesWrittenName = 0; - CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetName(m_pHandle, nPropertyID, 0, &bytesNeededName, nullptr)); - std::vector bufferName(bytesNeededName); - CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetName(m_pHandle, nPropertyID, bytesNeededName, &bytesWrittenName, &bufferName[0])); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddRoundNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return std::string(&bufferName[0]); + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::SetName - Sets a base material's name - * @param[in] nPropertyID - PropertyID of the material in the material group. - * @param[in] sName - new name of the base material. + * CImplicitFunction::AddCeilNode - Add a CeilNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBaseMaterialGroup::SetName(const Lib3MF_uint32 nPropertyID, const std::string & sName) + PCeilNode CImplicitFunction::AddCeilNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_SetName(m_pHandle, nPropertyID, sName.c_str())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddCeilNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::SetDisplayColor - Sets a base material's display color. - * @param[in] nPropertyID - PropertyID of the material in the material group. - * @param[in] TheColor - The base material's display color + * CImplicitFunction::AddFloorNode - Add a FloorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CBaseMaterialGroup::SetDisplayColor(const Lib3MF_uint32 nPropertyID, const sColor & TheColor) + PFloorNode CImplicitFunction::AddFloorNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_SetDisplayColor(m_pHandle, nPropertyID, &TheColor)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddFloorNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CBaseMaterialGroup::GetDisplayColor - Returns a base material's display color. - * @param[in] nPropertyID - PropertyID of the material in the material group. - * @return The base material's display color + * CImplicitFunction::AddSignNode - Add a SignNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - sColor CBaseMaterialGroup::GetDisplayColor(const Lib3MF_uint32 nPropertyID) + PSignNode CImplicitFunction::AddSignNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - sColor resultTheColor; - CheckError(m_pWrapper->m_WrapperTable.m_BaseMaterialGroup_GetDisplayColor(m_pHandle, nPropertyID, &resultTheColor)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddSignNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultTheColor; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CColorGroup - */ - - /** - * CColorGroup::GetCount - Retrieves the count of base materials in this Color Group. - * @return returns the count of colors within this color group. + * CImplicitFunction::AddFractNode - Add a FractNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CColorGroup::GetCount() + PFractNode CImplicitFunction::AddFractNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_GetCount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddFractNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CColorGroup::GetAllPropertyIDs - returns all the PropertyIDs of all colors within this group - * @param[out] PropertyIDsBuffer - PropertyID of the color in the color group. + * CImplicitFunction::AddAbsNode - Add a AbsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CColorGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + PAbsNode CImplicitFunction::AddAbsNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_GetAllPropertyIDs(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_GetAllPropertyIDs(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddAbsNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CColorGroup::AddColor - Adds a new value. - * @param[in] TheColor - The new color - * @return PropertyID of the new color within this color group. + * CImplicitFunction::AddExpNode - Add a ExpNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CColorGroup::AddColor(const sColor & TheColor) + PExpNode CImplicitFunction::AddExpNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultPropertyID = 0; - CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_AddColor(m_pHandle, &TheColor, &resultPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddExpNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultPropertyID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CColorGroup::RemoveColor - Removes a color from the color group. - * @param[in] nPropertyID - PropertyID of the color to be removed from the color group. + * CImplicitFunction::AddLogNode - Add a LogNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CColorGroup::RemoveColor(const Lib3MF_uint32 nPropertyID) + PLogNode CImplicitFunction::AddLogNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_RemoveColor(m_pHandle, nPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddLogNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CColorGroup::SetColor - Sets a color value. - * @param[in] nPropertyID - PropertyID of a color within this color group. - * @param[in] TheColor - The color + * CImplicitFunction::AddLog2Node - Add a Log2Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CColorGroup::SetColor(const Lib3MF_uint32 nPropertyID, const sColor & TheColor) + PLog2Node CImplicitFunction::AddLog2Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_SetColor(m_pHandle, nPropertyID, &TheColor)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddLog2Node(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CColorGroup::GetColor - Sets a color value. - * @param[in] nPropertyID - PropertyID of a color within this color group. - * @return The color + * CImplicitFunction::AddLog10Node - Add a Log10Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - sColor CColorGroup::GetColor(const Lib3MF_uint32 nPropertyID) + PLog10Node CImplicitFunction::AddLog10Node(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - sColor resultTheColor; - CheckError(m_pWrapper->m_WrapperTable.m_ColorGroup_GetColor(m_pHandle, nPropertyID, &resultTheColor)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddLog10Node(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultTheColor; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CTexture2DGroup - */ + * CImplicitFunction::AddLengthNode - Add a LengthNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PLengthNode CImplicitFunction::AddLengthNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddLengthNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } /** - * CTexture2DGroup::GetCount - Retrieves the count of tex2coords in the Texture2DGroup. - * @return returns the count of tex2coords. + * CImplicitFunction::AddTransposeNode - Add a TransposeNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CTexture2DGroup::GetCount() + PTransposeNode CImplicitFunction::AddTransposeNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_GetCount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddTransposeNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CTexture2DGroup::GetAllPropertyIDs - returns all the PropertyIDs of all tex2coords in this Texture2DGroup - * @param[out] PropertyIDsBuffer - PropertyID of the tex2coords in the Texture2DGroup. + * CImplicitFunction::InverseNode - Add a InverseNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CTexture2DGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + PInverseNode CImplicitFunction::InverseNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_GetAllPropertyIDs(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_GetAllPropertyIDs(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_InverseNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CTexture2DGroup::AddTex2Coord - Adds a new tex2coord to the Texture2DGroup - * @param[in] UVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. - * @return returns new PropertyID of the new tex2coord in the Texture2DGroup. + * CImplicitFunction::AddSqrtNode - Add a SqrtNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CTexture2DGroup::AddTex2Coord(const sTex2Coord & UVCoordinate) + PSqrtNode CImplicitFunction::AddSqrtNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultPropertyID = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_AddTex2Coord(m_pHandle, &UVCoordinate, &resultPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddSqrtNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultPropertyID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CTexture2DGroup::GetTex2Coord - Obtains a tex2coord to the Texture2DGroup - * @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. - * @return The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. + * CImplicitFunction::AddResourceIdNode - Add a ResourceIdNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - sTex2Coord CTexture2DGroup::GetTex2Coord(const Lib3MF_uint32 nPropertyID) + PResourceIdNode CImplicitFunction::AddResourceIdNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - sTex2Coord resultUVCoordinate; - CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_GetTex2Coord(m_pHandle, nPropertyID, &resultUVCoordinate)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddResourceIdNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultUVCoordinate; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CTexture2DGroup::RemoveTex2Coord - Removes a tex2coords from the Texture2DGroup. - * @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. + * CImplicitFunction::AddAdditionNode - Add an AdditionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CTexture2DGroup::RemoveTex2Coord(const Lib3MF_uint32 nPropertyID) + PAdditionNode CImplicitFunction::AddAdditionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_RemoveTex2Coord(m_pHandle, nPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddAdditionNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CTexture2DGroup::GetTexture2D - Obtains the texture2D instance of this group. - * @return the texture2D instance of this group. + * CImplicitFunction::AddSubtractionNode - Add a SubtractionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - PTexture2D CTexture2DGroup::GetTexture2D() + PSubtractionNode CImplicitFunction::AddSubtractionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MFHandle hTexture2DInstance = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_Texture2DGroup_GetTexture2D(m_pHandle, &hTexture2DInstance)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddSubtractionNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - if (!hTexture2DInstance) { + if (!hNode) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTexture2DInstance))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CCompositeMaterials - */ + * CImplicitFunction::AddMultiplicationNode - Add a MultiplicationNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PMultiplicationNode CImplicitFunction::AddMultiplicationNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddMultiplicationNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } /** - * CCompositeMaterials::GetCount - Retrieves the count of Composite-s in the CompositeMaterials. - * @return returns the count of Composite-s + * CImplicitFunction::AddDivisionNode - Add a DivisionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CCompositeMaterials::GetCount() + PDivisionNode CImplicitFunction::AddDivisionNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetCount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddDivisionNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CCompositeMaterials::GetAllPropertyIDs - returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials - * @param[out] PropertyIDsBuffer - PropertyID of the Composite-Mixing Values in the CompositeMaterials. + * CImplicitFunction::AddDotNode - Add a DotNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CCompositeMaterials::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + PDotNode CImplicitFunction::AddDotNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetAllPropertyIDs(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetAllPropertyIDs(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddDotNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CCompositeMaterials::GetBaseMaterialGroup - Obtains the BaseMaterialGroup instance of this CompositeMaterials. - * @return returns the BaseMaterialGroup instance of this CompositeMaterials + * CImplicitFunction::AddCrossNode - Add a CrossNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - PBaseMaterialGroup CCompositeMaterials::GetBaseMaterialGroup() + PCrossNode CImplicitFunction::AddCrossNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MFHandle hBaseMaterialGroupInstance = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetBaseMaterialGroup(m_pHandle, &hBaseMaterialGroupInstance)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddCrossNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - if (!hBaseMaterialGroupInstance) { + if (!hNode) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hBaseMaterialGroupInstance))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CCompositeMaterials::AddComposite - Adds a new Composite-Mixing Values to the CompositeMaterials. - * @param[in] CompositeBuffer - The Composite Constituents to be added as composite - * @return returns new PropertyID of the new Composite in the CompositeMaterials. + * CImplicitFunction::AddMatVecMultiplicationNode - Add a MatVecMultiplicationNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CCompositeMaterials::AddComposite(const CInputVector & CompositeBuffer) + PMatVecMultiplicationNode CImplicitFunction::AddMatVecMultiplicationNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultPropertyID = 0; - CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_AddComposite(m_pHandle, (Lib3MF_uint64)CompositeBuffer.size(), CompositeBuffer.data(), &resultPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddMatVecMultiplicationNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultPropertyID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CCompositeMaterials::RemoveComposite - Removes a Composite-Maxing Ratio from the CompositeMaterials. - * @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. + * CImplicitFunction::AddMinNode - Add a MinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CCompositeMaterials::RemoveComposite(const Lib3MF_uint32 nPropertyID) + PMinNode CImplicitFunction::AddMinNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_RemoveComposite(m_pHandle, nPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddMinNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CCompositeMaterials::GetComposite - Obtains a Composite-Maxing Ratio of this CompositeMaterials. - * @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. - * @param[out] CompositeBuffer - The Composite-Mixing Values with the given PropertyID + * CImplicitFunction::AddMaxNode - Add a MaxNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CCompositeMaterials::GetComposite(const Lib3MF_uint32 nPropertyID, std::vector & CompositeBuffer) + PMaxNode CImplicitFunction::AddMaxNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededComposite = 0; - Lib3MF_uint64 elementsWrittenComposite = 0; - CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetComposite(m_pHandle, nPropertyID, 0, &elementsNeededComposite, nullptr)); - CompositeBuffer.resize((size_t) elementsNeededComposite); - CheckError(m_pWrapper->m_WrapperTable.m_CompositeMaterials_GetComposite(m_pHandle, nPropertyID, elementsNeededComposite, &elementsWrittenComposite, CompositeBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddMaxNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CMultiPropertyGroup - */ + * CImplicitFunction::AddFmodNode - Add a FmodNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + PFmodNode CImplicitFunction::AddFmodNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) + { + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddFmodNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); + } /** - * CMultiPropertyGroup::GetCount - Retrieves the count of MultiProperty-s in the MultiPropertyGroup. - * @return returns the count of MultiProperty-s + * CImplicitFunction::AddPowNode - Add a PowNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CMultiPropertyGroup::GetCount() + PPowNode CImplicitFunction::AddPowNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetCount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddPowNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::GetAllPropertyIDs - returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup - * @param[out] PropertyIDsBuffer - PropertyID of the MultiProperty-s in the MultiPropertyGroup. + * CImplicitFunction::AddSelectNode - Add a SelectNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CMultiPropertyGroup::GetAllPropertyIDs(std::vector & PropertyIDsBuffer) + PSelectNode CImplicitFunction::AddSelectNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetAllPropertyIDs(m_pHandle, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetAllPropertyIDs(m_pHandle, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddSelectNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::AddMultiProperty - Adds a new MultiProperty to the MultiPropertyGroup. - * @param[in] PropertyIDsBuffer - The PropertyIDs of the new MultiProperty. - * @return returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. + * CImplicitFunction::AddClampNode - Add a ClampNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CMultiPropertyGroup::AddMultiProperty(const CInputVector & PropertyIDsBuffer) + PClampNode CImplicitFunction::AddClampNode(const std::string & sIdentifier, const eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultPropertyID = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_AddMultiProperty(m_pHandle, (Lib3MF_uint64)PropertyIDsBuffer.size(), PropertyIDsBuffer.data(), &resultPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddClampNode(m_pHandle, sIdentifier.c_str(), eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultPropertyID; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::SetMultiProperty - Sets the PropertyIDs of a MultiProperty. - * @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. - * @param[in] PropertyIDsBuffer - The new PropertyIDs of the MultiProperty + * CImplicitFunction::AddComposeVectorNode - Add a ComposeVectorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CMultiPropertyGroup::SetMultiProperty(const Lib3MF_uint32 nPropertyID, const CInputVector & PropertyIDsBuffer) + PComposeVectorNode CImplicitFunction::AddComposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_SetMultiProperty(m_pHandle, nPropertyID, (Lib3MF_uint64)PropertyIDsBuffer.size(), PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddComposeVectorNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::GetMultiProperty - Obtains the PropertyIDs of a MultiProperty. - * @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. - * @param[out] PropertyIDsBuffer - The PropertyIDs of the MultiProperty + * CImplicitFunction::AddVectorFromScalarNode - Add a VectorFromScalar + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CMultiPropertyGroup::GetMultiProperty(const Lib3MF_uint32 nPropertyID, std::vector & PropertyIDsBuffer) + PVectorFromScalarNode CImplicitFunction::AddVectorFromScalarNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint64 elementsNeededPropertyIDs = 0; - Lib3MF_uint64 elementsWrittenPropertyIDs = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetMultiProperty(m_pHandle, nPropertyID, 0, &elementsNeededPropertyIDs, nullptr)); - PropertyIDsBuffer.resize((size_t) elementsNeededPropertyIDs); - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetMultiProperty(m_pHandle, nPropertyID, elementsNeededPropertyIDs, &elementsWrittenPropertyIDs, PropertyIDsBuffer.data())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddVectorFromScalarNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::RemoveMultiProperty - Removes a MultiProperty from this MultiPropertyGroup. - * @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. + * CImplicitFunction::AddDecomposeVectorNode - Add a DecomposeVectorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CMultiPropertyGroup::RemoveMultiProperty(const Lib3MF_uint32 nPropertyID) + PDecomposeVectorNode CImplicitFunction::AddDecomposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_RemoveMultiProperty(m_pHandle, nPropertyID)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddDecomposeVectorNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::GetLayerCount - Retrieves the number of layers of this MultiPropertyGroup. - * @return returns the number of layers + * CImplicitFunction::AddComposeMatrixNode - Add a ComposeMatrixNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CMultiPropertyGroup::GetLayerCount() + PComposeMatrixNode CImplicitFunction::AddComposeMatrixNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultCount = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetLayerCount(m_pHandle, &resultCount)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddComposeMatrixNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultCount; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::AddLayer - Adds a MultiPropertyLayer to this MultiPropertyGroup. - * @param[in] TheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup - * @return returns the index of this MultiPropertyLayer + * CImplicitFunction::AddMatrixFromRowsNode - Add a MatrixFromRowsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint32 CMultiPropertyGroup::AddLayer(const sMultiPropertyLayer & TheLayer) + PMatrixFromRowsNode CImplicitFunction::AddMatrixFromRowsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 resultLayerIndex = 0; - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_AddLayer(m_pHandle, &TheLayer, &resultLayerIndex)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddMatrixFromRowsNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultLayerIndex; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::GetLayer - Obtains a MultiPropertyLayer of this MultiPropertyGroup. - * @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried - * @return The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup + * CImplicitFunction::AddMatrixFromColumnsNode - Add a MatrixFromColumnsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - sMultiPropertyLayer CMultiPropertyGroup::GetLayer(const Lib3MF_uint32 nLayerIndex) + PMatrixFromColumnsNode CImplicitFunction::AddMatrixFromColumnsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - sMultiPropertyLayer resultTheLayer; - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_GetLayer(m_pHandle, nLayerIndex, &resultTheLayer)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddMatrixFromColumnsNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return resultTheLayer; + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CMultiPropertyGroup::RemoveLayer - Removes a MultiPropertyLayer from this MultiPropertyGroup. - * @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed + * CImplicitFunction::AddConstantNode - Add a ConstantNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CMultiPropertyGroup::RemoveLayer(const Lib3MF_uint32 nLayerIndex) + PConstantNode CImplicitFunction::AddConstantNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_MultiPropertyGroup_RemoveLayer(m_pHandle, nLayerIndex)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddConstantNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * Method definitions for class CAttachment - */ - - /** - * CAttachment::GetPath - Retrieves an attachment's package path. This function will be removed in a later release. - * @return returns the attachment's package path string + * CImplicitFunction::AddConstVecNode - Add a ConstVecNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - std::string CAttachment::GetPath() + PConstVecNode CImplicitFunction::AddConstVecNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 bytesNeededPath = 0; - Lib3MF_uint32 bytesWrittenPath = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_GetPath(m_pHandle, 0, &bytesNeededPath, nullptr)); - std::vector bufferPath(bytesNeededPath); - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_GetPath(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddConstVecNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return std::string(&bufferPath[0]); + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CAttachment::SetPath - Sets an attachment's package path. This function will be removed in a later release. - * @param[in] sPath - new path of the attachment. + * CImplicitFunction::AddConstMatNode - Add a ConstMatNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CAttachment::SetPath(const std::string & sPath) + PConstMatNode CImplicitFunction::AddConstMatNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_SetPath(m_pHandle, sPath.c_str())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddConstMatNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CAttachment::PackagePart - Returns the PackagePart that is this attachment. - * @return The PackagePart of this attachment. + * CImplicitFunction::AddMeshNode - Add a MeshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - PPackagePart CAttachment::PackagePart() + PMeshNode CImplicitFunction::AddMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MFHandle hPackagePart = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_PackagePart(m_pHandle, &hPackagePart)); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddMeshNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - if (!hPackagePart) { + if (!hNode) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hPackagePart))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CAttachment::GetRelationShipType - Retrieves an attachment's relationship type - * @return returns the attachment's package relationship type string + * CImplicitFunction::AddUnsignedMeshNode - Add a UnsignedMeshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - std::string CAttachment::GetRelationShipType() + PUnsignedMeshNode CImplicitFunction::AddUnsignedMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - Lib3MF_uint32 bytesNeededPath = 0; - Lib3MF_uint32 bytesWrittenPath = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_GetRelationShipType(m_pHandle, 0, &bytesNeededPath, nullptr)); - std::vector bufferPath(bytesNeededPath); - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_GetRelationShipType(m_pHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0])); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddUnsignedMeshNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); - return std::string(&bufferPath[0]); + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CAttachment::SetRelationShipType - Sets an attachment's relationship type. - * @param[in] sPath - new relationship type string. + * CImplicitFunction::AddFunctionCallNode - Add a FunctionCallNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - void CAttachment::SetRelationShipType(const std::string & sPath) + PFunctionCallNode CImplicitFunction::AddFunctionCallNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) { - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_SetRelationShipType(m_pHandle, sPath.c_str())); + Lib3MFHandle hNode = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddFunctionCallNode(m_pHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hNode)); + + if (!hNode) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hNode))); } /** - * CAttachment::WriteToFile - Writes out the attachment as file. - * @param[in] sFileName - file to write into. + * CImplicitFunction::GetNodes - Retrieves the nodes + * @return iterator for the list of nodes */ - void CAttachment::WriteToFile(const std::string & sFileName) + PNodeIterator CImplicitFunction::GetNodes() { - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_WriteToFile(m_pHandle, sFileName.c_str())); + Lib3MFHandle hIterator = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_GetNodes(m_pHandle, &hIterator)); + + if (!hIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hIterator))); } /** - * CAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. - * @param[in] sFileName - file to read from. + * CImplicitFunction::RemoveNode - Removes a node + * @param[in] pNode - The node to be removed */ - void CAttachment::ReadFromFile(const std::string & sFileName) + void CImplicitFunction::RemoveNode(classParam pNode) { - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_ReadFromFile(m_pHandle, sFileName.c_str())); + Lib3MFHandle hNode = pNode.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_RemoveNode(m_pHandle, hNode)); } /** - * CAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. - * @param[in] pTheReadCallback - Callback to call for reading a data chunk - * @param[in] nStreamSize - number of bytes the callback returns - * @param[in] pTheSeekCallback - Callback to call for seeking in the stream. - * @param[in] pUserData - Userdata that is passed to the callback function + * CImplicitFunction::AddLink - Add a link + * @param[in] pSource - the source port + * @param[in] pTarget - the target port */ - void CAttachment::ReadFromCallback(const ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) + void CImplicitFunction::AddLink(classParam pSource, classParam pTarget) { - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_ReadFromCallback(m_pHandle, pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData)); + Lib3MFHandle hSource = pSource.GetHandle(); + Lib3MFHandle hTarget = pTarget.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddLink(m_pHandle, hSource, hTarget)); } /** - * CAttachment::GetStreamSize - Retrieves the size of the attachment stream - * @return the stream size + * CImplicitFunction::AddLinkByNames - Add a link + * @param[in] sSource - name of the source port in the format nodename.portname + * @param[in] sTarget - name of the target port in the format nodename.portname */ - Lib3MF_uint64 CAttachment::GetStreamSize() + void CImplicitFunction::AddLinkByNames(const std::string & sSource, const std::string & sTarget) { - Lib3MF_uint64 resultStreamSize = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_GetStreamSize(m_pHandle, &resultStreamSize)); - - return resultStreamSize; + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_AddLinkByNames(m_pHandle, sSource.c_str(), sTarget.c_str())); } /** - * CAttachment::WriteToBuffer - Writes out the attachment into a buffer - * @param[out] BufferBuffer - Buffer to write into + * CImplicitFunction::Clear - Clears the function */ - void CAttachment::WriteToBuffer(std::vector & BufferBuffer) + void CImplicitFunction::Clear() { - Lib3MF_uint64 elementsNeededBuffer = 0; - Lib3MF_uint64 elementsWrittenBuffer = 0; - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_WriteToBuffer(m_pHandle, 0, &elementsNeededBuffer, nullptr)); - BufferBuffer.resize((size_t) elementsNeededBuffer); - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_WriteToBuffer(m_pHandle, elementsNeededBuffer, &elementsWrittenBuffer, BufferBuffer.data())); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_Clear(m_pHandle)); } /** - * CAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). - * @param[in] BufferBuffer - Buffer to read from + * CImplicitFunction::SortNodesTopologically - Sorts the nodes topologically */ - void CAttachment::ReadFromBuffer(const CInputVector & BufferBuffer) + void CImplicitFunction::SortNodesTopologically() { - CheckError(m_pWrapper->m_WrapperTable.m_Attachment_ReadFromBuffer(m_pHandle, (Lib3MF_uint64)BufferBuffer.size(), BufferBuffer.data())); + CheckError(m_pWrapper->m_WrapperTable.m_ImplicitFunction_SortNodesTopologically(m_pHandle)); } /** - * Method definitions for class CTexture2D + * Method definitions for class CFunctionFromImage3D */ /** - * CTexture2D::GetAttachment - Retrieves the attachment located at the path of the texture. - * @return attachment that holds the texture's image information. + * CFunctionFromImage3D::GetImage3D - Returns the selected 3D image. + * @return image instance */ - PAttachment CTexture2D::GetAttachment() + PImage3D CFunctionFromImage3D::GetImage3D() { - Lib3MFHandle hAttachment = nullptr; - CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_GetAttachment(m_pHandle, &hAttachment)); + Lib3MFHandle hImage3D = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionFromImage3D_GetImage3D(m_pHandle, &hImage3D)); - if (!hAttachment) { + if (!hImage3D) { CheckError(LIB3MF_ERROR_INVALIDPARAM); } - return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hAttachment))); + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hImage3D))); } /** - * CTexture2D::SetAttachment - Sets the texture's package path to the path of the attachment. - * @param[in] pAttachment - attachment that holds the texture's image information. + * CFunctionFromImage3D::SetImage3D - Sets the 3D image of the selector. + * @param[in] pImage3D - image instance */ - void CTexture2D::SetAttachment(classParam pAttachment) + void CFunctionFromImage3D::SetImage3D(classParam pImage3D) { - Lib3MFHandle hAttachment = pAttachment.GetHandle(); - CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_SetAttachment(m_pHandle, hAttachment)); + Lib3MFHandle hImage3D = pImage3D.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_FunctionFromImage3D_SetImage3D(m_pHandle, hImage3D)); } /** - * CTexture2D::GetContentType - Retrieves a texture's content type. - * @return returns content type enum. + * CFunctionFromImage3D::SetFilter - Sets the texture filter of the selector. + * @param[in] eFilter - texture filter */ - eTextureType CTexture2D::GetContentType() + void CFunctionFromImage3D::SetFilter(const eTextureFilter eFilter) { - eTextureType resultContentType = (eTextureType) 0; - CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_GetContentType(m_pHandle, &resultContentType)); + CheckError(m_pWrapper->m_WrapperTable.m_FunctionFromImage3D_SetFilter(m_pHandle, eFilter)); + } + + /** + * CFunctionFromImage3D::GetFilter - Returns the texture filter of the selector. + * @return texture filter + */ + eTextureFilter CFunctionFromImage3D::GetFilter() + { + eTextureFilter resultFilter = (eTextureFilter) 0; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionFromImage3D_GetFilter(m_pHandle, &resultFilter)); - return resultContentType; + return resultFilter; } /** - * CTexture2D::SetContentType - Retrieves a texture's content type. - * @param[in] eContentType - new Content Type + * CFunctionFromImage3D::SetTileStyles - Sets the tile styles of the selector. + * @param[in] eTileStyleU - tile style in U + * @param[in] eTileStyleV - tile style in V + * @param[in] eTileStyleW - tile style in W */ - void CTexture2D::SetContentType(const eTextureType eContentType) + void CFunctionFromImage3D::SetTileStyles(const eTextureTileStyle eTileStyleU, const eTextureTileStyle eTileStyleV, const eTextureTileStyle eTileStyleW) { - CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_SetContentType(m_pHandle, eContentType)); + CheckError(m_pWrapper->m_WrapperTable.m_FunctionFromImage3D_SetTileStyles(m_pHandle, eTileStyleU, eTileStyleV, eTileStyleW)); } /** - * CTexture2D::GetTileStyleUV - Retrieves a texture's tilestyle type. - * @param[out] eTileStyleU - returns tilestyle type enum. - * @param[out] eTileStyleV - returns tilestyle type enum. + * CFunctionFromImage3D::GetTileStyles - Retrieves the tile styles of the selector. + * @param[out] eTileStyleU - tile style in U + * @param[out] eTileStyleV - tile style in V + * @param[out] eTileStyleW - tile style in W */ - void CTexture2D::GetTileStyleUV(eTextureTileStyle & eTileStyleU, eTextureTileStyle & eTileStyleV) + void CFunctionFromImage3D::GetTileStyles(eTextureTileStyle & eTileStyleU, eTextureTileStyle & eTileStyleV, eTextureTileStyle & eTileStyleW) { - CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_GetTileStyleUV(m_pHandle, &eTileStyleU, &eTileStyleV)); + CheckError(m_pWrapper->m_WrapperTable.m_FunctionFromImage3D_GetTileStyles(m_pHandle, &eTileStyleU, &eTileStyleV, &eTileStyleW)); } /** - * CTexture2D::SetTileStyleUV - Sets a texture's tilestyle type. - * @param[in] eTileStyleU - new tilestyle type enum. - * @param[in] eTileStyleV - new tilestyle type enum. + * CFunctionFromImage3D::GetOffset - returns the offset value for the pixel values in the Image3D + * @return the offset value for the pixel values in the Image3D */ - void CTexture2D::SetTileStyleUV(const eTextureTileStyle eTileStyleU, const eTextureTileStyle eTileStyleV) + Lib3MF_double CFunctionFromImage3D::GetOffset() { - CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_SetTileStyleUV(m_pHandle, eTileStyleU, eTileStyleV)); + Lib3MF_double resultOffset = 0; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionFromImage3D_GetOffset(m_pHandle, &resultOffset)); + + return resultOffset; } /** - * CTexture2D::GetFilter - Retrieves a texture's filter type. - * @return returns filter type enum. + * CFunctionFromImage3D::SetOffset - Sets the offset value for the pixel values in the Image3D + * @param[in] dOffset - the offset value for the pixel values in the Image3D */ - eTextureFilter CTexture2D::GetFilter() + void CFunctionFromImage3D::SetOffset(const Lib3MF_double dOffset) { - eTextureFilter resultFilter = (eTextureFilter) 0; - CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_GetFilter(m_pHandle, &resultFilter)); + CheckError(m_pWrapper->m_WrapperTable.m_FunctionFromImage3D_SetOffset(m_pHandle, dOffset)); + } + + /** + * CFunctionFromImage3D::GetScale - returns the scale value for the pixel values in the Image3D + * @return the scale value for the pixel values in the Image3D + */ + Lib3MF_double CFunctionFromImage3D::GetScale() + { + Lib3MF_double resultScale = 0; + CheckError(m_pWrapper->m_WrapperTable.m_FunctionFromImage3D_GetScale(m_pHandle, &resultScale)); - return resultFilter; + return resultScale; } /** - * CTexture2D::SetFilter - Sets a texture's filter type. - * @param[in] eFilter - sets new filter type enum. + * CFunctionFromImage3D::SetScale - Sets the scale value for the pixel values in the Image3D + * @param[in] dScale - the scale value for the pixel values in the Image3D */ - void CTexture2D::SetFilter(const eTextureFilter eFilter) + void CFunctionFromImage3D::SetScale(const Lib3MF_double dScale) { - CheckError(m_pWrapper->m_WrapperTable.m_Texture2D_SetFilter(m_pHandle, eFilter)); + CheckError(m_pWrapper->m_WrapperTable.m_FunctionFromImage3D_SetScale(m_pHandle, dScale)); } /** @@ -10986,6 +19858,22 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hSliceStacInstance))); } + /** + * CModel::GetLevelSetByID - finds a level set object by its UniqueResourceID + * @param[in] nUniqueResourceID - UniqueResourceID + * @return returns the level set object instance + */ + PLevelSet CModel::GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID) + { + Lib3MFHandle hLevelSetObjectInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Model_GetLevelSetByID(m_pHandle, nUniqueResourceID, &hLevelSetObjectInstance)); + + if (!hLevelSetObjectInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hLevelSetObjectInstance))); + } + /** * CModel::GetBuildUUID - returns, whether a build has a UUID and, if true, the build's UUID * @param[out] bHasUUID - flag whether the build has a UUID @@ -11203,6 +20091,21 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResourceIterator))); } + /** + * CModel::GetImage3Ds - creates a resource iterator instance with all image3d resources. + * @return returns the iterator instance. + */ + PImage3DIterator CModel::GetImage3Ds() + { + Lib3MFHandle hResourceIterator = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Model_GetImage3Ds(m_pHandle, &hResourceIterator)); + + if (!hResourceIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResourceIterator))); + } + /** * CModel::MergeToModel - Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. * @return returns the merged model instance @@ -11218,6 +20121,16 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMergedModelInstance))); } + /** + * CModel::MergeFromModel - Merges the given model into this model. + * @param[in] pModelInstance - model to be merged + */ + void CModel::MergeFromModel(classParam pModelInstance) + { + Lib3MFHandle hModelInstance = pModelInstance.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_Model_MergeFromModel(m_pHandle, hModelInstance)); + } + /** * CModel::AddMeshObject - adds an empty mesh object to the model. * @return returns the mesh object instance @@ -11360,6 +20273,40 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hMultiPropertyGroupInstance))); } + /** + * CModel::AddImageStack - creates a new 3D Image Resource + * @param[in] nColumnCount - the number of columns in each sheet. + * @param[in] nRowCount - the number of rows in each sheet. + * @param[in] nSheetCount - the number of sheets in the image stack. + * @return returns the new ImageStack instance + */ + PImageStack CModel::AddImageStack(const Lib3MF_uint32 nColumnCount, const Lib3MF_uint32 nRowCount, const Lib3MF_uint32 nSheetCount) + { + Lib3MFHandle hInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Model_AddImageStack(m_pHandle, nColumnCount, nRowCount, nSheetCount, &hInstance)); + + if (!hInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hInstance))); + } + + /** + * CModel::GetImageStackByID - finds an ImageStack object by its UniqueResourceID + * @param[in] nUniqueResourceID - UniqueResourceID + * @return returns the image stack instance + */ + PImageStack CModel::GetImageStackByID(const Lib3MF_uint32 nUniqueResourceID) + { + Lib3MFHandle hImageStackInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Model_GetImageStackByID(m_pHandle, nUniqueResourceID, &hImageStackInstance)); + + if (!hImageStackInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hImageStackInstance))); + } + /** * CModel::AddBuildItem - adds a build item to the model. * @param[in] pObject - Object instance. @@ -11568,6 +20515,108 @@ inline CBase* CWrapper::polymorphicFactory(Lib3MFHandle pHandle) } return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hKeyStore))); } + + /** + * CModel::GetFunctions - creates a resource iterator for all functions + * @return returns the resource iterator + */ + PFunctionIterator CModel::GetFunctions() + { + Lib3MFHandle hTheResourceIterator = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Model_GetFunctions(m_pHandle, &hTheResourceIterator)); + + if (!hTheResourceIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hTheResourceIterator))); + } + + /** + * CModel::AddImplicitFunction - adds a function described by nodes to the model + * @return returns the function instance + */ + PImplicitFunction CModel::AddImplicitFunction() + { + Lib3MFHandle hFunctionInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Model_AddImplicitFunction(m_pHandle, &hFunctionInstance)); + + if (!hFunctionInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hFunctionInstance))); + } + + /** + * CModel::AddFunctionFromImage3D - adds a function defined by an image3d to the model + * @param[in] pImage3DInstance - the Image3D-instance used for this function + * @return returns the function instance + */ + PFunctionFromImage3D CModel::AddFunctionFromImage3D(classParam pImage3DInstance) + { + Lib3MFHandle hImage3DInstance = pImage3DInstance.GetHandle(); + Lib3MFHandle hFunctionInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Model_AddFunctionFromImage3D(m_pHandle, hImage3DInstance, &hFunctionInstance)); + + if (!hFunctionInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hFunctionInstance))); + } + + /** + * CModel::AddVolumeData - adds a volume data resource to the model. + * @return returns the new volume data instance. + */ + PVolumeData CModel::AddVolumeData() + { + Lib3MFHandle hVolumeDataInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Model_AddVolumeData(m_pHandle, &hVolumeDataInstance)); + + if (!hVolumeDataInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hVolumeDataInstance))); + } + + /** + * CModel::AddLevelSet - adds an empty boundary shape object to the model. + * @return returns the mesh object instance + */ + PLevelSet CModel::AddLevelSet() + { + Lib3MFHandle hLevelSetInstance = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Model_AddLevelSet(m_pHandle, &hLevelSetInstance)); + + if (!hLevelSetInstance) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hLevelSetInstance))); + } + + /** + * CModel::GetLevelSets - creates a resource iterator instance with all boundary shape resources. + * @return returns the iterator instance. + */ + PLevelSetIterator CModel::GetLevelSets() + { + Lib3MFHandle hResourceIterator = nullptr; + CheckError(m_pWrapper->m_WrapperTable.m_Model_GetLevelSets(m_pHandle, &hResourceIterator)); + + if (!hResourceIterator) { + CheckError(LIB3MF_ERROR_INVALIDPARAM); + } + return std::shared_ptr(dynamic_cast(m_pWrapper->polymorphicFactory(hResourceIterator))); + } + + /** + * CModel::RemoveResource - Removes a resource from the model + * @param[in] pResource - The resource to remove + */ + void CModel::RemoveResource(classParam pResource) + { + Lib3MFHandle hResource = pResource.GetHandle(); + CheckError(m_pWrapper->m_WrapperTable.m_Model_RemoveResource(m_pHandle, hResource)); + } } // namespace Lib3MF diff --git a/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp b/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp index 705f02718..61ecedc56 100644 --- a/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp +++ b/Autogenerated/Bindings/CppDynamic/lib3mf_types.hpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++-Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -83,8 +83,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 3 -#define LIB3MF_VERSION_MICRO 2 +#define LIB3MF_VERSION_MINOR 4 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -129,13 +129,18 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER 140 /** A progress identifier is unknown */ #define LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT 141 /** An element buffer exceeds its spec limit */ #define LIB3MF_ERROR_INVALIDRESOURCE 142 /** A resource is invalid */ +#define LIB3MF_ERROR_INVALIDLEVELSET 143 /** A level set is invalid */ #define LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE 2000 /** This object type is not valid for beamlattices */ #define LIB3MF_ERROR_INVALIDKEYSTORE 3000 /** The keystore object is invalid */ #define LIB3MF_ERROR_INVALIDKEYSTORECONSUMER 3001 /** The consumer keystore object is invalid */ #define LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND 3002 /** A consumer has not been found */ #define LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND 3003 /** A resource data has not been found */ #define LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED 3004 /** A Key or Conentent encryption callback has not been registered */ -#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key siue is invalid */ +#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key size is invalid */ +#define LIB3MF_ERROR_INCOMPATIBLEPORTTYPES 4000 /** Link could not be added, the port types are incompatible */ +#define LIB3MF_ERROR_GRAPHISCYCLIC 4001 /** The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted. */ +#define LIB3MF_ERROR_INPUTNOTSET 4002 /** The input of a node is not set. */ +#define LIB3MF_ERROR_INVALIDNODECONFIGURATION 4003 /** The selected node configuration is not supported */ /************************************************************************************************************************* Error strings for Lib3MF @@ -180,13 +185,18 @@ inline const char * LIB3MF_GETERRORSTRING (Lib3MFResult nErrorCode) { case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "A progress identifier is unknown"; case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "An element buffer exceeds its spec limit"; case LIB3MF_ERROR_INVALIDRESOURCE: return "A resource is invalid"; + case LIB3MF_ERROR_INVALIDLEVELSET: return "A level set is invalid"; case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "This object type is not valid for beamlattices"; case LIB3MF_ERROR_INVALIDKEYSTORE: return "The keystore object is invalid"; case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "The consumer keystore object is invalid"; case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: return "A consumer has not been found"; case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "A resource data has not been found"; case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "A Key or Conentent encryption callback has not been registered"; - case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key siue is invalid"; + case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key size is invalid"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "Link could not be added, the port types are incompatible"; + case LIB3MF_ERROR_GRAPHISCYCLIC: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case LIB3MF_ERROR_INPUTNOTSET: return "The input of a node is not set."; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "The selected node configuration is not supported"; default: return "unknown error"; } } @@ -211,11 +221,21 @@ typedef Lib3MFHandle Lib3MF_ColorGroupIterator; typedef Lib3MFHandle Lib3MF_Texture2DGroupIterator; typedef Lib3MFHandle Lib3MF_CompositeMaterialsIterator; typedef Lib3MFHandle Lib3MF_MultiPropertyGroupIterator; +typedef Lib3MFHandle Lib3MF_Image3DIterator; +typedef Lib3MFHandle Lib3MF_FunctionIterator; +typedef Lib3MFHandle Lib3MF_LevelSetIterator; typedef Lib3MFHandle Lib3MF_MetaData; typedef Lib3MFHandle Lib3MF_MetaDataGroup; typedef Lib3MFHandle Lib3MF_Object; typedef Lib3MFHandle Lib3MF_MeshObject; +typedef Lib3MFHandle Lib3MF_LevelSet; typedef Lib3MFHandle Lib3MF_BeamLattice; +typedef Lib3MFHandle Lib3MF_FunctionReference; +typedef Lib3MFHandle Lib3MF_VolumeDataColor; +typedef Lib3MFHandle Lib3MF_MaterialMapping; +typedef Lib3MFHandle Lib3MF_VolumeDataComposite; +typedef Lib3MFHandle Lib3MF_VolumeDataProperty; +typedef Lib3MFHandle Lib3MF_VolumeData; typedef Lib3MFHandle Lib3MF_Component; typedef Lib3MFHandle Lib3MF_ComponentsObject; typedef Lib3MFHandle Lib3MF_BeamSet; @@ -224,8 +244,71 @@ typedef Lib3MFHandle Lib3MF_ColorGroup; typedef Lib3MFHandle Lib3MF_Texture2DGroup; typedef Lib3MFHandle Lib3MF_CompositeMaterials; typedef Lib3MFHandle Lib3MF_MultiPropertyGroup; +typedef Lib3MFHandle Lib3MF_Image3D; +typedef Lib3MFHandle Lib3MF_ImageStack; typedef Lib3MFHandle Lib3MF_Attachment; typedef Lib3MFHandle Lib3MF_Texture2D; +typedef Lib3MFHandle Lib3MF_ImplicitPort; +typedef Lib3MFHandle Lib3MF_Iterator; +typedef Lib3MFHandle Lib3MF_ImplicitPortIterator; +typedef Lib3MFHandle Lib3MF_ImplicitNode; +typedef Lib3MFHandle Lib3MF_OneInputNode; +typedef Lib3MFHandle Lib3MF_SinNode; +typedef Lib3MFHandle Lib3MF_CosNode; +typedef Lib3MFHandle Lib3MF_TanNode; +typedef Lib3MFHandle Lib3MF_ArcSinNode; +typedef Lib3MFHandle Lib3MF_ArcCosNode; +typedef Lib3MFHandle Lib3MF_ArcTanNode; +typedef Lib3MFHandle Lib3MF_SinhNode; +typedef Lib3MFHandle Lib3MF_CoshNode; +typedef Lib3MFHandle Lib3MF_TanhNode; +typedef Lib3MFHandle Lib3MF_RoundNode; +typedef Lib3MFHandle Lib3MF_CeilNode; +typedef Lib3MFHandle Lib3MF_FloorNode; +typedef Lib3MFHandle Lib3MF_SignNode; +typedef Lib3MFHandle Lib3MF_FractNode; +typedef Lib3MFHandle Lib3MF_AbsNode; +typedef Lib3MFHandle Lib3MF_ExpNode; +typedef Lib3MFHandle Lib3MF_LogNode; +typedef Lib3MFHandle Lib3MF_Log2Node; +typedef Lib3MFHandle Lib3MF_Log10Node; +typedef Lib3MFHandle Lib3MF_LengthNode; +typedef Lib3MFHandle Lib3MF_TransposeNode; +typedef Lib3MFHandle Lib3MF_InverseNode; +typedef Lib3MFHandle Lib3MF_SqrtNode; +typedef Lib3MFHandle Lib3MF_ResourceIdNode; +typedef Lib3MFHandle Lib3MF_TwoInputNode; +typedef Lib3MFHandle Lib3MF_AdditionNode; +typedef Lib3MFHandle Lib3MF_SubtractionNode; +typedef Lib3MFHandle Lib3MF_MultiplicationNode; +typedef Lib3MFHandle Lib3MF_DivisionNode; +typedef Lib3MFHandle Lib3MF_DotNode; +typedef Lib3MFHandle Lib3MF_CrossNode; +typedef Lib3MFHandle Lib3MF_ArcTan2Node; +typedef Lib3MFHandle Lib3MF_MatVecMultiplicationNode; +typedef Lib3MFHandle Lib3MF_MinNode; +typedef Lib3MFHandle Lib3MF_MaxNode; +typedef Lib3MFHandle Lib3MF_FmodNode; +typedef Lib3MFHandle Lib3MF_ModNode; +typedef Lib3MFHandle Lib3MF_PowNode; +typedef Lib3MFHandle Lib3MF_SelectNode; +typedef Lib3MFHandle Lib3MF_ClampNode; +typedef Lib3MFHandle Lib3MF_ComposeVectorNode; +typedef Lib3MFHandle Lib3MF_VectorFromScalarNode; +typedef Lib3MFHandle Lib3MF_DecomposeVectorNode; +typedef Lib3MFHandle Lib3MF_ComposeMatrixNode; +typedef Lib3MFHandle Lib3MF_MatrixFromRowsNode; +typedef Lib3MFHandle Lib3MF_MatrixFromColumnsNode; +typedef Lib3MFHandle Lib3MF_ConstantNode; +typedef Lib3MFHandle Lib3MF_ConstVecNode; +typedef Lib3MFHandle Lib3MF_ConstMatNode; +typedef Lib3MFHandle Lib3MF_MeshNode; +typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_FunctionCallNode; +typedef Lib3MFHandle Lib3MF_NodeIterator; +typedef Lib3MFHandle Lib3MF_Function; +typedef Lib3MFHandle Lib3MF_ImplicitFunction; +typedef Lib3MFHandle Lib3MF_FunctionFromImage3D; typedef Lib3MFHandle Lib3MF_BuildItem; typedef Lib3MFHandle Lib3MF_BuildItemIterator; typedef Lib3MFHandle Lib3MF_Slice; @@ -306,7 +389,7 @@ namespace Lib3MF { }; enum class eBeamLatticeBallMode : Lib3MF_int32 { - None = 0, + BeamLatticeBallModeNone = 0, Mixed = 1, All = 2 }; @@ -344,6 +427,103 @@ namespace Lib3MF { Multiply = 2 }; + enum class eChannelName : Lib3MF_int32 { + Red = 0, + Green = 1, + Blue = 2, + Alpha = 3 + }; + + enum class eCompositionMethod : Lib3MF_int32 { + WeightedSum = 0, + Multiply = 1, + Min = 2, + Max = 3, + Mask = 4 + }; + + enum class eCompositionSpace : Lib3MF_int32 { + Raw = 0, + LinearColor = 1 + }; + + /** + * enum class eImplicitNodeType - The type of the node + */ + enum class eImplicitNodeType : Lib3MF_int32 { + Addition = 1, /** Adds to values (scalar or vector) */ + Subtraction = 2, /** Subtracts two values (scalar or vector) */ + Multiplication = 3, /** Multiplies two values (scalar or vector) */ + Division = 4, /** Divides two values (scalar or vector) */ + Constant = 5, /** A constant scalar value */ + ConstVec = 6, /** A constant vector value */ + ConstMat = 7, /** A constant matrix value */ + ComposeVector = 8, /** Creates a vector from three scalar values */ + DecomposeVector = 9, /** Decomposes a vector into three scalar values */ + ComposeMatrix = 10, /** Creates a matrix from nine scalar values */ + MatrixFromColumns = 11, /** Creates a matrix from three column vector values */ + MatrixFromRows = 12, /** Creates a matrix from three row vector values */ + Dot = 13, /** Calculates the dot product of two vector values */ + Cross = 14, /** Calculates the cross product of two vector values */ + MatVecMultiplication = 15, /** Multiplies a matrix with a vector */ + Transpose = 16, /** Transposes a matrix */ + Inverse = 17, /** Computes the inverse of a matrix */ + Sinus = 18, /** Calculates the sinus */ + Cosinus = 19, /** Calculates the cosinus */ + Tan = 20, /** Calculates the tangent */ + ArcSin = 21, /** Calculates the arcsinus */ + ArcCos = 22, /** Calculates the arccosinus */ + ArcTan = 23, /** Calculates the arctangent */ + ArcTan2 = 24, /** Calculates the arctangent */ + Min = 25, /** Calculates the minimum tow values */ + Max = 26, /** Calculates the maximum of two values */ + Abs = 27, /** Calcul the absolute value */ + Fmod = 28, /** Computes the remainder of the divison of the inputs (same behavior as C fmod) */ + Pow = 29, /** Calculates the power A^B */ + Sqrt = 30, /** Calculates the square root */ + Exp = 31, /** Exponential function */ + Log = 32, /** Natural logarithmus */ + Log2 = 33, /** Logarithmus to the base 2 */ + Log10 = 34, /** Logarithmus to the base 10 */ + Select = 35, /** If A is less B returns C, else D */ + Clamp = 36, /** Clamps the input value to min and max */ + Sinh = 37, /** Calculates the hyperbolic sine */ + Cosh = 38, /** Calculates the hyperbolic cosine */ + Tanh = 39, /** Calculates the hyperbolic tangent */ + Round = 40, /** Rounds a scalar value to the nearest integer */ + Ceil = 41, /** Rounds a scalar value up to the nearest integer */ + Floor = 42, /** Rounds a scalar value down to the nearest integer */ + Sign = 43, /** Returns the sign */ + Fract = 44, /** Returns the fractional part */ + FunctionCall = 45, /** Calls a function */ + Mesh = 46, /** Calculates the signed distance to a mesh */ + Length = 47, /** Calculates the length of a vector */ + ConstResourceID = 48, /** Selects a resource (function, mesh etc.) */ + VectorFromScalar = 49, /** Creates a vector from one scalar values */ + UnsignedMesh = 50, /** Calculates the unsigned distance to a mesh */ + Mod = 51 /** Calculates the modulo of two values (same behaviour as glsl mod) */ + }; + + /** + * enum class eImplicitPortType - The type of the port + */ + enum class eImplicitPortType : Lib3MF_int32 { + Scalar = 1, /** Scalar */ + Vector = 2, /** Vector */ + Matrix = 3, /** 4x4 Matrix */ + ResourceID = 4 /** Resource ID */ + }; + + /** + * enum class eImplicitNodeConfiguration - Defines the input and output types of a node + */ + enum class eImplicitNodeConfiguration : Lib3MF_int32 { + Default = 1, /** Default */ + ScalarToScalar = 2, /** Scalar -> Scalar */ + VectorToVector = 3, /** Vector -> Vector */ + MatrixToMatrix = 4 /** Matrix -> Matrix */ + }; + enum class eEncryptionAlgorithm : Lib3MF_int32 { AES256_GCM = 1 /** http://www.w3.org/2009/xmlenc11#aes256-gcm */ }; @@ -435,6 +615,14 @@ namespace Lib3MF { Lib3MF_double m_Radius; } sBall; + typedef struct sVector { + Lib3MF_double m_Coordinates[3]; + } sVector; + + typedef struct sMatrix4x4 { + Lib3MF_double m_Field[4][4]; + } sMatrix4x4; + #pragma pack () /************************************************************************************************************************* @@ -530,6 +718,12 @@ typedef Lib3MF::eBeamLatticeClipMode eLib3MFBeamLatticeClipMode; typedef Lib3MF::eBeamLatticeBallMode eLib3MFBeamLatticeBallMode; typedef Lib3MF::eProgressIdentifier eLib3MFProgressIdentifier; typedef Lib3MF::eBlendMethod eLib3MFBlendMethod; +typedef Lib3MF::eChannelName eLib3MFChannelName; +typedef Lib3MF::eCompositionMethod eLib3MFCompositionMethod; +typedef Lib3MF::eCompositionSpace eLib3MFCompositionSpace; +typedef Lib3MF::eImplicitNodeType eLib3MFImplicitNodeType; +typedef Lib3MF::eImplicitPortType eLib3MFImplicitPortType; +typedef Lib3MF::eImplicitNodeConfiguration eLib3MFImplicitNodeConfiguration; typedef Lib3MF::eEncryptionAlgorithm eLib3MFEncryptionAlgorithm; typedef Lib3MF::eWrappingAlgorithm eLib3MFWrappingAlgorithm; typedef Lib3MF::eMgfAlgorithm eLib3MFMgfAlgorithm; @@ -547,6 +741,8 @@ typedef Lib3MF::sBox sLib3MFBox; typedef Lib3MF::sColor sLib3MFColor; typedef Lib3MF::sBeam sLib3MFBeam; typedef Lib3MF::sBall sLib3MFBall; +typedef Lib3MF::sVector sLib3MFVector; +typedef Lib3MF::sMatrix4x4 sLib3MFMatrix4x4; typedef Lib3MF::ProgressCallback Lib3MFProgressCallback; typedef Lib3MF::WriteCallback Lib3MFWriteCallback; typedef Lib3MF::ReadCallback Lib3MFReadCallback; diff --git a/Autogenerated/Bindings/Go/cfunc.go b/Autogenerated/Bindings/Go/cfunc.go index 0256de1e0..e50393613 100644 --- a/Autogenerated/Bindings/Go/cfunc.go +++ b/Autogenerated/Bindings/Go/cfunc.go @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated Go wrapper file in order to allow an easy use of the 3MF Library. -Interface version: 2.3.2 +Interface version: 2.4.0 */ diff --git a/Autogenerated/Bindings/Go/lib3mf.go b/Autogenerated/Bindings/Go/lib3mf.go index 705bad104..7a8592b92 100644 --- a/Autogenerated/Bindings/Go/lib3mf.go +++ b/Autogenerated/Bindings/Go/lib3mf.go @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated Go wrapper file in order to allow an easy use of the 3MF Library. -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -504,6 +504,33 @@ Lib3MFResult CCall_lib3mf_multipropertygroupiterator_getcurrentmultipropertygrou } +Lib3MFResult CCall_lib3mf_image3diterator_getcurrentimage3d(Lib3MFHandle libraryHandle, Lib3MF_Image3DIterator pImage3DIterator, Lib3MF_Image3D * pResource) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Image3DIterator_GetCurrentImage3D (pImage3DIterator, pResource); +} + + +Lib3MFResult CCall_lib3mf_functioniterator_getcurrentfunction(Lib3MFHandle libraryHandle, Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionIterator_GetCurrentFunction (pFunctionIterator, pResource); +} + + +Lib3MFResult CCall_lib3mf_levelsetiterator_getcurrentlevelset(Lib3MFHandle libraryHandle, Lib3MF_LevelSetIterator pLevelSetIterator, Lib3MF_LevelSet * pResource) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_LevelSetIterator_GetCurrentLevelSet (pLevelSetIterator, pResource); +} + + Lib3MFResult CCall_lib3mf_metadata_getnamespace(Lib3MFHandle libraryHandle, Lib3MF_MetaData pMetaData, const Lib3MF_uint32 nNameSpaceBufferSize, Lib3MF_uint32* pNameSpaceNeededChars, char * pNameSpaceBuffer) { if (libraryHandle == 0) @@ -729,6 +756,15 @@ Lib3MFResult CCall_lib3mf_object_iscomponentsobject(Lib3MFHandle libraryHandle, } +Lib3MFResult CCall_lib3mf_object_islevelsetobject(Lib3MFHandle libraryHandle, Lib3MF_Object pObject, bool * pIsLevelSetObject) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Object_IsLevelSetObject (pObject, pIsLevelSetObject); +} + + Lib3MFResult CCall_lib3mf_object_isvalid(Lib3MFHandle libraryHandle, Lib3MF_Object pObject, bool * pIsValid) { if (libraryHandle == 0) @@ -1035,5251 +1071,10630 @@ Lib3MFResult CCall_lib3mf_meshobject_beamlattice(Lib3MFHandle libraryHandle, Lib } -Lib3MFResult CCall_lib3mf_beamlattice_getminlength(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_double * pMinLength) +Lib3MFResult CCall_lib3mf_meshobject_getvolumedata(Lib3MFHandle libraryHandle, Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData * pTheVolumeData) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetMinLength (pBeamLattice, pMinLength); + return wrapperTable->m_MeshObject_GetVolumeData (pMeshObject, pTheVolumeData); } -Lib3MFResult CCall_lib3mf_beamlattice_setminlength(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_double dMinLength) +Lib3MFResult CCall_lib3mf_meshobject_setvolumedata(Lib3MFHandle libraryHandle, Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData pTheVolumeData) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_SetMinLength (pBeamLattice, dMinLength); + return wrapperTable->m_MeshObject_SetVolumeData (pMeshObject, pTheVolumeData); } -Lib3MFResult CCall_lib3mf_beamlattice_getclipping(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeClipMode * pClipMode, Lib3MF_uint32 * pUniqueResourceID) +Lib3MFResult CCall_lib3mf_levelset_getfunction(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, Lib3MF_Function * pTheFunction) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetClipping (pBeamLattice, pClipMode, pUniqueResourceID); + return wrapperTable->m_LevelSet_GetFunction (pLevelSet, pTheFunction); } -Lib3MFResult CCall_lib3mf_beamlattice_setclipping(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeClipMode eClipMode, Lib3MF_uint32 nUniqueResourceID) +Lib3MFResult CCall_lib3mf_levelset_setfunction(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, Lib3MF_Function pTheFunction) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_SetClipping (pBeamLattice, eClipMode, nUniqueResourceID); + return wrapperTable->m_LevelSet_SetFunction (pLevelSet, pTheFunction); } -Lib3MFResult CCall_lib3mf_beamlattice_getrepresentation(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, bool * pHasRepresentation, Lib3MF_uint32 * pUniqueResourceID) +Lib3MFResult CCall_lib3mf_levelset_gettransform(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, sLib3MFTransform * pTransform) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetRepresentation (pBeamLattice, pHasRepresentation, pUniqueResourceID); + return wrapperTable->m_LevelSet_GetTransform (pLevelSet, pTransform); } -Lib3MFResult CCall_lib3mf_beamlattice_setrepresentation(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nUniqueResourceID) +Lib3MFResult CCall_lib3mf_levelset_settransform(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, const sLib3MFTransform * pTransform) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_SetRepresentation (pBeamLattice, nUniqueResourceID); + return wrapperTable->m_LevelSet_SetTransform (pLevelSet, pTransform); } -Lib3MFResult CCall_lib3mf_beamlattice_getballoptions(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeBallMode * pBallMode, Lib3MF_double * pBallRadius) +Lib3MFResult CCall_lib3mf_levelset_getchannelname(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetBallOptions (pBeamLattice, pBallMode, pBallRadius); + return wrapperTable->m_LevelSet_GetChannelName (pLevelSet, nChannelNameBufferSize, pChannelNameNeededChars, pChannelNameBuffer); } -Lib3MFResult CCall_lib3mf_beamlattice_setballoptions(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeBallMode eBallMode, Lib3MF_double dBallRadius) +Lib3MFResult CCall_lib3mf_levelset_setchannelname(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, const char * pChannelName) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_SetBallOptions (pBeamLattice, eBallMode, dBallRadius); + return wrapperTable->m_LevelSet_SetChannelName (pLevelSet, pChannelName); } -Lib3MFResult CCall_lib3mf_beamlattice_getbeamcount(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_levelset_setminfeaturesize(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, Lib3MF_double dMinFeatureSize) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetBeamCount (pBeamLattice, pCount); + return wrapperTable->m_LevelSet_SetMinFeatureSize (pLevelSet, dMinFeatureSize); } -Lib3MFResult CCall_lib3mf_beamlattice_getbeam(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, sLib3MFBeam * pBeamInfo) +Lib3MFResult CCall_lib3mf_levelset_getminfeaturesize(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, Lib3MF_double * pMinFeatureSize) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetBeam (pBeamLattice, nIndex, pBeamInfo); + return wrapperTable->m_LevelSet_GetMinFeatureSize (pLevelSet, pMinFeatureSize); } -Lib3MFResult CCall_lib3mf_beamlattice_addbeam(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, const sLib3MFBeam * pBeamInfo, Lib3MF_uint32 * pIndex) +Lib3MFResult CCall_lib3mf_levelset_setfallbackvalue(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, Lib3MF_double dFallBackValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_AddBeam (pBeamLattice, pBeamInfo, pIndex); + return wrapperTable->m_LevelSet_SetFallBackValue (pLevelSet, dFallBackValue); } -Lib3MFResult CCall_lib3mf_beamlattice_setbeam(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const sLib3MFBeam * pBeamInfo) +Lib3MFResult CCall_lib3mf_levelset_getfallbackvalue(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, Lib3MF_double * pFallBackValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_SetBeam (pBeamLattice, nIndex, pBeamInfo); + return wrapperTable->m_LevelSet_GetFallBackValue (pLevelSet, pFallBackValue); } -Lib3MFResult CCall_lib3mf_beamlattice_setbeams(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBeamInfoBufferSize, const sLib3MFBeam * pBeamInfoBuffer) +Lib3MFResult CCall_lib3mf_levelset_setmeshbboxonly(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, bool bMeshBBoxOnly) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_SetBeams (pBeamLattice, nBeamInfoBufferSize, pBeamInfoBuffer); + return wrapperTable->m_LevelSet_SetMeshBBoxOnly (pLevelSet, bMeshBBoxOnly); } -Lib3MFResult CCall_lib3mf_beamlattice_getbeams(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBeamInfoBufferSize, Lib3MF_uint64* pBeamInfoNeededCount, sLib3MFBeam * pBeamInfoBuffer) +Lib3MFResult CCall_lib3mf_levelset_getmeshbboxonly(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, bool * pMeshBBoxOnly) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetBeams (pBeamLattice, nBeamInfoBufferSize, pBeamInfoNeededCount, pBeamInfoBuffer); + return wrapperTable->m_LevelSet_GetMeshBBoxOnly (pLevelSet, pMeshBBoxOnly); } -Lib3MFResult CCall_lib3mf_beamlattice_getballcount(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_levelset_setmesh(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject pTheMesh) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetBallCount (pBeamLattice, pCount); + return wrapperTable->m_LevelSet_SetMesh (pLevelSet, pTheMesh); } -Lib3MFResult CCall_lib3mf_beamlattice_getball(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, sLib3MFBall * pBallInfo) +Lib3MFResult CCall_lib3mf_levelset_getmesh(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetBall (pBeamLattice, nIndex, pBallInfo); + return wrapperTable->m_LevelSet_GetMesh (pLevelSet, pTheMesh); } -Lib3MFResult CCall_lib3mf_beamlattice_addball(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, const sLib3MFBall * pBallInfo, Lib3MF_uint32 * pIndex) +Lib3MFResult CCall_lib3mf_levelset_getvolumedata(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_AddBall (pBeamLattice, pBallInfo, pIndex); + return wrapperTable->m_LevelSet_GetVolumeData (pLevelSet, pTheVolumeData); } -Lib3MFResult CCall_lib3mf_beamlattice_setball(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const sLib3MFBall * pBallInfo) +Lib3MFResult CCall_lib3mf_levelset_setvolumedata(Lib3MFHandle libraryHandle, Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData pTheVolumeData) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_SetBall (pBeamLattice, nIndex, pBallInfo); + return wrapperTable->m_LevelSet_SetVolumeData (pLevelSet, pTheVolumeData); } -Lib3MFResult CCall_lib3mf_beamlattice_setballs(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBallInfoBufferSize, const sLib3MFBall * pBallInfoBuffer) +Lib3MFResult CCall_lib3mf_beamlattice_getminlength(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_double * pMinLength) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_SetBalls (pBeamLattice, nBallInfoBufferSize, pBallInfoBuffer); + return wrapperTable->m_BeamLattice_GetMinLength (pBeamLattice, pMinLength); } -Lib3MFResult CCall_lib3mf_beamlattice_getballs(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBallInfoBufferSize, Lib3MF_uint64* pBallInfoNeededCount, sLib3MFBall * pBallInfoBuffer) +Lib3MFResult CCall_lib3mf_beamlattice_setminlength(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_double dMinLength) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetBalls (pBeamLattice, nBallInfoBufferSize, pBallInfoNeededCount, pBallInfoBuffer); + return wrapperTable->m_BeamLattice_SetMinLength (pBeamLattice, dMinLength); } -Lib3MFResult CCall_lib3mf_beamlattice_getbeamsetcount(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_beamlattice_getclipping(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeClipMode * pClipMode, Lib3MF_uint32 * pUniqueResourceID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetBeamSetCount (pBeamLattice, pCount); + return wrapperTable->m_BeamLattice_GetClipping (pBeamLattice, pClipMode, pUniqueResourceID); } -Lib3MFResult CCall_lib3mf_beamlattice_addbeamset(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_BeamSet * pBeamSet) +Lib3MFResult CCall_lib3mf_beamlattice_setclipping(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeClipMode eClipMode, Lib3MF_uint32 nUniqueResourceID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_AddBeamSet (pBeamLattice, pBeamSet); + return wrapperTable->m_BeamLattice_SetClipping (pBeamLattice, eClipMode, nUniqueResourceID); } -Lib3MFResult CCall_lib3mf_beamlattice_getbeamset(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet) +Lib3MFResult CCall_lib3mf_beamlattice_getrepresentation(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, bool * pHasRepresentation, Lib3MF_uint32 * pUniqueResourceID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamLattice_GetBeamSet (pBeamLattice, nIndex, pBeamSet); + return wrapperTable->m_BeamLattice_GetRepresentation (pBeamLattice, pHasRepresentation, pUniqueResourceID); } -Lib3MFResult CCall_lib3mf_component_getobjectresource(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource) +Lib3MFResult CCall_lib3mf_beamlattice_setrepresentation(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nUniqueResourceID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Component_GetObjectResource (pComponent, pObjectResource); + return wrapperTable->m_BeamLattice_SetRepresentation (pBeamLattice, nUniqueResourceID); } -Lib3MFResult CCall_lib3mf_component_getobjectresourceid(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID) +Lib3MFResult CCall_lib3mf_beamlattice_getballoptions(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeBallMode * pBallMode, Lib3MF_double * pBallRadius) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Component_GetObjectResourceID (pComponent, pUniqueResourceID); + return wrapperTable->m_BeamLattice_GetBallOptions (pBeamLattice, pBallMode, pBallRadius); } -Lib3MFResult CCall_lib3mf_component_getuuid(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +Lib3MFResult CCall_lib3mf_beamlattice_setballoptions(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeBallMode eBallMode, Lib3MF_double dBallRadius) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Component_GetUUID (pComponent, pHasUUID, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); + return wrapperTable->m_BeamLattice_SetBallOptions (pBeamLattice, eBallMode, dBallRadius); } -Lib3MFResult CCall_lib3mf_component_setuuid(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, const char * pUUID) +Lib3MFResult CCall_lib3mf_beamlattice_getbeamcount(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Component_SetUUID (pComponent, pUUID); + return wrapperTable->m_BeamLattice_GetBeamCount (pBeamLattice, pCount); } -Lib3MFResult CCall_lib3mf_component_hastransform(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, bool * pHasTransform) +Lib3MFResult CCall_lib3mf_beamlattice_getbeam(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, sLib3MFBeam * pBeamInfo) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Component_HasTransform (pComponent, pHasTransform); + return wrapperTable->m_BeamLattice_GetBeam (pBeamLattice, nIndex, pBeamInfo); } -Lib3MFResult CCall_lib3mf_component_gettransform(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, sLib3MFTransform * pTransform) +Lib3MFResult CCall_lib3mf_beamlattice_addbeam(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, const sLib3MFBeam * pBeamInfo, Lib3MF_uint32 * pIndex) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Component_GetTransform (pComponent, pTransform); + return wrapperTable->m_BeamLattice_AddBeam (pBeamLattice, pBeamInfo, pIndex); } -Lib3MFResult CCall_lib3mf_component_settransform(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, const sLib3MFTransform * pTransform) +Lib3MFResult CCall_lib3mf_beamlattice_setbeam(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const sLib3MFBeam * pBeamInfo) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Component_SetTransform (pComponent, pTransform); + return wrapperTable->m_BeamLattice_SetBeam (pBeamLattice, nIndex, pBeamInfo); } -Lib3MFResult CCall_lib3mf_componentsobject_addcomponent(Lib3MFHandle libraryHandle, Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance) +Lib3MFResult CCall_lib3mf_beamlattice_setbeams(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBeamInfoBufferSize, const sLib3MFBeam * pBeamInfoBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ComponentsObject_AddComponent (pComponentsObject, pObjectResource, pTransform, pComponentInstance); + return wrapperTable->m_BeamLattice_SetBeams (pBeamLattice, nBeamInfoBufferSize, pBeamInfoBuffer); } -Lib3MFResult CCall_lib3mf_componentsobject_getcomponent(Lib3MFHandle libraryHandle, Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance) +Lib3MFResult CCall_lib3mf_beamlattice_getbeams(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBeamInfoBufferSize, Lib3MF_uint64* pBeamInfoNeededCount, sLib3MFBeam * pBeamInfoBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ComponentsObject_GetComponent (pComponentsObject, nIndex, pComponentInstance); + return wrapperTable->m_BeamLattice_GetBeams (pBeamLattice, nBeamInfoBufferSize, pBeamInfoNeededCount, pBeamInfoBuffer); } -Lib3MFResult CCall_lib3mf_componentsobject_getcomponentcount(Lib3MFHandle libraryHandle, Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_beamlattice_getballcount(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ComponentsObject_GetComponentCount (pComponentsObject, pCount); + return wrapperTable->m_BeamLattice_GetBallCount (pBeamLattice, pCount); } -Lib3MFResult CCall_lib3mf_beamset_setname(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const char * pName) +Lib3MFResult CCall_lib3mf_beamlattice_getball(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, sLib3MFBall * pBallInfo) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamSet_SetName (pBeamSet, pName); + return wrapperTable->m_BeamLattice_GetBall (pBeamLattice, nIndex, pBallInfo); } -Lib3MFResult CCall_lib3mf_beamset_getname(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer) +Lib3MFResult CCall_lib3mf_beamlattice_addball(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, const sLib3MFBall * pBallInfo, Lib3MF_uint32 * pIndex) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamSet_GetName (pBeamSet, nNameBufferSize, pNameNeededChars, pNameBuffer); + return wrapperTable->m_BeamLattice_AddBall (pBeamLattice, pBallInfo, pIndex); } -Lib3MFResult CCall_lib3mf_beamset_setidentifier(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const char * pIdentifier) +Lib3MFResult CCall_lib3mf_beamlattice_setball(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const sLib3MFBall * pBallInfo) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamSet_SetIdentifier (pBeamSet, pIdentifier); + return wrapperTable->m_BeamLattice_SetBall (pBeamLattice, nIndex, pBallInfo); } -Lib3MFResult CCall_lib3mf_beamset_getidentifier(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer) +Lib3MFResult CCall_lib3mf_beamlattice_setballs(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBallInfoBufferSize, const sLib3MFBall * pBallInfoBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamSet_GetIdentifier (pBeamSet, nIdentifierBufferSize, pIdentifierNeededChars, pIdentifierBuffer); + return wrapperTable->m_BeamLattice_SetBalls (pBeamLattice, nBallInfoBufferSize, pBallInfoBuffer); } -Lib3MFResult CCall_lib3mf_beamset_getreferencecount(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_beamlattice_getballs(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBallInfoBufferSize, Lib3MF_uint64* pBallInfoNeededCount, sLib3MFBall * pBallInfoBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamSet_GetReferenceCount (pBeamSet, pCount); + return wrapperTable->m_BeamLattice_GetBalls (pBeamLattice, nBallInfoBufferSize, pBallInfoNeededCount, pBallInfoBuffer); } -Lib3MFResult CCall_lib3mf_beamset_setreferences(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer) +Lib3MFResult CCall_lib3mf_beamlattice_getbeamsetcount(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamSet_SetReferences (pBeamSet, nReferencesBufferSize, pReferencesBuffer); + return wrapperTable->m_BeamLattice_GetBeamSetCount (pBeamLattice, pCount); } -Lib3MFResult CCall_lib3mf_beamset_getreferences(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer) +Lib3MFResult CCall_lib3mf_beamlattice_addbeamset(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_BeamSet * pBeamSet) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamSet_GetReferences (pBeamSet, nReferencesBufferSize, pReferencesNeededCount, pReferencesBuffer); + return wrapperTable->m_BeamLattice_AddBeamSet (pBeamLattice, pBeamSet); } -Lib3MFResult CCall_lib3mf_beamset_getballreferencecount(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_beamlattice_getbeamset(Lib3MFHandle libraryHandle, Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamSet_GetBallReferenceCount (pBeamSet, pCount); + return wrapperTable->m_BeamLattice_GetBeamSet (pBeamLattice, nIndex, pBeamSet); } -Lib3MFResult CCall_lib3mf_beamset_setballreferences(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer) +Lib3MFResult CCall_lib3mf_functionreference_getfunctionresourceid(Lib3MFHandle libraryHandle, Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 * pUniqueResourceID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamSet_SetBallReferences (pBeamSet, nBallReferencesBufferSize, pBallReferencesBuffer); + return wrapperTable->m_FunctionReference_GetFunctionResourceID (pFunctionReference, pUniqueResourceID); } -Lib3MFResult CCall_lib3mf_beamset_getballreferences(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer) +Lib3MFResult CCall_lib3mf_functionreference_setfunctionresourceid(Lib3MFHandle libraryHandle, Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 nUniqueResourceID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BeamSet_GetBallReferences (pBeamSet, nBallReferencesBufferSize, pBallReferencesNeededCount, pBallReferencesBuffer); + return wrapperTable->m_FunctionReference_SetFunctionResourceID (pFunctionReference, nUniqueResourceID); } -Lib3MFResult CCall_lib3mf_basematerialgroup_getcount(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_functionreference_gettransform(Lib3MFHandle libraryHandle, Lib3MF_FunctionReference pFunctionReference, sLib3MFTransform * pTransform) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BaseMaterialGroup_GetCount (pBaseMaterialGroup, pCount); + return wrapperTable->m_FunctionReference_GetTransform (pFunctionReference, pTransform); } -Lib3MFResult CCall_lib3mf_basematerialgroup_getallpropertyids(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult CCall_lib3mf_functionreference_settransform(Lib3MFHandle libraryHandle, Lib3MF_FunctionReference pFunctionReference, const sLib3MFTransform * pTransform) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs (pBaseMaterialGroup, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + return wrapperTable->m_FunctionReference_SetTransform (pFunctionReference, pTransform); } -Lib3MFResult CCall_lib3mf_basematerialgroup_addmaterial(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID) +Lib3MFResult CCall_lib3mf_functionreference_getchannelname(Lib3MFHandle libraryHandle, Lib3MF_FunctionReference pFunctionReference, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BaseMaterialGroup_AddMaterial (pBaseMaterialGroup, pName, pDisplayColor, pPropertyID); + return wrapperTable->m_FunctionReference_GetChannelName (pFunctionReference, nChannelNameBufferSize, pChannelNameNeededChars, pChannelNameBuffer); } -Lib3MFResult CCall_lib3mf_basematerialgroup_removematerial(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID) +Lib3MFResult CCall_lib3mf_functionreference_setchannelname(Lib3MFHandle libraryHandle, Lib3MF_FunctionReference pFunctionReference, const char * pChannelName) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BaseMaterialGroup_RemoveMaterial (pBaseMaterialGroup, nPropertyID); + return wrapperTable->m_FunctionReference_SetChannelName (pFunctionReference, pChannelName); } -Lib3MFResult CCall_lib3mf_basematerialgroup_getname(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer) +Lib3MFResult CCall_lib3mf_functionreference_setminfeaturesize(Lib3MFHandle libraryHandle, Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dMinFeatureSize) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BaseMaterialGroup_GetName (pBaseMaterialGroup, nPropertyID, nNameBufferSize, pNameNeededChars, pNameBuffer); + return wrapperTable->m_FunctionReference_SetMinFeatureSize (pFunctionReference, dMinFeatureSize); } -Lib3MFResult CCall_lib3mf_basematerialgroup_setname(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName) +Lib3MFResult CCall_lib3mf_functionreference_getminfeaturesize(Lib3MFHandle libraryHandle, Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pMinFeatureSize) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BaseMaterialGroup_SetName (pBaseMaterialGroup, nPropertyID, pName); + return wrapperTable->m_FunctionReference_GetMinFeatureSize (pFunctionReference, pMinFeatureSize); } -Lib3MFResult CCall_lib3mf_basematerialgroup_setdisplaycolor(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor) +Lib3MFResult CCall_lib3mf_functionreference_setfallbackvalue(Lib3MFHandle libraryHandle, Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dFallBackValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BaseMaterialGroup_SetDisplayColor (pBaseMaterialGroup, nPropertyID, pTheColor); + return wrapperTable->m_FunctionReference_SetFallBackValue (pFunctionReference, dFallBackValue); } -Lib3MFResult CCall_lib3mf_basematerialgroup_getdisplaycolor(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor) +Lib3MFResult CCall_lib3mf_functionreference_getfallbackvalue(Lib3MFHandle libraryHandle, Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pFallBackValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BaseMaterialGroup_GetDisplayColor (pBaseMaterialGroup, nPropertyID, pTheColor); + return wrapperTable->m_FunctionReference_GetFallBackValue (pFunctionReference, pFallBackValue); } -Lib3MFResult CCall_lib3mf_colorgroup_getcount(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_volumedatacomposite_getbasematerialgroup(Lib3MFHandle libraryHandle, Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ColorGroup_GetCount (pColorGroup, pCount); + return wrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup (pVolumeDataComposite, pBaseMaterialGroupInstance); } -Lib3MFResult CCall_lib3mf_colorgroup_getallpropertyids(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult CCall_lib3mf_volumedatacomposite_setbasematerialgroup(Lib3MFHandle libraryHandle, Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ColorGroup_GetAllPropertyIDs (pColorGroup, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + return wrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup (pVolumeDataComposite, pBaseMaterialGroupInstance); } -Lib3MFResult CCall_lib3mf_colorgroup_addcolor(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID) +Lib3MFResult CCall_lib3mf_volumedatacomposite_getmaterialmappingcount(Lib3MFHandle libraryHandle, Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ColorGroup_AddColor (pColorGroup, pTheColor, pPropertyID); + return wrapperTable->m_VolumeDataComposite_GetMaterialMappingCount (pVolumeDataComposite, pCount); } -Lib3MFResult CCall_lib3mf_colorgroup_removecolor(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID) +Lib3MFResult CCall_lib3mf_volumedatacomposite_getmaterialmapping(Lib3MFHandle libraryHandle, Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ColorGroup_RemoveColor (pColorGroup, nPropertyID); + return wrapperTable->m_VolumeDataComposite_GetMaterialMapping (pVolumeDataComposite, nIndex, pTheMaterialMapping); } -Lib3MFResult CCall_lib3mf_colorgroup_setcolor(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor) +Lib3MFResult CCall_lib3mf_volumedatacomposite_addmaterialmapping(Lib3MFHandle libraryHandle, Lib3MF_VolumeDataComposite pVolumeDataComposite, const sLib3MFTransform * pTransform, Lib3MF_MaterialMapping * pTheMaterialMapping) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ColorGroup_SetColor (pColorGroup, nPropertyID, pTheColor); + return wrapperTable->m_VolumeDataComposite_AddMaterialMapping (pVolumeDataComposite, pTransform, pTheMaterialMapping); } -Lib3MFResult CCall_lib3mf_colorgroup_getcolor(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor) +Lib3MFResult CCall_lib3mf_volumedatacomposite_removematerialmapping(Lib3MFHandle libraryHandle, Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ColorGroup_GetColor (pColorGroup, nPropertyID, pTheColor); + return wrapperTable->m_VolumeDataComposite_RemoveMaterialMapping (pVolumeDataComposite, nIndex); } -Lib3MFResult CCall_lib3mf_texture2dgroup_getcount(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_volumedataproperty_getname(Lib3MFHandle libraryHandle, Lib3MF_VolumeDataProperty pVolumeDataProperty, const Lib3MF_uint32 nPropertyNameBufferSize, Lib3MF_uint32* pPropertyNameNeededChars, char * pPropertyNameBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2DGroup_GetCount (pTexture2DGroup, pCount); + return wrapperTable->m_VolumeDataProperty_GetName (pVolumeDataProperty, nPropertyNameBufferSize, pPropertyNameNeededChars, pPropertyNameBuffer); } -Lib3MFResult CCall_lib3mf_texture2dgroup_getallpropertyids(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult CCall_lib3mf_volumedataproperty_setisrequired(Lib3MFHandle libraryHandle, Lib3MF_VolumeDataProperty pVolumeDataProperty, bool bIsRequired) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2DGroup_GetAllPropertyIDs (pTexture2DGroup, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + return wrapperTable->m_VolumeDataProperty_SetIsRequired (pVolumeDataProperty, bIsRequired); } -Lib3MFResult CCall_lib3mf_texture2dgroup_addtex2coord(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID) +Lib3MFResult CCall_lib3mf_volumedataproperty_isrequired(Lib3MFHandle libraryHandle, Lib3MF_VolumeDataProperty pVolumeDataProperty, bool * pIsRequired) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2DGroup_AddTex2Coord (pTexture2DGroup, pUVCoordinate, pPropertyID); + return wrapperTable->m_VolumeDataProperty_IsRequired (pVolumeDataProperty, pIsRequired); } -Lib3MFResult CCall_lib3mf_texture2dgroup_gettex2coord(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate) +Lib3MFResult CCall_lib3mf_volumedata_getcomposite(Lib3MFHandle libraryHandle, Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2DGroup_GetTex2Coord (pTexture2DGroup, nPropertyID, pUVCoordinate); + return wrapperTable->m_VolumeData_GetComposite (pVolumeData, pTheCompositeData); } -Lib3MFResult CCall_lib3mf_texture2dgroup_removetex2coord(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID) +Lib3MFResult CCall_lib3mf_volumedata_createnewcomposite(Lib3MFHandle libraryHandle, Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2DGroup_RemoveTex2Coord (pTexture2DGroup, nPropertyID); + return wrapperTable->m_VolumeData_CreateNewComposite (pVolumeData, pTheCompositeData); } -Lib3MFResult CCall_lib3mf_texture2dgroup_gettexture2d(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance) +Lib3MFResult CCall_lib3mf_volumedata_removecomposite(Lib3MFHandle libraryHandle, Lib3MF_VolumeData pVolumeData) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2DGroup_GetTexture2D (pTexture2DGroup, pTexture2DInstance); + return wrapperTable->m_VolumeData_RemoveComposite (pVolumeData); } -Lib3MFResult CCall_lib3mf_compositematerials_getcount(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_volumedata_getcolor(Lib3MFHandle libraryHandle, Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataColor * pTheColorData) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_CompositeMaterials_GetCount (pCompositeMaterials, pCount); + return wrapperTable->m_VolumeData_GetColor (pVolumeData, pTheColorData); } -Lib3MFResult CCall_lib3mf_compositematerials_getallpropertyids(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult CCall_lib3mf_volumedata_createnewcolor(Lib3MFHandle libraryHandle, Lib3MF_VolumeData pVolumeData, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataColor * pTheColorData) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_CompositeMaterials_GetAllPropertyIDs (pCompositeMaterials, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + return wrapperTable->m_VolumeData_CreateNewColor (pVolumeData, pTheFunction, pTheColorData); } -Lib3MFResult CCall_lib3mf_compositematerials_getbasematerialgroup(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance) +Lib3MFResult CCall_lib3mf_volumedata_removecolor(Lib3MFHandle libraryHandle, Lib3MF_VolumeData pVolumeData) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_CompositeMaterials_GetBaseMaterialGroup (pCompositeMaterials, pBaseMaterialGroupInstance); + return wrapperTable->m_VolumeData_RemoveColor (pVolumeData); } -Lib3MFResult CCall_lib3mf_compositematerials_addcomposite(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID) +Lib3MFResult CCall_lib3mf_volumedata_getpropertycount(Lib3MFHandle libraryHandle, Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_CompositeMaterials_AddComposite (pCompositeMaterials, nCompositeBufferSize, pCompositeBuffer, pPropertyID); + return wrapperTable->m_VolumeData_GetPropertyCount (pVolumeData, pCount); } -Lib3MFResult CCall_lib3mf_compositematerials_removecomposite(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID) +Lib3MFResult CCall_lib3mf_volumedata_getproperty(Lib3MFHandle libraryHandle, Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_CompositeMaterials_RemoveComposite (pCompositeMaterials, nPropertyID); + return wrapperTable->m_VolumeData_GetProperty (pVolumeData, nIndex, pTheVolumeDataProperty); } -Lib3MFResult CCall_lib3mf_compositematerials_getcomposite(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer) +Lib3MFResult CCall_lib3mf_volumedata_addpropertyfromfunction(Lib3MFHandle libraryHandle, Lib3MF_VolumeData pVolumeData, const char * pName, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_CompositeMaterials_GetComposite (pCompositeMaterials, nPropertyID, nCompositeBufferSize, pCompositeNeededCount, pCompositeBuffer); + return wrapperTable->m_VolumeData_AddPropertyFromFunction (pVolumeData, pName, pTheFunction, pTheVolumeDataProperty); } -Lib3MFResult CCall_lib3mf_multipropertygroup_getcount(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_volumedata_removeproperty(Lib3MFHandle libraryHandle, Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_MultiPropertyGroup_GetCount (pMultiPropertyGroup, pCount); + return wrapperTable->m_VolumeData_RemoveProperty (pVolumeData, nIndex); } -Lib3MFResult CCall_lib3mf_multipropertygroup_getallpropertyids(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult CCall_lib3mf_component_getobjectresource(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs (pMultiPropertyGroup, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + return wrapperTable->m_Component_GetObjectResource (pComponent, pObjectResource); } -Lib3MFResult CCall_lib3mf_multipropertygroup_addmultiproperty(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID) +Lib3MFResult CCall_lib3mf_component_getobjectresourceid(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_MultiPropertyGroup_AddMultiProperty (pMultiPropertyGroup, nPropertyIDsBufferSize, pPropertyIDsBuffer, pPropertyID); + return wrapperTable->m_Component_GetObjectResourceID (pComponent, pUniqueResourceID); } -Lib3MFResult CCall_lib3mf_multipropertygroup_setmultiproperty(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult CCall_lib3mf_component_getuuid(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_MultiPropertyGroup_SetMultiProperty (pMultiPropertyGroup, nPropertyID, nPropertyIDsBufferSize, pPropertyIDsBuffer); + return wrapperTable->m_Component_GetUUID (pComponent, pHasUUID, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); } -Lib3MFResult CCall_lib3mf_multipropertygroup_getmultiproperty(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult CCall_lib3mf_component_setuuid(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, const char * pUUID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_MultiPropertyGroup_GetMultiProperty (pMultiPropertyGroup, nPropertyID, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + return wrapperTable->m_Component_SetUUID (pComponent, pUUID); } -Lib3MFResult CCall_lib3mf_multipropertygroup_removemultiproperty(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID) +Lib3MFResult CCall_lib3mf_component_hastransform(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, bool * pHasTransform) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_MultiPropertyGroup_RemoveMultiProperty (pMultiPropertyGroup, nPropertyID); + return wrapperTable->m_Component_HasTransform (pComponent, pHasTransform); } -Lib3MFResult CCall_lib3mf_multipropertygroup_getlayercount(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount) +Lib3MFResult CCall_lib3mf_component_gettransform(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, sLib3MFTransform * pTransform) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_MultiPropertyGroup_GetLayerCount (pMultiPropertyGroup, pCount); + return wrapperTable->m_Component_GetTransform (pComponent, pTransform); } -Lib3MFResult CCall_lib3mf_multipropertygroup_addlayer(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex) +Lib3MFResult CCall_lib3mf_component_settransform(Lib3MFHandle libraryHandle, Lib3MF_Component pComponent, const sLib3MFTransform * pTransform) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_MultiPropertyGroup_AddLayer (pMultiPropertyGroup, pTheLayer, pLayerIndex); + return wrapperTable->m_Component_SetTransform (pComponent, pTransform); } -Lib3MFResult CCall_lib3mf_multipropertygroup_getlayer(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer) +Lib3MFResult CCall_lib3mf_componentsobject_addcomponent(Lib3MFHandle libraryHandle, Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_MultiPropertyGroup_GetLayer (pMultiPropertyGroup, nLayerIndex, pTheLayer); + return wrapperTable->m_ComponentsObject_AddComponent (pComponentsObject, pObjectResource, pTransform, pComponentInstance); } -Lib3MFResult CCall_lib3mf_multipropertygroup_removelayer(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex) +Lib3MFResult CCall_lib3mf_componentsobject_getcomponent(Lib3MFHandle libraryHandle, Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_MultiPropertyGroup_RemoveLayer (pMultiPropertyGroup, nLayerIndex); + return wrapperTable->m_ComponentsObject_GetComponent (pComponentsObject, nIndex, pComponentInstance); } -Lib3MFResult CCall_lib3mf_attachment_getpath(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer) +Lib3MFResult CCall_lib3mf_componentsobject_getcomponentcount(Lib3MFHandle libraryHandle, Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Attachment_GetPath (pAttachment, nPathBufferSize, pPathNeededChars, pPathBuffer); + return wrapperTable->m_ComponentsObject_GetComponentCount (pComponentsObject, pCount); } -Lib3MFResult CCall_lib3mf_attachment_setpath(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const char * pPath) +Lib3MFResult CCall_lib3mf_beamset_setname(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const char * pName) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Attachment_SetPath (pAttachment, pPath); + return wrapperTable->m_BeamSet_SetName (pBeamSet, pName); } -Lib3MFResult CCall_lib3mf_attachment_packagepart(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart) +Lib3MFResult CCall_lib3mf_beamset_getname(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Attachment_PackagePart (pAttachment, pPackagePart); + return wrapperTable->m_BeamSet_GetName (pBeamSet, nNameBufferSize, pNameNeededChars, pNameBuffer); } -Lib3MFResult CCall_lib3mf_attachment_getrelationshiptype(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer) +Lib3MFResult CCall_lib3mf_beamset_setidentifier(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const char * pIdentifier) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Attachment_GetRelationShipType (pAttachment, nPathBufferSize, pPathNeededChars, pPathBuffer); + return wrapperTable->m_BeamSet_SetIdentifier (pBeamSet, pIdentifier); } -Lib3MFResult CCall_lib3mf_attachment_setrelationshiptype(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const char * pPath) +Lib3MFResult CCall_lib3mf_beamset_getidentifier(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Attachment_SetRelationShipType (pAttachment, pPath); + return wrapperTable->m_BeamSet_GetIdentifier (pBeamSet, nIdentifierBufferSize, pIdentifierNeededChars, pIdentifierBuffer); } -Lib3MFResult CCall_lib3mf_attachment_writetofile(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const char * pFileName) +Lib3MFResult CCall_lib3mf_beamset_getreferencecount(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Attachment_WriteToFile (pAttachment, pFileName); + return wrapperTable->m_BeamSet_GetReferenceCount (pBeamSet, pCount); } -Lib3MFResult CCall_lib3mf_attachment_readfromfile(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const char * pFileName) +Lib3MFResult CCall_lib3mf_beamset_setreferences(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Attachment_ReadFromFile (pAttachment, pFileName); + return wrapperTable->m_BeamSet_SetReferences (pBeamSet, nReferencesBufferSize, pReferencesBuffer); } -Lib3MFResult CCall_lib3mf_attachment_readfromcallback(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData) +Lib3MFResult CCall_lib3mf_beamset_getreferences(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Attachment_ReadFromCallback (pAttachment, pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData); + return wrapperTable->m_BeamSet_GetReferences (pBeamSet, nReferencesBufferSize, pReferencesNeededCount, pReferencesBuffer); } -Lib3MFResult CCall_lib3mf_attachment_getstreamsize(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize) +Lib3MFResult CCall_lib3mf_beamset_getballreferencecount(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Attachment_GetStreamSize (pAttachment, pStreamSize); + return wrapperTable->m_BeamSet_GetBallReferenceCount (pBeamSet, pCount); } -Lib3MFResult CCall_lib3mf_attachment_writetobuffer(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer) +Lib3MFResult CCall_lib3mf_beamset_setballreferences(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Attachment_WriteToBuffer (pAttachment, nBufferBufferSize, pBufferNeededCount, pBufferBuffer); + return wrapperTable->m_BeamSet_SetBallReferences (pBeamSet, nBallReferencesBufferSize, pBallReferencesBuffer); } -Lib3MFResult CCall_lib3mf_attachment_readfrombuffer(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer) +Lib3MFResult CCall_lib3mf_beamset_getballreferences(Lib3MFHandle libraryHandle, Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Attachment_ReadFromBuffer (pAttachment, nBufferBufferSize, pBufferBuffer); + return wrapperTable->m_BeamSet_GetBallReferences (pBeamSet, nBallReferencesBufferSize, pBallReferencesNeededCount, pBallReferencesBuffer); } -Lib3MFResult CCall_lib3mf_texture2d_getattachment(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment) +Lib3MFResult CCall_lib3mf_basematerialgroup_getcount(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2D_GetAttachment (pTexture2D, pAttachment); + return wrapperTable->m_BaseMaterialGroup_GetCount (pBaseMaterialGroup, pCount); } -Lib3MFResult CCall_lib3mf_texture2d_setattachment(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment) +Lib3MFResult CCall_lib3mf_basematerialgroup_getallpropertyids(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2D_SetAttachment (pTexture2D, pAttachment); + return wrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs (pBaseMaterialGroup, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); } -Lib3MFResult CCall_lib3mf_texture2d_getcontenttype(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType) +Lib3MFResult CCall_lib3mf_basematerialgroup_addmaterial(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2D_GetContentType (pTexture2D, pContentType); + return wrapperTable->m_BaseMaterialGroup_AddMaterial (pBaseMaterialGroup, pName, pDisplayColor, pPropertyID); } -Lib3MFResult CCall_lib3mf_texture2d_setcontenttype(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType) +Lib3MFResult CCall_lib3mf_basematerialgroup_removematerial(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2D_SetContentType (pTexture2D, eContentType); + return wrapperTable->m_BaseMaterialGroup_RemoveMaterial (pBaseMaterialGroup, nPropertyID); } -Lib3MFResult CCall_lib3mf_texture2d_gettilestyleuv(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV) +Lib3MFResult CCall_lib3mf_basematerialgroup_getname(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2D_GetTileStyleUV (pTexture2D, pTileStyleU, pTileStyleV); + return wrapperTable->m_BaseMaterialGroup_GetName (pBaseMaterialGroup, nPropertyID, nNameBufferSize, pNameNeededChars, pNameBuffer); } -Lib3MFResult CCall_lib3mf_texture2d_settilestyleuv(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV) +Lib3MFResult CCall_lib3mf_basematerialgroup_setname(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2D_SetTileStyleUV (pTexture2D, eTileStyleU, eTileStyleV); + return wrapperTable->m_BaseMaterialGroup_SetName (pBaseMaterialGroup, nPropertyID, pName); } -Lib3MFResult CCall_lib3mf_texture2d_getfilter(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter) +Lib3MFResult CCall_lib3mf_basematerialgroup_setdisplaycolor(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2D_GetFilter (pTexture2D, pFilter); + return wrapperTable->m_BaseMaterialGroup_SetDisplayColor (pBaseMaterialGroup, nPropertyID, pTheColor); } -Lib3MFResult CCall_lib3mf_texture2d_setfilter(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter) +Lib3MFResult CCall_lib3mf_basematerialgroup_getdisplaycolor(Lib3MFHandle libraryHandle, Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Texture2D_SetFilter (pTexture2D, eFilter); + return wrapperTable->m_BaseMaterialGroup_GetDisplayColor (pBaseMaterialGroup, nPropertyID, pTheColor); } -Lib3MFResult CCall_lib3mf_builditem_getobjectresource(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, Lib3MF_Object * pObjectResource) +Lib3MFResult CCall_lib3mf_colorgroup_getcount(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItem_GetObjectResource (pBuildItem, pObjectResource); + return wrapperTable->m_ColorGroup_GetCount (pColorGroup, pCount); } -Lib3MFResult CCall_lib3mf_builditem_getuuid(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +Lib3MFResult CCall_lib3mf_colorgroup_getallpropertyids(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItem_GetUUID (pBuildItem, pHasUUID, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); + return wrapperTable->m_ColorGroup_GetAllPropertyIDs (pColorGroup, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); } -Lib3MFResult CCall_lib3mf_builditem_setuuid(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, const char * pUUID) +Lib3MFResult CCall_lib3mf_colorgroup_addcolor(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItem_SetUUID (pBuildItem, pUUID); + return wrapperTable->m_ColorGroup_AddColor (pColorGroup, pTheColor, pPropertyID); } -Lib3MFResult CCall_lib3mf_builditem_getobjectresourceid(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, Lib3MF_uint32 * pUniqueResourceID) +Lib3MFResult CCall_lib3mf_colorgroup_removecolor(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItem_GetObjectResourceID (pBuildItem, pUniqueResourceID); + return wrapperTable->m_ColorGroup_RemoveColor (pColorGroup, nPropertyID); } -Lib3MFResult CCall_lib3mf_builditem_hasobjecttransform(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, bool * pHasTransform) +Lib3MFResult CCall_lib3mf_colorgroup_setcolor(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItem_HasObjectTransform (pBuildItem, pHasTransform); + return wrapperTable->m_ColorGroup_SetColor (pColorGroup, nPropertyID, pTheColor); } -Lib3MFResult CCall_lib3mf_builditem_getobjecttransform(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, sLib3MFTransform * pTransform) +Lib3MFResult CCall_lib3mf_colorgroup_getcolor(Lib3MFHandle libraryHandle, Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItem_GetObjectTransform (pBuildItem, pTransform); + return wrapperTable->m_ColorGroup_GetColor (pColorGroup, nPropertyID, pTheColor); } -Lib3MFResult CCall_lib3mf_builditem_setobjecttransform(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, const sLib3MFTransform * pTransform) +Lib3MFResult CCall_lib3mf_texture2dgroup_getcount(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItem_SetObjectTransform (pBuildItem, pTransform); + return wrapperTable->m_Texture2DGroup_GetCount (pTexture2DGroup, pCount); } -Lib3MFResult CCall_lib3mf_builditem_getpartnumber(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, const Lib3MF_uint32 nPartNumberBufferSize, Lib3MF_uint32* pPartNumberNeededChars, char * pPartNumberBuffer) +Lib3MFResult CCall_lib3mf_texture2dgroup_getallpropertyids(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItem_GetPartNumber (pBuildItem, nPartNumberBufferSize, pPartNumberNeededChars, pPartNumberBuffer); + return wrapperTable->m_Texture2DGroup_GetAllPropertyIDs (pTexture2DGroup, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); } -Lib3MFResult CCall_lib3mf_builditem_setpartnumber(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, const char * pSetPartnumber) +Lib3MFResult CCall_lib3mf_texture2dgroup_addtex2coord(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItem_SetPartNumber (pBuildItem, pSetPartnumber); + return wrapperTable->m_Texture2DGroup_AddTex2Coord (pTexture2DGroup, pUVCoordinate, pPropertyID); } -Lib3MFResult CCall_lib3mf_builditem_getmetadatagroup(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, Lib3MF_MetaDataGroup * pMetaDataGroup) +Lib3MFResult CCall_lib3mf_texture2dgroup_gettex2coord(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItem_GetMetaDataGroup (pBuildItem, pMetaDataGroup); + return wrapperTable->m_Texture2DGroup_GetTex2Coord (pTexture2DGroup, nPropertyID, pUVCoordinate); } -Lib3MFResult CCall_lib3mf_builditem_getoutbox(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, sLib3MFBox * pOutbox) +Lib3MFResult CCall_lib3mf_texture2dgroup_removetex2coord(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItem_GetOutbox (pBuildItem, pOutbox); + return wrapperTable->m_Texture2DGroup_RemoveTex2Coord (pTexture2DGroup, nPropertyID); } -Lib3MFResult CCall_lib3mf_builditemiterator_movenext(Lib3MFHandle libraryHandle, Lib3MF_BuildItemIterator pBuildItemIterator, bool * pHasNext) +Lib3MFResult CCall_lib3mf_texture2dgroup_gettexture2d(Lib3MFHandle libraryHandle, Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItemIterator_MoveNext (pBuildItemIterator, pHasNext); + return wrapperTable->m_Texture2DGroup_GetTexture2D (pTexture2DGroup, pTexture2DInstance); } -Lib3MFResult CCall_lib3mf_builditemiterator_moveprevious(Lib3MFHandle libraryHandle, Lib3MF_BuildItemIterator pBuildItemIterator, bool * pHasPrevious) +Lib3MFResult CCall_lib3mf_compositematerials_getcount(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItemIterator_MovePrevious (pBuildItemIterator, pHasPrevious); + return wrapperTable->m_CompositeMaterials_GetCount (pCompositeMaterials, pCount); } -Lib3MFResult CCall_lib3mf_builditemiterator_getcurrent(Lib3MFHandle libraryHandle, Lib3MF_BuildItemIterator pBuildItemIterator, Lib3MF_BuildItem * pBuildItem) +Lib3MFResult CCall_lib3mf_compositematerials_getallpropertyids(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItemIterator_GetCurrent (pBuildItemIterator, pBuildItem); + return wrapperTable->m_CompositeMaterials_GetAllPropertyIDs (pCompositeMaterials, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); } -Lib3MFResult CCall_lib3mf_builditemiterator_clone(Lib3MFHandle libraryHandle, Lib3MF_BuildItemIterator pBuildItemIterator, Lib3MF_BuildItemIterator * pOutBuildItemIterator) +Lib3MFResult CCall_lib3mf_compositematerials_getbasematerialgroup(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItemIterator_Clone (pBuildItemIterator, pOutBuildItemIterator); + return wrapperTable->m_CompositeMaterials_GetBaseMaterialGroup (pCompositeMaterials, pBaseMaterialGroupInstance); } -Lib3MFResult CCall_lib3mf_builditemiterator_count(Lib3MFHandle libraryHandle, Lib3MF_BuildItemIterator pBuildItemIterator, Lib3MF_uint64 * pCount) +Lib3MFResult CCall_lib3mf_compositematerials_addcomposite(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_BuildItemIterator_Count (pBuildItemIterator, pCount); + return wrapperTable->m_CompositeMaterials_AddComposite (pCompositeMaterials, nCompositeBufferSize, pCompositeBuffer, pPropertyID); } -Lib3MFResult CCall_lib3mf_slice_setvertices(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 nVerticesBufferSize, const sLib3MFPosition2D * pVerticesBuffer) +Lib3MFResult CCall_lib3mf_compositematerials_removecomposite(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Slice_SetVertices (pSlice, nVerticesBufferSize, pVerticesBuffer); + return wrapperTable->m_CompositeMaterials_RemoveComposite (pCompositeMaterials, nPropertyID); } -Lib3MFResult CCall_lib3mf_slice_getvertices(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, const Lib3MF_uint64 nVerticesBufferSize, Lib3MF_uint64* pVerticesNeededCount, sLib3MFPosition2D * pVerticesBuffer) +Lib3MFResult CCall_lib3mf_compositematerials_getcomposite(Lib3MFHandle libraryHandle, Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Slice_GetVertices (pSlice, nVerticesBufferSize, pVerticesNeededCount, pVerticesBuffer); + return wrapperTable->m_CompositeMaterials_GetComposite (pCompositeMaterials, nPropertyID, nCompositeBufferSize, pCompositeNeededCount, pCompositeBuffer); } -Lib3MFResult CCall_lib3mf_slice_getvertexcount(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 * pCount) +Lib3MFResult CCall_lib3mf_multipropertygroup_getcount(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Slice_GetVertexCount (pSlice, pCount); + return wrapperTable->m_MultiPropertyGroup_GetCount (pMultiPropertyGroup, pCount); } -Lib3MFResult CCall_lib3mf_slice_addpolygon(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 nIndicesBufferSize, const Lib3MF_uint32 * pIndicesBuffer, Lib3MF_uint64 * pIndex) +Lib3MFResult CCall_lib3mf_multipropertygroup_getallpropertyids(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Slice_AddPolygon (pSlice, nIndicesBufferSize, pIndicesBuffer, pIndex); + return wrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs (pMultiPropertyGroup, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); } -Lib3MFResult CCall_lib3mf_slice_getpolygoncount(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 * pCount) +Lib3MFResult CCall_lib3mf_multipropertygroup_addmultiproperty(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Slice_GetPolygonCount (pSlice, pCount); + return wrapperTable->m_MultiPropertyGroup_AddMultiProperty (pMultiPropertyGroup, nPropertyIDsBufferSize, pPropertyIDsBuffer, pPropertyID); } -Lib3MFResult CCall_lib3mf_slice_setpolygonindices(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 nIndex, Lib3MF_uint64 nIndicesBufferSize, const Lib3MF_uint32 * pIndicesBuffer) +Lib3MFResult CCall_lib3mf_multipropertygroup_setmultiproperty(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Slice_SetPolygonIndices (pSlice, nIndex, nIndicesBufferSize, pIndicesBuffer); + return wrapperTable->m_MultiPropertyGroup_SetMultiProperty (pMultiPropertyGroup, nPropertyID, nPropertyIDsBufferSize, pPropertyIDsBuffer); } -Lib3MFResult CCall_lib3mf_slice_getpolygonindices(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 nIndex, const Lib3MF_uint64 nIndicesBufferSize, Lib3MF_uint64* pIndicesNeededCount, Lib3MF_uint32 * pIndicesBuffer) +Lib3MFResult CCall_lib3mf_multipropertygroup_getmultiproperty(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Slice_GetPolygonIndices (pSlice, nIndex, nIndicesBufferSize, pIndicesNeededCount, pIndicesBuffer); + return wrapperTable->m_MultiPropertyGroup_GetMultiProperty (pMultiPropertyGroup, nPropertyID, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); } -Lib3MFResult CCall_lib3mf_slice_getpolygonindexcount(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 nIndex, Lib3MF_uint64 * pCount) +Lib3MFResult CCall_lib3mf_multipropertygroup_removemultiproperty(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Slice_GetPolygonIndexCount (pSlice, nIndex, pCount); + return wrapperTable->m_MultiPropertyGroup_RemoveMultiProperty (pMultiPropertyGroup, nPropertyID); } -Lib3MFResult CCall_lib3mf_slice_getztop(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_double * pZTop) +Lib3MFResult CCall_lib3mf_multipropertygroup_getlayercount(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Slice_GetZTop (pSlice, pZTop); + return wrapperTable->m_MultiPropertyGroup_GetLayerCount (pMultiPropertyGroup, pCount); } -Lib3MFResult CCall_lib3mf_slicestack_getbottomz(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_double * pZBottom) +Lib3MFResult CCall_lib3mf_multipropertygroup_addlayer(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_SliceStack_GetBottomZ (pSliceStack, pZBottom); + return wrapperTable->m_MultiPropertyGroup_AddLayer (pMultiPropertyGroup, pTheLayer, pLayerIndex); } -Lib3MFResult CCall_lib3mf_slicestack_getslicecount(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_uint64 * pCount) +Lib3MFResult CCall_lib3mf_multipropertygroup_getlayer(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_SliceStack_GetSliceCount (pSliceStack, pCount); + return wrapperTable->m_MultiPropertyGroup_GetLayer (pMultiPropertyGroup, nLayerIndex, pTheLayer); } -Lib3MFResult CCall_lib3mf_slicestack_getslice(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_uint64 nSliceIndex, Lib3MF_Slice * pTheSlice) +Lib3MFResult CCall_lib3mf_multipropertygroup_removelayer(Lib3MFHandle libraryHandle, Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_SliceStack_GetSlice (pSliceStack, nSliceIndex, pTheSlice); + return wrapperTable->m_MultiPropertyGroup_RemoveLayer (pMultiPropertyGroup, nLayerIndex); } -Lib3MFResult CCall_lib3mf_slicestack_addslice(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_double dZTop, Lib3MF_Slice * pTheSlice) +Lib3MFResult CCall_lib3mf_image3d_getname(Lib3MFHandle libraryHandle, Lib3MF_Image3D pImage3D, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_SliceStack_AddSlice (pSliceStack, dZTop, pTheSlice); + return wrapperTable->m_Image3D_GetName (pImage3D, nNameBufferSize, pNameNeededChars, pNameBuffer); } -Lib3MFResult CCall_lib3mf_slicestack_getslicerefcount(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_uint64 * pCount) +Lib3MFResult CCall_lib3mf_image3d_setname(Lib3MFHandle libraryHandle, Lib3MF_Image3D pImage3D, const char * pName) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_SliceStack_GetSliceRefCount (pSliceStack, pCount); + return wrapperTable->m_Image3D_SetName (pImage3D, pName); } -Lib3MFResult CCall_lib3mf_slicestack_addslicestackreference(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_SliceStack pTheSliceStack) +Lib3MFResult CCall_lib3mf_image3d_isimagestack(Lib3MFHandle libraryHandle, Lib3MF_Image3D pImage3D, bool * pIsImageStack) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_SliceStack_AddSliceStackReference (pSliceStack, pTheSliceStack); + return wrapperTable->m_Image3D_IsImageStack (pImage3D, pIsImageStack); } -Lib3MFResult CCall_lib3mf_slicestack_getslicestackreference(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_uint64 nSliceRefIndex, Lib3MF_SliceStack * pTheSliceStack) +Lib3MFResult CCall_lib3mf_imagestack_getrowcount(Lib3MFHandle libraryHandle, Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pRowCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_SliceStack_GetSliceStackReference (pSliceStack, nSliceRefIndex, pTheSliceStack); + return wrapperTable->m_ImageStack_GetRowCount (pImageStack, pRowCount); } -Lib3MFResult CCall_lib3mf_slicestack_collapseslicereferences(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack) +Lib3MFResult CCall_lib3mf_imagestack_setrowcount(Lib3MFHandle libraryHandle, Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nRowCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_SliceStack_CollapseSliceReferences (pSliceStack); + return wrapperTable->m_ImageStack_SetRowCount (pImageStack, nRowCount); } -Lib3MFResult CCall_lib3mf_slicestack_setownpath(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, const char * pPath) +Lib3MFResult CCall_lib3mf_imagestack_getcolumncount(Lib3MFHandle libraryHandle, Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pColumnCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_SliceStack_SetOwnPath (pSliceStack, pPath); + return wrapperTable->m_ImageStack_GetColumnCount (pImageStack, pColumnCount); } -Lib3MFResult CCall_lib3mf_slicestack_getownpath(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer) +Lib3MFResult CCall_lib3mf_imagestack_setcolumncount(Lib3MFHandle libraryHandle, Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nColumnCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_SliceStack_GetOwnPath (pSliceStack, nPathBufferSize, pPathNeededChars, pPathBuffer); + return wrapperTable->m_ImageStack_SetColumnCount (pImageStack, nColumnCount); } -Lib3MFResult CCall_lib3mf_consumer_getconsumerid(Lib3MFHandle libraryHandle, Lib3MF_Consumer pConsumer, const Lib3MF_uint32 nConsumerIDBufferSize, Lib3MF_uint32* pConsumerIDNeededChars, char * pConsumerIDBuffer) +Lib3MFResult CCall_lib3mf_imagestack_getsheetcount(Lib3MFHandle libraryHandle, Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pSheetCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Consumer_GetConsumerID (pConsumer, nConsumerIDBufferSize, pConsumerIDNeededChars, pConsumerIDBuffer); + return wrapperTable->m_ImageStack_GetSheetCount (pImageStack, pSheetCount); } -Lib3MFResult CCall_lib3mf_consumer_getkeyid(Lib3MFHandle libraryHandle, Lib3MF_Consumer pConsumer, const Lib3MF_uint32 nKeyIDBufferSize, Lib3MF_uint32* pKeyIDNeededChars, char * pKeyIDBuffer) +Lib3MFResult CCall_lib3mf_imagestack_getsheet(Lib3MFHandle libraryHandle, Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pSheet) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Consumer_GetKeyID (pConsumer, nKeyIDBufferSize, pKeyIDNeededChars, pKeyIDBuffer); + return wrapperTable->m_ImageStack_GetSheet (pImageStack, nIndex, pSheet); } -Lib3MFResult CCall_lib3mf_consumer_getkeyvalue(Lib3MFHandle libraryHandle, Lib3MF_Consumer pConsumer, const Lib3MF_uint32 nKeyValueBufferSize, Lib3MF_uint32* pKeyValueNeededChars, char * pKeyValueBuffer) +Lib3MFResult CCall_lib3mf_imagestack_setsheet(Lib3MFHandle libraryHandle, Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment pSheet) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Consumer_GetKeyValue (pConsumer, nKeyValueBufferSize, pKeyValueNeededChars, pKeyValueBuffer); + return wrapperTable->m_ImageStack_SetSheet (pImageStack, nIndex, pSheet); } -Lib3MFResult CCall_lib3mf_accessright_getconsumer(Lib3MFHandle libraryHandle, Lib3MF_AccessRight pAccessRight, Lib3MF_Consumer * pConsumer) +Lib3MFResult CCall_lib3mf_imagestack_createemptysheet(Lib3MFHandle libraryHandle, Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_Attachment * pSheet) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_AccessRight_GetConsumer (pAccessRight, pConsumer); + return wrapperTable->m_ImageStack_CreateEmptySheet (pImageStack, nIndex, pPath, pSheet); } -Lib3MFResult CCall_lib3mf_accessright_getwrappingalgorithm(Lib3MFHandle libraryHandle, Lib3MF_AccessRight pAccessRight, eLib3MFWrappingAlgorithm * pAlgorithm) +Lib3MFResult CCall_lib3mf_imagestack_createsheetfrombuffer(Lib3MFHandle libraryHandle, Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer, Lib3MF_Attachment * pSheet) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_AccessRight_GetWrappingAlgorithm (pAccessRight, pAlgorithm); + return wrapperTable->m_ImageStack_CreateSheetFromBuffer (pImageStack, nIndex, pPath, nDataBufferSize, pDataBuffer, pSheet); } -Lib3MFResult CCall_lib3mf_accessright_getmgfalgorithm(Lib3MFHandle libraryHandle, Lib3MF_AccessRight pAccessRight, eLib3MFMgfAlgorithm * pAlgorithm) +Lib3MFResult CCall_lib3mf_imagestack_createsheetfromfile(Lib3MFHandle libraryHandle, Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, const char * pFileName, Lib3MF_Attachment * pSheet) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_AccessRight_GetMgfAlgorithm (pAccessRight, pAlgorithm); + return wrapperTable->m_ImageStack_CreateSheetFromFile (pImageStack, nIndex, pPath, pFileName, pSheet); } -Lib3MFResult CCall_lib3mf_accessright_getdigestmethod(Lib3MFHandle libraryHandle, Lib3MF_AccessRight pAccessRight, eLib3MFDigestMethod * pAlgorithm) +Lib3MFResult CCall_lib3mf_attachment_getpath(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_AccessRight_GetDigestMethod (pAccessRight, pAlgorithm); + return wrapperTable->m_Attachment_GetPath (pAttachment, nPathBufferSize, pPathNeededChars, pPathBuffer); } -Lib3MFResult CCall_lib3mf_contentencryptionparams_getencryptionalgorithm(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, eLib3MFEncryptionAlgorithm * pAlgorithm) +Lib3MFResult CCall_lib3mf_attachment_setpath(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const char * pPath) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm (pContentEncryptionParams, pAlgorithm); + return wrapperTable->m_Attachment_SetPath (pAttachment, pPath); } -Lib3MFResult CCall_lib3mf_contentencryptionparams_getkey(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, const Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64* pByteDataNeededCount, Lib3MF_uint8 * pByteDataBuffer) +Lib3MFResult CCall_lib3mf_attachment_packagepart(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ContentEncryptionParams_GetKey (pContentEncryptionParams, nByteDataBufferSize, pByteDataNeededCount, pByteDataBuffer); + return wrapperTable->m_Attachment_PackagePart (pAttachment, pPackagePart); } -Lib3MFResult CCall_lib3mf_contentencryptionparams_getinitializationvector(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, const Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64* pByteDataNeededCount, Lib3MF_uint8 * pByteDataBuffer) +Lib3MFResult CCall_lib3mf_attachment_getrelationshiptype(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ContentEncryptionParams_GetInitializationVector (pContentEncryptionParams, nByteDataBufferSize, pByteDataNeededCount, pByteDataBuffer); + return wrapperTable->m_Attachment_GetRelationShipType (pAttachment, nPathBufferSize, pPathNeededChars, pPathBuffer); } -Lib3MFResult CCall_lib3mf_contentencryptionparams_getauthenticationtag(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, const Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64* pByteDataNeededCount, Lib3MF_uint8 * pByteDataBuffer) +Lib3MFResult CCall_lib3mf_attachment_setrelationshiptype(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const char * pPath) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ContentEncryptionParams_GetAuthenticationTag (pContentEncryptionParams, nByteDataBufferSize, pByteDataNeededCount, pByteDataBuffer); + return wrapperTable->m_Attachment_SetRelationShipType (pAttachment, pPath); } -Lib3MFResult CCall_lib3mf_contentencryptionparams_setauthenticationtag(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, Lib3MF_uint64 nByteDataBufferSize, const Lib3MF_uint8 * pByteDataBuffer) +Lib3MFResult CCall_lib3mf_attachment_writetofile(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const char * pFileName) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ContentEncryptionParams_SetAuthenticationTag (pContentEncryptionParams, nByteDataBufferSize, pByteDataBuffer); + return wrapperTable->m_Attachment_WriteToFile (pAttachment, pFileName); } -Lib3MFResult CCall_lib3mf_contentencryptionparams_getadditionalauthenticationdata(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, const Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64* pByteDataNeededCount, Lib3MF_uint8 * pByteDataBuffer) +Lib3MFResult CCall_lib3mf_attachment_readfromfile(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const char * pFileName) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData (pContentEncryptionParams, nByteDataBufferSize, pByteDataNeededCount, pByteDataBuffer); + return wrapperTable->m_Attachment_ReadFromFile (pAttachment, pFileName); } -Lib3MFResult CCall_lib3mf_contentencryptionparams_getdescriptor(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, Lib3MF_uint64 * pDescriptor) +Lib3MFResult CCall_lib3mf_attachment_readfromcallback(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ContentEncryptionParams_GetDescriptor (pContentEncryptionParams, pDescriptor); + return wrapperTable->m_Attachment_ReadFromCallback (pAttachment, pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData); } -Lib3MFResult CCall_lib3mf_contentencryptionparams_getkeyuuid(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +Lib3MFResult CCall_lib3mf_attachment_getstreamsize(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ContentEncryptionParams_GetKeyUUID (pContentEncryptionParams, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); + return wrapperTable->m_Attachment_GetStreamSize (pAttachment, pStreamSize); } -Lib3MFResult CCall_lib3mf_resourcedata_getpath(Lib3MFHandle libraryHandle, Lib3MF_ResourceData pResourceData, Lib3MF_PackagePart * pPath) +Lib3MFResult CCall_lib3mf_attachment_writetobuffer(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ResourceData_GetPath (pResourceData, pPath); + return wrapperTable->m_Attachment_WriteToBuffer (pAttachment, nBufferBufferSize, pBufferNeededCount, pBufferBuffer); } -Lib3MFResult CCall_lib3mf_resourcedata_getencryptionalgorithm(Lib3MFHandle libraryHandle, Lib3MF_ResourceData pResourceData, eLib3MFEncryptionAlgorithm * pEncryptionAlgorithm) +Lib3MFResult CCall_lib3mf_attachment_readfrombuffer(Lib3MFHandle libraryHandle, Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ResourceData_GetEncryptionAlgorithm (pResourceData, pEncryptionAlgorithm); + return wrapperTable->m_Attachment_ReadFromBuffer (pAttachment, nBufferBufferSize, pBufferBuffer); } -Lib3MFResult CCall_lib3mf_resourcedata_getcompression(Lib3MFHandle libraryHandle, Lib3MF_ResourceData pResourceData, eLib3MFCompression * pCompression) +Lib3MFResult CCall_lib3mf_texture2d_getattachment(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ResourceData_GetCompression (pResourceData, pCompression); + return wrapperTable->m_Texture2D_GetAttachment (pTexture2D, pAttachment); } -Lib3MFResult CCall_lib3mf_resourcedata_getadditionalauthenticationdata(Lib3MFHandle libraryHandle, Lib3MF_ResourceData pResourceData, const Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64* pByteDataNeededCount, Lib3MF_uint8 * pByteDataBuffer) +Lib3MFResult CCall_lib3mf_texture2d_setattachment(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ResourceData_GetAdditionalAuthenticationData (pResourceData, nByteDataBufferSize, pByteDataNeededCount, pByteDataBuffer); + return wrapperTable->m_Texture2D_SetAttachment (pTexture2D, pAttachment); } -Lib3MFResult CCall_lib3mf_resourcedatagroup_getkeyuuid(Lib3MFHandle libraryHandle, Lib3MF_ResourceDataGroup pResourceDataGroup, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +Lib3MFResult CCall_lib3mf_texture2d_getcontenttype(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ResourceDataGroup_GetKeyUUID (pResourceDataGroup, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); + return wrapperTable->m_Texture2D_GetContentType (pTexture2D, pContentType); } -Lib3MFResult CCall_lib3mf_resourcedatagroup_addaccessright(Lib3MFHandle libraryHandle, Lib3MF_ResourceDataGroup pResourceDataGroup, Lib3MF_Consumer pConsumer, eLib3MFWrappingAlgorithm eWrappingAlgorithm, eLib3MFMgfAlgorithm eMgfAlgorithm, eLib3MFDigestMethod eDigestMethod, Lib3MF_AccessRight * pTheAccessRight) +Lib3MFResult CCall_lib3mf_texture2d_setcontenttype(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ResourceDataGroup_AddAccessRight (pResourceDataGroup, pConsumer, eWrappingAlgorithm, eMgfAlgorithm, eDigestMethod, pTheAccessRight); + return wrapperTable->m_Texture2D_SetContentType (pTexture2D, eContentType); } -Lib3MFResult CCall_lib3mf_resourcedatagroup_findaccessrightbyconsumer(Lib3MFHandle libraryHandle, Lib3MF_ResourceDataGroup pResourceDataGroup, Lib3MF_Consumer pConsumer, Lib3MF_AccessRight * pTheAccessRight) +Lib3MFResult CCall_lib3mf_texture2d_gettilestyleuv(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer (pResourceDataGroup, pConsumer, pTheAccessRight); + return wrapperTable->m_Texture2D_GetTileStyleUV (pTexture2D, pTileStyleU, pTileStyleV); } -Lib3MFResult CCall_lib3mf_resourcedatagroup_removeaccessright(Lib3MFHandle libraryHandle, Lib3MF_ResourceDataGroup pResourceDataGroup, Lib3MF_Consumer pConsumer) +Lib3MFResult CCall_lib3mf_texture2d_settilestyleuv(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ResourceDataGroup_RemoveAccessRight (pResourceDataGroup, pConsumer); + return wrapperTable->m_Texture2D_SetTileStyleUV (pTexture2D, eTileStyleU, eTileStyleV); } -Lib3MFResult CCall_lib3mf_keystore_addconsumer(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, const char * pConsumerID, const char * pKeyID, const char * pKeyValue, Lib3MF_Consumer * pConsumer) +Lib3MFResult CCall_lib3mf_texture2d_getfilter(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_AddConsumer (pKeyStore, pConsumerID, pKeyID, pKeyValue, pConsumer); + return wrapperTable->m_Texture2D_GetFilter (pTexture2D, pFilter); } -Lib3MFResult CCall_lib3mf_keystore_getconsumercount(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 * pCount) +Lib3MFResult CCall_lib3mf_texture2d_setfilter(Lib3MFHandle libraryHandle, Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_GetConsumerCount (pKeyStore, pCount); + return wrapperTable->m_Texture2D_SetFilter (pTexture2D, eFilter); } -Lib3MFResult CCall_lib3mf_keystore_getconsumer(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 nConsumerIndex, Lib3MF_Consumer * pConsumer) +Lib3MFResult CCall_lib3mf_implicitport_getidentifier(Lib3MFHandle libraryHandle, Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_GetConsumer (pKeyStore, nConsumerIndex, pConsumer); + return wrapperTable->m_ImplicitPort_GetIdentifier (pImplicitPort, nIdentifierBufferSize, pIdentifierNeededChars, pIdentifierBuffer); } -Lib3MFResult CCall_lib3mf_keystore_removeconsumer(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_Consumer pConsumer) +Lib3MFResult CCall_lib3mf_implicitport_setidentifier(Lib3MFHandle libraryHandle, Lib3MF_ImplicitPort pImplicitPort, const char * pIdentifier) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_RemoveConsumer (pKeyStore, pConsumer); + return wrapperTable->m_ImplicitPort_SetIdentifier (pImplicitPort, pIdentifier); } -Lib3MFResult CCall_lib3mf_keystore_findconsumer(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, const char * pConsumerID, Lib3MF_Consumer * pConsumer) +Lib3MFResult CCall_lib3mf_implicitport_getdisplayname(Lib3MFHandle libraryHandle, Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_FindConsumer (pKeyStore, pConsumerID, pConsumer); + return wrapperTable->m_ImplicitPort_GetDisplayName (pImplicitPort, nDisplayNameBufferSize, pDisplayNameNeededChars, pDisplayNameBuffer); } -Lib3MFResult CCall_lib3mf_keystore_getresourcedatagroupcount(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 * pCount) +Lib3MFResult CCall_lib3mf_implicitport_setdisplayname(Lib3MFHandle libraryHandle, Lib3MF_ImplicitPort pImplicitPort, const char * pDisplayName) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_GetResourceDataGroupCount (pKeyStore, pCount); + return wrapperTable->m_ImplicitPort_SetDisplayName (pImplicitPort, pDisplayName); } -Lib3MFResult CCall_lib3mf_keystore_addresourcedatagroup(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_ResourceDataGroup * pResourceDataGroup) +Lib3MFResult CCall_lib3mf_implicitport_settype(Lib3MFHandle libraryHandle, Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType eImplicitPortType) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_AddResourceDataGroup (pKeyStore, pResourceDataGroup); + return wrapperTable->m_ImplicitPort_SetType (pImplicitPort, eImplicitPortType); } -Lib3MFResult CCall_lib3mf_keystore_getresourcedatagroup(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 nResourceDataIndex, Lib3MF_ResourceDataGroup * pResourceDataGroup) +Lib3MFResult CCall_lib3mf_implicitport_gettype(Lib3MFHandle libraryHandle, Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType * pImplicitPortType) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_GetResourceDataGroup (pKeyStore, nResourceDataIndex, pResourceDataGroup); + return wrapperTable->m_ImplicitPort_GetType (pImplicitPort, pImplicitPortType); } -Lib3MFResult CCall_lib3mf_keystore_removeresourcedatagroup(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_ResourceDataGroup pResourceDataGroup) +Lib3MFResult CCall_lib3mf_implicitport_getreference(Lib3MFHandle libraryHandle, Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nReferenceBufferSize, Lib3MF_uint32* pReferenceNeededChars, char * pReferenceBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_RemoveResourceDataGroup (pKeyStore, pResourceDataGroup); + return wrapperTable->m_ImplicitPort_GetReference (pImplicitPort, nReferenceBufferSize, pReferenceNeededChars, pReferenceBuffer); } -Lib3MFResult CCall_lib3mf_keystore_findresourcedatagroup(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_PackagePart pPartPath, Lib3MF_ResourceDataGroup * pResourceDataGroup) +Lib3MFResult CCall_lib3mf_implicitport_setreference(Lib3MFHandle libraryHandle, Lib3MF_ImplicitPort pImplicitPort, const char * pReference) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_FindResourceDataGroup (pKeyStore, pPartPath, pResourceDataGroup); + return wrapperTable->m_ImplicitPort_SetReference (pImplicitPort, pReference); } -Lib3MFResult CCall_lib3mf_keystore_addresourcedata(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_ResourceDataGroup pResourceDataGroup, Lib3MF_PackagePart pPartPath, eLib3MFEncryptionAlgorithm eAlgorithm, eLib3MFCompression eCompression, Lib3MF_uint64 nAdditionalAuthenticationDataBufferSize, const Lib3MF_uint8 * pAdditionalAuthenticationDataBuffer, Lib3MF_ResourceData * pResourceData) +Lib3MFResult CCall_lib3mf_iterator_movenext(Lib3MFHandle libraryHandle, Lib3MF_Iterator pIterator, bool * pHasNext) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_AddResourceData (pKeyStore, pResourceDataGroup, pPartPath, eAlgorithm, eCompression, nAdditionalAuthenticationDataBufferSize, pAdditionalAuthenticationDataBuffer, pResourceData); + return wrapperTable->m_Iterator_MoveNext (pIterator, pHasNext); } -Lib3MFResult CCall_lib3mf_keystore_removeresourcedata(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_ResourceData pResourceData) +Lib3MFResult CCall_lib3mf_iterator_moveprevious(Lib3MFHandle libraryHandle, Lib3MF_Iterator pIterator, bool * pHasPrevious) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_RemoveResourceData (pKeyStore, pResourceData); + return wrapperTable->m_Iterator_MovePrevious (pIterator, pHasPrevious); } -Lib3MFResult CCall_lib3mf_keystore_findresourcedata(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_PackagePart pResourcePath, Lib3MF_ResourceData * pResourceData) +Lib3MFResult CCall_lib3mf_iterator_count(Lib3MFHandle libraryHandle, Lib3MF_Iterator pIterator, Lib3MF_uint64 * pCount) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_FindResourceData (pKeyStore, pResourcePath, pResourceData); + return wrapperTable->m_Iterator_Count (pIterator, pCount); } -Lib3MFResult CCall_lib3mf_keystore_getresourcedatacount(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 * pCount) +Lib3MFResult CCall_lib3mf_implicitportiterator_getcurrent(Lib3MFHandle libraryHandle, Lib3MF_ImplicitPortIterator pImplicitPortIterator, Lib3MF_ImplicitPort * pPort) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_GetResourceDataCount (pKeyStore, pCount); + return wrapperTable->m_ImplicitPortIterator_GetCurrent (pImplicitPortIterator, pPort); } -Lib3MFResult CCall_lib3mf_keystore_getresourcedata(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 nResourceDataIndex, Lib3MF_ResourceData * pResourceData) +Lib3MFResult CCall_lib3mf_implicitnode_getidentifier(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_GetResourceData (pKeyStore, nResourceDataIndex, pResourceData); + return wrapperTable->m_ImplicitNode_GetIdentifier (pImplicitNode, nIdentifierBufferSize, pIdentifierNeededChars, pIdentifierBuffer); } -Lib3MFResult CCall_lib3mf_keystore_getuuid(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +Lib3MFResult CCall_lib3mf_implicitnode_setidentifier(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_GetUUID (pKeyStore, pHasUUID, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); + return wrapperTable->m_ImplicitNode_SetIdentifier (pImplicitNode, pIdentifier); } -Lib3MFResult CCall_lib3mf_keystore_setuuid(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, const char * pUUID) +Lib3MFResult CCall_lib3mf_implicitnode_getdisplayname(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_KeyStore_SetUUID (pKeyStore, pUUID); + return wrapperTable->m_ImplicitNode_GetDisplayName (pImplicitNode, nDisplayNameBufferSize, pDisplayNameNeededChars, pDisplayNameBuffer); } -Lib3MFResult CCall_lib3mf_model_rootmodelpart(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_PackagePart * pRootModelPart) +Lib3MFResult CCall_lib3mf_implicitnode_setdisplayname(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, const char * pDisplayName) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_RootModelPart (pModel, pRootModelPart); + return wrapperTable->m_ImplicitNode_SetDisplayName (pImplicitNode, pDisplayName); } -Lib3MFResult CCall_lib3mf_model_findorcreatepackagepart(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pAbsolutePath, Lib3MF_PackagePart * pModelPart) +Lib3MFResult CCall_lib3mf_implicitnode_gettag(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nTagBufferSize, Lib3MF_uint32* pTagNeededChars, char * pTagBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_FindOrCreatePackagePart (pModel, pAbsolutePath, pModelPart); + return wrapperTable->m_ImplicitNode_GetTag (pImplicitNode, nTagBufferSize, pTagNeededChars, pTagBuffer); } -Lib3MFResult CCall_lib3mf_model_setunit(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, eLib3MFModelUnit eUnit) +Lib3MFResult CCall_lib3mf_implicitnode_settag(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, const char * pTag) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_SetUnit (pModel, eUnit); + return wrapperTable->m_ImplicitNode_SetTag (pImplicitNode, pTag); } -Lib3MFResult CCall_lib3mf_model_getunit(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, eLib3MFModelUnit * pUnit) +Lib3MFResult CCall_lib3mf_implicitnode_getnodetype(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, eLib3MFImplicitNodeType * pType) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetUnit (pModel, pUnit); + return wrapperTable->m_ImplicitNode_GetNodeType (pImplicitNode, pType); } -Lib3MFResult CCall_lib3mf_model_getlanguage(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const Lib3MF_uint32 nLanguageBufferSize, Lib3MF_uint32* pLanguageNeededChars, char * pLanguageBuffer) +Lib3MFResult CCall_lib3mf_implicitnode_addinput(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetLanguage (pModel, nLanguageBufferSize, pLanguageNeededChars, pLanguageBuffer); + return wrapperTable->m_ImplicitNode_AddInput (pImplicitNode, pIdentifier, pDisplayName, pPort); } -Lib3MFResult CCall_lib3mf_model_setlanguage(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pLanguage) +Lib3MFResult CCall_lib3mf_implicitnode_getinputs(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_SetLanguage (pModel, pLanguage); + return wrapperTable->m_ImplicitNode_GetInputs (pImplicitNode, pIterator); } -Lib3MFResult CCall_lib3mf_model_querywriter(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pWriterClass, Lib3MF_Writer * pWriterInstance) +Lib3MFResult CCall_lib3mf_implicitnode_addoutput(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_QueryWriter (pModel, pWriterClass, pWriterInstance); + return wrapperTable->m_ImplicitNode_AddOutput (pImplicitNode, pIdentifier, pDisplayName, pPort); } -Lib3MFResult CCall_lib3mf_model_queryreader(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pReaderClass, Lib3MF_Reader * pReaderInstance) +Lib3MFResult CCall_lib3mf_implicitnode_getoutputs(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_QueryReader (pModel, pReaderClass, pReaderInstance); + return wrapperTable->m_ImplicitNode_GetOutputs (pImplicitNode, pIterator); } -Lib3MFResult CCall_lib3mf_model_getresourcebyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_Resource * pResource) +Lib3MFResult CCall_lib3mf_implicitnode_findinput(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pInput) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetResourceByID (pModel, nUniqueResourceID, pResource); + return wrapperTable->m_ImplicitNode_FindInput (pImplicitNode, pIdentifier, pInput); } -Lib3MFResult CCall_lib3mf_model_gettexture2dbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_Texture2D * pTextureInstance) +Lib3MFResult CCall_lib3mf_implicitnode_findoutput(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetTexture2DByID (pModel, nUniqueResourceID, pTextureInstance); + return wrapperTable->m_ImplicitNode_FindOutput (pImplicitNode, pIdentifier, pOutput); } -Lib3MFResult CCall_lib3mf_model_getpropertytypebyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, eLib3MFPropertyType * pThePropertyType) +Lib3MFResult CCall_lib3mf_implicitnode_aretypesvalid(Lib3MFHandle libraryHandle, Lib3MF_ImplicitNode pImplicitNode, bool * pValid) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetPropertyTypeByID (pModel, nUniqueResourceID, pThePropertyType); + return wrapperTable->m_ImplicitNode_AreTypesValid (pImplicitNode, pValid); } -Lib3MFResult CCall_lib3mf_model_getbasematerialgroupbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance) +Lib3MFResult CCall_lib3mf_oneinputnode_getinputa(Lib3MFHandle libraryHandle, Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pInput) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetBaseMaterialGroupByID (pModel, nUniqueResourceID, pBaseMaterialGroupInstance); + return wrapperTable->m_OneInputNode_GetInputA (pOneInputNode, pInput); } -Lib3MFResult CCall_lib3mf_model_gettexture2dgroupbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_Texture2DGroup * pTexture2DGroupInstance) +Lib3MFResult CCall_lib3mf_oneinputnode_getoutputresult(Lib3MFHandle libraryHandle, Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pResult) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetTexture2DGroupByID (pModel, nUniqueResourceID, pTexture2DGroupInstance); + return wrapperTable->m_OneInputNode_GetOutputResult (pOneInputNode, pResult); } -Lib3MFResult CCall_lib3mf_model_getcompositematerialsbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_CompositeMaterials * pCompositeMaterialsInstance) +Lib3MFResult CCall_lib3mf_resourceidnode_setresource(Lib3MFHandle libraryHandle, Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource pResource) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetCompositeMaterialsByID (pModel, nUniqueResourceID, pCompositeMaterialsInstance); + return wrapperTable->m_ResourceIdNode_SetResource (pResourceIdNode, pResource); } -Lib3MFResult CCall_lib3mf_model_getmultipropertygroupbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance) +Lib3MFResult CCall_lib3mf_resourceidnode_getresource(Lib3MFHandle libraryHandle, Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource * pResource) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetMultiPropertyGroupByID (pModel, nUniqueResourceID, pMultiPropertyGroupInstance); + return wrapperTable->m_ResourceIdNode_GetResource (pResourceIdNode, pResource); } -Lib3MFResult CCall_lib3mf_model_getmeshobjectbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_MeshObject * pMeshObjectInstance) +Lib3MFResult CCall_lib3mf_resourceidnode_getoutputvalue(Lib3MFHandle libraryHandle, Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_ImplicitPort * pValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetMeshObjectByID (pModel, nUniqueResourceID, pMeshObjectInstance); + return wrapperTable->m_ResourceIdNode_GetOutputValue (pResourceIdNode, pValue); } -Lib3MFResult CCall_lib3mf_model_getcomponentsobjectbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ComponentsObject * pComponentsObjectInstance) +Lib3MFResult CCall_lib3mf_twoinputnode_getinputb(Lib3MFHandle libraryHandle, Lib3MF_TwoInputNode pTwoInputNode, Lib3MF_ImplicitPort * pB) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetComponentsObjectByID (pModel, nUniqueResourceID, pComponentsObjectInstance); + return wrapperTable->m_TwoInputNode_GetInputB (pTwoInputNode, pB); } -Lib3MFResult CCall_lib3mf_model_getcolorgroupbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ColorGroup * pColorGroupInstance) +Lib3MFResult CCall_lib3mf_selectnode_getinputb(Lib3MFHandle libraryHandle, Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pB) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetColorGroupByID (pModel, nUniqueResourceID, pColorGroupInstance); + return wrapperTable->m_SelectNode_GetInputB (pSelectNode, pB); } -Lib3MFResult CCall_lib3mf_model_getslicestackbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance) +Lib3MFResult CCall_lib3mf_selectnode_getinputc(Lib3MFHandle libraryHandle, Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pC) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetSliceStackByID (pModel, nUniqueResourceID, pSliceStacInstance); + return wrapperTable->m_SelectNode_GetInputC (pSelectNode, pC); } -Lib3MFResult CCall_lib3mf_model_getbuilduuid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +Lib3MFResult CCall_lib3mf_selectnode_getinputd(Lib3MFHandle libraryHandle, Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pD) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetBuildUUID (pModel, pHasUUID, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); + return wrapperTable->m_SelectNode_GetInputD (pSelectNode, pD); } -Lib3MFResult CCall_lib3mf_model_setbuilduuid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pUUID) +Lib3MFResult CCall_lib3mf_clampnode_getinputmin(Lib3MFHandle libraryHandle, Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMin) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_SetBuildUUID (pModel, pUUID); + return wrapperTable->m_ClampNode_GetInputMin (pClampNode, pMin); } -Lib3MFResult CCall_lib3mf_model_getbuilditems(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_BuildItemIterator * pBuildItemIterator) +Lib3MFResult CCall_lib3mf_clampnode_getinputmax(Lib3MFHandle libraryHandle, Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMax) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetBuildItems (pModel, pBuildItemIterator); + return wrapperTable->m_ClampNode_GetInputMax (pClampNode, pMax); } -Lib3MFResult CCall_lib3mf_model_getoutbox(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, sLib3MFBox * pOutbox) +Lib3MFResult CCall_lib3mf_composevectornode_getinputx(Lib3MFHandle libraryHandle, Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pX) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetOutbox (pModel, pOutbox); + return wrapperTable->m_ComposeVectorNode_GetInputX (pComposeVectorNode, pX); } -Lib3MFResult CCall_lib3mf_model_getresources(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ResourceIterator * pResourceIterator) +Lib3MFResult CCall_lib3mf_composevectornode_getinputy(Lib3MFHandle libraryHandle, Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pY) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetResources (pModel, pResourceIterator); + return wrapperTable->m_ComposeVectorNode_GetInputY (pComposeVectorNode, pY); } -Lib3MFResult CCall_lib3mf_model_getobjects(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ObjectIterator * pResourceIterator) +Lib3MFResult CCall_lib3mf_composevectornode_getinputz(Lib3MFHandle libraryHandle, Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pZ) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetObjects (pModel, pResourceIterator); + return wrapperTable->m_ComposeVectorNode_GetInputZ (pComposeVectorNode, pZ); } -Lib3MFResult CCall_lib3mf_model_getmeshobjects(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_MeshObjectIterator * pResourceIterator) +Lib3MFResult CCall_lib3mf_composevectornode_getoutputresult(Lib3MFHandle libraryHandle, Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pResult) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetMeshObjects (pModel, pResourceIterator); + return wrapperTable->m_ComposeVectorNode_GetOutputResult (pComposeVectorNode, pResult); } -Lib3MFResult CCall_lib3mf_model_getcomponentsobjects(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ComponentsObjectIterator * pResourceIterator) +Lib3MFResult CCall_lib3mf_decomposevectornode_getinputa(Lib3MFHandle libraryHandle, Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pA) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetComponentsObjects (pModel, pResourceIterator); + return wrapperTable->m_DecomposeVectorNode_GetInputA (pDecomposeVectorNode, pA); } -Lib3MFResult CCall_lib3mf_model_gettexture2ds(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Texture2DIterator * pResourceIterator) +Lib3MFResult CCall_lib3mf_decomposevectornode_getoutputx(Lib3MFHandle libraryHandle, Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pX) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetTexture2Ds (pModel, pResourceIterator); + return wrapperTable->m_DecomposeVectorNode_GetOutputX (pDecomposeVectorNode, pX); } -Lib3MFResult CCall_lib3mf_model_getbasematerialgroups(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_BaseMaterialGroupIterator * pResourceIterator) +Lib3MFResult CCall_lib3mf_decomposevectornode_getoutputy(Lib3MFHandle libraryHandle, Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pY) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetBaseMaterialGroups (pModel, pResourceIterator); + return wrapperTable->m_DecomposeVectorNode_GetOutputY (pDecomposeVectorNode, pY); } -Lib3MFResult CCall_lib3mf_model_getcolorgroups(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ColorGroupIterator * pResourceIterator) +Lib3MFResult CCall_lib3mf_decomposevectornode_getoutputz(Lib3MFHandle libraryHandle, Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pZ) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetColorGroups (pModel, pResourceIterator); + return wrapperTable->m_DecomposeVectorNode_GetOutputZ (pDecomposeVectorNode, pZ); } -Lib3MFResult CCall_lib3mf_model_gettexture2dgroups(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Texture2DGroupIterator * pResourceIterator) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm00(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM00) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetTexture2DGroups (pModel, pResourceIterator); + return wrapperTable->m_ComposeMatrixNode_GetInputM00 (pComposeMatrixNode, pM00); } -Lib3MFResult CCall_lib3mf_model_getcompositematerials(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_CompositeMaterialsIterator * pResourceIterator) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm01(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM01) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetCompositeMaterials (pModel, pResourceIterator); + return wrapperTable->m_ComposeMatrixNode_GetInputM01 (pComposeMatrixNode, pM01); } -Lib3MFResult CCall_lib3mf_model_getmultipropertygroups(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_MultiPropertyGroupIterator * pResourceIterator) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm02(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM02) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetMultiPropertyGroups (pModel, pResourceIterator); + return wrapperTable->m_ComposeMatrixNode_GetInputM02 (pComposeMatrixNode, pM02); } -Lib3MFResult CCall_lib3mf_model_getslicestacks(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_SliceStackIterator * pResourceIterator) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm03(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM03) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetSliceStacks (pModel, pResourceIterator); + return wrapperTable->m_ComposeMatrixNode_GetInputM03 (pComposeMatrixNode, pM03); } -Lib3MFResult CCall_lib3mf_model_mergetomodel(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Model * pMergedModelInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm10(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM10) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_MergeToModel (pModel, pMergedModelInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM10 (pComposeMatrixNode, pM10); } -Lib3MFResult CCall_lib3mf_model_addmeshobject(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_MeshObject * pMeshObjectInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm11(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM11) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddMeshObject (pModel, pMeshObjectInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM11 (pComposeMatrixNode, pM11); } -Lib3MFResult CCall_lib3mf_model_addcomponentsobject(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ComponentsObject * pComponentsObjectInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm12(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM12) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddComponentsObject (pModel, pComponentsObjectInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM12 (pComposeMatrixNode, pM12); } -Lib3MFResult CCall_lib3mf_model_addslicestack(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_double dZBottom, Lib3MF_SliceStack * pSliceStackInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm13(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM13) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddSliceStack (pModel, dZBottom, pSliceStackInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM13 (pComposeMatrixNode, pM13); } -Lib3MFResult CCall_lib3mf_model_addtexture2dfromattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Attachment pTextureAttachment, Lib3MF_Texture2D * pTexture2DInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm20(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM20) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddTexture2DFromAttachment (pModel, pTextureAttachment, pTexture2DInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM20 (pComposeMatrixNode, pM20); } -Lib3MFResult CCall_lib3mf_model_addbasematerialgroup(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm21(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM21) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddBaseMaterialGroup (pModel, pBaseMaterialGroupInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM21 (pComposeMatrixNode, pM21); } -Lib3MFResult CCall_lib3mf_model_addcolorgroup(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ColorGroup * pColorGroupInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm22(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM22) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddColorGroup (pModel, pColorGroupInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM22 (pComposeMatrixNode, pM22); } -Lib3MFResult CCall_lib3mf_model_addtexture2dgroup(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Texture2D pTexture2DInstance, Lib3MF_Texture2DGroup * pTexture2DGroupInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm23(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM23) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddTexture2DGroup (pModel, pTexture2DInstance, pTexture2DGroupInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM23 (pComposeMatrixNode, pM23); } -Lib3MFResult CCall_lib3mf_model_addcompositematerials(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance, Lib3MF_CompositeMaterials * pCompositeMaterialsInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm30(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM30) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddCompositeMaterials (pModel, pBaseMaterialGroupInstance, pCompositeMaterialsInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM30 (pComposeMatrixNode, pM30); } -Lib3MFResult CCall_lib3mf_model_addmultipropertygroup(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm31(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM31) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddMultiPropertyGroup (pModel, pMultiPropertyGroupInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM31 (pComposeMatrixNode, pM31); } -Lib3MFResult CCall_lib3mf_model_addbuilditem(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Object pObject, const sLib3MFTransform * pTransform, Lib3MF_BuildItem * pBuildItemInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm32(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM32) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddBuildItem (pModel, pObject, pTransform, pBuildItemInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM32 (pComposeMatrixNode, pM32); } -Lib3MFResult CCall_lib3mf_model_removebuilditem(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_BuildItem pBuildItemInstance) +Lib3MFResult CCall_lib3mf_composematrixnode_getinputm33(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM33) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_RemoveBuildItem (pModel, pBuildItemInstance); + return wrapperTable->m_ComposeMatrixNode_GetInputM33 (pComposeMatrixNode, pM33); } -Lib3MFResult CCall_lib3mf_model_getmetadatagroup(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_MetaDataGroup * pTheMetaDataGroup) +Lib3MFResult CCall_lib3mf_composematrixnode_getoutputresult(Lib3MFHandle libraryHandle, Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pResult) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetMetaDataGroup (pModel, pTheMetaDataGroup); + return wrapperTable->m_ComposeMatrixNode_GetOutputResult (pComposeMatrixNode, pResult); } -Lib3MFResult CCall_lib3mf_model_addattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pURI, const char * pRelationShipType, Lib3MF_Attachment * pAttachmentInstance) +Lib3MFResult CCall_lib3mf_matrixfromrowsnode_getinputa(Lib3MFHandle libraryHandle, Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow0) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddAttachment (pModel, pURI, pRelationShipType, pAttachmentInstance); + return wrapperTable->m_MatrixFromRowsNode_GetInputA (pMatrixFromRowsNode, pRow0); } -Lib3MFResult CCall_lib3mf_model_removeattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Attachment pAttachmentInstance) +Lib3MFResult CCall_lib3mf_matrixfromrowsnode_getinputb(Lib3MFHandle libraryHandle, Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow1) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_RemoveAttachment (pModel, pAttachmentInstance); + return wrapperTable->m_MatrixFromRowsNode_GetInputB (pMatrixFromRowsNode, pRow1); } -Lib3MFResult CCall_lib3mf_model_getattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pAttachmentInstance) +Lib3MFResult CCall_lib3mf_matrixfromrowsnode_getinputc(Lib3MFHandle libraryHandle, Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow2) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetAttachment (pModel, nIndex, pAttachmentInstance); + return wrapperTable->m_MatrixFromRowsNode_GetInputC (pMatrixFromRowsNode, pRow2); } -Lib3MFResult CCall_lib3mf_model_findattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pURI, Lib3MF_Attachment * pAttachmentInstance) +Lib3MFResult CCall_lib3mf_matrixfromrowsnode_getinputd(Lib3MFHandle libraryHandle, Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow3) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_FindAttachment (pModel, pURI, pAttachmentInstance); + return wrapperTable->m_MatrixFromRowsNode_GetInputD (pMatrixFromRowsNode, pRow3); } -Lib3MFResult CCall_lib3mf_model_getattachmentcount(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 * pAttachmentCount) +Lib3MFResult CCall_lib3mf_matrixfromrowsnode_getoutputresult(Lib3MFHandle libraryHandle, Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pResult) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetAttachmentCount (pModel, pAttachmentCount); + return wrapperTable->m_MatrixFromRowsNode_GetOutputResult (pMatrixFromRowsNode, pResult); } -Lib3MFResult CCall_lib3mf_model_haspackagethumbnailattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, bool * pHasThumbnail) +Lib3MFResult CCall_lib3mf_matrixfromcolumnsnode_getinputa(Lib3MFHandle libraryHandle, Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn0) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_HasPackageThumbnailAttachment (pModel, pHasThumbnail); + return wrapperTable->m_MatrixFromColumnsNode_GetInputA (pMatrixFromColumnsNode, pColumn0); } -Lib3MFResult CCall_lib3mf_model_createpackagethumbnailattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Attachment * pAttachment) +Lib3MFResult CCall_lib3mf_matrixfromcolumnsnode_getinputb(Lib3MFHandle libraryHandle, Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn1) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_CreatePackageThumbnailAttachment (pModel, pAttachment); + return wrapperTable->m_MatrixFromColumnsNode_GetInputB (pMatrixFromColumnsNode, pColumn1); } -Lib3MFResult CCall_lib3mf_model_getpackagethumbnailattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Attachment * pAttachment) +Lib3MFResult CCall_lib3mf_matrixfromcolumnsnode_getinputc(Lib3MFHandle libraryHandle, Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn2) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetPackageThumbnailAttachment (pModel, pAttachment); + return wrapperTable->m_MatrixFromColumnsNode_GetInputC (pMatrixFromColumnsNode, pColumn2); } -Lib3MFResult CCall_lib3mf_model_removepackagethumbnailattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel) +Lib3MFResult CCall_lib3mf_matrixfromcolumnsnode_getinputd(Lib3MFHandle libraryHandle, Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn3) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_RemovePackageThumbnailAttachment (pModel); + return wrapperTable->m_MatrixFromColumnsNode_GetInputD (pMatrixFromColumnsNode, pColumn3); } -Lib3MFResult CCall_lib3mf_model_addcustomcontenttype(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pExtension, const char * pContentType) +Lib3MFResult CCall_lib3mf_matrixfromcolumnsnode_getoutputresult(Lib3MFHandle libraryHandle, Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pResult) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_AddCustomContentType (pModel, pExtension, pContentType); + return wrapperTable->m_MatrixFromColumnsNode_GetOutputResult (pMatrixFromColumnsNode, pResult); } -Lib3MFResult CCall_lib3mf_model_removecustomcontenttype(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pExtension) +Lib3MFResult CCall_lib3mf_constantnode_setconstant(Lib3MFHandle libraryHandle, Lib3MF_ConstantNode pConstantNode, Lib3MF_double dValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_RemoveCustomContentType (pModel, pExtension); + return wrapperTable->m_ConstantNode_SetConstant (pConstantNode, dValue); } -Lib3MFResult CCall_lib3mf_model_setrandomnumbercallback(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MFRandomNumberCallback pTheCallback, Lib3MF_pvoid pUserData) +Lib3MFResult CCall_lib3mf_constantnode_getconstant(Lib3MFHandle libraryHandle, Lib3MF_ConstantNode pConstantNode, Lib3MF_double * pValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_SetRandomNumberCallback (pModel, pTheCallback, pUserData); + return wrapperTable->m_ConstantNode_GetConstant (pConstantNode, pValue); } -Lib3MFResult CCall_lib3mf_model_getkeystore(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_KeyStore * pKeyStore) +Lib3MFResult CCall_lib3mf_constantnode_getoutputvalue(Lib3MFHandle libraryHandle, Lib3MF_ConstantNode pConstantNode, Lib3MF_ImplicitPort * pValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Model_GetKeyStore (pModel, pKeyStore); + return wrapperTable->m_ConstantNode_GetOutputValue (pConstantNode, pValue); } -Lib3MFResult CCall_lib3mf_getlibraryversion(Lib3MFHandle libraryHandle, Lib3MF_uint32 * pMajor, Lib3MF_uint32 * pMinor, Lib3MF_uint32 * pMicro) +Lib3MFResult CCall_lib3mf_constvecnode_setvector(Lib3MFHandle libraryHandle, Lib3MF_ConstVecNode pConstVecNode, const sLib3MFVector * pValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_GetLibraryVersion (pMajor, pMinor, pMicro); + return wrapperTable->m_ConstVecNode_SetVector (pConstVecNode, pValue); } -Lib3MFResult CCall_lib3mf_getprereleaseinformation(Lib3MFHandle libraryHandle, bool * pHasPrereleaseInfo, const Lib3MF_uint32 nPrereleaseInfoBufferSize, Lib3MF_uint32* pPrereleaseInfoNeededChars, char * pPrereleaseInfoBuffer) +Lib3MFResult CCall_lib3mf_constvecnode_getvector(Lib3MFHandle libraryHandle, Lib3MF_ConstVecNode pConstVecNode, sLib3MFVector * pValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_GetPrereleaseInformation (pHasPrereleaseInfo, nPrereleaseInfoBufferSize, pPrereleaseInfoNeededChars, pPrereleaseInfoBuffer); + return wrapperTable->m_ConstVecNode_GetVector (pConstVecNode, pValue); } -Lib3MFResult CCall_lib3mf_getbuildinformation(Lib3MFHandle libraryHandle, bool * pHasBuildInfo, const Lib3MF_uint32 nBuildInformationBufferSize, Lib3MF_uint32* pBuildInformationNeededChars, char * pBuildInformationBuffer) +Lib3MFResult CCall_lib3mf_constvecnode_getoutputvector(Lib3MFHandle libraryHandle, Lib3MF_ConstVecNode pConstVecNode, Lib3MF_ImplicitPort * pVector) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_GetBuildInformation (pHasBuildInfo, nBuildInformationBufferSize, pBuildInformationNeededChars, pBuildInformationBuffer); + return wrapperTable->m_ConstVecNode_GetOutputVector (pConstVecNode, pVector); } -Lib3MFResult CCall_lib3mf_getspecificationversion(Lib3MFHandle libraryHandle, const char * pSpecificationURL, bool * pIsSupported, Lib3MF_uint32 * pMajor, Lib3MF_uint32 * pMinor, Lib3MF_uint32 * pMicro) +Lib3MFResult CCall_lib3mf_constmatnode_setmatrix(Lib3MFHandle libraryHandle, Lib3MF_ConstMatNode pConstMatNode, const sLib3MFMatrix4x4 * pValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_GetSpecificationVersion (pSpecificationURL, pIsSupported, pMajor, pMinor, pMicro); + return wrapperTable->m_ConstMatNode_SetMatrix (pConstMatNode, pValue); } -Lib3MFResult CCall_lib3mf_createmodel(Lib3MFHandle libraryHandle, Lib3MF_Model * pModel) +Lib3MFResult CCall_lib3mf_constmatnode_getmatrix(Lib3MFHandle libraryHandle, Lib3MF_ConstMatNode pConstMatNode, sLib3MFMatrix4x4 * pValue) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_CreateModel (pModel); + return wrapperTable->m_ConstMatNode_GetMatrix (pConstMatNode, pValue); } -Lib3MFResult CCall_lib3mf_release(Lib3MFHandle libraryHandle, Lib3MF_Base pInstance) +Lib3MFResult CCall_lib3mf_constmatnode_getoutputmatrix(Lib3MFHandle libraryHandle, Lib3MF_ConstMatNode pConstMatNode, Lib3MF_ImplicitPort * pMatrix) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Release (pInstance); + return wrapperTable->m_ConstMatNode_GetOutputMatrix (pConstMatNode, pMatrix); } -Lib3MFResult CCall_lib3mf_acquire(Lib3MFHandle libraryHandle, Lib3MF_Base pInstance) +Lib3MFResult CCall_lib3mf_meshnode_getinputmesh(Lib3MFHandle libraryHandle, Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pMesh) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_Acquire (pInstance); + return wrapperTable->m_MeshNode_GetInputMesh (pMeshNode, pMesh); } -Lib3MFResult CCall_lib3mf_setjournal(Lib3MFHandle libraryHandle, const char * pJournalPath) +Lib3MFResult CCall_lib3mf_meshnode_getinputpos(Lib3MFHandle libraryHandle, Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pPos) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_SetJournal (pJournalPath); + return wrapperTable->m_MeshNode_GetInputPos (pMeshNode, pPos); } -Lib3MFResult CCall_lib3mf_getlasterror(Lib3MFHandle libraryHandle, Lib3MF_Base pInstance, const Lib3MF_uint32 nLastErrorStringBufferSize, Lib3MF_uint32* pLastErrorStringNeededChars, char * pLastErrorStringBuffer, bool * pHasLastError) +Lib3MFResult CCall_lib3mf_meshnode_getoutputdistance(Lib3MFHandle libraryHandle, Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pDistance) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_GetLastError (pInstance, nLastErrorStringBufferSize, pLastErrorStringNeededChars, pLastErrorStringBuffer, pHasLastError); + return wrapperTable->m_MeshNode_GetOutputDistance (pMeshNode, pDistance); } -Lib3MFResult CCall_lib3mf_getsymbollookupmethod(Lib3MFHandle libraryHandle, Lib3MF_pvoid * pSymbolLookupMethod) +Lib3MFResult CCall_lib3mf_unsignedmeshnode_getinputmesh(Lib3MFHandle libraryHandle, Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pMesh) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_GetSymbolLookupMethod (pSymbolLookupMethod); + return wrapperTable->m_UnsignedMeshNode_GetInputMesh (pUnsignedMeshNode, pMesh); } -Lib3MFResult CCall_lib3mf_retrieveprogressmessage(Lib3MFHandle libraryHandle, eLib3MFProgressIdentifier eTheProgressIdentifier, const Lib3MF_uint32 nProgressMessageBufferSize, Lib3MF_uint32* pProgressMessageNeededChars, char * pProgressMessageBuffer) +Lib3MFResult CCall_lib3mf_unsignedmeshnode_getinputpos(Lib3MFHandle libraryHandle, Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pPos) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_RetrieveProgressMessage (eTheProgressIdentifier, nProgressMessageBufferSize, pProgressMessageNeededChars, pProgressMessageBuffer); + return wrapperTable->m_UnsignedMeshNode_GetInputPos (pUnsignedMeshNode, pPos); } -Lib3MFResult CCall_lib3mf_rgbatocolor(Lib3MFHandle libraryHandle, Lib3MF_uint8 nRed, Lib3MF_uint8 nGreen, Lib3MF_uint8 nBlue, Lib3MF_uint8 nAlpha, sLib3MFColor * pTheColor) +Lib3MFResult CCall_lib3mf_unsignedmeshnode_getoutputdistance(Lib3MFHandle libraryHandle, Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_RGBAToColor (nRed, nGreen, nBlue, nAlpha, pTheColor); + return wrapperTable->m_UnsignedMeshNode_GetOutputDistance (pUnsignedMeshNode, pDistance); } -Lib3MFResult CCall_lib3mf_floatrgbatocolor(Lib3MFHandle libraryHandle, Lib3MF_single fRed, Lib3MF_single fGreen, Lib3MF_single fBlue, Lib3MF_single fAlpha, sLib3MFColor * pTheColor) +Lib3MFResult CCall_lib3mf_functioncallnode_getinputfunctionid(Lib3MFHandle libraryHandle, Lib3MF_FunctionCallNode pFunctionCallNode, Lib3MF_ImplicitPort * pFunction) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_FloatRGBAToColor (fRed, fGreen, fBlue, fAlpha, pTheColor); + return wrapperTable->m_FunctionCallNode_GetInputFunctionID (pFunctionCallNode, pFunction); } -Lib3MFResult CCall_lib3mf_colortorgba(Lib3MFHandle libraryHandle, const sLib3MFColor * pTheColor, Lib3MF_uint8 * pRed, Lib3MF_uint8 * pGreen, Lib3MF_uint8 * pBlue, Lib3MF_uint8 * pAlpha) +Lib3MFResult CCall_lib3mf_nodeiterator_getcurrent(Lib3MFHandle libraryHandle, Lib3MF_NodeIterator pNodeIterator, Lib3MF_ImplicitNode * pNode) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ColorToRGBA (pTheColor, pRed, pGreen, pBlue, pAlpha); + return wrapperTable->m_NodeIterator_GetCurrent (pNodeIterator, pNode); } -Lib3MFResult CCall_lib3mf_colortofloatrgba(Lib3MFHandle libraryHandle, const sLib3MFColor * pTheColor, Lib3MF_single * pRed, Lib3MF_single * pGreen, Lib3MF_single * pBlue, Lib3MF_single * pAlpha) +Lib3MFResult CCall_lib3mf_function_getdisplayname(Lib3MFHandle libraryHandle, Lib3MF_Function pFunction, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_ColorToFloatRGBA (pTheColor, pRed, pGreen, pBlue, pAlpha); + return wrapperTable->m_Function_GetDisplayName (pFunction, nDisplayNameBufferSize, pDisplayNameNeededChars, pDisplayNameBuffer); } -Lib3MFResult CCall_lib3mf_getidentitytransform(Lib3MFHandle libraryHandle, sLib3MFTransform * pTransform) +Lib3MFResult CCall_lib3mf_function_setdisplayname(Lib3MFHandle libraryHandle, Lib3MF_Function pFunction, const char * pDisplayName) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_GetIdentityTransform (pTransform); + return wrapperTable->m_Function_SetDisplayName (pFunction, pDisplayName); } -Lib3MFResult CCall_lib3mf_getuniformscaletransform(Lib3MFHandle libraryHandle, Lib3MF_single fFactor, sLib3MFTransform * pTransform) +Lib3MFResult CCall_lib3mf_function_addinput(Lib3MFHandle libraryHandle, Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_GetUniformScaleTransform (fFactor, pTransform); + return wrapperTable->m_Function_AddInput (pFunction, pIdentifier, pDisplayName, eType, pPort); } -Lib3MFResult CCall_lib3mf_getscaletransform(Lib3MFHandle libraryHandle, Lib3MF_single fFactorX, Lib3MF_single fFactorY, Lib3MF_single fFactorZ, sLib3MFTransform * pTransform) +Lib3MFResult CCall_lib3mf_function_getinputs(Lib3MFHandle libraryHandle, Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_GetScaleTransform (fFactorX, fFactorY, fFactorZ, pTransform); + return wrapperTable->m_Function_GetInputs (pFunction, pIterator); } -Lib3MFResult CCall_lib3mf_gettranslationtransform(Lib3MFHandle libraryHandle, Lib3MF_single fVectorX, Lib3MF_single fVectorY, Lib3MF_single fVectorZ, sLib3MFTransform * pTransform) +Lib3MFResult CCall_lib3mf_function_removeinput(Lib3MFHandle libraryHandle, Lib3MF_Function pFunction, Lib3MF_ImplicitPort pInput) { if (libraryHandle == 0) return LIB3MF_ERROR_INVALIDCAST; sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; - return wrapperTable->m_GetTranslationTransform (fVectorX, fVectorY, fVectorZ, pTransform); + return wrapperTable->m_Function_RemoveInput (pFunction, pInput); } -*/ -import "C" - -import ( - "fmt" - "unsafe" - "runtime" -) -type ref = C.Lib3MFHandle +Lib3MFResult CCall_lib3mf_function_addoutput(Lib3MFHandle libraryHandle, Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Function_AddOutput (pFunction, pIdentifier, pDisplayName, eType, pPort); +} -// PropertyType represents a Lib3MF enum. -type PropertyType int +Lib3MFResult CCall_lib3mf_function_getoutputs(Lib3MFHandle libraryHandle, Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Function_GetOutputs (pFunction, pIterator); +} -const ( - PropertyType_NoPropertyType = 0 - PropertyType_BaseMaterial = 1 - PropertyType_TexCoord = 2 - PropertyType_Colors = 3 - PropertyType_Composite = 4 - PropertyType_Multi = 5 -) -// SlicesMeshResolution represents a Lib3MF enum. -type SlicesMeshResolution int +Lib3MFResult CCall_lib3mf_function_removeoutput(Lib3MFHandle libraryHandle, Lib3MF_Function pFunction, Lib3MF_ImplicitPort pOutput) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Function_RemoveOutput (pFunction, pOutput); +} -const ( - SlicesMeshResolution_Fullres = 0 - SlicesMeshResolution_Lowres = 1 -) -// ModelUnit represents a Lib3MF enum. -type ModelUnit int +Lib3MFResult CCall_lib3mf_function_findinput(Lib3MFHandle libraryHandle, Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pInput) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Function_FindInput (pFunction, pIdentifier, pInput); +} -const ( - ModelUnit_MicroMeter = 0 - ModelUnit_MilliMeter = 1 - ModelUnit_CentiMeter = 2 - ModelUnit_Inch = 3 - ModelUnit_Foot = 4 - ModelUnit_Meter = 5 -) -// ObjectType represents a Lib3MF enum. -type ObjectType int +Lib3MFResult CCall_lib3mf_function_findoutput(Lib3MFHandle libraryHandle, Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Function_FindOutput (pFunction, pIdentifier, pOutput); +} -const ( - ObjectType_Other = 0 - ObjectType_Model = 1 - ObjectType_Support = 2 - ObjectType_SolidSupport = 3 -) -// TextureType represents a Lib3MF enum. -type TextureType int +Lib3MFResult CCall_lib3mf_implicitfunction_getidentifier(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_GetIdentifier (pImplicitFunction, nIdentifierBufferSize, pIdentifierNeededChars, pIdentifierBuffer); +} -const ( - TextureType_Unknown = 0 - TextureType_PNG = 1 - TextureType_JPEG = 2 -) -// TextureTileStyle represents a Lib3MF enum. -type TextureTileStyle int +Lib3MFResult CCall_lib3mf_implicitfunction_setidentifier(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_SetIdentifier (pImplicitFunction, pIdentifier); +} -const ( - TextureTileStyle_Wrap = 0 - TextureTileStyle_Mirror = 1 - TextureTileStyle_Clamp = 2 - TextureTileStyle_NoTileStyle = 3 -) -// TextureFilter represents a Lib3MF enum. -type TextureFilter int +Lib3MFResult CCall_lib3mf_implicitfunction_addnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, eLib3MFImplicitNodeType eNodeType, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ImplicitNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddNode (pImplicitFunction, eNodeType, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -const ( - TextureFilter_Auto = 0 - TextureFilter_Linear = 1 - TextureFilter_Nearest = 2 -) -// BeamLatticeCapMode represents a Lib3MF enum. -type BeamLatticeCapMode int +Lib3MFResult CCall_lib3mf_implicitfunction_addsinnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddSinNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -const ( - BeamLatticeCapMode_Sphere = 0 - BeamLatticeCapMode_HemiSphere = 1 - BeamLatticeCapMode_Butt = 2 -) -// BeamLatticeClipMode represents a Lib3MF enum. -type BeamLatticeClipMode int +Lib3MFResult CCall_lib3mf_implicitfunction_addcosnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CosNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddCosNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -const ( - BeamLatticeClipMode_NoClipMode = 0 - BeamLatticeClipMode_Inside = 1 - BeamLatticeClipMode_Outside = 2 -) -// BeamLatticeBallMode represents a Lib3MF enum. -type BeamLatticeBallMode int +Lib3MFResult CCall_lib3mf_implicitfunction_addtannode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddTanNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -const ( - BeamLatticeBallMode_None = 0 - BeamLatticeBallMode_Mixed = 1 - BeamLatticeBallMode_All = 2 -) -// ProgressIdentifier represents a Lib3MF enum. -type ProgressIdentifier int +Lib3MFResult CCall_lib3mf_implicitfunction_addarcsinnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcSinNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddArcSinNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -const ( - ProgressIdentifier_QUERYCANCELED = 0 - ProgressIdentifier_DONE = 1 - ProgressIdentifier_CLEANUP = 2 - ProgressIdentifier_READSTREAM = 3 - ProgressIdentifier_EXTRACTOPCPACKAGE = 4 - ProgressIdentifier_READNONROOTMODELS = 5 - ProgressIdentifier_READROOTMODEL = 6 - ProgressIdentifier_READRESOURCES = 7 - ProgressIdentifier_READMESH = 8 - ProgressIdentifier_READSLICES = 9 - ProgressIdentifier_READBUILD = 10 - ProgressIdentifier_READCUSTOMATTACHMENT = 11 - ProgressIdentifier_READTEXTURETACHMENTS = 12 - ProgressIdentifier_CREATEOPCPACKAGE = 13 - ProgressIdentifier_WRITEMODELSTOSTREAM = 14 - ProgressIdentifier_WRITEROOTMODEL = 15 - ProgressIdentifier_WRITENONROOTMODELS = 16 - ProgressIdentifier_WRITEATTACHMENTS = 17 - ProgressIdentifier_WRITECONTENTTYPES = 18 - ProgressIdentifier_WRITENOBJECTS = 19 - ProgressIdentifier_WRITENODES = 20 - ProgressIdentifier_WRITETRIANGLES = 21 - ProgressIdentifier_WRITESLICES = 22 - ProgressIdentifier_WRITEKEYSTORE = 23 -) -// BlendMethod represents a Lib3MF enum. -type BlendMethod int +Lib3MFResult CCall_lib3mf_implicitfunction_addarccosnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcCosNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddArcCosNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -const ( - BlendMethod_NoBlendMethod = 0 - BlendMethod_Mix = 1 - BlendMethod_Multiply = 2 -) -// EncryptionAlgorithm represents a Lib3MF enum. -type EncryptionAlgorithm int +Lib3MFResult CCall_lib3mf_implicitfunction_addarctan2node(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcTan2Node * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddArcTan2Node (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -const ( - EncryptionAlgorithm_AES256_GCM = 1 -) -// WrappingAlgorithm represents a Lib3MF enum. -type WrappingAlgorithm int +Lib3MFResult CCall_lib3mf_implicitfunction_addsinhnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinhNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddSinhNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -const ( - WrappingAlgorithm_RSA_OAEP = 0 -) -// MgfAlgorithm represents a Lib3MF enum. -type MgfAlgorithm int +Lib3MFResult CCall_lib3mf_implicitfunction_addcoshnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CoshNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddCoshNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -const ( - MgfAlgorithm_MGF1_SHA1 = 160 - MgfAlgorithm_MGF1_SHA224 = 224 - MgfAlgorithm_MGF1_SHA256 = 256 - MgfAlgorithm_MGF1_SHA384 = 384 - MgfAlgorithm_MGF1_SHA512 = 512 -) -// DigestMethod represents a Lib3MF enum. -type DigestMethod int +Lib3MFResult CCall_lib3mf_implicitfunction_addtanhnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanhNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddTanhNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -const ( - DigestMethod_SHA1 = 160 - DigestMethod_SHA256 = 256 -) -// Compression represents a Lib3MF enum. -type Compression int +Lib3MFResult CCall_lib3mf_implicitfunction_addroundnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_RoundNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddRoundNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -const ( - Compression_NoCompression = 0 - Compression_Deflate = 1 -) -// Triangle represents a Lib3MF struct. -type Triangle struct { - Indices[3] uint32 +Lib3MFResult CCall_lib3mf_implicitfunction_addceilnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CeilNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddCeilNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); } -// TriangleProperties represents a Lib3MF struct. -type TriangleProperties struct { - ResourceID uint32 - PropertyIDs[3] uint32 -} -// Position represents a Lib3MF struct. -type Position struct { - Coordinates[3] float32 +Lib3MFResult CCall_lib3mf_implicitfunction_addfloornode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FloorNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddFloorNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); } -// Position2D represents a Lib3MF struct. -type Position2D struct { - Coordinates[2] float32 -} -// CompositeConstituent represents a Lib3MF struct. -type CompositeConstituent struct { - PropertyID uint32 - MixingRatio float64 +Lib3MFResult CCall_lib3mf_implicitfunction_addsignnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SignNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddSignNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); } -// MultiPropertyLayer represents a Lib3MF struct. -type MultiPropertyLayer struct { - ResourceID uint32 - TheBlendMethod BlendMethod -} -// Tex2Coord represents a Lib3MF struct. -type Tex2Coord struct { - U float64 - V float64 +Lib3MFResult CCall_lib3mf_implicitfunction_addfractnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FractNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddFractNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); } -// Transform represents a Lib3MF struct. -type Transform struct { - Fields[4][3] float32 + +Lib3MFResult CCall_lib3mf_implicitfunction_addabsnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AbsNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddAbsNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); } -// Box represents a Lib3MF struct. -type Box struct { - MinCoordinate[3] float32 - MaxCoordinate[3] float32 -} -// Color represents a Lib3MF struct. -type Color struct { - Red uint8 - Green uint8 - Blue uint8 - Alpha uint8 +Lib3MFResult CCall_lib3mf_implicitfunction_addexpnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ExpNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddExpNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); } -// Beam represents a Lib3MF struct. -type Beam struct { - Indices[2] uint32 - Radii[2] float64 - CapModes[2] BeamLatticeCapMode -} -// Ball represents a Lib3MF struct. -type Ball struct { - Index uint32 - Radius float64 +Lib3MFResult CCall_lib3mf_implicitfunction_addlognode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_LogNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddLogNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); } -// Error constants for Lib3MF. -const LIB3MF_ERROR_NOTIMPLEMENTED = 1; -const LIB3MF_ERROR_INVALIDPARAM = 2; -const LIB3MF_ERROR_INVALIDCAST = 3; -const LIB3MF_ERROR_BUFFERTOOSMALL = 4; -const LIB3MF_ERROR_GENERICEXCEPTION = 5; -const LIB3MF_ERROR_COULDNOTLOADLIBRARY = 6; -const LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT = 7; -const LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION = 8; -const LIB3MF_ERROR_CALCULATIONABORTED = 10; -const LIB3MF_ERROR_SHOULDNOTBECALLED = 11; -const LIB3MF_ERROR_READERCLASSUNKNOWN = 100; -const LIB3MF_ERROR_WRITERCLASSUNKNOWN = 101; -const LIB3MF_ERROR_ITERATORINVALIDINDEX = 102; -const LIB3MF_ERROR_INVALIDMODELRESOURCE = 103; -const LIB3MF_ERROR_RESOURCENOTFOUND = 104; -const LIB3MF_ERROR_INVALIDMODEL = 105; -const LIB3MF_ERROR_INVALIDOBJECT = 106; -const LIB3MF_ERROR_INVALIDMESHOBJECT = 107; -const LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT = 108; -const LIB3MF_ERROR_INVALIDCOMPONENT = 109; -const LIB3MF_ERROR_INVALIDBUILDITEM = 110; -const LIB3MF_ERROR_INVALIDBASEMATERIALGROUP = 111; -const LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE = 112; -const LIB3MF_ERROR_INVALIDTEXTURERESOURCE = 113; -const LIB3MF_ERROR_INVALIDCOLORGROUP = 114; -const LIB3MF_ERROR_INVALIDTEXTURE2DGROUP = 115; -const LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS = 116; -const LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP = 117; -const LIB3MF_ERROR_INVALIDRESOURCEINDEX = 120; -const LIB3MF_ERROR_ATTACHMENTNOTFOUND = 121; -const LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE = 130; -const LIB3MF_ERROR_INVALIDATTACHMENTSTREAM = 131; -const LIB3MF_ERROR_INVALIDPROPERTYCOUNT = 132; -const LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER = 140; -const LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT = 141; -const LIB3MF_ERROR_INVALIDRESOURCE = 142; -const LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE = 2000; -const LIB3MF_ERROR_INVALIDKEYSTORE = 3000; -const LIB3MF_ERROR_INVALIDKEYSTORECONSUMER = 3001; -const LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND = 3002; -const LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND = 3003; -const LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED = 3004; -const LIB3MF_ERROR_INVALIDKEYSIZE = 3005; -// WrappedError is an error that wraps a Lib3MF error. -type WrappedError struct { - Code uint32 - Message string +Lib3MFResult CCall_lib3mf_implicitfunction_addlog2node(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log2Node * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddLog2Node (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); } -func (e *WrappedError) Error() string { - return fmt.Sprintf("lib3mf: %s (%d)", e.Message, e.Code) -} -func errorMessage(errorcode uint32) string { - switch (errorcode) { - case LIB3MF_ERROR_NOTIMPLEMENTED: - return "functionality not implemented"; - case LIB3MF_ERROR_INVALIDPARAM: - return "an invalid parameter was passed"; - case LIB3MF_ERROR_INVALIDCAST: - return "a type cast failed"; - case LIB3MF_ERROR_BUFFERTOOSMALL: - return "a provided buffer is too small"; - case LIB3MF_ERROR_GENERICEXCEPTION: - return "a generic exception occurred"; - case LIB3MF_ERROR_COULDNOTLOADLIBRARY: - return "the library could not be loaded"; - case LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT: - return "a required exported symbol could not be found in the library"; - case LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION: - return "the version of the binary interface does not match the bindings interface"; - case LIB3MF_ERROR_CALCULATIONABORTED: - return "a calculation has been aborted"; - case LIB3MF_ERROR_SHOULDNOTBECALLED: - return "functionality should not be called"; - case LIB3MF_ERROR_READERCLASSUNKNOWN: - return "the queried reader class is unknown"; - case LIB3MF_ERROR_WRITERCLASSUNKNOWN: - return "the queried writer class is unknown"; - case LIB3MF_ERROR_ITERATORINVALIDINDEX: - return "the current index of an iterator is invalid"; - case LIB3MF_ERROR_INVALIDMODELRESOURCE: - return "no Model Resource has been given"; - case LIB3MF_ERROR_RESOURCENOTFOUND: - return "Resource not found"; - case LIB3MF_ERROR_INVALIDMODEL: - return "A model is invalid"; - case LIB3MF_ERROR_INVALIDOBJECT: - return "An object is invalid"; - case LIB3MF_ERROR_INVALIDMESHOBJECT: - return "A mesh object is invalid"; - case LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT: - return "A components object is invalid"; - case LIB3MF_ERROR_INVALIDCOMPONENT: - return "A component is invalid"; - case LIB3MF_ERROR_INVALIDBUILDITEM: - return "A build item is invalid"; - case LIB3MF_ERROR_INVALIDBASEMATERIALGROUP: - return "A basematerialgroup is invalid"; - case LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE: - return "A slicestack resource is invalid"; - case LIB3MF_ERROR_INVALIDTEXTURERESOURCE: - return "A texture resource is invalid"; - case LIB3MF_ERROR_INVALIDCOLORGROUP: - return "A color group resource is invalid"; - case LIB3MF_ERROR_INVALIDTEXTURE2DGROUP: - return "A texture2d group resource is invalid"; - case LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS: - return "A composite materials resource is invalid"; - case LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP: - return "A MultiPropertyGroup resource is invalid"; - case LIB3MF_ERROR_INVALIDRESOURCEINDEX: - return "A resource index is invalid"; - case LIB3MF_ERROR_ATTACHMENTNOTFOUND: - return "Attachment not found"; - case LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE: - return "A component references one of its ancestors"; - case LIB3MF_ERROR_INVALIDATTACHMENTSTREAM: - return "An attachment stream is invalid"; - case LIB3MF_ERROR_INVALIDPROPERTYCOUNT: - return "Invalid property count."; - case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: - return "A progress identifier is unknown"; - case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: - return "An element buffer exceeds its spec limit"; - case LIB3MF_ERROR_INVALIDRESOURCE: - return "A resource is invalid"; - case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: - return "This object type is not valid for beamlattices"; - case LIB3MF_ERROR_INVALIDKEYSTORE: - return "The keystore object is invalid"; - case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: - return "The consumer keystore object is invalid"; - case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: - return "A consumer has not been found"; - case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: - return "A resource data has not been found"; - case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: - return "A Key or Conentent encryption callback has not been registered"; - case LIB3MF_ERROR_INVALIDKEYSIZE: - return "The key siue is invalid"; - default: - return "unknown"; - } +Lib3MFResult CCall_lib3mf_implicitfunction_addlog10node(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log10Node * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddLog10Node (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); } -func makeError(errorcode uint32) error { - return &WrappedError{errorcode, errorMessage(uint32(errorcode))} -} -// ProgressCallbackFunc a callback function. -type ProgressCallbackFunc = func(abort *bool, progressValue float64, progressIdentifier ProgressIdentifier, userData uintptr) +Lib3MFResult CCall_lib3mf_implicitfunction_addlengthnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_LengthNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddLengthNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} -var progressCallbackFunc ProgressCallbackFunc -//export progressCallback -func progressCallback(abort *C.bool, progressValue C.double, progressIdentifier C.eLib3MFProgressIdentifier, userData C.Lib3MF_pvoid) { - if progressCallbackFunc == nil { - return - } - progressCallbackFunc((*bool)(abort), float64(progressValue), ProgressIdentifier(progressIdentifier), uintptr(userData)) +Lib3MFResult CCall_lib3mf_implicitfunction_addtransposenode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TransposeNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddTransposeNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); } -// WriteCallbackFunc callback to call for writing a data chunk. -type WriteCallbackFunc = func(byteData uint64, numBytes uint64, userData uintptr) - -var writeCallbackFunc WriteCallbackFunc -//export writeCallback -func writeCallback(byteData C.uint64_t, numBytes C.uint64_t, userData C.Lib3MF_pvoid) { - if writeCallbackFunc == nil { - return - } - writeCallbackFunc(uint64(byteData), uint64(numBytes), uintptr(userData)) +Lib3MFResult CCall_lib3mf_implicitfunction_inversenode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_InverseNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_InverseNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); } -// ReadCallbackFunc callback to call for reading a data chunk. -type ReadCallbackFunc = func(byteData uint64, numBytes uint64, userData uintptr) -var readCallbackFunc ReadCallbackFunc +Lib3MFResult CCall_lib3mf_implicitfunction_addsqrtnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SqrtNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddSqrtNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -//export readCallback -func readCallback(byteData C.uint64_t, numBytes C.uint64_t, userData C.Lib3MF_pvoid) { - if readCallbackFunc == nil { - return - } - readCallbackFunc(uint64(byteData), uint64(numBytes), uintptr(userData)) + +Lib3MFResult CCall_lib3mf_implicitfunction_addresourceidnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ResourceIdNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddResourceIdNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); } -// SeekCallbackFunc callback to call for seeking in the stream. -type SeekCallbackFunc = func(position uint64, userData uintptr) -var seekCallbackFunc SeekCallbackFunc +Lib3MFResult CCall_lib3mf_implicitfunction_addadditionnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AdditionNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddAdditionNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} -//export seekCallback -func seekCallback(position C.uint64_t, userData C.Lib3MF_pvoid) { - if seekCallbackFunc == nil { - return - } - seekCallbackFunc(uint64(position), uintptr(userData)) + +Lib3MFResult CCall_lib3mf_implicitfunction_addsubtractionnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SubtractionNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddSubtractionNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); } -// RandomNumberCallbackFunc callback to generate random numbers. -type RandomNumberCallbackFunc = func(byteData uint64, numBytes uint64, userData uintptr, bytesWritten *uint64) -var randomNumberCallbackFunc RandomNumberCallbackFunc +Lib3MFResult CCall_lib3mf_implicitfunction_addmultiplicationnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MultiplicationNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddMultiplicationNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_adddivisionnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_DivisionNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddDivisionNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_adddotnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DotNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddDotNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addcrossnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_CrossNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddCrossNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addmatvecmultiplicationnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatVecMultiplicationNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addminnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MinNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddMinNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addmaxnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MaxNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddMaxNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addfmodnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FmodNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddFmodNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addpownode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_PowNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddPowNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addselectnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SelectNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddSelectNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addclampnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ClampNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddClampNode (pImplicitFunction, pIdentifier, eConfiguration, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addcomposevectornode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeVectorNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddComposeVectorNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addvectorfromscalarnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_VectorFromScalarNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddVectorFromScalarNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_adddecomposevectornode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DecomposeVectorNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddDecomposeVectorNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addcomposematrixnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeMatrixNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddComposeMatrixNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addmatrixfromrowsnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromRowsNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addmatrixfromcolumnsnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromColumnsNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addconstantnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstantNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddConstantNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addconstvecnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstVecNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddConstVecNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addconstmatnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstMatNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddConstMatNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addmeshnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MeshNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddMeshNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addunsignedmeshnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddUnsignedMeshNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addfunctioncallnode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddFunctionCallNode (pImplicitFunction, pIdentifier, pDisplayName, pTag, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_getnodes(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_NodeIterator * pIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_GetNodes (pImplicitFunction, pIterator); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_removenode(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitNode pNode) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_RemoveNode (pImplicitFunction, pNode); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addlink(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitPort pSource, Lib3MF_ImplicitPort pTarget) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddLink (pImplicitFunction, pSource, pTarget); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_addlinkbynames(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction, const char * pSource, const char * pTarget) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_AddLinkByNames (pImplicitFunction, pSource, pTarget); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_clear(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_Clear (pImplicitFunction); +} + + +Lib3MFResult CCall_lib3mf_implicitfunction_sortnodestopologically(Lib3MFHandle libraryHandle, Lib3MF_ImplicitFunction pImplicitFunction) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ImplicitFunction_SortNodesTopologically (pImplicitFunction); +} + + +Lib3MFResult CCall_lib3mf_functionfromimage3d_getimage3d(Lib3MFHandle libraryHandle, Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D * pImage3D) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionFromImage3D_GetImage3D (pFunctionFromImage3D, pImage3D); +} + + +Lib3MFResult CCall_lib3mf_functionfromimage3d_setimage3d(Lib3MFHandle libraryHandle, Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D pImage3D) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionFromImage3D_SetImage3D (pFunctionFromImage3D, pImage3D); +} + + +Lib3MFResult CCall_lib3mf_functionfromimage3d_setfilter(Lib3MFHandle libraryHandle, Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter eFilter) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionFromImage3D_SetFilter (pFunctionFromImage3D, eFilter); +} + + +Lib3MFResult CCall_lib3mf_functionfromimage3d_getfilter(Lib3MFHandle libraryHandle, Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter * pFilter) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionFromImage3D_GetFilter (pFunctionFromImage3D, pFilter); +} + + +Lib3MFResult CCall_lib3mf_functionfromimage3d_settilestyles(Lib3MFHandle libraryHandle, Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV, eLib3MFTextureTileStyle eTileStyleW) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionFromImage3D_SetTileStyles (pFunctionFromImage3D, eTileStyleU, eTileStyleV, eTileStyleW); +} + + +Lib3MFResult CCall_lib3mf_functionfromimage3d_gettilestyles(Lib3MFHandle libraryHandle, Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV, eLib3MFTextureTileStyle * pTileStyleW) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionFromImage3D_GetTileStyles (pFunctionFromImage3D, pTileStyleU, pTileStyleV, pTileStyleW); +} + + +Lib3MFResult CCall_lib3mf_functionfromimage3d_getoffset(Lib3MFHandle libraryHandle, Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pOffset) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionFromImage3D_GetOffset (pFunctionFromImage3D, pOffset); +} + + +Lib3MFResult CCall_lib3mf_functionfromimage3d_setoffset(Lib3MFHandle libraryHandle, Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dOffset) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionFromImage3D_SetOffset (pFunctionFromImage3D, dOffset); +} + + +Lib3MFResult CCall_lib3mf_functionfromimage3d_getscale(Lib3MFHandle libraryHandle, Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pScale) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionFromImage3D_GetScale (pFunctionFromImage3D, pScale); +} + + +Lib3MFResult CCall_lib3mf_functionfromimage3d_setscale(Lib3MFHandle libraryHandle, Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dScale) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FunctionFromImage3D_SetScale (pFunctionFromImage3D, dScale); +} + + +Lib3MFResult CCall_lib3mf_builditem_getobjectresource(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, Lib3MF_Object * pObjectResource) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItem_GetObjectResource (pBuildItem, pObjectResource); +} + + +Lib3MFResult CCall_lib3mf_builditem_getuuid(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItem_GetUUID (pBuildItem, pHasUUID, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); +} + + +Lib3MFResult CCall_lib3mf_builditem_setuuid(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, const char * pUUID) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItem_SetUUID (pBuildItem, pUUID); +} + + +Lib3MFResult CCall_lib3mf_builditem_getobjectresourceid(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, Lib3MF_uint32 * pUniqueResourceID) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItem_GetObjectResourceID (pBuildItem, pUniqueResourceID); +} + + +Lib3MFResult CCall_lib3mf_builditem_hasobjecttransform(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, bool * pHasTransform) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItem_HasObjectTransform (pBuildItem, pHasTransform); +} + + +Lib3MFResult CCall_lib3mf_builditem_getobjecttransform(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, sLib3MFTransform * pTransform) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItem_GetObjectTransform (pBuildItem, pTransform); +} + + +Lib3MFResult CCall_lib3mf_builditem_setobjecttransform(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, const sLib3MFTransform * pTransform) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItem_SetObjectTransform (pBuildItem, pTransform); +} + + +Lib3MFResult CCall_lib3mf_builditem_getpartnumber(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, const Lib3MF_uint32 nPartNumberBufferSize, Lib3MF_uint32* pPartNumberNeededChars, char * pPartNumberBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItem_GetPartNumber (pBuildItem, nPartNumberBufferSize, pPartNumberNeededChars, pPartNumberBuffer); +} + + +Lib3MFResult CCall_lib3mf_builditem_setpartnumber(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, const char * pSetPartnumber) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItem_SetPartNumber (pBuildItem, pSetPartnumber); +} + + +Lib3MFResult CCall_lib3mf_builditem_getmetadatagroup(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, Lib3MF_MetaDataGroup * pMetaDataGroup) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItem_GetMetaDataGroup (pBuildItem, pMetaDataGroup); +} + + +Lib3MFResult CCall_lib3mf_builditem_getoutbox(Lib3MFHandle libraryHandle, Lib3MF_BuildItem pBuildItem, sLib3MFBox * pOutbox) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItem_GetOutbox (pBuildItem, pOutbox); +} + + +Lib3MFResult CCall_lib3mf_builditemiterator_movenext(Lib3MFHandle libraryHandle, Lib3MF_BuildItemIterator pBuildItemIterator, bool * pHasNext) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItemIterator_MoveNext (pBuildItemIterator, pHasNext); +} + + +Lib3MFResult CCall_lib3mf_builditemiterator_moveprevious(Lib3MFHandle libraryHandle, Lib3MF_BuildItemIterator pBuildItemIterator, bool * pHasPrevious) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItemIterator_MovePrevious (pBuildItemIterator, pHasPrevious); +} + + +Lib3MFResult CCall_lib3mf_builditemiterator_getcurrent(Lib3MFHandle libraryHandle, Lib3MF_BuildItemIterator pBuildItemIterator, Lib3MF_BuildItem * pBuildItem) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItemIterator_GetCurrent (pBuildItemIterator, pBuildItem); +} + + +Lib3MFResult CCall_lib3mf_builditemiterator_clone(Lib3MFHandle libraryHandle, Lib3MF_BuildItemIterator pBuildItemIterator, Lib3MF_BuildItemIterator * pOutBuildItemIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItemIterator_Clone (pBuildItemIterator, pOutBuildItemIterator); +} + + +Lib3MFResult CCall_lib3mf_builditemiterator_count(Lib3MFHandle libraryHandle, Lib3MF_BuildItemIterator pBuildItemIterator, Lib3MF_uint64 * pCount) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_BuildItemIterator_Count (pBuildItemIterator, pCount); +} + + +Lib3MFResult CCall_lib3mf_slice_setvertices(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 nVerticesBufferSize, const sLib3MFPosition2D * pVerticesBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Slice_SetVertices (pSlice, nVerticesBufferSize, pVerticesBuffer); +} + + +Lib3MFResult CCall_lib3mf_slice_getvertices(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, const Lib3MF_uint64 nVerticesBufferSize, Lib3MF_uint64* pVerticesNeededCount, sLib3MFPosition2D * pVerticesBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Slice_GetVertices (pSlice, nVerticesBufferSize, pVerticesNeededCount, pVerticesBuffer); +} + + +Lib3MFResult CCall_lib3mf_slice_getvertexcount(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 * pCount) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Slice_GetVertexCount (pSlice, pCount); +} + + +Lib3MFResult CCall_lib3mf_slice_addpolygon(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 nIndicesBufferSize, const Lib3MF_uint32 * pIndicesBuffer, Lib3MF_uint64 * pIndex) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Slice_AddPolygon (pSlice, nIndicesBufferSize, pIndicesBuffer, pIndex); +} + + +Lib3MFResult CCall_lib3mf_slice_getpolygoncount(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 * pCount) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Slice_GetPolygonCount (pSlice, pCount); +} + + +Lib3MFResult CCall_lib3mf_slice_setpolygonindices(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 nIndex, Lib3MF_uint64 nIndicesBufferSize, const Lib3MF_uint32 * pIndicesBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Slice_SetPolygonIndices (pSlice, nIndex, nIndicesBufferSize, pIndicesBuffer); +} + + +Lib3MFResult CCall_lib3mf_slice_getpolygonindices(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 nIndex, const Lib3MF_uint64 nIndicesBufferSize, Lib3MF_uint64* pIndicesNeededCount, Lib3MF_uint32 * pIndicesBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Slice_GetPolygonIndices (pSlice, nIndex, nIndicesBufferSize, pIndicesNeededCount, pIndicesBuffer); +} + + +Lib3MFResult CCall_lib3mf_slice_getpolygonindexcount(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_uint64 nIndex, Lib3MF_uint64 * pCount) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Slice_GetPolygonIndexCount (pSlice, nIndex, pCount); +} + + +Lib3MFResult CCall_lib3mf_slice_getztop(Lib3MFHandle libraryHandle, Lib3MF_Slice pSlice, Lib3MF_double * pZTop) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Slice_GetZTop (pSlice, pZTop); +} + + +Lib3MFResult CCall_lib3mf_slicestack_getbottomz(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_double * pZBottom) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_SliceStack_GetBottomZ (pSliceStack, pZBottom); +} + + +Lib3MFResult CCall_lib3mf_slicestack_getslicecount(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_uint64 * pCount) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_SliceStack_GetSliceCount (pSliceStack, pCount); +} + + +Lib3MFResult CCall_lib3mf_slicestack_getslice(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_uint64 nSliceIndex, Lib3MF_Slice * pTheSlice) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_SliceStack_GetSlice (pSliceStack, nSliceIndex, pTheSlice); +} + + +Lib3MFResult CCall_lib3mf_slicestack_addslice(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_double dZTop, Lib3MF_Slice * pTheSlice) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_SliceStack_AddSlice (pSliceStack, dZTop, pTheSlice); +} + + +Lib3MFResult CCall_lib3mf_slicestack_getslicerefcount(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_uint64 * pCount) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_SliceStack_GetSliceRefCount (pSliceStack, pCount); +} + + +Lib3MFResult CCall_lib3mf_slicestack_addslicestackreference(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_SliceStack pTheSliceStack) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_SliceStack_AddSliceStackReference (pSliceStack, pTheSliceStack); +} + + +Lib3MFResult CCall_lib3mf_slicestack_getslicestackreference(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, Lib3MF_uint64 nSliceRefIndex, Lib3MF_SliceStack * pTheSliceStack) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_SliceStack_GetSliceStackReference (pSliceStack, nSliceRefIndex, pTheSliceStack); +} + + +Lib3MFResult CCall_lib3mf_slicestack_collapseslicereferences(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_SliceStack_CollapseSliceReferences (pSliceStack); +} + + +Lib3MFResult CCall_lib3mf_slicestack_setownpath(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, const char * pPath) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_SliceStack_SetOwnPath (pSliceStack, pPath); +} + + +Lib3MFResult CCall_lib3mf_slicestack_getownpath(Lib3MFHandle libraryHandle, Lib3MF_SliceStack pSliceStack, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_SliceStack_GetOwnPath (pSliceStack, nPathBufferSize, pPathNeededChars, pPathBuffer); +} + + +Lib3MFResult CCall_lib3mf_consumer_getconsumerid(Lib3MFHandle libraryHandle, Lib3MF_Consumer pConsumer, const Lib3MF_uint32 nConsumerIDBufferSize, Lib3MF_uint32* pConsumerIDNeededChars, char * pConsumerIDBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Consumer_GetConsumerID (pConsumer, nConsumerIDBufferSize, pConsumerIDNeededChars, pConsumerIDBuffer); +} + + +Lib3MFResult CCall_lib3mf_consumer_getkeyid(Lib3MFHandle libraryHandle, Lib3MF_Consumer pConsumer, const Lib3MF_uint32 nKeyIDBufferSize, Lib3MF_uint32* pKeyIDNeededChars, char * pKeyIDBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Consumer_GetKeyID (pConsumer, nKeyIDBufferSize, pKeyIDNeededChars, pKeyIDBuffer); +} + + +Lib3MFResult CCall_lib3mf_consumer_getkeyvalue(Lib3MFHandle libraryHandle, Lib3MF_Consumer pConsumer, const Lib3MF_uint32 nKeyValueBufferSize, Lib3MF_uint32* pKeyValueNeededChars, char * pKeyValueBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Consumer_GetKeyValue (pConsumer, nKeyValueBufferSize, pKeyValueNeededChars, pKeyValueBuffer); +} + + +Lib3MFResult CCall_lib3mf_accessright_getconsumer(Lib3MFHandle libraryHandle, Lib3MF_AccessRight pAccessRight, Lib3MF_Consumer * pConsumer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_AccessRight_GetConsumer (pAccessRight, pConsumer); +} + + +Lib3MFResult CCall_lib3mf_accessright_getwrappingalgorithm(Lib3MFHandle libraryHandle, Lib3MF_AccessRight pAccessRight, eLib3MFWrappingAlgorithm * pAlgorithm) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_AccessRight_GetWrappingAlgorithm (pAccessRight, pAlgorithm); +} + + +Lib3MFResult CCall_lib3mf_accessright_getmgfalgorithm(Lib3MFHandle libraryHandle, Lib3MF_AccessRight pAccessRight, eLib3MFMgfAlgorithm * pAlgorithm) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_AccessRight_GetMgfAlgorithm (pAccessRight, pAlgorithm); +} + + +Lib3MFResult CCall_lib3mf_accessright_getdigestmethod(Lib3MFHandle libraryHandle, Lib3MF_AccessRight pAccessRight, eLib3MFDigestMethod * pAlgorithm) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_AccessRight_GetDigestMethod (pAccessRight, pAlgorithm); +} + + +Lib3MFResult CCall_lib3mf_contentencryptionparams_getencryptionalgorithm(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, eLib3MFEncryptionAlgorithm * pAlgorithm) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ContentEncryptionParams_GetEncryptionAlgorithm (pContentEncryptionParams, pAlgorithm); +} + + +Lib3MFResult CCall_lib3mf_contentencryptionparams_getkey(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, const Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64* pByteDataNeededCount, Lib3MF_uint8 * pByteDataBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ContentEncryptionParams_GetKey (pContentEncryptionParams, nByteDataBufferSize, pByteDataNeededCount, pByteDataBuffer); +} + + +Lib3MFResult CCall_lib3mf_contentencryptionparams_getinitializationvector(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, const Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64* pByteDataNeededCount, Lib3MF_uint8 * pByteDataBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ContentEncryptionParams_GetInitializationVector (pContentEncryptionParams, nByteDataBufferSize, pByteDataNeededCount, pByteDataBuffer); +} + + +Lib3MFResult CCall_lib3mf_contentencryptionparams_getauthenticationtag(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, const Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64* pByteDataNeededCount, Lib3MF_uint8 * pByteDataBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ContentEncryptionParams_GetAuthenticationTag (pContentEncryptionParams, nByteDataBufferSize, pByteDataNeededCount, pByteDataBuffer); +} + + +Lib3MFResult CCall_lib3mf_contentencryptionparams_setauthenticationtag(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, Lib3MF_uint64 nByteDataBufferSize, const Lib3MF_uint8 * pByteDataBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ContentEncryptionParams_SetAuthenticationTag (pContentEncryptionParams, nByteDataBufferSize, pByteDataBuffer); +} + + +Lib3MFResult CCall_lib3mf_contentencryptionparams_getadditionalauthenticationdata(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, const Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64* pByteDataNeededCount, Lib3MF_uint8 * pByteDataBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ContentEncryptionParams_GetAdditionalAuthenticationData (pContentEncryptionParams, nByteDataBufferSize, pByteDataNeededCount, pByteDataBuffer); +} + + +Lib3MFResult CCall_lib3mf_contentencryptionparams_getdescriptor(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, Lib3MF_uint64 * pDescriptor) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ContentEncryptionParams_GetDescriptor (pContentEncryptionParams, pDescriptor); +} + + +Lib3MFResult CCall_lib3mf_contentencryptionparams_getkeyuuid(Lib3MFHandle libraryHandle, Lib3MF_ContentEncryptionParams pContentEncryptionParams, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ContentEncryptionParams_GetKeyUUID (pContentEncryptionParams, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); +} + + +Lib3MFResult CCall_lib3mf_resourcedata_getpath(Lib3MFHandle libraryHandle, Lib3MF_ResourceData pResourceData, Lib3MF_PackagePart * pPath) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ResourceData_GetPath (pResourceData, pPath); +} + + +Lib3MFResult CCall_lib3mf_resourcedata_getencryptionalgorithm(Lib3MFHandle libraryHandle, Lib3MF_ResourceData pResourceData, eLib3MFEncryptionAlgorithm * pEncryptionAlgorithm) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ResourceData_GetEncryptionAlgorithm (pResourceData, pEncryptionAlgorithm); +} + + +Lib3MFResult CCall_lib3mf_resourcedata_getcompression(Lib3MFHandle libraryHandle, Lib3MF_ResourceData pResourceData, eLib3MFCompression * pCompression) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ResourceData_GetCompression (pResourceData, pCompression); +} + + +Lib3MFResult CCall_lib3mf_resourcedata_getadditionalauthenticationdata(Lib3MFHandle libraryHandle, Lib3MF_ResourceData pResourceData, const Lib3MF_uint64 nByteDataBufferSize, Lib3MF_uint64* pByteDataNeededCount, Lib3MF_uint8 * pByteDataBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ResourceData_GetAdditionalAuthenticationData (pResourceData, nByteDataBufferSize, pByteDataNeededCount, pByteDataBuffer); +} + + +Lib3MFResult CCall_lib3mf_resourcedatagroup_getkeyuuid(Lib3MFHandle libraryHandle, Lib3MF_ResourceDataGroup pResourceDataGroup, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ResourceDataGroup_GetKeyUUID (pResourceDataGroup, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); +} + + +Lib3MFResult CCall_lib3mf_resourcedatagroup_addaccessright(Lib3MFHandle libraryHandle, Lib3MF_ResourceDataGroup pResourceDataGroup, Lib3MF_Consumer pConsumer, eLib3MFWrappingAlgorithm eWrappingAlgorithm, eLib3MFMgfAlgorithm eMgfAlgorithm, eLib3MFDigestMethod eDigestMethod, Lib3MF_AccessRight * pTheAccessRight) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ResourceDataGroup_AddAccessRight (pResourceDataGroup, pConsumer, eWrappingAlgorithm, eMgfAlgorithm, eDigestMethod, pTheAccessRight); +} + + +Lib3MFResult CCall_lib3mf_resourcedatagroup_findaccessrightbyconsumer(Lib3MFHandle libraryHandle, Lib3MF_ResourceDataGroup pResourceDataGroup, Lib3MF_Consumer pConsumer, Lib3MF_AccessRight * pTheAccessRight) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ResourceDataGroup_FindAccessRightByConsumer (pResourceDataGroup, pConsumer, pTheAccessRight); +} + + +Lib3MFResult CCall_lib3mf_resourcedatagroup_removeaccessright(Lib3MFHandle libraryHandle, Lib3MF_ResourceDataGroup pResourceDataGroup, Lib3MF_Consumer pConsumer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ResourceDataGroup_RemoveAccessRight (pResourceDataGroup, pConsumer); +} + + +Lib3MFResult CCall_lib3mf_keystore_addconsumer(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, const char * pConsumerID, const char * pKeyID, const char * pKeyValue, Lib3MF_Consumer * pConsumer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_AddConsumer (pKeyStore, pConsumerID, pKeyID, pKeyValue, pConsumer); +} + + +Lib3MFResult CCall_lib3mf_keystore_getconsumercount(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 * pCount) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_GetConsumerCount (pKeyStore, pCount); +} + + +Lib3MFResult CCall_lib3mf_keystore_getconsumer(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 nConsumerIndex, Lib3MF_Consumer * pConsumer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_GetConsumer (pKeyStore, nConsumerIndex, pConsumer); +} + + +Lib3MFResult CCall_lib3mf_keystore_removeconsumer(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_Consumer pConsumer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_RemoveConsumer (pKeyStore, pConsumer); +} + + +Lib3MFResult CCall_lib3mf_keystore_findconsumer(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, const char * pConsumerID, Lib3MF_Consumer * pConsumer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_FindConsumer (pKeyStore, pConsumerID, pConsumer); +} + + +Lib3MFResult CCall_lib3mf_keystore_getresourcedatagroupcount(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 * pCount) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_GetResourceDataGroupCount (pKeyStore, pCount); +} + + +Lib3MFResult CCall_lib3mf_keystore_addresourcedatagroup(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_ResourceDataGroup * pResourceDataGroup) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_AddResourceDataGroup (pKeyStore, pResourceDataGroup); +} + + +Lib3MFResult CCall_lib3mf_keystore_getresourcedatagroup(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 nResourceDataIndex, Lib3MF_ResourceDataGroup * pResourceDataGroup) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_GetResourceDataGroup (pKeyStore, nResourceDataIndex, pResourceDataGroup); +} + + +Lib3MFResult CCall_lib3mf_keystore_removeresourcedatagroup(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_ResourceDataGroup pResourceDataGroup) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_RemoveResourceDataGroup (pKeyStore, pResourceDataGroup); +} + + +Lib3MFResult CCall_lib3mf_keystore_findresourcedatagroup(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_PackagePart pPartPath, Lib3MF_ResourceDataGroup * pResourceDataGroup) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_FindResourceDataGroup (pKeyStore, pPartPath, pResourceDataGroup); +} + + +Lib3MFResult CCall_lib3mf_keystore_addresourcedata(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_ResourceDataGroup pResourceDataGroup, Lib3MF_PackagePart pPartPath, eLib3MFEncryptionAlgorithm eAlgorithm, eLib3MFCompression eCompression, Lib3MF_uint64 nAdditionalAuthenticationDataBufferSize, const Lib3MF_uint8 * pAdditionalAuthenticationDataBuffer, Lib3MF_ResourceData * pResourceData) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_AddResourceData (pKeyStore, pResourceDataGroup, pPartPath, eAlgorithm, eCompression, nAdditionalAuthenticationDataBufferSize, pAdditionalAuthenticationDataBuffer, pResourceData); +} + + +Lib3MFResult CCall_lib3mf_keystore_removeresourcedata(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_ResourceData pResourceData) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_RemoveResourceData (pKeyStore, pResourceData); +} + + +Lib3MFResult CCall_lib3mf_keystore_findresourcedata(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_PackagePart pResourcePath, Lib3MF_ResourceData * pResourceData) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_FindResourceData (pKeyStore, pResourcePath, pResourceData); +} + + +Lib3MFResult CCall_lib3mf_keystore_getresourcedatacount(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 * pCount) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_GetResourceDataCount (pKeyStore, pCount); +} + + +Lib3MFResult CCall_lib3mf_keystore_getresourcedata(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, Lib3MF_uint64 nResourceDataIndex, Lib3MF_ResourceData * pResourceData) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_GetResourceData (pKeyStore, nResourceDataIndex, pResourceData); +} + + +Lib3MFResult CCall_lib3mf_keystore_getuuid(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_GetUUID (pKeyStore, pHasUUID, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); +} + + +Lib3MFResult CCall_lib3mf_keystore_setuuid(Lib3MFHandle libraryHandle, Lib3MF_KeyStore pKeyStore, const char * pUUID) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_KeyStore_SetUUID (pKeyStore, pUUID); +} + + +Lib3MFResult CCall_lib3mf_model_rootmodelpart(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_PackagePart * pRootModelPart) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_RootModelPart (pModel, pRootModelPart); +} + + +Lib3MFResult CCall_lib3mf_model_findorcreatepackagepart(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pAbsolutePath, Lib3MF_PackagePart * pModelPart) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_FindOrCreatePackagePart (pModel, pAbsolutePath, pModelPart); +} + + +Lib3MFResult CCall_lib3mf_model_setunit(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, eLib3MFModelUnit eUnit) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_SetUnit (pModel, eUnit); +} + + +Lib3MFResult CCall_lib3mf_model_getunit(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, eLib3MFModelUnit * pUnit) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetUnit (pModel, pUnit); +} + + +Lib3MFResult CCall_lib3mf_model_getlanguage(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const Lib3MF_uint32 nLanguageBufferSize, Lib3MF_uint32* pLanguageNeededChars, char * pLanguageBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetLanguage (pModel, nLanguageBufferSize, pLanguageNeededChars, pLanguageBuffer); +} + + +Lib3MFResult CCall_lib3mf_model_setlanguage(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pLanguage) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_SetLanguage (pModel, pLanguage); +} + + +Lib3MFResult CCall_lib3mf_model_querywriter(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pWriterClass, Lib3MF_Writer * pWriterInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_QueryWriter (pModel, pWriterClass, pWriterInstance); +} + + +Lib3MFResult CCall_lib3mf_model_queryreader(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pReaderClass, Lib3MF_Reader * pReaderInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_QueryReader (pModel, pReaderClass, pReaderInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getresourcebyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_Resource * pResource) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetResourceByID (pModel, nUniqueResourceID, pResource); +} + + +Lib3MFResult CCall_lib3mf_model_gettexture2dbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_Texture2D * pTextureInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetTexture2DByID (pModel, nUniqueResourceID, pTextureInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getpropertytypebyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, eLib3MFPropertyType * pThePropertyType) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetPropertyTypeByID (pModel, nUniqueResourceID, pThePropertyType); +} + + +Lib3MFResult CCall_lib3mf_model_getbasematerialgroupbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetBaseMaterialGroupByID (pModel, nUniqueResourceID, pBaseMaterialGroupInstance); +} + + +Lib3MFResult CCall_lib3mf_model_gettexture2dgroupbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_Texture2DGroup * pTexture2DGroupInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetTexture2DGroupByID (pModel, nUniqueResourceID, pTexture2DGroupInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getcompositematerialsbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_CompositeMaterials * pCompositeMaterialsInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetCompositeMaterialsByID (pModel, nUniqueResourceID, pCompositeMaterialsInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getmultipropertygroupbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetMultiPropertyGroupByID (pModel, nUniqueResourceID, pMultiPropertyGroupInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getmeshobjectbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_MeshObject * pMeshObjectInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetMeshObjectByID (pModel, nUniqueResourceID, pMeshObjectInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getcomponentsobjectbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ComponentsObject * pComponentsObjectInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetComponentsObjectByID (pModel, nUniqueResourceID, pComponentsObjectInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getcolorgroupbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ColorGroup * pColorGroupInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetColorGroupByID (pModel, nUniqueResourceID, pColorGroupInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getslicestackbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetSliceStackByID (pModel, nUniqueResourceID, pSliceStacInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getlevelsetbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetLevelSetByID (pModel, nUniqueResourceID, pLevelSetObjectInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getbuilduuid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetBuildUUID (pModel, pHasUUID, nUUIDBufferSize, pUUIDNeededChars, pUUIDBuffer); +} + + +Lib3MFResult CCall_lib3mf_model_setbuilduuid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pUUID) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_SetBuildUUID (pModel, pUUID); +} + + +Lib3MFResult CCall_lib3mf_model_getbuilditems(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_BuildItemIterator * pBuildItemIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetBuildItems (pModel, pBuildItemIterator); +} + + +Lib3MFResult CCall_lib3mf_model_getoutbox(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, sLib3MFBox * pOutbox) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetOutbox (pModel, pOutbox); +} + + +Lib3MFResult CCall_lib3mf_model_getresources(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ResourceIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetResources (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_getobjects(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ObjectIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetObjects (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_getmeshobjects(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_MeshObjectIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetMeshObjects (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_getcomponentsobjects(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ComponentsObjectIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetComponentsObjects (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_gettexture2ds(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Texture2DIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetTexture2Ds (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_getbasematerialgroups(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_BaseMaterialGroupIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetBaseMaterialGroups (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_getcolorgroups(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ColorGroupIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetColorGroups (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_gettexture2dgroups(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Texture2DGroupIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetTexture2DGroups (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_getcompositematerials(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_CompositeMaterialsIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetCompositeMaterials (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_getmultipropertygroups(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_MultiPropertyGroupIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetMultiPropertyGroups (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_getslicestacks(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_SliceStackIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetSliceStacks (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_getimage3ds(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Image3DIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetImage3Ds (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_mergetomodel(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Model * pMergedModelInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_MergeToModel (pModel, pMergedModelInstance); +} + + +Lib3MFResult CCall_lib3mf_model_mergefrommodel(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Model pModelInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_MergeFromModel (pModel, pModelInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addmeshobject(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_MeshObject * pMeshObjectInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddMeshObject (pModel, pMeshObjectInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addcomponentsobject(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ComponentsObject * pComponentsObjectInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddComponentsObject (pModel, pComponentsObjectInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addslicestack(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_double dZBottom, Lib3MF_SliceStack * pSliceStackInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddSliceStack (pModel, dZBottom, pSliceStackInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addtexture2dfromattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Attachment pTextureAttachment, Lib3MF_Texture2D * pTexture2DInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddTexture2DFromAttachment (pModel, pTextureAttachment, pTexture2DInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addbasematerialgroup(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddBaseMaterialGroup (pModel, pBaseMaterialGroupInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addcolorgroup(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ColorGroup * pColorGroupInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddColorGroup (pModel, pColorGroupInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addtexture2dgroup(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Texture2D pTexture2DInstance, Lib3MF_Texture2DGroup * pTexture2DGroupInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddTexture2DGroup (pModel, pTexture2DInstance, pTexture2DGroupInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addcompositematerials(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance, Lib3MF_CompositeMaterials * pCompositeMaterialsInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddCompositeMaterials (pModel, pBaseMaterialGroupInstance, pCompositeMaterialsInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addmultipropertygroup(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddMultiPropertyGroup (pModel, pMultiPropertyGroupInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addimagestack(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nColumnCount, Lib3MF_uint32 nRowCount, Lib3MF_uint32 nSheetCount, Lib3MF_ImageStack * pInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddImageStack (pModel, nColumnCount, nRowCount, nSheetCount, pInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getimagestackbyid(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ImageStack * pImageStackInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetImageStackByID (pModel, nUniqueResourceID, pImageStackInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addbuilditem(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Object pObject, const sLib3MFTransform * pTransform, Lib3MF_BuildItem * pBuildItemInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddBuildItem (pModel, pObject, pTransform, pBuildItemInstance); +} + + +Lib3MFResult CCall_lib3mf_model_removebuilditem(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_BuildItem pBuildItemInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_RemoveBuildItem (pModel, pBuildItemInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getmetadatagroup(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_MetaDataGroup * pTheMetaDataGroup) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetMetaDataGroup (pModel, pTheMetaDataGroup); +} + + +Lib3MFResult CCall_lib3mf_model_addattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pURI, const char * pRelationShipType, Lib3MF_Attachment * pAttachmentInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddAttachment (pModel, pURI, pRelationShipType, pAttachmentInstance); +} + + +Lib3MFResult CCall_lib3mf_model_removeattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Attachment pAttachmentInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_RemoveAttachment (pModel, pAttachmentInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pAttachmentInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetAttachment (pModel, nIndex, pAttachmentInstance); +} + + +Lib3MFResult CCall_lib3mf_model_findattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pURI, Lib3MF_Attachment * pAttachmentInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_FindAttachment (pModel, pURI, pAttachmentInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getattachmentcount(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_uint32 * pAttachmentCount) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetAttachmentCount (pModel, pAttachmentCount); +} + + +Lib3MFResult CCall_lib3mf_model_haspackagethumbnailattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, bool * pHasThumbnail) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_HasPackageThumbnailAttachment (pModel, pHasThumbnail); +} + + +Lib3MFResult CCall_lib3mf_model_createpackagethumbnailattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Attachment * pAttachment) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_CreatePackageThumbnailAttachment (pModel, pAttachment); +} + + +Lib3MFResult CCall_lib3mf_model_getpackagethumbnailattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Attachment * pAttachment) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetPackageThumbnailAttachment (pModel, pAttachment); +} + + +Lib3MFResult CCall_lib3mf_model_removepackagethumbnailattachment(Lib3MFHandle libraryHandle, Lib3MF_Model pModel) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_RemovePackageThumbnailAttachment (pModel); +} + + +Lib3MFResult CCall_lib3mf_model_addcustomcontenttype(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pExtension, const char * pContentType) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddCustomContentType (pModel, pExtension, pContentType); +} + + +Lib3MFResult CCall_lib3mf_model_removecustomcontenttype(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, const char * pExtension) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_RemoveCustomContentType (pModel, pExtension); +} + + +Lib3MFResult CCall_lib3mf_model_setrandomnumbercallback(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MFRandomNumberCallback pTheCallback, Lib3MF_pvoid pUserData) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_SetRandomNumberCallback (pModel, pTheCallback, pUserData); +} + + +Lib3MFResult CCall_lib3mf_model_getkeystore(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_KeyStore * pKeyStore) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetKeyStore (pModel, pKeyStore); +} + + +Lib3MFResult CCall_lib3mf_model_getfunctions(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_FunctionIterator * pTheResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetFunctions (pModel, pTheResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_addimplicitfunction(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_ImplicitFunction * pFunctionInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddImplicitFunction (pModel, pFunctionInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addfunctionfromimage3d(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Image3D pImage3DInstance, Lib3MF_FunctionFromImage3D * pFunctionInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddFunctionFromImage3D (pModel, pImage3DInstance, pFunctionInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addvolumedata(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_VolumeData * pVolumeDataInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddVolumeData (pModel, pVolumeDataInstance); +} + + +Lib3MFResult CCall_lib3mf_model_addlevelset(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_LevelSet * pLevelSetInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_AddLevelSet (pModel, pLevelSetInstance); +} + + +Lib3MFResult CCall_lib3mf_model_getlevelsets(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_LevelSetIterator * pResourceIterator) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_GetLevelSets (pModel, pResourceIterator); +} + + +Lib3MFResult CCall_lib3mf_model_removeresource(Lib3MFHandle libraryHandle, Lib3MF_Model pModel, Lib3MF_Resource pResource) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Model_RemoveResource (pModel, pResource); +} + + +Lib3MFResult CCall_lib3mf_getlibraryversion(Lib3MFHandle libraryHandle, Lib3MF_uint32 * pMajor, Lib3MF_uint32 * pMinor, Lib3MF_uint32 * pMicro) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_GetLibraryVersion (pMajor, pMinor, pMicro); +} + + +Lib3MFResult CCall_lib3mf_getprereleaseinformation(Lib3MFHandle libraryHandle, bool * pHasPrereleaseInfo, const Lib3MF_uint32 nPrereleaseInfoBufferSize, Lib3MF_uint32* pPrereleaseInfoNeededChars, char * pPrereleaseInfoBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_GetPrereleaseInformation (pHasPrereleaseInfo, nPrereleaseInfoBufferSize, pPrereleaseInfoNeededChars, pPrereleaseInfoBuffer); +} + + +Lib3MFResult CCall_lib3mf_getbuildinformation(Lib3MFHandle libraryHandle, bool * pHasBuildInfo, const Lib3MF_uint32 nBuildInformationBufferSize, Lib3MF_uint32* pBuildInformationNeededChars, char * pBuildInformationBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_GetBuildInformation (pHasBuildInfo, nBuildInformationBufferSize, pBuildInformationNeededChars, pBuildInformationBuffer); +} + + +Lib3MFResult CCall_lib3mf_getspecificationversion(Lib3MFHandle libraryHandle, const char * pSpecificationURL, bool * pIsSupported, Lib3MF_uint32 * pMajor, Lib3MF_uint32 * pMinor, Lib3MF_uint32 * pMicro) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_GetSpecificationVersion (pSpecificationURL, pIsSupported, pMajor, pMinor, pMicro); +} + + +Lib3MFResult CCall_lib3mf_createmodel(Lib3MFHandle libraryHandle, Lib3MF_Model * pModel) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_CreateModel (pModel); +} + + +Lib3MFResult CCall_lib3mf_release(Lib3MFHandle libraryHandle, Lib3MF_Base pInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Release (pInstance); +} + + +Lib3MFResult CCall_lib3mf_acquire(Lib3MFHandle libraryHandle, Lib3MF_Base pInstance) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_Acquire (pInstance); +} + + +Lib3MFResult CCall_lib3mf_setjournal(Lib3MFHandle libraryHandle, const char * pJournalPath) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_SetJournal (pJournalPath); +} + + +Lib3MFResult CCall_lib3mf_getlasterror(Lib3MFHandle libraryHandle, Lib3MF_Base pInstance, const Lib3MF_uint32 nLastErrorStringBufferSize, Lib3MF_uint32* pLastErrorStringNeededChars, char * pLastErrorStringBuffer, bool * pHasLastError) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_GetLastError (pInstance, nLastErrorStringBufferSize, pLastErrorStringNeededChars, pLastErrorStringBuffer, pHasLastError); +} + + +Lib3MFResult CCall_lib3mf_getsymbollookupmethod(Lib3MFHandle libraryHandle, Lib3MF_pvoid * pSymbolLookupMethod) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_GetSymbolLookupMethod (pSymbolLookupMethod); +} + + +Lib3MFResult CCall_lib3mf_retrieveprogressmessage(Lib3MFHandle libraryHandle, eLib3MFProgressIdentifier eTheProgressIdentifier, const Lib3MF_uint32 nProgressMessageBufferSize, Lib3MF_uint32* pProgressMessageNeededChars, char * pProgressMessageBuffer) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_RetrieveProgressMessage (eTheProgressIdentifier, nProgressMessageBufferSize, pProgressMessageNeededChars, pProgressMessageBuffer); +} + + +Lib3MFResult CCall_lib3mf_rgbatocolor(Lib3MFHandle libraryHandle, Lib3MF_uint8 nRed, Lib3MF_uint8 nGreen, Lib3MF_uint8 nBlue, Lib3MF_uint8 nAlpha, sLib3MFColor * pTheColor) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_RGBAToColor (nRed, nGreen, nBlue, nAlpha, pTheColor); +} + + +Lib3MFResult CCall_lib3mf_floatrgbatocolor(Lib3MFHandle libraryHandle, Lib3MF_single fRed, Lib3MF_single fGreen, Lib3MF_single fBlue, Lib3MF_single fAlpha, sLib3MFColor * pTheColor) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_FloatRGBAToColor (fRed, fGreen, fBlue, fAlpha, pTheColor); +} + + +Lib3MFResult CCall_lib3mf_colortorgba(Lib3MFHandle libraryHandle, const sLib3MFColor * pTheColor, Lib3MF_uint8 * pRed, Lib3MF_uint8 * pGreen, Lib3MF_uint8 * pBlue, Lib3MF_uint8 * pAlpha) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ColorToRGBA (pTheColor, pRed, pGreen, pBlue, pAlpha); +} + + +Lib3MFResult CCall_lib3mf_colortofloatrgba(Lib3MFHandle libraryHandle, const sLib3MFColor * pTheColor, Lib3MF_single * pRed, Lib3MF_single * pGreen, Lib3MF_single * pBlue, Lib3MF_single * pAlpha) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_ColorToFloatRGBA (pTheColor, pRed, pGreen, pBlue, pAlpha); +} + + +Lib3MFResult CCall_lib3mf_getidentitytransform(Lib3MFHandle libraryHandle, sLib3MFTransform * pTransform) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_GetIdentityTransform (pTransform); +} + + +Lib3MFResult CCall_lib3mf_getuniformscaletransform(Lib3MFHandle libraryHandle, Lib3MF_single fFactor, sLib3MFTransform * pTransform) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_GetUniformScaleTransform (fFactor, pTransform); +} + + +Lib3MFResult CCall_lib3mf_getscaletransform(Lib3MFHandle libraryHandle, Lib3MF_single fFactorX, Lib3MF_single fFactorY, Lib3MF_single fFactorZ, sLib3MFTransform * pTransform) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_GetScaleTransform (fFactorX, fFactorY, fFactorZ, pTransform); +} + + +Lib3MFResult CCall_lib3mf_gettranslationtransform(Lib3MFHandle libraryHandle, Lib3MF_single fVectorX, Lib3MF_single fVectorY, Lib3MF_single fVectorZ, sLib3MFTransform * pTransform) +{ + if (libraryHandle == 0) + return LIB3MF_ERROR_INVALIDCAST; + sLib3MFDynamicWrapperTable * wrapperTable = (sLib3MFDynamicWrapperTable *) libraryHandle; + return wrapperTable->m_GetTranslationTransform (fVectorX, fVectorY, fVectorZ, pTransform); +} + +*/ +import "C" + +import ( + "fmt" + "unsafe" + "runtime" +) + +type ref = C.Lib3MFHandle + + +// PropertyType represents a Lib3MF enum. +type PropertyType int + +const ( + PropertyType_NoPropertyType = 0 + PropertyType_BaseMaterial = 1 + PropertyType_TexCoord = 2 + PropertyType_Colors = 3 + PropertyType_Composite = 4 + PropertyType_Multi = 5 +) + +// SlicesMeshResolution represents a Lib3MF enum. +type SlicesMeshResolution int + +const ( + SlicesMeshResolution_Fullres = 0 + SlicesMeshResolution_Lowres = 1 +) + +// ModelUnit represents a Lib3MF enum. +type ModelUnit int + +const ( + ModelUnit_MicroMeter = 0 + ModelUnit_MilliMeter = 1 + ModelUnit_CentiMeter = 2 + ModelUnit_Inch = 3 + ModelUnit_Foot = 4 + ModelUnit_Meter = 5 +) + +// ObjectType represents a Lib3MF enum. +type ObjectType int + +const ( + ObjectType_Other = 0 + ObjectType_Model = 1 + ObjectType_Support = 2 + ObjectType_SolidSupport = 3 +) + +// TextureType represents a Lib3MF enum. +type TextureType int + +const ( + TextureType_Unknown = 0 + TextureType_PNG = 1 + TextureType_JPEG = 2 +) + +// TextureTileStyle represents a Lib3MF enum. +type TextureTileStyle int + +const ( + TextureTileStyle_Wrap = 0 + TextureTileStyle_Mirror = 1 + TextureTileStyle_Clamp = 2 + TextureTileStyle_NoTileStyle = 3 +) + +// TextureFilter represents a Lib3MF enum. +type TextureFilter int + +const ( + TextureFilter_Auto = 0 + TextureFilter_Linear = 1 + TextureFilter_Nearest = 2 +) + +// BeamLatticeCapMode represents a Lib3MF enum. +type BeamLatticeCapMode int + +const ( + BeamLatticeCapMode_Sphere = 0 + BeamLatticeCapMode_HemiSphere = 1 + BeamLatticeCapMode_Butt = 2 +) + +// BeamLatticeClipMode represents a Lib3MF enum. +type BeamLatticeClipMode int + +const ( + BeamLatticeClipMode_NoClipMode = 0 + BeamLatticeClipMode_Inside = 1 + BeamLatticeClipMode_Outside = 2 +) + +// BeamLatticeBallMode represents a Lib3MF enum. +type BeamLatticeBallMode int + +const ( + BeamLatticeBallMode_BeamLatticeBallModeNone = 0 + BeamLatticeBallMode_Mixed = 1 + BeamLatticeBallMode_All = 2 +) + +// ProgressIdentifier represents a Lib3MF enum. +type ProgressIdentifier int + +const ( + ProgressIdentifier_QUERYCANCELED = 0 + ProgressIdentifier_DONE = 1 + ProgressIdentifier_CLEANUP = 2 + ProgressIdentifier_READSTREAM = 3 + ProgressIdentifier_EXTRACTOPCPACKAGE = 4 + ProgressIdentifier_READNONROOTMODELS = 5 + ProgressIdentifier_READROOTMODEL = 6 + ProgressIdentifier_READRESOURCES = 7 + ProgressIdentifier_READMESH = 8 + ProgressIdentifier_READSLICES = 9 + ProgressIdentifier_READBUILD = 10 + ProgressIdentifier_READCUSTOMATTACHMENT = 11 + ProgressIdentifier_READTEXTURETACHMENTS = 12 + ProgressIdentifier_CREATEOPCPACKAGE = 13 + ProgressIdentifier_WRITEMODELSTOSTREAM = 14 + ProgressIdentifier_WRITEROOTMODEL = 15 + ProgressIdentifier_WRITENONROOTMODELS = 16 + ProgressIdentifier_WRITEATTACHMENTS = 17 + ProgressIdentifier_WRITECONTENTTYPES = 18 + ProgressIdentifier_WRITENOBJECTS = 19 + ProgressIdentifier_WRITENODES = 20 + ProgressIdentifier_WRITETRIANGLES = 21 + ProgressIdentifier_WRITESLICES = 22 + ProgressIdentifier_WRITEKEYSTORE = 23 +) + +// BlendMethod represents a Lib3MF enum. +type BlendMethod int + +const ( + BlendMethod_NoBlendMethod = 0 + BlendMethod_Mix = 1 + BlendMethod_Multiply = 2 +) + +// ChannelName represents a Lib3MF enum. +type ChannelName int + +const ( + ChannelName_Red = 0 + ChannelName_Green = 1 + ChannelName_Blue = 2 + ChannelName_Alpha = 3 +) + +// CompositionMethod represents a Lib3MF enum. +type CompositionMethod int + +const ( + CompositionMethod_WeightedSum = 0 + CompositionMethod_Multiply = 1 + CompositionMethod_Min = 2 + CompositionMethod_Max = 3 + CompositionMethod_Mask = 4 +) + +// CompositionSpace represents a Lib3MF enum. +type CompositionSpace int + +const ( + CompositionSpace_Raw = 0 + CompositionSpace_LinearColor = 1 +) + +// ImplicitNodeType represents a Lib3MF enum. +type ImplicitNodeType int + +const ( + ImplicitNodeType_Addition = 1 + ImplicitNodeType_Subtraction = 2 + ImplicitNodeType_Multiplication = 3 + ImplicitNodeType_Division = 4 + ImplicitNodeType_Constant = 5 + ImplicitNodeType_ConstVec = 6 + ImplicitNodeType_ConstMat = 7 + ImplicitNodeType_ComposeVector = 8 + ImplicitNodeType_DecomposeVector = 9 + ImplicitNodeType_ComposeMatrix = 10 + ImplicitNodeType_MatrixFromColumns = 11 + ImplicitNodeType_MatrixFromRows = 12 + ImplicitNodeType_Dot = 13 + ImplicitNodeType_Cross = 14 + ImplicitNodeType_MatVecMultiplication = 15 + ImplicitNodeType_Transpose = 16 + ImplicitNodeType_Inverse = 17 + ImplicitNodeType_Sinus = 18 + ImplicitNodeType_Cosinus = 19 + ImplicitNodeType_Tan = 20 + ImplicitNodeType_ArcSin = 21 + ImplicitNodeType_ArcCos = 22 + ImplicitNodeType_ArcTan = 23 + ImplicitNodeType_ArcTan2 = 24 + ImplicitNodeType_Min = 25 + ImplicitNodeType_Max = 26 + ImplicitNodeType_Abs = 27 + ImplicitNodeType_Fmod = 28 + ImplicitNodeType_Pow = 29 + ImplicitNodeType_Sqrt = 30 + ImplicitNodeType_Exp = 31 + ImplicitNodeType_Log = 32 + ImplicitNodeType_Log2 = 33 + ImplicitNodeType_Log10 = 34 + ImplicitNodeType_Select = 35 + ImplicitNodeType_Clamp = 36 + ImplicitNodeType_Sinh = 37 + ImplicitNodeType_Cosh = 38 + ImplicitNodeType_Tanh = 39 + ImplicitNodeType_Round = 40 + ImplicitNodeType_Ceil = 41 + ImplicitNodeType_Floor = 42 + ImplicitNodeType_Sign = 43 + ImplicitNodeType_Fract = 44 + ImplicitNodeType_FunctionCall = 45 + ImplicitNodeType_Mesh = 46 + ImplicitNodeType_Length = 47 + ImplicitNodeType_ConstResourceID = 48 + ImplicitNodeType_VectorFromScalar = 49 + ImplicitNodeType_UnsignedMesh = 50 + ImplicitNodeType_Mod = 51 +) + +// ImplicitPortType represents a Lib3MF enum. +type ImplicitPortType int + +const ( + ImplicitPortType_Scalar = 1 + ImplicitPortType_Vector = 2 + ImplicitPortType_Matrix = 3 + ImplicitPortType_ResourceID = 4 +) + +// ImplicitNodeConfiguration represents a Lib3MF enum. +type ImplicitNodeConfiguration int + +const ( + ImplicitNodeConfiguration_Default = 1 + ImplicitNodeConfiguration_ScalarToScalar = 2 + ImplicitNodeConfiguration_VectorToVector = 3 + ImplicitNodeConfiguration_MatrixToMatrix = 4 +) + +// EncryptionAlgorithm represents a Lib3MF enum. +type EncryptionAlgorithm int + +const ( + EncryptionAlgorithm_AES256_GCM = 1 +) + +// WrappingAlgorithm represents a Lib3MF enum. +type WrappingAlgorithm int + +const ( + WrappingAlgorithm_RSA_OAEP = 0 +) + +// MgfAlgorithm represents a Lib3MF enum. +type MgfAlgorithm int + +const ( + MgfAlgorithm_MGF1_SHA1 = 160 + MgfAlgorithm_MGF1_SHA224 = 224 + MgfAlgorithm_MGF1_SHA256 = 256 + MgfAlgorithm_MGF1_SHA384 = 384 + MgfAlgorithm_MGF1_SHA512 = 512 +) + +// DigestMethod represents a Lib3MF enum. +type DigestMethod int + +const ( + DigestMethod_SHA1 = 160 + DigestMethod_SHA256 = 256 +) + +// Compression represents a Lib3MF enum. +type Compression int + +const ( + Compression_NoCompression = 0 + Compression_Deflate = 1 +) + +// Triangle represents a Lib3MF struct. +type Triangle struct { + Indices[3] uint32 +} + +// TriangleProperties represents a Lib3MF struct. +type TriangleProperties struct { + ResourceID uint32 + PropertyIDs[3] uint32 +} + +// Position represents a Lib3MF struct. +type Position struct { + Coordinates[3] float32 +} + +// Position2D represents a Lib3MF struct. +type Position2D struct { + Coordinates[2] float32 +} + +// CompositeConstituent represents a Lib3MF struct. +type CompositeConstituent struct { + PropertyID uint32 + MixingRatio float64 +} + +// MultiPropertyLayer represents a Lib3MF struct. +type MultiPropertyLayer struct { + ResourceID uint32 + TheBlendMethod BlendMethod +} + +// Tex2Coord represents a Lib3MF struct. +type Tex2Coord struct { + U float64 + V float64 +} + +// Transform represents a Lib3MF struct. +type Transform struct { + Fields[4][3] float32 +} + +// Box represents a Lib3MF struct. +type Box struct { + MinCoordinate[3] float32 + MaxCoordinate[3] float32 +} + +// Color represents a Lib3MF struct. +type Color struct { + Red uint8 + Green uint8 + Blue uint8 + Alpha uint8 +} + +// Beam represents a Lib3MF struct. +type Beam struct { + Indices[2] uint32 + Radii[2] float64 + CapModes[2] BeamLatticeCapMode +} + +// Ball represents a Lib3MF struct. +type Ball struct { + Index uint32 + Radius float64 +} + +// Vector represents a Lib3MF struct. +type Vector struct { + Coordinates[3] float64 +} + +// Matrix4x4 represents a Lib3MF struct. +type Matrix4x4 struct { + Field[4][4] float64 +} + +// Error constants for Lib3MF. +const LIB3MF_ERROR_NOTIMPLEMENTED = 1; +const LIB3MF_ERROR_INVALIDPARAM = 2; +const LIB3MF_ERROR_INVALIDCAST = 3; +const LIB3MF_ERROR_BUFFERTOOSMALL = 4; +const LIB3MF_ERROR_GENERICEXCEPTION = 5; +const LIB3MF_ERROR_COULDNOTLOADLIBRARY = 6; +const LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT = 7; +const LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION = 8; +const LIB3MF_ERROR_CALCULATIONABORTED = 10; +const LIB3MF_ERROR_SHOULDNOTBECALLED = 11; +const LIB3MF_ERROR_READERCLASSUNKNOWN = 100; +const LIB3MF_ERROR_WRITERCLASSUNKNOWN = 101; +const LIB3MF_ERROR_ITERATORINVALIDINDEX = 102; +const LIB3MF_ERROR_INVALIDMODELRESOURCE = 103; +const LIB3MF_ERROR_RESOURCENOTFOUND = 104; +const LIB3MF_ERROR_INVALIDMODEL = 105; +const LIB3MF_ERROR_INVALIDOBJECT = 106; +const LIB3MF_ERROR_INVALIDMESHOBJECT = 107; +const LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT = 108; +const LIB3MF_ERROR_INVALIDCOMPONENT = 109; +const LIB3MF_ERROR_INVALIDBUILDITEM = 110; +const LIB3MF_ERROR_INVALIDBASEMATERIALGROUP = 111; +const LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE = 112; +const LIB3MF_ERROR_INVALIDTEXTURERESOURCE = 113; +const LIB3MF_ERROR_INVALIDCOLORGROUP = 114; +const LIB3MF_ERROR_INVALIDTEXTURE2DGROUP = 115; +const LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS = 116; +const LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP = 117; +const LIB3MF_ERROR_INVALIDRESOURCEINDEX = 120; +const LIB3MF_ERROR_ATTACHMENTNOTFOUND = 121; +const LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE = 130; +const LIB3MF_ERROR_INVALIDATTACHMENTSTREAM = 131; +const LIB3MF_ERROR_INVALIDPROPERTYCOUNT = 132; +const LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER = 140; +const LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT = 141; +const LIB3MF_ERROR_INVALIDRESOURCE = 142; +const LIB3MF_ERROR_INVALIDLEVELSET = 143; +const LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE = 2000; +const LIB3MF_ERROR_INVALIDKEYSTORE = 3000; +const LIB3MF_ERROR_INVALIDKEYSTORECONSUMER = 3001; +const LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND = 3002; +const LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND = 3003; +const LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED = 3004; +const LIB3MF_ERROR_INVALIDKEYSIZE = 3005; +const LIB3MF_ERROR_INCOMPATIBLEPORTTYPES = 4000; +const LIB3MF_ERROR_GRAPHISCYCLIC = 4001; +const LIB3MF_ERROR_INPUTNOTSET = 4002; +const LIB3MF_ERROR_INVALIDNODECONFIGURATION = 4003; + +// WrappedError is an error that wraps a Lib3MF error. +type WrappedError struct { + Code uint32 + Message string +} + +func (e *WrappedError) Error() string { + return fmt.Sprintf("lib3mf: %s (%d)", e.Message, e.Code) +} + +func errorMessage(errorcode uint32) string { + switch (errorcode) { + case LIB3MF_ERROR_NOTIMPLEMENTED: + return "functionality not implemented"; + case LIB3MF_ERROR_INVALIDPARAM: + return "an invalid parameter was passed"; + case LIB3MF_ERROR_INVALIDCAST: + return "a type cast failed"; + case LIB3MF_ERROR_BUFFERTOOSMALL: + return "a provided buffer is too small"; + case LIB3MF_ERROR_GENERICEXCEPTION: + return "a generic exception occurred"; + case LIB3MF_ERROR_COULDNOTLOADLIBRARY: + return "the library could not be loaded"; + case LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT: + return "a required exported symbol could not be found in the library"; + case LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION: + return "the version of the binary interface does not match the bindings interface"; + case LIB3MF_ERROR_CALCULATIONABORTED: + return "a calculation has been aborted"; + case LIB3MF_ERROR_SHOULDNOTBECALLED: + return "functionality should not be called"; + case LIB3MF_ERROR_READERCLASSUNKNOWN: + return "the queried reader class is unknown"; + case LIB3MF_ERROR_WRITERCLASSUNKNOWN: + return "the queried writer class is unknown"; + case LIB3MF_ERROR_ITERATORINVALIDINDEX: + return "the current index of an iterator is invalid"; + case LIB3MF_ERROR_INVALIDMODELRESOURCE: + return "no Model Resource has been given"; + case LIB3MF_ERROR_RESOURCENOTFOUND: + return "Resource not found"; + case LIB3MF_ERROR_INVALIDMODEL: + return "A model is invalid"; + case LIB3MF_ERROR_INVALIDOBJECT: + return "An object is invalid"; + case LIB3MF_ERROR_INVALIDMESHOBJECT: + return "A mesh object is invalid"; + case LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT: + return "A components object is invalid"; + case LIB3MF_ERROR_INVALIDCOMPONENT: + return "A component is invalid"; + case LIB3MF_ERROR_INVALIDBUILDITEM: + return "A build item is invalid"; + case LIB3MF_ERROR_INVALIDBASEMATERIALGROUP: + return "A basematerialgroup is invalid"; + case LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE: + return "A slicestack resource is invalid"; + case LIB3MF_ERROR_INVALIDTEXTURERESOURCE: + return "A texture resource is invalid"; + case LIB3MF_ERROR_INVALIDCOLORGROUP: + return "A color group resource is invalid"; + case LIB3MF_ERROR_INVALIDTEXTURE2DGROUP: + return "A texture2d group resource is invalid"; + case LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS: + return "A composite materials resource is invalid"; + case LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP: + return "A MultiPropertyGroup resource is invalid"; + case LIB3MF_ERROR_INVALIDRESOURCEINDEX: + return "A resource index is invalid"; + case LIB3MF_ERROR_ATTACHMENTNOTFOUND: + return "Attachment not found"; + case LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE: + return "A component references one of its ancestors"; + case LIB3MF_ERROR_INVALIDATTACHMENTSTREAM: + return "An attachment stream is invalid"; + case LIB3MF_ERROR_INVALIDPROPERTYCOUNT: + return "Invalid property count."; + case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: + return "A progress identifier is unknown"; + case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: + return "An element buffer exceeds its spec limit"; + case LIB3MF_ERROR_INVALIDRESOURCE: + return "A resource is invalid"; + case LIB3MF_ERROR_INVALIDLEVELSET: + return "A level set is invalid"; + case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: + return "This object type is not valid for beamlattices"; + case LIB3MF_ERROR_INVALIDKEYSTORE: + return "The keystore object is invalid"; + case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: + return "The consumer keystore object is invalid"; + case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: + return "A consumer has not been found"; + case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: + return "A resource data has not been found"; + case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: + return "A Key or Conentent encryption callback has not been registered"; + case LIB3MF_ERROR_INVALIDKEYSIZE: + return "The key size is invalid"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: + return "Link could not be added, the port types are incompatible"; + case LIB3MF_ERROR_GRAPHISCYCLIC: + return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case LIB3MF_ERROR_INPUTNOTSET: + return "The input of a node is not set."; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: + return "The selected node configuration is not supported"; + default: + return "unknown"; + } +} + +func makeError(errorcode uint32) error { + return &WrappedError{errorcode, errorMessage(uint32(errorcode))} +} + +// ProgressCallbackFunc a callback function. +type ProgressCallbackFunc = func(abort *bool, progressValue float64, progressIdentifier ProgressIdentifier, userData uintptr) + +var progressCallbackFunc ProgressCallbackFunc + +//export progressCallback +func progressCallback(abort *C.bool, progressValue C.double, progressIdentifier C.eLib3MFProgressIdentifier, userData C.Lib3MF_pvoid) { + if progressCallbackFunc == nil { + return + } + progressCallbackFunc((*bool)(abort), float64(progressValue), ProgressIdentifier(progressIdentifier), uintptr(userData)) +} + +// WriteCallbackFunc callback to call for writing a data chunk. +type WriteCallbackFunc = func(byteData uint64, numBytes uint64, userData uintptr) + +var writeCallbackFunc WriteCallbackFunc + +//export writeCallback +func writeCallback(byteData C.uint64_t, numBytes C.uint64_t, userData C.Lib3MF_pvoid) { + if writeCallbackFunc == nil { + return + } + writeCallbackFunc(uint64(byteData), uint64(numBytes), uintptr(userData)) +} + +// ReadCallbackFunc callback to call for reading a data chunk. +type ReadCallbackFunc = func(byteData uint64, numBytes uint64, userData uintptr) + +var readCallbackFunc ReadCallbackFunc + +//export readCallback +func readCallback(byteData C.uint64_t, numBytes C.uint64_t, userData C.Lib3MF_pvoid) { + if readCallbackFunc == nil { + return + } + readCallbackFunc(uint64(byteData), uint64(numBytes), uintptr(userData)) +} + +// SeekCallbackFunc callback to call for seeking in the stream. +type SeekCallbackFunc = func(position uint64, userData uintptr) + +var seekCallbackFunc SeekCallbackFunc + +//export seekCallback +func seekCallback(position C.uint64_t, userData C.Lib3MF_pvoid) { + if seekCallbackFunc == nil { + return + } + seekCallbackFunc(uint64(position), uintptr(userData)) +} + +// RandomNumberCallbackFunc callback to generate random numbers. +type RandomNumberCallbackFunc = func(byteData uint64, numBytes uint64, userData uintptr, bytesWritten *uint64) + +var randomNumberCallbackFunc RandomNumberCallbackFunc //export randomNumberCallback func randomNumberCallback(byteData C.uint64_t, numBytes C.uint64_t, userData C.Lib3MF_pvoid, bytesWritten *C.uint64_t) { if randomNumberCallbackFunc == nil { return } - randomNumberCallbackFunc(uint64(byteData), uint64(numBytes), uintptr(userData), (*uint64)(bytesWritten)) + randomNumberCallbackFunc(uint64(byteData), uint64(numBytes), uintptr(userData), (*uint64)(bytesWritten)) +} + +// KeyWrappingCallbackFunc a callback used to wrap (encrypt) the content key available in keystore resource group. +type KeyWrappingCallbackFunc = func(kEKParams AccessRight, inBuffer []uint8, outBuffer []uint8, userData uintptr, status *uint64) + +var keyWrappingCallbackFunc KeyWrappingCallbackFunc + +//export keyWrappingCallback +func keyWrappingCallback(kEKParams C.Lib3MF_AccessRight, inBuffer *C.uint8_t, outBuffer *C.uint8_t, userData C.Lib3MF_pvoid, status *C.uint64_t) { + if keyWrappingCallbackFunc == nil { + return + } + keyWrappingCallbackFunc(, ([][]uint8)(unsafe.Pointer(&inBuffer[0])), ([][]uint8)(unsafe.Pointer(&outBuffer[0])), uintptr(userData), (*uint64)(status)) +} + +// ContentEncryptionCallbackFunc a callback to encrypt/decrypt content called on each resource encrypted. This might be called several times depending on content size. If Input is not available(either null or size is 0), clients must return the result of authenticated tag generation/validation. +type ContentEncryptionCallbackFunc = func(cEKParams ContentEncryptionParams, input []uint8, output []uint8, userData uintptr, status *uint64) + +var contentEncryptionCallbackFunc ContentEncryptionCallbackFunc + +//export contentEncryptionCallback +func contentEncryptionCallback(cEKParams C.Lib3MF_ContentEncryptionParams, input *C.uint8_t, output *C.uint8_t, userData C.Lib3MF_pvoid, status *C.uint64_t) { + if contentEncryptionCallbackFunc == nil { + return + } + contentEncryptionCallbackFunc(, ([][]uint8)(unsafe.Pointer(&input[0])), ([][]uint8)(unsafe.Pointer(&output[0])), uintptr(userData), (*uint64)(status)) +} + +// Wrapper represents the number wrapper +type Wrapper struct { + _ [0]func() // uncomparable; to make == not compile + LibraryHandle ref +} + +// Base represents a Lib3MF class. +type Base struct { + _ [0]func() // uncomparable; to make == not compile + Ref ref // identifies a C value, see ref type + wrapperRef Wrapper + gcPtr *ref // used to trigger the finalizer when the Value is not referenced any more +} + +// NewBase creates a new Base. +// The wrapped C pointer will be freed when the Go pointer is finalized, +// but one can release it manually calling Release. +func (wrapper Wrapper) NewBase(r ref) Base { + gcPtr := new(ref) + *gcPtr = r + runtime.SetFinalizer(gcPtr, wrapper.releaseC) + return Base{Ref: r, gcPtr: gcPtr, wrapperRef: wrapper} +} + +// Release releases the C pointer. +func (inst Base) Release() error { + err := inst.wrapperRef.Release(inst) + *inst.gcPtr = nil + return err +} + +// Equal reports whether inst and w refer to the same C pointer. +func (inst Base) Equal(w Base) bool { + return inst.Ref == w.Ref +} +// ClassTypeId get Class Type Id. +func (inst Base) ClassTypeId() (uint64, error) { + var classTypeId C.uint64_t + ret := C.CCall_lib3mf_base_classtypeid(inst.wrapperRef.LibraryHandle, inst.Ref, &classTypeId) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint64(classTypeId), nil +} + + +// Writer represents a Lib3MF class. +type Writer struct { + Base +} + +func (wrapper Wrapper) NewWriter(r ref) Writer { + return Writer{wrapper.NewBase(r)} +} + +// WriteToFile writes out the model as file. The file type is specified by the Model Writer class. +func (inst Writer) WriteToFile(filename string) error { + ret := C.CCall_lib3mf_writer_writetofile(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(filename)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetStreamSize retrieves the size of the full 3MF file stream. +func (inst Writer) GetStreamSize() (uint64, error) { + var streamSize C.uint64_t + ret := C.CCall_lib3mf_writer_getstreamsize(inst.wrapperRef.LibraryHandle, inst.Ref, &streamSize) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint64(streamSize), nil +} + +// WriteToBuffer writes out the 3MF file into a memory buffer. +func (inst Writer) WriteToBuffer(buffer []uint8) ([]uint8, error) { + var neededforbuffer C.uint64_t + ret := C.CCall_lib3mf_writer_writetobuffer(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforbuffer, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(buffer) < int(neededforbuffer) { + buffer = append(buffer, make([]uint8, int(neededforbuffer)-len(buffer))...) + } + ret = C.CCall_lib3mf_writer_writetobuffer(inst.wrapperRef.LibraryHandle, inst.Ref, neededforbuffer, nil, (*C.uint8_t)(unsafe.Pointer(&buffer[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return buffer[:int(neededforbuffer)], nil +} + +// WriteToCallback writes out the model and passes the data to a provided callback function. The file type is specified by the Model Writer class. +func (inst Writer) WriteToCallback(theWriteCallback WriteCallbackFunc, theSeekCallback SeekCallbackFunc, userData uintptr) error { + ret := C.CCall_lib3mf_writer_writetocallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFWriteCallback)(unsafe.Pointer(C.Lib3MFWriteCallback_cgo)), (C.Lib3MFSeekCallback)(unsafe.Pointer(C.Lib3MFSeekCallback_cgo)), (C.Lib3MF_pvoid)(userData)) + if ret != 0 { + return makeError(uint32(ret)) + } + writeCallbackFunc = theWriteCallback + seekCallbackFunc = theSeekCallback + return nil +} + +// SetProgressCallback set the progress callback for calls to this writer. +func (inst Writer) SetProgressCallback(progressCallback ProgressCallbackFunc, userData uintptr) error { + ret := C.CCall_lib3mf_writer_setprogresscallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFProgressCallback)(unsafe.Pointer(C.Lib3MFProgressCallback_cgo)), (C.Lib3MF_pvoid)(userData)) + if ret != 0 { + return makeError(uint32(ret)) + } + progressCallbackFunc = progressCallback + return nil +} + +// GetDecimalPrecision returns the number of digits after the decimal point to be written in each vertex coordinate-value. +func (inst Writer) GetDecimalPrecision() (uint32, error) { + var decimalPrecision C.uint32_t + ret := C.CCall_lib3mf_writer_getdecimalprecision(inst.wrapperRef.LibraryHandle, inst.Ref, &decimalPrecision) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(decimalPrecision), nil +} + +// SetDecimalPrecision sets the number of digits after the decimal point to be written in each vertex coordinate-value. +func (inst Writer) SetDecimalPrecision(decimalPrecision uint32) error { + ret := C.CCall_lib3mf_writer_setdecimalprecision(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(decimalPrecision)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// SetStrictModeActive activates (deactivates) the strict mode of the reader. +func (inst Writer) SetStrictModeActive(strictModeActive bool) error { + ret := C.CCall_lib3mf_writer_setstrictmodeactive(inst.wrapperRef.LibraryHandle, inst.Ref, C.bool(strictModeActive)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetStrictModeActive queries whether the strict mode of the reader is active or not. +func (inst Writer) GetStrictModeActive() (bool, error) { + var strictModeActive C.bool + ret := C.CCall_lib3mf_writer_getstrictmodeactive(inst.wrapperRef.LibraryHandle, inst.Ref, &strictModeActive) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(strictModeActive), nil +} + +// GetWarning returns Warning and Error Information of the read process. +func (inst Writer) GetWarning(index uint32) (uint32, string, error) { + var errorCode C.uint32_t + var neededforwarning C.uint32_t + var filledinwarning C.uint32_t + ret := C.CCall_lib3mf_writer_getwarning(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &errorCode, 0, &neededforwarning, nil) + if ret != 0 { + return 0, "", makeError(uint32(ret)) + } + bufferSizewarning := neededforwarning + bufferwarning := make([]byte, bufferSizewarning) + ret = C.CCall_lib3mf_writer_getwarning(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &errorCode, bufferSizewarning, &filledinwarning, (*C.char)(unsafe.Pointer(&bufferwarning[0]))) + if ret != 0 { + return 0, "", makeError(uint32(ret)) + } + return uint32(errorCode), string(bufferwarning[:(filledinwarning-1)]), nil +} + +// GetWarningCount returns Warning and Error Count of the read process. +func (inst Writer) GetWarningCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_writer_getwarningcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// AddKeyWrappingCallback registers a callback to deal with data key encryption/decryption from keystore. +func (inst Writer) AddKeyWrappingCallback(consumerID string, theCallback KeyWrappingCallbackFunc, userData uintptr) error { + ret := C.CCall_lib3mf_writer_addkeywrappingcallback(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(consumerID)[0])), (C.Lib3MFKeyWrappingCallback)(unsafe.Pointer(C.Lib3MFKeyWrappingCallback_cgo)), (C.Lib3MF_pvoid)(userData)) + if ret != 0 { + return makeError(uint32(ret)) + } + keyWrappingCallbackFunc = theCallback + return nil +} + +// SetContentEncryptionCallback registers a callback to deal with encryption of content. +func (inst Writer) SetContentEncryptionCallback(theCallback ContentEncryptionCallbackFunc, userData uintptr) error { + ret := C.CCall_lib3mf_writer_setcontentencryptioncallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFContentEncryptionCallback)(unsafe.Pointer(C.Lib3MFContentEncryptionCallback_cgo)), (C.Lib3MF_pvoid)(userData)) + if ret != 0 { + return makeError(uint32(ret)) + } + contentEncryptionCallbackFunc = theCallback + return nil +} + + +// Reader represents a Lib3MF class. +type Reader struct { + Base +} + +func (wrapper Wrapper) NewReader(r ref) Reader { + return Reader{wrapper.NewBase(r)} +} + +// ReadFromFile reads a model from a file. The file type is specified by the Model Reader class. +func (inst Reader) ReadFromFile(filename string) error { + ret := C.CCall_lib3mf_reader_readfromfile(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(filename)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// ReadFromBuffer reads a model from a memory buffer. +func (inst Reader) ReadFromBuffer(buffer []uint8) error { + ret := C.CCall_lib3mf_reader_readfrombuffer(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(buffer)), (*C.uint8_t)(unsafe.Pointer(&buffer[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// ReadFromCallback reads a model and from the data provided by a callback function. +func (inst Reader) ReadFromCallback(theReadCallback ReadCallbackFunc, streamSize uint64, theSeekCallback SeekCallbackFunc, userData uintptr) error { + ret := C.CCall_lib3mf_reader_readfromcallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFReadCallback)(unsafe.Pointer(C.Lib3MFReadCallback_cgo)), C.uint64_t(streamSize), (C.Lib3MFSeekCallback)(unsafe.Pointer(C.Lib3MFSeekCallback_cgo)), (C.Lib3MF_pvoid)(userData)) + if ret != 0 { + return makeError(uint32(ret)) + } + readCallbackFunc = theReadCallback + seekCallbackFunc = theSeekCallback + return nil +} + +// SetProgressCallback set the progress callback for calls to this writer. +func (inst Reader) SetProgressCallback(progressCallback ProgressCallbackFunc, userData uintptr) error { + ret := C.CCall_lib3mf_reader_setprogresscallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFProgressCallback)(unsafe.Pointer(C.Lib3MFProgressCallback_cgo)), (C.Lib3MF_pvoid)(userData)) + if ret != 0 { + return makeError(uint32(ret)) + } + progressCallbackFunc = progressCallback + return nil +} + +// AddRelationToRead adds a relationship type which shall be read as attachment in memory while loading. +func (inst Reader) AddRelationToRead(relationShipType string) error { + ret := C.CCall_lib3mf_reader_addrelationtoread(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(relationShipType)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// RemoveRelationToRead removes a relationship type which shall be read as attachment in memory while loading. +func (inst Reader) RemoveRelationToRead(relationShipType string) error { + ret := C.CCall_lib3mf_reader_removerelationtoread(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(relationShipType)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// SetStrictModeActive activates (deactivates) the strict mode of the reader. +func (inst Reader) SetStrictModeActive(strictModeActive bool) error { + ret := C.CCall_lib3mf_reader_setstrictmodeactive(inst.wrapperRef.LibraryHandle, inst.Ref, C.bool(strictModeActive)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetStrictModeActive queries whether the strict mode of the reader is active or not. +func (inst Reader) GetStrictModeActive() (bool, error) { + var strictModeActive C.bool + ret := C.CCall_lib3mf_reader_getstrictmodeactive(inst.wrapperRef.LibraryHandle, inst.Ref, &strictModeActive) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(strictModeActive), nil +} + +// GetWarning returns Warning and Error Information of the read process. +func (inst Reader) GetWarning(index uint32) (uint32, string, error) { + var errorCode C.uint32_t + var neededforwarning C.uint32_t + var filledinwarning C.uint32_t + ret := C.CCall_lib3mf_reader_getwarning(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &errorCode, 0, &neededforwarning, nil) + if ret != 0 { + return 0, "", makeError(uint32(ret)) + } + bufferSizewarning := neededforwarning + bufferwarning := make([]byte, bufferSizewarning) + ret = C.CCall_lib3mf_reader_getwarning(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &errorCode, bufferSizewarning, &filledinwarning, (*C.char)(unsafe.Pointer(&bufferwarning[0]))) + if ret != 0 { + return 0, "", makeError(uint32(ret)) + } + return uint32(errorCode), string(bufferwarning[:(filledinwarning-1)]), nil +} + +// GetWarningCount returns Warning and Error Count of the read process. +func (inst Reader) GetWarningCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_reader_getwarningcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// AddKeyWrappingCallback registers a callback to deal with key wrapping mechanism from keystore. +func (inst Reader) AddKeyWrappingCallback(consumerID string, theCallback KeyWrappingCallbackFunc, userData uintptr) error { + ret := C.CCall_lib3mf_reader_addkeywrappingcallback(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(consumerID)[0])), (C.Lib3MFKeyWrappingCallback)(unsafe.Pointer(C.Lib3MFKeyWrappingCallback_cgo)), (C.Lib3MF_pvoid)(userData)) + if ret != 0 { + return makeError(uint32(ret)) + } + keyWrappingCallbackFunc = theCallback + return nil +} + +// SetContentEncryptionCallback registers a callback to deal with encryption of content. +func (inst Reader) SetContentEncryptionCallback(theCallback ContentEncryptionCallbackFunc, userData uintptr) error { + ret := C.CCall_lib3mf_reader_setcontentencryptioncallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFContentEncryptionCallback)(unsafe.Pointer(C.Lib3MFContentEncryptionCallback_cgo)), (C.Lib3MF_pvoid)(userData)) + if ret != 0 { + return makeError(uint32(ret)) + } + contentEncryptionCallbackFunc = theCallback + return nil +} + + +// PackagePart represents a Lib3MF class. +type PackagePart struct { + Base +} + +func (wrapper Wrapper) NewPackagePart(r ref) PackagePart { + return PackagePart{wrapper.NewBase(r)} +} + +// GetPath returns the absolute path of this PackagePart. +func (inst PackagePart) GetPath() (string, error) { + var neededforpath C.uint32_t + var filledinpath C.uint32_t + ret := C.CCall_lib3mf_packagepart_getpath(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpath, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizepath := neededforpath + bufferpath := make([]byte, bufferSizepath) + ret = C.CCall_lib3mf_packagepart_getpath(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizepath, &filledinpath, (*C.char)(unsafe.Pointer(&bufferpath[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferpath[:(filledinpath-1)]), nil +} + +// SetPath sets the absolute path of this PackagePart. +func (inst PackagePart) SetPath(path string) error { + ret := C.CCall_lib3mf_packagepart_setpath(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(path)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + + +// Resource represents a Lib3MF class. +type Resource struct { + Base +} + +func (wrapper Wrapper) NewResource(r ref) Resource { + return Resource{wrapper.NewBase(r)} +} + +// GetResourceID retrieves the unique id of this resource within a package. This function will be removed in a later release in favor of GetUniqueResourceID. +func (inst Resource) GetResourceID() (uint32, error) { + var uniqueResourceID C.uint32_t + ret := C.CCall_lib3mf_resource_getresourceid(inst.wrapperRef.LibraryHandle, inst.Ref, &uniqueResourceID) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(uniqueResourceID), nil +} + +// GetUniqueResourceID retrieves the unique id of this resource within a package. +func (inst Resource) GetUniqueResourceID() (uint32, error) { + var uniqueResourceID C.uint32_t + ret := C.CCall_lib3mf_resource_getuniqueresourceid(inst.wrapperRef.LibraryHandle, inst.Ref, &uniqueResourceID) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(uniqueResourceID), nil +} + +// PackagePart returns the PackagePart within which this resource resides. +func (inst Resource) PackagePart() (PackagePart, error) { + var packagePart ref + ret := C.CCall_lib3mf_resource_packagepart(inst.wrapperRef.LibraryHandle, inst.Ref, &packagePart) + if ret != 0 { + return PackagePart{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewPackagePart(packagePart), nil +} + +// SetPackagePart sets the new PackagePart within which this resource resides. +func (inst Resource) SetPackagePart(packagePart PackagePart) error { + ret := C.CCall_lib3mf_resource_setpackagepart(inst.wrapperRef.LibraryHandle, inst.Ref, packagePart.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetModelResourceID retrieves the id of this resource within a model. +func (inst Resource) GetModelResourceID() (uint32, error) { + var modelResourceId C.uint32_t + ret := C.CCall_lib3mf_resource_getmodelresourceid(inst.wrapperRef.LibraryHandle, inst.Ref, &modelResourceId) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(modelResourceId), nil +} + + +// ResourceIterator represents a Lib3MF class. +type ResourceIterator struct { + Base +} + +func (wrapper Wrapper) NewResourceIterator(r ref) ResourceIterator { + return ResourceIterator{wrapper.NewBase(r)} +} + +// MoveNext iterates to the next resource in the list. +func (inst ResourceIterator) MoveNext() (bool, error) { + var hasNext C.bool + ret := C.CCall_lib3mf_resourceiterator_movenext(inst.wrapperRef.LibraryHandle, inst.Ref, &hasNext) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(hasNext), nil +} + +// MovePrevious iterates to the previous resource in the list. +func (inst ResourceIterator) MovePrevious() (bool, error) { + var hasPrevious C.bool + ret := C.CCall_lib3mf_resourceiterator_moveprevious(inst.wrapperRef.LibraryHandle, inst.Ref, &hasPrevious) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(hasPrevious), nil +} + +// GetCurrent returns the resource the iterator points at. +func (inst ResourceIterator) GetCurrent() (Resource, error) { + var resource ref + ret := C.CCall_lib3mf_resourceiterator_getcurrent(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return Resource{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewResource(resource), nil +} + +// Clone creates a new resource iterator with the same resource list. +func (inst ResourceIterator) Clone() (ResourceIterator, error) { + var outResourceIterator ref + ret := C.CCall_lib3mf_resourceiterator_clone(inst.wrapperRef.LibraryHandle, inst.Ref, &outResourceIterator) + if ret != 0 { + return ResourceIterator{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewResourceIterator(outResourceIterator), nil +} + +// Count returns the number of resoucres the iterator captures. +func (inst ResourceIterator) Count() (uint64, error) { + var count C.uint64_t + ret := C.CCall_lib3mf_resourceiterator_count(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint64(count), nil +} + + +// SliceStackIterator represents a Lib3MF class. +type SliceStackIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewSliceStackIterator(r ref) SliceStackIterator { + return SliceStackIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentSliceStack returns the SliceStack the iterator points at. +func (inst SliceStackIterator) GetCurrentSliceStack() (SliceStack, error) { + var resource ref + ret := C.CCall_lib3mf_slicestackiterator_getcurrentslicestack(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return SliceStack{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewSliceStack(resource), nil +} + + +// ObjectIterator represents a Lib3MF class. +type ObjectIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewObjectIterator(r ref) ObjectIterator { + return ObjectIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentObject returns the Object the iterator points at. +func (inst ObjectIterator) GetCurrentObject() (Object, error) { + var resource ref + ret := C.CCall_lib3mf_objectiterator_getcurrentobject(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return Object{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewObject(resource), nil +} + + +// MeshObjectIterator represents a Lib3MF class. +type MeshObjectIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewMeshObjectIterator(r ref) MeshObjectIterator { + return MeshObjectIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentMeshObject returns the MeshObject the iterator points at. +func (inst MeshObjectIterator) GetCurrentMeshObject() (MeshObject, error) { + var resource ref + ret := C.CCall_lib3mf_meshobjectiterator_getcurrentmeshobject(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return MeshObject{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewMeshObject(resource), nil +} + + +// ComponentsObjectIterator represents a Lib3MF class. +type ComponentsObjectIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewComponentsObjectIterator(r ref) ComponentsObjectIterator { + return ComponentsObjectIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentComponentsObject returns the ComponentsObject the iterator points at. +func (inst ComponentsObjectIterator) GetCurrentComponentsObject() (ComponentsObject, error) { + var resource ref + ret := C.CCall_lib3mf_componentsobjectiterator_getcurrentcomponentsobject(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return ComponentsObject{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewComponentsObject(resource), nil +} + + +// Texture2DIterator represents a Lib3MF class. +type Texture2DIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewTexture2DIterator(r ref) Texture2DIterator { + return Texture2DIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentTexture2D returns the Texture2D the iterator points at. +func (inst Texture2DIterator) GetCurrentTexture2D() (Texture2D, error) { + var resource ref + ret := C.CCall_lib3mf_texture2diterator_getcurrenttexture2d(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return Texture2D{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewTexture2D(resource), nil +} + + +// BaseMaterialGroupIterator represents a Lib3MF class. +type BaseMaterialGroupIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewBaseMaterialGroupIterator(r ref) BaseMaterialGroupIterator { + return BaseMaterialGroupIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentBaseMaterialGroup returns the MaterialGroup the iterator points at. +func (inst BaseMaterialGroupIterator) GetCurrentBaseMaterialGroup() (BaseMaterialGroup, error) { + var resource ref + ret := C.CCall_lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return BaseMaterialGroup{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewBaseMaterialGroup(resource), nil +} + + +// ColorGroupIterator represents a Lib3MF class. +type ColorGroupIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewColorGroupIterator(r ref) ColorGroupIterator { + return ColorGroupIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentColorGroup returns the ColorGroup the iterator points at. +func (inst ColorGroupIterator) GetCurrentColorGroup() (ColorGroup, error) { + var resource ref + ret := C.CCall_lib3mf_colorgroupiterator_getcurrentcolorgroup(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return ColorGroup{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewColorGroup(resource), nil +} + + +// Texture2DGroupIterator represents a Lib3MF class. +type Texture2DGroupIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewTexture2DGroupIterator(r ref) Texture2DGroupIterator { + return Texture2DGroupIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentTexture2DGroup returns the Texture2DGroup the iterator points at. +func (inst Texture2DGroupIterator) GetCurrentTexture2DGroup() (Texture2DGroup, error) { + var resource ref + ret := C.CCall_lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return Texture2DGroup{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewTexture2DGroup(resource), nil +} + + +// CompositeMaterialsIterator represents a Lib3MF class. +type CompositeMaterialsIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewCompositeMaterialsIterator(r ref) CompositeMaterialsIterator { + return CompositeMaterialsIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentCompositeMaterials returns the CompositeMaterials the iterator points at. +func (inst CompositeMaterialsIterator) GetCurrentCompositeMaterials() (CompositeMaterials, error) { + var resource ref + ret := C.CCall_lib3mf_compositematerialsiterator_getcurrentcompositematerials(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return CompositeMaterials{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewCompositeMaterials(resource), nil +} + + +// MultiPropertyGroupIterator represents a Lib3MF class. +type MultiPropertyGroupIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewMultiPropertyGroupIterator(r ref) MultiPropertyGroupIterator { + return MultiPropertyGroupIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentMultiPropertyGroup returns the MultiPropertyGroup the iterator points at. +func (inst MultiPropertyGroupIterator) GetCurrentMultiPropertyGroup() (MultiPropertyGroup, error) { + var resource ref + ret := C.CCall_lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return MultiPropertyGroup{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewMultiPropertyGroup(resource), nil +} + + +// Image3DIterator represents a Lib3MF class. +type Image3DIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewImage3DIterator(r ref) Image3DIterator { + return Image3DIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentImage3D returns the Image3D the iterator points at. +func (inst Image3DIterator) GetCurrentImage3D() (Image3D, error) { + var resource ref + ret := C.CCall_lib3mf_image3diterator_getcurrentimage3d(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return Image3D{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImage3D(resource), nil +} + + +// FunctionIterator represents a Lib3MF class. +type FunctionIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewFunctionIterator(r ref) FunctionIterator { + return FunctionIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentFunction returns the Function the iterator points at. +func (inst FunctionIterator) GetCurrentFunction() (Function, error) { + var resource ref + ret := C.CCall_lib3mf_functioniterator_getcurrentfunction(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return Function{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewFunction(resource), nil +} + + +// LevelSetIterator represents a Lib3MF class. +type LevelSetIterator struct { + ResourceIterator +} + +func (wrapper Wrapper) NewLevelSetIterator(r ref) LevelSetIterator { + return LevelSetIterator{wrapper.NewResourceIterator(r)} +} + +// GetCurrentLevelSet returns the LevelSet the iterator points at. +func (inst LevelSetIterator) GetCurrentLevelSet() (LevelSet, error) { + var resource ref + ret := C.CCall_lib3mf_levelsetiterator_getcurrentlevelset(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) + if ret != 0 { + return LevelSet{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewLevelSet(resource), nil +} + + +// MetaData represents a Lib3MF class. +type MetaData struct { + Base +} + +func (wrapper Wrapper) NewMetaData(r ref) MetaData { + return MetaData{wrapper.NewBase(r)} +} + +// GetNameSpace returns the namespace URL of the metadata. +func (inst MetaData) GetNameSpace() (string, error) { + var neededfornameSpace C.uint32_t + var filledinnameSpace C.uint32_t + ret := C.CCall_lib3mf_metadata_getnamespace(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededfornameSpace, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizenameSpace := neededfornameSpace + buffernameSpace := make([]byte, bufferSizenameSpace) + ret = C.CCall_lib3mf_metadata_getnamespace(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizenameSpace, &filledinnameSpace, (*C.char)(unsafe.Pointer(&buffernameSpace[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(buffernameSpace[:(filledinnameSpace-1)]), nil +} + +// SetNameSpace sets a new namespace URL of the metadata. +func (inst MetaData) SetNameSpace(nameSpace string) error { + ret := C.CCall_lib3mf_metadata_setnamespace(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(nameSpace)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetName returns the name of a metadata. +func (inst MetaData) GetName() (string, error) { + var neededforname C.uint32_t + var filledinname C.uint32_t + ret := C.CCall_lib3mf_metadata_getname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforname, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizename := neededforname + buffername := make([]byte, bufferSizename) + ret = C.CCall_lib3mf_metadata_getname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizename, &filledinname, (*C.char)(unsafe.Pointer(&buffername[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(buffername[:(filledinname-1)]), nil +} + +// SetName sets a new name of a metadata. +func (inst MetaData) SetName(name string) error { + ret := C.CCall_lib3mf_metadata_setname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(name)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetKey returns the (namespace+name) of a metadata. +func (inst MetaData) GetKey() (string, error) { + var neededforkey C.uint32_t + var filledinkey C.uint32_t + ret := C.CCall_lib3mf_metadata_getkey(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforkey, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizekey := neededforkey + bufferkey := make([]byte, bufferSizekey) + ret = C.CCall_lib3mf_metadata_getkey(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizekey, &filledinkey, (*C.char)(unsafe.Pointer(&bufferkey[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferkey[:(filledinkey-1)]), nil +} + +// GetMustPreserve returns, whether a metadata must be preserved. +func (inst MetaData) GetMustPreserve() (bool, error) { + var mustPreserve C.bool + ret := C.CCall_lib3mf_metadata_getmustpreserve(inst.wrapperRef.LibraryHandle, inst.Ref, &mustPreserve) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(mustPreserve), nil +} + +// SetMustPreserve sets whether a metadata must be preserved. +func (inst MetaData) SetMustPreserve(mustPreserve bool) error { + ret := C.CCall_lib3mf_metadata_setmustpreserve(inst.wrapperRef.LibraryHandle, inst.Ref, C.bool(mustPreserve)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetType returns the type of a metadata. +func (inst MetaData) GetType() (string, error) { + var neededfor_type C.uint32_t + var filledin_type C.uint32_t + ret := C.CCall_lib3mf_metadata_gettype(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededfor_type, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSize_type := neededfor_type + buffer_type := make([]byte, bufferSize_type) + ret = C.CCall_lib3mf_metadata_gettype(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSize_type, &filledin_type, (*C.char)(unsafe.Pointer(&buffer_type[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(buffer_type[:(filledin_type-1)]), nil +} + +// SetType sets a new type of a metadata. This must be a simple XML type. +func (inst MetaData) SetType(_type string) error { + ret := C.CCall_lib3mf_metadata_settype(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(_type)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetValue returns the value of the metadata. +func (inst MetaData) GetValue() (string, error) { + var neededforvalue C.uint32_t + var filledinvalue C.uint32_t + ret := C.CCall_lib3mf_metadata_getvalue(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforvalue, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizevalue := neededforvalue + buffervalue := make([]byte, bufferSizevalue) + ret = C.CCall_lib3mf_metadata_getvalue(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizevalue, &filledinvalue, (*C.char)(unsafe.Pointer(&buffervalue[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(buffervalue[:(filledinvalue-1)]), nil +} + +// SetValue sets a new value of the metadata. +func (inst MetaData) SetValue(value string) error { + ret := C.CCall_lib3mf_metadata_setvalue(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(value)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + + +// MetaDataGroup represents a Lib3MF class. +type MetaDataGroup struct { + Base +} + +func (wrapper Wrapper) NewMetaDataGroup(r ref) MetaDataGroup { + return MetaDataGroup{wrapper.NewBase(r)} +} + +// GetMetaDataCount returns the number of metadata in this metadatagroup. +func (inst MetaDataGroup) GetMetaDataCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_metadatagroup_getmetadatacount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// GetMetaData returns a metadata value within this metadatagroup. +func (inst MetaDataGroup) GetMetaData(index uint32) (MetaData, error) { + var metaData ref + ret := C.CCall_lib3mf_metadatagroup_getmetadata(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &metaData) + if ret != 0 { + return MetaData{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewMetaData(metaData), nil +} + +// GetMetaDataByKey returns a metadata value within this metadatagroup. +func (inst MetaDataGroup) GetMetaDataByKey(nameSpace string, name string) (MetaData, error) { + var metaData ref + ret := C.CCall_lib3mf_metadatagroup_getmetadatabykey(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(nameSpace)[0])), (*C.char)(unsafe.Pointer(&[]byte(name)[0])), &metaData) + if ret != 0 { + return MetaData{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewMetaData(metaData), nil +} + +// RemoveMetaDataByIndex removes metadata by index from the model. +func (inst MetaDataGroup) RemoveMetaDataByIndex(index uint32) error { + ret := C.CCall_lib3mf_metadatagroup_removemetadatabyindex(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// RemoveMetaData removes metadata from the model. +func (inst MetaDataGroup) RemoveMetaData(theMetaData MetaData) error { + ret := C.CCall_lib3mf_metadatagroup_removemetadata(inst.wrapperRef.LibraryHandle, inst.Ref, theMetaData.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// AddMetaData adds a new metadata to this metadatagroup. +func (inst MetaDataGroup) AddMetaData(nameSpace string, name string, value string, _type string, mustPreserve bool) (MetaData, error) { + var metaData ref + ret := C.CCall_lib3mf_metadatagroup_addmetadata(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(nameSpace)[0])), (*C.char)(unsafe.Pointer(&[]byte(name)[0])), (*C.char)(unsafe.Pointer(&[]byte(value)[0])), (*C.char)(unsafe.Pointer(&[]byte(_type)[0])), C.bool(mustPreserve), &metaData) + if ret != 0 { + return MetaData{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewMetaData(metaData), nil +} + + +// Object represents a Lib3MF class. +type Object struct { + Resource +} + +func (wrapper Wrapper) NewObject(r ref) Object { + return Object{wrapper.NewResource(r)} +} + +// GetType retrieves an object's type. +func (inst Object) GetType() (ObjectType, error) { + var objectType C.eLib3MFObjectType + ret := C.CCall_lib3mf_object_gettype(inst.wrapperRef.LibraryHandle, inst.Ref, &objectType) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return ObjectType(objectType), nil +} + +// SetType sets an object's type. +func (inst Object) SetType(objectType ObjectType) error { + ret := C.CCall_lib3mf_object_settype(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFObjectType(objectType)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetName retrieves an object's name. +func (inst Object) GetName() (string, error) { + var neededforname C.uint32_t + var filledinname C.uint32_t + ret := C.CCall_lib3mf_object_getname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforname, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizename := neededforname + buffername := make([]byte, bufferSizename) + ret = C.CCall_lib3mf_object_getname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizename, &filledinname, (*C.char)(unsafe.Pointer(&buffername[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(buffername[:(filledinname-1)]), nil +} + +// SetName sets an object's name string. +func (inst Object) SetName(name string) error { + ret := C.CCall_lib3mf_object_setname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(name)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetPartNumber retrieves an object's part number. +func (inst Object) GetPartNumber() (string, error) { + var neededforpartNumber C.uint32_t + var filledinpartNumber C.uint32_t + ret := C.CCall_lib3mf_object_getpartnumber(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpartNumber, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizepartNumber := neededforpartNumber + bufferpartNumber := make([]byte, bufferSizepartNumber) + ret = C.CCall_lib3mf_object_getpartnumber(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizepartNumber, &filledinpartNumber, (*C.char)(unsafe.Pointer(&bufferpartNumber[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferpartNumber[:(filledinpartNumber-1)]), nil +} + +// SetPartNumber sets an objects partnumber string. +func (inst Object) SetPartNumber(partNumber string) error { + ret := C.CCall_lib3mf_object_setpartnumber(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(partNumber)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// IsMeshObject retrieves, if an object is a mesh object. +func (inst Object) IsMeshObject() (bool, error) { + var isMeshObject C.bool + ret := C.CCall_lib3mf_object_ismeshobject(inst.wrapperRef.LibraryHandle, inst.Ref, &isMeshObject) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(isMeshObject), nil +} + +// IsComponentsObject retrieves, if an object is a components object. +func (inst Object) IsComponentsObject() (bool, error) { + var isComponentsObject C.bool + ret := C.CCall_lib3mf_object_iscomponentsobject(inst.wrapperRef.LibraryHandle, inst.Ref, &isComponentsObject) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(isComponentsObject), nil +} + +// IsLevelSetObject retrieves, if an object is a level set object. +func (inst Object) IsLevelSetObject() (bool, error) { + var isLevelSetObject C.bool + ret := C.CCall_lib3mf_object_islevelsetobject(inst.wrapperRef.LibraryHandle, inst.Ref, &isLevelSetObject) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(isLevelSetObject), nil +} + +// IsValid retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. +func (inst Object) IsValid() (bool, error) { + var isValid C.bool + ret := C.CCall_lib3mf_object_isvalid(inst.wrapperRef.LibraryHandle, inst.Ref, &isValid) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(isValid), nil +} + +// SetAttachmentAsThumbnail use an existing attachment as thumbnail for this object. +func (inst Object) SetAttachmentAsThumbnail(attachment Attachment) error { + ret := C.CCall_lib3mf_object_setattachmentasthumbnail(inst.wrapperRef.LibraryHandle, inst.Ref, attachment.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetThumbnailAttachment get the attachment containing the object thumbnail. +func (inst Object) GetThumbnailAttachment() (*Attachment, error) { + var attachment ref + ret := C.CCall_lib3mf_object_getthumbnailattachment(inst.wrapperRef.LibraryHandle, inst.Ref, &attachment) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + var _attachmentPtr *Attachment + if attachment != nil { + _attachmentPtrVal := inst.wrapperRef.NewAttachment(attachment) + _attachmentPtr = &_attachmentPtrVal + } + return _attachmentPtr, nil +} + +// ClearThumbnailAttachment clears the attachment. The attachment instance is not removed from the package. +func (inst Object) ClearThumbnailAttachment() error { + ret := C.CCall_lib3mf_object_clearthumbnailattachment(inst.wrapperRef.LibraryHandle, inst.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetOutbox returns the outbox of a build item. +func (inst Object) GetOutbox() (Box, error) { + var outbox C.sLib3MFBox + ret := C.CCall_lib3mf_object_getoutbox(inst.wrapperRef.LibraryHandle, inst.Ref, &outbox) + if ret != 0 { + return Box{}, makeError(uint32(ret)) + } + return *(*Box)(unsafe.Pointer(&outbox)), nil +} + +// GetUUID retrieves an object's uuid string (see production extension specification). +func (inst Object) GetUUID() (bool, string, error) { + var hasUUID C.bool + var neededforuUID C.uint32_t + var filledinuUID C.uint32_t + ret := C.CCall_lib3mf_object_getuuid(inst.wrapperRef.LibraryHandle, inst.Ref, &hasUUID, 0, &neededforuUID, nil) + if ret != 0 { + return false, "", makeError(uint32(ret)) + } + bufferSizeuUID := neededforuUID + bufferuUID := make([]byte, bufferSizeuUID) + ret = C.CCall_lib3mf_object_getuuid(inst.wrapperRef.LibraryHandle, inst.Ref, &hasUUID, bufferSizeuUID, &filledinuUID, (*C.char)(unsafe.Pointer(&bufferuUID[0]))) + if ret != 0 { + return false, "", makeError(uint32(ret)) + } + return bool(hasUUID), string(bufferuUID[:(filledinuUID-1)]), nil +} + +// SetUUID sets a build object's uuid string (see production extension specification). +func (inst Object) SetUUID(uUID string) error { + ret := C.CCall_lib3mf_object_setuuid(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(uUID)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetMetaDataGroup returns the metadatagroup of this object. +func (inst Object) GetMetaDataGroup() (MetaDataGroup, error) { + var metaDataGroup ref + ret := C.CCall_lib3mf_object_getmetadatagroup(inst.wrapperRef.LibraryHandle, inst.Ref, &metaDataGroup) + if ret != 0 { + return MetaDataGroup{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewMetaDataGroup(metaDataGroup), nil +} + +// SetSlicesMeshResolution set the meshresolution of the mesh object. +func (inst Object) SetSlicesMeshResolution(meshResolution SlicesMeshResolution) error { + ret := C.CCall_lib3mf_object_setslicesmeshresolution(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFSlicesMeshResolution(meshResolution)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetSlicesMeshResolution get the meshresolution of the mesh object. +func (inst Object) GetSlicesMeshResolution() (SlicesMeshResolution, error) { + var meshResolution C.eLib3MFSlicesMeshResolution + ret := C.CCall_lib3mf_object_getslicesmeshresolution(inst.wrapperRef.LibraryHandle, inst.Ref, &meshResolution) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return SlicesMeshResolution(meshResolution), nil +} + +// HasSlices returns whether the Object has a slice stack. If Recursive is true, also checks whether any references object has a slice stack. +func (inst Object) HasSlices(recursive bool) (bool, error) { + var hasSlices C.bool + ret := C.CCall_lib3mf_object_hasslices(inst.wrapperRef.LibraryHandle, inst.Ref, C.bool(recursive), &hasSlices) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(hasSlices), nil +} + +// ClearSliceStack unlinks the attached slicestack from this object. If no slice stack is attached, do noting. +func (inst Object) ClearSliceStack() error { + ret := C.CCall_lib3mf_object_clearslicestack(inst.wrapperRef.LibraryHandle, inst.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetSliceStack get the Slicestack attached to the object. +func (inst Object) GetSliceStack() (SliceStack, error) { + var sliceStackInstance ref + ret := C.CCall_lib3mf_object_getslicestack(inst.wrapperRef.LibraryHandle, inst.Ref, &sliceStackInstance) + if ret != 0 { + return SliceStack{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewSliceStack(sliceStackInstance), nil +} + +// AssignSliceStack assigns a slicestack to the object. +func (inst Object) AssignSliceStack(sliceStackInstance SliceStack) error { + ret := C.CCall_lib3mf_object_assignslicestack(inst.wrapperRef.LibraryHandle, inst.Ref, sliceStackInstance.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + + +// MeshObject represents a Lib3MF class. +type MeshObject struct { + Object +} + +func (wrapper Wrapper) NewMeshObject(r ref) MeshObject { + return MeshObject{wrapper.NewObject(r)} +} + +// GetVertexCount returns the vertex count of a mesh object. +func (inst MeshObject) GetVertexCount() (uint32, error) { + var vertexCount C.uint32_t + ret := C.CCall_lib3mf_meshobject_getvertexcount(inst.wrapperRef.LibraryHandle, inst.Ref, &vertexCount) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(vertexCount), nil +} + +// GetTriangleCount returns the triangle count of a mesh object. +func (inst MeshObject) GetTriangleCount() (uint32, error) { + var vertexCount C.uint32_t + ret := C.CCall_lib3mf_meshobject_gettrianglecount(inst.wrapperRef.LibraryHandle, inst.Ref, &vertexCount) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(vertexCount), nil +} + +// GetVertex returns the vertex count of a mesh object. +func (inst MeshObject) GetVertex(index uint32) (Position, error) { + var coordinates C.sLib3MFPosition + ret := C.CCall_lib3mf_meshobject_getvertex(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &coordinates) + if ret != 0 { + return Position{}, makeError(uint32(ret)) + } + return *(*Position)(unsafe.Pointer(&coordinates)), nil +} + +// SetVertex sets the coordinates of a single vertex of a mesh object. +func (inst MeshObject) SetVertex(index uint32, coordinates Position) error { + ret := C.CCall_lib3mf_meshobject_setvertex(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.sLib3MFPosition)(unsafe.Pointer(&coordinates))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// AddVertex adds a single vertex to a mesh object. +func (inst MeshObject) AddVertex(coordinates Position) (uint32, error) { + var newIndex C.uint32_t + ret := C.CCall_lib3mf_meshobject_addvertex(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFPosition)(unsafe.Pointer(&coordinates)), &newIndex) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(newIndex), nil +} + +// GetVertices obtains all vertex positions of a mesh object. +func (inst MeshObject) GetVertices(vertices []Position) ([]Position, error) { + var neededforvertices C.uint64_t + ret := C.CCall_lib3mf_meshobject_getvertices(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforvertices, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(vertices) < int(neededforvertices) { + vertices = append(vertices, make([]Position, int(neededforvertices)-len(vertices))...) + } + ret = C.CCall_lib3mf_meshobject_getvertices(inst.wrapperRef.LibraryHandle, inst.Ref, neededforvertices, nil, (*C.sLib3MFPosition)(unsafe.Pointer(&vertices[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return vertices[:int(neededforvertices)], nil +} + +// GetTriangle returns indices of a single triangle of a mesh object. +func (inst MeshObject) GetTriangle(index uint32) (Triangle, error) { + var indices C.sLib3MFTriangle + ret := C.CCall_lib3mf_meshobject_gettriangle(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &indices) + if ret != 0 { + return Triangle{}, makeError(uint32(ret)) + } + return *(*Triangle)(unsafe.Pointer(&indices)), nil +} + +// SetTriangle sets the indices of a single triangle of a mesh object. +func (inst MeshObject) SetTriangle(index uint32, indices Triangle) error { + ret := C.CCall_lib3mf_meshobject_settriangle(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.sLib3MFTriangle)(unsafe.Pointer(&indices))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// AddTriangle adds a single triangle to a mesh object. +func (inst MeshObject) AddTriangle(indices Triangle) (uint32, error) { + var newIndex C.uint32_t + ret := C.CCall_lib3mf_meshobject_addtriangle(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFTriangle)(unsafe.Pointer(&indices)), &newIndex) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(newIndex), nil +} + +// GetTriangleIndices get all triangles of a mesh object. +func (inst MeshObject) GetTriangleIndices(indices []Triangle) ([]Triangle, error) { + var neededforindices C.uint64_t + ret := C.CCall_lib3mf_meshobject_gettriangleindices(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforindices, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(indices) < int(neededforindices) { + indices = append(indices, make([]Triangle, int(neededforindices)-len(indices))...) + } + ret = C.CCall_lib3mf_meshobject_gettriangleindices(inst.wrapperRef.LibraryHandle, inst.Ref, neededforindices, nil, (*C.sLib3MFTriangle)(unsafe.Pointer(&indices[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return indices[:int(neededforindices)], nil +} + +// SetObjectLevelProperty sets the property at the object-level of the mesh object. +func (inst MeshObject) SetObjectLevelProperty(uniqueResourceID uint32, propertyID uint32) error { + ret := C.CCall_lib3mf_meshobject_setobjectlevelproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(uniqueResourceID), C.uint32_t(propertyID)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetObjectLevelProperty gets the property at the object-level of the mesh object. +func (inst MeshObject) GetObjectLevelProperty() (uint32, uint32, bool, error) { + var uniqueResourceID C.uint32_t + var propertyID C.uint32_t + var hasObjectLevelProperty C.bool + ret := C.CCall_lib3mf_meshobject_getobjectlevelproperty(inst.wrapperRef.LibraryHandle, inst.Ref, &uniqueResourceID, &propertyID, &hasObjectLevelProperty) + if ret != 0 { + return 0, 0, false, makeError(uint32(ret)) + } + return uint32(uniqueResourceID), uint32(propertyID), bool(hasObjectLevelProperty), nil +} + +// SetTriangleProperties sets the properties of a single triangle of a mesh object. +func (inst MeshObject) SetTriangleProperties(index uint32, properties TriangleProperties) error { + ret := C.CCall_lib3mf_meshobject_settriangleproperties(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.sLib3MFTriangleProperties)(unsafe.Pointer(&properties))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetTriangleProperties gets the properties of a single triangle of a mesh object. +func (inst MeshObject) GetTriangleProperties(index uint32) (TriangleProperties, error) { + var property C.sLib3MFTriangleProperties + ret := C.CCall_lib3mf_meshobject_gettriangleproperties(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &property) + if ret != 0 { + return TriangleProperties{}, makeError(uint32(ret)) + } + return *(*TriangleProperties)(unsafe.Pointer(&property)), nil +} + +// SetAllTriangleProperties sets the properties of all triangles of a mesh object. Sets the object level property to the first entry of the passed triangle properties, if not yet specified. +func (inst MeshObject) SetAllTriangleProperties(propertiesArray []TriangleProperties) error { + ret := C.CCall_lib3mf_meshobject_setalltriangleproperties(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(propertiesArray)), (*C.sLib3MFTriangleProperties)(unsafe.Pointer(&propertiesArray[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetAllTriangleProperties gets the properties of all triangles of a mesh object. +func (inst MeshObject) GetAllTriangleProperties(propertiesArray []TriangleProperties) ([]TriangleProperties, error) { + var neededforpropertiesArray C.uint64_t + ret := C.CCall_lib3mf_meshobject_getalltriangleproperties(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertiesArray, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(propertiesArray) < int(neededforpropertiesArray) { + propertiesArray = append(propertiesArray, make([]TriangleProperties, int(neededforpropertiesArray)-len(propertiesArray))...) + } + ret = C.CCall_lib3mf_meshobject_getalltriangleproperties(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertiesArray, nil, (*C.sLib3MFTriangleProperties)(unsafe.Pointer(&propertiesArray[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return propertiesArray[:int(neededforpropertiesArray)], nil +} + +// ClearAllProperties clears all properties of this mesh object (triangle and object-level). +func (inst MeshObject) ClearAllProperties() error { + ret := C.CCall_lib3mf_meshobject_clearallproperties(inst.wrapperRef.LibraryHandle, inst.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// SetGeometry set all triangles of a mesh object. +func (inst MeshObject) SetGeometry(vertices []Position, indices []Triangle) error { + ret := C.CCall_lib3mf_meshobject_setgeometry(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(vertices)), (*C.sLib3MFPosition)(unsafe.Pointer(&vertices[0])), C.uint64_t(len(indices)), (*C.sLib3MFTriangle)(unsafe.Pointer(&indices[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// IsManifoldAndOriented retrieves, if an object describes a topologically oriented and manifold mesh, according to the core spec. +func (inst MeshObject) IsManifoldAndOriented() (bool, error) { + var isManifoldAndOriented C.bool + ret := C.CCall_lib3mf_meshobject_ismanifoldandoriented(inst.wrapperRef.LibraryHandle, inst.Ref, &isManifoldAndOriented) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(isManifoldAndOriented), nil +} + +// BeamLattice retrieves the BeamLattice within this MeshObject. +func (inst MeshObject) BeamLattice() (BeamLattice, error) { + var theBeamLattice ref + ret := C.CCall_lib3mf_meshobject_beamlattice(inst.wrapperRef.LibraryHandle, inst.Ref, &theBeamLattice) + if ret != 0 { + return BeamLattice{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewBeamLattice(theBeamLattice), nil +} + +// GetVolumeData retrieves the VolumeData of this MeshObject. +func (inst MeshObject) GetVolumeData() (*VolumeData, error) { + var theVolumeData ref + ret := C.CCall_lib3mf_meshobject_getvolumedata(inst.wrapperRef.LibraryHandle, inst.Ref, &theVolumeData) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + var _theVolumeDataPtr *VolumeData + if theVolumeData != nil { + _theVolumeDataPtrVal := inst.wrapperRef.NewVolumeData(theVolumeData) + _theVolumeDataPtr = &_theVolumeDataPtrVal + } + return _theVolumeDataPtr, nil +} + +// SetVolumeData sets the VolumeData of this MeshObject. +func (inst MeshObject) SetVolumeData(theVolumeData VolumeData) error { + ret := C.CCall_lib3mf_meshobject_setvolumedata(inst.wrapperRef.LibraryHandle, inst.Ref, theVolumeData.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + + +// LevelSet represents a Lib3MF class. +type LevelSet struct { + Object +} + +func (wrapper Wrapper) NewLevelSet(r ref) LevelSet { + return LevelSet{wrapper.NewObject(r)} +} + +// GetFunction returns the function that is used as boundary shape. +func (inst LevelSet) GetFunction() (*Function, error) { + var theFunction ref + ret := C.CCall_lib3mf_levelset_getfunction(inst.wrapperRef.LibraryHandle, inst.Ref, &theFunction) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + var _theFunctionPtr *Function + if theFunction != nil { + _theFunctionPtrVal := inst.wrapperRef.NewFunction(theFunction) + _theFunctionPtr = &_theFunctionPtrVal + } + return _theFunctionPtr, nil +} + +// SetFunction sets the function to use as boundary shape. +func (inst LevelSet) SetFunction(theFunction Function) error { + ret := C.CCall_lib3mf_levelset_setfunction(inst.wrapperRef.LibraryHandle, inst.Ref, theFunction.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetTransform returns the transformation matrix into the coordinate system of the referenced Function. +func (inst LevelSet) GetTransform() (Transform, error) { + var transform C.sLib3MFTransform + ret := C.CCall_lib3mf_levelset_gettransform(inst.wrapperRef.LibraryHandle, inst.Ref, &transform) + if ret != 0 { + return Transform{}, makeError(uint32(ret)) + } + return *(*Transform)(unsafe.Pointer(&transform)), nil +} + +// SetTransform sets the transformation matrix into the coordinate system of the referenced Function. +func (inst LevelSet) SetTransform(transform Transform) error { + ret := C.CCall_lib3mf_levelset_settransform(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFTransform)(unsafe.Pointer(&transform))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetChannelName returns the name of the function output channel to use. +func (inst LevelSet) GetChannelName() (string, error) { + var neededforchannelName C.uint32_t + var filledinchannelName C.uint32_t + ret := C.CCall_lib3mf_levelset_getchannelname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforchannelName, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizechannelName := neededforchannelName + bufferchannelName := make([]byte, bufferSizechannelName) + ret = C.CCall_lib3mf_levelset_getchannelname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizechannelName, &filledinchannelName, (*C.char)(unsafe.Pointer(&bufferchannelName[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferchannelName[:(filledinchannelName-1)]), nil +} + +// SetChannelName sets the name of the function output channel to use. +func (inst LevelSet) SetChannelName(channelName string) error { + ret := C.CCall_lib3mf_levelset_setchannelname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(channelName)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// SetMinFeatureSize sets the minimal feature size as a hint for the function evaluator. +func (inst LevelSet) SetMinFeatureSize(minFeatureSize float64) error { + ret := C.CCall_lib3mf_levelset_setminfeaturesize(inst.wrapperRef.LibraryHandle, inst.Ref, C.double(minFeatureSize)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetMinFeatureSize returns the minimal feature size as a hint for the function evaluator. +func (inst LevelSet) GetMinFeatureSize() (float64, error) { + var minFeatureSize C.double + ret := C.CCall_lib3mf_levelset_getminfeaturesize(inst.wrapperRef.LibraryHandle, inst.Ref, &minFeatureSize) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return float64(minFeatureSize), nil +} + +// SetFallBackValue sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +func (inst LevelSet) SetFallBackValue(fallBackValue float64) error { + ret := C.CCall_lib3mf_levelset_setfallbackvalue(inst.wrapperRef.LibraryHandle, inst.Ref, C.double(fallBackValue)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetFallBackValue returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +func (inst LevelSet) GetFallBackValue() (float64, error) { + var fallBackValue C.double + ret := C.CCall_lib3mf_levelset_getfallbackvalue(inst.wrapperRef.LibraryHandle, inst.Ref, &fallBackValue) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return float64(fallBackValue), nil +} + +// SetMeshBBoxOnly if set only the bounding box of the mesh is intersected with the boundary. +func (inst LevelSet) SetMeshBBoxOnly(meshBBoxOnly bool) error { + ret := C.CCall_lib3mf_levelset_setmeshbboxonly(inst.wrapperRef.LibraryHandle, inst.Ref, C.bool(meshBBoxOnly)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetMeshBBoxOnly if set only the bounding box of the mesh is intersected with the boundary. +func (inst LevelSet) GetMeshBBoxOnly() (bool, error) { + var meshBBoxOnly C.bool + ret := C.CCall_lib3mf_levelset_getmeshbboxonly(inst.wrapperRef.LibraryHandle, inst.Ref, &meshBBoxOnly) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(meshBBoxOnly), nil +} + +// SetMesh sets the mesh to use as evaluation domain. +func (inst LevelSet) SetMesh(theMesh MeshObject) error { + ret := C.CCall_lib3mf_levelset_setmesh(inst.wrapperRef.LibraryHandle, inst.Ref, theMesh.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetMesh returns the mesh that is used as evaluation domain. +func (inst LevelSet) GetMesh() (*MeshObject, error) { + var theMesh ref + ret := C.CCall_lib3mf_levelset_getmesh(inst.wrapperRef.LibraryHandle, inst.Ref, &theMesh) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + var _theMeshPtr *MeshObject + if theMesh != nil { + _theMeshPtrVal := inst.wrapperRef.NewMeshObject(theMesh) + _theMeshPtr = &_theMeshPtrVal + } + return _theMeshPtr, nil +} + +// GetVolumeData retrieves the VolumeData this Object. +func (inst LevelSet) GetVolumeData() (*VolumeData, error) { + var theVolumeData ref + ret := C.CCall_lib3mf_levelset_getvolumedata(inst.wrapperRef.LibraryHandle, inst.Ref, &theVolumeData) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + var _theVolumeDataPtr *VolumeData + if theVolumeData != nil { + _theVolumeDataPtrVal := inst.wrapperRef.NewVolumeData(theVolumeData) + _theVolumeDataPtr = &_theVolumeDataPtrVal + } + return _theVolumeDataPtr, nil +} + +// SetVolumeData sets the VolumeData of this LevelSet. +func (inst LevelSet) SetVolumeData(theVolumeData VolumeData) error { + ret := C.CCall_lib3mf_levelset_setvolumedata(inst.wrapperRef.LibraryHandle, inst.Ref, theVolumeData.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + + +// BeamLattice represents a Lib3MF class. +type BeamLattice struct { + Base +} + +func (wrapper Wrapper) NewBeamLattice(r ref) BeamLattice { + return BeamLattice{wrapper.NewBase(r)} +} + +// GetMinLength returns the minimal length of beams for the beamlattice. +func (inst BeamLattice) GetMinLength() (float64, error) { + var minLength C.double + ret := C.CCall_lib3mf_beamlattice_getminlength(inst.wrapperRef.LibraryHandle, inst.Ref, &minLength) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return float64(minLength), nil +} + +// SetMinLength sets the minimal length of beams for the beamlattice. +func (inst BeamLattice) SetMinLength(minLength float64) error { + ret := C.CCall_lib3mf_beamlattice_setminlength(inst.wrapperRef.LibraryHandle, inst.Ref, C.double(minLength)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetClipping returns the clipping mode and the clipping-mesh for the beamlattice of this mesh. +func (inst BeamLattice) GetClipping() (BeamLatticeClipMode, uint32, error) { + var clipMode C.eLib3MFBeamLatticeClipMode + var uniqueResourceID C.uint32_t + ret := C.CCall_lib3mf_beamlattice_getclipping(inst.wrapperRef.LibraryHandle, inst.Ref, &clipMode, &uniqueResourceID) + if ret != 0 { + return 0, 0, makeError(uint32(ret)) + } + return BeamLatticeClipMode(clipMode), uint32(uniqueResourceID), nil +} + +// SetClipping sets the clipping mode and the clipping-mesh for the beamlattice of this mesh. +func (inst BeamLattice) SetClipping(clipMode BeamLatticeClipMode, uniqueResourceID uint32) error { + ret := C.CCall_lib3mf_beamlattice_setclipping(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFBeamLatticeClipMode(clipMode), C.uint32_t(uniqueResourceID)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetRepresentation returns the representation-mesh for the beamlattice of this mesh. +func (inst BeamLattice) GetRepresentation() (bool, uint32, error) { + var hasRepresentation C.bool + var uniqueResourceID C.uint32_t + ret := C.CCall_lib3mf_beamlattice_getrepresentation(inst.wrapperRef.LibraryHandle, inst.Ref, &hasRepresentation, &uniqueResourceID) + if ret != 0 { + return false, 0, makeError(uint32(ret)) + } + return bool(hasRepresentation), uint32(uniqueResourceID), nil +} + +// SetRepresentation sets the representation-mesh for the beamlattice of this mesh. +func (inst BeamLattice) SetRepresentation(uniqueResourceID uint32) error { + ret := C.CCall_lib3mf_beamlattice_setrepresentation(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(uniqueResourceID)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetBallOptions returns the ball mode and the default ball radius for the beamlattice of this mesh. +func (inst BeamLattice) GetBallOptions() (BeamLatticeBallMode, float64, error) { + var ballMode C.eLib3MFBeamLatticeBallMode + var ballRadius C.double + ret := C.CCall_lib3mf_beamlattice_getballoptions(inst.wrapperRef.LibraryHandle, inst.Ref, &ballMode, &ballRadius) + if ret != 0 { + return 0, 0, makeError(uint32(ret)) + } + return BeamLatticeBallMode(ballMode), float64(ballRadius), nil +} + +// SetBallOptions sets the ball mode and thedefault ball radius for the beamlattice. +func (inst BeamLattice) SetBallOptions(ballMode BeamLatticeBallMode, ballRadius float64) error { + ret := C.CCall_lib3mf_beamlattice_setballoptions(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFBeamLatticeBallMode(ballMode), C.double(ballRadius)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetBeamCount returns the beam count of a mesh object. +func (inst BeamLattice) GetBeamCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_beamlattice_getbeamcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// GetBeam returns indices, radii and capmodes of a single beam of a mesh object. +func (inst BeamLattice) GetBeam(index uint32) (Beam, error) { + var beamInfo C.sLib3MFBeam + ret := C.CCall_lib3mf_beamlattice_getbeam(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &beamInfo) + if ret != 0 { + return Beam{}, makeError(uint32(ret)) + } + return *(*Beam)(unsafe.Pointer(&beamInfo)), nil +} + +// AddBeam adds a single beam to a mesh object. +func (inst BeamLattice) AddBeam(beamInfo Beam) (uint32, error) { + var index C.uint32_t + ret := C.CCall_lib3mf_beamlattice_addbeam(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFBeam)(unsafe.Pointer(&beamInfo)), &index) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(index), nil +} + +// SetBeam sets the indices, radii and capmodes of a single beam of a mesh object. +func (inst BeamLattice) SetBeam(index uint32, beamInfo Beam) error { + ret := C.CCall_lib3mf_beamlattice_setbeam(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.sLib3MFBeam)(unsafe.Pointer(&beamInfo))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// SetBeams sets all beam indices, radii and capmodes of a mesh object. +func (inst BeamLattice) SetBeams(beamInfo []Beam) error { + ret := C.CCall_lib3mf_beamlattice_setbeams(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(beamInfo)), (*C.sLib3MFBeam)(unsafe.Pointer(&beamInfo[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetBeams obtains all beam indices, radii and capmodes of a mesh object. +func (inst BeamLattice) GetBeams(beamInfo []Beam) ([]Beam, error) { + var neededforbeamInfo C.uint64_t + ret := C.CCall_lib3mf_beamlattice_getbeams(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforbeamInfo, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(beamInfo) < int(neededforbeamInfo) { + beamInfo = append(beamInfo, make([]Beam, int(neededforbeamInfo)-len(beamInfo))...) + } + ret = C.CCall_lib3mf_beamlattice_getbeams(inst.wrapperRef.LibraryHandle, inst.Ref, neededforbeamInfo, nil, (*C.sLib3MFBeam)(unsafe.Pointer(&beamInfo[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return beamInfo[:int(neededforbeamInfo)], nil +} + +// GetBallCount returns the ball count of a mesh object. +func (inst BeamLattice) GetBallCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_beamlattice_getballcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// GetBall returns index and radius of a single ball of a mesh object. +func (inst BeamLattice) GetBall(index uint32) (Ball, error) { + var ballInfo C.sLib3MFBall + ret := C.CCall_lib3mf_beamlattice_getball(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &ballInfo) + if ret != 0 { + return Ball{}, makeError(uint32(ret)) + } + return *(*Ball)(unsafe.Pointer(&ballInfo)), nil +} + +// AddBall adds a single ball to a mesh object. +func (inst BeamLattice) AddBall(ballInfo Ball) (uint32, error) { + var index C.uint32_t + ret := C.CCall_lib3mf_beamlattice_addball(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFBall)(unsafe.Pointer(&ballInfo)), &index) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(index), nil +} + +// SetBall sets the index and radius of a single ball of a mesh object. +func (inst BeamLattice) SetBall(index uint32, ballInfo Ball) error { + ret := C.CCall_lib3mf_beamlattice_setball(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.sLib3MFBall)(unsafe.Pointer(&ballInfo))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// SetBalls sets all ball indices and radii of a mesh object. +func (inst BeamLattice) SetBalls(ballInfo []Ball) error { + ret := C.CCall_lib3mf_beamlattice_setballs(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(ballInfo)), (*C.sLib3MFBall)(unsafe.Pointer(&ballInfo[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetBalls obtains all ball indices and radii of a mesh object. +func (inst BeamLattice) GetBalls(ballInfo []Ball) ([]Ball, error) { + var neededforballInfo C.uint64_t + ret := C.CCall_lib3mf_beamlattice_getballs(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforballInfo, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(ballInfo) < int(neededforballInfo) { + ballInfo = append(ballInfo, make([]Ball, int(neededforballInfo)-len(ballInfo))...) + } + ret = C.CCall_lib3mf_beamlattice_getballs(inst.wrapperRef.LibraryHandle, inst.Ref, neededforballInfo, nil, (*C.sLib3MFBall)(unsafe.Pointer(&ballInfo[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return ballInfo[:int(neededforballInfo)], nil +} + +// GetBeamSetCount returns the number of beamsets of a mesh object. +func (inst BeamLattice) GetBeamSetCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_beamlattice_getbeamsetcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// AddBeamSet adds an empty beamset to a mesh object. +func (inst BeamLattice) AddBeamSet() (BeamSet, error) { + var beamSet ref + ret := C.CCall_lib3mf_beamlattice_addbeamset(inst.wrapperRef.LibraryHandle, inst.Ref, &beamSet) + if ret != 0 { + return BeamSet{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewBeamSet(beamSet), nil +} + +// GetBeamSet returns a beamset of a mesh object. +func (inst BeamLattice) GetBeamSet(index uint32) (BeamSet, error) { + var beamSet ref + ret := C.CCall_lib3mf_beamlattice_getbeamset(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &beamSet) + if ret != 0 { + return BeamSet{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewBeamSet(beamSet), nil +} + + +// FunctionReference represents a Lib3MF class. +type FunctionReference struct { + Base +} + +func (wrapper Wrapper) NewFunctionReference(r ref) FunctionReference { + return FunctionReference{wrapper.NewBase(r)} +} + +// GetFunctionResourceID returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. +func (inst FunctionReference) GetFunctionResourceID() (uint32, error) { + var uniqueResourceID C.uint32_t + ret := C.CCall_lib3mf_functionreference_getfunctionresourceid(inst.wrapperRef.LibraryHandle, inst.Ref, &uniqueResourceID) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(uniqueResourceID), nil +} + +// SetFunctionResourceID sets the UniqueResourceID to refer to. +func (inst FunctionReference) SetFunctionResourceID(uniqueResourceID uint32) error { + ret := C.CCall_lib3mf_functionreference_setfunctionresourceid(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(uniqueResourceID)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetTransform returns the transformation matrix into the coordinate system of the referenced Function. +func (inst FunctionReference) GetTransform() (Transform, error) { + var transform C.sLib3MFTransform + ret := C.CCall_lib3mf_functionreference_gettransform(inst.wrapperRef.LibraryHandle, inst.Ref, &transform) + if ret != 0 { + return Transform{}, makeError(uint32(ret)) + } + return *(*Transform)(unsafe.Pointer(&transform)), nil +} + +// SetTransform sets the transformation matrix into the coordinate system of the referenced Function. +func (inst FunctionReference) SetTransform(transform Transform) error { + ret := C.CCall_lib3mf_functionreference_settransform(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFTransform)(unsafe.Pointer(&transform))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetChannelName returns the name of the function output channel to use. +func (inst FunctionReference) GetChannelName() (string, error) { + var neededforchannelName C.uint32_t + var filledinchannelName C.uint32_t + ret := C.CCall_lib3mf_functionreference_getchannelname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforchannelName, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizechannelName := neededforchannelName + bufferchannelName := make([]byte, bufferSizechannelName) + ret = C.CCall_lib3mf_functionreference_getchannelname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizechannelName, &filledinchannelName, (*C.char)(unsafe.Pointer(&bufferchannelName[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferchannelName[:(filledinchannelName-1)]), nil +} + +// SetChannelName sets the name of the function output channel to use. +func (inst FunctionReference) SetChannelName(channelName string) error { + ret := C.CCall_lib3mf_functionreference_setchannelname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(channelName)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// SetMinFeatureSize sets the minimal feature size as a hint for the function evaluator. +func (inst FunctionReference) SetMinFeatureSize(minFeatureSize float64) error { + ret := C.CCall_lib3mf_functionreference_setminfeaturesize(inst.wrapperRef.LibraryHandle, inst.Ref, C.double(minFeatureSize)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetMinFeatureSize returns the minimal feature size as a hint for the function evaluator. +func (inst FunctionReference) GetMinFeatureSize() (float64, error) { + var minFeatureSize C.double + ret := C.CCall_lib3mf_functionreference_getminfeaturesize(inst.wrapperRef.LibraryHandle, inst.Ref, &minFeatureSize) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return float64(minFeatureSize), nil +} + +// SetFallBackValue sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +func (inst FunctionReference) SetFallBackValue(fallBackValue float64) error { + ret := C.CCall_lib3mf_functionreference_setfallbackvalue(inst.wrapperRef.LibraryHandle, inst.Ref, C.double(fallBackValue)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetFallBackValue returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +func (inst FunctionReference) GetFallBackValue() (float64, error) { + var fallBackValue C.double + ret := C.CCall_lib3mf_functionreference_getfallbackvalue(inst.wrapperRef.LibraryHandle, inst.Ref, &fallBackValue) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return float64(fallBackValue), nil +} + + +// VolumeDataColor represents a Lib3MF class. +type VolumeDataColor struct { + FunctionReference +} + +func (wrapper Wrapper) NewVolumeDataColor(r ref) VolumeDataColor { + return VolumeDataColor{wrapper.NewFunctionReference(r)} +} + + +// MaterialMapping represents a Lib3MF class. +type MaterialMapping struct { + FunctionReference +} + +func (wrapper Wrapper) NewMaterialMapping(r ref) MaterialMapping { + return MaterialMapping{wrapper.NewFunctionReference(r)} +} + + +// VolumeDataComposite represents a Lib3MF class. +type VolumeDataComposite struct { + Base +} + +func (wrapper Wrapper) NewVolumeDataComposite(r ref) VolumeDataComposite { + return VolumeDataComposite{wrapper.NewBase(r)} +} + +// GetBaseMaterialGroup returns the BaseMaterialGroup used within this volume data item. +func (inst VolumeDataComposite) GetBaseMaterialGroup() (BaseMaterialGroup, error) { + var baseMaterialGroupInstance ref + ret := C.CCall_lib3mf_volumedatacomposite_getbasematerialgroup(inst.wrapperRef.LibraryHandle, inst.Ref, &baseMaterialGroupInstance) + if ret != 0 { + return BaseMaterialGroup{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewBaseMaterialGroup(baseMaterialGroupInstance), nil +} + +// SetBaseMaterialGroup sets the BaseMaterialGroup to use within this volume data item. +func (inst VolumeDataComposite) SetBaseMaterialGroup(baseMaterialGroupInstance BaseMaterialGroup) error { + ret := C.CCall_lib3mf_volumedatacomposite_setbasematerialgroup(inst.wrapperRef.LibraryHandle, inst.Ref, baseMaterialGroupInstance.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetMaterialMappingCount returns the number of material mappings of this VolumeDataComposite element. +func (inst VolumeDataComposite) GetMaterialMappingCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_volumedatacomposite_getmaterialmappingcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// GetMaterialMapping returns MaterialMappting with given index. +func (inst VolumeDataComposite) GetMaterialMapping(index uint32) (MaterialMapping, error) { + var theMaterialMapping ref + ret := C.CCall_lib3mf_volumedatacomposite_getmaterialmapping(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &theMaterialMapping) + if ret != 0 { + return MaterialMapping{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewMaterialMapping(theMaterialMapping), nil +} + +// AddMaterialMapping adds a the MaterialMapping. +func (inst VolumeDataComposite) AddMaterialMapping(transform Transform) (MaterialMapping, error) { + var theMaterialMapping ref + ret := C.CCall_lib3mf_volumedatacomposite_addmaterialmapping(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFTransform)(unsafe.Pointer(&transform)), &theMaterialMapping) + if ret != 0 { + return MaterialMapping{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewMaterialMapping(theMaterialMapping), nil +} + +// RemoveMaterialMapping removes the MaterialMapping with given index. +func (inst VolumeDataComposite) RemoveMaterialMapping(index uint32) error { + ret := C.CCall_lib3mf_volumedatacomposite_removematerialmapping(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + + +// VolumeDataProperty represents a Lib3MF class. +type VolumeDataProperty struct { + FunctionReference +} + +func (wrapper Wrapper) NewVolumeDataProperty(r ref) VolumeDataProperty { + return VolumeDataProperty{wrapper.NewFunctionReference(r)} +} + +// GetName gets the qualified name of this property. +func (inst VolumeDataProperty) GetName() (string, error) { + var neededforpropertyName C.uint32_t + var filledinpropertyName C.uint32_t + ret := C.CCall_lib3mf_volumedataproperty_getname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertyName, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizepropertyName := neededforpropertyName + bufferpropertyName := make([]byte, bufferSizepropertyName) + ret = C.CCall_lib3mf_volumedataproperty_getname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizepropertyName, &filledinpropertyName, (*C.char)(unsafe.Pointer(&bufferpropertyName[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferpropertyName[:(filledinpropertyName-1)]), nil +} + +// SetIsRequired sets whether this property is required to process this 3MF document instance. +func (inst VolumeDataProperty) SetIsRequired(isRequired bool) error { + ret := C.CCall_lib3mf_volumedataproperty_setisrequired(inst.wrapperRef.LibraryHandle, inst.Ref, C.bool(isRequired)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// IsRequired returns whether this property is required to process this 3MF document instance. +func (inst VolumeDataProperty) IsRequired() (bool, error) { + var isRequired C.bool + ret := C.CCall_lib3mf_volumedataproperty_isrequired(inst.wrapperRef.LibraryHandle, inst.Ref, &isRequired) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(isRequired), nil +} + + +// VolumeData represents a Lib3MF class. +type VolumeData struct { + Resource +} + +func (wrapper Wrapper) NewVolumeData(r ref) VolumeData { + return VolumeData{wrapper.NewResource(r)} +} + +// GetComposite returns the VolumeDataComposite of this VolumeData instance. +func (inst VolumeData) GetComposite() (*VolumeDataComposite, error) { + var theCompositeData ref + ret := C.CCall_lib3mf_volumedata_getcomposite(inst.wrapperRef.LibraryHandle, inst.Ref, &theCompositeData) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + var _theCompositeDataPtr *VolumeDataComposite + if theCompositeData != nil { + _theCompositeDataPtrVal := inst.wrapperRef.NewVolumeDataComposite(theCompositeData) + _theCompositeDataPtr = &_theCompositeDataPtrVal + } + return _theCompositeDataPtr, nil +} + +// CreateNewComposite creates a new VolumeDataComposite for this VolumeData instance. +func (inst VolumeData) CreateNewComposite() (VolumeDataComposite, error) { + var theCompositeData ref + ret := C.CCall_lib3mf_volumedata_createnewcomposite(inst.wrapperRef.LibraryHandle, inst.Ref, &theCompositeData) + if ret != 0 { + return VolumeDataComposite{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewVolumeDataComposite(theCompositeData), nil +} + +// RemoveComposite removes the VolumeDataComposite of this VolumeData instance. +func (inst VolumeData) RemoveComposite() error { + ret := C.CCall_lib3mf_volumedata_removecomposite(inst.wrapperRef.LibraryHandle, inst.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetColor returns the VolumeDataColor of this VolumeData instance. +func (inst VolumeData) GetColor() (*VolumeDataColor, error) { + var theColorData ref + ret := C.CCall_lib3mf_volumedata_getcolor(inst.wrapperRef.LibraryHandle, inst.Ref, &theColorData) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + var _theColorDataPtr *VolumeDataColor + if theColorData != nil { + _theColorDataPtrVal := inst.wrapperRef.NewVolumeDataColor(theColorData) + _theColorDataPtr = &_theColorDataPtrVal + } + return _theColorDataPtr, nil +} + +// CreateNewColor creates a new VolumeDataColor for this VolumeData instance. +func (inst VolumeData) CreateNewColor(theFunction Function) (VolumeDataColor, error) { + var theColorData ref + ret := C.CCall_lib3mf_volumedata_createnewcolor(inst.wrapperRef.LibraryHandle, inst.Ref, theFunction.Ref, &theColorData) + if ret != 0 { + return VolumeDataColor{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewVolumeDataColor(theColorData), nil +} + +// RemoveColor removes the VolumeDataColor of this VolumeData instance. +func (inst VolumeData) RemoveColor() error { + ret := C.CCall_lib3mf_volumedata_removecolor(inst.wrapperRef.LibraryHandle, inst.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetPropertyCount returns the number of VolumeDataProperty. +func (inst VolumeData) GetPropertyCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_volumedata_getpropertycount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// GetProperty returns the VolumeDataProperty at a given Index. +func (inst VolumeData) GetProperty(index uint32) (VolumeDataProperty, error) { + var theVolumeDataProperty ref + ret := C.CCall_lib3mf_volumedata_getproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &theVolumeDataProperty) + if ret != 0 { + return VolumeDataProperty{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewVolumeDataProperty(theVolumeDataProperty), nil +} + +// AddPropertyFromFunction adds a new VolumeDataProperty from a Function. +func (inst VolumeData) AddPropertyFromFunction(name string, theFunction Function) (VolumeDataProperty, error) { + var theVolumeDataProperty ref + ret := C.CCall_lib3mf_volumedata_addpropertyfromfunction(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(name)[0])), theFunction.Ref, &theVolumeDataProperty) + if ret != 0 { + return VolumeDataProperty{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewVolumeDataProperty(theVolumeDataProperty), nil +} + +// RemoveProperty removes the VolumeDataProperty with a given index. +func (inst VolumeData) RemoveProperty(index uint32) error { + ret := C.CCall_lib3mf_volumedata_removeproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + + +// Component represents a Lib3MF class. +type Component struct { + Base +} + +func (wrapper Wrapper) NewComponent(r ref) Component { + return Component{wrapper.NewBase(r)} +} + +// GetObjectResource returns the Resource Instance of the component. +func (inst Component) GetObjectResource() (Object, error) { + var objectResource ref + ret := C.CCall_lib3mf_component_getobjectresource(inst.wrapperRef.LibraryHandle, inst.Ref, &objectResource) + if ret != 0 { + return Object{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewObject(objectResource), nil +} + +// GetObjectResourceID returns the UniqueResourceID of the component. +func (inst Component) GetObjectResourceID() (uint32, error) { + var uniqueResourceID C.uint32_t + ret := C.CCall_lib3mf_component_getobjectresourceid(inst.wrapperRef.LibraryHandle, inst.Ref, &uniqueResourceID) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(uniqueResourceID), nil +} + +// GetUUID returns, whether a component has a UUID and, if true, the component's UUID. +func (inst Component) GetUUID() (bool, string, error) { + var hasUUID C.bool + var neededforuUID C.uint32_t + var filledinuUID C.uint32_t + ret := C.CCall_lib3mf_component_getuuid(inst.wrapperRef.LibraryHandle, inst.Ref, &hasUUID, 0, &neededforuUID, nil) + if ret != 0 { + return false, "", makeError(uint32(ret)) + } + bufferSizeuUID := neededforuUID + bufferuUID := make([]byte, bufferSizeuUID) + ret = C.CCall_lib3mf_component_getuuid(inst.wrapperRef.LibraryHandle, inst.Ref, &hasUUID, bufferSizeuUID, &filledinuUID, (*C.char)(unsafe.Pointer(&bufferuUID[0]))) + if ret != 0 { + return false, "", makeError(uint32(ret)) + } + return bool(hasUUID), string(bufferuUID[:(filledinuUID-1)]), nil +} + +// SetUUID sets the component's UUID. +func (inst Component) SetUUID(uUID string) error { + ret := C.CCall_lib3mf_component_setuuid(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(uUID)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// HasTransform returns, if the component has a different transformation than the identity matrix. +func (inst Component) HasTransform() (bool, error) { + var hasTransform C.bool + ret := C.CCall_lib3mf_component_hastransform(inst.wrapperRef.LibraryHandle, inst.Ref, &hasTransform) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(hasTransform), nil +} + +// GetTransform returns the transformation matrix of the component. +func (inst Component) GetTransform() (Transform, error) { + var transform C.sLib3MFTransform + ret := C.CCall_lib3mf_component_gettransform(inst.wrapperRef.LibraryHandle, inst.Ref, &transform) + if ret != 0 { + return Transform{}, makeError(uint32(ret)) + } + return *(*Transform)(unsafe.Pointer(&transform)), nil +} + +// SetTransform sets the transformation matrix of the component. +func (inst Component) SetTransform(transform Transform) error { + ret := C.CCall_lib3mf_component_settransform(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFTransform)(unsafe.Pointer(&transform))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + + +// ComponentsObject represents a Lib3MF class. +type ComponentsObject struct { + Object +} + +func (wrapper Wrapper) NewComponentsObject(r ref) ComponentsObject { + return ComponentsObject{wrapper.NewObject(r)} +} + +// AddComponent adds a new component to a components object. +func (inst ComponentsObject) AddComponent(objectResource Object, transform Transform) (Component, error) { + var componentInstance ref + ret := C.CCall_lib3mf_componentsobject_addcomponent(inst.wrapperRef.LibraryHandle, inst.Ref, objectResource.Ref, (*C.sLib3MFTransform)(unsafe.Pointer(&transform)), &componentInstance) + if ret != 0 { + return Component{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewComponent(componentInstance), nil +} + +// GetComponent retrieves a component from a component object. +func (inst ComponentsObject) GetComponent(index uint32) (Component, error) { + var componentInstance ref + ret := C.CCall_lib3mf_componentsobject_getcomponent(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &componentInstance) + if ret != 0 { + return Component{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewComponent(componentInstance), nil +} + +// GetComponentCount retrieves a component count of a component object. +func (inst ComponentsObject) GetComponentCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_componentsobject_getcomponentcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + + +// BeamSet represents a Lib3MF class. +type BeamSet struct { + Base +} + +func (wrapper Wrapper) NewBeamSet(r ref) BeamSet { + return BeamSet{wrapper.NewBase(r)} +} + +// SetName sets a beamset's name string. +func (inst BeamSet) SetName(name string) error { + ret := C.CCall_lib3mf_beamset_setname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(name)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetName retrieves a beamset's name string. +func (inst BeamSet) GetName() (string, error) { + var neededforname C.uint32_t + var filledinname C.uint32_t + ret := C.CCall_lib3mf_beamset_getname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforname, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizename := neededforname + buffername := make([]byte, bufferSizename) + ret = C.CCall_lib3mf_beamset_getname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizename, &filledinname, (*C.char)(unsafe.Pointer(&buffername[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(buffername[:(filledinname-1)]), nil +} + +// SetIdentifier sets a beamset's identifier string. +func (inst BeamSet) SetIdentifier(identifier string) error { + ret := C.CCall_lib3mf_beamset_setidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetIdentifier retrieves a beamset's identifier string. +func (inst BeamSet) GetIdentifier() (string, error) { + var neededforidentifier C.uint32_t + var filledinidentifier C.uint32_t + ret := C.CCall_lib3mf_beamset_getidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforidentifier, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizeidentifier := neededforidentifier + bufferidentifier := make([]byte, bufferSizeidentifier) + ret = C.CCall_lib3mf_beamset_getidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizeidentifier, &filledinidentifier, (*C.char)(unsafe.Pointer(&bufferidentifier[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferidentifier[:(filledinidentifier-1)]), nil +} + +// GetReferenceCount retrieves the reference count of a beamset. +func (inst BeamSet) GetReferenceCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_beamset_getreferencecount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// SetReferences sets the references of a beamset. +func (inst BeamSet) SetReferences(references []uint32) error { + ret := C.CCall_lib3mf_beamset_setreferences(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(references)), (*C.uint32_t)(unsafe.Pointer(&references[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetReferences retrieves the references of a beamset. +func (inst BeamSet) GetReferences(references []uint32) ([]uint32, error) { + var neededforreferences C.uint64_t + ret := C.CCall_lib3mf_beamset_getreferences(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforreferences, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(references) < int(neededforreferences) { + references = append(references, make([]uint32, int(neededforreferences)-len(references))...) + } + ret = C.CCall_lib3mf_beamset_getreferences(inst.wrapperRef.LibraryHandle, inst.Ref, neededforreferences, nil, (*C.uint32_t)(unsafe.Pointer(&references[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return references[:int(neededforreferences)], nil +} + +// GetBallReferenceCount retrieves the ball reference count of a beamset. +func (inst BeamSet) GetBallReferenceCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_beamset_getballreferencecount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// SetBallReferences sets the ball references of a beamset. +func (inst BeamSet) SetBallReferences(ballReferences []uint32) error { + ret := C.CCall_lib3mf_beamset_setballreferences(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(ballReferences)), (*C.uint32_t)(unsafe.Pointer(&ballReferences[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetBallReferences retrieves the ball references of a beamset. +func (inst BeamSet) GetBallReferences(ballReferences []uint32) ([]uint32, error) { + var neededforballReferences C.uint64_t + ret := C.CCall_lib3mf_beamset_getballreferences(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforballReferences, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(ballReferences) < int(neededforballReferences) { + ballReferences = append(ballReferences, make([]uint32, int(neededforballReferences)-len(ballReferences))...) + } + ret = C.CCall_lib3mf_beamset_getballreferences(inst.wrapperRef.LibraryHandle, inst.Ref, neededforballReferences, nil, (*C.uint32_t)(unsafe.Pointer(&ballReferences[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return ballReferences[:int(neededforballReferences)], nil +} + + +// BaseMaterialGroup represents a Lib3MF class. +type BaseMaterialGroup struct { + Resource +} + +func (wrapper Wrapper) NewBaseMaterialGroup(r ref) BaseMaterialGroup { + return BaseMaterialGroup{wrapper.NewResource(r)} +} + +// GetCount retrieves the count of base materials in the material group. +func (inst BaseMaterialGroup) GetCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_basematerialgroup_getcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// GetAllPropertyIDs returns all the PropertyIDs of all materials in this group. +func (inst BaseMaterialGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error) { + var neededforpropertyIDs C.uint64_t + ret := C.CCall_lib3mf_basematerialgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertyIDs, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(propertyIDs) < int(neededforpropertyIDs) { + propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + } + ret = C.CCall_lib3mf_basematerialgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return propertyIDs[:int(neededforpropertyIDs)], nil +} + +// AddMaterial adds a new material to the material group. +func (inst BaseMaterialGroup) AddMaterial(name string, displayColor Color) (uint32, error) { + var propertyID C.uint32_t + ret := C.CCall_lib3mf_basematerialgroup_addmaterial(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(name)[0])), (*C.sLib3MFColor)(unsafe.Pointer(&displayColor)), &propertyID) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(propertyID), nil +} + +// RemoveMaterial removes a material from the material group. +func (inst BaseMaterialGroup) RemoveMaterial(propertyID uint32) error { + ret := C.CCall_lib3mf_basematerialgroup_removematerial(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetName returns the base material's name. +func (inst BaseMaterialGroup) GetName(propertyID uint32) (string, error) { + var neededforname C.uint32_t + var filledinname C.uint32_t + ret := C.CCall_lib3mf_basematerialgroup_getname(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), 0, &neededforname, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizename := neededforname + buffername := make([]byte, bufferSizename) + ret = C.CCall_lib3mf_basematerialgroup_getname(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), bufferSizename, &filledinname, (*C.char)(unsafe.Pointer(&buffername[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(buffername[:(filledinname-1)]), nil +} + +// SetName sets a base material's name. +func (inst BaseMaterialGroup) SetName(propertyID uint32, name string) error { + ret := C.CCall_lib3mf_basematerialgroup_setname(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), (*C.char)(unsafe.Pointer(&[]byte(name)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// SetDisplayColor sets a base material's display color. +func (inst BaseMaterialGroup) SetDisplayColor(propertyID uint32, theColor Color) error { + ret := C.CCall_lib3mf_basematerialgroup_setdisplaycolor(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), (*C.sLib3MFColor)(unsafe.Pointer(&theColor))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetDisplayColor returns a base material's display color. +func (inst BaseMaterialGroup) GetDisplayColor(propertyID uint32) (Color, error) { + var theColor C.sLib3MFColor + ret := C.CCall_lib3mf_basematerialgroup_getdisplaycolor(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), &theColor) + if ret != 0 { + return Color{}, makeError(uint32(ret)) + } + return *(*Color)(unsafe.Pointer(&theColor)), nil +} + + +// ColorGroup represents a Lib3MF class. +type ColorGroup struct { + Resource +} + +func (wrapper Wrapper) NewColorGroup(r ref) ColorGroup { + return ColorGroup{wrapper.NewResource(r)} +} + +// GetCount retrieves the count of base materials in this Color Group. +func (inst ColorGroup) GetCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_colorgroup_getcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// GetAllPropertyIDs returns all the PropertyIDs of all colors within this group. +func (inst ColorGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error) { + var neededforpropertyIDs C.uint64_t + ret := C.CCall_lib3mf_colorgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertyIDs, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(propertyIDs) < int(neededforpropertyIDs) { + propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + } + ret = C.CCall_lib3mf_colorgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return propertyIDs[:int(neededforpropertyIDs)], nil +} + +// AddColor adds a new value. +func (inst ColorGroup) AddColor(theColor Color) (uint32, error) { + var propertyID C.uint32_t + ret := C.CCall_lib3mf_colorgroup_addcolor(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFColor)(unsafe.Pointer(&theColor)), &propertyID) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(propertyID), nil +} + +// RemoveColor removes a color from the color group. +func (inst ColorGroup) RemoveColor(propertyID uint32) error { + ret := C.CCall_lib3mf_colorgroup_removecolor(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// SetColor sets a color value. +func (inst ColorGroup) SetColor(propertyID uint32, theColor Color) error { + ret := C.CCall_lib3mf_colorgroup_setcolor(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), (*C.sLib3MFColor)(unsafe.Pointer(&theColor))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetColor sets a color value. +func (inst ColorGroup) GetColor(propertyID uint32) (Color, error) { + var theColor C.sLib3MFColor + ret := C.CCall_lib3mf_colorgroup_getcolor(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), &theColor) + if ret != 0 { + return Color{}, makeError(uint32(ret)) + } + return *(*Color)(unsafe.Pointer(&theColor)), nil +} + + +// Texture2DGroup represents a Lib3MF class. +type Texture2DGroup struct { + Resource +} + +func (wrapper Wrapper) NewTexture2DGroup(r ref) Texture2DGroup { + return Texture2DGroup{wrapper.NewResource(r)} +} + +// GetCount retrieves the count of tex2coords in the Texture2DGroup. +func (inst Texture2DGroup) GetCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_texture2dgroup_getcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(count), nil +} + +// GetAllPropertyIDs returns all the PropertyIDs of all tex2coords in this Texture2DGroup. +func (inst Texture2DGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error) { + var neededforpropertyIDs C.uint64_t + ret := C.CCall_lib3mf_texture2dgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertyIDs, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(propertyIDs) < int(neededforpropertyIDs) { + propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + } + ret = C.CCall_lib3mf_texture2dgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return propertyIDs[:int(neededforpropertyIDs)], nil +} + +// AddTex2Coord adds a new tex2coord to the Texture2DGroup. +func (inst Texture2DGroup) AddTex2Coord(uVCoordinate Tex2Coord) (uint32, error) { + var propertyID C.uint32_t + ret := C.CCall_lib3mf_texture2dgroup_addtex2coord(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFTex2Coord)(unsafe.Pointer(&uVCoordinate)), &propertyID) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return uint32(propertyID), nil } -// KeyWrappingCallbackFunc a callback used to wrap (encrypt) the content key available in keystore resource group. -type KeyWrappingCallbackFunc = func(kEKParams AccessRight, inBuffer []uint8, outBuffer []uint8, userData uintptr, status *uint64) - -var keyWrappingCallbackFunc KeyWrappingCallbackFunc - -//export keyWrappingCallback -func keyWrappingCallback(kEKParams C.Lib3MF_AccessRight, inBuffer *C.uint8_t, outBuffer *C.uint8_t, userData C.Lib3MF_pvoid, status *C.uint64_t) { - if keyWrappingCallbackFunc == nil { - return +// GetTex2Coord obtains a tex2coord to the Texture2DGroup. +func (inst Texture2DGroup) GetTex2Coord(propertyID uint32) (Tex2Coord, error) { + var uVCoordinate C.sLib3MFTex2Coord + ret := C.CCall_lib3mf_texture2dgroup_gettex2coord(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), &uVCoordinate) + if ret != 0 { + return Tex2Coord{}, makeError(uint32(ret)) } - keyWrappingCallbackFunc(, ([][]uint8)(unsafe.Pointer(&inBuffer[0])), ([][]uint8)(unsafe.Pointer(&outBuffer[0])), uintptr(userData), (*uint64)(status)) + return *(*Tex2Coord)(unsafe.Pointer(&uVCoordinate)), nil } -// ContentEncryptionCallbackFunc a callback to encrypt/decrypt content called on each resource encrypted. This might be called several times depending on content size. If Input is not available(either null or size is 0), clients must return the result of authenticated tag generation/validation. -type ContentEncryptionCallbackFunc = func(cEKParams ContentEncryptionParams, input []uint8, output []uint8, userData uintptr, status *uint64) - -var contentEncryptionCallbackFunc ContentEncryptionCallbackFunc - -//export contentEncryptionCallback -func contentEncryptionCallback(cEKParams C.Lib3MF_ContentEncryptionParams, input *C.uint8_t, output *C.uint8_t, userData C.Lib3MF_pvoid, status *C.uint64_t) { - if contentEncryptionCallbackFunc == nil { - return +// RemoveTex2Coord removes a tex2coords from the Texture2DGroup. +func (inst Texture2DGroup) RemoveTex2Coord(propertyID uint32) error { + ret := C.CCall_lib3mf_texture2dgroup_removetex2coord(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID)) + if ret != 0 { + return makeError(uint32(ret)) } - contentEncryptionCallbackFunc(, ([][]uint8)(unsafe.Pointer(&input[0])), ([][]uint8)(unsafe.Pointer(&output[0])), uintptr(userData), (*uint64)(status)) + return nil } -// Wrapper represents the number wrapper -type Wrapper struct { - _ [0]func() // uncomparable; to make == not compile - LibraryHandle ref +// GetTexture2D obtains the texture2D instance of this group. +func (inst Texture2DGroup) GetTexture2D() (Texture2D, error) { + var texture2DInstance ref + ret := C.CCall_lib3mf_texture2dgroup_gettexture2d(inst.wrapperRef.LibraryHandle, inst.Ref, &texture2DInstance) + if ret != 0 { + return Texture2D{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewTexture2D(texture2DInstance), nil } -// Base represents a Lib3MF class. -type Base struct { - _ [0]func() // uncomparable; to make == not compile - Ref ref // identifies a C value, see ref type - wrapperRef Wrapper - gcPtr *ref // used to trigger the finalizer when the Value is not referenced any more -} -// NewBase creates a new Base. -// The wrapped C pointer will be freed when the Go pointer is finalized, -// but one can release it manually calling Release. -func (wrapper Wrapper) NewBase(r ref) Base { - gcPtr := new(ref) - *gcPtr = r - runtime.SetFinalizer(gcPtr, wrapper.releaseC) - return Base{Ref: r, gcPtr: gcPtr, wrapperRef: wrapper} +// CompositeMaterials represents a Lib3MF class. +type CompositeMaterials struct { + Resource } -// Release releases the C pointer. -func (inst Base) Release() error { - err := inst.wrapperRef.Release(inst) - *inst.gcPtr = nil - return err +func (wrapper Wrapper) NewCompositeMaterials(r ref) CompositeMaterials { + return CompositeMaterials{wrapper.NewResource(r)} } -// Equal reports whether inst and w refer to the same C pointer. -func (inst Base) Equal(w Base) bool { - return inst.Ref == w.Ref -} -// ClassTypeId get Class Type Id. -func (inst Base) ClassTypeId() (uint64, error) { - var classTypeId C.uint64_t - ret := C.CCall_lib3mf_base_classtypeid(inst.wrapperRef.LibraryHandle, inst.Ref, &classTypeId) +// GetCount retrieves the count of Composite-s in the CompositeMaterials. +func (inst CompositeMaterials) GetCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_compositematerials_getcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) if ret != 0 { return 0, makeError(uint32(ret)) } - return uint64(classTypeId), nil + return uint32(count), nil } - -// Writer represents a Lib3MF class. -type Writer struct { - Base +// GetAllPropertyIDs returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials. +func (inst CompositeMaterials) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error) { + var neededforpropertyIDs C.uint64_t + ret := C.CCall_lib3mf_compositematerials_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertyIDs, nil) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + if len(propertyIDs) < int(neededforpropertyIDs) { + propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + } + ret = C.CCall_lib3mf_compositematerials_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return propertyIDs[:int(neededforpropertyIDs)], nil } -func (wrapper Wrapper) NewWriter(r ref) Writer { - return Writer{wrapper.NewBase(r)} +// GetBaseMaterialGroup obtains the BaseMaterialGroup instance of this CompositeMaterials. +func (inst CompositeMaterials) GetBaseMaterialGroup() (BaseMaterialGroup, error) { + var baseMaterialGroupInstance ref + ret := C.CCall_lib3mf_compositematerials_getbasematerialgroup(inst.wrapperRef.LibraryHandle, inst.Ref, &baseMaterialGroupInstance) + if ret != 0 { + return BaseMaterialGroup{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewBaseMaterialGroup(baseMaterialGroupInstance), nil } -// WriteToFile writes out the model as file. The file type is specified by the Model Writer class. -func (inst Writer) WriteToFile(filename string) error { - ret := C.CCall_lib3mf_writer_writetofile(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(filename)[0]))) +// AddComposite adds a new Composite-Mixing Values to the CompositeMaterials. +func (inst CompositeMaterials) AddComposite(composite []CompositeConstituent) (uint32, error) { + var propertyID C.uint32_t + ret := C.CCall_lib3mf_compositematerials_addcomposite(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(composite)), (*C.sLib3MFCompositeConstituent)(unsafe.Pointer(&composite[0])), &propertyID) if ret != 0 { - return makeError(uint32(ret)) + return 0, makeError(uint32(ret)) } - return nil + return uint32(propertyID), nil } -// GetStreamSize retrieves the size of the full 3MF file stream. -func (inst Writer) GetStreamSize() (uint64, error) { - var streamSize C.uint64_t - ret := C.CCall_lib3mf_writer_getstreamsize(inst.wrapperRef.LibraryHandle, inst.Ref, &streamSize) +// RemoveComposite removes a Composite-Maxing Ratio from the CompositeMaterials. +func (inst CompositeMaterials) RemoveComposite(propertyID uint32) error { + ret := C.CCall_lib3mf_compositematerials_removecomposite(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID)) if ret != 0 { - return 0, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return uint64(streamSize), nil + return nil } -// WriteToBuffer writes out the 3MF file into a memory buffer. -func (inst Writer) WriteToBuffer(buffer []uint8) ([]uint8, error) { - var neededforbuffer C.uint64_t - ret := C.CCall_lib3mf_writer_writetobuffer(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforbuffer, nil) +// GetComposite obtains a Composite-Maxing Ratio of this CompositeMaterials. +func (inst CompositeMaterials) GetComposite(propertyID uint32, composite []CompositeConstituent) ([]CompositeConstituent, error) { + var neededforcomposite C.uint64_t + ret := C.CCall_lib3mf_compositematerials_getcomposite(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), 0, &neededforcomposite, nil) if ret != 0 { return nil, makeError(uint32(ret)) } - if len(buffer) < int(neededforbuffer) { - buffer = append(buffer, make([]uint8, int(neededforbuffer)-len(buffer))...) + if len(composite) < int(neededforcomposite) { + composite = append(composite, make([]CompositeConstituent, int(neededforcomposite)-len(composite))...) } - ret = C.CCall_lib3mf_writer_writetobuffer(inst.wrapperRef.LibraryHandle, inst.Ref, neededforbuffer, nil, (*C.uint8_t)(unsafe.Pointer(&buffer[0]))) + ret = C.CCall_lib3mf_compositematerials_getcomposite(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), neededforcomposite, nil, (*C.sLib3MFCompositeConstituent)(unsafe.Pointer(&composite[0]))) if ret != 0 { return nil, makeError(uint32(ret)) } - return buffer[:int(neededforbuffer)], nil + return composite[:int(neededforcomposite)], nil } -// WriteToCallback writes out the model and passes the data to a provided callback function. The file type is specified by the Model Writer class. -func (inst Writer) WriteToCallback(theWriteCallback WriteCallbackFunc, theSeekCallback SeekCallbackFunc, userData uintptr) error { - ret := C.CCall_lib3mf_writer_writetocallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFWriteCallback)(unsafe.Pointer(C.Lib3MFWriteCallback_cgo)), (C.Lib3MFSeekCallback)(unsafe.Pointer(C.Lib3MFSeekCallback_cgo)), (C.Lib3MF_pvoid)(userData)) + +// MultiPropertyGroup represents a Lib3MF class. +type MultiPropertyGroup struct { + Resource +} + +func (wrapper Wrapper) NewMultiPropertyGroup(r ref) MultiPropertyGroup { + return MultiPropertyGroup{wrapper.NewResource(r)} +} + +// GetCount retrieves the count of MultiProperty-s in the MultiPropertyGroup. +func (inst MultiPropertyGroup) GetCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_multipropertygroup_getcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) if ret != 0 { - return makeError(uint32(ret)) + return 0, makeError(uint32(ret)) } - writeCallbackFunc = theWriteCallback - seekCallbackFunc = theSeekCallback - return nil + return uint32(count), nil } -// SetProgressCallback set the progress callback for calls to this writer. -func (inst Writer) SetProgressCallback(progressCallback ProgressCallbackFunc, userData uintptr) error { - ret := C.CCall_lib3mf_writer_setprogresscallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFProgressCallback)(unsafe.Pointer(C.Lib3MFProgressCallback_cgo)), (C.Lib3MF_pvoid)(userData)) +// GetAllPropertyIDs returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup. +func (inst MultiPropertyGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error) { + var neededforpropertyIDs C.uint64_t + ret := C.CCall_lib3mf_multipropertygroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertyIDs, nil) if ret != 0 { - return makeError(uint32(ret)) + return nil, makeError(uint32(ret)) } - progressCallbackFunc = progressCallback - return nil + if len(propertyIDs) < int(neededforpropertyIDs) { + propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + } + ret = C.CCall_lib3mf_multipropertygroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) + if ret != 0 { + return nil, makeError(uint32(ret)) + } + return propertyIDs[:int(neededforpropertyIDs)], nil } -// GetDecimalPrecision returns the number of digits after the decimal point to be written in each vertex coordinate-value. -func (inst Writer) GetDecimalPrecision() (uint32, error) { - var decimalPrecision C.uint32_t - ret := C.CCall_lib3mf_writer_getdecimalprecision(inst.wrapperRef.LibraryHandle, inst.Ref, &decimalPrecision) +// AddMultiProperty adds a new MultiProperty to the MultiPropertyGroup. +func (inst MultiPropertyGroup) AddMultiProperty(propertyIDs []uint32) (uint32, error) { + var propertyID C.uint32_t + ret := C.CCall_lib3mf_multipropertygroup_addmultiproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(propertyIDs)), (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0])), &propertyID) if ret != 0 { return 0, makeError(uint32(ret)) } - return uint32(decimalPrecision), nil + return uint32(propertyID), nil } -// SetDecimalPrecision sets the number of digits after the decimal point to be written in each vertex coordinate-value. -func (inst Writer) SetDecimalPrecision(decimalPrecision uint32) error { - ret := C.CCall_lib3mf_writer_setdecimalprecision(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(decimalPrecision)) +// SetMultiProperty sets the PropertyIDs of a MultiProperty. +func (inst MultiPropertyGroup) SetMultiProperty(propertyID uint32, propertyIDs []uint32) error { + ret := C.CCall_lib3mf_multipropertygroup_setmultiproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), C.uint64_t(len(propertyIDs)), (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) if ret != 0 { return makeError(uint32(ret)) } return nil } -// SetStrictModeActive activates (deactivates) the strict mode of the reader. -func (inst Writer) SetStrictModeActive(strictModeActive bool) error { - ret := C.CCall_lib3mf_writer_setstrictmodeactive(inst.wrapperRef.LibraryHandle, inst.Ref, C.bool(strictModeActive)) +// GetMultiProperty obtains the PropertyIDs of a MultiProperty. +func (inst MultiPropertyGroup) GetMultiProperty(propertyID uint32, propertyIDs []uint32) ([]uint32, error) { + var neededforpropertyIDs C.uint64_t + ret := C.CCall_lib3mf_multipropertygroup_getmultiproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), 0, &neededforpropertyIDs, nil) if ret != 0 { - return makeError(uint32(ret)) + return nil, makeError(uint32(ret)) } - return nil -} - -// GetStrictModeActive queries whether the strict mode of the reader is active or not. -func (inst Writer) GetStrictModeActive() (bool, error) { - var strictModeActive C.bool - ret := C.CCall_lib3mf_writer_getstrictmodeactive(inst.wrapperRef.LibraryHandle, inst.Ref, &strictModeActive) + if len(propertyIDs) < int(neededforpropertyIDs) { + propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + } + ret = C.CCall_lib3mf_multipropertygroup_getmultiproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) if ret != 0 { - return false, makeError(uint32(ret)) + return nil, makeError(uint32(ret)) } - return bool(strictModeActive), nil + return propertyIDs[:int(neededforpropertyIDs)], nil } -// GetWarning returns Warning and Error Information of the read process. -func (inst Writer) GetWarning(index uint32) (uint32, string, error) { - var errorCode C.uint32_t - var neededforwarning C.uint32_t - var filledinwarning C.uint32_t - ret := C.CCall_lib3mf_writer_getwarning(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &errorCode, 0, &neededforwarning, nil) +// RemoveMultiProperty removes a MultiProperty from this MultiPropertyGroup. +func (inst MultiPropertyGroup) RemoveMultiProperty(propertyID uint32) error { + ret := C.CCall_lib3mf_multipropertygroup_removemultiproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID)) if ret != 0 { - return 0, "", makeError(uint32(ret)) + return makeError(uint32(ret)) } - bufferSizewarning := neededforwarning - bufferwarning := make([]byte, bufferSizewarning) - ret = C.CCall_lib3mf_writer_getwarning(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &errorCode, bufferSizewarning, &filledinwarning, (*C.char)(unsafe.Pointer(&bufferwarning[0]))) + return nil +} + +// GetLayerCount retrieves the number of layers of this MultiPropertyGroup. +func (inst MultiPropertyGroup) GetLayerCount() (uint32, error) { + var count C.uint32_t + ret := C.CCall_lib3mf_multipropertygroup_getlayercount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) if ret != 0 { - return 0, "", makeError(uint32(ret)) + return 0, makeError(uint32(ret)) } - return uint32(errorCode), string(bufferwarning[:(filledinwarning-1)]), nil + return uint32(count), nil } -// GetWarningCount returns Warning and Error Count of the read process. -func (inst Writer) GetWarningCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_writer_getwarningcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// AddLayer adds a MultiPropertyLayer to this MultiPropertyGroup. +func (inst MultiPropertyGroup) AddLayer(theLayer MultiPropertyLayer) (uint32, error) { + var layerIndex C.uint32_t + ret := C.CCall_lib3mf_multipropertygroup_addlayer(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFMultiPropertyLayer)(unsafe.Pointer(&theLayer)), &layerIndex) if ret != 0 { return 0, makeError(uint32(ret)) } - return uint32(count), nil + return uint32(layerIndex), nil } -// AddKeyWrappingCallback registers a callback to deal with data key encryption/decryption from keystore. -func (inst Writer) AddKeyWrappingCallback(consumerID string, theCallback KeyWrappingCallbackFunc, userData uintptr) error { - ret := C.CCall_lib3mf_writer_addkeywrappingcallback(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(consumerID)[0])), (C.Lib3MFKeyWrappingCallback)(unsafe.Pointer(C.Lib3MFKeyWrappingCallback_cgo)), (C.Lib3MF_pvoid)(userData)) +// GetLayer obtains a MultiPropertyLayer of this MultiPropertyGroup. +func (inst MultiPropertyGroup) GetLayer(layerIndex uint32) (MultiPropertyLayer, error) { + var theLayer C.sLib3MFMultiPropertyLayer + ret := C.CCall_lib3mf_multipropertygroup_getlayer(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(layerIndex), &theLayer) if ret != 0 { - return makeError(uint32(ret)) + return MultiPropertyLayer{}, makeError(uint32(ret)) } - keyWrappingCallbackFunc = theCallback - return nil + return *(*MultiPropertyLayer)(unsafe.Pointer(&theLayer)), nil } -// SetContentEncryptionCallback registers a callback to deal with encryption of content. -func (inst Writer) SetContentEncryptionCallback(theCallback ContentEncryptionCallbackFunc, userData uintptr) error { - ret := C.CCall_lib3mf_writer_setcontentencryptioncallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFContentEncryptionCallback)(unsafe.Pointer(C.Lib3MFContentEncryptionCallback_cgo)), (C.Lib3MF_pvoid)(userData)) +// RemoveLayer removes a MultiPropertyLayer from this MultiPropertyGroup. +func (inst MultiPropertyGroup) RemoveLayer(layerIndex uint32) error { + ret := C.CCall_lib3mf_multipropertygroup_removelayer(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(layerIndex)) if ret != 0 { return makeError(uint32(ret)) } - contentEncryptionCallbackFunc = theCallback return nil } -// Reader represents a Lib3MF class. -type Reader struct { - Base +// Image3D represents a Lib3MF class. +type Image3D struct { + Resource } -func (wrapper Wrapper) NewReader(r ref) Reader { - return Reader{wrapper.NewBase(r)} +func (wrapper Wrapper) NewImage3D(r ref) Image3D { + return Image3D{wrapper.NewResource(r)} } -// ReadFromFile reads a model from a file. The file type is specified by the Model Reader class. -func (inst Reader) ReadFromFile(filename string) error { - ret := C.CCall_lib3mf_reader_readfromfile(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(filename)[0]))) +// GetName returns the name of this Image3D. +func (inst Image3D) GetName() (string, error) { + var neededforname C.uint32_t + var filledinname C.uint32_t + ret := C.CCall_lib3mf_image3d_getname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforname, nil) if ret != 0 { - return makeError(uint32(ret)) + return "", makeError(uint32(ret)) } - return nil + bufferSizename := neededforname + buffername := make([]byte, bufferSizename) + ret = C.CCall_lib3mf_image3d_getname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizename, &filledinname, (*C.char)(unsafe.Pointer(&buffername[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(buffername[:(filledinname-1)]), nil } -// ReadFromBuffer reads a model from a memory buffer. -func (inst Reader) ReadFromBuffer(buffer []uint8) error { - ret := C.CCall_lib3mf_reader_readfrombuffer(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(buffer)), (*C.uint8_t)(unsafe.Pointer(&buffer[0]))) +// SetName sets a new name of this Image3D. +func (inst Image3D) SetName(name string) error { + ret := C.CCall_lib3mf_image3d_setname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(name)[0]))) if ret != 0 { return makeError(uint32(ret)) } return nil } -// ReadFromCallback reads a model and from the data provided by a callback function. -func (inst Reader) ReadFromCallback(theReadCallback ReadCallbackFunc, streamSize uint64, theSeekCallback SeekCallbackFunc, userData uintptr) error { - ret := C.CCall_lib3mf_reader_readfromcallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFReadCallback)(unsafe.Pointer(C.Lib3MFReadCallback_cgo)), C.uint64_t(streamSize), (C.Lib3MFSeekCallback)(unsafe.Pointer(C.Lib3MFSeekCallback_cgo)), (C.Lib3MF_pvoid)(userData)) +// IsImageStack retrieves, if this Image3D is a ImageStack. +func (inst Image3D) IsImageStack() (bool, error) { + var isImageStack C.bool + ret := C.CCall_lib3mf_image3d_isimagestack(inst.wrapperRef.LibraryHandle, inst.Ref, &isImageStack) if ret != 0 { - return makeError(uint32(ret)) + return false, makeError(uint32(ret)) } - readCallbackFunc = theReadCallback - seekCallbackFunc = theSeekCallback - return nil + return bool(isImageStack), nil } -// SetProgressCallback set the progress callback for calls to this writer. -func (inst Reader) SetProgressCallback(progressCallback ProgressCallbackFunc, userData uintptr) error { - ret := C.CCall_lib3mf_reader_setprogresscallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFProgressCallback)(unsafe.Pointer(C.Lib3MFProgressCallback_cgo)), (C.Lib3MF_pvoid)(userData)) + +// ImageStack represents a Lib3MF class. +type ImageStack struct { + Image3D +} + +func (wrapper Wrapper) NewImageStack(r ref) ImageStack { + return ImageStack{wrapper.NewImage3D(r)} +} + +// GetRowCount retrieves the number of rows in each image of this image3d. +func (inst ImageStack) GetRowCount() (uint32, error) { + var rowCount C.uint32_t + ret := C.CCall_lib3mf_imagestack_getrowcount(inst.wrapperRef.LibraryHandle, inst.Ref, &rowCount) if ret != 0 { - return makeError(uint32(ret)) + return 0, makeError(uint32(ret)) } - progressCallbackFunc = progressCallback - return nil + return uint32(rowCount), nil } -// AddRelationToRead adds a relationship type which shall be read as attachment in memory while loading. -func (inst Reader) AddRelationToRead(relationShipType string) error { - ret := C.CCall_lib3mf_reader_addrelationtoread(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(relationShipType)[0]))) +// SetRowCount sets the number of rows in each image of this image3d. +func (inst ImageStack) SetRowCount(rowCount uint32) error { + ret := C.CCall_lib3mf_imagestack_setrowcount(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(rowCount)) if ret != 0 { return makeError(uint32(ret)) } return nil } -// RemoveRelationToRead removes a relationship type which shall be read as attachment in memory while loading. -func (inst Reader) RemoveRelationToRead(relationShipType string) error { - ret := C.CCall_lib3mf_reader_removerelationtoread(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(relationShipType)[0]))) +// GetColumnCount retrieves the number of columns in each image of this image3d. +func (inst ImageStack) GetColumnCount() (uint32, error) { + var columnCount C.uint32_t + ret := C.CCall_lib3mf_imagestack_getcolumncount(inst.wrapperRef.LibraryHandle, inst.Ref, &columnCount) if ret != 0 { - return makeError(uint32(ret)) + return 0, makeError(uint32(ret)) } - return nil + return uint32(columnCount), nil } -// SetStrictModeActive activates (deactivates) the strict mode of the reader. -func (inst Reader) SetStrictModeActive(strictModeActive bool) error { - ret := C.CCall_lib3mf_reader_setstrictmodeactive(inst.wrapperRef.LibraryHandle, inst.Ref, C.bool(strictModeActive)) +// SetColumnCount sets the number of columns in each image of this image3d. +func (inst ImageStack) SetColumnCount(columnCount uint32) error { + ret := C.CCall_lib3mf_imagestack_setcolumncount(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(columnCount)) if ret != 0 { return makeError(uint32(ret)) } return nil } -// GetStrictModeActive queries whether the strict mode of the reader is active or not. -func (inst Reader) GetStrictModeActive() (bool, error) { - var strictModeActive C.bool - ret := C.CCall_lib3mf_reader_getstrictmodeactive(inst.wrapperRef.LibraryHandle, inst.Ref, &strictModeActive) +// GetSheetCount retrieves the number of images in the stack. +func (inst ImageStack) GetSheetCount() (uint32, error) { + var sheetCount C.uint32_t + ret := C.CCall_lib3mf_imagestack_getsheetcount(inst.wrapperRef.LibraryHandle, inst.Ref, &sheetCount) if ret != 0 { - return false, makeError(uint32(ret)) + return 0, makeError(uint32(ret)) } - return bool(strictModeActive), nil + return uint32(sheetCount), nil } -// GetWarning returns Warning and Error Information of the read process. -func (inst Reader) GetWarning(index uint32) (uint32, string, error) { - var errorCode C.uint32_t - var neededforwarning C.uint32_t - var filledinwarning C.uint32_t - ret := C.CCall_lib3mf_reader_getwarning(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &errorCode, 0, &neededforwarning, nil) +// GetSheet retrieves a sheet of the stack. Raises an error if sheet is not set. +func (inst ImageStack) GetSheet(index uint32) (Attachment, error) { + var sheet ref + ret := C.CCall_lib3mf_imagestack_getsheet(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &sheet) if ret != 0 { - return 0, "", makeError(uint32(ret)) + return Attachment{}, makeError(uint32(ret)) } - bufferSizewarning := neededforwarning - bufferwarning := make([]byte, bufferSizewarning) - ret = C.CCall_lib3mf_reader_getwarning(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &errorCode, bufferSizewarning, &filledinwarning, (*C.char)(unsafe.Pointer(&bufferwarning[0]))) + return inst.wrapperRef.NewAttachment(sheet), nil +} + +// SetSheet sets a sheet to an existing attachment. +func (inst ImageStack) SetSheet(index uint32, sheet Attachment) error { + ret := C.CCall_lib3mf_imagestack_setsheet(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), sheet.Ref) if ret != 0 { - return 0, "", makeError(uint32(ret)) + return makeError(uint32(ret)) } - return uint32(errorCode), string(bufferwarning[:(filledinwarning-1)]), nil + return nil } -// GetWarningCount returns Warning and Error Count of the read process. -func (inst Reader) GetWarningCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_reader_getwarningcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// CreateEmptySheet creates a new sheet attachment with empty data. +func (inst ImageStack) CreateEmptySheet(index uint32, path string) (Attachment, error) { + var sheet ref + ret := C.CCall_lib3mf_imagestack_createemptysheet(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.char)(unsafe.Pointer(&[]byte(path)[0])), &sheet) if ret != 0 { - return 0, makeError(uint32(ret)) + return Attachment{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewAttachment(sheet), nil } -// AddKeyWrappingCallback registers a callback to deal with key wrapping mechanism from keystore. -func (inst Reader) AddKeyWrappingCallback(consumerID string, theCallback KeyWrappingCallbackFunc, userData uintptr) error { - ret := C.CCall_lib3mf_reader_addkeywrappingcallback(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(consumerID)[0])), (C.Lib3MFKeyWrappingCallback)(unsafe.Pointer(C.Lib3MFKeyWrappingCallback_cgo)), (C.Lib3MF_pvoid)(userData)) +// CreateSheetFromBuffer creates a new sheet attachment from a memory buffer. +func (inst ImageStack) CreateSheetFromBuffer(index uint32, path string, data []uint8) (Attachment, error) { + var sheet ref + ret := C.CCall_lib3mf_imagestack_createsheetfrombuffer(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.char)(unsafe.Pointer(&[]byte(path)[0])), C.uint64_t(len(data)), (*C.uint8_t)(unsafe.Pointer(&data[0])), &sheet) if ret != 0 { - return makeError(uint32(ret)) + return Attachment{}, makeError(uint32(ret)) } - keyWrappingCallbackFunc = theCallback - return nil + return inst.wrapperRef.NewAttachment(sheet), nil } -// SetContentEncryptionCallback registers a callback to deal with encryption of content. -func (inst Reader) SetContentEncryptionCallback(theCallback ContentEncryptionCallbackFunc, userData uintptr) error { - ret := C.CCall_lib3mf_reader_setcontentencryptioncallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFContentEncryptionCallback)(unsafe.Pointer(C.Lib3MFContentEncryptionCallback_cgo)), (C.Lib3MF_pvoid)(userData)) +// CreateSheetFromFile creates a new sheet attachment from a file on disk. +func (inst ImageStack) CreateSheetFromFile(index uint32, path string, fileName string) (Attachment, error) { + var sheet ref + ret := C.CCall_lib3mf_imagestack_createsheetfromfile(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.char)(unsafe.Pointer(&[]byte(path)[0])), (*C.char)(unsafe.Pointer(&[]byte(fileName)[0])), &sheet) if ret != 0 { - return makeError(uint32(ret)) + return Attachment{}, makeError(uint32(ret)) } - contentEncryptionCallbackFunc = theCallback - return nil + return inst.wrapperRef.NewAttachment(sheet), nil } -// PackagePart represents a Lib3MF class. -type PackagePart struct { +// Attachment represents a Lib3MF class. +type Attachment struct { Base } -func (wrapper Wrapper) NewPackagePart(r ref) PackagePart { - return PackagePart{wrapper.NewBase(r)} +func (wrapper Wrapper) NewAttachment(r ref) Attachment { + return Attachment{wrapper.NewBase(r)} } -// GetPath returns the absolute path of this PackagePart. -func (inst PackagePart) GetPath() (string, error) { +// GetPath retrieves an attachment's package path. This function will be removed in a later release. +func (inst Attachment) GetPath() (string, error) { var neededforpath C.uint32_t var filledinpath C.uint32_t - ret := C.CCall_lib3mf_packagepart_getpath(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpath, nil) + ret := C.CCall_lib3mf_attachment_getpath(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpath, nil) if ret != 0 { return "", makeError(uint32(ret)) } bufferSizepath := neededforpath bufferpath := make([]byte, bufferSizepath) - ret = C.CCall_lib3mf_packagepart_getpath(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizepath, &filledinpath, (*C.char)(unsafe.Pointer(&bufferpath[0]))) + ret = C.CCall_lib3mf_attachment_getpath(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizepath, &filledinpath, (*C.char)(unsafe.Pointer(&bufferpath[0]))) if ret != 0 { return "", makeError(uint32(ret)) } return string(bufferpath[:(filledinpath-1)]), nil } -// SetPath sets the absolute path of this PackagePart. -func (inst PackagePart) SetPath(path string) error { - ret := C.CCall_lib3mf_packagepart_setpath(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(path)[0]))) +// SetPath sets an attachment's package path. This function will be removed in a later release. +func (inst Attachment) SetPath(path string) error { + ret := C.CCall_lib3mf_attachment_setpath(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(path)[0]))) if ret != 0 { return makeError(uint32(ret)) } return nil } - -// Resource represents a Lib3MF class. -type Resource struct { - Base -} - -func (wrapper Wrapper) NewResource(r ref) Resource { - return Resource{wrapper.NewBase(r)} -} - -// GetResourceID retrieves the unique id of this resource within a package. This function will be removed in a later release in favor of GetUniqueResourceID. -func (inst Resource) GetResourceID() (uint32, error) { - var uniqueResourceID C.uint32_t - ret := C.CCall_lib3mf_resource_getresourceid(inst.wrapperRef.LibraryHandle, inst.Ref, &uniqueResourceID) +// PackagePart returns the PackagePart that is this attachment. +func (inst Attachment) PackagePart() (PackagePart, error) { + var packagePart ref + ret := C.CCall_lib3mf_attachment_packagepart(inst.wrapperRef.LibraryHandle, inst.Ref, &packagePart) if ret != 0 { - return 0, makeError(uint32(ret)) + return PackagePart{}, makeError(uint32(ret)) } - return uint32(uniqueResourceID), nil + return inst.wrapperRef.NewPackagePart(packagePart), nil } -// GetUniqueResourceID retrieves the unique id of this resource within a package. -func (inst Resource) GetUniqueResourceID() (uint32, error) { - var uniqueResourceID C.uint32_t - ret := C.CCall_lib3mf_resource_getuniqueresourceid(inst.wrapperRef.LibraryHandle, inst.Ref, &uniqueResourceID) +// GetRelationShipType retrieves an attachment's relationship type. +func (inst Attachment) GetRelationShipType() (string, error) { + var neededforpath C.uint32_t + var filledinpath C.uint32_t + ret := C.CCall_lib3mf_attachment_getrelationshiptype(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpath, nil) if ret != 0 { - return 0, makeError(uint32(ret)) + return "", makeError(uint32(ret)) } - return uint32(uniqueResourceID), nil -} - -// PackagePart returns the PackagePart within which this resource resides. -func (inst Resource) PackagePart() (PackagePart, error) { - var packagePart ref - ret := C.CCall_lib3mf_resource_packagepart(inst.wrapperRef.LibraryHandle, inst.Ref, &packagePart) + bufferSizepath := neededforpath + bufferpath := make([]byte, bufferSizepath) + ret = C.CCall_lib3mf_attachment_getrelationshiptype(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizepath, &filledinpath, (*C.char)(unsafe.Pointer(&bufferpath[0]))) if ret != 0 { - return PackagePart{}, makeError(uint32(ret)) + return "", makeError(uint32(ret)) } - return inst.wrapperRef.NewPackagePart(packagePart), nil + return string(bufferpath[:(filledinpath-1)]), nil } -// SetPackagePart sets the new PackagePart within which this resource resides. -func (inst Resource) SetPackagePart(packagePart PackagePart) error { - ret := C.CCall_lib3mf_resource_setpackagepart(inst.wrapperRef.LibraryHandle, inst.Ref, packagePart.Ref) +// SetRelationShipType sets an attachment's relationship type. +func (inst Attachment) SetRelationShipType(path string) error { + ret := C.CCall_lib3mf_attachment_setrelationshiptype(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(path)[0]))) if ret != 0 { return makeError(uint32(ret)) } return nil } -// GetModelResourceID retrieves the id of this resource within a model. -func (inst Resource) GetModelResourceID() (uint32, error) { - var modelResourceId C.uint32_t - ret := C.CCall_lib3mf_resource_getmodelresourceid(inst.wrapperRef.LibraryHandle, inst.Ref, &modelResourceId) +// WriteToFile writes out the attachment as file. +func (inst Attachment) WriteToFile(fileName string) error { + ret := C.CCall_lib3mf_attachment_writetofile(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(fileName)[0]))) if ret != 0 { - return 0, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return uint32(modelResourceId), nil -} - - -// ResourceIterator represents a Lib3MF class. -type ResourceIterator struct { - Base + return nil } -func (wrapper Wrapper) NewResourceIterator(r ref) ResourceIterator { - return ResourceIterator{wrapper.NewBase(r)} +// ReadFromFile reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +func (inst Attachment) ReadFromFile(fileName string) error { + ret := C.CCall_lib3mf_attachment_readfromfile(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(fileName)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil } -// MoveNext iterates to the next resource in the list. -func (inst ResourceIterator) MoveNext() (bool, error) { - var hasNext C.bool - ret := C.CCall_lib3mf_resourceiterator_movenext(inst.wrapperRef.LibraryHandle, inst.Ref, &hasNext) +// ReadFromCallback reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +func (inst Attachment) ReadFromCallback(theReadCallback ReadCallbackFunc, streamSize uint64, theSeekCallback SeekCallbackFunc, userData uintptr) error { + ret := C.CCall_lib3mf_attachment_readfromcallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFReadCallback)(unsafe.Pointer(C.Lib3MFReadCallback_cgo)), C.uint64_t(streamSize), (C.Lib3MFSeekCallback)(unsafe.Pointer(C.Lib3MFSeekCallback_cgo)), (C.Lib3MF_pvoid)(userData)) if ret != 0 { - return false, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return bool(hasNext), nil + readCallbackFunc = theReadCallback + seekCallbackFunc = theSeekCallback + return nil } -// MovePrevious iterates to the previous resource in the list. -func (inst ResourceIterator) MovePrevious() (bool, error) { - var hasPrevious C.bool - ret := C.CCall_lib3mf_resourceiterator_moveprevious(inst.wrapperRef.LibraryHandle, inst.Ref, &hasPrevious) +// GetStreamSize retrieves the size of the attachment stream. +func (inst Attachment) GetStreamSize() (uint64, error) { + var streamSize C.uint64_t + ret := C.CCall_lib3mf_attachment_getstreamsize(inst.wrapperRef.LibraryHandle, inst.Ref, &streamSize) if ret != 0 { - return false, makeError(uint32(ret)) + return 0, makeError(uint32(ret)) } - return bool(hasPrevious), nil + return uint64(streamSize), nil } -// GetCurrent returns the resource the iterator points at. -func (inst ResourceIterator) GetCurrent() (Resource, error) { - var resource ref - ret := C.CCall_lib3mf_resourceiterator_getcurrent(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) +// WriteToBuffer writes out the attachment into a buffer. +func (inst Attachment) WriteToBuffer(buffer []uint8) ([]uint8, error) { + var neededforbuffer C.uint64_t + ret := C.CCall_lib3mf_attachment_writetobuffer(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforbuffer, nil) if ret != 0 { - return Resource{}, makeError(uint32(ret)) + return nil, makeError(uint32(ret)) } - return inst.wrapperRef.NewResource(resource), nil -} - -// Clone creates a new resource iterator with the same resource list. -func (inst ResourceIterator) Clone() (ResourceIterator, error) { - var outResourceIterator ref - ret := C.CCall_lib3mf_resourceiterator_clone(inst.wrapperRef.LibraryHandle, inst.Ref, &outResourceIterator) + if len(buffer) < int(neededforbuffer) { + buffer = append(buffer, make([]uint8, int(neededforbuffer)-len(buffer))...) + } + ret = C.CCall_lib3mf_attachment_writetobuffer(inst.wrapperRef.LibraryHandle, inst.Ref, neededforbuffer, nil, (*C.uint8_t)(unsafe.Pointer(&buffer[0]))) if ret != 0 { - return ResourceIterator{}, makeError(uint32(ret)) + return nil, makeError(uint32(ret)) } - return inst.wrapperRef.NewResourceIterator(outResourceIterator), nil + return buffer[:int(neededforbuffer)], nil } -// Count returns the number of resoucres the iterator captures. -func (inst ResourceIterator) Count() (uint64, error) { - var count C.uint64_t - ret := C.CCall_lib3mf_resourceiterator_count(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// ReadFromBuffer reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +func (inst Attachment) ReadFromBuffer(buffer []uint8) error { + ret := C.CCall_lib3mf_attachment_readfrombuffer(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(buffer)), (*C.uint8_t)(unsafe.Pointer(&buffer[0]))) if ret != 0 { - return 0, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return uint64(count), nil + return nil } -// SliceStackIterator represents a Lib3MF class. -type SliceStackIterator struct { - ResourceIterator +// Texture2D represents a Lib3MF class. +type Texture2D struct { + Resource } -func (wrapper Wrapper) NewSliceStackIterator(r ref) SliceStackIterator { - return SliceStackIterator{wrapper.NewResourceIterator(r)} +func (wrapper Wrapper) NewTexture2D(r ref) Texture2D { + return Texture2D{wrapper.NewResource(r)} } -// GetCurrentSliceStack returns the SliceStack the iterator points at. -func (inst SliceStackIterator) GetCurrentSliceStack() (SliceStack, error) { - var resource ref - ret := C.CCall_lib3mf_slicestackiterator_getcurrentslicestack(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) +// GetAttachment retrieves the attachment located at the path of the texture. +func (inst Texture2D) GetAttachment() (Attachment, error) { + var attachment ref + ret := C.CCall_lib3mf_texture2d_getattachment(inst.wrapperRef.LibraryHandle, inst.Ref, &attachment) if ret != 0 { - return SliceStack{}, makeError(uint32(ret)) + return Attachment{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewSliceStack(resource), nil -} - - -// ObjectIterator represents a Lib3MF class. -type ObjectIterator struct { - ResourceIterator -} - -func (wrapper Wrapper) NewObjectIterator(r ref) ObjectIterator { - return ObjectIterator{wrapper.NewResourceIterator(r)} + return inst.wrapperRef.NewAttachment(attachment), nil } -// GetCurrentObject returns the Object the iterator points at. -func (inst ObjectIterator) GetCurrentObject() (Object, error) { - var resource ref - ret := C.CCall_lib3mf_objectiterator_getcurrentobject(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) +// SetAttachment sets the texture's package path to the path of the attachment. +func (inst Texture2D) SetAttachment(attachment Attachment) error { + ret := C.CCall_lib3mf_texture2d_setattachment(inst.wrapperRef.LibraryHandle, inst.Ref, attachment.Ref) if ret != 0 { - return Object{}, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return inst.wrapperRef.NewObject(resource), nil + return nil } - -// MeshObjectIterator represents a Lib3MF class. -type MeshObjectIterator struct { - ResourceIterator +// GetContentType retrieves a texture's content type. +func (inst Texture2D) GetContentType() (TextureType, error) { + var contentType C.eLib3MFTextureType + ret := C.CCall_lib3mf_texture2d_getcontenttype(inst.wrapperRef.LibraryHandle, inst.Ref, &contentType) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return TextureType(contentType), nil } -func (wrapper Wrapper) NewMeshObjectIterator(r ref) MeshObjectIterator { - return MeshObjectIterator{wrapper.NewResourceIterator(r)} +// SetContentType retrieves a texture's content type. +func (inst Texture2D) SetContentType(contentType TextureType) error { + ret := C.CCall_lib3mf_texture2d_setcontenttype(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFTextureType(contentType)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil } -// GetCurrentMeshObject returns the MeshObject the iterator points at. -func (inst MeshObjectIterator) GetCurrentMeshObject() (MeshObject, error) { - var resource ref - ret := C.CCall_lib3mf_meshobjectiterator_getcurrentmeshobject(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) +// GetTileStyleUV retrieves a texture's tilestyle type. +func (inst Texture2D) GetTileStyleUV() (TextureTileStyle, TextureTileStyle, error) { + var tileStyleU C.eLib3MFTextureTileStyle + var tileStyleV C.eLib3MFTextureTileStyle + ret := C.CCall_lib3mf_texture2d_gettilestyleuv(inst.wrapperRef.LibraryHandle, inst.Ref, &tileStyleU, &tileStyleV) if ret != 0 { - return MeshObject{}, makeError(uint32(ret)) + return 0, 0, makeError(uint32(ret)) } - return inst.wrapperRef.NewMeshObject(resource), nil + return TextureTileStyle(tileStyleU), TextureTileStyle(tileStyleV), nil } - -// ComponentsObjectIterator represents a Lib3MF class. -type ComponentsObjectIterator struct { - ResourceIterator +// SetTileStyleUV sets a texture's tilestyle type. +func (inst Texture2D) SetTileStyleUV(tileStyleU TextureTileStyle, tileStyleV TextureTileStyle) error { + ret := C.CCall_lib3mf_texture2d_settilestyleuv(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFTextureTileStyle(tileStyleU), C.eLib3MFTextureTileStyle(tileStyleV)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil } -func (wrapper Wrapper) NewComponentsObjectIterator(r ref) ComponentsObjectIterator { - return ComponentsObjectIterator{wrapper.NewResourceIterator(r)} +// GetFilter retrieves a texture's filter type. +func (inst Texture2D) GetFilter() (TextureFilter, error) { + var filter C.eLib3MFTextureFilter + ret := C.CCall_lib3mf_texture2d_getfilter(inst.wrapperRef.LibraryHandle, inst.Ref, &filter) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return TextureFilter(filter), nil } -// GetCurrentComponentsObject returns the ComponentsObject the iterator points at. -func (inst ComponentsObjectIterator) GetCurrentComponentsObject() (ComponentsObject, error) { - var resource ref - ret := C.CCall_lib3mf_componentsobjectiterator_getcurrentcomponentsobject(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) +// SetFilter sets a texture's filter type. +func (inst Texture2D) SetFilter(filter TextureFilter) error { + ret := C.CCall_lib3mf_texture2d_setfilter(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFTextureFilter(filter)) if ret != 0 { - return ComponentsObject{}, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return inst.wrapperRef.NewComponentsObject(resource), nil + return nil } -// Texture2DIterator represents a Lib3MF class. -type Texture2DIterator struct { - ResourceIterator +// ImplicitPort represents a Lib3MF class. +type ImplicitPort struct { + Base } -func (wrapper Wrapper) NewTexture2DIterator(r ref) Texture2DIterator { - return Texture2DIterator{wrapper.NewResourceIterator(r)} +func (wrapper Wrapper) NewImplicitPort(r ref) ImplicitPort { + return ImplicitPort{wrapper.NewBase(r)} } -// GetCurrentTexture2D returns the Texture2D the iterator points at. -func (inst Texture2DIterator) GetCurrentTexture2D() (Texture2D, error) { - var resource ref - ret := C.CCall_lib3mf_texture2diterator_getcurrenttexture2d(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) +// GetIdentifier retrieves the identifier of the port. +func (inst ImplicitPort) GetIdentifier() (string, error) { + var neededforidentifier C.uint32_t + var filledinidentifier C.uint32_t + ret := C.CCall_lib3mf_implicitport_getidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforidentifier, nil) if ret != 0 { - return Texture2D{}, makeError(uint32(ret)) + return "", makeError(uint32(ret)) } - return inst.wrapperRef.NewTexture2D(resource), nil + bufferSizeidentifier := neededforidentifier + bufferidentifier := make([]byte, bufferSizeidentifier) + ret = C.CCall_lib3mf_implicitport_getidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizeidentifier, &filledinidentifier, (*C.char)(unsafe.Pointer(&bufferidentifier[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferidentifier[:(filledinidentifier-1)]), nil } - -// BaseMaterialGroupIterator represents a Lib3MF class. -type BaseMaterialGroupIterator struct { - ResourceIterator +// SetIdentifier sets the identifier of the port. +func (inst ImplicitPort) SetIdentifier(identifier string) error { + ret := C.CCall_lib3mf_implicitport_setidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0]))) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil } -func (wrapper Wrapper) NewBaseMaterialGroupIterator(r ref) BaseMaterialGroupIterator { - return BaseMaterialGroupIterator{wrapper.NewResourceIterator(r)} +// GetDisplayName retrieves the display name of the port. +func (inst ImplicitPort) GetDisplayName() (string, error) { + var neededfordisplayName C.uint32_t + var filledindisplayName C.uint32_t + ret := C.CCall_lib3mf_implicitport_getdisplayname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededfordisplayName, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizedisplayName := neededfordisplayName + bufferdisplayName := make([]byte, bufferSizedisplayName) + ret = C.CCall_lib3mf_implicitport_getdisplayname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizedisplayName, &filledindisplayName, (*C.char)(unsafe.Pointer(&bufferdisplayName[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferdisplayName[:(filledindisplayName-1)]), nil } -// GetCurrentBaseMaterialGroup returns the MaterialGroup the iterator points at. -func (inst BaseMaterialGroupIterator) GetCurrentBaseMaterialGroup() (BaseMaterialGroup, error) { - var resource ref - ret := C.CCall_lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) +// SetDisplayName sets the display name of the port. +func (inst ImplicitPort) SetDisplayName(displayName string) error { + ret := C.CCall_lib3mf_implicitport_setdisplayname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(displayName)[0]))) if ret != 0 { - return BaseMaterialGroup{}, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return inst.wrapperRef.NewBaseMaterialGroup(resource), nil + return nil } +// SetType sets the type of the port. +func (inst ImplicitPort) SetType(implicitPortType ImplicitPortType) error { + ret := C.CCall_lib3mf_implicitport_settype(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFImplicitPortType(implicitPortType)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} -// ColorGroupIterator represents a Lib3MF class. -type ColorGroupIterator struct { - ResourceIterator +// GetType retrieves the type of the port. +func (inst ImplicitPort) GetType() (ImplicitPortType, error) { + var implicitPortType C.eLib3MFImplicitPortType + ret := C.CCall_lib3mf_implicitport_gettype(inst.wrapperRef.LibraryHandle, inst.Ref, &implicitPortType) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return ImplicitPortType(implicitPortType), nil } -func (wrapper Wrapper) NewColorGroupIterator(r ref) ColorGroupIterator { - return ColorGroupIterator{wrapper.NewResourceIterator(r)} +// GetReference retrieves the reference of the port, only used for input ports. +func (inst ImplicitPort) GetReference() (string, error) { + var neededforreference C.uint32_t + var filledinreference C.uint32_t + ret := C.CCall_lib3mf_implicitport_getreference(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforreference, nil) + if ret != 0 { + return "", makeError(uint32(ret)) + } + bufferSizereference := neededforreference + bufferreference := make([]byte, bufferSizereference) + ret = C.CCall_lib3mf_implicitport_getreference(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizereference, &filledinreference, (*C.char)(unsafe.Pointer(&bufferreference[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferreference[:(filledinreference-1)]), nil } -// GetCurrentColorGroup returns the ColorGroup the iterator points at. -func (inst ColorGroupIterator) GetCurrentColorGroup() (ColorGroup, error) { - var resource ref - ret := C.CCall_lib3mf_colorgroupiterator_getcurrentcolorgroup(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) +// SetReference sets the reference of the port, only used for input ports. +func (inst ImplicitPort) SetReference(reference string) error { + ret := C.CCall_lib3mf_implicitport_setreference(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(reference)[0]))) if ret != 0 { - return ColorGroup{}, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return inst.wrapperRef.NewColorGroup(resource), nil + return nil } -// Texture2DGroupIterator represents a Lib3MF class. -type Texture2DGroupIterator struct { - ResourceIterator +// Iterator represents a Lib3MF class. +type Iterator struct { + Base } -func (wrapper Wrapper) NewTexture2DGroupIterator(r ref) Texture2DGroupIterator { - return Texture2DGroupIterator{wrapper.NewResourceIterator(r)} +func (wrapper Wrapper) NewIterator(r ref) Iterator { + return Iterator{wrapper.NewBase(r)} } -// GetCurrentTexture2DGroup returns the Texture2DGroup the iterator points at. -func (inst Texture2DGroupIterator) GetCurrentTexture2DGroup() (Texture2DGroup, error) { - var resource ref - ret := C.CCall_lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) +// MoveNext iterates to the next item in the list. +func (inst Iterator) MoveNext() (bool, error) { + var hasNext C.bool + ret := C.CCall_lib3mf_iterator_movenext(inst.wrapperRef.LibraryHandle, inst.Ref, &hasNext) if ret != 0 { - return Texture2DGroup{}, makeError(uint32(ret)) + return false, makeError(uint32(ret)) } - return inst.wrapperRef.NewTexture2DGroup(resource), nil -} - - -// CompositeMaterialsIterator represents a Lib3MF class. -type CompositeMaterialsIterator struct { - ResourceIterator + return bool(hasNext), nil } -func (wrapper Wrapper) NewCompositeMaterialsIterator(r ref) CompositeMaterialsIterator { - return CompositeMaterialsIterator{wrapper.NewResourceIterator(r)} +// MovePrevious iterates to the previous item in the list. +func (inst Iterator) MovePrevious() (bool, error) { + var hasPrevious C.bool + ret := C.CCall_lib3mf_iterator_moveprevious(inst.wrapperRef.LibraryHandle, inst.Ref, &hasPrevious) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(hasPrevious), nil } -// GetCurrentCompositeMaterials returns the CompositeMaterials the iterator points at. -func (inst CompositeMaterialsIterator) GetCurrentCompositeMaterials() (CompositeMaterials, error) { - var resource ref - ret := C.CCall_lib3mf_compositematerialsiterator_getcurrentcompositematerials(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) +// Count returns the number of items the iterator captures. +func (inst Iterator) Count() (uint64, error) { + var count C.uint64_t + ret := C.CCall_lib3mf_iterator_count(inst.wrapperRef.LibraryHandle, inst.Ref, &count) if ret != 0 { - return CompositeMaterials{}, makeError(uint32(ret)) + return 0, makeError(uint32(ret)) } - return inst.wrapperRef.NewCompositeMaterials(resource), nil + return uint64(count), nil } -// MultiPropertyGroupIterator represents a Lib3MF class. -type MultiPropertyGroupIterator struct { - ResourceIterator +// ImplicitPortIterator represents a Lib3MF class. +type ImplicitPortIterator struct { + Iterator } -func (wrapper Wrapper) NewMultiPropertyGroupIterator(r ref) MultiPropertyGroupIterator { - return MultiPropertyGroupIterator{wrapper.NewResourceIterator(r)} +func (wrapper Wrapper) NewImplicitPortIterator(r ref) ImplicitPortIterator { + return ImplicitPortIterator{wrapper.NewIterator(r)} } -// GetCurrentMultiPropertyGroup returns the MultiPropertyGroup the iterator points at. -func (inst MultiPropertyGroupIterator) GetCurrentMultiPropertyGroup() (MultiPropertyGroup, error) { - var resource ref - ret := C.CCall_lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) +// GetCurrent returns the current element. +func (inst ImplicitPortIterator) GetCurrent() (ImplicitPort, error) { + var port ref + ret := C.CCall_lib3mf_implicitportiterator_getcurrent(inst.wrapperRef.LibraryHandle, inst.Ref, &port) if ret != 0 { - return MultiPropertyGroup{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewMultiPropertyGroup(resource), nil + return inst.wrapperRef.NewImplicitPort(port), nil } -// MetaData represents a Lib3MF class. -type MetaData struct { +// ImplicitNode represents a Lib3MF class. +type ImplicitNode struct { Base } -func (wrapper Wrapper) NewMetaData(r ref) MetaData { - return MetaData{wrapper.NewBase(r)} +func (wrapper Wrapper) NewImplicitNode(r ref) ImplicitNode { + return ImplicitNode{wrapper.NewBase(r)} } -// GetNameSpace returns the namespace URL of the metadata. -func (inst MetaData) GetNameSpace() (string, error) { - var neededfornameSpace C.uint32_t - var filledinnameSpace C.uint32_t - ret := C.CCall_lib3mf_metadata_getnamespace(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededfornameSpace, nil) +// GetIdentifier retrieves the identifier of the node. +func (inst ImplicitNode) GetIdentifier() (string, error) { + var neededforidentifier C.uint32_t + var filledinidentifier C.uint32_t + ret := C.CCall_lib3mf_implicitnode_getidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforidentifier, nil) if ret != 0 { return "", makeError(uint32(ret)) } - bufferSizenameSpace := neededfornameSpace - buffernameSpace := make([]byte, bufferSizenameSpace) - ret = C.CCall_lib3mf_metadata_getnamespace(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizenameSpace, &filledinnameSpace, (*C.char)(unsafe.Pointer(&buffernameSpace[0]))) + bufferSizeidentifier := neededforidentifier + bufferidentifier := make([]byte, bufferSizeidentifier) + ret = C.CCall_lib3mf_implicitnode_getidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizeidentifier, &filledinidentifier, (*C.char)(unsafe.Pointer(&bufferidentifier[0]))) if ret != 0 { return "", makeError(uint32(ret)) } - return string(buffernameSpace[:(filledinnameSpace-1)]), nil + return string(bufferidentifier[:(filledinidentifier-1)]), nil } -// SetNameSpace sets a new namespace URL of the metadata. -func (inst MetaData) SetNameSpace(nameSpace string) error { - ret := C.CCall_lib3mf_metadata_setnamespace(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(nameSpace)[0]))) +// SetIdentifier sets the identifier of the node. +func (inst ImplicitNode) SetIdentifier(identifier string) error { + ret := C.CCall_lib3mf_implicitnode_setidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0]))) if ret != 0 { return makeError(uint32(ret)) } return nil } -// GetName returns the name of a metadata. -func (inst MetaData) GetName() (string, error) { - var neededforname C.uint32_t - var filledinname C.uint32_t - ret := C.CCall_lib3mf_metadata_getname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforname, nil) +// GetDisplayName retrieves the display name of the node. +func (inst ImplicitNode) GetDisplayName() (string, error) { + var neededfordisplayName C.uint32_t + var filledindisplayName C.uint32_t + ret := C.CCall_lib3mf_implicitnode_getdisplayname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededfordisplayName, nil) if ret != 0 { return "", makeError(uint32(ret)) } - bufferSizename := neededforname - buffername := make([]byte, bufferSizename) - ret = C.CCall_lib3mf_metadata_getname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizename, &filledinname, (*C.char)(unsafe.Pointer(&buffername[0]))) + bufferSizedisplayName := neededfordisplayName + bufferdisplayName := make([]byte, bufferSizedisplayName) + ret = C.CCall_lib3mf_implicitnode_getdisplayname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizedisplayName, &filledindisplayName, (*C.char)(unsafe.Pointer(&bufferdisplayName[0]))) if ret != 0 { return "", makeError(uint32(ret)) } - return string(buffername[:(filledinname-1)]), nil + return string(bufferdisplayName[:(filledindisplayName-1)]), nil } -// SetName sets a new name of a metadata. -func (inst MetaData) SetName(name string) error { - ret := C.CCall_lib3mf_metadata_setname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(name)[0]))) +// SetDisplayName sets the display name of the node. +func (inst ImplicitNode) SetDisplayName(displayName string) error { + ret := C.CCall_lib3mf_implicitnode_setdisplayname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(displayName)[0]))) if ret != 0 { return makeError(uint32(ret)) } return nil } -// GetKey returns the (namespace+name) of a metadata. -func (inst MetaData) GetKey() (string, error) { - var neededforkey C.uint32_t - var filledinkey C.uint32_t - ret := C.CCall_lib3mf_metadata_getkey(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforkey, nil) +// GetTag retrieves the tag of the node. +func (inst ImplicitNode) GetTag() (string, error) { + var neededfortag C.uint32_t + var filledintag C.uint32_t + ret := C.CCall_lib3mf_implicitnode_gettag(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededfortag, nil) if ret != 0 { return "", makeError(uint32(ret)) } - bufferSizekey := neededforkey - bufferkey := make([]byte, bufferSizekey) - ret = C.CCall_lib3mf_metadata_getkey(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizekey, &filledinkey, (*C.char)(unsafe.Pointer(&bufferkey[0]))) + bufferSizetag := neededfortag + buffertag := make([]byte, bufferSizetag) + ret = C.CCall_lib3mf_implicitnode_gettag(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizetag, &filledintag, (*C.char)(unsafe.Pointer(&buffertag[0]))) if ret != 0 { return "", makeError(uint32(ret)) } - return string(bufferkey[:(filledinkey-1)]), nil + return string(buffertag[:(filledintag-1)]), nil } -// GetMustPreserve returns, whether a metadata must be preserved. -func (inst MetaData) GetMustPreserve() (bool, error) { - var mustPreserve C.bool - ret := C.CCall_lib3mf_metadata_getmustpreserve(inst.wrapperRef.LibraryHandle, inst.Ref, &mustPreserve) +// SetTag sets the tag of the node. +func (inst ImplicitNode) SetTag(tag string) error { + ret := C.CCall_lib3mf_implicitnode_settag(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(tag)[0]))) if ret != 0 { - return false, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return bool(mustPreserve), nil + return nil } -// SetMustPreserve sets whether a metadata must be preserved. -func (inst MetaData) SetMustPreserve(mustPreserve bool) error { - ret := C.CCall_lib3mf_metadata_setmustpreserve(inst.wrapperRef.LibraryHandle, inst.Ref, C.bool(mustPreserve)) +// GetNodeType retrieves the type of the node. +func (inst ImplicitNode) GetNodeType() (ImplicitNodeType, error) { + var _type C.eLib3MFImplicitNodeType + ret := C.CCall_lib3mf_implicitnode_getnodetype(inst.wrapperRef.LibraryHandle, inst.Ref, &_type) if ret != 0 { - return makeError(uint32(ret)) + return 0, makeError(uint32(ret)) } - return nil + return ImplicitNodeType(_type), nil } -// GetType returns the type of a metadata. -func (inst MetaData) GetType() (string, error) { - var neededfor_type C.uint32_t - var filledin_type C.uint32_t - ret := C.CCall_lib3mf_metadata_gettype(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededfor_type, nil) +// AddInput add an input. +func (inst ImplicitNode) AddInput(identifier string, displayName string) (ImplicitPort, error) { + var port ref + ret := C.CCall_lib3mf_implicitnode_addinput(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), &port) if ret != 0 { - return "", makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - bufferSize_type := neededfor_type - buffer_type := make([]byte, bufferSize_type) - ret = C.CCall_lib3mf_metadata_gettype(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSize_type, &filledin_type, (*C.char)(unsafe.Pointer(&buffer_type[0]))) + return inst.wrapperRef.NewImplicitPort(port), nil +} + +// GetInputs retrieves the inputs. +func (inst ImplicitNode) GetInputs() (ImplicitPortIterator, error) { + var iterator ref + ret := C.CCall_lib3mf_implicitnode_getinputs(inst.wrapperRef.LibraryHandle, inst.Ref, &iterator) if ret != 0 { - return "", makeError(uint32(ret)) + return ImplicitPortIterator{}, makeError(uint32(ret)) } - return string(buffer_type[:(filledin_type-1)]), nil + return inst.wrapperRef.NewImplicitPortIterator(iterator), nil } -// SetType sets a new type of a metadata. This must be a simple XML type. -func (inst MetaData) SetType(_type string) error { - ret := C.CCall_lib3mf_metadata_settype(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(_type)[0]))) +// AddOutput add an output. +func (inst ImplicitNode) AddOutput(identifier string, displayName string) (ImplicitPort, error) { + var port ref + ret := C.CCall_lib3mf_implicitnode_addoutput(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), &port) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(port), nil } -// GetValue returns the value of the metadata. -func (inst MetaData) GetValue() (string, error) { - var neededforvalue C.uint32_t - var filledinvalue C.uint32_t - ret := C.CCall_lib3mf_metadata_getvalue(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforvalue, nil) +// GetOutputs retrieves the outputs. +func (inst ImplicitNode) GetOutputs() (ImplicitPortIterator, error) { + var iterator ref + ret := C.CCall_lib3mf_implicitnode_getoutputs(inst.wrapperRef.LibraryHandle, inst.Ref, &iterator) if ret != 0 { - return "", makeError(uint32(ret)) + return ImplicitPortIterator{}, makeError(uint32(ret)) } - bufferSizevalue := neededforvalue - buffervalue := make([]byte, bufferSizevalue) - ret = C.CCall_lib3mf_metadata_getvalue(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizevalue, &filledinvalue, (*C.char)(unsafe.Pointer(&buffervalue[0]))) + return inst.wrapperRef.NewImplicitPortIterator(iterator), nil +} + +// FindInput retrieves an input. +func (inst ImplicitNode) FindInput(identifier string) (*ImplicitPort, error) { + var input ref + ret := C.CCall_lib3mf_implicitnode_findinput(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), &input) if ret != 0 { - return "", makeError(uint32(ret)) + return nil, makeError(uint32(ret)) } - return string(buffervalue[:(filledinvalue-1)]), nil + var _inputPtr *ImplicitPort + if input != nil { + _inputPtrVal := inst.wrapperRef.NewImplicitPort(input) + _inputPtr = &_inputPtrVal + } + return _inputPtr, nil } -// SetValue sets a new value of the metadata. -func (inst MetaData) SetValue(value string) error { - ret := C.CCall_lib3mf_metadata_setvalue(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(value)[0]))) +// FindOutput retrieves an output. +func (inst ImplicitNode) FindOutput(identifier string) (*ImplicitPort, error) { + var output ref + ret := C.CCall_lib3mf_implicitnode_findoutput(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), &output) if ret != 0 { - return makeError(uint32(ret)) + return nil, makeError(uint32(ret)) } - return nil + var _outputPtr *ImplicitPort + if output != nil { + _outputPtrVal := inst.wrapperRef.NewImplicitPort(output) + _outputPtr = &_outputPtrVal + } + return _outputPtr, nil +} + +// AreTypesValid checks if the types of the input and output ports are valid for the node type. +func (inst ImplicitNode) AreTypesValid() (bool, error) { + var valid C.bool + ret := C.CCall_lib3mf_implicitnode_aretypesvalid(inst.wrapperRef.LibraryHandle, inst.Ref, &valid) + if ret != 0 { + return false, makeError(uint32(ret)) + } + return bool(valid), nil } -// MetaDataGroup represents a Lib3MF class. -type MetaDataGroup struct { - Base +// OneInputNode represents a Lib3MF class. +type OneInputNode struct { + ImplicitNode } -func (wrapper Wrapper) NewMetaDataGroup(r ref) MetaDataGroup { - return MetaDataGroup{wrapper.NewBase(r)} +func (wrapper Wrapper) NewOneInputNode(r ref) OneInputNode { + return OneInputNode{wrapper.NewImplicitNode(r)} } -// GetMetaDataCount returns the number of metadata in this metadatagroup. -func (inst MetaDataGroup) GetMetaDataCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_metadatagroup_getmetadatacount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// GetInputA retrieves the input. +func (inst OneInputNode) GetInputA() (ImplicitPort, error) { + var input ref + ret := C.CCall_lib3mf_oneinputnode_getinputa(inst.wrapperRef.LibraryHandle, inst.Ref, &input) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewImplicitPort(input), nil } -// GetMetaData returns a metadata value within this metadatagroup. -func (inst MetaDataGroup) GetMetaData(index uint32) (MetaData, error) { - var metaData ref - ret := C.CCall_lib3mf_metadatagroup_getmetadata(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &metaData) +// GetOutputResult retrieves the output. +func (inst OneInputNode) GetOutputResult() (ImplicitPort, error) { + var result ref + ret := C.CCall_lib3mf_oneinputnode_getoutputresult(inst.wrapperRef.LibraryHandle, inst.Ref, &result) if ret != 0 { - return MetaData{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewMetaData(metaData), nil + return inst.wrapperRef.NewImplicitPort(result), nil } -// GetMetaDataByKey returns a metadata value within this metadatagroup. -func (inst MetaDataGroup) GetMetaDataByKey(nameSpace string, name string) (MetaData, error) { - var metaData ref - ret := C.CCall_lib3mf_metadatagroup_getmetadatabykey(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(nameSpace)[0])), (*C.char)(unsafe.Pointer(&[]byte(name)[0])), &metaData) - if ret != 0 { - return MetaData{}, makeError(uint32(ret)) - } - return inst.wrapperRef.NewMetaData(metaData), nil + +// SinNode represents a Lib3MF class. +type SinNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewSinNode(r ref) SinNode { + return SinNode{wrapper.NewOneInputNode(r)} +} + + +// CosNode represents a Lib3MF class. +type CosNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewCosNode(r ref) CosNode { + return CosNode{wrapper.NewOneInputNode(r)} +} + + +// TanNode represents a Lib3MF class. +type TanNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewTanNode(r ref) TanNode { + return TanNode{wrapper.NewOneInputNode(r)} +} + + +// ArcSinNode represents a Lib3MF class. +type ArcSinNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewArcSinNode(r ref) ArcSinNode { + return ArcSinNode{wrapper.NewOneInputNode(r)} +} + + +// ArcCosNode represents a Lib3MF class. +type ArcCosNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewArcCosNode(r ref) ArcCosNode { + return ArcCosNode{wrapper.NewOneInputNode(r)} +} + + +// ArcTanNode represents a Lib3MF class. +type ArcTanNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewArcTanNode(r ref) ArcTanNode { + return ArcTanNode{wrapper.NewOneInputNode(r)} +} + + +// SinhNode represents a Lib3MF class. +type SinhNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewSinhNode(r ref) SinhNode { + return SinhNode{wrapper.NewOneInputNode(r)} +} + + +// CoshNode represents a Lib3MF class. +type CoshNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewCoshNode(r ref) CoshNode { + return CoshNode{wrapper.NewOneInputNode(r)} +} + + +// TanhNode represents a Lib3MF class. +type TanhNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewTanhNode(r ref) TanhNode { + return TanhNode{wrapper.NewOneInputNode(r)} +} + + +// RoundNode represents a Lib3MF class. +type RoundNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewRoundNode(r ref) RoundNode { + return RoundNode{wrapper.NewOneInputNode(r)} +} + + +// CeilNode represents a Lib3MF class. +type CeilNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewCeilNode(r ref) CeilNode { + return CeilNode{wrapper.NewOneInputNode(r)} +} + + +// FloorNode represents a Lib3MF class. +type FloorNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewFloorNode(r ref) FloorNode { + return FloorNode{wrapper.NewOneInputNode(r)} +} + + +// SignNode represents a Lib3MF class. +type SignNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewSignNode(r ref) SignNode { + return SignNode{wrapper.NewOneInputNode(r)} +} + + +// FractNode represents a Lib3MF class. +type FractNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewFractNode(r ref) FractNode { + return FractNode{wrapper.NewOneInputNode(r)} +} + + +// AbsNode represents a Lib3MF class. +type AbsNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewAbsNode(r ref) AbsNode { + return AbsNode{wrapper.NewOneInputNode(r)} +} + + +// ExpNode represents a Lib3MF class. +type ExpNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewExpNode(r ref) ExpNode { + return ExpNode{wrapper.NewOneInputNode(r)} +} + + +// LogNode represents a Lib3MF class. +type LogNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewLogNode(r ref) LogNode { + return LogNode{wrapper.NewOneInputNode(r)} +} + + +// Log2Node represents a Lib3MF class. +type Log2Node struct { + OneInputNode +} + +func (wrapper Wrapper) NewLog2Node(r ref) Log2Node { + return Log2Node{wrapper.NewOneInputNode(r)} +} + + +// Log10Node represents a Lib3MF class. +type Log10Node struct { + OneInputNode +} + +func (wrapper Wrapper) NewLog10Node(r ref) Log10Node { + return Log10Node{wrapper.NewOneInputNode(r)} +} + + +// LengthNode represents a Lib3MF class. +type LengthNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewLengthNode(r ref) LengthNode { + return LengthNode{wrapper.NewOneInputNode(r)} +} + + +// TransposeNode represents a Lib3MF class. +type TransposeNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewTransposeNode(r ref) TransposeNode { + return TransposeNode{wrapper.NewOneInputNode(r)} +} + + +// InverseNode represents a Lib3MF class. +type InverseNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewInverseNode(r ref) InverseNode { + return InverseNode{wrapper.NewOneInputNode(r)} +} + + +// SqrtNode represents a Lib3MF class. +type SqrtNode struct { + OneInputNode +} + +func (wrapper Wrapper) NewSqrtNode(r ref) SqrtNode { + return SqrtNode{wrapper.NewOneInputNode(r)} +} + + +// ResourceIdNode represents a Lib3MF class. +type ResourceIdNode struct { + ImplicitNode +} + +func (wrapper Wrapper) NewResourceIdNode(r ref) ResourceIdNode { + return ResourceIdNode{wrapper.NewImplicitNode(r)} } -// RemoveMetaDataByIndex removes metadata by index from the model. -func (inst MetaDataGroup) RemoveMetaDataByIndex(index uint32) error { - ret := C.CCall_lib3mf_metadatagroup_removemetadatabyindex(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index)) +// SetResource sets the Resource that the resourceid attribute of the node will point to. +func (inst ResourceIdNode) SetResource(resource Resource) error { + ret := C.CCall_lib3mf_resourceidnode_setresource(inst.wrapperRef.LibraryHandle, inst.Ref, resource.Ref) if ret != 0 { return makeError(uint32(ret)) } return nil } -// RemoveMetaData removes metadata from the model. -func (inst MetaDataGroup) RemoveMetaData(theMetaData MetaData) error { - ret := C.CCall_lib3mf_metadatagroup_removemetadata(inst.wrapperRef.LibraryHandle, inst.Ref, theMetaData.Ref) +// GetResource retrieves the resource of the node. +func (inst ResourceIdNode) GetResource() (Resource, error) { + var resource ref + ret := C.CCall_lib3mf_resourceidnode_getresource(inst.wrapperRef.LibraryHandle, inst.Ref, &resource) if ret != 0 { - return makeError(uint32(ret)) + return Resource{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewResource(resource), nil } -// AddMetaData adds a new metadata to this metadatagroup. -func (inst MetaDataGroup) AddMetaData(nameSpace string, name string, value string, _type string, mustPreserve bool) (MetaData, error) { - var metaData ref - ret := C.CCall_lib3mf_metadatagroup_addmetadata(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(nameSpace)[0])), (*C.char)(unsafe.Pointer(&[]byte(name)[0])), (*C.char)(unsafe.Pointer(&[]byte(value)[0])), (*C.char)(unsafe.Pointer(&[]byte(_type)[0])), C.bool(mustPreserve), &metaData) +// GetOutputValue retrieves the output. +func (inst ResourceIdNode) GetOutputValue() (ImplicitPort, error) { + var value ref + ret := C.CCall_lib3mf_resourceidnode_getoutputvalue(inst.wrapperRef.LibraryHandle, inst.Ref, &value) if ret != 0 { - return MetaData{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewMetaData(metaData), nil + return inst.wrapperRef.NewImplicitPort(value), nil } -// Object represents a Lib3MF class. -type Object struct { - Resource +// TwoInputNode represents a Lib3MF class. +type TwoInputNode struct { + OneInputNode } -func (wrapper Wrapper) NewObject(r ref) Object { - return Object{wrapper.NewResource(r)} +func (wrapper Wrapper) NewTwoInputNode(r ref) TwoInputNode { + return TwoInputNode{wrapper.NewOneInputNode(r)} } -// GetType retrieves an object's type. -func (inst Object) GetType() (ObjectType, error) { - var objectType C.eLib3MFObjectType - ret := C.CCall_lib3mf_object_gettype(inst.wrapperRef.LibraryHandle, inst.Ref, &objectType) +// GetInputB retrieves the second input. +func (inst TwoInputNode) GetInputB() (ImplicitPort, error) { + var b ref + ret := C.CCall_lib3mf_twoinputnode_getinputb(inst.wrapperRef.LibraryHandle, inst.Ref, &b) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return ObjectType(objectType), nil + return inst.wrapperRef.NewImplicitPort(b), nil } -// SetType sets an object's type. -func (inst Object) SetType(objectType ObjectType) error { - ret := C.CCall_lib3mf_object_settype(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFObjectType(objectType)) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil -} -// GetName retrieves an object's name. -func (inst Object) GetName() (string, error) { - var neededforname C.uint32_t - var filledinname C.uint32_t - ret := C.CCall_lib3mf_object_getname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforname, nil) - if ret != 0 { - return "", makeError(uint32(ret)) - } - bufferSizename := neededforname - buffername := make([]byte, bufferSizename) - ret = C.CCall_lib3mf_object_getname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizename, &filledinname, (*C.char)(unsafe.Pointer(&buffername[0]))) - if ret != 0 { - return "", makeError(uint32(ret)) - } - return string(buffername[:(filledinname-1)]), nil +// AdditionNode represents a Lib3MF class. +type AdditionNode struct { + TwoInputNode } -// SetName sets an object's name string. -func (inst Object) SetName(name string) error { - ret := C.CCall_lib3mf_object_setname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(name)[0]))) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil +func (wrapper Wrapper) NewAdditionNode(r ref) AdditionNode { + return AdditionNode{wrapper.NewTwoInputNode(r)} } -// GetPartNumber retrieves an object's part number. -func (inst Object) GetPartNumber() (string, error) { - var neededforpartNumber C.uint32_t - var filledinpartNumber C.uint32_t - ret := C.CCall_lib3mf_object_getpartnumber(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpartNumber, nil) - if ret != 0 { - return "", makeError(uint32(ret)) - } - bufferSizepartNumber := neededforpartNumber - bufferpartNumber := make([]byte, bufferSizepartNumber) - ret = C.CCall_lib3mf_object_getpartnumber(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizepartNumber, &filledinpartNumber, (*C.char)(unsafe.Pointer(&bufferpartNumber[0]))) - if ret != 0 { - return "", makeError(uint32(ret)) - } - return string(bufferpartNumber[:(filledinpartNumber-1)]), nil + +// SubtractionNode represents a Lib3MF class. +type SubtractionNode struct { + TwoInputNode } -// SetPartNumber sets an objects partnumber string. -func (inst Object) SetPartNumber(partNumber string) error { - ret := C.CCall_lib3mf_object_setpartnumber(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(partNumber)[0]))) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil +func (wrapper Wrapper) NewSubtractionNode(r ref) SubtractionNode { + return SubtractionNode{wrapper.NewTwoInputNode(r)} } -// IsMeshObject retrieves, if an object is a mesh object. -func (inst Object) IsMeshObject() (bool, error) { - var isMeshObject C.bool - ret := C.CCall_lib3mf_object_ismeshobject(inst.wrapperRef.LibraryHandle, inst.Ref, &isMeshObject) - if ret != 0 { - return false, makeError(uint32(ret)) - } - return bool(isMeshObject), nil + +// MultiplicationNode represents a Lib3MF class. +type MultiplicationNode struct { + TwoInputNode } -// IsComponentsObject retrieves, if an object is a components object. -func (inst Object) IsComponentsObject() (bool, error) { - var isComponentsObject C.bool - ret := C.CCall_lib3mf_object_iscomponentsobject(inst.wrapperRef.LibraryHandle, inst.Ref, &isComponentsObject) - if ret != 0 { - return false, makeError(uint32(ret)) - } - return bool(isComponentsObject), nil +func (wrapper Wrapper) NewMultiplicationNode(r ref) MultiplicationNode { + return MultiplicationNode{wrapper.NewTwoInputNode(r)} } -// IsValid retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. -func (inst Object) IsValid() (bool, error) { - var isValid C.bool - ret := C.CCall_lib3mf_object_isvalid(inst.wrapperRef.LibraryHandle, inst.Ref, &isValid) - if ret != 0 { - return false, makeError(uint32(ret)) - } - return bool(isValid), nil + +// DivisionNode represents a Lib3MF class. +type DivisionNode struct { + TwoInputNode } -// SetAttachmentAsThumbnail use an existing attachment as thumbnail for this object. -func (inst Object) SetAttachmentAsThumbnail(attachment Attachment) error { - ret := C.CCall_lib3mf_object_setattachmentasthumbnail(inst.wrapperRef.LibraryHandle, inst.Ref, attachment.Ref) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil +func (wrapper Wrapper) NewDivisionNode(r ref) DivisionNode { + return DivisionNode{wrapper.NewTwoInputNode(r)} } -// GetThumbnailAttachment get the attachment containing the object thumbnail. -func (inst Object) GetThumbnailAttachment() (*Attachment, error) { - var attachment ref - ret := C.CCall_lib3mf_object_getthumbnailattachment(inst.wrapperRef.LibraryHandle, inst.Ref, &attachment) - if ret != 0 { - return nil, makeError(uint32(ret)) - } - var _attachmentPtr *Attachment - if attachment != nil { - _attachmentPtrVal := inst.wrapperRef.NewAttachment(attachment) - _attachmentPtr = &_attachmentPtrVal - } - return _attachmentPtr, nil + +// DotNode represents a Lib3MF class. +type DotNode struct { + TwoInputNode } -// ClearThumbnailAttachment clears the attachment. The attachment instance is not removed from the package. -func (inst Object) ClearThumbnailAttachment() error { - ret := C.CCall_lib3mf_object_clearthumbnailattachment(inst.wrapperRef.LibraryHandle, inst.Ref) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil +func (wrapper Wrapper) NewDotNode(r ref) DotNode { + return DotNode{wrapper.NewTwoInputNode(r)} } -// GetOutbox returns the outbox of a build item. -func (inst Object) GetOutbox() (Box, error) { - var outbox C.sLib3MFBox - ret := C.CCall_lib3mf_object_getoutbox(inst.wrapperRef.LibraryHandle, inst.Ref, &outbox) - if ret != 0 { - return Box{}, makeError(uint32(ret)) - } - return *(*Box)(unsafe.Pointer(&outbox)), nil + +// CrossNode represents a Lib3MF class. +type CrossNode struct { + TwoInputNode } -// GetUUID retrieves an object's uuid string (see production extension specification). -func (inst Object) GetUUID() (bool, string, error) { - var hasUUID C.bool - var neededforuUID C.uint32_t - var filledinuUID C.uint32_t - ret := C.CCall_lib3mf_object_getuuid(inst.wrapperRef.LibraryHandle, inst.Ref, &hasUUID, 0, &neededforuUID, nil) - if ret != 0 { - return false, "", makeError(uint32(ret)) - } - bufferSizeuUID := neededforuUID - bufferuUID := make([]byte, bufferSizeuUID) - ret = C.CCall_lib3mf_object_getuuid(inst.wrapperRef.LibraryHandle, inst.Ref, &hasUUID, bufferSizeuUID, &filledinuUID, (*C.char)(unsafe.Pointer(&bufferuUID[0]))) - if ret != 0 { - return false, "", makeError(uint32(ret)) - } - return bool(hasUUID), string(bufferuUID[:(filledinuUID-1)]), nil +func (wrapper Wrapper) NewCrossNode(r ref) CrossNode { + return CrossNode{wrapper.NewTwoInputNode(r)} } -// SetUUID sets a build object's uuid string (see production extension specification). -func (inst Object) SetUUID(uUID string) error { - ret := C.CCall_lib3mf_object_setuuid(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(uUID)[0]))) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil + +// ArcTan2Node represents a Lib3MF class. +type ArcTan2Node struct { + TwoInputNode } -// GetMetaDataGroup returns the metadatagroup of this object. -func (inst Object) GetMetaDataGroup() (MetaDataGroup, error) { - var metaDataGroup ref - ret := C.CCall_lib3mf_object_getmetadatagroup(inst.wrapperRef.LibraryHandle, inst.Ref, &metaDataGroup) - if ret != 0 { - return MetaDataGroup{}, makeError(uint32(ret)) - } - return inst.wrapperRef.NewMetaDataGroup(metaDataGroup), nil +func (wrapper Wrapper) NewArcTan2Node(r ref) ArcTan2Node { + return ArcTan2Node{wrapper.NewTwoInputNode(r)} } -// SetSlicesMeshResolution set the meshresolution of the mesh object. -func (inst Object) SetSlicesMeshResolution(meshResolution SlicesMeshResolution) error { - ret := C.CCall_lib3mf_object_setslicesmeshresolution(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFSlicesMeshResolution(meshResolution)) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil + +// MatVecMultiplicationNode represents a Lib3MF class. +type MatVecMultiplicationNode struct { + TwoInputNode } -// GetSlicesMeshResolution get the meshresolution of the mesh object. -func (inst Object) GetSlicesMeshResolution() (SlicesMeshResolution, error) { - var meshResolution C.eLib3MFSlicesMeshResolution - ret := C.CCall_lib3mf_object_getslicesmeshresolution(inst.wrapperRef.LibraryHandle, inst.Ref, &meshResolution) - if ret != 0 { - return 0, makeError(uint32(ret)) - } - return SlicesMeshResolution(meshResolution), nil +func (wrapper Wrapper) NewMatVecMultiplicationNode(r ref) MatVecMultiplicationNode { + return MatVecMultiplicationNode{wrapper.NewTwoInputNode(r)} } -// HasSlices returns whether the Object has a slice stack. If Recursive is true, also checks whether any references object has a slice stack. -func (inst Object) HasSlices(recursive bool) (bool, error) { - var hasSlices C.bool - ret := C.CCall_lib3mf_object_hasslices(inst.wrapperRef.LibraryHandle, inst.Ref, C.bool(recursive), &hasSlices) - if ret != 0 { - return false, makeError(uint32(ret)) - } - return bool(hasSlices), nil + +// MinNode represents a Lib3MF class. +type MinNode struct { + TwoInputNode } -// ClearSliceStack unlinks the attached slicestack from this object. If no slice stack is attached, do noting. -func (inst Object) ClearSliceStack() error { - ret := C.CCall_lib3mf_object_clearslicestack(inst.wrapperRef.LibraryHandle, inst.Ref) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil +func (wrapper Wrapper) NewMinNode(r ref) MinNode { + return MinNode{wrapper.NewTwoInputNode(r)} } -// GetSliceStack get the Slicestack attached to the object. -func (inst Object) GetSliceStack() (SliceStack, error) { - var sliceStackInstance ref - ret := C.CCall_lib3mf_object_getslicestack(inst.wrapperRef.LibraryHandle, inst.Ref, &sliceStackInstance) - if ret != 0 { - return SliceStack{}, makeError(uint32(ret)) - } - return inst.wrapperRef.NewSliceStack(sliceStackInstance), nil + +// MaxNode represents a Lib3MF class. +type MaxNode struct { + TwoInputNode } -// AssignSliceStack assigns a slicestack to the object. -func (inst Object) AssignSliceStack(sliceStackInstance SliceStack) error { - ret := C.CCall_lib3mf_object_assignslicestack(inst.wrapperRef.LibraryHandle, inst.Ref, sliceStackInstance.Ref) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil +func (wrapper Wrapper) NewMaxNode(r ref) MaxNode { + return MaxNode{wrapper.NewTwoInputNode(r)} } -// MeshObject represents a Lib3MF class. -type MeshObject struct { - Object +// FmodNode represents a Lib3MF class. +type FmodNode struct { + TwoInputNode } -func (wrapper Wrapper) NewMeshObject(r ref) MeshObject { - return MeshObject{wrapper.NewObject(r)} +func (wrapper Wrapper) NewFmodNode(r ref) FmodNode { + return FmodNode{wrapper.NewTwoInputNode(r)} } -// GetVertexCount returns the vertex count of a mesh object. -func (inst MeshObject) GetVertexCount() (uint32, error) { - var vertexCount C.uint32_t - ret := C.CCall_lib3mf_meshobject_getvertexcount(inst.wrapperRef.LibraryHandle, inst.Ref, &vertexCount) - if ret != 0 { - return 0, makeError(uint32(ret)) - } - return uint32(vertexCount), nil -} -// GetTriangleCount returns the triangle count of a mesh object. -func (inst MeshObject) GetTriangleCount() (uint32, error) { - var vertexCount C.uint32_t - ret := C.CCall_lib3mf_meshobject_gettrianglecount(inst.wrapperRef.LibraryHandle, inst.Ref, &vertexCount) - if ret != 0 { - return 0, makeError(uint32(ret)) - } - return uint32(vertexCount), nil +// ModNode represents a Lib3MF class. +type ModNode struct { + TwoInputNode } -// GetVertex returns the vertex count of a mesh object. -func (inst MeshObject) GetVertex(index uint32) (Position, error) { - var coordinates C.sLib3MFPosition - ret := C.CCall_lib3mf_meshobject_getvertex(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &coordinates) - if ret != 0 { - return Position{}, makeError(uint32(ret)) - } - return *(*Position)(unsafe.Pointer(&coordinates)), nil +func (wrapper Wrapper) NewModNode(r ref) ModNode { + return ModNode{wrapper.NewTwoInputNode(r)} } -// SetVertex sets the coordinates of a single vertex of a mesh object. -func (inst MeshObject) SetVertex(index uint32, coordinates Position) error { - ret := C.CCall_lib3mf_meshobject_setvertex(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.sLib3MFPosition)(unsafe.Pointer(&coordinates))) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil + +// PowNode represents a Lib3MF class. +type PowNode struct { + TwoInputNode } -// AddVertex adds a single vertex to a mesh object. -func (inst MeshObject) AddVertex(coordinates Position) (uint32, error) { - var newIndex C.uint32_t - ret := C.CCall_lib3mf_meshobject_addvertex(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFPosition)(unsafe.Pointer(&coordinates)), &newIndex) - if ret != 0 { - return 0, makeError(uint32(ret)) - } - return uint32(newIndex), nil +func (wrapper Wrapper) NewPowNode(r ref) PowNode { + return PowNode{wrapper.NewTwoInputNode(r)} } -// GetVertices obtains all vertex positions of a mesh object. -func (inst MeshObject) GetVertices(vertices []Position) ([]Position, error) { - var neededforvertices C.uint64_t - ret := C.CCall_lib3mf_meshobject_getvertices(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforvertices, nil) - if ret != 0 { - return nil, makeError(uint32(ret)) - } - if len(vertices) < int(neededforvertices) { - vertices = append(vertices, make([]Position, int(neededforvertices)-len(vertices))...) - } - ret = C.CCall_lib3mf_meshobject_getvertices(inst.wrapperRef.LibraryHandle, inst.Ref, neededforvertices, nil, (*C.sLib3MFPosition)(unsafe.Pointer(&vertices[0]))) - if ret != 0 { - return nil, makeError(uint32(ret)) - } - return vertices[:int(neededforvertices)], nil + +// SelectNode represents a Lib3MF class. +type SelectNode struct { + OneInputNode } -// GetTriangle returns indices of a single triangle of a mesh object. -func (inst MeshObject) GetTriangle(index uint32) (Triangle, error) { - var indices C.sLib3MFTriangle - ret := C.CCall_lib3mf_meshobject_gettriangle(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &indices) - if ret != 0 { - return Triangle{}, makeError(uint32(ret)) - } - return *(*Triangle)(unsafe.Pointer(&indices)), nil +func (wrapper Wrapper) NewSelectNode(r ref) SelectNode { + return SelectNode{wrapper.NewOneInputNode(r)} } -// SetTriangle sets the indices of a single triangle of a mesh object. -func (inst MeshObject) SetTriangle(index uint32, indices Triangle) error { - ret := C.CCall_lib3mf_meshobject_settriangle(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.sLib3MFTriangle)(unsafe.Pointer(&indices))) +// GetInputB retrieves the second input. +func (inst SelectNode) GetInputB() (ImplicitPort, error) { + var b ref + ret := C.CCall_lib3mf_selectnode_getinputb(inst.wrapperRef.LibraryHandle, inst.Ref, &b) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(b), nil } -// AddTriangle adds a single triangle to a mesh object. -func (inst MeshObject) AddTriangle(indices Triangle) (uint32, error) { - var newIndex C.uint32_t - ret := C.CCall_lib3mf_meshobject_addtriangle(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFTriangle)(unsafe.Pointer(&indices)), &newIndex) +// GetInputC retrieves the third input. +func (inst SelectNode) GetInputC() (ImplicitPort, error) { + var c ref + ret := C.CCall_lib3mf_selectnode_getinputc(inst.wrapperRef.LibraryHandle, inst.Ref, &c) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return uint32(newIndex), nil + return inst.wrapperRef.NewImplicitPort(c), nil } -// GetTriangleIndices get all triangles of a mesh object. -func (inst MeshObject) GetTriangleIndices(indices []Triangle) ([]Triangle, error) { - var neededforindices C.uint64_t - ret := C.CCall_lib3mf_meshobject_gettriangleindices(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforindices, nil) - if ret != 0 { - return nil, makeError(uint32(ret)) - } - if len(indices) < int(neededforindices) { - indices = append(indices, make([]Triangle, int(neededforindices)-len(indices))...) - } - ret = C.CCall_lib3mf_meshobject_gettriangleindices(inst.wrapperRef.LibraryHandle, inst.Ref, neededforindices, nil, (*C.sLib3MFTriangle)(unsafe.Pointer(&indices[0]))) +// GetInputD retrieves the fourth input. +func (inst SelectNode) GetInputD() (ImplicitPort, error) { + var d ref + ret := C.CCall_lib3mf_selectnode_getinputd(inst.wrapperRef.LibraryHandle, inst.Ref, &d) if ret != 0 { - return nil, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return indices[:int(neededforindices)], nil + return inst.wrapperRef.NewImplicitPort(d), nil } -// SetObjectLevelProperty sets the property at the object-level of the mesh object. -func (inst MeshObject) SetObjectLevelProperty(uniqueResourceID uint32, propertyID uint32) error { - ret := C.CCall_lib3mf_meshobject_setobjectlevelproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(uniqueResourceID), C.uint32_t(propertyID)) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil + +// ClampNode represents a Lib3MF class. +type ClampNode struct { + OneInputNode } -// GetObjectLevelProperty gets the property at the object-level of the mesh object. -func (inst MeshObject) GetObjectLevelProperty() (uint32, uint32, bool, error) { - var uniqueResourceID C.uint32_t - var propertyID C.uint32_t - var hasObjectLevelProperty C.bool - ret := C.CCall_lib3mf_meshobject_getobjectlevelproperty(inst.wrapperRef.LibraryHandle, inst.Ref, &uniqueResourceID, &propertyID, &hasObjectLevelProperty) - if ret != 0 { - return 0, 0, false, makeError(uint32(ret)) - } - return uint32(uniqueResourceID), uint32(propertyID), bool(hasObjectLevelProperty), nil +func (wrapper Wrapper) NewClampNode(r ref) ClampNode { + return ClampNode{wrapper.NewOneInputNode(r)} } -// SetTriangleProperties sets the properties of a single triangle of a mesh object. -func (inst MeshObject) SetTriangleProperties(index uint32, properties TriangleProperties) error { - ret := C.CCall_lib3mf_meshobject_settriangleproperties(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.sLib3MFTriangleProperties)(unsafe.Pointer(&properties))) +// GetInputMin retrieves the input for the lower limit. +func (inst ClampNode) GetInputMin() (ImplicitPort, error) { + var min ref + ret := C.CCall_lib3mf_clampnode_getinputmin(inst.wrapperRef.LibraryHandle, inst.Ref, &min) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(min), nil } -// GetTriangleProperties gets the properties of a single triangle of a mesh object. -func (inst MeshObject) GetTriangleProperties(index uint32) (TriangleProperties, error) { - var property C.sLib3MFTriangleProperties - ret := C.CCall_lib3mf_meshobject_gettriangleproperties(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &property) +// GetInputMax retrieves the input for the upper limit. +func (inst ClampNode) GetInputMax() (ImplicitPort, error) { + var max ref + ret := C.CCall_lib3mf_clampnode_getinputmax(inst.wrapperRef.LibraryHandle, inst.Ref, &max) if ret != 0 { - return TriangleProperties{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return *(*TriangleProperties)(unsafe.Pointer(&property)), nil + return inst.wrapperRef.NewImplicitPort(max), nil } -// SetAllTriangleProperties sets the properties of all triangles of a mesh object. Sets the object level property to the first entry of the passed triangle properties, if not yet specified. -func (inst MeshObject) SetAllTriangleProperties(propertiesArray []TriangleProperties) error { - ret := C.CCall_lib3mf_meshobject_setalltriangleproperties(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(propertiesArray)), (*C.sLib3MFTriangleProperties)(unsafe.Pointer(&propertiesArray[0]))) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil + +// ComposeVectorNode represents a Lib3MF class. +type ComposeVectorNode struct { + ImplicitNode } -// GetAllTriangleProperties gets the properties of all triangles of a mesh object. -func (inst MeshObject) GetAllTriangleProperties(propertiesArray []TriangleProperties) ([]TriangleProperties, error) { - var neededforpropertiesArray C.uint64_t - ret := C.CCall_lib3mf_meshobject_getalltriangleproperties(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertiesArray, nil) - if ret != 0 { - return nil, makeError(uint32(ret)) - } - if len(propertiesArray) < int(neededforpropertiesArray) { - propertiesArray = append(propertiesArray, make([]TriangleProperties, int(neededforpropertiesArray)-len(propertiesArray))...) - } - ret = C.CCall_lib3mf_meshobject_getalltriangleproperties(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertiesArray, nil, (*C.sLib3MFTriangleProperties)(unsafe.Pointer(&propertiesArray[0]))) - if ret != 0 { - return nil, makeError(uint32(ret)) - } - return propertiesArray[:int(neededforpropertiesArray)], nil +func (wrapper Wrapper) NewComposeVectorNode(r ref) ComposeVectorNode { + return ComposeVectorNode{wrapper.NewImplicitNode(r)} } -// ClearAllProperties clears all properties of this mesh object (triangle and object-level). -func (inst MeshObject) ClearAllProperties() error { - ret := C.CCall_lib3mf_meshobject_clearallproperties(inst.wrapperRef.LibraryHandle, inst.Ref) +// GetInputX retrieves the input for the x component. +func (inst ComposeVectorNode) GetInputX() (ImplicitPort, error) { + var x ref + ret := C.CCall_lib3mf_composevectornode_getinputx(inst.wrapperRef.LibraryHandle, inst.Ref, &x) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(x), nil } -// SetGeometry set all triangles of a mesh object. -func (inst MeshObject) SetGeometry(vertices []Position, indices []Triangle) error { - ret := C.CCall_lib3mf_meshobject_setgeometry(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(vertices)), (*C.sLib3MFPosition)(unsafe.Pointer(&vertices[0])), C.uint64_t(len(indices)), (*C.sLib3MFTriangle)(unsafe.Pointer(&indices[0]))) +// GetInputY retrieves the input for the y component. +func (inst ComposeVectorNode) GetInputY() (ImplicitPort, error) { + var y ref + ret := C.CCall_lib3mf_composevectornode_getinputy(inst.wrapperRef.LibraryHandle, inst.Ref, &y) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(y), nil } -// IsManifoldAndOriented retrieves, if an object describes a topologically oriented and manifold mesh, according to the core spec. -func (inst MeshObject) IsManifoldAndOriented() (bool, error) { - var isManifoldAndOriented C.bool - ret := C.CCall_lib3mf_meshobject_ismanifoldandoriented(inst.wrapperRef.LibraryHandle, inst.Ref, &isManifoldAndOriented) +// GetInputZ retrieves the input for the z component. +func (inst ComposeVectorNode) GetInputZ() (ImplicitPort, error) { + var z ref + ret := C.CCall_lib3mf_composevectornode_getinputz(inst.wrapperRef.LibraryHandle, inst.Ref, &z) if ret != 0 { - return false, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return bool(isManifoldAndOriented), nil + return inst.wrapperRef.NewImplicitPort(z), nil } -// BeamLattice retrieves the BeamLattice within this MeshObject. -func (inst MeshObject) BeamLattice() (BeamLattice, error) { - var theBeamLattice ref - ret := C.CCall_lib3mf_meshobject_beamlattice(inst.wrapperRef.LibraryHandle, inst.Ref, &theBeamLattice) +// GetOutputResult retrieves the output. +func (inst ComposeVectorNode) GetOutputResult() (ImplicitPort, error) { + var result ref + ret := C.CCall_lib3mf_composevectornode_getoutputresult(inst.wrapperRef.LibraryHandle, inst.Ref, &result) if ret != 0 { - return BeamLattice{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewBeamLattice(theBeamLattice), nil + return inst.wrapperRef.NewImplicitPort(result), nil } -// BeamLattice represents a Lib3MF class. -type BeamLattice struct { - Base +// VectorFromScalarNode represents a Lib3MF class. +type VectorFromScalarNode struct { + OneInputNode } -func (wrapper Wrapper) NewBeamLattice(r ref) BeamLattice { - return BeamLattice{wrapper.NewBase(r)} +func (wrapper Wrapper) NewVectorFromScalarNode(r ref) VectorFromScalarNode { + return VectorFromScalarNode{wrapper.NewOneInputNode(r)} } -// GetMinLength returns the minimal length of beams for the beamlattice. -func (inst BeamLattice) GetMinLength() (float64, error) { - var minLength C.double - ret := C.CCall_lib3mf_beamlattice_getminlength(inst.wrapperRef.LibraryHandle, inst.Ref, &minLength) - if ret != 0 { - return 0, makeError(uint32(ret)) - } - return float64(minLength), nil + +// DecomposeVectorNode represents a Lib3MF class. +type DecomposeVectorNode struct { + ImplicitNode } -// SetMinLength sets the minimal length of beams for the beamlattice. -func (inst BeamLattice) SetMinLength(minLength float64) error { - ret := C.CCall_lib3mf_beamlattice_setminlength(inst.wrapperRef.LibraryHandle, inst.Ref, C.double(minLength)) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil +func (wrapper Wrapper) NewDecomposeVectorNode(r ref) DecomposeVectorNode { + return DecomposeVectorNode{wrapper.NewImplicitNode(r)} } -// GetClipping returns the clipping mode and the clipping-mesh for the beamlattice of this mesh. -func (inst BeamLattice) GetClipping() (BeamLatticeClipMode, uint32, error) { - var clipMode C.eLib3MFBeamLatticeClipMode - var uniqueResourceID C.uint32_t - ret := C.CCall_lib3mf_beamlattice_getclipping(inst.wrapperRef.LibraryHandle, inst.Ref, &clipMode, &uniqueResourceID) +// GetInputA retrieves the input. +func (inst DecomposeVectorNode) GetInputA() (ImplicitPort, error) { + var a ref + ret := C.CCall_lib3mf_decomposevectornode_getinputa(inst.wrapperRef.LibraryHandle, inst.Ref, &a) if ret != 0 { - return 0, 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return BeamLatticeClipMode(clipMode), uint32(uniqueResourceID), nil + return inst.wrapperRef.NewImplicitPort(a), nil } -// SetClipping sets the clipping mode and the clipping-mesh for the beamlattice of this mesh. -func (inst BeamLattice) SetClipping(clipMode BeamLatticeClipMode, uniqueResourceID uint32) error { - ret := C.CCall_lib3mf_beamlattice_setclipping(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFBeamLatticeClipMode(clipMode), C.uint32_t(uniqueResourceID)) +// GetOutputX retrieves the output for the x component. +func (inst DecomposeVectorNode) GetOutputX() (ImplicitPort, error) { + var x ref + ret := C.CCall_lib3mf_decomposevectornode_getoutputx(inst.wrapperRef.LibraryHandle, inst.Ref, &x) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(x), nil } -// GetRepresentation returns the representation-mesh for the beamlattice of this mesh. -func (inst BeamLattice) GetRepresentation() (bool, uint32, error) { - var hasRepresentation C.bool - var uniqueResourceID C.uint32_t - ret := C.CCall_lib3mf_beamlattice_getrepresentation(inst.wrapperRef.LibraryHandle, inst.Ref, &hasRepresentation, &uniqueResourceID) +// GetOutputY retrieves the output for the y component. +func (inst DecomposeVectorNode) GetOutputY() (ImplicitPort, error) { + var y ref + ret := C.CCall_lib3mf_decomposevectornode_getoutputy(inst.wrapperRef.LibraryHandle, inst.Ref, &y) if ret != 0 { - return false, 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return bool(hasRepresentation), uint32(uniqueResourceID), nil + return inst.wrapperRef.NewImplicitPort(y), nil } -// SetRepresentation sets the representation-mesh for the beamlattice of this mesh. -func (inst BeamLattice) SetRepresentation(uniqueResourceID uint32) error { - ret := C.CCall_lib3mf_beamlattice_setrepresentation(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(uniqueResourceID)) +// GetOutputZ retrieves the output for the z component. +func (inst DecomposeVectorNode) GetOutputZ() (ImplicitPort, error) { + var z ref + ret := C.CCall_lib3mf_decomposevectornode_getoutputz(inst.wrapperRef.LibraryHandle, inst.Ref, &z) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(z), nil } -// GetBallOptions returns the ball mode and the default ball radius for the beamlattice of this mesh. -func (inst BeamLattice) GetBallOptions() (BeamLatticeBallMode, float64, error) { - var ballMode C.eLib3MFBeamLatticeBallMode - var ballRadius C.double - ret := C.CCall_lib3mf_beamlattice_getballoptions(inst.wrapperRef.LibraryHandle, inst.Ref, &ballMode, &ballRadius) - if ret != 0 { - return 0, 0, makeError(uint32(ret)) - } - return BeamLatticeBallMode(ballMode), float64(ballRadius), nil + +// ComposeMatrixNode represents a Lib3MF class. +type ComposeMatrixNode struct { + ImplicitNode } -// SetBallOptions sets the ball mode and thedefault ball radius for the beamlattice. -func (inst BeamLattice) SetBallOptions(ballMode BeamLatticeBallMode, ballRadius float64) error { - ret := C.CCall_lib3mf_beamlattice_setballoptions(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFBeamLatticeBallMode(ballMode), C.double(ballRadius)) - if ret != 0 { - return makeError(uint32(ret)) - } - return nil +func (wrapper Wrapper) NewComposeMatrixNode(r ref) ComposeMatrixNode { + return ComposeMatrixNode{wrapper.NewImplicitNode(r)} } -// GetBeamCount returns the beam count of a mesh object. -func (inst BeamLattice) GetBeamCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_beamlattice_getbeamcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// GetInputM00 retrieves the input for the element 0 0. +func (inst ComposeMatrixNode) GetInputM00() (ImplicitPort, error) { + var m00 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm00(inst.wrapperRef.LibraryHandle, inst.Ref, &m00) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewImplicitPort(m00), nil } -// GetBeam returns indices, radii and capmodes of a single beam of a mesh object. -func (inst BeamLattice) GetBeam(index uint32) (Beam, error) { - var beamInfo C.sLib3MFBeam - ret := C.CCall_lib3mf_beamlattice_getbeam(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &beamInfo) +// GetInputM01 retrieves the input for the element 0 1. +func (inst ComposeMatrixNode) GetInputM01() (ImplicitPort, error) { + var m01 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm01(inst.wrapperRef.LibraryHandle, inst.Ref, &m01) if ret != 0 { - return Beam{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return *(*Beam)(unsafe.Pointer(&beamInfo)), nil + return inst.wrapperRef.NewImplicitPort(m01), nil } -// AddBeam adds a single beam to a mesh object. -func (inst BeamLattice) AddBeam(beamInfo Beam) (uint32, error) { - var index C.uint32_t - ret := C.CCall_lib3mf_beamlattice_addbeam(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFBeam)(unsafe.Pointer(&beamInfo)), &index) +// GetInputM02 retrieves the input for the element 0 2. +func (inst ComposeMatrixNode) GetInputM02() (ImplicitPort, error) { + var m02 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm02(inst.wrapperRef.LibraryHandle, inst.Ref, &m02) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return uint32(index), nil + return inst.wrapperRef.NewImplicitPort(m02), nil } -// SetBeam sets the indices, radii and capmodes of a single beam of a mesh object. -func (inst BeamLattice) SetBeam(index uint32, beamInfo Beam) error { - ret := C.CCall_lib3mf_beamlattice_setbeam(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.sLib3MFBeam)(unsafe.Pointer(&beamInfo))) +// GetInputM03 retrieves the input for the element 0 3. +func (inst ComposeMatrixNode) GetInputM03() (ImplicitPort, error) { + var m03 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm03(inst.wrapperRef.LibraryHandle, inst.Ref, &m03) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(m03), nil } -// SetBeams sets all beam indices, radii and capmodes of a mesh object. -func (inst BeamLattice) SetBeams(beamInfo []Beam) error { - ret := C.CCall_lib3mf_beamlattice_setbeams(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(beamInfo)), (*C.sLib3MFBeam)(unsafe.Pointer(&beamInfo[0]))) +// GetInputM10 retrieves the input for the element 1 0. +func (inst ComposeMatrixNode) GetInputM10() (ImplicitPort, error) { + var m10 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm10(inst.wrapperRef.LibraryHandle, inst.Ref, &m10) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(m10), nil } -// GetBeams obtains all beam indices, radii and capmodes of a mesh object. -func (inst BeamLattice) GetBeams(beamInfo []Beam) ([]Beam, error) { - var neededforbeamInfo C.uint64_t - ret := C.CCall_lib3mf_beamlattice_getbeams(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforbeamInfo, nil) +// GetInputM11 retrieves the input for the element 1 1. +func (inst ComposeMatrixNode) GetInputM11() (ImplicitPort, error) { + var m11 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm11(inst.wrapperRef.LibraryHandle, inst.Ref, &m11) if ret != 0 { - return nil, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - if len(beamInfo) < int(neededforbeamInfo) { - beamInfo = append(beamInfo, make([]Beam, int(neededforbeamInfo)-len(beamInfo))...) - } - ret = C.CCall_lib3mf_beamlattice_getbeams(inst.wrapperRef.LibraryHandle, inst.Ref, neededforbeamInfo, nil, (*C.sLib3MFBeam)(unsafe.Pointer(&beamInfo[0]))) + return inst.wrapperRef.NewImplicitPort(m11), nil +} + +// GetInputM12 retrieves the input for the element 1 2. +func (inst ComposeMatrixNode) GetInputM12() (ImplicitPort, error) { + var m12 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm12(inst.wrapperRef.LibraryHandle, inst.Ref, &m12) if ret != 0 { - return nil, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return beamInfo[:int(neededforbeamInfo)], nil + return inst.wrapperRef.NewImplicitPort(m12), nil } -// GetBallCount returns the ball count of a mesh object. -func (inst BeamLattice) GetBallCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_beamlattice_getballcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// GetInputM13 retrieves the input for the element 1 3. +func (inst ComposeMatrixNode) GetInputM13() (ImplicitPort, error) { + var m13 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm13(inst.wrapperRef.LibraryHandle, inst.Ref, &m13) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewImplicitPort(m13), nil } -// GetBall returns index and radius of a single ball of a mesh object. -func (inst BeamLattice) GetBall(index uint32) (Ball, error) { - var ballInfo C.sLib3MFBall - ret := C.CCall_lib3mf_beamlattice_getball(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &ballInfo) +// GetInputM20 retrieves the input for the element 2 0. +func (inst ComposeMatrixNode) GetInputM20() (ImplicitPort, error) { + var m20 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm20(inst.wrapperRef.LibraryHandle, inst.Ref, &m20) if ret != 0 { - return Ball{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return *(*Ball)(unsafe.Pointer(&ballInfo)), nil + return inst.wrapperRef.NewImplicitPort(m20), nil } -// AddBall adds a single ball to a mesh object. -func (inst BeamLattice) AddBall(ballInfo Ball) (uint32, error) { - var index C.uint32_t - ret := C.CCall_lib3mf_beamlattice_addball(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFBall)(unsafe.Pointer(&ballInfo)), &index) +// GetInputM21 retrieves the input for the element 2 1. +func (inst ComposeMatrixNode) GetInputM21() (ImplicitPort, error) { + var m21 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm21(inst.wrapperRef.LibraryHandle, inst.Ref, &m21) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return uint32(index), nil + return inst.wrapperRef.NewImplicitPort(m21), nil } -// SetBall sets the index and radius of a single ball of a mesh object. -func (inst BeamLattice) SetBall(index uint32, ballInfo Ball) error { - ret := C.CCall_lib3mf_beamlattice_setball(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), (*C.sLib3MFBall)(unsafe.Pointer(&ballInfo))) +// GetInputM22 retrieves the input for the element 2 2. +func (inst ComposeMatrixNode) GetInputM22() (ImplicitPort, error) { + var m22 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm22(inst.wrapperRef.LibraryHandle, inst.Ref, &m22) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(m22), nil } -// SetBalls sets all ball indices and radii of a mesh object. -func (inst BeamLattice) SetBalls(ballInfo []Ball) error { - ret := C.CCall_lib3mf_beamlattice_setballs(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(ballInfo)), (*C.sLib3MFBall)(unsafe.Pointer(&ballInfo[0]))) +// GetInputM23 retrieves the input for the element 2 3. +func (inst ComposeMatrixNode) GetInputM23() (ImplicitPort, error) { + var m23 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm23(inst.wrapperRef.LibraryHandle, inst.Ref, &m23) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(m23), nil } -// GetBalls obtains all ball indices and radii of a mesh object. -func (inst BeamLattice) GetBalls(ballInfo []Ball) ([]Ball, error) { - var neededforballInfo C.uint64_t - ret := C.CCall_lib3mf_beamlattice_getballs(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforballInfo, nil) +// GetInputM30 retrieves the input for the element 3 0. +func (inst ComposeMatrixNode) GetInputM30() (ImplicitPort, error) { + var m30 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm30(inst.wrapperRef.LibraryHandle, inst.Ref, &m30) if ret != 0 { - return nil, makeError(uint32(ret)) - } - if len(ballInfo) < int(neededforballInfo) { - ballInfo = append(ballInfo, make([]Ball, int(neededforballInfo)-len(ballInfo))...) + return ImplicitPort{}, makeError(uint32(ret)) } - ret = C.CCall_lib3mf_beamlattice_getballs(inst.wrapperRef.LibraryHandle, inst.Ref, neededforballInfo, nil, (*C.sLib3MFBall)(unsafe.Pointer(&ballInfo[0]))) + return inst.wrapperRef.NewImplicitPort(m30), nil +} + +// GetInputM31 retrieves the input for the element 3 1. +func (inst ComposeMatrixNode) GetInputM31() (ImplicitPort, error) { + var m31 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm31(inst.wrapperRef.LibraryHandle, inst.Ref, &m31) if ret != 0 { - return nil, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return ballInfo[:int(neededforballInfo)], nil + return inst.wrapperRef.NewImplicitPort(m31), nil } -// GetBeamSetCount returns the number of beamsets of a mesh object. -func (inst BeamLattice) GetBeamSetCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_beamlattice_getbeamsetcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// GetInputM32 retrieves the input for the element 3 2. +func (inst ComposeMatrixNode) GetInputM32() (ImplicitPort, error) { + var m32 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm32(inst.wrapperRef.LibraryHandle, inst.Ref, &m32) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewImplicitPort(m32), nil } -// AddBeamSet adds an empty beamset to a mesh object. -func (inst BeamLattice) AddBeamSet() (BeamSet, error) { - var beamSet ref - ret := C.CCall_lib3mf_beamlattice_addbeamset(inst.wrapperRef.LibraryHandle, inst.Ref, &beamSet) +// GetInputM33 retrieves the input for the element 3 3. +func (inst ComposeMatrixNode) GetInputM33() (ImplicitPort, error) { + var m33 ref + ret := C.CCall_lib3mf_composematrixnode_getinputm33(inst.wrapperRef.LibraryHandle, inst.Ref, &m33) if ret != 0 { - return BeamSet{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewBeamSet(beamSet), nil + return inst.wrapperRef.NewImplicitPort(m33), nil } -// GetBeamSet returns a beamset of a mesh object. -func (inst BeamLattice) GetBeamSet(index uint32) (BeamSet, error) { - var beamSet ref - ret := C.CCall_lib3mf_beamlattice_getbeamset(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &beamSet) +// GetOutputResult retrieves the output. +func (inst ComposeMatrixNode) GetOutputResult() (ImplicitPort, error) { + var result ref + ret := C.CCall_lib3mf_composematrixnode_getoutputresult(inst.wrapperRef.LibraryHandle, inst.Ref, &result) if ret != 0 { - return BeamSet{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewBeamSet(beamSet), nil + return inst.wrapperRef.NewImplicitPort(result), nil } -// Component represents a Lib3MF class. -type Component struct { - Base +// MatrixFromRowsNode represents a Lib3MF class. +type MatrixFromRowsNode struct { + ImplicitNode } -func (wrapper Wrapper) NewComponent(r ref) Component { - return Component{wrapper.NewBase(r)} +func (wrapper Wrapper) NewMatrixFromRowsNode(r ref) MatrixFromRowsNode { + return MatrixFromRowsNode{wrapper.NewImplicitNode(r)} } -// GetObjectResource returns the Resource Instance of the component. -func (inst Component) GetObjectResource() (Object, error) { - var objectResource ref - ret := C.CCall_lib3mf_component_getobjectresource(inst.wrapperRef.LibraryHandle, inst.Ref, &objectResource) +// GetInputA retrieves the input for the first row. +func (inst MatrixFromRowsNode) GetInputA() (ImplicitPort, error) { + var row0 ref + ret := C.CCall_lib3mf_matrixfromrowsnode_getinputa(inst.wrapperRef.LibraryHandle, inst.Ref, &row0) if ret != 0 { - return Object{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewObject(objectResource), nil + return inst.wrapperRef.NewImplicitPort(row0), nil } -// GetObjectResourceID returns the UniqueResourceID of the component. -func (inst Component) GetObjectResourceID() (uint32, error) { - var uniqueResourceID C.uint32_t - ret := C.CCall_lib3mf_component_getobjectresourceid(inst.wrapperRef.LibraryHandle, inst.Ref, &uniqueResourceID) +// GetInputB retrieves the input for the second row. +func (inst MatrixFromRowsNode) GetInputB() (ImplicitPort, error) { + var row1 ref + ret := C.CCall_lib3mf_matrixfromrowsnode_getinputb(inst.wrapperRef.LibraryHandle, inst.Ref, &row1) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return uint32(uniqueResourceID), nil + return inst.wrapperRef.NewImplicitPort(row1), nil } -// GetUUID returns, whether a component has a UUID and, if true, the component's UUID. -func (inst Component) GetUUID() (bool, string, error) { - var hasUUID C.bool - var neededforuUID C.uint32_t - var filledinuUID C.uint32_t - ret := C.CCall_lib3mf_component_getuuid(inst.wrapperRef.LibraryHandle, inst.Ref, &hasUUID, 0, &neededforuUID, nil) +// GetInputC retrieves the input for the third row. +func (inst MatrixFromRowsNode) GetInputC() (ImplicitPort, error) { + var row2 ref + ret := C.CCall_lib3mf_matrixfromrowsnode_getinputc(inst.wrapperRef.LibraryHandle, inst.Ref, &row2) if ret != 0 { - return false, "", makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - bufferSizeuUID := neededforuUID - bufferuUID := make([]byte, bufferSizeuUID) - ret = C.CCall_lib3mf_component_getuuid(inst.wrapperRef.LibraryHandle, inst.Ref, &hasUUID, bufferSizeuUID, &filledinuUID, (*C.char)(unsafe.Pointer(&bufferuUID[0]))) + return inst.wrapperRef.NewImplicitPort(row2), nil +} + +// GetInputD retrieves the input for the fourth row. +func (inst MatrixFromRowsNode) GetInputD() (ImplicitPort, error) { + var row3 ref + ret := C.CCall_lib3mf_matrixfromrowsnode_getinputd(inst.wrapperRef.LibraryHandle, inst.Ref, &row3) if ret != 0 { - return false, "", makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return bool(hasUUID), string(bufferuUID[:(filledinuUID-1)]), nil + return inst.wrapperRef.NewImplicitPort(row3), nil } -// SetUUID sets the component's UUID. -func (inst Component) SetUUID(uUID string) error { - ret := C.CCall_lib3mf_component_setuuid(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(uUID)[0]))) +// GetOutputResult retrieves the output. +func (inst MatrixFromRowsNode) GetOutputResult() (ImplicitPort, error) { + var result ref + ret := C.CCall_lib3mf_matrixfromrowsnode_getoutputresult(inst.wrapperRef.LibraryHandle, inst.Ref, &result) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(result), nil } -// HasTransform returns, if the component has a different transformation than the identity matrix. -func (inst Component) HasTransform() (bool, error) { - var hasTransform C.bool - ret := C.CCall_lib3mf_component_hastransform(inst.wrapperRef.LibraryHandle, inst.Ref, &hasTransform) + +// MatrixFromColumnsNode represents a Lib3MF class. +type MatrixFromColumnsNode struct { + ImplicitNode +} + +func (wrapper Wrapper) NewMatrixFromColumnsNode(r ref) MatrixFromColumnsNode { + return MatrixFromColumnsNode{wrapper.NewImplicitNode(r)} +} + +// GetInputA retrieves the input for the first column. +func (inst MatrixFromColumnsNode) GetInputA() (ImplicitPort, error) { + var column0 ref + ret := C.CCall_lib3mf_matrixfromcolumnsnode_getinputa(inst.wrapperRef.LibraryHandle, inst.Ref, &column0) if ret != 0 { - return false, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return bool(hasTransform), nil + return inst.wrapperRef.NewImplicitPort(column0), nil } -// GetTransform returns the transformation matrix of the component. -func (inst Component) GetTransform() (Transform, error) { - var transform C.sLib3MFTransform - ret := C.CCall_lib3mf_component_gettransform(inst.wrapperRef.LibraryHandle, inst.Ref, &transform) +// GetInputB retrieves the input for the second column. +func (inst MatrixFromColumnsNode) GetInputB() (ImplicitPort, error) { + var column1 ref + ret := C.CCall_lib3mf_matrixfromcolumnsnode_getinputb(inst.wrapperRef.LibraryHandle, inst.Ref, &column1) if ret != 0 { - return Transform{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return *(*Transform)(unsafe.Pointer(&transform)), nil + return inst.wrapperRef.NewImplicitPort(column1), nil } -// SetTransform sets the transformation matrix of the component. -func (inst Component) SetTransform(transform Transform) error { - ret := C.CCall_lib3mf_component_settransform(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFTransform)(unsafe.Pointer(&transform))) +// GetInputC retrieves the input for the third column. +func (inst MatrixFromColumnsNode) GetInputC() (ImplicitPort, error) { + var column2 ref + ret := C.CCall_lib3mf_matrixfromcolumnsnode_getinputc(inst.wrapperRef.LibraryHandle, inst.Ref, &column2) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(column2), nil } +// GetInputD retrieves the input for the fourth column. +func (inst MatrixFromColumnsNode) GetInputD() (ImplicitPort, error) { + var column3 ref + ret := C.CCall_lib3mf_matrixfromcolumnsnode_getinputd(inst.wrapperRef.LibraryHandle, inst.Ref, &column3) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(column3), nil +} -// ComponentsObject represents a Lib3MF class. -type ComponentsObject struct { - Object +// GetOutputResult retrieves the output. +func (inst MatrixFromColumnsNode) GetOutputResult() (ImplicitPort, error) { + var result ref + ret := C.CCall_lib3mf_matrixfromcolumnsnode_getoutputresult(inst.wrapperRef.LibraryHandle, inst.Ref, &result) + if ret != 0 { + return ImplicitPort{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitPort(result), nil } -func (wrapper Wrapper) NewComponentsObject(r ref) ComponentsObject { - return ComponentsObject{wrapper.NewObject(r)} + +// ConstantNode represents a Lib3MF class. +type ConstantNode struct { + ImplicitNode } -// AddComponent adds a new component to a components object. -func (inst ComponentsObject) AddComponent(objectResource Object, transform Transform) (Component, error) { - var componentInstance ref - ret := C.CCall_lib3mf_componentsobject_addcomponent(inst.wrapperRef.LibraryHandle, inst.Ref, objectResource.Ref, (*C.sLib3MFTransform)(unsafe.Pointer(&transform)), &componentInstance) +func (wrapper Wrapper) NewConstantNode(r ref) ConstantNode { + return ConstantNode{wrapper.NewImplicitNode(r)} +} + +// SetConstant sets the constant value of the node. +func (inst ConstantNode) SetConstant(value float64) error { + ret := C.CCall_lib3mf_constantnode_setconstant(inst.wrapperRef.LibraryHandle, inst.Ref, C.double(value)) if ret != 0 { - return Component{}, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return inst.wrapperRef.NewComponent(componentInstance), nil + return nil } -// GetComponent retrieves a component from a component object. -func (inst ComponentsObject) GetComponent(index uint32) (Component, error) { - var componentInstance ref - ret := C.CCall_lib3mf_componentsobject_getcomponent(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(index), &componentInstance) +// GetConstant retrieves the constant value of the node. +func (inst ConstantNode) GetConstant() (float64, error) { + var value C.double + ret := C.CCall_lib3mf_constantnode_getconstant(inst.wrapperRef.LibraryHandle, inst.Ref, &value) if ret != 0 { - return Component{}, makeError(uint32(ret)) + return 0, makeError(uint32(ret)) } - return inst.wrapperRef.NewComponent(componentInstance), nil + return float64(value), nil } -// GetComponentCount retrieves a component count of a component object. -func (inst ComponentsObject) GetComponentCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_componentsobject_getcomponentcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// GetOutputValue retrieves the output. +func (inst ConstantNode) GetOutputValue() (ImplicitPort, error) { + var value ref + ret := C.CCall_lib3mf_constantnode_getoutputvalue(inst.wrapperRef.LibraryHandle, inst.Ref, &value) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewImplicitPort(value), nil } -// BeamSet represents a Lib3MF class. -type BeamSet struct { - Base +// ConstVecNode represents a Lib3MF class. +type ConstVecNode struct { + ImplicitNode } -func (wrapper Wrapper) NewBeamSet(r ref) BeamSet { - return BeamSet{wrapper.NewBase(r)} +func (wrapper Wrapper) NewConstVecNode(r ref) ConstVecNode { + return ConstVecNode{wrapper.NewImplicitNode(r)} } -// SetName sets a beamset's name string. -func (inst BeamSet) SetName(name string) error { - ret := C.CCall_lib3mf_beamset_setname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(name)[0]))) +// SetVector sets the vector value of the node. +func (inst ConstVecNode) SetVector(value Vector) error { + ret := C.CCall_lib3mf_constvecnode_setvector(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFVector)(unsafe.Pointer(&value))) if ret != 0 { return makeError(uint32(ret)) } return nil } -// GetName retrieves a beamset's name string. -func (inst BeamSet) GetName() (string, error) { - var neededforname C.uint32_t - var filledinname C.uint32_t - ret := C.CCall_lib3mf_beamset_getname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforname, nil) +// GetVector retrieves the vector value of the node. +func (inst ConstVecNode) GetVector() (Vector, error) { + var value C.sLib3MFVector + ret := C.CCall_lib3mf_constvecnode_getvector(inst.wrapperRef.LibraryHandle, inst.Ref, &value) if ret != 0 { - return "", makeError(uint32(ret)) + return Vector{}, makeError(uint32(ret)) } - bufferSizename := neededforname - buffername := make([]byte, bufferSizename) - ret = C.CCall_lib3mf_beamset_getname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizename, &filledinname, (*C.char)(unsafe.Pointer(&buffername[0]))) + return *(*Vector)(unsafe.Pointer(&value)), nil +} + +// GetOutputVector retrieves the output. +func (inst ConstVecNode) GetOutputVector() (ImplicitPort, error) { + var vector ref + ret := C.CCall_lib3mf_constvecnode_getoutputvector(inst.wrapperRef.LibraryHandle, inst.Ref, &vector) if ret != 0 { - return "", makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return string(buffername[:(filledinname-1)]), nil + return inst.wrapperRef.NewImplicitPort(vector), nil } -// SetIdentifier sets a beamset's identifier string. -func (inst BeamSet) SetIdentifier(identifier string) error { - ret := C.CCall_lib3mf_beamset_setidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0]))) + +// ConstMatNode represents a Lib3MF class. +type ConstMatNode struct { + ImplicitNode +} + +func (wrapper Wrapper) NewConstMatNode(r ref) ConstMatNode { + return ConstMatNode{wrapper.NewImplicitNode(r)} +} + +// SetMatrix sets the matrix value of the node. +func (inst ConstMatNode) SetMatrix(value Matrix4x4) error { + ret := C.CCall_lib3mf_constmatnode_setmatrix(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFMatrix4x4)(unsafe.Pointer(&value))) if ret != 0 { return makeError(uint32(ret)) } return nil } -// GetIdentifier retrieves a beamset's identifier string. -func (inst BeamSet) GetIdentifier() (string, error) { - var neededforidentifier C.uint32_t - var filledinidentifier C.uint32_t - ret := C.CCall_lib3mf_beamset_getidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforidentifier, nil) - if ret != 0 { - return "", makeError(uint32(ret)) - } - bufferSizeidentifier := neededforidentifier - bufferidentifier := make([]byte, bufferSizeidentifier) - ret = C.CCall_lib3mf_beamset_getidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizeidentifier, &filledinidentifier, (*C.char)(unsafe.Pointer(&bufferidentifier[0]))) +// GetMatrix retrieves the matrix value of the node. +func (inst ConstMatNode) GetMatrix() (Matrix4x4, error) { + var value C.sLib3MFMatrix4x4 + ret := C.CCall_lib3mf_constmatnode_getmatrix(inst.wrapperRef.LibraryHandle, inst.Ref, &value) if ret != 0 { - return "", makeError(uint32(ret)) + return Matrix4x4{}, makeError(uint32(ret)) } - return string(bufferidentifier[:(filledinidentifier-1)]), nil + return *(*Matrix4x4)(unsafe.Pointer(&value)), nil } -// GetReferenceCount retrieves the reference count of a beamset. -func (inst BeamSet) GetReferenceCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_beamset_getreferencecount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// GetOutputMatrix retrieves the output. +func (inst ConstMatNode) GetOutputMatrix() (ImplicitPort, error) { + var matrix ref + ret := C.CCall_lib3mf_constmatnode_getoutputmatrix(inst.wrapperRef.LibraryHandle, inst.Ref, &matrix) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewImplicitPort(matrix), nil } -// SetReferences sets the references of a beamset. -func (inst BeamSet) SetReferences(references []uint32) error { - ret := C.CCall_lib3mf_beamset_setreferences(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(references)), (*C.uint32_t)(unsafe.Pointer(&references[0]))) + +// MeshNode represents a Lib3MF class. +type MeshNode struct { + ImplicitNode +} + +func (wrapper Wrapper) NewMeshNode(r ref) MeshNode { + return MeshNode{wrapper.NewImplicitNode(r)} +} + +// GetInputMesh retrieves the input for the model resource id of the mesh. +func (inst MeshNode) GetInputMesh() (ImplicitPort, error) { + var mesh ref + ret := C.CCall_lib3mf_meshnode_getinputmesh(inst.wrapperRef.LibraryHandle, inst.Ref, &mesh) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(mesh), nil } -// GetReferences retrieves the references of a beamset. -func (inst BeamSet) GetReferences(references []uint32) ([]uint32, error) { - var neededforreferences C.uint64_t - ret := C.CCall_lib3mf_beamset_getreferences(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforreferences, nil) +// GetInputPos retrieves the input for the position. +func (inst MeshNode) GetInputPos() (ImplicitPort, error) { + var pos ref + ret := C.CCall_lib3mf_meshnode_getinputpos(inst.wrapperRef.LibraryHandle, inst.Ref, &pos) if ret != 0 { - return nil, makeError(uint32(ret)) - } - if len(references) < int(neededforreferences) { - references = append(references, make([]uint32, int(neededforreferences)-len(references))...) + return ImplicitPort{}, makeError(uint32(ret)) } - ret = C.CCall_lib3mf_beamset_getreferences(inst.wrapperRef.LibraryHandle, inst.Ref, neededforreferences, nil, (*C.uint32_t)(unsafe.Pointer(&references[0]))) + return inst.wrapperRef.NewImplicitPort(pos), nil +} + +// GetOutputDistance retrieves the output. +func (inst MeshNode) GetOutputDistance() (ImplicitPort, error) { + var distance ref + ret := C.CCall_lib3mf_meshnode_getoutputdistance(inst.wrapperRef.LibraryHandle, inst.Ref, &distance) if ret != 0 { - return nil, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return references[:int(neededforreferences)], nil + return inst.wrapperRef.NewImplicitPort(distance), nil } -// GetBallReferenceCount retrieves the ball reference count of a beamset. -func (inst BeamSet) GetBallReferenceCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_beamset_getballreferencecount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) + +// UnsignedMeshNode represents a Lib3MF class. +type UnsignedMeshNode struct { + ImplicitNode +} + +func (wrapper Wrapper) NewUnsignedMeshNode(r ref) UnsignedMeshNode { + return UnsignedMeshNode{wrapper.NewImplicitNode(r)} +} + +// GetInputMesh retrieves the input for the model resource id of the mesh. +func (inst UnsignedMeshNode) GetInputMesh() (ImplicitPort, error) { + var mesh ref + ret := C.CCall_lib3mf_unsignedmeshnode_getinputmesh(inst.wrapperRef.LibraryHandle, inst.Ref, &mesh) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewImplicitPort(mesh), nil } -// SetBallReferences sets the ball references of a beamset. -func (inst BeamSet) SetBallReferences(ballReferences []uint32) error { - ret := C.CCall_lib3mf_beamset_setballreferences(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(ballReferences)), (*C.uint32_t)(unsafe.Pointer(&ballReferences[0]))) +// GetInputPos retrieves the input for the position. +func (inst UnsignedMeshNode) GetInputPos() (ImplicitPort, error) { + var pos ref + ret := C.CCall_lib3mf_unsignedmeshnode_getinputpos(inst.wrapperRef.LibraryHandle, inst.Ref, &pos) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(pos), nil } -// GetBallReferences retrieves the ball references of a beamset. -func (inst BeamSet) GetBallReferences(ballReferences []uint32) ([]uint32, error) { - var neededforballReferences C.uint64_t - ret := C.CCall_lib3mf_beamset_getballreferences(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforballReferences, nil) +// GetOutputDistance retrieves the output. +func (inst UnsignedMeshNode) GetOutputDistance() (ImplicitPort, error) { + var distance ref + ret := C.CCall_lib3mf_unsignedmeshnode_getoutputdistance(inst.wrapperRef.LibraryHandle, inst.Ref, &distance) if ret != 0 { - return nil, makeError(uint32(ret)) - } - if len(ballReferences) < int(neededforballReferences) { - ballReferences = append(ballReferences, make([]uint32, int(neededforballReferences)-len(ballReferences))...) + return ImplicitPort{}, makeError(uint32(ret)) } - ret = C.CCall_lib3mf_beamset_getballreferences(inst.wrapperRef.LibraryHandle, inst.Ref, neededforballReferences, nil, (*C.uint32_t)(unsafe.Pointer(&ballReferences[0]))) + return inst.wrapperRef.NewImplicitPort(distance), nil +} + + +// FunctionCallNode represents a Lib3MF class. +type FunctionCallNode struct { + ImplicitNode +} + +func (wrapper Wrapper) NewFunctionCallNode(r ref) FunctionCallNode { + return FunctionCallNode{wrapper.NewImplicitNode(r)} +} + +// GetInputFunctionID retrieves the input for the function id. +func (inst FunctionCallNode) GetInputFunctionID() (ImplicitPort, error) { + var function ref + ret := C.CCall_lib3mf_functioncallnode_getinputfunctionid(inst.wrapperRef.LibraryHandle, inst.Ref, &function) if ret != 0 { - return nil, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return ballReferences[:int(neededforballReferences)], nil + return inst.wrapperRef.NewImplicitPort(function), nil } -// BaseMaterialGroup represents a Lib3MF class. -type BaseMaterialGroup struct { - Resource +// NodeIterator represents a Lib3MF class. +type NodeIterator struct { + Iterator } -func (wrapper Wrapper) NewBaseMaterialGroup(r ref) BaseMaterialGroup { - return BaseMaterialGroup{wrapper.NewResource(r)} +func (wrapper Wrapper) NewNodeIterator(r ref) NodeIterator { + return NodeIterator{wrapper.NewIterator(r)} } -// GetCount retrieves the count of base materials in the material group. -func (inst BaseMaterialGroup) GetCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_basematerialgroup_getcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// GetCurrent returns the current element. +func (inst NodeIterator) GetCurrent() (ImplicitNode, error) { + var node ref + ret := C.CCall_lib3mf_nodeiterator_getcurrent(inst.wrapperRef.LibraryHandle, inst.Ref, &node) + if ret != 0 { + return ImplicitNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitNode(node), nil +} + + +// Function represents a Lib3MF class. +type Function struct { + Resource +} + +func (wrapper Wrapper) NewFunction(r ref) Function { + return Function{wrapper.NewResource(r)} +} + +// GetDisplayName retrieves the display name of the function. +func (inst Function) GetDisplayName() (string, error) { + var neededfordisplayName C.uint32_t + var filledindisplayName C.uint32_t + ret := C.CCall_lib3mf_function_getdisplayname(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededfordisplayName, nil) if ret != 0 { - return 0, makeError(uint32(ret)) + return "", makeError(uint32(ret)) } - return uint32(count), nil + bufferSizedisplayName := neededfordisplayName + bufferdisplayName := make([]byte, bufferSizedisplayName) + ret = C.CCall_lib3mf_function_getdisplayname(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizedisplayName, &filledindisplayName, (*C.char)(unsafe.Pointer(&bufferdisplayName[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferdisplayName[:(filledindisplayName-1)]), nil } -// GetAllPropertyIDs returns all the PropertyIDs of all materials in this group. -func (inst BaseMaterialGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error) { - var neededforpropertyIDs C.uint64_t - ret := C.CCall_lib3mf_basematerialgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertyIDs, nil) +// SetDisplayName sets the display name of the function. +func (inst Function) SetDisplayName(displayName string) error { + ret := C.CCall_lib3mf_function_setdisplayname(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(displayName)[0]))) if ret != 0 { - return nil, makeError(uint32(ret)) - } - if len(propertyIDs) < int(neededforpropertyIDs) { - propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + return makeError(uint32(ret)) } - ret = C.CCall_lib3mf_basematerialgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) + return nil +} + +// AddInput add an input. +func (inst Function) AddInput(identifier string, displayName string, _type ImplicitPortType) (ImplicitPort, error) { + var port ref + ret := C.CCall_lib3mf_function_addinput(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), C.eLib3MFImplicitPortType(_type), &port) if ret != 0 { - return nil, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return propertyIDs[:int(neededforpropertyIDs)], nil + return inst.wrapperRef.NewImplicitPort(port), nil } -// AddMaterial adds a new material to the material group. -func (inst BaseMaterialGroup) AddMaterial(name string, displayColor Color) (uint32, error) { - var propertyID C.uint32_t - ret := C.CCall_lib3mf_basematerialgroup_addmaterial(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(name)[0])), (*C.sLib3MFColor)(unsafe.Pointer(&displayColor)), &propertyID) +// GetInputs retrieves the inputs. +func (inst Function) GetInputs() (ImplicitPortIterator, error) { + var iterator ref + ret := C.CCall_lib3mf_function_getinputs(inst.wrapperRef.LibraryHandle, inst.Ref, &iterator) if ret != 0 { - return 0, makeError(uint32(ret)) + return ImplicitPortIterator{}, makeError(uint32(ret)) } - return uint32(propertyID), nil + return inst.wrapperRef.NewImplicitPortIterator(iterator), nil } -// RemoveMaterial removes a material from the material group. -func (inst BaseMaterialGroup) RemoveMaterial(propertyID uint32) error { - ret := C.CCall_lib3mf_basematerialgroup_removematerial(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID)) +// RemoveInput removes an input. +func (inst Function) RemoveInput(input ImplicitPort) error { + ret := C.CCall_lib3mf_function_removeinput(inst.wrapperRef.LibraryHandle, inst.Ref, input.Ref) if ret != 0 { return makeError(uint32(ret)) } return nil } -// GetName returns the base material's name. -func (inst BaseMaterialGroup) GetName(propertyID uint32) (string, error) { - var neededforname C.uint32_t - var filledinname C.uint32_t - ret := C.CCall_lib3mf_basematerialgroup_getname(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), 0, &neededforname, nil) +// AddOutput add an output. +func (inst Function) AddOutput(identifier string, displayName string, _type ImplicitPortType) (ImplicitPort, error) { + var port ref + ret := C.CCall_lib3mf_function_addoutput(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), C.eLib3MFImplicitPortType(_type), &port) if ret != 0 { - return "", makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - bufferSizename := neededforname - buffername := make([]byte, bufferSizename) - ret = C.CCall_lib3mf_basematerialgroup_getname(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), bufferSizename, &filledinname, (*C.char)(unsafe.Pointer(&buffername[0]))) + return inst.wrapperRef.NewImplicitPort(port), nil +} + +// GetOutputs retrieves the outputs. +func (inst Function) GetOutputs() (ImplicitPortIterator, error) { + var iterator ref + ret := C.CCall_lib3mf_function_getoutputs(inst.wrapperRef.LibraryHandle, inst.Ref, &iterator) if ret != 0 { - return "", makeError(uint32(ret)) + return ImplicitPortIterator{}, makeError(uint32(ret)) } - return string(buffername[:(filledinname-1)]), nil + return inst.wrapperRef.NewImplicitPortIterator(iterator), nil } -// SetName sets a base material's name. -func (inst BaseMaterialGroup) SetName(propertyID uint32, name string) error { - ret := C.CCall_lib3mf_basematerialgroup_setname(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), (*C.char)(unsafe.Pointer(&[]byte(name)[0]))) +// RemoveOutput removes an output. +func (inst Function) RemoveOutput(output ImplicitPort) error { + ret := C.CCall_lib3mf_function_removeoutput(inst.wrapperRef.LibraryHandle, inst.Ref, output.Ref) if ret != 0 { return makeError(uint32(ret)) } return nil } -// SetDisplayColor sets a base material's display color. -func (inst BaseMaterialGroup) SetDisplayColor(propertyID uint32, theColor Color) error { - ret := C.CCall_lib3mf_basematerialgroup_setdisplaycolor(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), (*C.sLib3MFColor)(unsafe.Pointer(&theColor))) +// FindInput retrieves an input. +func (inst Function) FindInput(identifier string) (ImplicitPort, error) { + var input ref + ret := C.CCall_lib3mf_function_findinput(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), &input) if ret != 0 { - return makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewImplicitPort(input), nil } -// GetDisplayColor returns a base material's display color. -func (inst BaseMaterialGroup) GetDisplayColor(propertyID uint32) (Color, error) { - var theColor C.sLib3MFColor - ret := C.CCall_lib3mf_basematerialgroup_getdisplaycolor(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), &theColor) +// FindOutput retrieves an output. +func (inst Function) FindOutput(identifier string) (ImplicitPort, error) { + var output ref + ret := C.CCall_lib3mf_function_findoutput(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), &output) if ret != 0 { - return Color{}, makeError(uint32(ret)) + return ImplicitPort{}, makeError(uint32(ret)) } - return *(*Color)(unsafe.Pointer(&theColor)), nil + return inst.wrapperRef.NewImplicitPort(output), nil } -// ColorGroup represents a Lib3MF class. -type ColorGroup struct { - Resource +// ImplicitFunction represents a Lib3MF class. +type ImplicitFunction struct { + Function } -func (wrapper Wrapper) NewColorGroup(r ref) ColorGroup { - return ColorGroup{wrapper.NewResource(r)} +func (wrapper Wrapper) NewImplicitFunction(r ref) ImplicitFunction { + return ImplicitFunction{wrapper.NewFunction(r)} } -// GetCount retrieves the count of base materials in this Color Group. -func (inst ColorGroup) GetCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_colorgroup_getcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// GetIdentifier retrieves the identifier of the function. +func (inst ImplicitFunction) GetIdentifier() (string, error) { + var neededforidentifier C.uint32_t + var filledinidentifier C.uint32_t + ret := C.CCall_lib3mf_implicitfunction_getidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforidentifier, nil) if ret != 0 { - return 0, makeError(uint32(ret)) + return "", makeError(uint32(ret)) } - return uint32(count), nil + bufferSizeidentifier := neededforidentifier + bufferidentifier := make([]byte, bufferSizeidentifier) + ret = C.CCall_lib3mf_implicitfunction_getidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizeidentifier, &filledinidentifier, (*C.char)(unsafe.Pointer(&bufferidentifier[0]))) + if ret != 0 { + return "", makeError(uint32(ret)) + } + return string(bufferidentifier[:(filledinidentifier-1)]), nil } -// GetAllPropertyIDs returns all the PropertyIDs of all colors within this group. -func (inst ColorGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error) { - var neededforpropertyIDs C.uint64_t - ret := C.CCall_lib3mf_colorgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertyIDs, nil) +// SetIdentifier sets the identifier of the function. +func (inst ImplicitFunction) SetIdentifier(identifier string) error { + ret := C.CCall_lib3mf_implicitfunction_setidentifier(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0]))) if ret != 0 { - return nil, makeError(uint32(ret)) - } - if len(propertyIDs) < int(neededforpropertyIDs) { - propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + return makeError(uint32(ret)) } - ret = C.CCall_lib3mf_colorgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) + return nil +} + +// AddNode add a node. +func (inst ImplicitFunction) AddNode(nodeType ImplicitNodeType, identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (ImplicitNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addnode(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFImplicitNodeType(nodeType), (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return nil, makeError(uint32(ret)) + return ImplicitNode{}, makeError(uint32(ret)) } - return propertyIDs[:int(neededforpropertyIDs)], nil + return inst.wrapperRef.NewImplicitNode(node), nil } -// AddColor adds a new value. -func (inst ColorGroup) AddColor(theColor Color) (uint32, error) { - var propertyID C.uint32_t - ret := C.CCall_lib3mf_colorgroup_addcolor(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFColor)(unsafe.Pointer(&theColor)), &propertyID) +// AddSinNode add a SinNode. +func (inst ImplicitFunction) AddSinNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (SinNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addsinnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return 0, makeError(uint32(ret)) + return SinNode{}, makeError(uint32(ret)) } - return uint32(propertyID), nil + return inst.wrapperRef.NewSinNode(node), nil } -// RemoveColor removes a color from the color group. -func (inst ColorGroup) RemoveColor(propertyID uint32) error { - ret := C.CCall_lib3mf_colorgroup_removecolor(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID)) +// AddCosNode add a CosNode. +func (inst ImplicitFunction) AddCosNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (CosNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addcosnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return makeError(uint32(ret)) + return CosNode{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewCosNode(node), nil } -// SetColor sets a color value. -func (inst ColorGroup) SetColor(propertyID uint32, theColor Color) error { - ret := C.CCall_lib3mf_colorgroup_setcolor(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), (*C.sLib3MFColor)(unsafe.Pointer(&theColor))) +// AddTanNode add a TanNode. +func (inst ImplicitFunction) AddTanNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (TanNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addtannode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return makeError(uint32(ret)) + return TanNode{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewTanNode(node), nil } -// GetColor sets a color value. -func (inst ColorGroup) GetColor(propertyID uint32) (Color, error) { - var theColor C.sLib3MFColor - ret := C.CCall_lib3mf_colorgroup_getcolor(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), &theColor) +// AddArcSinNode add a ArcSinNode. +func (inst ImplicitFunction) AddArcSinNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (ArcSinNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addarcsinnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return Color{}, makeError(uint32(ret)) + return ArcSinNode{}, makeError(uint32(ret)) } - return *(*Color)(unsafe.Pointer(&theColor)), nil + return inst.wrapperRef.NewArcSinNode(node), nil } - -// Texture2DGroup represents a Lib3MF class. -type Texture2DGroup struct { - Resource +// AddArcCosNode add a ArcCosNode. +func (inst ImplicitFunction) AddArcCosNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (ArcCosNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addarccosnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return ArcCosNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewArcCosNode(node), nil } -func (wrapper Wrapper) NewTexture2DGroup(r ref) Texture2DGroup { - return Texture2DGroup{wrapper.NewResource(r)} +// AddArcTan2Node add a ArcTan2Node. +func (inst ImplicitFunction) AddArcTan2Node(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (ArcTan2Node, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addarctan2node(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return ArcTan2Node{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewArcTan2Node(node), nil } -// GetCount retrieves the count of tex2coords in the Texture2DGroup. -func (inst Texture2DGroup) GetCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_texture2dgroup_getcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// AddSinhNode add a SinhNode. +func (inst ImplicitFunction) AddSinhNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (SinhNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addsinhnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return 0, makeError(uint32(ret)) + return SinhNode{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewSinhNode(node), nil } -// GetAllPropertyIDs returns all the PropertyIDs of all tex2coords in this Texture2DGroup. -func (inst Texture2DGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error) { - var neededforpropertyIDs C.uint64_t - ret := C.CCall_lib3mf_texture2dgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertyIDs, nil) +// AddCoshNode add a CoshNode. +func (inst ImplicitFunction) AddCoshNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (CoshNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addcoshnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return nil, makeError(uint32(ret)) - } - if len(propertyIDs) < int(neededforpropertyIDs) { - propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + return CoshNode{}, makeError(uint32(ret)) } - ret = C.CCall_lib3mf_texture2dgroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) + return inst.wrapperRef.NewCoshNode(node), nil +} + +// AddTanhNode add a TanhNode. +func (inst ImplicitFunction) AddTanhNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (TanhNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addtanhnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return nil, makeError(uint32(ret)) + return TanhNode{}, makeError(uint32(ret)) } - return propertyIDs[:int(neededforpropertyIDs)], nil + return inst.wrapperRef.NewTanhNode(node), nil } -// AddTex2Coord adds a new tex2coord to the Texture2DGroup. -func (inst Texture2DGroup) AddTex2Coord(uVCoordinate Tex2Coord) (uint32, error) { - var propertyID C.uint32_t - ret := C.CCall_lib3mf_texture2dgroup_addtex2coord(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFTex2Coord)(unsafe.Pointer(&uVCoordinate)), &propertyID) +// AddRoundNode add a RoundNode. +func (inst ImplicitFunction) AddRoundNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (RoundNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addroundnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return 0, makeError(uint32(ret)) + return RoundNode{}, makeError(uint32(ret)) } - return uint32(propertyID), nil + return inst.wrapperRef.NewRoundNode(node), nil } -// GetTex2Coord obtains a tex2coord to the Texture2DGroup. -func (inst Texture2DGroup) GetTex2Coord(propertyID uint32) (Tex2Coord, error) { - var uVCoordinate C.sLib3MFTex2Coord - ret := C.CCall_lib3mf_texture2dgroup_gettex2coord(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), &uVCoordinate) +// AddCeilNode add a CeilNode. +func (inst ImplicitFunction) AddCeilNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (CeilNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addceilnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return Tex2Coord{}, makeError(uint32(ret)) + return CeilNode{}, makeError(uint32(ret)) } - return *(*Tex2Coord)(unsafe.Pointer(&uVCoordinate)), nil + return inst.wrapperRef.NewCeilNode(node), nil } -// RemoveTex2Coord removes a tex2coords from the Texture2DGroup. -func (inst Texture2DGroup) RemoveTex2Coord(propertyID uint32) error { - ret := C.CCall_lib3mf_texture2dgroup_removetex2coord(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID)) +// AddFloorNode add a FloorNode. +func (inst ImplicitFunction) AddFloorNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (FloorNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addfloornode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return makeError(uint32(ret)) + return FloorNode{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewFloorNode(node), nil } -// GetTexture2D obtains the texture2D instance of this group. -func (inst Texture2DGroup) GetTexture2D() (Texture2D, error) { - var texture2DInstance ref - ret := C.CCall_lib3mf_texture2dgroup_gettexture2d(inst.wrapperRef.LibraryHandle, inst.Ref, &texture2DInstance) +// AddSignNode add a SignNode. +func (inst ImplicitFunction) AddSignNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (SignNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addsignnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return Texture2D{}, makeError(uint32(ret)) + return SignNode{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewTexture2D(texture2DInstance), nil + return inst.wrapperRef.NewSignNode(node), nil } - -// CompositeMaterials represents a Lib3MF class. -type CompositeMaterials struct { - Resource +// AddFractNode add a FractNode. +func (inst ImplicitFunction) AddFractNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (FractNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addfractnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return FractNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewFractNode(node), nil } -func (wrapper Wrapper) NewCompositeMaterials(r ref) CompositeMaterials { - return CompositeMaterials{wrapper.NewResource(r)} +// AddAbsNode add a AbsNode. +func (inst ImplicitFunction) AddAbsNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (AbsNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addabsnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return AbsNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewAbsNode(node), nil } -// GetCount retrieves the count of Composite-s in the CompositeMaterials. -func (inst CompositeMaterials) GetCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_compositematerials_getcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// AddExpNode add a ExpNode. +func (inst ImplicitFunction) AddExpNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (ExpNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addexpnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return 0, makeError(uint32(ret)) + return ExpNode{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewExpNode(node), nil } -// GetAllPropertyIDs returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials. -func (inst CompositeMaterials) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error) { - var neededforpropertyIDs C.uint64_t - ret := C.CCall_lib3mf_compositematerials_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertyIDs, nil) +// AddLogNode add a LogNode. +func (inst ImplicitFunction) AddLogNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (LogNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addlognode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return nil, makeError(uint32(ret)) - } - if len(propertyIDs) < int(neededforpropertyIDs) { - propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + return LogNode{}, makeError(uint32(ret)) } - ret = C.CCall_lib3mf_compositematerials_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) + return inst.wrapperRef.NewLogNode(node), nil +} + +// AddLog2Node add a Log2Node. +func (inst ImplicitFunction) AddLog2Node(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (Log2Node, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addlog2node(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return nil, makeError(uint32(ret)) + return Log2Node{}, makeError(uint32(ret)) } - return propertyIDs[:int(neededforpropertyIDs)], nil + return inst.wrapperRef.NewLog2Node(node), nil } -// GetBaseMaterialGroup obtains the BaseMaterialGroup instance of this CompositeMaterials. -func (inst CompositeMaterials) GetBaseMaterialGroup() (BaseMaterialGroup, error) { - var baseMaterialGroupInstance ref - ret := C.CCall_lib3mf_compositematerials_getbasematerialgroup(inst.wrapperRef.LibraryHandle, inst.Ref, &baseMaterialGroupInstance) +// AddLog10Node add a Log10Node. +func (inst ImplicitFunction) AddLog10Node(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (Log10Node, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addlog10node(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return BaseMaterialGroup{}, makeError(uint32(ret)) + return Log10Node{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewBaseMaterialGroup(baseMaterialGroupInstance), nil + return inst.wrapperRef.NewLog10Node(node), nil } -// AddComposite adds a new Composite-Mixing Values to the CompositeMaterials. -func (inst CompositeMaterials) AddComposite(composite []CompositeConstituent) (uint32, error) { - var propertyID C.uint32_t - ret := C.CCall_lib3mf_compositematerials_addcomposite(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(composite)), (*C.sLib3MFCompositeConstituent)(unsafe.Pointer(&composite[0])), &propertyID) +// AddLengthNode add a LengthNode. +func (inst ImplicitFunction) AddLengthNode(identifier string, displayName string, tag string) (LengthNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addlengthnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return 0, makeError(uint32(ret)) + return LengthNode{}, makeError(uint32(ret)) } - return uint32(propertyID), nil + return inst.wrapperRef.NewLengthNode(node), nil } -// RemoveComposite removes a Composite-Maxing Ratio from the CompositeMaterials. -func (inst CompositeMaterials) RemoveComposite(propertyID uint32) error { - ret := C.CCall_lib3mf_compositematerials_removecomposite(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID)) +// AddTransposeNode add a TransposeNode. +func (inst ImplicitFunction) AddTransposeNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (TransposeNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addtransposenode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return makeError(uint32(ret)) + return TransposeNode{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewTransposeNode(node), nil } -// GetComposite obtains a Composite-Maxing Ratio of this CompositeMaterials. -func (inst CompositeMaterials) GetComposite(propertyID uint32, composite []CompositeConstituent) ([]CompositeConstituent, error) { - var neededforcomposite C.uint64_t - ret := C.CCall_lib3mf_compositematerials_getcomposite(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), 0, &neededforcomposite, nil) +// InverseNode add a InverseNode. +func (inst ImplicitFunction) InverseNode(identifier string, displayName string, tag string) (InverseNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_inversenode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return nil, makeError(uint32(ret)) + return InverseNode{}, makeError(uint32(ret)) } - if len(composite) < int(neededforcomposite) { - composite = append(composite, make([]CompositeConstituent, int(neededforcomposite)-len(composite))...) - } - ret = C.CCall_lib3mf_compositematerials_getcomposite(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), neededforcomposite, nil, (*C.sLib3MFCompositeConstituent)(unsafe.Pointer(&composite[0]))) + return inst.wrapperRef.NewInverseNode(node), nil +} + +// AddSqrtNode add a SqrtNode. +func (inst ImplicitFunction) AddSqrtNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (SqrtNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addsqrtnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return nil, makeError(uint32(ret)) + return SqrtNode{}, makeError(uint32(ret)) } - return composite[:int(neededforcomposite)], nil + return inst.wrapperRef.NewSqrtNode(node), nil } - -// MultiPropertyGroup represents a Lib3MF class. -type MultiPropertyGroup struct { - Resource +// AddResourceIdNode add a ResourceIdNode. +func (inst ImplicitFunction) AddResourceIdNode(identifier string, displayName string, tag string) (ResourceIdNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addresourceidnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return ResourceIdNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewResourceIdNode(node), nil } -func (wrapper Wrapper) NewMultiPropertyGroup(r ref) MultiPropertyGroup { - return MultiPropertyGroup{wrapper.NewResource(r)} +// AddAdditionNode add an AdditionNode. +func (inst ImplicitFunction) AddAdditionNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (AdditionNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addadditionnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return AdditionNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewAdditionNode(node), nil } -// GetCount retrieves the count of MultiProperty-s in the MultiPropertyGroup. -func (inst MultiPropertyGroup) GetCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_multipropertygroup_getcount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// AddSubtractionNode add a SubtractionNode. +func (inst ImplicitFunction) AddSubtractionNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (SubtractionNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addsubtractionnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return 0, makeError(uint32(ret)) + return SubtractionNode{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewSubtractionNode(node), nil } -// GetAllPropertyIDs returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup. -func (inst MultiPropertyGroup) GetAllPropertyIDs(propertyIDs []uint32) ([]uint32, error) { - var neededforpropertyIDs C.uint64_t - ret := C.CCall_lib3mf_multipropertygroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpropertyIDs, nil) +// AddMultiplicationNode add a MultiplicationNode. +func (inst ImplicitFunction) AddMultiplicationNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (MultiplicationNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addmultiplicationnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return nil, makeError(uint32(ret)) + return MultiplicationNode{}, makeError(uint32(ret)) } - if len(propertyIDs) < int(neededforpropertyIDs) { - propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + return inst.wrapperRef.NewMultiplicationNode(node), nil +} + +// AddDivisionNode add a DivisionNode. +func (inst ImplicitFunction) AddDivisionNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (DivisionNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_adddivisionnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return DivisionNode{}, makeError(uint32(ret)) } - ret = C.CCall_lib3mf_multipropertygroup_getallpropertyids(inst.wrapperRef.LibraryHandle, inst.Ref, neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) + return inst.wrapperRef.NewDivisionNode(node), nil +} + +// AddDotNode add a DotNode. +func (inst ImplicitFunction) AddDotNode(identifier string, displayName string, tag string) (DotNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_adddotnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return nil, makeError(uint32(ret)) + return DotNode{}, makeError(uint32(ret)) } - return propertyIDs[:int(neededforpropertyIDs)], nil + return inst.wrapperRef.NewDotNode(node), nil } -// AddMultiProperty adds a new MultiProperty to the MultiPropertyGroup. -func (inst MultiPropertyGroup) AddMultiProperty(propertyIDs []uint32) (uint32, error) { - var propertyID C.uint32_t - ret := C.CCall_lib3mf_multipropertygroup_addmultiproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(propertyIDs)), (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0])), &propertyID) +// AddCrossNode add a CrossNode. +func (inst ImplicitFunction) AddCrossNode(identifier string, displayName string, tag string) (CrossNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addcrossnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return 0, makeError(uint32(ret)) + return CrossNode{}, makeError(uint32(ret)) } - return uint32(propertyID), nil + return inst.wrapperRef.NewCrossNode(node), nil } -// SetMultiProperty sets the PropertyIDs of a MultiProperty. -func (inst MultiPropertyGroup) SetMultiProperty(propertyID uint32, propertyIDs []uint32) error { - ret := C.CCall_lib3mf_multipropertygroup_setmultiproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), C.uint64_t(len(propertyIDs)), (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) +// AddMatVecMultiplicationNode add a MatVecMultiplicationNode. +func (inst ImplicitFunction) AddMatVecMultiplicationNode(identifier string, displayName string, tag string) (MatVecMultiplicationNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addmatvecmultiplicationnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return makeError(uint32(ret)) + return MatVecMultiplicationNode{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewMatVecMultiplicationNode(node), nil } -// GetMultiProperty obtains the PropertyIDs of a MultiProperty. -func (inst MultiPropertyGroup) GetMultiProperty(propertyID uint32, propertyIDs []uint32) ([]uint32, error) { - var neededforpropertyIDs C.uint64_t - ret := C.CCall_lib3mf_multipropertygroup_getmultiproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), 0, &neededforpropertyIDs, nil) +// AddMinNode add a MinNode. +func (inst ImplicitFunction) AddMinNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (MinNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addminnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return nil, makeError(uint32(ret)) + return MinNode{}, makeError(uint32(ret)) } - if len(propertyIDs) < int(neededforpropertyIDs) { - propertyIDs = append(propertyIDs, make([]uint32, int(neededforpropertyIDs)-len(propertyIDs))...) + return inst.wrapperRef.NewMinNode(node), nil +} + +// AddMaxNode add a MaxNode. +func (inst ImplicitFunction) AddMaxNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (MaxNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addmaxnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return MaxNode{}, makeError(uint32(ret)) } - ret = C.CCall_lib3mf_multipropertygroup_getmultiproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID), neededforpropertyIDs, nil, (*C.uint32_t)(unsafe.Pointer(&propertyIDs[0]))) + return inst.wrapperRef.NewMaxNode(node), nil +} + +// AddFmodNode add a FmodNode. +func (inst ImplicitFunction) AddFmodNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (FmodNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addfmodnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return nil, makeError(uint32(ret)) + return FmodNode{}, makeError(uint32(ret)) } - return propertyIDs[:int(neededforpropertyIDs)], nil + return inst.wrapperRef.NewFmodNode(node), nil } -// RemoveMultiProperty removes a MultiProperty from this MultiPropertyGroup. -func (inst MultiPropertyGroup) RemoveMultiProperty(propertyID uint32) error { - ret := C.CCall_lib3mf_multipropertygroup_removemultiproperty(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(propertyID)) +// AddPowNode add a PowNode. +func (inst ImplicitFunction) AddPowNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (PowNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addpownode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return makeError(uint32(ret)) + return PowNode{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewPowNode(node), nil } -// GetLayerCount retrieves the number of layers of this MultiPropertyGroup. -func (inst MultiPropertyGroup) GetLayerCount() (uint32, error) { - var count C.uint32_t - ret := C.CCall_lib3mf_multipropertygroup_getlayercount(inst.wrapperRef.LibraryHandle, inst.Ref, &count) +// AddSelectNode add a SelectNode. +func (inst ImplicitFunction) AddSelectNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (SelectNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addselectnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return 0, makeError(uint32(ret)) + return SelectNode{}, makeError(uint32(ret)) } - return uint32(count), nil + return inst.wrapperRef.NewSelectNode(node), nil } -// AddLayer adds a MultiPropertyLayer to this MultiPropertyGroup. -func (inst MultiPropertyGroup) AddLayer(theLayer MultiPropertyLayer) (uint32, error) { - var layerIndex C.uint32_t - ret := C.CCall_lib3mf_multipropertygroup_addlayer(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.sLib3MFMultiPropertyLayer)(unsafe.Pointer(&theLayer)), &layerIndex) +// AddClampNode add a ClampNode. +func (inst ImplicitFunction) AddClampNode(identifier string, configuration ImplicitNodeConfiguration, displayName string, tag string) (ClampNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addclampnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), C.eLib3MFImplicitNodeConfiguration(configuration), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return 0, makeError(uint32(ret)) + return ClampNode{}, makeError(uint32(ret)) } - return uint32(layerIndex), nil + return inst.wrapperRef.NewClampNode(node), nil } -// GetLayer obtains a MultiPropertyLayer of this MultiPropertyGroup. -func (inst MultiPropertyGroup) GetLayer(layerIndex uint32) (MultiPropertyLayer, error) { - var theLayer C.sLib3MFMultiPropertyLayer - ret := C.CCall_lib3mf_multipropertygroup_getlayer(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(layerIndex), &theLayer) +// AddComposeVectorNode add a ComposeVectorNode. +func (inst ImplicitFunction) AddComposeVectorNode(identifier string, displayName string, tag string) (ComposeVectorNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addcomposevectornode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return MultiPropertyLayer{}, makeError(uint32(ret)) + return ComposeVectorNode{}, makeError(uint32(ret)) } - return *(*MultiPropertyLayer)(unsafe.Pointer(&theLayer)), nil + return inst.wrapperRef.NewComposeVectorNode(node), nil } -// RemoveLayer removes a MultiPropertyLayer from this MultiPropertyGroup. -func (inst MultiPropertyGroup) RemoveLayer(layerIndex uint32) error { - ret := C.CCall_lib3mf_multipropertygroup_removelayer(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(layerIndex)) +// AddVectorFromScalarNode add a VectorFromScalar. +func (inst ImplicitFunction) AddVectorFromScalarNode(identifier string, displayName string, tag string) (VectorFromScalarNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addvectorfromscalarnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return makeError(uint32(ret)) + return VectorFromScalarNode{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewVectorFromScalarNode(node), nil } +// AddDecomposeVectorNode add a DecomposeVectorNode. +func (inst ImplicitFunction) AddDecomposeVectorNode(identifier string, displayName string, tag string) (DecomposeVectorNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_adddecomposevectornode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return DecomposeVectorNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewDecomposeVectorNode(node), nil +} -// Attachment represents a Lib3MF class. -type Attachment struct { - Base +// AddComposeMatrixNode add a ComposeMatrixNode. +func (inst ImplicitFunction) AddComposeMatrixNode(identifier string, displayName string, tag string) (ComposeMatrixNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addcomposematrixnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return ComposeMatrixNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewComposeMatrixNode(node), nil } -func (wrapper Wrapper) NewAttachment(r ref) Attachment { - return Attachment{wrapper.NewBase(r)} +// AddMatrixFromRowsNode add a MatrixFromRowsNode. +func (inst ImplicitFunction) AddMatrixFromRowsNode(identifier string, displayName string, tag string) (MatrixFromRowsNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addmatrixfromrowsnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) + if ret != 0 { + return MatrixFromRowsNode{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewMatrixFromRowsNode(node), nil } -// GetPath retrieves an attachment's package path. This function will be removed in a later release. -func (inst Attachment) GetPath() (string, error) { - var neededforpath C.uint32_t - var filledinpath C.uint32_t - ret := C.CCall_lib3mf_attachment_getpath(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpath, nil) +// AddMatrixFromColumnsNode add a MatrixFromColumnsNode. +func (inst ImplicitFunction) AddMatrixFromColumnsNode(identifier string, displayName string, tag string) (MatrixFromColumnsNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addmatrixfromcolumnsnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return "", makeError(uint32(ret)) + return MatrixFromColumnsNode{}, makeError(uint32(ret)) } - bufferSizepath := neededforpath - bufferpath := make([]byte, bufferSizepath) - ret = C.CCall_lib3mf_attachment_getpath(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizepath, &filledinpath, (*C.char)(unsafe.Pointer(&bufferpath[0]))) + return inst.wrapperRef.NewMatrixFromColumnsNode(node), nil +} + +// AddConstantNode add a ConstantNode. +func (inst ImplicitFunction) AddConstantNode(identifier string, displayName string, tag string) (ConstantNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addconstantnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return "", makeError(uint32(ret)) + return ConstantNode{}, makeError(uint32(ret)) } - return string(bufferpath[:(filledinpath-1)]), nil + return inst.wrapperRef.NewConstantNode(node), nil } -// SetPath sets an attachment's package path. This function will be removed in a later release. -func (inst Attachment) SetPath(path string) error { - ret := C.CCall_lib3mf_attachment_setpath(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(path)[0]))) +// AddConstVecNode add a ConstVecNode. +func (inst ImplicitFunction) AddConstVecNode(identifier string, displayName string, tag string) (ConstVecNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addconstvecnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return makeError(uint32(ret)) + return ConstVecNode{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewConstVecNode(node), nil } -// PackagePart returns the PackagePart that is this attachment. -func (inst Attachment) PackagePart() (PackagePart, error) { - var packagePart ref - ret := C.CCall_lib3mf_attachment_packagepart(inst.wrapperRef.LibraryHandle, inst.Ref, &packagePart) +// AddConstMatNode add a ConstMatNode. +func (inst ImplicitFunction) AddConstMatNode(identifier string, displayName string, tag string) (ConstMatNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addconstmatnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return PackagePart{}, makeError(uint32(ret)) + return ConstMatNode{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewPackagePart(packagePart), nil + return inst.wrapperRef.NewConstMatNode(node), nil } -// GetRelationShipType retrieves an attachment's relationship type. -func (inst Attachment) GetRelationShipType() (string, error) { - var neededforpath C.uint32_t - var filledinpath C.uint32_t - ret := C.CCall_lib3mf_attachment_getrelationshiptype(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforpath, nil) +// AddMeshNode add a MeshNode. +func (inst ImplicitFunction) AddMeshNode(identifier string, displayName string, tag string) (MeshNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addmeshnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return "", makeError(uint32(ret)) + return MeshNode{}, makeError(uint32(ret)) } - bufferSizepath := neededforpath - bufferpath := make([]byte, bufferSizepath) - ret = C.CCall_lib3mf_attachment_getrelationshiptype(inst.wrapperRef.LibraryHandle, inst.Ref, bufferSizepath, &filledinpath, (*C.char)(unsafe.Pointer(&bufferpath[0]))) + return inst.wrapperRef.NewMeshNode(node), nil +} + +// AddUnsignedMeshNode add a UnsignedMeshNode. +func (inst ImplicitFunction) AddUnsignedMeshNode(identifier string, displayName string, tag string) (UnsignedMeshNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addunsignedmeshnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return "", makeError(uint32(ret)) + return UnsignedMeshNode{}, makeError(uint32(ret)) } - return string(bufferpath[:(filledinpath-1)]), nil + return inst.wrapperRef.NewUnsignedMeshNode(node), nil } -// SetRelationShipType sets an attachment's relationship type. -func (inst Attachment) SetRelationShipType(path string) error { - ret := C.CCall_lib3mf_attachment_setrelationshiptype(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(path)[0]))) +// AddFunctionCallNode add a FunctionCallNode. +func (inst ImplicitFunction) AddFunctionCallNode(identifier string, displayName string, tag string) (FunctionCallNode, error) { + var node ref + ret := C.CCall_lib3mf_implicitfunction_addfunctioncallnode(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(identifier)[0])), (*C.char)(unsafe.Pointer(&[]byte(displayName)[0])), (*C.char)(unsafe.Pointer(&[]byte(tag)[0])), &node) if ret != 0 { - return makeError(uint32(ret)) + return FunctionCallNode{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewFunctionCallNode(node), nil } -// WriteToFile writes out the attachment as file. -func (inst Attachment) WriteToFile(fileName string) error { - ret := C.CCall_lib3mf_attachment_writetofile(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(fileName)[0]))) +// GetNodes retrieves the nodes. +func (inst ImplicitFunction) GetNodes() (NodeIterator, error) { + var iterator ref + ret := C.CCall_lib3mf_implicitfunction_getnodes(inst.wrapperRef.LibraryHandle, inst.Ref, &iterator) if ret != 0 { - return makeError(uint32(ret)) + return NodeIterator{}, makeError(uint32(ret)) } - return nil + return inst.wrapperRef.NewNodeIterator(iterator), nil } -// ReadFromFile reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. -func (inst Attachment) ReadFromFile(fileName string) error { - ret := C.CCall_lib3mf_attachment_readfromfile(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(fileName)[0]))) +// RemoveNode removes a node. +func (inst ImplicitFunction) RemoveNode(node ImplicitNode) error { + ret := C.CCall_lib3mf_implicitfunction_removenode(inst.wrapperRef.LibraryHandle, inst.Ref, node.Ref) if ret != 0 { return makeError(uint32(ret)) } return nil } -// ReadFromCallback reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. -func (inst Attachment) ReadFromCallback(theReadCallback ReadCallbackFunc, streamSize uint64, theSeekCallback SeekCallbackFunc, userData uintptr) error { - ret := C.CCall_lib3mf_attachment_readfromcallback(inst.wrapperRef.LibraryHandle, inst.Ref, (C.Lib3MFReadCallback)(unsafe.Pointer(C.Lib3MFReadCallback_cgo)), C.uint64_t(streamSize), (C.Lib3MFSeekCallback)(unsafe.Pointer(C.Lib3MFSeekCallback_cgo)), (C.Lib3MF_pvoid)(userData)) +// AddLink add a link. +func (inst ImplicitFunction) AddLink(source ImplicitPort, target ImplicitPort) error { + ret := C.CCall_lib3mf_implicitfunction_addlink(inst.wrapperRef.LibraryHandle, inst.Ref, source.Ref, target.Ref) if ret != 0 { return makeError(uint32(ret)) } - readCallbackFunc = theReadCallback - seekCallbackFunc = theSeekCallback return nil } -// GetStreamSize retrieves the size of the attachment stream. -func (inst Attachment) GetStreamSize() (uint64, error) { - var streamSize C.uint64_t - ret := C.CCall_lib3mf_attachment_getstreamsize(inst.wrapperRef.LibraryHandle, inst.Ref, &streamSize) +// AddLinkByNames add a link. +func (inst ImplicitFunction) AddLinkByNames(source string, target string) error { + ret := C.CCall_lib3mf_implicitfunction_addlinkbynames(inst.wrapperRef.LibraryHandle, inst.Ref, (*C.char)(unsafe.Pointer(&[]byte(source)[0])), (*C.char)(unsafe.Pointer(&[]byte(target)[0]))) if ret != 0 { - return 0, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return uint64(streamSize), nil + return nil } -// WriteToBuffer writes out the attachment into a buffer. -func (inst Attachment) WriteToBuffer(buffer []uint8) ([]uint8, error) { - var neededforbuffer C.uint64_t - ret := C.CCall_lib3mf_attachment_writetobuffer(inst.wrapperRef.LibraryHandle, inst.Ref, 0, &neededforbuffer, nil) +// Clear clears the function. +func (inst ImplicitFunction) Clear() error { + ret := C.CCall_lib3mf_implicitfunction_clear(inst.wrapperRef.LibraryHandle, inst.Ref) if ret != 0 { - return nil, makeError(uint32(ret)) - } - if len(buffer) < int(neededforbuffer) { - buffer = append(buffer, make([]uint8, int(neededforbuffer)-len(buffer))...) - } - ret = C.CCall_lib3mf_attachment_writetobuffer(inst.wrapperRef.LibraryHandle, inst.Ref, neededforbuffer, nil, (*C.uint8_t)(unsafe.Pointer(&buffer[0]))) - if ret != 0 { - return nil, makeError(uint32(ret)) + return makeError(uint32(ret)) } - return buffer[:int(neededforbuffer)], nil + return nil } -// ReadFromBuffer reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). -func (inst Attachment) ReadFromBuffer(buffer []uint8) error { - ret := C.CCall_lib3mf_attachment_readfrombuffer(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint64_t(len(buffer)), (*C.uint8_t)(unsafe.Pointer(&buffer[0]))) +// SortNodesTopologically sorts the nodes topologically. +func (inst ImplicitFunction) SortNodesTopologically() error { + ret := C.CCall_lib3mf_implicitfunction_sortnodestopologically(inst.wrapperRef.LibraryHandle, inst.Ref) if ret != 0 { return makeError(uint32(ret)) } @@ -6287,86 +11702,106 @@ func (inst Attachment) ReadFromBuffer(buffer []uint8) error { } -// Texture2D represents a Lib3MF class. -type Texture2D struct { - Resource +// FunctionFromImage3D represents a Lib3MF class. +type FunctionFromImage3D struct { + Function } -func (wrapper Wrapper) NewTexture2D(r ref) Texture2D { - return Texture2D{wrapper.NewResource(r)} +func (wrapper Wrapper) NewFunctionFromImage3D(r ref) FunctionFromImage3D { + return FunctionFromImage3D{wrapper.NewFunction(r)} } -// GetAttachment retrieves the attachment located at the path of the texture. -func (inst Texture2D) GetAttachment() (Attachment, error) { - var attachment ref - ret := C.CCall_lib3mf_texture2d_getattachment(inst.wrapperRef.LibraryHandle, inst.Ref, &attachment) +// GetImage3D returns the selected 3D image. +func (inst FunctionFromImage3D) GetImage3D() (Image3D, error) { + var image3D ref + ret := C.CCall_lib3mf_functionfromimage3d_getimage3d(inst.wrapperRef.LibraryHandle, inst.Ref, &image3D) if ret != 0 { - return Attachment{}, makeError(uint32(ret)) + return Image3D{}, makeError(uint32(ret)) } - return inst.wrapperRef.NewAttachment(attachment), nil + return inst.wrapperRef.NewImage3D(image3D), nil } -// SetAttachment sets the texture's package path to the path of the attachment. -func (inst Texture2D) SetAttachment(attachment Attachment) error { - ret := C.CCall_lib3mf_texture2d_setattachment(inst.wrapperRef.LibraryHandle, inst.Ref, attachment.Ref) +// SetImage3D sets the 3D image of the selector. +func (inst FunctionFromImage3D) SetImage3D(image3D Image3D) error { + ret := C.CCall_lib3mf_functionfromimage3d_setimage3d(inst.wrapperRef.LibraryHandle, inst.Ref, image3D.Ref) if ret != 0 { return makeError(uint32(ret)) } return nil } -// GetContentType retrieves a texture's content type. -func (inst Texture2D) GetContentType() (TextureType, error) { - var contentType C.eLib3MFTextureType - ret := C.CCall_lib3mf_texture2d_getcontenttype(inst.wrapperRef.LibraryHandle, inst.Ref, &contentType) +// SetFilter sets the texture filter of the selector. +func (inst FunctionFromImage3D) SetFilter(filter TextureFilter) error { + ret := C.CCall_lib3mf_functionfromimage3d_setfilter(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFTextureFilter(filter)) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + +// GetFilter returns the texture filter of the selector. +func (inst FunctionFromImage3D) GetFilter() (TextureFilter, error) { + var filter C.eLib3MFTextureFilter + ret := C.CCall_lib3mf_functionfromimage3d_getfilter(inst.wrapperRef.LibraryHandle, inst.Ref, &filter) if ret != 0 { return 0, makeError(uint32(ret)) } - return TextureType(contentType), nil + return TextureFilter(filter), nil } -// SetContentType retrieves a texture's content type. -func (inst Texture2D) SetContentType(contentType TextureType) error { - ret := C.CCall_lib3mf_texture2d_setcontenttype(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFTextureType(contentType)) +// SetTileStyles sets the tile styles of the selector. +func (inst FunctionFromImage3D) SetTileStyles(tileStyleU TextureTileStyle, tileStyleV TextureTileStyle, tileStyleW TextureTileStyle) error { + ret := C.CCall_lib3mf_functionfromimage3d_settilestyles(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFTextureTileStyle(tileStyleU), C.eLib3MFTextureTileStyle(tileStyleV), C.eLib3MFTextureTileStyle(tileStyleW)) if ret != 0 { return makeError(uint32(ret)) } return nil } -// GetTileStyleUV retrieves a texture's tilestyle type. -func (inst Texture2D) GetTileStyleUV() (TextureTileStyle, TextureTileStyle, error) { +// GetTileStyles retrieves the tile styles of the selector. +func (inst FunctionFromImage3D) GetTileStyles() (TextureTileStyle, TextureTileStyle, TextureTileStyle, error) { var tileStyleU C.eLib3MFTextureTileStyle var tileStyleV C.eLib3MFTextureTileStyle - ret := C.CCall_lib3mf_texture2d_gettilestyleuv(inst.wrapperRef.LibraryHandle, inst.Ref, &tileStyleU, &tileStyleV) + var tileStyleW C.eLib3MFTextureTileStyle + ret := C.CCall_lib3mf_functionfromimage3d_gettilestyles(inst.wrapperRef.LibraryHandle, inst.Ref, &tileStyleU, &tileStyleV, &tileStyleW) if ret != 0 { - return 0, 0, makeError(uint32(ret)) + return 0, 0, 0, makeError(uint32(ret)) } - return TextureTileStyle(tileStyleU), TextureTileStyle(tileStyleV), nil + return TextureTileStyle(tileStyleU), TextureTileStyle(tileStyleV), TextureTileStyle(tileStyleW), nil } -// SetTileStyleUV sets a texture's tilestyle type. -func (inst Texture2D) SetTileStyleUV(tileStyleU TextureTileStyle, tileStyleV TextureTileStyle) error { - ret := C.CCall_lib3mf_texture2d_settilestyleuv(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFTextureTileStyle(tileStyleU), C.eLib3MFTextureTileStyle(tileStyleV)) +// GetOffset returns the offset value for the pixel values in the Image3D. +func (inst FunctionFromImage3D) GetOffset() (float64, error) { + var offset C.double + ret := C.CCall_lib3mf_functionfromimage3d_getoffset(inst.wrapperRef.LibraryHandle, inst.Ref, &offset) + if ret != 0 { + return 0, makeError(uint32(ret)) + } + return float64(offset), nil +} + +// SetOffset sets the offset value for the pixel values in the Image3D. +func (inst FunctionFromImage3D) SetOffset(offset float64) error { + ret := C.CCall_lib3mf_functionfromimage3d_setoffset(inst.wrapperRef.LibraryHandle, inst.Ref, C.double(offset)) if ret != 0 { return makeError(uint32(ret)) } return nil } -// GetFilter retrieves a texture's filter type. -func (inst Texture2D) GetFilter() (TextureFilter, error) { - var filter C.eLib3MFTextureFilter - ret := C.CCall_lib3mf_texture2d_getfilter(inst.wrapperRef.LibraryHandle, inst.Ref, &filter) +// GetScale returns the scale value for the pixel values in the Image3D. +func (inst FunctionFromImage3D) GetScale() (float64, error) { + var scale C.double + ret := C.CCall_lib3mf_functionfromimage3d_getscale(inst.wrapperRef.LibraryHandle, inst.Ref, &scale) if ret != 0 { return 0, makeError(uint32(ret)) } - return TextureFilter(filter), nil + return float64(scale), nil } -// SetFilter sets a texture's filter type. -func (inst Texture2D) SetFilter(filter TextureFilter) error { - ret := C.CCall_lib3mf_texture2d_setfilter(inst.wrapperRef.LibraryHandle, inst.Ref, C.eLib3MFTextureFilter(filter)) +// SetScale sets the scale value for the pixel values in the Image3D. +func (inst FunctionFromImage3D) SetScale(scale float64) error { + ret := C.CCall_lib3mf_functionfromimage3d_setscale(inst.wrapperRef.LibraryHandle, inst.Ref, C.double(scale)) if ret != 0 { return makeError(uint32(ret)) } @@ -7548,6 +12983,16 @@ func (inst Model) GetSliceStackByID(uniqueResourceID uint32) (SliceStack, error) return inst.wrapperRef.NewSliceStack(sliceStacInstance), nil } +// GetLevelSetByID finds a level set object by its UniqueResourceID. +func (inst Model) GetLevelSetByID(uniqueResourceID uint32) (LevelSet, error) { + var levelSetObjectInstance ref + ret := C.CCall_lib3mf_model_getlevelsetbyid(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(uniqueResourceID), &levelSetObjectInstance) + if ret != 0 { + return LevelSet{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewLevelSet(levelSetObjectInstance), nil +} + // GetBuildUUID returns, whether a build has a UUID and, if true, the build's UUID. func (inst Model) GetBuildUUID() (bool, string, error) { var hasUUID C.bool @@ -7705,6 +13150,16 @@ func (inst Model) GetSliceStacks() (SliceStackIterator, error) { return inst.wrapperRef.NewSliceStackIterator(resourceIterator), nil } +// GetImage3Ds creates a resource iterator instance with all image3d resources. +func (inst Model) GetImage3Ds() (Image3DIterator, error) { + var resourceIterator ref + ret := C.CCall_lib3mf_model_getimage3ds(inst.wrapperRef.LibraryHandle, inst.Ref, &resourceIterator) + if ret != 0 { + return Image3DIterator{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImage3DIterator(resourceIterator), nil +} + // MergeToModel merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. func (inst Model) MergeToModel() (Model, error) { var mergedModelInstance ref @@ -7715,6 +13170,15 @@ func (inst Model) MergeToModel() (Model, error) { return inst.wrapperRef.NewModel(mergedModelInstance), nil } +// MergeFromModel merges the given model into this model. +func (inst Model) MergeFromModel(modelInstance Model) error { + ret := C.CCall_lib3mf_model_mergefrommodel(inst.wrapperRef.LibraryHandle, inst.Ref, modelInstance.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + // AddMeshObject adds an empty mesh object to the model. func (inst Model) AddMeshObject() (MeshObject, error) { var meshObjectInstance ref @@ -7805,6 +13269,26 @@ func (inst Model) AddMultiPropertyGroup() (MultiPropertyGroup, error) { return inst.wrapperRef.NewMultiPropertyGroup(multiPropertyGroupInstance), nil } +// AddImageStack creates a new 3D Image Resource. +func (inst Model) AddImageStack(columnCount uint32, rowCount uint32, sheetCount uint32) (ImageStack, error) { + var instance ref + ret := C.CCall_lib3mf_model_addimagestack(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(columnCount), C.uint32_t(rowCount), C.uint32_t(sheetCount), &instance) + if ret != 0 { + return ImageStack{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImageStack(instance), nil +} + +// GetImageStackByID finds an ImageStack object by its UniqueResourceID. +func (inst Model) GetImageStackByID(uniqueResourceID uint32) (ImageStack, error) { + var imageStackInstance ref + ret := C.CCall_lib3mf_model_getimagestackbyid(inst.wrapperRef.LibraryHandle, inst.Ref, C.uint32_t(uniqueResourceID), &imageStackInstance) + if ret != 0 { + return ImageStack{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImageStack(imageStackInstance), nil +} + // AddBuildItem adds a build item to the model. func (inst Model) AddBuildItem(object Object, transform Transform) (BuildItem, error) { var buildItemInstance ref @@ -7965,6 +13449,75 @@ func (inst Model) GetKeyStore() (KeyStore, error) { return inst.wrapperRef.NewKeyStore(keyStore), nil } +// GetFunctions creates a resource iterator for all functions. +func (inst Model) GetFunctions() (FunctionIterator, error) { + var theResourceIterator ref + ret := C.CCall_lib3mf_model_getfunctions(inst.wrapperRef.LibraryHandle, inst.Ref, &theResourceIterator) + if ret != 0 { + return FunctionIterator{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewFunctionIterator(theResourceIterator), nil +} + +// AddImplicitFunction adds a function described by nodes to the model. +func (inst Model) AddImplicitFunction() (ImplicitFunction, error) { + var functionInstance ref + ret := C.CCall_lib3mf_model_addimplicitfunction(inst.wrapperRef.LibraryHandle, inst.Ref, &functionInstance) + if ret != 0 { + return ImplicitFunction{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewImplicitFunction(functionInstance), nil +} + +// AddFunctionFromImage3D adds a function defined by an image3d to the model. +func (inst Model) AddFunctionFromImage3D(image3DInstance Image3D) (FunctionFromImage3D, error) { + var functionInstance ref + ret := C.CCall_lib3mf_model_addfunctionfromimage3d(inst.wrapperRef.LibraryHandle, inst.Ref, image3DInstance.Ref, &functionInstance) + if ret != 0 { + return FunctionFromImage3D{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewFunctionFromImage3D(functionInstance), nil +} + +// AddVolumeData adds a volume data resource to the model. +func (inst Model) AddVolumeData() (VolumeData, error) { + var volumeDataInstance ref + ret := C.CCall_lib3mf_model_addvolumedata(inst.wrapperRef.LibraryHandle, inst.Ref, &volumeDataInstance) + if ret != 0 { + return VolumeData{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewVolumeData(volumeDataInstance), nil +} + +// AddLevelSet adds an empty boundary shape object to the model. +func (inst Model) AddLevelSet() (LevelSet, error) { + var levelSetInstance ref + ret := C.CCall_lib3mf_model_addlevelset(inst.wrapperRef.LibraryHandle, inst.Ref, &levelSetInstance) + if ret != 0 { + return LevelSet{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewLevelSet(levelSetInstance), nil +} + +// GetLevelSets creates a resource iterator instance with all boundary shape resources. +func (inst Model) GetLevelSets() (LevelSetIterator, error) { + var resourceIterator ref + ret := C.CCall_lib3mf_model_getlevelsets(inst.wrapperRef.LibraryHandle, inst.Ref, &resourceIterator) + if ret != 0 { + return LevelSetIterator{}, makeError(uint32(ret)) + } + return inst.wrapperRef.NewLevelSetIterator(resourceIterator), nil +} + +// RemoveResource removes a resource from the model. +func (inst Model) RemoveResource(resource Resource) error { + ret := C.CCall_lib3mf_model_removeresource(inst.wrapperRef.LibraryHandle, inst.Ref, resource.Ref) + if ret != 0 { + return makeError(uint32(ret)) + } + return nil +} + // GetLibraryVersion retrieves the binary version of this library. func (wrapper Wrapper) GetLibraryVersion() (uint32, uint32, uint32, error) { @@ -8204,7 +13757,7 @@ func (wrapper Wrapper) releaseC(r *ref) error { func (wrapper Wrapper) CheckBinaryVersion() error { var nBindingMajor uint32 = 2; - var nBindingMinor uint32 = 3; + var nBindingMinor uint32 = 4; nMajor, nMinor, _, err := wrapper.GetLibraryVersion() if err != nil { return err; diff --git a/Autogenerated/Bindings/Go/lib3mf_dynamic.cc b/Autogenerated/Bindings/Go/lib3mf_dynamic.cc index e1cec341d..2bef1bdf1 100644 --- a/Autogenerated/Bindings/Go/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/Go/lib3mf_dynamic.cc @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -96,6 +96,9 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup = NULL; pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials = NULL; pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup = NULL; + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = NULL; + pWrapperTable->m_FunctionIterator_GetCurrentFunction = NULL; + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = NULL; pWrapperTable->m_MetaData_GetNameSpace = NULL; pWrapperTable->m_MetaData_SetNameSpace = NULL; pWrapperTable->m_MetaData_GetName = NULL; @@ -121,6 +124,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Object_SetPartNumber = NULL; pWrapperTable->m_Object_IsMeshObject = NULL; pWrapperTable->m_Object_IsComponentsObject = NULL; + pWrapperTable->m_Object_IsLevelSetObject = NULL; pWrapperTable->m_Object_IsValid = NULL; pWrapperTable->m_Object_SetAttachmentAsThumbnail = NULL; pWrapperTable->m_Object_GetThumbnailAttachment = NULL; @@ -155,6 +159,24 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_MeshObject_SetGeometry = NULL; pWrapperTable->m_MeshObject_IsManifoldAndOriented = NULL; pWrapperTable->m_MeshObject_BeamLattice = NULL; + pWrapperTable->m_MeshObject_GetVolumeData = NULL; + pWrapperTable->m_MeshObject_SetVolumeData = NULL; + pWrapperTable->m_LevelSet_GetFunction = NULL; + pWrapperTable->m_LevelSet_SetFunction = NULL; + pWrapperTable->m_LevelSet_GetTransform = NULL; + pWrapperTable->m_LevelSet_SetTransform = NULL; + pWrapperTable->m_LevelSet_GetChannelName = NULL; + pWrapperTable->m_LevelSet_SetChannelName = NULL; + pWrapperTable->m_LevelSet_SetMinFeatureSize = NULL; + pWrapperTable->m_LevelSet_GetMinFeatureSize = NULL; + pWrapperTable->m_LevelSet_SetFallBackValue = NULL; + pWrapperTable->m_LevelSet_GetFallBackValue = NULL; + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = NULL; + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = NULL; + pWrapperTable->m_LevelSet_SetMesh = NULL; + pWrapperTable->m_LevelSet_GetMesh = NULL; + pWrapperTable->m_LevelSet_GetVolumeData = NULL; + pWrapperTable->m_LevelSet_SetVolumeData = NULL; pWrapperTable->m_BeamLattice_GetMinLength = NULL; pWrapperTable->m_BeamLattice_SetMinLength = NULL; pWrapperTable->m_BeamLattice_GetClipping = NULL; @@ -178,6 +200,35 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_BeamLattice_GetBeamSetCount = NULL; pWrapperTable->m_BeamLattice_AddBeamSet = NULL; pWrapperTable->m_BeamLattice_GetBeamSet = NULL; + pWrapperTable->m_FunctionReference_GetFunctionResourceID = NULL; + pWrapperTable->m_FunctionReference_SetFunctionResourceID = NULL; + pWrapperTable->m_FunctionReference_GetTransform = NULL; + pWrapperTable->m_FunctionReference_SetTransform = NULL; + pWrapperTable->m_FunctionReference_GetChannelName = NULL; + pWrapperTable->m_FunctionReference_SetChannelName = NULL; + pWrapperTable->m_FunctionReference_SetMinFeatureSize = NULL; + pWrapperTable->m_FunctionReference_GetMinFeatureSize = NULL; + pWrapperTable->m_FunctionReference_SetFallBackValue = NULL; + pWrapperTable->m_FunctionReference_GetFallBackValue = NULL; + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = NULL; + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = NULL; + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = NULL; + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = NULL; + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = NULL; + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = NULL; + pWrapperTable->m_VolumeDataProperty_GetName = NULL; + pWrapperTable->m_VolumeDataProperty_SetIsRequired = NULL; + pWrapperTable->m_VolumeDataProperty_IsRequired = NULL; + pWrapperTable->m_VolumeData_GetComposite = NULL; + pWrapperTable->m_VolumeData_CreateNewComposite = NULL; + pWrapperTable->m_VolumeData_RemoveComposite = NULL; + pWrapperTable->m_VolumeData_GetColor = NULL; + pWrapperTable->m_VolumeData_CreateNewColor = NULL; + pWrapperTable->m_VolumeData_RemoveColor = NULL; + pWrapperTable->m_VolumeData_GetPropertyCount = NULL; + pWrapperTable->m_VolumeData_GetProperty = NULL; + pWrapperTable->m_VolumeData_AddPropertyFromFunction = NULL; + pWrapperTable->m_VolumeData_RemoveProperty = NULL; pWrapperTable->m_Component_GetObjectResource = NULL; pWrapperTable->m_Component_GetObjectResourceID = NULL; pWrapperTable->m_Component_GetUUID = NULL; @@ -234,6 +285,19 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_MultiPropertyGroup_AddLayer = NULL; pWrapperTable->m_MultiPropertyGroup_GetLayer = NULL; pWrapperTable->m_MultiPropertyGroup_RemoveLayer = NULL; + pWrapperTable->m_Image3D_GetName = NULL; + pWrapperTable->m_Image3D_SetName = NULL; + pWrapperTable->m_Image3D_IsImageStack = NULL; + pWrapperTable->m_ImageStack_GetRowCount = NULL; + pWrapperTable->m_ImageStack_SetRowCount = NULL; + pWrapperTable->m_ImageStack_GetColumnCount = NULL; + pWrapperTable->m_ImageStack_SetColumnCount = NULL; + pWrapperTable->m_ImageStack_GetSheetCount = NULL; + pWrapperTable->m_ImageStack_GetSheet = NULL; + pWrapperTable->m_ImageStack_SetSheet = NULL; + pWrapperTable->m_ImageStack_CreateEmptySheet = NULL; + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = NULL; + pWrapperTable->m_ImageStack_CreateSheetFromFile = NULL; pWrapperTable->m_Attachment_GetPath = NULL; pWrapperTable->m_Attachment_SetPath = NULL; pWrapperTable->m_Attachment_PackagePart = NULL; @@ -253,6 +317,173 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Texture2D_SetTileStyleUV = NULL; pWrapperTable->m_Texture2D_GetFilter = NULL; pWrapperTable->m_Texture2D_SetFilter = NULL; + pWrapperTable->m_ImplicitPort_GetIdentifier = NULL; + pWrapperTable->m_ImplicitPort_SetIdentifier = NULL; + pWrapperTable->m_ImplicitPort_GetDisplayName = NULL; + pWrapperTable->m_ImplicitPort_SetDisplayName = NULL; + pWrapperTable->m_ImplicitPort_SetType = NULL; + pWrapperTable->m_ImplicitPort_GetType = NULL; + pWrapperTable->m_ImplicitPort_GetReference = NULL; + pWrapperTable->m_ImplicitPort_SetReference = NULL; + pWrapperTable->m_Iterator_MoveNext = NULL; + pWrapperTable->m_Iterator_MovePrevious = NULL; + pWrapperTable->m_Iterator_Count = NULL; + pWrapperTable->m_ImplicitPortIterator_GetCurrent = NULL; + pWrapperTable->m_ImplicitNode_GetIdentifier = NULL; + pWrapperTable->m_ImplicitNode_SetIdentifier = NULL; + pWrapperTable->m_ImplicitNode_GetDisplayName = NULL; + pWrapperTable->m_ImplicitNode_SetDisplayName = NULL; + pWrapperTable->m_ImplicitNode_GetTag = NULL; + pWrapperTable->m_ImplicitNode_SetTag = NULL; + pWrapperTable->m_ImplicitNode_GetNodeType = NULL; + pWrapperTable->m_ImplicitNode_AddInput = NULL; + pWrapperTable->m_ImplicitNode_GetInputs = NULL; + pWrapperTable->m_ImplicitNode_AddOutput = NULL; + pWrapperTable->m_ImplicitNode_GetOutputs = NULL; + pWrapperTable->m_ImplicitNode_FindInput = NULL; + pWrapperTable->m_ImplicitNode_FindOutput = NULL; + pWrapperTable->m_ImplicitNode_AreTypesValid = NULL; + pWrapperTable->m_OneInputNode_GetInputA = NULL; + pWrapperTable->m_OneInputNode_GetOutputResult = NULL; + pWrapperTable->m_ResourceIdNode_SetResource = NULL; + pWrapperTable->m_ResourceIdNode_GetResource = NULL; + pWrapperTable->m_ResourceIdNode_GetOutputValue = NULL; + pWrapperTable->m_TwoInputNode_GetInputB = NULL; + pWrapperTable->m_SelectNode_GetInputB = NULL; + pWrapperTable->m_SelectNode_GetInputC = NULL; + pWrapperTable->m_SelectNode_GetInputD = NULL; + pWrapperTable->m_ClampNode_GetInputMin = NULL; + pWrapperTable->m_ClampNode_GetInputMax = NULL; + pWrapperTable->m_ComposeVectorNode_GetInputX = NULL; + pWrapperTable->m_ComposeVectorNode_GetInputY = NULL; + pWrapperTable->m_ComposeVectorNode_GetInputZ = NULL; + pWrapperTable->m_ComposeVectorNode_GetOutputResult = NULL; + pWrapperTable->m_DecomposeVectorNode_GetInputA = NULL; + pWrapperTable->m_DecomposeVectorNode_GetOutputX = NULL; + pWrapperTable->m_DecomposeVectorNode_GetOutputY = NULL; + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputA = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputB = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputC = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputD = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = NULL; + pWrapperTable->m_ConstantNode_SetConstant = NULL; + pWrapperTable->m_ConstantNode_GetConstant = NULL; + pWrapperTable->m_ConstantNode_GetOutputValue = NULL; + pWrapperTable->m_ConstVecNode_SetVector = NULL; + pWrapperTable->m_ConstVecNode_GetVector = NULL; + pWrapperTable->m_ConstVecNode_GetOutputVector = NULL; + pWrapperTable->m_ConstMatNode_SetMatrix = NULL; + pWrapperTable->m_ConstMatNode_GetMatrix = NULL; + pWrapperTable->m_ConstMatNode_GetOutputMatrix = NULL; + pWrapperTable->m_MeshNode_GetInputMesh = NULL; + pWrapperTable->m_MeshNode_GetInputPos = NULL; + pWrapperTable->m_MeshNode_GetOutputDistance = NULL; + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = NULL; + pWrapperTable->m_UnsignedMeshNode_GetInputPos = NULL; + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = NULL; + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = NULL; + pWrapperTable->m_NodeIterator_GetCurrent = NULL; + pWrapperTable->m_Function_GetDisplayName = NULL; + pWrapperTable->m_Function_SetDisplayName = NULL; + pWrapperTable->m_Function_AddInput = NULL; + pWrapperTable->m_Function_GetInputs = NULL; + pWrapperTable->m_Function_RemoveInput = NULL; + pWrapperTable->m_Function_AddOutput = NULL; + pWrapperTable->m_Function_GetOutputs = NULL; + pWrapperTable->m_Function_RemoveOutput = NULL; + pWrapperTable->m_Function_FindInput = NULL; + pWrapperTable->m_Function_FindOutput = NULL; + pWrapperTable->m_ImplicitFunction_GetIdentifier = NULL; + pWrapperTable->m_ImplicitFunction_SetIdentifier = NULL; + pWrapperTable->m_ImplicitFunction_AddNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSinNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCosNode = NULL; + pWrapperTable->m_ImplicitFunction_AddTanNode = NULL; + pWrapperTable->m_ImplicitFunction_AddArcSinNode = NULL; + pWrapperTable->m_ImplicitFunction_AddArcCosNode = NULL; + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = NULL; + pWrapperTable->m_ImplicitFunction_AddSinhNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCoshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddTanhNode = NULL; + pWrapperTable->m_ImplicitFunction_AddRoundNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCeilNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFloorNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSignNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFractNode = NULL; + pWrapperTable->m_ImplicitFunction_AddAbsNode = NULL; + pWrapperTable->m_ImplicitFunction_AddExpNode = NULL; + pWrapperTable->m_ImplicitFunction_AddLogNode = NULL; + pWrapperTable->m_ImplicitFunction_AddLog2Node = NULL; + pWrapperTable->m_ImplicitFunction_AddLog10Node = NULL; + pWrapperTable->m_ImplicitFunction_AddLengthNode = NULL; + pWrapperTable->m_ImplicitFunction_AddTransposeNode = NULL; + pWrapperTable->m_ImplicitFunction_InverseNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSqrtNode = NULL; + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = NULL; + pWrapperTable->m_ImplicitFunction_AddAdditionNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = NULL; + pWrapperTable->m_ImplicitFunction_AddDivisionNode = NULL; + pWrapperTable->m_ImplicitFunction_AddDotNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCrossNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMinNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMaxNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFmodNode = NULL; + pWrapperTable->m_ImplicitFunction_AddPowNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSelectNode = NULL; + pWrapperTable->m_ImplicitFunction_AddClampNode = NULL; + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = NULL; + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = NULL; + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = NULL; + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = NULL; + pWrapperTable->m_ImplicitFunction_AddConstantNode = NULL; + pWrapperTable->m_ImplicitFunction_AddConstVecNode = NULL; + pWrapperTable->m_ImplicitFunction_AddConstMatNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMeshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = NULL; + pWrapperTable->m_ImplicitFunction_GetNodes = NULL; + pWrapperTable->m_ImplicitFunction_RemoveNode = NULL; + pWrapperTable->m_ImplicitFunction_AddLink = NULL; + pWrapperTable->m_ImplicitFunction_AddLinkByNames = NULL; + pWrapperTable->m_ImplicitFunction_Clear = NULL; + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = NULL; + pWrapperTable->m_FunctionFromImage3D_GetImage3D = NULL; + pWrapperTable->m_FunctionFromImage3D_SetImage3D = NULL; + pWrapperTable->m_FunctionFromImage3D_SetFilter = NULL; + pWrapperTable->m_FunctionFromImage3D_GetFilter = NULL; + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = NULL; + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = NULL; + pWrapperTable->m_FunctionFromImage3D_GetOffset = NULL; + pWrapperTable->m_FunctionFromImage3D_SetOffset = NULL; + pWrapperTable->m_FunctionFromImage3D_GetScale = NULL; + pWrapperTable->m_FunctionFromImage3D_SetScale = NULL; pWrapperTable->m_BuildItem_GetObjectResource = NULL; pWrapperTable->m_BuildItem_GetUUID = NULL; pWrapperTable->m_BuildItem_SetUUID = NULL; @@ -347,6 +578,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_GetComponentsObjectByID = NULL; pWrapperTable->m_Model_GetColorGroupByID = NULL; pWrapperTable->m_Model_GetSliceStackByID = NULL; + pWrapperTable->m_Model_GetLevelSetByID = NULL; pWrapperTable->m_Model_GetBuildUUID = NULL; pWrapperTable->m_Model_SetBuildUUID = NULL; pWrapperTable->m_Model_GetBuildItems = NULL; @@ -362,7 +594,9 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_GetCompositeMaterials = NULL; pWrapperTable->m_Model_GetMultiPropertyGroups = NULL; pWrapperTable->m_Model_GetSliceStacks = NULL; + pWrapperTable->m_Model_GetImage3Ds = NULL; pWrapperTable->m_Model_MergeToModel = NULL; + pWrapperTable->m_Model_MergeFromModel = NULL; pWrapperTable->m_Model_AddMeshObject = NULL; pWrapperTable->m_Model_AddComponentsObject = NULL; pWrapperTable->m_Model_AddSliceStack = NULL; @@ -372,6 +606,8 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_AddTexture2DGroup = NULL; pWrapperTable->m_Model_AddCompositeMaterials = NULL; pWrapperTable->m_Model_AddMultiPropertyGroup = NULL; + pWrapperTable->m_Model_AddImageStack = NULL; + pWrapperTable->m_Model_GetImageStackByID = NULL; pWrapperTable->m_Model_AddBuildItem = NULL; pWrapperTable->m_Model_RemoveBuildItem = NULL; pWrapperTable->m_Model_GetMetaDataGroup = NULL; @@ -388,6 +624,13 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_RemoveCustomContentType = NULL; pWrapperTable->m_Model_SetRandomNumberCallback = NULL; pWrapperTable->m_Model_GetKeyStore = NULL; + pWrapperTable->m_Model_GetFunctions = NULL; + pWrapperTable->m_Model_AddImplicitFunction = NULL; + pWrapperTable->m_Model_AddFunctionFromImage3D = NULL; + pWrapperTable->m_Model_AddVolumeData = NULL; + pWrapperTable->m_Model_AddLevelSet = NULL; + pWrapperTable->m_Model_GetLevelSets = NULL; + pWrapperTable->m_Model_RemoveResource = NULL; pWrapperTable->m_GetLibraryVersion = NULL; pWrapperTable->m_GetPrereleaseInformation = NULL; pWrapperTable->m_GetBuildInformation = NULL; @@ -893,6 +1136,33 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = (PLib3MFImage3DIterator_GetCurrentImage3DPtr) GetProcAddress(hLibrary, "lib3mf_image3diterator_getcurrentimage3d"); + #else // _WIN32 + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = (PLib3MFImage3DIterator_GetCurrentImage3DPtr) dlsym(hLibrary, "lib3mf_image3diterator_getcurrentimage3d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3DIterator_GetCurrentImage3D == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionIterator_GetCurrentFunction = (PLib3MFFunctionIterator_GetCurrentFunctionPtr) GetProcAddress(hLibrary, "lib3mf_functioniterator_getcurrentfunction"); + #else // _WIN32 + pWrapperTable->m_FunctionIterator_GetCurrentFunction = (PLib3MFFunctionIterator_GetCurrentFunctionPtr) dlsym(hLibrary, "lib3mf_functioniterator_getcurrentfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionIterator_GetCurrentFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = (PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) GetProcAddress(hLibrary, "lib3mf_levelsetiterator_getcurrentlevelset"); + #else // _WIN32 + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = (PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) dlsym(hLibrary, "lib3mf_levelsetiterator_getcurrentlevelset"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_MetaData_GetNameSpace = (PLib3MFMetaData_GetNameSpacePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getnamespace"); #else // _WIN32 @@ -1118,6 +1388,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Object_IsComponentsObject == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_islevelsetobject"); + #else // _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) dlsym(hLibrary, "lib3mf_object_islevelsetobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_IsLevelSetObject == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Object_IsValid = (PLib3MFObject_IsValidPtr) GetProcAddress(hLibrary, "lib3mf_object_isvalid"); #else // _WIN32 @@ -1424,6 +1703,168 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_MeshObject_BeamLattice == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetVolumeData = (PLib3MFMeshObject_GetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getvolumedata"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetVolumeData = (PLib3MFMeshObject_GetVolumeDataPtr) dlsym(hLibrary, "lib3mf_meshobject_getvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_SetVolumeData = (PLib3MFMeshObject_SetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setvolumedata"); + #else // _WIN32 + pWrapperTable->m_MeshObject_SetVolumeData = (PLib3MFMeshObject_SetVolumeDataPtr) dlsym(hLibrary, "lib3mf_meshobject_setvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_SetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetFunction = (PLib3MFLevelSet_GetFunctionPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getfunction"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetFunction = (PLib3MFLevelSet_GetFunctionPtr) dlsym(hLibrary, "lib3mf_levelset_getfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetFunction = (PLib3MFLevelSet_SetFunctionPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setfunction"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetFunction = (PLib3MFLevelSet_SetFunctionPtr) dlsym(hLibrary, "lib3mf_levelset_setfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetTransform = (PLib3MFLevelSet_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_levelset_gettransform"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetTransform = (PLib3MFLevelSet_GetTransformPtr) dlsym(hLibrary, "lib3mf_levelset_gettransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetTransform = (PLib3MFLevelSet_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_levelset_settransform"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetTransform = (PLib3MFLevelSet_SetTransformPtr) dlsym(hLibrary, "lib3mf_levelset_settransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetChannelName = (PLib3MFLevelSet_GetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getchannelname"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetChannelName = (PLib3MFLevelSet_GetChannelNamePtr) dlsym(hLibrary, "lib3mf_levelset_getchannelname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetChannelName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetChannelName = (PLib3MFLevelSet_SetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setchannelname"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetChannelName = (PLib3MFLevelSet_SetChannelNamePtr) dlsym(hLibrary, "lib3mf_levelset_setchannelname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetChannelName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMinFeatureSize = (PLib3MFLevelSet_SetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setminfeaturesize"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMinFeatureSize = (PLib3MFLevelSet_SetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_levelset_setminfeaturesize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMinFeatureSize == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMinFeatureSize = (PLib3MFLevelSet_GetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getminfeaturesize"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMinFeatureSize = (PLib3MFLevelSet_GetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_levelset_getminfeaturesize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMinFeatureSize == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetFallBackValue = (PLib3MFLevelSet_SetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setfallbackvalue"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetFallBackValue = (PLib3MFLevelSet_SetFallBackValuePtr) dlsym(hLibrary, "lib3mf_levelset_setfallbackvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetFallBackValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetFallBackValue = (PLib3MFLevelSet_GetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getfallbackvalue"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetFallBackValue = (PLib3MFLevelSet_GetFallBackValuePtr) dlsym(hLibrary, "lib3mf_levelset_getfallbackvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetFallBackValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = (PLib3MFLevelSet_SetMeshBBoxOnlyPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setmeshbboxonly"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = (PLib3MFLevelSet_SetMeshBBoxOnlyPtr) dlsym(hLibrary, "lib3mf_levelset_setmeshbboxonly"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMeshBBoxOnly == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = (PLib3MFLevelSet_GetMeshBBoxOnlyPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getmeshbboxonly"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = (PLib3MFLevelSet_GetMeshBBoxOnlyPtr) dlsym(hLibrary, "lib3mf_levelset_getmeshbboxonly"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMeshBBoxOnly == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMesh = (PLib3MFLevelSet_SetMeshPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setmesh"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMesh = (PLib3MFLevelSet_SetMeshPtr) dlsym(hLibrary, "lib3mf_levelset_setmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMesh = (PLib3MFLevelSet_GetMeshPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getmesh"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMesh = (PLib3MFLevelSet_GetMeshPtr) dlsym(hLibrary, "lib3mf_levelset_getmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetVolumeData = (PLib3MFLevelSet_GetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getvolumedata"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetVolumeData = (PLib3MFLevelSet_GetVolumeDataPtr) dlsym(hLibrary, "lib3mf_levelset_getvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetVolumeData = (PLib3MFLevelSet_SetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setvolumedata"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetVolumeData = (PLib3MFLevelSet_SetVolumeDataPtr) dlsym(hLibrary, "lib3mf_levelset_setvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_BeamLattice_GetMinLength = (PLib3MFBeamLattice_GetMinLengthPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getminlength"); #else // _WIN32 @@ -1632,678 +2073,2559 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresource"); + pWrapperTable->m_FunctionReference_GetFunctionResourceID = (PLib3MFFunctionReference_GetFunctionResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getfunctionresourceid"); #else // _WIN32 - pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) dlsym(hLibrary, "lib3mf_component_getobjectresource"); + pWrapperTable->m_FunctionReference_GetFunctionResourceID = (PLib3MFFunctionReference_GetFunctionResourceIDPtr) dlsym(hLibrary, "lib3mf_functionreference_getfunctionresourceid"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetObjectResource == NULL) + if (pWrapperTable->m_FunctionReference_GetFunctionResourceID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresourceid"); + pWrapperTable->m_FunctionReference_SetFunctionResourceID = (PLib3MFFunctionReference_SetFunctionResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setfunctionresourceid"); #else // _WIN32 - pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) dlsym(hLibrary, "lib3mf_component_getobjectresourceid"); + pWrapperTable->m_FunctionReference_SetFunctionResourceID = (PLib3MFFunctionReference_SetFunctionResourceIDPtr) dlsym(hLibrary, "lib3mf_functionreference_setfunctionresourceid"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetObjectResourceID == NULL) + if (pWrapperTable->m_FunctionReference_SetFunctionResourceID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getuuid"); + pWrapperTable->m_FunctionReference_GetTransform = (PLib3MFFunctionReference_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_gettransform"); #else // _WIN32 - pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) dlsym(hLibrary, "lib3mf_component_getuuid"); + pWrapperTable->m_FunctionReference_GetTransform = (PLib3MFFunctionReference_GetTransformPtr) dlsym(hLibrary, "lib3mf_functionreference_gettransform"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetUUID == NULL) + if (pWrapperTable->m_FunctionReference_GetTransform == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_setuuid"); + pWrapperTable->m_FunctionReference_SetTransform = (PLib3MFFunctionReference_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_settransform"); #else // _WIN32 - pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) dlsym(hLibrary, "lib3mf_component_setuuid"); + pWrapperTable->m_FunctionReference_SetTransform = (PLib3MFFunctionReference_SetTransformPtr) dlsym(hLibrary, "lib3mf_functionreference_settransform"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_SetUUID == NULL) + if (pWrapperTable->m_FunctionReference_SetTransform == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_hastransform"); + pWrapperTable->m_FunctionReference_GetChannelName = (PLib3MFFunctionReference_GetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getchannelname"); #else // _WIN32 - pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) dlsym(hLibrary, "lib3mf_component_hastransform"); + pWrapperTable->m_FunctionReference_GetChannelName = (PLib3MFFunctionReference_GetChannelNamePtr) dlsym(hLibrary, "lib3mf_functionreference_getchannelname"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_HasTransform == NULL) + if (pWrapperTable->m_FunctionReference_GetChannelName == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_gettransform"); + pWrapperTable->m_FunctionReference_SetChannelName = (PLib3MFFunctionReference_SetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setchannelname"); #else // _WIN32 - pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) dlsym(hLibrary, "lib3mf_component_gettransform"); + pWrapperTable->m_FunctionReference_SetChannelName = (PLib3MFFunctionReference_SetChannelNamePtr) dlsym(hLibrary, "lib3mf_functionreference_setchannelname"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetTransform == NULL) + if (pWrapperTable->m_FunctionReference_SetChannelName == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_settransform"); + pWrapperTable->m_FunctionReference_SetMinFeatureSize = (PLib3MFFunctionReference_SetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setminfeaturesize"); #else // _WIN32 - pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) dlsym(hLibrary, "lib3mf_component_settransform"); + pWrapperTable->m_FunctionReference_SetMinFeatureSize = (PLib3MFFunctionReference_SetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_functionreference_setminfeaturesize"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_SetTransform == NULL) + if (pWrapperTable->m_FunctionReference_SetMinFeatureSize == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_addcomponent"); + pWrapperTable->m_FunctionReference_GetMinFeatureSize = (PLib3MFFunctionReference_GetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getminfeaturesize"); #else // _WIN32 - pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_addcomponent"); + pWrapperTable->m_FunctionReference_GetMinFeatureSize = (PLib3MFFunctionReference_GetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_functionreference_getminfeaturesize"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_AddComponent == NULL) + if (pWrapperTable->m_FunctionReference_GetMinFeatureSize == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponent"); + pWrapperTable->m_FunctionReference_SetFallBackValue = (PLib3MFFunctionReference_SetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setfallbackvalue"); #else // _WIN32 - pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponent"); + pWrapperTable->m_FunctionReference_SetFallBackValue = (PLib3MFFunctionReference_SetFallBackValuePtr) dlsym(hLibrary, "lib3mf_functionreference_setfallbackvalue"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_GetComponent == NULL) + if (pWrapperTable->m_FunctionReference_SetFallBackValue == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + pWrapperTable->m_FunctionReference_GetFallBackValue = (PLib3MFFunctionReference_GetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getfallbackvalue"); #else // _WIN32 - pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + pWrapperTable->m_FunctionReference_GetFallBackValue = (PLib3MFFunctionReference_GetFallBackValuePtr) dlsym(hLibrary, "lib3mf_functionreference_getfallbackvalue"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_GetComponentCount == NULL) + if (pWrapperTable->m_FunctionReference_GetFallBackValue == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_setname"); + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = (PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getbasematerialgroup"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) dlsym(hLibrary, "lib3mf_beamset_setname"); + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = (PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getbasematerialgroup"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetName == NULL) + if (pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_getname"); + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = (PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_setbasematerialgroup"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) dlsym(hLibrary, "lib3mf_beamset_getname"); + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = (PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_setbasematerialgroup"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetName == NULL) + if (pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = (PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getmaterialmappingcount"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_setidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = (PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getmaterialmappingcount"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetIdentifier == NULL) + if (pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = (PLib3MFVolumeDataComposite_GetMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getmaterialmapping"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_getidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = (PLib3MFVolumeDataComposite_GetMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getmaterialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_GetMaterialMapping == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = (PLib3MFVolumeDataComposite_AddMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_addmaterialmapping"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = (PLib3MFVolumeDataComposite_AddMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_addmaterialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_AddMaterialMapping == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = (PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_removematerialmapping"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = (PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_removematerialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_GetName = (PLib3MFVolumeDataProperty_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_getname"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_GetName = (PLib3MFVolumeDataProperty_GetNamePtr) dlsym(hLibrary, "lib3mf_volumedataproperty_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_SetIsRequired = (PLib3MFVolumeDataProperty_SetIsRequiredPtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_setisrequired"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_SetIsRequired = (PLib3MFVolumeDataProperty_SetIsRequiredPtr) dlsym(hLibrary, "lib3mf_volumedataproperty_setisrequired"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_SetIsRequired == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_IsRequired = (PLib3MFVolumeDataProperty_IsRequiredPtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_isrequired"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_IsRequired = (PLib3MFVolumeDataProperty_IsRequiredPtr) dlsym(hLibrary, "lib3mf_volumedataproperty_isrequired"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_IsRequired == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetComposite = (PLib3MFVolumeData_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getcomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetComposite = (PLib3MFVolumeData_GetCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_getcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_CreateNewComposite = (PLib3MFVolumeData_CreateNewCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_createnewcomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_CreateNewComposite = (PLib3MFVolumeData_CreateNewCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_createnewcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_CreateNewComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveComposite = (PLib3MFVolumeData_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removecomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveComposite = (PLib3MFVolumeData_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_removecomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetColor = (PLib3MFVolumeData_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getcolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetColor = (PLib3MFVolumeData_GetColorPtr) dlsym(hLibrary, "lib3mf_volumedata_getcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_CreateNewColor = (PLib3MFVolumeData_CreateNewColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_createnewcolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_CreateNewColor = (PLib3MFVolumeData_CreateNewColorPtr) dlsym(hLibrary, "lib3mf_volumedata_createnewcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_CreateNewColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveColor = (PLib3MFVolumeData_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removecolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveColor = (PLib3MFVolumeData_RemoveColorPtr) dlsym(hLibrary, "lib3mf_volumedata_removecolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetPropertyCount = (PLib3MFVolumeData_GetPropertyCountPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getpropertycount"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetPropertyCount = (PLib3MFVolumeData_GetPropertyCountPtr) dlsym(hLibrary, "lib3mf_volumedata_getpropertycount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetPropertyCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetProperty = (PLib3MFVolumeData_GetPropertyPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getproperty"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetProperty = (PLib3MFVolumeData_GetPropertyPtr) dlsym(hLibrary, "lib3mf_volumedata_getproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_AddPropertyFromFunction = (PLib3MFVolumeData_AddPropertyFromFunctionPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_addpropertyfromfunction"); + #else // _WIN32 + pWrapperTable->m_VolumeData_AddPropertyFromFunction = (PLib3MFVolumeData_AddPropertyFromFunctionPtr) dlsym(hLibrary, "lib3mf_volumedata_addpropertyfromfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_AddPropertyFromFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveProperty = (PLib3MFVolumeData_RemovePropertyPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removeproperty"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveProperty = (PLib3MFVolumeData_RemovePropertyPtr) dlsym(hLibrary, "lib3mf_volumedata_removeproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresource"); + #else // _WIN32 + pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) dlsym(hLibrary, "lib3mf_component_getobjectresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetObjectResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresourceid"); + #else // _WIN32 + pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) dlsym(hLibrary, "lib3mf_component_getobjectresourceid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetObjectResourceID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getuuid"); + #else // _WIN32 + pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) dlsym(hLibrary, "lib3mf_component_getuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetUUID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_setuuid"); + #else // _WIN32 + pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) dlsym(hLibrary, "lib3mf_component_setuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_SetUUID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_hastransform"); + #else // _WIN32 + pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) dlsym(hLibrary, "lib3mf_component_hastransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_HasTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_gettransform"); + #else // _WIN32 + pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) dlsym(hLibrary, "lib3mf_component_gettransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_settransform"); + #else // _WIN32 + pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) dlsym(hLibrary, "lib3mf_component_settransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_SetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_addcomponent"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_addcomponent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_AddComponent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponent"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_GetComponent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_GetComponentCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_setname"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) dlsym(hLibrary, "lib3mf_beamset_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_getname"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) dlsym(hLibrary, "lib3mf_beamset_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setidentifier"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getidentifier"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferencecount"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getreferencecount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetReferenceCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferencecount"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferencecount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetBallReferenceCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setballreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setballreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetBallReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetBallReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_AddMaterial == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_removematerial"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_removematerial"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_RemoveMaterial == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getname"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setname"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_SetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_SetDisplayColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetDisplayColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_addcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_addcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_AddColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_removecolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_removecolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_RemoveColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_setcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_setcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_SetColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_AddTex2Coord == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetTex2Coord == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_RemoveTex2Coord == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetTexture2D == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcount"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) dlsym(hLibrary, "lib3mf_compositematerials_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_addcomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_addcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_AddComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_removecomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_removecomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_RemoveComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_getcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getcount"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_AddMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_SetMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetLayerCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addlayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addlayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_AddLayer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetLayer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removelayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removelayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_RemoveLayer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_GetName = (PLib3MFImage3D_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_image3d_getname"); + #else // _WIN32 + pWrapperTable->m_Image3D_GetName = (PLib3MFImage3D_GetNamePtr) dlsym(hLibrary, "lib3mf_image3d_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_SetName = (PLib3MFImage3D_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_image3d_setname"); + #else // _WIN32 + pWrapperTable->m_Image3D_SetName = (PLib3MFImage3D_SetNamePtr) dlsym(hLibrary, "lib3mf_image3d_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_SetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_IsImageStack = (PLib3MFImage3D_IsImageStackPtr) GetProcAddress(hLibrary, "lib3mf_image3d_isimagestack"); + #else // _WIN32 + pWrapperTable->m_Image3D_IsImageStack = (PLib3MFImage3D_IsImageStackPtr) dlsym(hLibrary, "lib3mf_image3d_isimagestack"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_IsImageStack == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetRowCount = (PLib3MFImageStack_GetRowCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getrowcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetRowCount = (PLib3MFImageStack_GetRowCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getrowcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetRowCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetRowCount = (PLib3MFImageStack_SetRowCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setrowcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetRowCount = (PLib3MFImageStack_SetRowCountPtr) dlsym(hLibrary, "lib3mf_imagestack_setrowcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetRowCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetColumnCount = (PLib3MFImageStack_GetColumnCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getcolumncount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetColumnCount = (PLib3MFImageStack_GetColumnCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getcolumncount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetColumnCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetColumnCount = (PLib3MFImageStack_SetColumnCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setcolumncount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetColumnCount = (PLib3MFImageStack_SetColumnCountPtr) dlsym(hLibrary, "lib3mf_imagestack_setcolumncount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetColumnCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetSheetCount = (PLib3MFImageStack_GetSheetCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getsheetcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetSheetCount = (PLib3MFImageStack_GetSheetCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getsheetcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetSheetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetSheet = (PLib3MFImageStack_GetSheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getsheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetSheet = (PLib3MFImageStack_GetSheetPtr) dlsym(hLibrary, "lib3mf_imagestack_getsheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetSheet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetSheet = (PLib3MFImageStack_SetSheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setsheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetSheet = (PLib3MFImageStack_SetSheetPtr) dlsym(hLibrary, "lib3mf_imagestack_setsheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetSheet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateEmptySheet = (PLib3MFImageStack_CreateEmptySheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createemptysheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateEmptySheet = (PLib3MFImageStack_CreateEmptySheetPtr) dlsym(hLibrary, "lib3mf_imagestack_createemptysheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateEmptySheet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = (PLib3MFImageStack_CreateSheetFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createsheetfrombuffer"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = (PLib3MFImageStack_CreateSheetFromBufferPtr) dlsym(hLibrary, "lib3mf_imagestack_createsheetfrombuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateSheetFromBuffer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromFile = (PLib3MFImageStack_CreateSheetFromFilePtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createsheetfromfile"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromFile = (PLib3MFImageStack_CreateSheetFromFilePtr) dlsym(hLibrary, "lib3mf_imagestack_createsheetfromfile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateSheetFromFile == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_getpath"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) dlsym(hLibrary, "lib3mf_attachment_getpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetPath == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_setpath"); + #else // _WIN32 + pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) dlsym(hLibrary, "lib3mf_attachment_setpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_SetPath == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) GetProcAddress(hLibrary, "lib3mf_attachment_packagepart"); + #else // _WIN32 + pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) dlsym(hLibrary, "lib3mf_attachment_packagepart"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_PackagePart == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getrelationshiptype"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_getrelationshiptype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetRelationShipType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_setrelationshiptype"); + #else // _WIN32 + pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_setrelationshiptype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_SetRelationShipType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetofile"); + #else // _WIN32 + pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) dlsym(hLibrary, "lib3mf_attachment_writetofile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_WriteToFile == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromfile"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) dlsym(hLibrary, "lib3mf_attachment_readfromfile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromFile == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromcallback"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) dlsym(hLibrary, "lib3mf_attachment_readfromcallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromCallback == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getstreamsize"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) dlsym(hLibrary, "lib3mf_attachment_getstreamsize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetStreamSize == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetobuffer"); + #else // _WIN32 + pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) dlsym(hLibrary, "lib3mf_attachment_writetobuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_WriteToBuffer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfrombuffer"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) dlsym(hLibrary, "lib3mf_attachment_readfrombuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromBuffer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getattachment"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_getattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetAttachment == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setattachment"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_setattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetAttachment == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getcontenttype"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_getcontenttype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetContentType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setcontenttype"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_setcontenttype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetContentType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetTileStyleUV == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_settilestyleuv"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_settilestyleuv"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetTileStyleUV == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getfilter"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_getfilter"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetFilter == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setfilter"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_setfilter"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetFilter == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetIdentifier = (PLib3MFImplicitPort_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetIdentifier = (PLib3MFImplicitPort_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitport_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetIdentifier = (PLib3MFImplicitPort_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetIdentifier = (PLib3MFImplicitPort_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitport_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetDisplayName = (PLib3MFImplicitPort_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetDisplayName = (PLib3MFImplicitPort_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitport_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetDisplayName = (PLib3MFImplicitPort_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetDisplayName = (PLib3MFImplicitPort_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitport_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetType = (PLib3MFImplicitPort_SetTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_settype"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetType = (PLib3MFImplicitPort_SetTypePtr) dlsym(hLibrary, "lib3mf_implicitport_settype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetType = (PLib3MFImplicitPort_GetTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_gettype"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetType = (PLib3MFImplicitPort_GetTypePtr) dlsym(hLibrary, "lib3mf_implicitport_gettype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetReference = (PLib3MFImplicitPort_GetReferencePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getreference"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetReference = (PLib3MFImplicitPort_GetReferencePtr) dlsym(hLibrary, "lib3mf_implicitport_getreference"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetReference == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetReference = (PLib3MFImplicitPort_SetReferencePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setreference"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetReference = (PLib3MFImplicitPort_SetReferencePtr) dlsym(hLibrary, "lib3mf_implicitport_setreference"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetReference == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_MoveNext = (PLib3MFIterator_MoveNextPtr) GetProcAddress(hLibrary, "lib3mf_iterator_movenext"); + #else // _WIN32 + pWrapperTable->m_Iterator_MoveNext = (PLib3MFIterator_MoveNextPtr) dlsym(hLibrary, "lib3mf_iterator_movenext"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_MoveNext == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_MovePrevious = (PLib3MFIterator_MovePreviousPtr) GetProcAddress(hLibrary, "lib3mf_iterator_moveprevious"); + #else // _WIN32 + pWrapperTable->m_Iterator_MovePrevious = (PLib3MFIterator_MovePreviousPtr) dlsym(hLibrary, "lib3mf_iterator_moveprevious"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_MovePrevious == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_Count = (PLib3MFIterator_CountPtr) GetProcAddress(hLibrary, "lib3mf_iterator_count"); + #else // _WIN32 + pWrapperTable->m_Iterator_Count = (PLib3MFIterator_CountPtr) dlsym(hLibrary, "lib3mf_iterator_count"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_Count == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPortIterator_GetCurrent = (PLib3MFImplicitPortIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_implicitportiterator_getcurrent"); + #else // _WIN32 + pWrapperTable->m_ImplicitPortIterator_GetCurrent = (PLib3MFImplicitPortIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_implicitportiterator_getcurrent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPortIterator_GetCurrent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetIdentifier = (PLib3MFImplicitNode_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetIdentifier = (PLib3MFImplicitNode_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitnode_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetIdentifier = (PLib3MFImplicitNode_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetIdentifier = (PLib3MFImplicitNode_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitnode_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetDisplayName = (PLib3MFImplicitNode_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetDisplayName = (PLib3MFImplicitNode_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitnode_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetDisplayName = (PLib3MFImplicitNode_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetDisplayName = (PLib3MFImplicitNode_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitnode_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetTag = (PLib3MFImplicitNode_GetTagPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_gettag"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetTag = (PLib3MFImplicitNode_GetTagPtr) dlsym(hLibrary, "lib3mf_implicitnode_gettag"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetTag == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetTag = (PLib3MFImplicitNode_SetTagPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_settag"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetTag = (PLib3MFImplicitNode_SetTagPtr) dlsym(hLibrary, "lib3mf_implicitnode_settag"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetTag == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetNodeType = (PLib3MFImplicitNode_GetNodeTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getnodetype"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetNodeType = (PLib3MFImplicitNode_GetNodeTypePtr) dlsym(hLibrary, "lib3mf_implicitnode_getnodetype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetNodeType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AddInput = (PLib3MFImplicitNode_AddInputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_addinput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AddInput = (PLib3MFImplicitNode_AddInputPtr) dlsym(hLibrary, "lib3mf_implicitnode_addinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AddInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetInputs = (PLib3MFImplicitNode_GetInputsPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getinputs"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetInputs = (PLib3MFImplicitNode_GetInputsPtr) dlsym(hLibrary, "lib3mf_implicitnode_getinputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetInputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AddOutput = (PLib3MFImplicitNode_AddOutputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_addoutput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AddOutput = (PLib3MFImplicitNode_AddOutputPtr) dlsym(hLibrary, "lib3mf_implicitnode_addoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AddOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetOutputs = (PLib3MFImplicitNode_GetOutputsPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getoutputs"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetOutputs = (PLib3MFImplicitNode_GetOutputsPtr) dlsym(hLibrary, "lib3mf_implicitnode_getoutputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetOutputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_FindInput = (PLib3MFImplicitNode_FindInputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_findinput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_FindInput = (PLib3MFImplicitNode_FindInputPtr) dlsym(hLibrary, "lib3mf_implicitnode_findinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_FindInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_FindOutput = (PLib3MFImplicitNode_FindOutputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_findoutput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_FindOutput = (PLib3MFImplicitNode_FindOutputPtr) dlsym(hLibrary, "lib3mf_implicitnode_findoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_FindOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AreTypesValid = (PLib3MFImplicitNode_AreTypesValidPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_aretypesvalid"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AreTypesValid = (PLib3MFImplicitNode_AreTypesValidPtr) dlsym(hLibrary, "lib3mf_implicitnode_aretypesvalid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AreTypesValid == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_OneInputNode_GetInputA = (PLib3MFOneInputNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_oneinputnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_OneInputNode_GetInputA = (PLib3MFOneInputNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_oneinputnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_OneInputNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_OneInputNode_GetOutputResult = (PLib3MFOneInputNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_oneinputnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_OneInputNode_GetOutputResult = (PLib3MFOneInputNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_oneinputnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_OneInputNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_SetResource = (PLib3MFResourceIdNode_SetResourcePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_setresource"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_SetResource = (PLib3MFResourceIdNode_SetResourcePtr) dlsym(hLibrary, "lib3mf_resourceidnode_setresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_SetResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_GetResource = (PLib3MFResourceIdNode_GetResourcePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_getresource"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_GetResource = (PLib3MFResourceIdNode_GetResourcePtr) dlsym(hLibrary, "lib3mf_resourceidnode_getresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_GetResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_GetOutputValue = (PLib3MFResourceIdNode_GetOutputValuePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_getoutputvalue"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_GetOutputValue = (PLib3MFResourceIdNode_GetOutputValuePtr) dlsym(hLibrary, "lib3mf_resourceidnode_getoutputvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_GetOutputValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_TwoInputNode_GetInputB = (PLib3MFTwoInputNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_twoinputnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_TwoInputNode_GetInputB = (PLib3MFTwoInputNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_twoinputnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_TwoInputNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputB = (PLib3MFSelectNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputB = (PLib3MFSelectNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputC = (PLib3MFSelectNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputC = (PLib3MFSelectNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputC == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputD = (PLib3MFSelectNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputD = (PLib3MFSelectNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputD == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ClampNode_GetInputMin = (PLib3MFClampNode_GetInputMinPtr) GetProcAddress(hLibrary, "lib3mf_clampnode_getinputmin"); + #else // _WIN32 + pWrapperTable->m_ClampNode_GetInputMin = (PLib3MFClampNode_GetInputMinPtr) dlsym(hLibrary, "lib3mf_clampnode_getinputmin"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ClampNode_GetInputMin == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ClampNode_GetInputMax = (PLib3MFClampNode_GetInputMaxPtr) GetProcAddress(hLibrary, "lib3mf_clampnode_getinputmax"); + #else // _WIN32 + pWrapperTable->m_ClampNode_GetInputMax = (PLib3MFClampNode_GetInputMaxPtr) dlsym(hLibrary, "lib3mf_clampnode_getinputmax"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ClampNode_GetInputMax == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputX = (PLib3MFComposeVectorNode_GetInputXPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputx"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputX = (PLib3MFComposeVectorNode_GetInputXPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputx"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputX == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputY = (PLib3MFComposeVectorNode_GetInputYPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputy"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputY = (PLib3MFComposeVectorNode_GetInputYPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputy"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputY == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputZ = (PLib3MFComposeVectorNode_GetInputZPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputz"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputZ = (PLib3MFComposeVectorNode_GetInputZPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputz"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputZ == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetOutputResult = (PLib3MFComposeVectorNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetOutputResult = (PLib3MFComposeVectorNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_composevectornode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetInputA = (PLib3MFDecomposeVectorNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getinputa"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetInputA = (PLib3MFDecomposeVectorNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputX = (PLib3MFDecomposeVectorNode_GetOutputXPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputx"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputX = (PLib3MFDecomposeVectorNode_GetOutputXPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputx"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputX == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputY = (PLib3MFDecomposeVectorNode_GetOutputYPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputy"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputY = (PLib3MFDecomposeVectorNode_GetOutputYPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputy"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputY == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = (PLib3MFDecomposeVectorNode_GetOutputZPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputz"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = (PLib3MFDecomposeVectorNode_GetOutputZPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputz"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputZ == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = (PLib3MFComposeMatrixNode_GetInputM00Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm00"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = (PLib3MFComposeMatrixNode_GetInputM00Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm00"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM00 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = (PLib3MFComposeMatrixNode_GetInputM01Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm01"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = (PLib3MFComposeMatrixNode_GetInputM01Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm01"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM01 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = (PLib3MFComposeMatrixNode_GetInputM02Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm02"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = (PLib3MFComposeMatrixNode_GetInputM02Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm02"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM02 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = (PLib3MFComposeMatrixNode_GetInputM03Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm03"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = (PLib3MFComposeMatrixNode_GetInputM03Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm03"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM03 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = (PLib3MFComposeMatrixNode_GetInputM10Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm10"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = (PLib3MFComposeMatrixNode_GetInputM10Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm10"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM10 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = (PLib3MFComposeMatrixNode_GetInputM11Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm11"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = (PLib3MFComposeMatrixNode_GetInputM11Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm11"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM11 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = (PLib3MFComposeMatrixNode_GetInputM12Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm12"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = (PLib3MFComposeMatrixNode_GetInputM12Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm12"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM12 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = (PLib3MFComposeMatrixNode_GetInputM13Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm13"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = (PLib3MFComposeMatrixNode_GetInputM13Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm13"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM13 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = (PLib3MFComposeMatrixNode_GetInputM20Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm20"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = (PLib3MFComposeMatrixNode_GetInputM20Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm20"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM20 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = (PLib3MFComposeMatrixNode_GetInputM21Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm21"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = (PLib3MFComposeMatrixNode_GetInputM21Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm21"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM21 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = (PLib3MFComposeMatrixNode_GetInputM22Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm22"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = (PLib3MFComposeMatrixNode_GetInputM22Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm22"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM22 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = (PLib3MFComposeMatrixNode_GetInputM23Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm23"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = (PLib3MFComposeMatrixNode_GetInputM23Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm23"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM23 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = (PLib3MFComposeMatrixNode_GetInputM30Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm30"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = (PLib3MFComposeMatrixNode_GetInputM30Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm30"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM30 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = (PLib3MFComposeMatrixNode_GetInputM31Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm31"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = (PLib3MFComposeMatrixNode_GetInputM31Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm31"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM31 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = (PLib3MFComposeMatrixNode_GetInputM32Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm32"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = (PLib3MFComposeMatrixNode_GetInputM32Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm32"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM32 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = (PLib3MFComposeMatrixNode_GetInputM33Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm33"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = (PLib3MFComposeMatrixNode_GetInputM33Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm33"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM33 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = (PLib3MFComposeMatrixNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = (PLib3MFComposeMatrixNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_composematrixnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputA = (PLib3MFMatrixFromRowsNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputA = (PLib3MFMatrixFromRowsNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputB = (PLib3MFMatrixFromRowsNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputB = (PLib3MFMatrixFromRowsNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputC = (PLib3MFMatrixFromRowsNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputC = (PLib3MFMatrixFromRowsNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputC == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputD = (PLib3MFMatrixFromRowsNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputD = (PLib3MFMatrixFromRowsNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputD == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = (PLib3MFMatrixFromRowsNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = (PLib3MFMatrixFromRowsNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = (PLib3MFMatrixFromColumnsNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = (PLib3MFMatrixFromColumnsNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = (PLib3MFMatrixFromColumnsNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = (PLib3MFMatrixFromColumnsNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = (PLib3MFMatrixFromColumnsNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = (PLib3MFMatrixFromColumnsNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputC == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = (PLib3MFMatrixFromColumnsNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = (PLib3MFMatrixFromColumnsNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputD == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = (PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = (PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_SetConstant = (PLib3MFConstantNode_SetConstantPtr) GetProcAddress(hLibrary, "lib3mf_constantnode_setconstant"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_SetConstant = (PLib3MFConstantNode_SetConstantPtr) dlsym(hLibrary, "lib3mf_constantnode_setconstant"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_SetConstant == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_GetConstant = (PLib3MFConstantNode_GetConstantPtr) GetProcAddress(hLibrary, "lib3mf_constantnode_getconstant"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_GetConstant = (PLib3MFConstantNode_GetConstantPtr) dlsym(hLibrary, "lib3mf_constantnode_getconstant"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_GetConstant == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_GetOutputValue = (PLib3MFConstantNode_GetOutputValuePtr) GetProcAddress(hLibrary, "lib3mf_constantnode_getoutputvalue"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_GetOutputValue = (PLib3MFConstantNode_GetOutputValuePtr) dlsym(hLibrary, "lib3mf_constantnode_getoutputvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_GetOutputValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_SetVector = (PLib3MFConstVecNode_SetVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_setvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_SetVector = (PLib3MFConstVecNode_SetVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_setvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_SetVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_GetVector = (PLib3MFConstVecNode_GetVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_getvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_GetVector = (PLib3MFConstVecNode_GetVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_getvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_GetVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_GetOutputVector = (PLib3MFConstVecNode_GetOutputVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_getoutputvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_GetOutputVector = (PLib3MFConstVecNode_GetOutputVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_getoutputvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_GetOutputVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_SetMatrix = (PLib3MFConstMatNode_SetMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_setmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_SetMatrix = (PLib3MFConstMatNode_SetMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_setmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_SetMatrix == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_GetMatrix = (PLib3MFConstMatNode_GetMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_getmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_GetMatrix = (PLib3MFConstMatNode_GetMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_getmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_GetMatrix == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_GetOutputMatrix = (PLib3MFConstMatNode_GetOutputMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_getoutputmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_GetOutputMatrix = (PLib3MFConstMatNode_GetOutputMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_getoutputmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_GetOutputMatrix == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetInputMesh = (PLib3MFMeshNode_GetInputMeshPtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getinputmesh"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetInputMesh = (PLib3MFMeshNode_GetInputMeshPtr) dlsym(hLibrary, "lib3mf_meshnode_getinputmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetInputMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetInputPos = (PLib3MFMeshNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetInputPos = (PLib3MFMeshNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_meshnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetOutputDistance = (PLib3MFMeshNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetOutputDistance = (PLib3MFMeshNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_meshnode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetOutputDistance == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = (PLib3MFUnsignedMeshNode_GetInputMeshPtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getinputmesh"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = (PLib3MFUnsignedMeshNode_GetInputMeshPtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getinputmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetInputMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputPos = (PLib3MFUnsignedMeshNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputPos = (PLib3MFUnsignedMeshNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = (PLib3MFUnsignedMeshNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = (PLib3MFUnsignedMeshNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetOutputDistance == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionCallNode_GetInputFunctionID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NodeIterator_GetCurrent = (PLib3MFNodeIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_nodeiterator_getcurrent"); + #else // _WIN32 + pWrapperTable->m_NodeIterator_GetCurrent = (PLib3MFNodeIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_nodeiterator_getcurrent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NodeIterator_GetCurrent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetDisplayName = (PLib3MFFunction_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_function_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_Function_GetDisplayName = (PLib3MFFunction_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_function_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_SetDisplayName = (PLib3MFFunction_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_function_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_Function_SetDisplayName = (PLib3MFFunction_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_function_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_SetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_AddInput = (PLib3MFFunction_AddInputPtr) GetProcAddress(hLibrary, "lib3mf_function_addinput"); + #else // _WIN32 + pWrapperTable->m_Function_AddInput = (PLib3MFFunction_AddInputPtr) dlsym(hLibrary, "lib3mf_function_addinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_AddInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetInputs = (PLib3MFFunction_GetInputsPtr) GetProcAddress(hLibrary, "lib3mf_function_getinputs"); + #else // _WIN32 + pWrapperTable->m_Function_GetInputs = (PLib3MFFunction_GetInputsPtr) dlsym(hLibrary, "lib3mf_function_getinputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetInputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_RemoveInput = (PLib3MFFunction_RemoveInputPtr) GetProcAddress(hLibrary, "lib3mf_function_removeinput"); + #else // _WIN32 + pWrapperTable->m_Function_RemoveInput = (PLib3MFFunction_RemoveInputPtr) dlsym(hLibrary, "lib3mf_function_removeinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_RemoveInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_AddOutput = (PLib3MFFunction_AddOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_addoutput"); + #else // _WIN32 + pWrapperTable->m_Function_AddOutput = (PLib3MFFunction_AddOutputPtr) dlsym(hLibrary, "lib3mf_function_addoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_AddOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetOutputs = (PLib3MFFunction_GetOutputsPtr) GetProcAddress(hLibrary, "lib3mf_function_getoutputs"); + #else // _WIN32 + pWrapperTable->m_Function_GetOutputs = (PLib3MFFunction_GetOutputsPtr) dlsym(hLibrary, "lib3mf_function_getoutputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetOutputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_RemoveOutput = (PLib3MFFunction_RemoveOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_removeoutput"); + #else // _WIN32 + pWrapperTable->m_Function_RemoveOutput = (PLib3MFFunction_RemoveOutputPtr) dlsym(hLibrary, "lib3mf_function_removeoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_RemoveOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_FindInput = (PLib3MFFunction_FindInputPtr) GetProcAddress(hLibrary, "lib3mf_function_findinput"); + #else // _WIN32 + pWrapperTable->m_Function_FindInput = (PLib3MFFunction_FindInputPtr) dlsym(hLibrary, "lib3mf_function_findinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_FindInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_FindOutput = (PLib3MFFunction_FindOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_findoutput"); + #else // _WIN32 + pWrapperTable->m_Function_FindOutput = (PLib3MFFunction_FindOutputPtr) dlsym(hLibrary, "lib3mf_function_findoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_FindOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_GetIdentifier = (PLib3MFImplicitFunction_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_GetIdentifier = (PLib3MFImplicitFunction_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitfunction_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_SetIdentifier = (PLib3MFImplicitFunction_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_SetIdentifier = (PLib3MFImplicitFunction_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitfunction_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddNode = (PLib3MFImplicitFunction_AddNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddNode = (PLib3MFImplicitFunction_AddNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddSinNode = (PLib3MFImplicitFunction_AddSinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsinnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddSinNode = (PLib3MFImplicitFunction_AddSinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsinnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddSinNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddCosNode = (PLib3MFImplicitFunction_AddCosNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcosnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddCosNode = (PLib3MFImplicitFunction_AddCosNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcosnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddCosNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddTanNode = (PLib3MFImplicitFunction_AddTanNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtannode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddTanNode = (PLib3MFImplicitFunction_AddTanNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtannode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddTanNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcSinNode = (PLib3MFImplicitFunction_AddArcSinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarcsinnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcSinNode = (PLib3MFImplicitFunction_AddArcSinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarcsinnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetIdentifier == NULL) + if (pWrapperTable->m_ImplicitFunction_AddArcSinNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferencecount"); + pWrapperTable->m_ImplicitFunction_AddArcCosNode = (PLib3MFImplicitFunction_AddArcCosNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarccosnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getreferencecount"); + pWrapperTable->m_ImplicitFunction_AddArcCosNode = (PLib3MFImplicitFunction_AddArcCosNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarccosnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetReferenceCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddArcCosNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setreferences"); + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = (PLib3MFImplicitFunction_AddArcTan2NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarctan2node"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setreferences"); + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = (PLib3MFImplicitFunction_AddArcTan2NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarctan2node"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddArcTan2Node == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferences"); + pWrapperTable->m_ImplicitFunction_AddSinhNode = (PLib3MFImplicitFunction_AddSinhNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsinhnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getreferences"); + pWrapperTable->m_ImplicitFunction_AddSinhNode = (PLib3MFImplicitFunction_AddSinhNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsinhnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSinhNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferencecount"); + pWrapperTable->m_ImplicitFunction_AddCoshNode = (PLib3MFImplicitFunction_AddCoshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcoshnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferencecount"); + pWrapperTable->m_ImplicitFunction_AddCoshNode = (PLib3MFImplicitFunction_AddCoshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcoshnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetBallReferenceCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddCoshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setballreferences"); + pWrapperTable->m_ImplicitFunction_AddTanhNode = (PLib3MFImplicitFunction_AddTanhNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtanhnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setballreferences"); + pWrapperTable->m_ImplicitFunction_AddTanhNode = (PLib3MFImplicitFunction_AddTanhNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtanhnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetBallReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddTanhNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferences"); + pWrapperTable->m_ImplicitFunction_AddRoundNode = (PLib3MFImplicitFunction_AddRoundNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addroundnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferences"); + pWrapperTable->m_ImplicitFunction_AddRoundNode = (PLib3MFImplicitFunction_AddRoundNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addroundnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetBallReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddRoundNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddCeilNode = (PLib3MFImplicitFunction_AddCeilNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addceilnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddCeilNode = (PLib3MFImplicitFunction_AddCeilNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addceilnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddCeilNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddFloorNode = (PLib3MFImplicitFunction_AddFloorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfloornode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddFloorNode = (PLib3MFImplicitFunction_AddFloorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfloornode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFloorNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + pWrapperTable->m_ImplicitFunction_AddSignNode = (PLib3MFImplicitFunction_AddSignNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsignnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + pWrapperTable->m_ImplicitFunction_AddSignNode = (PLib3MFImplicitFunction_AddSignNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsignnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_AddMaterial == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSignNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_removematerial"); + pWrapperTable->m_ImplicitFunction_AddFractNode = (PLib3MFImplicitFunction_AddFractNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfractnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_removematerial"); + pWrapperTable->m_ImplicitFunction_AddFractNode = (PLib3MFImplicitFunction_AddFractNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfractnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_RemoveMaterial == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFractNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getname"); + pWrapperTable->m_ImplicitFunction_AddAbsNode = (PLib3MFImplicitFunction_AddAbsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addabsnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getname"); + pWrapperTable->m_ImplicitFunction_AddAbsNode = (PLib3MFImplicitFunction_AddAbsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addabsnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetName == NULL) + if (pWrapperTable->m_ImplicitFunction_AddAbsNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setname"); + pWrapperTable->m_ImplicitFunction_AddExpNode = (PLib3MFImplicitFunction_AddExpNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addexpnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setname"); + pWrapperTable->m_ImplicitFunction_AddExpNode = (PLib3MFImplicitFunction_AddExpNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addexpnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_SetName == NULL) + if (pWrapperTable->m_ImplicitFunction_AddExpNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLogNode = (PLib3MFImplicitFunction_AddLogNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlognode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLogNode = (PLib3MFImplicitFunction_AddLogNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlognode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_SetDisplayColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLogNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLog2Node = (PLib3MFImplicitFunction_AddLog2NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlog2node"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLog2Node = (PLib3MFImplicitFunction_AddLog2NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlog2node"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetDisplayColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLog2Node == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddLog10Node = (PLib3MFImplicitFunction_AddLog10NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlog10node"); #else // _WIN32 - pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddLog10Node = (PLib3MFImplicitFunction_AddLog10NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlog10node"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLog10Node == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddLengthNode = (PLib3MFImplicitFunction_AddLengthNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlengthnode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddLengthNode = (PLib3MFImplicitFunction_AddLengthNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlengthnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLengthNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_addcolor"); + pWrapperTable->m_ImplicitFunction_AddTransposeNode = (PLib3MFImplicitFunction_AddTransposeNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtransposenode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_addcolor"); + pWrapperTable->m_ImplicitFunction_AddTransposeNode = (PLib3MFImplicitFunction_AddTransposeNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtransposenode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_AddColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddTransposeNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_removecolor"); + pWrapperTable->m_ImplicitFunction_InverseNode = (PLib3MFImplicitFunction_InverseNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_inversenode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_removecolor"); + pWrapperTable->m_ImplicitFunction_InverseNode = (PLib3MFImplicitFunction_InverseNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_inversenode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_RemoveColor == NULL) + if (pWrapperTable->m_ImplicitFunction_InverseNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_setcolor"); + pWrapperTable->m_ImplicitFunction_AddSqrtNode = (PLib3MFImplicitFunction_AddSqrtNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsqrtnode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_setcolor"); + pWrapperTable->m_ImplicitFunction_AddSqrtNode = (PLib3MFImplicitFunction_AddSqrtNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsqrtnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_SetColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSqrtNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcolor"); + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = (PLib3MFImplicitFunction_AddResourceIdNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addresourceidnode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcolor"); + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = (PLib3MFImplicitFunction_AddResourceIdNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addresourceidnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddResourceIdNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddAdditionNode = (PLib3MFImplicitFunction_AddAdditionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addadditionnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddAdditionNode = (PLib3MFImplicitFunction_AddAdditionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addadditionnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddAdditionNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = (PLib3MFImplicitFunction_AddSubtractionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsubtractionnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = (PLib3MFImplicitFunction_AddSubtractionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsubtractionnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSubtractionNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = (PLib3MFImplicitFunction_AddMultiplicationNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmultiplicationnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = (PLib3MFImplicitFunction_AddMultiplicationNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmultiplicationnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_AddTex2Coord == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMultiplicationNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + pWrapperTable->m_ImplicitFunction_AddDivisionNode = (PLib3MFImplicitFunction_AddDivisionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddivisionnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + pWrapperTable->m_ImplicitFunction_AddDivisionNode = (PLib3MFImplicitFunction_AddDivisionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddivisionnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetTex2Coord == NULL) + if (pWrapperTable->m_ImplicitFunction_AddDivisionNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + pWrapperTable->m_ImplicitFunction_AddDotNode = (PLib3MFImplicitFunction_AddDotNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddotnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + pWrapperTable->m_ImplicitFunction_AddDotNode = (PLib3MFImplicitFunction_AddDotNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddotnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_RemoveTex2Coord == NULL) + if (pWrapperTable->m_ImplicitFunction_AddDotNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + pWrapperTable->m_ImplicitFunction_AddCrossNode = (PLib3MFImplicitFunction_AddCrossNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcrossnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + pWrapperTable->m_ImplicitFunction_AddCrossNode = (PLib3MFImplicitFunction_AddCrossNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcrossnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetTexture2D == NULL) + if (pWrapperTable->m_ImplicitFunction_AddCrossNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcount"); + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = (PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatvecmultiplicationnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) dlsym(hLibrary, "lib3mf_compositematerials_getcount"); + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = (PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatvecmultiplicationnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddMinNode = (PLib3MFImplicitFunction_AddMinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addminnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddMinNode = (PLib3MFImplicitFunction_AddMinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addminnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMinNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + pWrapperTable->m_ImplicitFunction_AddMaxNode = (PLib3MFImplicitFunction_AddMaxNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmaxnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + pWrapperTable->m_ImplicitFunction_AddMaxNode = (PLib3MFImplicitFunction_AddMaxNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmaxnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMaxNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_addcomposite"); + pWrapperTable->m_ImplicitFunction_AddFmodNode = (PLib3MFImplicitFunction_AddFmodNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfmodnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_addcomposite"); + pWrapperTable->m_ImplicitFunction_AddFmodNode = (PLib3MFImplicitFunction_AddFmodNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfmodnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_AddComposite == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFmodNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_removecomposite"); + pWrapperTable->m_ImplicitFunction_AddPowNode = (PLib3MFImplicitFunction_AddPowNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addpownode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_removecomposite"); + pWrapperTable->m_ImplicitFunction_AddPowNode = (PLib3MFImplicitFunction_AddPowNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addpownode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_RemoveComposite == NULL) + if (pWrapperTable->m_ImplicitFunction_AddPowNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcomposite"); + pWrapperTable->m_ImplicitFunction_AddSelectNode = (PLib3MFImplicitFunction_AddSelectNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addselectnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_getcomposite"); + pWrapperTable->m_ImplicitFunction_AddSelectNode = (PLib3MFImplicitFunction_AddSelectNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addselectnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetComposite == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSelectNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddClampNode = (PLib3MFImplicitFunction_AddClampNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addclampnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddClampNode = (PLib3MFImplicitFunction_AddClampNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addclampnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddClampNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = (PLib3MFImplicitFunction_AddComposeVectorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcomposevectornode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = (PLib3MFImplicitFunction_AddComposeVectorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcomposevectornode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddComposeVectorNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = (PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addvectorfromscalarnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = (PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addvectorfromscalarnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_AddMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = (PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddecomposevectornode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = (PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddecomposevectornode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_SetMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = (PLib3MFImplicitFunction_AddComposeMatrixNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcomposematrixnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = (PLib3MFImplicitFunction_AddComposeMatrixNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcomposematrixnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = (PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatrixfromrowsnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = (PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatrixfromrowsnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = (PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatrixfromcolumnsnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = (PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatrixfromcolumnsnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetLayerCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addlayer"); + pWrapperTable->m_ImplicitFunction_AddConstantNode = (PLib3MFImplicitFunction_AddConstantNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstantnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addlayer"); + pWrapperTable->m_ImplicitFunction_AddConstantNode = (PLib3MFImplicitFunction_AddConstantNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstantnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_AddLayer == NULL) + if (pWrapperTable->m_ImplicitFunction_AddConstantNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayer"); + pWrapperTable->m_ImplicitFunction_AddConstVecNode = (PLib3MFImplicitFunction_AddConstVecNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstvecnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayer"); + pWrapperTable->m_ImplicitFunction_AddConstVecNode = (PLib3MFImplicitFunction_AddConstVecNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstvecnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetLayer == NULL) + if (pWrapperTable->m_ImplicitFunction_AddConstVecNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removelayer"); + pWrapperTable->m_ImplicitFunction_AddConstMatNode = (PLib3MFImplicitFunction_AddConstMatNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstmatnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removelayer"); + pWrapperTable->m_ImplicitFunction_AddConstMatNode = (PLib3MFImplicitFunction_AddConstMatNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstmatnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_RemoveLayer == NULL) + if (pWrapperTable->m_ImplicitFunction_AddConstMatNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_getpath"); + pWrapperTable->m_ImplicitFunction_AddMeshNode = (PLib3MFImplicitFunction_AddMeshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmeshnode"); #else // _WIN32 - pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) dlsym(hLibrary, "lib3mf_attachment_getpath"); + pWrapperTable->m_ImplicitFunction_AddMeshNode = (PLib3MFImplicitFunction_AddMeshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmeshnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetPath == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMeshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_setpath"); + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = (PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addunsignedmeshnode"); #else // _WIN32 - pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) dlsym(hLibrary, "lib3mf_attachment_setpath"); + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = (PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addunsignedmeshnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_SetPath == NULL) + if (pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) GetProcAddress(hLibrary, "lib3mf_attachment_packagepart"); + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); #else // _WIN32 - pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) dlsym(hLibrary, "lib3mf_attachment_packagepart"); + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_PackagePart == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFunctionCallNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getrelationshiptype"); + pWrapperTable->m_ImplicitFunction_GetNodes = (PLib3MFImplicitFunction_GetNodesPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_getnodes"); #else // _WIN32 - pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_getrelationshiptype"); + pWrapperTable->m_ImplicitFunction_GetNodes = (PLib3MFImplicitFunction_GetNodesPtr) dlsym(hLibrary, "lib3mf_implicitfunction_getnodes"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetRelationShipType == NULL) + if (pWrapperTable->m_ImplicitFunction_GetNodes == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_setrelationshiptype"); + pWrapperTable->m_ImplicitFunction_RemoveNode = (PLib3MFImplicitFunction_RemoveNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_removenode"); #else // _WIN32 - pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_setrelationshiptype"); + pWrapperTable->m_ImplicitFunction_RemoveNode = (PLib3MFImplicitFunction_RemoveNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_removenode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_SetRelationShipType == NULL) + if (pWrapperTable->m_ImplicitFunction_RemoveNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetofile"); + pWrapperTable->m_ImplicitFunction_AddLink = (PLib3MFImplicitFunction_AddLinkPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlink"); #else // _WIN32 - pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) dlsym(hLibrary, "lib3mf_attachment_writetofile"); + pWrapperTable->m_ImplicitFunction_AddLink = (PLib3MFImplicitFunction_AddLinkPtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlink"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_WriteToFile == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLink == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromfile"); + pWrapperTable->m_ImplicitFunction_AddLinkByNames = (PLib3MFImplicitFunction_AddLinkByNamesPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlinkbynames"); #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) dlsym(hLibrary, "lib3mf_attachment_readfromfile"); + pWrapperTable->m_ImplicitFunction_AddLinkByNames = (PLib3MFImplicitFunction_AddLinkByNamesPtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlinkbynames"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromFile == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLinkByNames == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromcallback"); + pWrapperTable->m_ImplicitFunction_Clear = (PLib3MFImplicitFunction_ClearPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_clear"); #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) dlsym(hLibrary, "lib3mf_attachment_readfromcallback"); + pWrapperTable->m_ImplicitFunction_Clear = (PLib3MFImplicitFunction_ClearPtr) dlsym(hLibrary, "lib3mf_implicitfunction_clear"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromCallback == NULL) + if (pWrapperTable->m_ImplicitFunction_Clear == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getstreamsize"); + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = (PLib3MFImplicitFunction_SortNodesTopologicallyPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_sortnodestopologically"); #else // _WIN32 - pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) dlsym(hLibrary, "lib3mf_attachment_getstreamsize"); + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = (PLib3MFImplicitFunction_SortNodesTopologicallyPtr) dlsym(hLibrary, "lib3mf_implicitfunction_sortnodestopologically"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetStreamSize == NULL) + if (pWrapperTable->m_ImplicitFunction_SortNodesTopologically == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetobuffer"); + pWrapperTable->m_FunctionFromImage3D_GetImage3D = (PLib3MFFunctionFromImage3D_GetImage3DPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getimage3d"); #else // _WIN32 - pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) dlsym(hLibrary, "lib3mf_attachment_writetobuffer"); + pWrapperTable->m_FunctionFromImage3D_GetImage3D = (PLib3MFFunctionFromImage3D_GetImage3DPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getimage3d"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_WriteToBuffer == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetImage3D == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfrombuffer"); + pWrapperTable->m_FunctionFromImage3D_SetImage3D = (PLib3MFFunctionFromImage3D_SetImage3DPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setimage3d"); #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) dlsym(hLibrary, "lib3mf_attachment_readfrombuffer"); + pWrapperTable->m_FunctionFromImage3D_SetImage3D = (PLib3MFFunctionFromImage3D_SetImage3DPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setimage3d"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromBuffer == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetImage3D == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getattachment"); + pWrapperTable->m_FunctionFromImage3D_SetFilter = (PLib3MFFunctionFromImage3D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setfilter"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_getattachment"); + pWrapperTable->m_FunctionFromImage3D_SetFilter = (PLib3MFFunctionFromImage3D_SetFilterPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setfilter"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetAttachment == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetFilter == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setattachment"); + pWrapperTable->m_FunctionFromImage3D_GetFilter = (PLib3MFFunctionFromImage3D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getfilter"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_setattachment"); + pWrapperTable->m_FunctionFromImage3D_GetFilter = (PLib3MFFunctionFromImage3D_GetFilterPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getfilter"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetAttachment == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetFilter == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getcontenttype"); + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = (PLib3MFFunctionFromImage3D_SetTileStylesPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_settilestyles"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_getcontenttype"); + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = (PLib3MFFunctionFromImage3D_SetTileStylesPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_settilestyles"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetContentType == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetTileStyles == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setcontenttype"); + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = (PLib3MFFunctionFromImage3D_GetTileStylesPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_gettilestyles"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_setcontenttype"); + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = (PLib3MFFunctionFromImage3D_GetTileStylesPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_gettilestyles"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetContentType == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetTileStyles == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_GetOffset = (PLib3MFFunctionFromImage3D_GetOffsetPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getoffset"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_GetOffset = (PLib3MFFunctionFromImage3D_GetOffsetPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getoffset"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetTileStyleUV == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetOffset == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_settilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_SetOffset = (PLib3MFFunctionFromImage3D_SetOffsetPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setoffset"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_settilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_SetOffset = (PLib3MFFunctionFromImage3D_SetOffsetPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setoffset"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetTileStyleUV == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetOffset == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getfilter"); + pWrapperTable->m_FunctionFromImage3D_GetScale = (PLib3MFFunctionFromImage3D_GetScalePtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getscale"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_getfilter"); + pWrapperTable->m_FunctionFromImage3D_GetScale = (PLib3MFFunctionFromImage3D_GetScalePtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getscale"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetFilter == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetScale == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setfilter"); + pWrapperTable->m_FunctionFromImage3D_SetScale = (PLib3MFFunctionFromImage3D_SetScalePtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setscale"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_setfilter"); + pWrapperTable->m_FunctionFromImage3D_SetScale = (PLib3MFFunctionFromImage3D_SetScalePtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setscale"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetFilter == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetScale == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 @@ -3152,6 +5474,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetSliceStackByID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsetbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) dlsym(hLibrary, "lib3mf_model_getlevelsetbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLevelSetByID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_GetBuildUUID = (PLib3MFModel_GetBuildUUIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getbuilduuid"); #else // _WIN32 @@ -3287,6 +5618,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetSliceStacks == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetImage3Ds = (PLib3MFModel_GetImage3DsPtr) GetProcAddress(hLibrary, "lib3mf_model_getimage3ds"); + #else // _WIN32 + pWrapperTable->m_Model_GetImage3Ds = (PLib3MFModel_GetImage3DsPtr) dlsym(hLibrary, "lib3mf_model_getimage3ds"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetImage3Ds == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_MergeToModel = (PLib3MFModel_MergeToModelPtr) GetProcAddress(hLibrary, "lib3mf_model_mergetomodel"); #else // _WIN32 @@ -3296,6 +5636,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_MergeToModel == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_MergeFromModel = (PLib3MFModel_MergeFromModelPtr) GetProcAddress(hLibrary, "lib3mf_model_mergefrommodel"); + #else // _WIN32 + pWrapperTable->m_Model_MergeFromModel = (PLib3MFModel_MergeFromModelPtr) dlsym(hLibrary, "lib3mf_model_mergefrommodel"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_MergeFromModel == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_AddMeshObject = (PLib3MFModel_AddMeshObjectPtr) GetProcAddress(hLibrary, "lib3mf_model_addmeshobject"); #else // _WIN32 @@ -3377,6 +5726,24 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_AddMultiPropertyGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_AddImageStack = (PLib3MFModel_AddImageStackPtr) GetProcAddress(hLibrary, "lib3mf_model_addimagestack"); + #else // _WIN32 + pWrapperTable->m_Model_AddImageStack = (PLib3MFModel_AddImageStackPtr) dlsym(hLibrary, "lib3mf_model_addimagestack"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddImageStack == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetImageStackByID = (PLib3MFModel_GetImageStackByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getimagestackbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetImageStackByID = (PLib3MFModel_GetImageStackByIDPtr) dlsym(hLibrary, "lib3mf_model_getimagestackbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetImageStackByID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_AddBuildItem = (PLib3MFModel_AddBuildItemPtr) GetProcAddress(hLibrary, "lib3mf_model_addbuilditem"); #else // _WIN32 @@ -3521,6 +5888,69 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetKeyStore == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetFunctions = (PLib3MFModel_GetFunctionsPtr) GetProcAddress(hLibrary, "lib3mf_model_getfunctions"); + #else // _WIN32 + pWrapperTable->m_Model_GetFunctions = (PLib3MFModel_GetFunctionsPtr) dlsym(hLibrary, "lib3mf_model_getfunctions"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetFunctions == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddImplicitFunction = (PLib3MFModel_AddImplicitFunctionPtr) GetProcAddress(hLibrary, "lib3mf_model_addimplicitfunction"); + #else // _WIN32 + pWrapperTable->m_Model_AddImplicitFunction = (PLib3MFModel_AddImplicitFunctionPtr) dlsym(hLibrary, "lib3mf_model_addimplicitfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddImplicitFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddFunctionFromImage3D = (PLib3MFModel_AddFunctionFromImage3DPtr) GetProcAddress(hLibrary, "lib3mf_model_addfunctionfromimage3d"); + #else // _WIN32 + pWrapperTable->m_Model_AddFunctionFromImage3D = (PLib3MFModel_AddFunctionFromImage3DPtr) dlsym(hLibrary, "lib3mf_model_addfunctionfromimage3d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddFunctionFromImage3D == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddVolumeData = (PLib3MFModel_AddVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_model_addvolumedata"); + #else // _WIN32 + pWrapperTable->m_Model_AddVolumeData = (PLib3MFModel_AddVolumeDataPtr) dlsym(hLibrary, "lib3mf_model_addvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddLevelSet = (PLib3MFModel_AddLevelSetPtr) GetProcAddress(hLibrary, "lib3mf_model_addlevelset"); + #else // _WIN32 + pWrapperTable->m_Model_AddLevelSet = (PLib3MFModel_AddLevelSetPtr) dlsym(hLibrary, "lib3mf_model_addlevelset"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddLevelSet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetLevelSets = (PLib3MFModel_GetLevelSetsPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsets"); + #else // _WIN32 + pWrapperTable->m_Model_GetLevelSets = (PLib3MFModel_GetLevelSetsPtr) dlsym(hLibrary, "lib3mf_model_getlevelsets"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLevelSets == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_RemoveResource = (PLib3MFModel_RemoveResourcePtr) GetProcAddress(hLibrary, "lib3mf_model_removeresource"); + #else // _WIN32 + pWrapperTable->m_Model_RemoveResource = (PLib3MFModel_RemoveResourcePtr) dlsym(hLibrary, "lib3mf_model_removeresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_RemoveResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_GetLibraryVersion = (PLib3MFGetLibraryVersionPtr) GetProcAddress(hLibrary, "lib3mf_getlibraryversion"); #else // _WIN32 diff --git a/Autogenerated/Bindings/Go/lib3mf_dynamic.h b/Autogenerated/Bindings/Go/lib3mf_dynamic.h index 044c754bb..d7fcaf59a 100644 --- a/Autogenerated/Bindings/Go/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/Go/lib3mf_dynamic.h @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -562,6 +562,45 @@ typedef Lib3MFResult (*PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMate */ typedef Lib3MFResult (*PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr) (Lib3MF_MultiPropertyGroupIterator pMultiPropertyGroupIterator, Lib3MF_MultiPropertyGroup * pResource); +/************************************************************************************************************************* + Class definition for Image3DIterator +**************************************************************************************************************************/ + +/** +* Returns the Image3D the iterator points at. +* +* @param[in] pImage3DIterator - Image3DIterator instance. +* @param[out] pResource - returns the Image3D instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3DIterator_GetCurrentImage3DPtr) (Lib3MF_Image3DIterator pImage3DIterator, Lib3MF_Image3D * pResource); + +/************************************************************************************************************************* + Class definition for FunctionIterator +**************************************************************************************************************************/ + +/** +* Returns the Function the iterator points at. +* +* @param[in] pFunctionIterator - FunctionIterator instance. +* @param[out] pResource - returns the Function instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionIterator_GetCurrentFunctionPtr) (Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource); + +/************************************************************************************************************************* + Class definition for LevelSetIterator +**************************************************************************************************************************/ + +/** +* Returns the LevelSet the iterator points at. +* +* @param[in] pLevelSetIterator - LevelSetIterator instance. +* @param[out] pResource - returns the MeshObject instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) (Lib3MF_LevelSetIterator pLevelSetIterator, Lib3MF_LevelSet * pResource); + /************************************************************************************************************************* Class definition for MetaData **************************************************************************************************************************/ @@ -821,6 +860,15 @@ typedef Lib3MFResult (*PLib3MFObject_IsMeshObjectPtr) (Lib3MF_Object pObject, bo */ typedef Lib3MFResult (*PLib3MFObject_IsComponentsObjectPtr) (Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFObject_IsLevelSetObjectPtr) (Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. * @@ -1153,6 +1201,174 @@ typedef Lib3MFResult (*PLib3MFMeshObject_IsManifoldAndOrientedPtr) (Lib3MF_MeshO */ typedef Lib3MFResult (*PLib3MFMeshObject_BeamLatticePtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_BeamLattice * pTheBeamLattice); +/** +* Retrieves the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshObject_GetVolumeDataPtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshObject_SetVolumeDataPtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData pTheVolumeData); + +/************************************************************************************************************************* + Class definition for LevelSet +**************************************************************************************************************************/ + +/** +* Returns the function that is used as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetFunctionPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_Function * pTheFunction); + +/** +* Sets the function to use as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetFunctionPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_Function pTheFunction); + +/** +* Returns the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTransform - the transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetTransformPtr) (Lib3MF_LevelSet pLevelSet, sLib3MFTransform * pTransform); + +/** +* Sets the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetTransformPtr) (Lib3MF_LevelSet pLevelSet, const sLib3MFTransform * pTransform); + +/** +* Returns the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetChannelNamePtr) (Lib3MF_LevelSet pLevelSet, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); + +/** +* Sets the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pChannelName - new name of the function output channel +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetChannelNamePtr) (Lib3MF_LevelSet pLevelSet, const char * pChannelName); + +/** +* Sets the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMinFeatureSizePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double dMinFeatureSize); + +/** +* Returns the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMinFeatureSizePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double * pMinFeatureSize); + +/** +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dFallBackValue - fallback value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetFallBackValuePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double dFallBackValue); + +/** +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pFallBackValue - fallback value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetFallBackValuePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double * pFallBackValue); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshBBoxOnlyPtr) (Lib3MF_LevelSet pLevelSet, bool bMeshBBoxOnly); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshBBoxOnlyPtr) (Lib3MF_LevelSet pLevelSet, bool * pMeshBBoxOnly); + +/** +* Sets the mesh to use as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject pTheMesh); + +/** +* Returns the mesh that is used as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); + +/** +* Retrieves the VolumeData this Object. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheVolumeData - the VolumeData of this Object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this LevelSet. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData pTheVolumeData); + /************************************************************************************************************************* Class definition for BeamLattice **************************************************************************************************************************/ @@ -1383,784 +1599,3179 @@ typedef Lib3MFResult (*PLib3MFBeamLattice_AddBeamSetPtr) (Lib3MF_BeamLattice pBe typedef Lib3MFResult (*PLib3MFBeamLattice_GetBeamSetPtr) (Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet); /************************************************************************************************************************* - Class definition for Component + Class definition for FunctionReference **************************************************************************************************************************/ /** -* Returns the Resource Instance of the component. +* Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. * -* @param[in] pComponent - Component instance. -* @param[out] pObjectResource - filled with the Resource Instance. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourcePtr) (Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetFunctionResourceIDPtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 * pUniqueResourceID); /** -* Returns the UniqueResourceID of the component. +* Sets the UniqueResourceID to refer to. * -* @param[in] pComponent - Component instance. -* @param[out] pUniqueResourceID - returns the UniqueResourceID. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nUniqueResourceID - UniqueResourceID of the function * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourceIDPtr) (Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetFunctionResourceIDPtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 nUniqueResourceID); /** -* returns, whether a component has a UUID and, if true, the component's UUID +* Returns the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[out] pHasUUID - flag whether the component has a UUID -* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) -* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pTransform - the transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetUUIDPtr) (Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetTransformPtr) (Lib3MF_FunctionReference pFunctionReference, sLib3MFTransform * pTransform); /** -* sets the component's UUID +* Sets the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pTransform - new transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_SetUUIDPtr) (Lib3MF_Component pComponent, const char * pUUID); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetTransformPtr) (Lib3MF_FunctionReference pFunctionReference, const sLib3MFTransform * pTransform); /** -* Returns, if the component has a different transformation than the identity matrix +* Returns the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_HasTransformPtr) (Lib3MF_Component pComponent, bool * pHasTransform); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetChannelNamePtr) (Lib3MF_FunctionReference pFunctionReference, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); /** -* Returns the transformation matrix of the component. +* Sets the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pTransform - filled with the component transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pChannelName - new name of the function output channel * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetTransformPtr) (Lib3MF_Component pComponent, sLib3MFTransform * pTransform); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetChannelNamePtr) (Lib3MF_FunctionReference pFunctionReference, const char * pChannelName); /** -* Sets the transformation matrix of the component. +* Sets the minimal feature size as a hint for the function evaluator * -* @param[in] pComponent - Component instance. -* @param[in] pTransform - new transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_SetTransformPtr) (Lib3MF_Component pComponent, const sLib3MFTransform * pTransform); - -/************************************************************************************************************************* - Class definition for ComponentsObject -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFFunctionReference_SetMinFeatureSizePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dMinFeatureSize); /** -* Adds a new component to a components object. +* Returns the minimal feature size as a hint for the function evaluator * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] pObjectResource - object to add as component. Must not lead to circular references! -* @param[in] pTransform - optional transform matrix for the component. -* @param[out] pComponentInstance - new component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_AddComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetMinFeatureSizePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pMinFeatureSize); /** -* Retrieves a component from a component object. +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) -* @param[out] pComponentInstance - component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dFallBackValue - fallback value * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetFallBackValuePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dFallBackValue); /** -* Retrieves a component count of a component object. +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[out] pCount - returns the component count +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pFallBackValue - fallback value * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentCountPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetFallBackValuePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pFallBackValue); /************************************************************************************************************************* - Class definition for BeamSet + Class definition for VolumeDataColor **************************************************************************************************************************/ -/** -* Sets a beamset's name string -* -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pName - new name of the beamset. -* @return error code or 0 (success) -*/ -typedef Lib3MFResult (*PLib3MFBeamSet_SetNamePtr) (Lib3MF_BeamSet pBeamSet, const char * pName); +/************************************************************************************************************************* + Class definition for MaterialMapping +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for VolumeDataComposite +**************************************************************************************************************************/ /** -* Retrieves a beamset's name string +* Returns the BaseMaterialGroup used within this volume data item * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pBaseMaterialGroupInstance - The BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetNamePtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); /** -* Sets a beamset's identifier string +* Sets the BaseMaterialGroup to use within this volume data item. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pIdentifier - new name of the beamset. +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const char * pIdentifier); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance); /** -* Retrieves a beamset's identifier string +* Returns the number of material mappings of this VolumeDataComposite element * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) -* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pCount - the number of material mappings. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Retrieves the reference count of a beamset +* Returns MaterialMappting with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the reference count +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - Index of the MaterialMapping in question. +* @param[out] pTheMaterialMapping - MaterialMapping used in this element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Sets the references of a beamset +* Adds a the MaterialMapping * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pTransform - new transformation matrix +* @param[out] pTheMaterialMapping - The new MaterialMapping * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_AddMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, const sLib3MFTransform * pTransform, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Retrieves the references of a beamset +* Removes the MaterialMapping with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - The index of the MaterialMapping to be removed. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex); + +/************************************************************************************************************************* + Class definition for VolumeDataProperty +**************************************************************************************************************************/ /** -* Retrieves the ball reference count of a beamset +* Gets the qualified name of this property. * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the ball reference count +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] nPropertyNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pPropertyNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPropertyNameBuffer - buffer of The qualified name of this property., may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_GetNamePtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, const Lib3MF_uint32 nPropertyNameBufferSize, Lib3MF_uint32* pPropertyNameNeededChars, char * pPropertyNameBuffer); /** -* Sets the ball references of a beamset +* Sets whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_SetIsRequiredPtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, bool bIsRequired); /** -* Retrieves the ball references of a beamset +* Returns whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[out] pIsRequired - Is this property required to process this 3MF document instance? * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_IsRequiredPtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, bool * pIsRequired); /************************************************************************************************************************* - Class definition for BaseMaterialGroup + Class definition for VolumeData **************************************************************************************************************************/ /** -* Retrieves the count of base materials in the material group. +* Returns the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[out] pCount - returns the count of base materials. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - filled with the VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetCountPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeData_GetCompositePtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* returns all the PropertyIDs of all materials in this group +* Creates a new VolumeDataComposite for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - The new VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFVolumeData_CreateNewCompositePtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* Adds a new material to the material group +* Removes the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] pName - new name of the base material. -* @param[in] pDisplayColor - Display color of the material -* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_AddMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFVolumeData_RemoveCompositePtr) (Lib3MF_VolumeData pVolumeData); /** -* Removes a material from the material group. +* Returns the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheColorData - filled with the VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_RemoveMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFVolumeData_GetColorPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataColor * pTheColorData); /** -* Returns the base material's name +* Creates a new VolumeDataColor for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheColorData - The new VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +typedef Lib3MFResult (*PLib3MFVolumeData_CreateNewColorPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataColor * pTheColorData); /** -* Sets a base material's name +* Removes the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pName - new name of the base material. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); +typedef Lib3MFResult (*PLib3MFVolumeData_RemoveColorPtr) (Lib3MF_VolumeData pVolumeData); /** -* Sets a base material's display color. +* Returns the number of VolumeDataProperty * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyCountPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); /** -* Returns a base material's display color. +* Returns the VolumeDataProperty at a given Index * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[out] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be returned. +* @param[out] pTheVolumeDataProperty - the VolumeDataProperty at the given index. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Adds a new VolumeDataProperty from a Function +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pName - the qualified name (namespace+name) of the Property +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheVolumeDataProperty - the newly created VolumeDataProperty. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFVolumeData_AddPropertyFromFunctionPtr) (Lib3MF_VolumeData pVolumeData, const char * pName, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Removes the VolumeDataProperty with a given index +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFVolumeData_RemovePropertyPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex); /************************************************************************************************************************* - Class definition for ColorGroup + Class definition for Component **************************************************************************************************************************/ /** -* Retrieves the count of base materials in this Color Group. +* Returns the Resource Instance of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[out] pCount - returns the count of colors within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pObjectResource - filled with the Resource Instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetCountPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourcePtr) (Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); /** -* returns all the PropertyIDs of all colors within this group +* Returns the UniqueResourceID of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @param[in] pComponent - Component instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetAllPropertyIDsPtr) (Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourceIDPtr) (Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); /** -* Adds a new value. +* returns, whether a component has a UUID and, if true, the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] pTheColor - The new color -* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pHasUUID - flag whether the component has a UUID +* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) +* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_AddColorPtr) (Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFComponent_GetUUIDPtr) (Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); /** -* Removes a color from the color group. +* sets the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @param[in] pComponent - Component instance. +* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_RemoveColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFComponent_SetUUIDPtr) (Lib3MF_Component pComponent, const char * pUUID); /** -* Sets a color value. +* Returns, if the component has a different transformation than the identity matrix * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[in] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_SetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFComponent_HasTransformPtr) (Lib3MF_Component pComponent, bool * pHasTransform); /** -* Sets a color value. +* Returns the transformation matrix of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[out] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pTransform - filled with the component transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFComponent_GetTransformPtr) (Lib3MF_Component pComponent, sLib3MFTransform * pTransform); + +/** +* Sets the transformation matrix of the component. +* +* @param[in] pComponent - Component instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComponent_SetTransformPtr) (Lib3MF_Component pComponent, const sLib3MFTransform * pTransform); /************************************************************************************************************************* - Class definition for Texture2DGroup + Class definition for ComponentsObject **************************************************************************************************************************/ /** -* Retrieves the count of tex2coords in the Texture2DGroup. +* Adds a new component to a components object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pCount - returns the count of tex2coords. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] pObjectResource - object to add as component. Must not lead to circular references! +* @param[in] pTransform - optional transform matrix for the component. +* @param[out] pComponentInstance - new component instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetCountPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFComponentsObject_AddComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance); /** -* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* Retrieves a component from a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) +* @param[out] pComponentInstance - component instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); /** -* Adds a new tex2coord to the Texture2DGroup +* Retrieves a component count of a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. -* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[out] pCount - returns the component count * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_AddTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentCountPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); + +/************************************************************************************************************************* + Class definition for BeamSet +**************************************************************************************************************************/ /** -* Obtains a tex2coord to the Texture2DGroup +* Sets a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. -* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pName - new name of the beamset. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate); +typedef Lib3MFResult (*PLib3MFBeamSet_SetNamePtr) (Lib3MF_BeamSet pBeamSet, const char * pName); /** -* Removes a tex2coords from the Texture2DGroup. +* Retrieves a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_RemoveTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFBeamSet_GetNamePtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); /** -* Obtains the texture2D instance of this group. +* Sets a beamset's identifier string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pIdentifier - new name of the beamset. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTexture2DPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); +typedef Lib3MFResult (*PLib3MFBeamSet_SetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const char * pIdentifier); + +/** +* Retrieves a beamset's identifier string +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Retrieves the reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the reference count +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_SetReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the ball reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the ball reference count +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_SetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); + +/** +* Retrieves the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); /************************************************************************************************************************* - Class definition for CompositeMaterials + Class definition for BaseMaterialGroup **************************************************************************************************************************/ /** -* Retrieves the count of Composite-s in the CompositeMaterials. +* Retrieves the count of base materials in the material group. * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pCount - returns the count of Composite-s +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[out] pCount - returns the count of base materials. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCountPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetCountPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); /** -* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* returns all the PropertyIDs of all materials in this group * -* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new material to the material group +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] pName - new name of the base material. +* @param[in] pDisplayColor - Display color of the material +* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_AddMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a material from the material group. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_RemoveMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); + +/** +* Returns the base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* Sets a base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pName - new name of the base material. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); + +/** +* Sets a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); + +/** +* Returns a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[out] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); + +/************************************************************************************************************************* + Class definition for ColorGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of base materials in this Color Group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[out] pCount - returns the count of colors within this color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetCountPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all colors within this group +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetAllPropertyIDsPtr) (Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] pTheColor - The new color +* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_AddColorPtr) (Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a color from the color group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_RemoveColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[in] pTheColor - The color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_SetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[out] pTheColor - The color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); + +/************************************************************************************************************************* + Class definition for Texture2DGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of tex2coords in the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pCount - returns the count of tex2coords. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetCountPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_AddTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); + +/** +* Obtains a tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. +* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate); + +/** +* Removes a tex2coords from the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_RemoveTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); + +/** +* Obtains the texture2D instance of this group. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTexture2DPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); + +/************************************************************************************************************************* + Class definition for CompositeMaterials +**************************************************************************************************************************/ + +/** +* Retrieves the count of Composite-s in the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pCount - returns the count of Composite-s +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCountPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. * @param[in] nPropertyIDsBufferSize - Number of elements in buffer * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. * @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the Composite-Mixing Values in the CompositeMaterials. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); + +/** +* Adds a new Composite-Mixing Values to the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite +* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_AddCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_RemoveCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); + +/** +* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer); + +/************************************************************************************************************************* + Class definition for MultiPropertyGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the count of MultiProperty-s +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new MultiProperty to the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. +* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Sets the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Removes a MultiProperty from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); + +/** +* Retrieves the number of layers of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the number of layers +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup +* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); + +/** +* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried +* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer); + +/** +* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); + +/************************************************************************************************************************* + Class definition for Image3D +**************************************************************************************************************************/ + +/** +* returns the name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of the name of this Image3D, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_GetNamePtr) (Lib3MF_Image3D pImage3D, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* sets a new name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] pName - the new name of this Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_SetNamePtr) (Lib3MF_Image3D pImage3D, const char * pName); + +/** +* Retrieves, if this Image3D is a ImageStack +* +* @param[in] pImage3D - Image3D instance. +* @param[out] pIsImageStack - returns, whether the Image3D is an ImageStack +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_IsImageStackPtr) (Lib3MF_Image3D pImage3D, bool * pIsImageStack); + +/************************************************************************************************************************* + Class definition for ImageStack +**************************************************************************************************************************/ + +/** +* Retrieves the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pRowCount - number of rows +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetRowCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pRowCount); + +/** +* Sets the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nRowCount - number of rows +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetRowCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nRowCount); + +/** +* Retrieves the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pColumnCount - number of columns +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetColumnCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pColumnCount); + +/** +* Sets the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nColumnCount - number of columns +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetColumnCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nColumnCount); + +/** +* Retrieves the number of images in the stack. +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pSheetCount - number of images +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetSheetCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pSheetCount); + +/** +* Retrieves a sheet of the stack. Raises an error if sheet is not set. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetSheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pSheet); + +/** +* Sets a sheet to an existing attachment. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetSheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment pSheet); + +/** +* Creates a new sheet attachment with empty data. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateEmptySheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a memory buffer. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] nDataBufferSize - Number of elements in buffer +* @param[in] pDataBuffer - uint8 buffer of binary image data +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateSheetFromBufferPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a file on disk. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] pFileName - file name to read from +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateSheetFromFilePtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, const char * pFileName, Lib3MF_Attachment * pSheet); + +/************************************************************************************************************************* + Class definition for Attachment +**************************************************************************************************************************/ + +/** +* Retrieves an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetPathPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new path of the attachment. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_SetPathPtr) (Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Returns the PackagePart that is this attachment. +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pPackagePart - The PackagePart of this attachment. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_PackagePartPtr) (Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); + +/** +* Retrieves an attachment's relationship type +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's relationship type. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new relationship type string. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Writes out the attachment as file. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to write into. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to read from. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pTheReadCallback - Callback to call for reading a data chunk +* @param[in] nStreamSize - number of bytes the callback returns +* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. +* @param[in] pUserData - Userdata that is passed to the callback function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromCallbackPtr) (Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); + +/** +* Retrieves the size of the attachment stream +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pStreamSize - the stream size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); + +/** +* Writes out the attachment into a buffer +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); + +/** +* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromBufferPtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); + +/************************************************************************************************************************* + Class definition for Texture2D +**************************************************************************************************************************/ + +/** +* Retrieves the attachment located at the path of the texture. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); + +/** +* Sets the texture's package path to the path of the attachment. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pContentType - returns content type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eContentType - new Content Type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType); + +/** +* Retrieves a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pTileStyleU - returns tilestyle type enum. +* @param[out] pTileStyleV - returns tilestyle type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV); + +/** +* Sets a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eTileStyleU - new tilestyle type enum. +* @param[in] eTileStyleV - new tilestyle type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV); + +/** +* Retrieves a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pFilter - returns filter type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter); + +/** +* Sets a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eFilter - sets new filter type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter); + +/************************************************************************************************************************* + Class definition for ImplicitPort +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetIdentifierPtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetIdentifierPtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pIdentifier); + +/** +* Retrieves the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetDisplayNamePtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetDisplayNamePtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pDisplayName); + +/** +* Sets the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] eImplicitPortType - the type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetTypePtr) (Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType eImplicitPortType); + +/** +* Retrieves the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[out] pImplicitPortType - the type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetTypePtr) (Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType * pImplicitPortType); + +/** +* Retrieves the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nReferenceBufferSize - size of the buffer (including trailing 0) +* @param[out] pReferenceNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pReferenceBuffer - buffer of the reference, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetReferencePtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nReferenceBufferSize, Lib3MF_uint32* pReferenceNeededChars, char * pReferenceBuffer); + +/** +* Sets the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pReference - the reference +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetReferencePtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pReference); + +/************************************************************************************************************************* + Class definition for Iterator +**************************************************************************************************************************/ + +/** +* Iterates to the next item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasNext - Iterates to the next item in the list. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_MoveNextPtr) (Lib3MF_Iterator pIterator, bool * pHasNext); + +/** +* Iterates to the previous item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasPrevious - Iterates to the previous item in the list. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_MovePreviousPtr) (Lib3MF_Iterator pIterator, bool * pHasPrevious); + +/** +* Returns the number of items the iterator captures. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pCount - returns the number of items the iterator captures. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_CountPtr) (Lib3MF_Iterator pIterator, Lib3MF_uint64 * pCount); + +/************************************************************************************************************************* + Class definition for ImplicitPortIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pImplicitPortIterator - ImplicitPortIterator instance. +* @param[out] pPort - The current element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPortIterator_GetCurrentPtr) (Lib3MF_ImplicitPortIterator pImplicitPortIterator, Lib3MF_ImplicitPort * pPort); + +/************************************************************************************************************************* + Class definition for ImplicitNode +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetIdentifierPtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetIdentifierPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier); + +/** +* Retrieves the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetDisplayNamePtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetDisplayNamePtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pDisplayName); + +/** +* Retrieves the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nTagBufferSize - size of the buffer (including trailing 0) +* @param[out] pTagNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pTagBuffer - buffer of the tag, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetTagPtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nTagBufferSize, Lib3MF_uint32* pTagNeededChars, char * pTagBuffer); + +/** +* Sets the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pTag - the tag +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetTagPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pTag); + +/** +* Retrieves the type of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pType - the type of the node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetNodeTypePtr) (Lib3MF_ImplicitNode pImplicitNode, eLib3MFImplicitNodeType * pType); + +/** +* Add an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[out] pPort - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AddInputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator for the inputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetInputsPtr) (Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Add an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[out] pPort - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AddOutputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator the outputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetOutputsPtr) (Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Retrieves an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_FindInputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_FindOutputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/** +* Checks if the types of the input and output ports are valid for the node type +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pValid - true, if the types are valid +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AreTypesValidPtr) (Lib3MF_ImplicitNode pImplicitNode, bool * pValid); + +/************************************************************************************************************************* + Class definition for OneInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pInput - the input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFOneInputNode_GetInputAPtr) (Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves the output +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFOneInputNode_GetOutputResultPtr) (Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for SinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcSinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcCosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SinhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CoshNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for RoundNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CeilNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FloorNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SignNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FractNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for AbsNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ExpNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LogNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log10Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LengthNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TransposeNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for InverseNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SqrtNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ResourceIdNode +**************************************************************************************************************************/ + +/** +* Sets the Resource that the resourceid attribute of the node will point to +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[in] pResource - the resource +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_SetResourcePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource pResource); + +/** +* Retrieves the resource of the node +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pResource - the resource +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_GetResourcePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource * pResource); + +/** +* Retrieves the output +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_GetOutputValuePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for TwoInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pTwoInputNode - TwoInputNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTwoInputNode_GetInputBPtr) (Lib3MF_TwoInputNode pTwoInputNode, Lib3MF_ImplicitPort * pB); + +/************************************************************************************************************************* + Class definition for AdditionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SubtractionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DivisionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DotNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CrossNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTan2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MatVecMultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MaxNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FmodNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ModNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for PowNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SelectNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputBPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pB); + +/** +* Retrieves the third input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pC - the third input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputCPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pC); + +/** +* Retrieves the fourth input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pD - the fourth input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputDPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pD); + +/************************************************************************************************************************* + Class definition for ClampNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the lower limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMin - the input for the lower limit +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFClampNode_GetInputMinPtr) (Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMin); + +/** +* Retrieves the input for the upper limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMax - the input for the upper limit +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFClampNode_GetInputMaxPtr) (Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMax); + +/************************************************************************************************************************* + Class definition for ComposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the x component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pX - the input for the x component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputXPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the input for the y component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pY - the input for the y component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputYPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the input for the z component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pZ - the input for the z component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputZPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/** +* Retrieves the output +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetOutputResultPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for VectorFromScalarNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DecomposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pA - the input port for the vector to decompose +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetInputAPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pA); + +/** +* Retrieves the output for the x component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pX - the output for the x component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputXPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the output for the y component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pY - the output for the y component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputYPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the output for the z component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pZ - the output for the z component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputZPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/************************************************************************************************************************* + Class definition for ComposeMatrixNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the element 0 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM00 - the input for the m00 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM00Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM00); + +/** +* Retrieves the input for the element 0 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM01 - the input for the m01 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM01Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM01); + +/** +* Retrieves the input for the element 0 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM02 - the input for the m02 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM02Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM02); + +/** +* Retrieves the input for the element 0 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM03 - the input for the m03 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM03Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM03); + +/** +* Retrieves the input for the element 1 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM10 - the input for the m10 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM10Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM10); + +/** +* Retrieves the input for the element 1 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM11 - the input for the m11 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM11Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM11); + +/** +* Retrieves the input for the element 1 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM12 - the input for the m12 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM12Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM12); + +/** +* Retrieves the input for the element 1 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM13 - the input for the m3 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM13Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM13); + +/** +* Retrieves the input for the element 2 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM20 - the input for the m2 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM20Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM20); + +/** +* Retrieves the input for the element 2 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM21 - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM21Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM21); + +/** +* Retrieves the input for the element 2 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM22 - the input for the m22 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM22Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM22); + +/** +* Retrieves the input for the element 2 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM23 - the input for the m23 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM23Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM23); + +/** +* Retrieves the input for the element 3 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM30 - the input for the m30 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM30Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM30); + +/** +* Retrieves the input for the element 3 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM31 - the input for the m31 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM31Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM31); + +/** +* Retrieves the input for the element 3 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM32 - the input for the m32 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM32Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM32); + +/** +* Retrieves the input for the element 3 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM33 - the input for the m33 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM33Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM33); + +/** +* Retrieves the output +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetOutputResultPtr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromRowsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow0 - the input for the first row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputAPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow0); + +/** +* Retrieves the input for the second row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow1 - the input for the second row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputBPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow1); + +/** +* Retrieves the input for the third row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow2 - the input for the third row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputCPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow2); + +/** +* Retrieves the input for the fourth row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow3 - the input for the fourth row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputDPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetOutputResultPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromColumnsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn0 - the input for the first column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputAPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn0); + +/** +* Retrieves the input for the second column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn1 - the input for the second column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputBPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn1); + +/** +* Retrieves the input for the third column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn2 - the input for the third column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputCPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn2); + +/** +* Retrieves the input for the fourth column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn3 - the input for the fourth column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputDPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for ConstantNode +**************************************************************************************************************************/ + +/** +* Sets the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[in] dValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_SetConstantPtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_double dValue); + +/** +* Retrieves the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_GetConstantPtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_double * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_GetOutputValuePtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for ConstVecNode +**************************************************************************************************************************/ + +/** +* Sets the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_SetVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, const sLib3MFVector * pValue); + +/** +* Retrieves the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_GetVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, sLib3MFVector * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pVector - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_GetOutputVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, Lib3MF_ImplicitPort * pVector); + +/************************************************************************************************************************* + Class definition for ConstMatNode +**************************************************************************************************************************/ + +/** +* Sets the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_SetMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, const sLib3MFMatrix4x4 * pValue); + +/** +* Retrieves the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pValue - the matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_GetMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, sLib3MFMatrix4x4 * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pMatrix - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_GetOutputMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, Lib3MF_ImplicitPort * pMatrix); + +/************************************************************************************************************************* + Class definition for MeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetInputMeshPtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetInputPosPtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pDistance - the output port for the signed distance to the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetOutputDistancePtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for UnsignedMeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputMeshPtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputPosPtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pDistance - the output port for the unsigned distance to the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetOutputDistancePtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for FunctionCallNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionCallNode - FunctionCallNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionCallNode_GetInputFunctionIDPtr) (Lib3MF_FunctionCallNode pFunctionCallNode, Lib3MF_ImplicitPort * pFunction); + +/************************************************************************************************************************* + Class definition for NodeIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pNodeIterator - NodeIterator instance. +* @param[out] pNode - The current element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNodeIterator_GetCurrentPtr) (Lib3MF_NodeIterator pNodeIterator, Lib3MF_ImplicitNode * pNode); + +/************************************************************************************************************************* + Class definition for Function +**************************************************************************************************************************/ + +/** +* Retrieves the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetDisplayNamePtr) (Lib3MF_Function pFunction, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_SetDisplayNamePtr) (Lib3MF_Function pFunction, const char * pDisplayName); + +/** +* Add an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_AddInputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the list of inputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetInputsPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an input +* +* @param[in] pFunction - Function instance. +* @param[in] pInput - The input to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_RemoveInputPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPort pInput); + +/** +* Add an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_AddOutputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the outputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetOutputsPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an output +* +* @param[in] pFunction - Function instance. +* @param[in] pOutput - The output to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_RemoveOutputPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPort pOutput); + +/** +* Retrieves an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_FindInputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_FindOutputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/************************************************************************************************************************* + Class definition for ImplicitFunction +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_GetIdentifierPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_SetIdentifierPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier); + +/** +* Add a node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] eNodeType - the type of the node +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, eLib3MFImplicitNodeType eNodeType, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ImplicitNode * pNode); + +/** +* Add a SinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinNode * pNode); + +/** +* Add a CosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCosNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CosNode * pNode); + +/** +* Add a TanNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTanNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanNode * pNode); + +/** +* Add a ArcSinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcSinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcSinNode * pNode); + +/** +* Add a ArcCosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcCosNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcCosNode * pNode); + +/** +* Add a ArcTan2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcTan2NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcTan2Node * pNode); + +/** +* Add a SinhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSinhNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinhNode * pNode); + +/** +* Add a CoshNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCoshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CoshNode * pNode); + +/** +* Add a TanhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTanhNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanhNode * pNode); + +/** +* Add a RoundNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddRoundNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_RoundNode * pNode); + +/** +* Add a CeilNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCeilNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CeilNode * pNode); + +/** +* Add a FloorNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFloorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FloorNode * pNode); + +/** +* Add a SignNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSignNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SignNode * pNode); + +/** +* Add a FractNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFractNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FractNode * pNode); + +/** +* Add a AbsNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddAbsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AbsNode * pNode); + +/** +* Add a ExpNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddExpNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ExpNode * pNode); + +/** +* Add a LogNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLogNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_LogNode * pNode); + +/** +* Add a Log2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLog2NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log2Node * pNode); + +/** +* Add a Log10Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLog10NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log10Node * pNode); + +/** +* Add a LengthNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLengthNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_LengthNode * pNode); + +/** +* Add a TransposeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTransposeNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TransposeNode * pNode); + +/** +* Add a InverseNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_InverseNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_InverseNode * pNode); + +/** +* Add a SqrtNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSqrtNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SqrtNode * pNode); + +/** +* Add a ResourceIdNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddResourceIdNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ResourceIdNode * pNode); + +/** +* Add an AdditionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddAdditionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AdditionNode * pNode); + +/** +* Add a SubtractionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSubtractionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SubtractionNode * pNode); + +/** +* Add a MultiplicationNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMultiplicationNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MultiplicationNode * pNode); + +/** +* Add a DivisionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDivisionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_DivisionNode * pNode); + +/** +* Add a DotNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDotNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DotNode * pNode); + +/** +* Add a CrossNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCrossNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_CrossNode * pNode); /** -* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* Add a MatVecMultiplicationNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatVecMultiplicationNode * pNode); /** -* Adds a new Composite-Mixing Values to the CompositeMaterials. +* Add a MinNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite -* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_AddCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MinNode * pNode); /** -* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* Add a MaxNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_RemoveCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMaxNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MaxNode * pNode); /** -* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* Add a FmodNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer); - -/************************************************************************************************************************* - Class definition for MultiPropertyGroup -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFmodNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FmodNode * pNode); /** -* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* Add a PowNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the count of MultiProperty-s +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddPowNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_PowNode * pNode); /** -* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* Add a SelectNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSelectNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SelectNode * pNode); /** -* Adds a new MultiProperty to the MultiPropertyGroup. +* Add a ClampNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. -* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddClampNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ClampNode * pNode); /** -* Sets the PropertyIDs of a MultiProperty. +* Add a ComposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddComposeVectorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeVectorNode * pNode); /** -* Obtains the PropertyIDs of a MultiProperty. +* Add a VectorFromScalar * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_VectorFromScalarNode * pNode); /** -* Removes a MultiProperty from this MultiPropertyGroup. +* Add a DecomposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DecomposeVectorNode * pNode); /** -* Retrieves the number of layers of this MultiPropertyGroup. +* Add a ComposeMatrixNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the number of layers +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddComposeMatrixNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeMatrixNode * pNode); /** -* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* Add a MatrixFromRowsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup -* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromRowsNode * pNode); /** -* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* Add a MatrixFromColumnsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried -* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromColumnsNode * pNode); /** -* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* Add a ConstantNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); - -/************************************************************************************************************************* - Class definition for Attachment -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstantNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstantNode * pNode); /** -* Retrieves an attachment's package path. This function will be removed in a later release. +* Add a ConstVecNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetPathPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstVecNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstVecNode * pNode); /** -* Sets an attachment's package path. This function will be removed in a later release. +* Add a ConstMatNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new path of the attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_SetPathPtr) (Lib3MF_Attachment pAttachment, const char * pPath); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstMatNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstMatNode * pNode); /** -* Returns the PackagePart that is this attachment. +* Add a MeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[out] pPackagePart - The PackagePart of this attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_PackagePartPtr) (Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MeshNode * pNode); /** -* Retrieves an attachment's relationship type +* Add a UnsignedMeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); /** -* Sets an attachment's relationship type. +* Add a FunctionCallNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new relationship type string. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const char * pPath); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFunctionCallNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode); /** -* Writes out the attachment as file. +* Retrieves the nodes * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to write into. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[out] pIterator - iterator for the list of nodes * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); +typedef Lib3MFResult (*PLib3MFImplicitFunction_GetNodesPtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_NodeIterator * pIterator); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Removes a node * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to read from. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pNode - The node to be removed * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); +typedef Lib3MFResult (*PLib3MFImplicitFunction_RemoveNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitNode pNode); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[in] pTheReadCallback - Callback to call for reading a data chunk -* @param[in] nStreamSize - number of bytes the callback returns -* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. -* @param[in] pUserData - Userdata that is passed to the callback function +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - the source port +* @param[in] pTarget - the target port * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromCallbackPtr) (Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLinkPtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitPort pSource, Lib3MF_ImplicitPort pTarget); /** -* Retrieves the size of the attachment stream +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[out] pStreamSize - the stream size +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - name of the source port in the format nodename.portname +* @param[in] pTarget - name of the target port in the format nodename.portname * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLinkByNamesPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pSource, const char * pTarget); /** -* Writes out the attachment into a buffer +* Clears the function * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_ClearPtr) (Lib3MF_ImplicitFunction pImplicitFunction); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Sorts the nodes topologically * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromBufferPtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_SortNodesTopologicallyPtr) (Lib3MF_ImplicitFunction pImplicitFunction); /************************************************************************************************************************* - Class definition for Texture2D + Class definition for FunctionFromImage3D **************************************************************************************************************************/ /** -* Retrieves the attachment located at the path of the texture. +* Returns the selected 3D image. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pImage3D - image instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetImage3DPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D * pImage3D); /** -* Sets the texture's package path to the path of the attachment. +* Sets the 3D image of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] pImage3D - image instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetImage3DPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D pImage3D); /** -* Retrieves a texture's content type. +* Sets the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pContentType - returns content type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eFilter - texture filter * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetFilterPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter eFilter); /** -* Retrieves a texture's content type. +* Returns the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eContentType - new Content Type +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pFilter - texture filter * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetFilterPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter * pFilter); /** -* Retrieves a texture's tilestyle type. +* Sets the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pTileStyleU - returns tilestyle type enum. -* @param[out] pTileStyleV - returns tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eTileStyleU - tile style in U +* @param[in] eTileStyleV - tile style in V +* @param[in] eTileStyleW - tile style in W * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetTileStylesPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV, eLib3MFTextureTileStyle eTileStyleW); /** -* Sets a texture's tilestyle type. +* Retrieves the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eTileStyleU - new tilestyle type enum. -* @param[in] eTileStyleV - new tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pTileStyleU - tile style in U +* @param[out] pTileStyleV - tile style in V +* @param[out] pTileStyleW - tile style in W * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetTileStylesPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV, eLib3MFTextureTileStyle * pTileStyleW); /** -* Retrieves a texture's filter type. +* returns the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pFilter - returns filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetOffsetPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pOffset); /** -* Sets a texture's filter type. +* Sets the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eFilter - sets new filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetOffsetPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dOffset); + +/** +* returns the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetScalePtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pScale); + +/** +* Sets the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetScalePtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dScale); /************************************************************************************************************************* Class definition for BuildItem @@ -3132,6 +5743,16 @@ typedef Lib3MFResult (*PLib3MFModel_GetColorGroupByIDPtr) (Lib3MF_Model pModel, */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -3270,6 +5891,15 @@ typedef Lib3MFResult (*PLib3MFModel_GetMultiPropertyGroupsPtr) (Lib3MF_Model pMo */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStacksPtr) (Lib3MF_Model pModel, Lib3MF_SliceStackIterator * pResourceIterator); +/** +* creates a resource iterator instance with all image3d resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetImage3DsPtr) (Lib3MF_Model pModel, Lib3MF_Image3DIterator * pResourceIterator); + /** * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. * @@ -3279,6 +5909,15 @@ typedef Lib3MFResult (*PLib3MFModel_GetSliceStacksPtr) (Lib3MF_Model pModel, Lib */ typedef Lib3MFResult (*PLib3MFModel_MergeToModelPtr) (Lib3MF_Model pModel, Lib3MF_Model * pMergedModelInstance); +/** +* Merges the given model into this model. +* +* @param[in] pModel - Model instance. +* @param[in] pModelInstance - model to be merged +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_MergeFromModelPtr) (Lib3MF_Model pModel, Lib3MF_Model pModelInstance); + /** * adds an empty mesh object to the model. * @@ -3364,6 +6003,28 @@ typedef Lib3MFResult (*PLib3MFModel_AddCompositeMaterialsPtr) (Lib3MF_Model pMod */ typedef Lib3MFResult (*PLib3MFModel_AddMultiPropertyGroupPtr) (Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance); +/** +* creates a new 3D Image Resource +* +* @param[in] pModel - Model instance. +* @param[in] nColumnCount - the number of columns in each sheet. +* @param[in] nRowCount - the number of rows in each sheet. +* @param[in] nSheetCount - the number of sheets in the image stack. +* @param[out] pInstance - returns the new ImageStack instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddImageStackPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nColumnCount, Lib3MF_uint32 nRowCount, Lib3MF_uint32 nSheetCount, Lib3MF_ImageStack * pInstance); + +/** +* finds an ImageStack object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pImageStackInstance - returns the image stack instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetImageStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ImageStack * pImageStackInstance); + /** * adds a build item to the model. * @@ -3515,6 +6176,70 @@ typedef Lib3MFResult (*PLib3MFModel_SetRandomNumberCallbackPtr) (Lib3MF_Model pM */ typedef Lib3MFResult (*PLib3MFModel_GetKeyStorePtr) (Lib3MF_Model pModel, Lib3MF_KeyStore * pKeyStore); +/** +* creates a resource iterator for all functions +* +* @param[in] pModel - Model instance. +* @param[out] pTheResourceIterator - returns the resource iterator +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetFunctionsPtr) (Lib3MF_Model pModel, Lib3MF_FunctionIterator * pTheResourceIterator); + +/** +* adds a function described by nodes to the model +* +* @param[in] pModel - Model instance. +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddImplicitFunctionPtr) (Lib3MF_Model pModel, Lib3MF_ImplicitFunction * pFunctionInstance); + +/** +* adds a function defined by an image3d to the model +* +* @param[in] pModel - Model instance. +* @param[in] pImage3DInstance - the Image3D-instance used for this function +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddFunctionFromImage3DPtr) (Lib3MF_Model pModel, Lib3MF_Image3D pImage3DInstance, Lib3MF_FunctionFromImage3D * pFunctionInstance); + +/** +* adds a volume data resource to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pVolumeDataInstance - returns the new volume data instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddVolumeDataPtr) (Lib3MF_Model pModel, Lib3MF_VolumeData * pVolumeDataInstance); + +/** +* adds an empty boundary shape object to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pLevelSetInstance - returns the mesh object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddLevelSetPtr) (Lib3MF_Model pModel, Lib3MF_LevelSet * pLevelSetInstance); + +/** +* creates a resource iterator instance with all boundary shape resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetsPtr) (Lib3MF_Model pModel, Lib3MF_LevelSetIterator * pResourceIterator); + +/** +* Removes a resource from the model +* +* @param[in] pModel - Model instance. +* @param[in] pResource - The resource to remove +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_RemoveResourcePtr) (Lib3MF_Model pModel, Lib3MF_Resource pResource); + /************************************************************************************************************************* Global functions **************************************************************************************************************************/ @@ -3767,6 +6492,9 @@ typedef struct { PLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupPtr m_Texture2DGroupIterator_GetCurrentTexture2DGroup; PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsPtr m_CompositeMaterialsIterator_GetCurrentCompositeMaterials; PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup; + PLib3MFImage3DIterator_GetCurrentImage3DPtr m_Image3DIterator_GetCurrentImage3D; + PLib3MFFunctionIterator_GetCurrentFunctionPtr m_FunctionIterator_GetCurrentFunction; + PLib3MFLevelSetIterator_GetCurrentLevelSetPtr m_LevelSetIterator_GetCurrentLevelSet; PLib3MFMetaData_GetNameSpacePtr m_MetaData_GetNameSpace; PLib3MFMetaData_SetNameSpacePtr m_MetaData_SetNameSpace; PLib3MFMetaData_GetNamePtr m_MetaData_GetName; @@ -3792,6 +6520,7 @@ typedef struct { PLib3MFObject_SetPartNumberPtr m_Object_SetPartNumber; PLib3MFObject_IsMeshObjectPtr m_Object_IsMeshObject; PLib3MFObject_IsComponentsObjectPtr m_Object_IsComponentsObject; + PLib3MFObject_IsLevelSetObjectPtr m_Object_IsLevelSetObject; PLib3MFObject_IsValidPtr m_Object_IsValid; PLib3MFObject_SetAttachmentAsThumbnailPtr m_Object_SetAttachmentAsThumbnail; PLib3MFObject_GetThumbnailAttachmentPtr m_Object_GetThumbnailAttachment; @@ -3826,6 +6555,24 @@ typedef struct { PLib3MFMeshObject_SetGeometryPtr m_MeshObject_SetGeometry; PLib3MFMeshObject_IsManifoldAndOrientedPtr m_MeshObject_IsManifoldAndOriented; PLib3MFMeshObject_BeamLatticePtr m_MeshObject_BeamLattice; + PLib3MFMeshObject_GetVolumeDataPtr m_MeshObject_GetVolumeData; + PLib3MFMeshObject_SetVolumeDataPtr m_MeshObject_SetVolumeData; + PLib3MFLevelSet_GetFunctionPtr m_LevelSet_GetFunction; + PLib3MFLevelSet_SetFunctionPtr m_LevelSet_SetFunction; + PLib3MFLevelSet_GetTransformPtr m_LevelSet_GetTransform; + PLib3MFLevelSet_SetTransformPtr m_LevelSet_SetTransform; + PLib3MFLevelSet_GetChannelNamePtr m_LevelSet_GetChannelName; + PLib3MFLevelSet_SetChannelNamePtr m_LevelSet_SetChannelName; + PLib3MFLevelSet_SetMinFeatureSizePtr m_LevelSet_SetMinFeatureSize; + PLib3MFLevelSet_GetMinFeatureSizePtr m_LevelSet_GetMinFeatureSize; + PLib3MFLevelSet_SetFallBackValuePtr m_LevelSet_SetFallBackValue; + PLib3MFLevelSet_GetFallBackValuePtr m_LevelSet_GetFallBackValue; + PLib3MFLevelSet_SetMeshBBoxOnlyPtr m_LevelSet_SetMeshBBoxOnly; + PLib3MFLevelSet_GetMeshBBoxOnlyPtr m_LevelSet_GetMeshBBoxOnly; + PLib3MFLevelSet_SetMeshPtr m_LevelSet_SetMesh; + PLib3MFLevelSet_GetMeshPtr m_LevelSet_GetMesh; + PLib3MFLevelSet_GetVolumeDataPtr m_LevelSet_GetVolumeData; + PLib3MFLevelSet_SetVolumeDataPtr m_LevelSet_SetVolumeData; PLib3MFBeamLattice_GetMinLengthPtr m_BeamLattice_GetMinLength; PLib3MFBeamLattice_SetMinLengthPtr m_BeamLattice_SetMinLength; PLib3MFBeamLattice_GetClippingPtr m_BeamLattice_GetClipping; @@ -3849,6 +6596,35 @@ typedef struct { PLib3MFBeamLattice_GetBeamSetCountPtr m_BeamLattice_GetBeamSetCount; PLib3MFBeamLattice_AddBeamSetPtr m_BeamLattice_AddBeamSet; PLib3MFBeamLattice_GetBeamSetPtr m_BeamLattice_GetBeamSet; + PLib3MFFunctionReference_GetFunctionResourceIDPtr m_FunctionReference_GetFunctionResourceID; + PLib3MFFunctionReference_SetFunctionResourceIDPtr m_FunctionReference_SetFunctionResourceID; + PLib3MFFunctionReference_GetTransformPtr m_FunctionReference_GetTransform; + PLib3MFFunctionReference_SetTransformPtr m_FunctionReference_SetTransform; + PLib3MFFunctionReference_GetChannelNamePtr m_FunctionReference_GetChannelName; + PLib3MFFunctionReference_SetChannelNamePtr m_FunctionReference_SetChannelName; + PLib3MFFunctionReference_SetMinFeatureSizePtr m_FunctionReference_SetMinFeatureSize; + PLib3MFFunctionReference_GetMinFeatureSizePtr m_FunctionReference_GetMinFeatureSize; + PLib3MFFunctionReference_SetFallBackValuePtr m_FunctionReference_SetFallBackValue; + PLib3MFFunctionReference_GetFallBackValuePtr m_FunctionReference_GetFallBackValue; + PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr m_VolumeDataComposite_GetBaseMaterialGroup; + PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr m_VolumeDataComposite_SetBaseMaterialGroup; + PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr m_VolumeDataComposite_GetMaterialMappingCount; + PLib3MFVolumeDataComposite_GetMaterialMappingPtr m_VolumeDataComposite_GetMaterialMapping; + PLib3MFVolumeDataComposite_AddMaterialMappingPtr m_VolumeDataComposite_AddMaterialMapping; + PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr m_VolumeDataComposite_RemoveMaterialMapping; + PLib3MFVolumeDataProperty_GetNamePtr m_VolumeDataProperty_GetName; + PLib3MFVolumeDataProperty_SetIsRequiredPtr m_VolumeDataProperty_SetIsRequired; + PLib3MFVolumeDataProperty_IsRequiredPtr m_VolumeDataProperty_IsRequired; + PLib3MFVolumeData_GetCompositePtr m_VolumeData_GetComposite; + PLib3MFVolumeData_CreateNewCompositePtr m_VolumeData_CreateNewComposite; + PLib3MFVolumeData_RemoveCompositePtr m_VolumeData_RemoveComposite; + PLib3MFVolumeData_GetColorPtr m_VolumeData_GetColor; + PLib3MFVolumeData_CreateNewColorPtr m_VolumeData_CreateNewColor; + PLib3MFVolumeData_RemoveColorPtr m_VolumeData_RemoveColor; + PLib3MFVolumeData_GetPropertyCountPtr m_VolumeData_GetPropertyCount; + PLib3MFVolumeData_GetPropertyPtr m_VolumeData_GetProperty; + PLib3MFVolumeData_AddPropertyFromFunctionPtr m_VolumeData_AddPropertyFromFunction; + PLib3MFVolumeData_RemovePropertyPtr m_VolumeData_RemoveProperty; PLib3MFComponent_GetObjectResourcePtr m_Component_GetObjectResource; PLib3MFComponent_GetObjectResourceIDPtr m_Component_GetObjectResourceID; PLib3MFComponent_GetUUIDPtr m_Component_GetUUID; @@ -3905,6 +6681,19 @@ typedef struct { PLib3MFMultiPropertyGroup_AddLayerPtr m_MultiPropertyGroup_AddLayer; PLib3MFMultiPropertyGroup_GetLayerPtr m_MultiPropertyGroup_GetLayer; PLib3MFMultiPropertyGroup_RemoveLayerPtr m_MultiPropertyGroup_RemoveLayer; + PLib3MFImage3D_GetNamePtr m_Image3D_GetName; + PLib3MFImage3D_SetNamePtr m_Image3D_SetName; + PLib3MFImage3D_IsImageStackPtr m_Image3D_IsImageStack; + PLib3MFImageStack_GetRowCountPtr m_ImageStack_GetRowCount; + PLib3MFImageStack_SetRowCountPtr m_ImageStack_SetRowCount; + PLib3MFImageStack_GetColumnCountPtr m_ImageStack_GetColumnCount; + PLib3MFImageStack_SetColumnCountPtr m_ImageStack_SetColumnCount; + PLib3MFImageStack_GetSheetCountPtr m_ImageStack_GetSheetCount; + PLib3MFImageStack_GetSheetPtr m_ImageStack_GetSheet; + PLib3MFImageStack_SetSheetPtr m_ImageStack_SetSheet; + PLib3MFImageStack_CreateEmptySheetPtr m_ImageStack_CreateEmptySheet; + PLib3MFImageStack_CreateSheetFromBufferPtr m_ImageStack_CreateSheetFromBuffer; + PLib3MFImageStack_CreateSheetFromFilePtr m_ImageStack_CreateSheetFromFile; PLib3MFAttachment_GetPathPtr m_Attachment_GetPath; PLib3MFAttachment_SetPathPtr m_Attachment_SetPath; PLib3MFAttachment_PackagePartPtr m_Attachment_PackagePart; @@ -3924,6 +6713,173 @@ typedef struct { PLib3MFTexture2D_SetTileStyleUVPtr m_Texture2D_SetTileStyleUV; PLib3MFTexture2D_GetFilterPtr m_Texture2D_GetFilter; PLib3MFTexture2D_SetFilterPtr m_Texture2D_SetFilter; + PLib3MFImplicitPort_GetIdentifierPtr m_ImplicitPort_GetIdentifier; + PLib3MFImplicitPort_SetIdentifierPtr m_ImplicitPort_SetIdentifier; + PLib3MFImplicitPort_GetDisplayNamePtr m_ImplicitPort_GetDisplayName; + PLib3MFImplicitPort_SetDisplayNamePtr m_ImplicitPort_SetDisplayName; + PLib3MFImplicitPort_SetTypePtr m_ImplicitPort_SetType; + PLib3MFImplicitPort_GetTypePtr m_ImplicitPort_GetType; + PLib3MFImplicitPort_GetReferencePtr m_ImplicitPort_GetReference; + PLib3MFImplicitPort_SetReferencePtr m_ImplicitPort_SetReference; + PLib3MFIterator_MoveNextPtr m_Iterator_MoveNext; + PLib3MFIterator_MovePreviousPtr m_Iterator_MovePrevious; + PLib3MFIterator_CountPtr m_Iterator_Count; + PLib3MFImplicitPortIterator_GetCurrentPtr m_ImplicitPortIterator_GetCurrent; + PLib3MFImplicitNode_GetIdentifierPtr m_ImplicitNode_GetIdentifier; + PLib3MFImplicitNode_SetIdentifierPtr m_ImplicitNode_SetIdentifier; + PLib3MFImplicitNode_GetDisplayNamePtr m_ImplicitNode_GetDisplayName; + PLib3MFImplicitNode_SetDisplayNamePtr m_ImplicitNode_SetDisplayName; + PLib3MFImplicitNode_GetTagPtr m_ImplicitNode_GetTag; + PLib3MFImplicitNode_SetTagPtr m_ImplicitNode_SetTag; + PLib3MFImplicitNode_GetNodeTypePtr m_ImplicitNode_GetNodeType; + PLib3MFImplicitNode_AddInputPtr m_ImplicitNode_AddInput; + PLib3MFImplicitNode_GetInputsPtr m_ImplicitNode_GetInputs; + PLib3MFImplicitNode_AddOutputPtr m_ImplicitNode_AddOutput; + PLib3MFImplicitNode_GetOutputsPtr m_ImplicitNode_GetOutputs; + PLib3MFImplicitNode_FindInputPtr m_ImplicitNode_FindInput; + PLib3MFImplicitNode_FindOutputPtr m_ImplicitNode_FindOutput; + PLib3MFImplicitNode_AreTypesValidPtr m_ImplicitNode_AreTypesValid; + PLib3MFOneInputNode_GetInputAPtr m_OneInputNode_GetInputA; + PLib3MFOneInputNode_GetOutputResultPtr m_OneInputNode_GetOutputResult; + PLib3MFResourceIdNode_SetResourcePtr m_ResourceIdNode_SetResource; + PLib3MFResourceIdNode_GetResourcePtr m_ResourceIdNode_GetResource; + PLib3MFResourceIdNode_GetOutputValuePtr m_ResourceIdNode_GetOutputValue; + PLib3MFTwoInputNode_GetInputBPtr m_TwoInputNode_GetInputB; + PLib3MFSelectNode_GetInputBPtr m_SelectNode_GetInputB; + PLib3MFSelectNode_GetInputCPtr m_SelectNode_GetInputC; + PLib3MFSelectNode_GetInputDPtr m_SelectNode_GetInputD; + PLib3MFClampNode_GetInputMinPtr m_ClampNode_GetInputMin; + PLib3MFClampNode_GetInputMaxPtr m_ClampNode_GetInputMax; + PLib3MFComposeVectorNode_GetInputXPtr m_ComposeVectorNode_GetInputX; + PLib3MFComposeVectorNode_GetInputYPtr m_ComposeVectorNode_GetInputY; + PLib3MFComposeVectorNode_GetInputZPtr m_ComposeVectorNode_GetInputZ; + PLib3MFComposeVectorNode_GetOutputResultPtr m_ComposeVectorNode_GetOutputResult; + PLib3MFDecomposeVectorNode_GetInputAPtr m_DecomposeVectorNode_GetInputA; + PLib3MFDecomposeVectorNode_GetOutputXPtr m_DecomposeVectorNode_GetOutputX; + PLib3MFDecomposeVectorNode_GetOutputYPtr m_DecomposeVectorNode_GetOutputY; + PLib3MFDecomposeVectorNode_GetOutputZPtr m_DecomposeVectorNode_GetOutputZ; + PLib3MFComposeMatrixNode_GetInputM00Ptr m_ComposeMatrixNode_GetInputM00; + PLib3MFComposeMatrixNode_GetInputM01Ptr m_ComposeMatrixNode_GetInputM01; + PLib3MFComposeMatrixNode_GetInputM02Ptr m_ComposeMatrixNode_GetInputM02; + PLib3MFComposeMatrixNode_GetInputM03Ptr m_ComposeMatrixNode_GetInputM03; + PLib3MFComposeMatrixNode_GetInputM10Ptr m_ComposeMatrixNode_GetInputM10; + PLib3MFComposeMatrixNode_GetInputM11Ptr m_ComposeMatrixNode_GetInputM11; + PLib3MFComposeMatrixNode_GetInputM12Ptr m_ComposeMatrixNode_GetInputM12; + PLib3MFComposeMatrixNode_GetInputM13Ptr m_ComposeMatrixNode_GetInputM13; + PLib3MFComposeMatrixNode_GetInputM20Ptr m_ComposeMatrixNode_GetInputM20; + PLib3MFComposeMatrixNode_GetInputM21Ptr m_ComposeMatrixNode_GetInputM21; + PLib3MFComposeMatrixNode_GetInputM22Ptr m_ComposeMatrixNode_GetInputM22; + PLib3MFComposeMatrixNode_GetInputM23Ptr m_ComposeMatrixNode_GetInputM23; + PLib3MFComposeMatrixNode_GetInputM30Ptr m_ComposeMatrixNode_GetInputM30; + PLib3MFComposeMatrixNode_GetInputM31Ptr m_ComposeMatrixNode_GetInputM31; + PLib3MFComposeMatrixNode_GetInputM32Ptr m_ComposeMatrixNode_GetInputM32; + PLib3MFComposeMatrixNode_GetInputM33Ptr m_ComposeMatrixNode_GetInputM33; + PLib3MFComposeMatrixNode_GetOutputResultPtr m_ComposeMatrixNode_GetOutputResult; + PLib3MFMatrixFromRowsNode_GetInputAPtr m_MatrixFromRowsNode_GetInputA; + PLib3MFMatrixFromRowsNode_GetInputBPtr m_MatrixFromRowsNode_GetInputB; + PLib3MFMatrixFromRowsNode_GetInputCPtr m_MatrixFromRowsNode_GetInputC; + PLib3MFMatrixFromRowsNode_GetInputDPtr m_MatrixFromRowsNode_GetInputD; + PLib3MFMatrixFromRowsNode_GetOutputResultPtr m_MatrixFromRowsNode_GetOutputResult; + PLib3MFMatrixFromColumnsNode_GetInputAPtr m_MatrixFromColumnsNode_GetInputA; + PLib3MFMatrixFromColumnsNode_GetInputBPtr m_MatrixFromColumnsNode_GetInputB; + PLib3MFMatrixFromColumnsNode_GetInputCPtr m_MatrixFromColumnsNode_GetInputC; + PLib3MFMatrixFromColumnsNode_GetInputDPtr m_MatrixFromColumnsNode_GetInputD; + PLib3MFMatrixFromColumnsNode_GetOutputResultPtr m_MatrixFromColumnsNode_GetOutputResult; + PLib3MFConstantNode_SetConstantPtr m_ConstantNode_SetConstant; + PLib3MFConstantNode_GetConstantPtr m_ConstantNode_GetConstant; + PLib3MFConstantNode_GetOutputValuePtr m_ConstantNode_GetOutputValue; + PLib3MFConstVecNode_SetVectorPtr m_ConstVecNode_SetVector; + PLib3MFConstVecNode_GetVectorPtr m_ConstVecNode_GetVector; + PLib3MFConstVecNode_GetOutputVectorPtr m_ConstVecNode_GetOutputVector; + PLib3MFConstMatNode_SetMatrixPtr m_ConstMatNode_SetMatrix; + PLib3MFConstMatNode_GetMatrixPtr m_ConstMatNode_GetMatrix; + PLib3MFConstMatNode_GetOutputMatrixPtr m_ConstMatNode_GetOutputMatrix; + PLib3MFMeshNode_GetInputMeshPtr m_MeshNode_GetInputMesh; + PLib3MFMeshNode_GetInputPosPtr m_MeshNode_GetInputPos; + PLib3MFMeshNode_GetOutputDistancePtr m_MeshNode_GetOutputDistance; + PLib3MFUnsignedMeshNode_GetInputMeshPtr m_UnsignedMeshNode_GetInputMesh; + PLib3MFUnsignedMeshNode_GetInputPosPtr m_UnsignedMeshNode_GetInputPos; + PLib3MFUnsignedMeshNode_GetOutputDistancePtr m_UnsignedMeshNode_GetOutputDistance; + PLib3MFFunctionCallNode_GetInputFunctionIDPtr m_FunctionCallNode_GetInputFunctionID; + PLib3MFNodeIterator_GetCurrentPtr m_NodeIterator_GetCurrent; + PLib3MFFunction_GetDisplayNamePtr m_Function_GetDisplayName; + PLib3MFFunction_SetDisplayNamePtr m_Function_SetDisplayName; + PLib3MFFunction_AddInputPtr m_Function_AddInput; + PLib3MFFunction_GetInputsPtr m_Function_GetInputs; + PLib3MFFunction_RemoveInputPtr m_Function_RemoveInput; + PLib3MFFunction_AddOutputPtr m_Function_AddOutput; + PLib3MFFunction_GetOutputsPtr m_Function_GetOutputs; + PLib3MFFunction_RemoveOutputPtr m_Function_RemoveOutput; + PLib3MFFunction_FindInputPtr m_Function_FindInput; + PLib3MFFunction_FindOutputPtr m_Function_FindOutput; + PLib3MFImplicitFunction_GetIdentifierPtr m_ImplicitFunction_GetIdentifier; + PLib3MFImplicitFunction_SetIdentifierPtr m_ImplicitFunction_SetIdentifier; + PLib3MFImplicitFunction_AddNodePtr m_ImplicitFunction_AddNode; + PLib3MFImplicitFunction_AddSinNodePtr m_ImplicitFunction_AddSinNode; + PLib3MFImplicitFunction_AddCosNodePtr m_ImplicitFunction_AddCosNode; + PLib3MFImplicitFunction_AddTanNodePtr m_ImplicitFunction_AddTanNode; + PLib3MFImplicitFunction_AddArcSinNodePtr m_ImplicitFunction_AddArcSinNode; + PLib3MFImplicitFunction_AddArcCosNodePtr m_ImplicitFunction_AddArcCosNode; + PLib3MFImplicitFunction_AddArcTan2NodePtr m_ImplicitFunction_AddArcTan2Node; + PLib3MFImplicitFunction_AddSinhNodePtr m_ImplicitFunction_AddSinhNode; + PLib3MFImplicitFunction_AddCoshNodePtr m_ImplicitFunction_AddCoshNode; + PLib3MFImplicitFunction_AddTanhNodePtr m_ImplicitFunction_AddTanhNode; + PLib3MFImplicitFunction_AddRoundNodePtr m_ImplicitFunction_AddRoundNode; + PLib3MFImplicitFunction_AddCeilNodePtr m_ImplicitFunction_AddCeilNode; + PLib3MFImplicitFunction_AddFloorNodePtr m_ImplicitFunction_AddFloorNode; + PLib3MFImplicitFunction_AddSignNodePtr m_ImplicitFunction_AddSignNode; + PLib3MFImplicitFunction_AddFractNodePtr m_ImplicitFunction_AddFractNode; + PLib3MFImplicitFunction_AddAbsNodePtr m_ImplicitFunction_AddAbsNode; + PLib3MFImplicitFunction_AddExpNodePtr m_ImplicitFunction_AddExpNode; + PLib3MFImplicitFunction_AddLogNodePtr m_ImplicitFunction_AddLogNode; + PLib3MFImplicitFunction_AddLog2NodePtr m_ImplicitFunction_AddLog2Node; + PLib3MFImplicitFunction_AddLog10NodePtr m_ImplicitFunction_AddLog10Node; + PLib3MFImplicitFunction_AddLengthNodePtr m_ImplicitFunction_AddLengthNode; + PLib3MFImplicitFunction_AddTransposeNodePtr m_ImplicitFunction_AddTransposeNode; + PLib3MFImplicitFunction_InverseNodePtr m_ImplicitFunction_InverseNode; + PLib3MFImplicitFunction_AddSqrtNodePtr m_ImplicitFunction_AddSqrtNode; + PLib3MFImplicitFunction_AddResourceIdNodePtr m_ImplicitFunction_AddResourceIdNode; + PLib3MFImplicitFunction_AddAdditionNodePtr m_ImplicitFunction_AddAdditionNode; + PLib3MFImplicitFunction_AddSubtractionNodePtr m_ImplicitFunction_AddSubtractionNode; + PLib3MFImplicitFunction_AddMultiplicationNodePtr m_ImplicitFunction_AddMultiplicationNode; + PLib3MFImplicitFunction_AddDivisionNodePtr m_ImplicitFunction_AddDivisionNode; + PLib3MFImplicitFunction_AddDotNodePtr m_ImplicitFunction_AddDotNode; + PLib3MFImplicitFunction_AddCrossNodePtr m_ImplicitFunction_AddCrossNode; + PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr m_ImplicitFunction_AddMatVecMultiplicationNode; + PLib3MFImplicitFunction_AddMinNodePtr m_ImplicitFunction_AddMinNode; + PLib3MFImplicitFunction_AddMaxNodePtr m_ImplicitFunction_AddMaxNode; + PLib3MFImplicitFunction_AddFmodNodePtr m_ImplicitFunction_AddFmodNode; + PLib3MFImplicitFunction_AddPowNodePtr m_ImplicitFunction_AddPowNode; + PLib3MFImplicitFunction_AddSelectNodePtr m_ImplicitFunction_AddSelectNode; + PLib3MFImplicitFunction_AddClampNodePtr m_ImplicitFunction_AddClampNode; + PLib3MFImplicitFunction_AddComposeVectorNodePtr m_ImplicitFunction_AddComposeVectorNode; + PLib3MFImplicitFunction_AddVectorFromScalarNodePtr m_ImplicitFunction_AddVectorFromScalarNode; + PLib3MFImplicitFunction_AddDecomposeVectorNodePtr m_ImplicitFunction_AddDecomposeVectorNode; + PLib3MFImplicitFunction_AddComposeMatrixNodePtr m_ImplicitFunction_AddComposeMatrixNode; + PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr m_ImplicitFunction_AddMatrixFromRowsNode; + PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr m_ImplicitFunction_AddMatrixFromColumnsNode; + PLib3MFImplicitFunction_AddConstantNodePtr m_ImplicitFunction_AddConstantNode; + PLib3MFImplicitFunction_AddConstVecNodePtr m_ImplicitFunction_AddConstVecNode; + PLib3MFImplicitFunction_AddConstMatNodePtr m_ImplicitFunction_AddConstMatNode; + PLib3MFImplicitFunction_AddMeshNodePtr m_ImplicitFunction_AddMeshNode; + PLib3MFImplicitFunction_AddUnsignedMeshNodePtr m_ImplicitFunction_AddUnsignedMeshNode; + PLib3MFImplicitFunction_AddFunctionCallNodePtr m_ImplicitFunction_AddFunctionCallNode; + PLib3MFImplicitFunction_GetNodesPtr m_ImplicitFunction_GetNodes; + PLib3MFImplicitFunction_RemoveNodePtr m_ImplicitFunction_RemoveNode; + PLib3MFImplicitFunction_AddLinkPtr m_ImplicitFunction_AddLink; + PLib3MFImplicitFunction_AddLinkByNamesPtr m_ImplicitFunction_AddLinkByNames; + PLib3MFImplicitFunction_ClearPtr m_ImplicitFunction_Clear; + PLib3MFImplicitFunction_SortNodesTopologicallyPtr m_ImplicitFunction_SortNodesTopologically; + PLib3MFFunctionFromImage3D_GetImage3DPtr m_FunctionFromImage3D_GetImage3D; + PLib3MFFunctionFromImage3D_SetImage3DPtr m_FunctionFromImage3D_SetImage3D; + PLib3MFFunctionFromImage3D_SetFilterPtr m_FunctionFromImage3D_SetFilter; + PLib3MFFunctionFromImage3D_GetFilterPtr m_FunctionFromImage3D_GetFilter; + PLib3MFFunctionFromImage3D_SetTileStylesPtr m_FunctionFromImage3D_SetTileStyles; + PLib3MFFunctionFromImage3D_GetTileStylesPtr m_FunctionFromImage3D_GetTileStyles; + PLib3MFFunctionFromImage3D_GetOffsetPtr m_FunctionFromImage3D_GetOffset; + PLib3MFFunctionFromImage3D_SetOffsetPtr m_FunctionFromImage3D_SetOffset; + PLib3MFFunctionFromImage3D_GetScalePtr m_FunctionFromImage3D_GetScale; + PLib3MFFunctionFromImage3D_SetScalePtr m_FunctionFromImage3D_SetScale; PLib3MFBuildItem_GetObjectResourcePtr m_BuildItem_GetObjectResource; PLib3MFBuildItem_GetUUIDPtr m_BuildItem_GetUUID; PLib3MFBuildItem_SetUUIDPtr m_BuildItem_SetUUID; @@ -4018,6 +6974,7 @@ typedef struct { PLib3MFModel_GetComponentsObjectByIDPtr m_Model_GetComponentsObjectByID; PLib3MFModel_GetColorGroupByIDPtr m_Model_GetColorGroupByID; PLib3MFModel_GetSliceStackByIDPtr m_Model_GetSliceStackByID; + PLib3MFModel_GetLevelSetByIDPtr m_Model_GetLevelSetByID; PLib3MFModel_GetBuildUUIDPtr m_Model_GetBuildUUID; PLib3MFModel_SetBuildUUIDPtr m_Model_SetBuildUUID; PLib3MFModel_GetBuildItemsPtr m_Model_GetBuildItems; @@ -4033,7 +6990,9 @@ typedef struct { PLib3MFModel_GetCompositeMaterialsPtr m_Model_GetCompositeMaterials; PLib3MFModel_GetMultiPropertyGroupsPtr m_Model_GetMultiPropertyGroups; PLib3MFModel_GetSliceStacksPtr m_Model_GetSliceStacks; + PLib3MFModel_GetImage3DsPtr m_Model_GetImage3Ds; PLib3MFModel_MergeToModelPtr m_Model_MergeToModel; + PLib3MFModel_MergeFromModelPtr m_Model_MergeFromModel; PLib3MFModel_AddMeshObjectPtr m_Model_AddMeshObject; PLib3MFModel_AddComponentsObjectPtr m_Model_AddComponentsObject; PLib3MFModel_AddSliceStackPtr m_Model_AddSliceStack; @@ -4043,6 +7002,8 @@ typedef struct { PLib3MFModel_AddTexture2DGroupPtr m_Model_AddTexture2DGroup; PLib3MFModel_AddCompositeMaterialsPtr m_Model_AddCompositeMaterials; PLib3MFModel_AddMultiPropertyGroupPtr m_Model_AddMultiPropertyGroup; + PLib3MFModel_AddImageStackPtr m_Model_AddImageStack; + PLib3MFModel_GetImageStackByIDPtr m_Model_GetImageStackByID; PLib3MFModel_AddBuildItemPtr m_Model_AddBuildItem; PLib3MFModel_RemoveBuildItemPtr m_Model_RemoveBuildItem; PLib3MFModel_GetMetaDataGroupPtr m_Model_GetMetaDataGroup; @@ -4059,6 +7020,13 @@ typedef struct { PLib3MFModel_RemoveCustomContentTypePtr m_Model_RemoveCustomContentType; PLib3MFModel_SetRandomNumberCallbackPtr m_Model_SetRandomNumberCallback; PLib3MFModel_GetKeyStorePtr m_Model_GetKeyStore; + PLib3MFModel_GetFunctionsPtr m_Model_GetFunctions; + PLib3MFModel_AddImplicitFunctionPtr m_Model_AddImplicitFunction; + PLib3MFModel_AddFunctionFromImage3DPtr m_Model_AddFunctionFromImage3D; + PLib3MFModel_AddVolumeDataPtr m_Model_AddVolumeData; + PLib3MFModel_AddLevelSetPtr m_Model_AddLevelSet; + PLib3MFModel_GetLevelSetsPtr m_Model_GetLevelSets; + PLib3MFModel_RemoveResourcePtr m_Model_RemoveResource; PLib3MFGetLibraryVersionPtr m_GetLibraryVersion; PLib3MFGetPrereleaseInformationPtr m_GetPrereleaseInformation; PLib3MFGetBuildInformationPtr m_GetBuildInformation; diff --git a/Autogenerated/Bindings/Go/lib3mf_impl.go b/Autogenerated/Bindings/Go/lib3mf_impl.go index f91e68c3b..552faf054 100644 --- a/Autogenerated/Bindings/Go/lib3mf_impl.go +++ b/Autogenerated/Bindings/Go/lib3mf_impl.go @@ -95,316 +95,443 @@ type Lib3MFImplementation struct { Lib3MF_texture2dgroupiterator_getcurrenttexture2dgroup uintptr Lib3MF_compositematerialsiterator_getcurrentcompositematerials uintptr Lib3MF_multipropertygroupiterator_getcurrentmultipropertygroup uintptr - Lib3MF_metadata_getnamespace uintptr - Lib3MF_metadata_setnamespace uintptr - Lib3MF_metadata_getname uintptr - Lib3MF_metadata_setname uintptr - Lib3MF_metadata_getkey uintptr - Lib3MF_metadata_getmustpreserve uintptr - Lib3MF_metadata_setmustpreserve uintptr - Lib3MF_metadata_gettype uintptr - Lib3MF_metadata_settype uintptr - Lib3MF_metadata_getvalue uintptr - Lib3MF_metadata_setvalue uintptr - Lib3MF_metadatagroup_getmetadatacount uintptr - Lib3MF_metadatagroup_getmetadata uintptr - Lib3MF_metadatagroup_getmetadatabykey uintptr - Lib3MF_metadatagroup_removemetadatabyindex uintptr - Lib3MF_metadatagroup_removemetadata uintptr - Lib3MF_metadatagroup_addmetadata uintptr - Lib3MF_object_gettype uintptr - Lib3MF_object_settype uintptr - Lib3MF_object_getname uintptr - Lib3MF_object_setname uintptr - Lib3MF_object_getpartnumber uintptr - Lib3MF_object_setpartnumber uintptr - Lib3MF_object_ismeshobject uintptr - Lib3MF_object_iscomponentsobject uintptr - Lib3MF_object_isvalid uintptr - Lib3MF_object_setattachmentasthumbnail uintptr - Lib3MF_object_getthumbnailattachment uintptr - Lib3MF_object_clearthumbnailattachment uintptr - Lib3MF_object_getoutbox uintptr - Lib3MF_object_getuuid uintptr - Lib3MF_object_setuuid uintptr - Lib3MF_object_getmetadatagroup uintptr - Lib3MF_object_setslicesmeshresolution uintptr - Lib3MF_object_getslicesmeshresolution uintptr - Lib3MF_object_hasslices uintptr - Lib3MF_object_clearslicestack uintptr - Lib3MF_object_getslicestack uintptr - Lib3MF_object_assignslicestack uintptr - Lib3MF_meshobject_getvertexcount uintptr - Lib3MF_meshobject_gettrianglecount uintptr - Lib3MF_meshobject_getvertex uintptr - Lib3MF_meshobject_setvertex uintptr - Lib3MF_meshobject_addvertex uintptr - Lib3MF_meshobject_getvertices uintptr - Lib3MF_meshobject_gettriangle uintptr - Lib3MF_meshobject_settriangle uintptr - Lib3MF_meshobject_addtriangle uintptr - Lib3MF_meshobject_gettriangleindices uintptr - Lib3MF_meshobject_setobjectlevelproperty uintptr - Lib3MF_meshobject_getobjectlevelproperty uintptr - Lib3MF_meshobject_settriangleproperties uintptr - Lib3MF_meshobject_gettriangleproperties uintptr - Lib3MF_meshobject_setalltriangleproperties uintptr - Lib3MF_meshobject_getalltriangleproperties uintptr - Lib3MF_meshobject_clearallproperties uintptr - Lib3MF_meshobject_setgeometry uintptr - Lib3MF_meshobject_ismanifoldandoriented uintptr - Lib3MF_meshobject_beamlattice uintptr - Lib3MF_beamlattice_getminlength uintptr - Lib3MF_beamlattice_setminlength uintptr - Lib3MF_beamlattice_getclipping uintptr - Lib3MF_beamlattice_setclipping uintptr - Lib3MF_beamlattice_getrepresentation uintptr - Lib3MF_beamlattice_setrepresentation uintptr - Lib3MF_beamlattice_getballoptions uintptr - Lib3MF_beamlattice_setballoptions uintptr - Lib3MF_beamlattice_getbeamcount uintptr - Lib3MF_beamlattice_getbeam uintptr - Lib3MF_beamlattice_addbeam uintptr - Lib3MF_beamlattice_setbeam uintptr - Lib3MF_beamlattice_setbeams uintptr - Lib3MF_beamlattice_getbeams uintptr - Lib3MF_beamlattice_getballcount uintptr - Lib3MF_beamlattice_getball uintptr - Lib3MF_beamlattice_addball uintptr - Lib3MF_beamlattice_setball uintptr - Lib3MF_beamlattice_setballs uintptr - Lib3MF_beamlattice_getballs uintptr - Lib3MF_beamlattice_getbeamsetcount uintptr - Lib3MF_beamlattice_addbeamset uintptr - Lib3MF_beamlattice_getbeamset uintptr - Lib3MF_component_getobjectresource uintptr - Lib3MF_component_getobjectresourceid uintptr - Lib3MF_component_getuuid uintptr - Lib3MF_component_setuuid uintptr - Lib3MF_component_hastransform uintptr - Lib3MF_component_gettransform uintptr - Lib3MF_component_settransform uintptr - Lib3MF_componentsobject_addcomponent uintptr - Lib3MF_componentsobject_getcomponent uintptr - Lib3MF_componentsobject_getcomponentcount uintptr - Lib3MF_beamset_setname uintptr - Lib3MF_beamset_getname uintptr - Lib3MF_beamset_setidentifier uintptr - Lib3MF_beamset_getidentifier uintptr - Lib3MF_beamset_getreferencecount uintptr - Lib3MF_beamset_setreferences uintptr - Lib3MF_beamset_getreferences uintptr - Lib3MF_beamset_getballreferencecount uintptr - Lib3MF_beamset_setballreferences uintptr - Lib3MF_beamset_getballreferences uintptr - Lib3MF_basematerialgroup_getcount uintptr - Lib3MF_basematerialgroup_getallpropertyids uintptr - Lib3MF_basematerialgroup_addmaterial uintptr - Lib3MF_basematerialgroup_removematerial uintptr - Lib3MF_basematerialgroup_getname uintptr - Lib3MF_basematerialgroup_setname uintptr - Lib3MF_basematerialgroup_setdisplaycolor uintptr - Lib3MF_basematerialgroup_getdisplaycolor uintptr - Lib3MF_colorgroup_getcount uintptr - Lib3MF_colorgroup_getallpropertyids uintptr - Lib3MF_colorgroup_addcolor uintptr - Lib3MF_colorgroup_removecolor uintptr - Lib3MF_colorgroup_setcolor uintptr - Lib3MF_colorgroup_getcolor uintptr - Lib3MF_texture2dgroup_getcount uintptr - Lib3MF_texture2dgroup_getallpropertyids uintptr - Lib3MF_texture2dgroup_addtex2coord uintptr - Lib3MF_texture2dgroup_gettex2coord uintptr - Lib3MF_texture2dgroup_removetex2coord uintptr - Lib3MF_texture2dgroup_gettexture2d uintptr - Lib3MF_compositematerials_getcount uintptr - Lib3MF_compositematerials_getallpropertyids uintptr - Lib3MF_compositematerials_getbasematerialgroup uintptr - Lib3MF_compositematerials_addcomposite uintptr - Lib3MF_compositematerials_removecomposite uintptr - Lib3MF_compositematerials_getcomposite uintptr - Lib3MF_multipropertygroup_getcount uintptr - Lib3MF_multipropertygroup_getallpropertyids uintptr - Lib3MF_multipropertygroup_addmultiproperty uintptr - Lib3MF_multipropertygroup_setmultiproperty uintptr - Lib3MF_multipropertygroup_getmultiproperty uintptr - Lib3MF_multipropertygroup_removemultiproperty uintptr - Lib3MF_multipropertygroup_getlayercount uintptr - Lib3MF_multipropertygroup_addlayer uintptr - Lib3MF_multipropertygroup_getlayer uintptr - Lib3MF_multipropertygroup_removelayer uintptr - Lib3MF_attachment_getpath uintptr - Lib3MF_attachment_setpath uintptr - Lib3MF_attachment_packagepart uintptr - Lib3MF_attachment_getrelationshiptype uintptr - Lib3MF_attachment_setrelationshiptype uintptr - Lib3MF_attachment_writetofile uintptr - Lib3MF_attachment_readfromfile uintptr - Lib3MF_attachment_readfromcallback uintptr - Lib3MF_attachment_getstreamsize uintptr - Lib3MF_attachment_writetobuffer uintptr - Lib3MF_attachment_readfrombuffer uintptr - Lib3MF_texture2d_getattachment uintptr - Lib3MF_texture2d_setattachment uintptr - Lib3MF_texture2d_getcontenttype uintptr - Lib3MF_texture2d_setcontenttype uintptr - Lib3MF_texture2d_gettilestyleuv uintptr - Lib3MF_texture2d_settilestyleuv uintptr - Lib3MF_texture2d_getfilter uintptr - Lib3MF_texture2d_setfilter uintptr - Lib3MF_builditem_getobjectresource uintptr - Lib3MF_builditem_getuuid uintptr - Lib3MF_builditem_setuuid uintptr - Lib3MF_builditem_getobjectresourceid uintptr - Lib3MF_builditem_hasobjecttransform uintptr - Lib3MF_builditem_getobjecttransform uintptr - Lib3MF_builditem_setobjecttransform uintptr - Lib3MF_builditem_getpartnumber uintptr - Lib3MF_builditem_setpartnumber uintptr - Lib3MF_builditem_getmetadatagroup uintptr - Lib3MF_builditem_getoutbox uintptr - Lib3MF_builditemiterator_movenext uintptr - Lib3MF_builditemiterator_moveprevious uintptr - Lib3MF_builditemiterator_getcurrent uintptr - Lib3MF_builditemiterator_clone uintptr - Lib3MF_builditemiterator_count uintptr - Lib3MF_slice_setvertices uintptr - Lib3MF_slice_getvertices uintptr - Lib3MF_slice_getvertexcount uintptr - Lib3MF_slice_addpolygon uintptr - Lib3MF_slice_getpolygoncount uintptr - Lib3MF_slice_setpolygonindices uintptr - Lib3MF_slice_getpolygonindices uintptr - Lib3MF_slice_getpolygonindexcount uintptr - Lib3MF_slice_getztop uintptr - Lib3MF_slicestack_getbottomz uintptr - Lib3MF_slicestack_getslicecount uintptr - Lib3MF_slicestack_getslice uintptr - Lib3MF_slicestack_addslice uintptr - Lib3MF_slicestack_getslicerefcount uintptr - Lib3MF_slicestack_addslicestackreference uintptr - Lib3MF_slicestack_getslicestackreference uintptr - Lib3MF_slicestack_collapseslicereferences uintptr - Lib3MF_slicestack_setownpath uintptr - Lib3MF_slicestack_getownpath uintptr - Lib3MF_consumer_getconsumerid uintptr - Lib3MF_consumer_getkeyid uintptr - Lib3MF_consumer_getkeyvalue uintptr - Lib3MF_accessright_getconsumer uintptr - Lib3MF_accessright_getwrappingalgorithm uintptr - Lib3MF_accessright_getmgfalgorithm uintptr - Lib3MF_accessright_getdigestmethod uintptr - Lib3MF_contentencryptionparams_getencryptionalgorithm uintptr - Lib3MF_contentencryptionparams_getkey uintptr - Lib3MF_contentencryptionparams_getinitializationvector uintptr - Lib3MF_contentencryptionparams_getauthenticationtag uintptr - Lib3MF_contentencryptionparams_setauthenticationtag uintptr + Lib3MF_image3diterator_getcurrentimage3d uintptr + Lib3MF_scalarfielditerator_getcurrentscalarfield uintptr + Lib3MF_vector3dfielditerator_getcurrentvector3dfield uintptr + Lib3MF_metadata_getnamespace uintptr + Lib3MF_metadata_setnamespace uintptr + Lib3MF_metadata_getname uintptr + Lib3MF_metadata_setname uintptr + Lib3MF_metadata_getkey uintptr + Lib3MF_metadata_getmustpreserve uintptr + Lib3MF_metadata_setmustpreserve uintptr + Lib3MF_metadata_gettype uintptr + Lib3MF_metadata_settype uintptr + Lib3MF_metadata_getvalue uintptr + Lib3MF_metadata_setvalue uintptr + Lib3MF_metadatagroup_getmetadatacount uintptr + Lib3MF_metadatagroup_getmetadata uintptr + Lib3MF_metadatagroup_getmetadatabykey uintptr + Lib3MF_metadatagroup_removemetadatabyindex uintptr + Lib3MF_metadatagroup_removemetadata uintptr + Lib3MF_metadatagroup_addmetadata uintptr + Lib3MF_object_gettype uintptr + Lib3MF_object_settype uintptr + Lib3MF_object_getname uintptr + Lib3MF_object_setname uintptr + Lib3MF_object_getpartnumber uintptr + Lib3MF_object_setpartnumber uintptr + Lib3MF_object_ismeshobject uintptr + Lib3MF_object_iscomponentsobject uintptr + Lib3MF_object_isvalid uintptr + Lib3MF_object_setattachmentasthumbnail uintptr + Lib3MF_object_getthumbnailattachment uintptr + Lib3MF_object_clearthumbnailattachment uintptr + Lib3MF_object_getoutbox uintptr + Lib3MF_object_getuuid uintptr + Lib3MF_object_setuuid uintptr + Lib3MF_object_getmetadatagroup uintptr + Lib3MF_object_setslicesmeshresolution uintptr + Lib3MF_object_getslicesmeshresolution uintptr + Lib3MF_object_hasslices uintptr + Lib3MF_object_clearslicestack uintptr + Lib3MF_object_getslicestack uintptr + Lib3MF_object_assignslicestack uintptr + Lib3MF_meshobject_getvertexcount uintptr + Lib3MF_meshobject_gettrianglecount uintptr + Lib3MF_meshobject_getvertex uintptr + Lib3MF_meshobject_setvertex uintptr + Lib3MF_meshobject_addvertex uintptr + Lib3MF_meshobject_getvertices uintptr + Lib3MF_meshobject_gettriangle uintptr + Lib3MF_meshobject_settriangle uintptr + Lib3MF_meshobject_addtriangle uintptr + Lib3MF_meshobject_gettriangleindices uintptr + Lib3MF_meshobject_setobjectlevelproperty uintptr + Lib3MF_meshobject_getobjectlevelproperty uintptr + Lib3MF_meshobject_settriangleproperties uintptr + Lib3MF_meshobject_gettriangleproperties uintptr + Lib3MF_meshobject_setalltriangleproperties uintptr + Lib3MF_meshobject_getalltriangleproperties uintptr + Lib3MF_meshobject_clearallproperties uintptr + Lib3MF_meshobject_setgeometry uintptr + Lib3MF_meshobject_ismanifoldandoriented uintptr + Lib3MF_meshobject_beamlattice uintptr + Lib3MF_meshobject_volumedata uintptr + Lib3MF_beamlattice_getminlength uintptr + Lib3MF_beamlattice_setminlength uintptr + Lib3MF_beamlattice_getclipping uintptr + Lib3MF_beamlattice_setclipping uintptr + Lib3MF_beamlattice_getrepresentation uintptr + Lib3MF_beamlattice_setrepresentation uintptr + Lib3MF_beamlattice_getballoptions uintptr + Lib3MF_beamlattice_setballoptions uintptr + Lib3MF_beamlattice_getbeamcount uintptr + Lib3MF_beamlattice_getbeam uintptr + Lib3MF_beamlattice_addbeam uintptr + Lib3MF_beamlattice_setbeam uintptr + Lib3MF_beamlattice_setbeams uintptr + Lib3MF_beamlattice_getbeams uintptr + Lib3MF_beamlattice_getballcount uintptr + Lib3MF_beamlattice_getball uintptr + Lib3MF_beamlattice_addball uintptr + Lib3MF_beamlattice_setball uintptr + Lib3MF_beamlattice_setballs uintptr + Lib3MF_beamlattice_getballs uintptr + Lib3MF_beamlattice_getbeamsetcount uintptr + Lib3MF_beamlattice_addbeamset uintptr + Lib3MF_beamlattice_getbeamset uintptr + Lib3MF_scalarfield_getname uintptr + Lib3MF_scalarfield_setname uintptr + Lib3MF_scalarfield_isfromimage3d uintptr + Lib3MF_scalarfield_isconstant uintptr + Lib3MF_scalarfield_iscomposed uintptr + Lib3MF_vector3dfield_getname uintptr + Lib3MF_vector3dfield_setname uintptr + Lib3MF_vector3dfield_isfromimage3d uintptr + Lib3MF_vector3dfield_isconstant uintptr + Lib3MF_vector3dfield_iscomposed uintptr + Lib3MF_scalarfieldfromimage3d_getimage uintptr + Lib3MF_scalarfieldfromimage3d_setimage uintptr + Lib3MF_scalarfieldfromimage3d_setchannel uintptr + Lib3MF_scalarfieldfromimage3d_getchannel uintptr + Lib3MF_scalarfieldfromimage3d_setfilter uintptr + Lib3MF_scalarfieldfromimage3d_getfilter uintptr + Lib3MF_scalarfieldfromimage3d_settilestyles uintptr + Lib3MF_scalarfieldfromimage3d_gettilestyles uintptr + Lib3MF_scalarfieldfromimage3d_getoffset uintptr + Lib3MF_scalarfieldfromimage3d_setoffset uintptr + Lib3MF_scalarfieldfromimage3d_getscale uintptr + Lib3MF_scalarfieldfromimage3d_setscale uintptr + Lib3MF_scalarfieldconstant_getvalue uintptr + Lib3MF_scalarfieldconstant_setvalue uintptr + Lib3MF_scalarfieldcomposed_setmethod uintptr + Lib3MF_scalarfieldcomposed_getmethod uintptr + Lib3MF_scalarfieldcomposed_getfactor1 uintptr + Lib3MF_scalarfieldcomposed_setfactor1 uintptr + Lib3MF_scalarfieldcomposed_getfactor2 uintptr + Lib3MF_scalarfieldcomposed_setfactor2 uintptr + Lib3MF_scalarfieldcomposed_scalarfieldreference1 uintptr + Lib3MF_scalarfieldcomposed_scalarfieldreference2 uintptr + Lib3MF_scalarfieldcomposed_scalarfieldreferencemask uintptr + Lib3MF_vector3dfieldfromimage3d_getimage uintptr + Lib3MF_vector3dfieldfromimage3d_setimage uintptr + Lib3MF_vector3dfieldfromimage3d_setfilter uintptr + Lib3MF_vector3dfieldfromimage3d_getfilter uintptr + Lib3MF_vector3dfieldfromimage3d_settilestyles uintptr + Lib3MF_vector3dfieldfromimage3d_gettilestyles uintptr + Lib3MF_vector3dfieldfromimage3d_getoffset uintptr + Lib3MF_vector3dfieldfromimage3d_setoffset uintptr + Lib3MF_vector3dfieldfromimage3d_getscale uintptr + Lib3MF_vector3dfieldfromimage3d_setscale uintptr + Lib3MF_vector3dfieldconstant_getvaluex uintptr + Lib3MF_vector3dfieldconstant_setvaluex uintptr + Lib3MF_vector3dfieldconstant_getvaluey uintptr + Lib3MF_vector3dfieldconstant_setvaluey uintptr + Lib3MF_vector3dfieldconstant_getvaluez uintptr + Lib3MF_vector3dfieldconstant_setvaluez uintptr + Lib3MF_vector3dfieldcomposed_setmethod uintptr + Lib3MF_vector3dfieldcomposed_getmethod uintptr + Lib3MF_vector3dfieldcomposed_setspace uintptr + Lib3MF_vector3dfieldcomposed_getspace uintptr + Lib3MF_vector3dfieldcomposed_getfactor1 uintptr + Lib3MF_vector3dfieldcomposed_setfactor1 uintptr + Lib3MF_vector3dfieldcomposed_getfactor2 uintptr + Lib3MF_vector3dfieldcomposed_setfactor2 uintptr + Lib3MF_vector3dfieldcomposed_vector3dfieldreference1 uintptr + Lib3MF_vector3dfieldcomposed_vector3dfieldreference2 uintptr + Lib3MF_vector3dfieldcomposed_scalarfieldreferencemask uintptr + Lib3MF_fieldreference_getfieldresourceid uintptr + Lib3MF_fieldreference_setfieldresourceid uintptr + Lib3MF_fieldreference_gettransform uintptr + Lib3MF_fieldreference_settransform uintptr + Lib3MF_scalarfieldreference_setscalarfield uintptr + Lib3MF_vector3dfieldreference_setvector3dfield uintptr + Lib3MF_volumedataboundary_getsolidthreshold uintptr + Lib3MF_volumedataboundary_setsolidthreshold uintptr + Lib3MF_volumedatacomposite_getbasematerialgroup uintptr + Lib3MF_volumedatacomposite_setbasematerialgroup uintptr + Lib3MF_volumedatacomposite_getmaterialmappingcount uintptr + Lib3MF_volumedatacomposite_getmaterialmapping uintptr + Lib3MF_volumedatacomposite_addmaterialmapping uintptr + Lib3MF_volumedatacomposite_removematerialmapping uintptr + Lib3MF_volumedataproperty_getname uintptr + Lib3MF_volumedataproperty_setisrequired uintptr + Lib3MF_volumedataproperty_isrequired uintptr + Lib3MF_volumedata_getboundary uintptr + Lib3MF_volumedata_createnewboundary uintptr + Lib3MF_volumedata_removeboundary uintptr + Lib3MF_volumedata_getcomposite uintptr + Lib3MF_volumedata_createnewcomposite uintptr + Lib3MF_volumedata_removecomposite uintptr + Lib3MF_volumedata_getcolor uintptr + Lib3MF_volumedata_createnewcolor uintptr + Lib3MF_volumedata_removecolor uintptr + Lib3MF_volumedata_getpropertycount uintptr + Lib3MF_volumedata_getproperty uintptr + Lib3MF_volumedata_addpropertyfromscalarfield uintptr + Lib3MF_volumedata_addpropertyfromvector3dfield uintptr + Lib3MF_volumedata_removeproperty uintptr + Lib3MF_component_getobjectresource uintptr + Lib3MF_component_getobjectresourceid uintptr + Lib3MF_component_getuuid uintptr + Lib3MF_component_setuuid uintptr + Lib3MF_component_hastransform uintptr + Lib3MF_component_gettransform uintptr + Lib3MF_component_settransform uintptr + Lib3MF_componentsobject_addcomponent uintptr + Lib3MF_componentsobject_getcomponent uintptr + Lib3MF_componentsobject_getcomponentcount uintptr + Lib3MF_beamset_setname uintptr + Lib3MF_beamset_getname uintptr + Lib3MF_beamset_setidentifier uintptr + Lib3MF_beamset_getidentifier uintptr + Lib3MF_beamset_getreferencecount uintptr + Lib3MF_beamset_setreferences uintptr + Lib3MF_beamset_getreferences uintptr + Lib3MF_beamset_getballreferencecount uintptr + Lib3MF_beamset_setballreferences uintptr + Lib3MF_beamset_getballreferences uintptr + Lib3MF_basematerialgroup_getcount uintptr + Lib3MF_basematerialgroup_getallpropertyids uintptr + Lib3MF_basematerialgroup_addmaterial uintptr + Lib3MF_basematerialgroup_removematerial uintptr + Lib3MF_basematerialgroup_getname uintptr + Lib3MF_basematerialgroup_setname uintptr + Lib3MF_basematerialgroup_setdisplaycolor uintptr + Lib3MF_basematerialgroup_getdisplaycolor uintptr + Lib3MF_colorgroup_getcount uintptr + Lib3MF_colorgroup_getallpropertyids uintptr + Lib3MF_colorgroup_addcolor uintptr + Lib3MF_colorgroup_removecolor uintptr + Lib3MF_colorgroup_setcolor uintptr + Lib3MF_colorgroup_getcolor uintptr + Lib3MF_texture2dgroup_getcount uintptr + Lib3MF_texture2dgroup_getallpropertyids uintptr + Lib3MF_texture2dgroup_addtex2coord uintptr + Lib3MF_texture2dgroup_gettex2coord uintptr + Lib3MF_texture2dgroup_removetex2coord uintptr + Lib3MF_texture2dgroup_gettexture2d uintptr + Lib3MF_compositematerials_getcount uintptr + Lib3MF_compositematerials_getallpropertyids uintptr + Lib3MF_compositematerials_getbasematerialgroup uintptr + Lib3MF_compositematerials_addcomposite uintptr + Lib3MF_compositematerials_removecomposite uintptr + Lib3MF_compositematerials_getcomposite uintptr + Lib3MF_multipropertygroup_getcount uintptr + Lib3MF_multipropertygroup_getallpropertyids uintptr + Lib3MF_multipropertygroup_addmultiproperty uintptr + Lib3MF_multipropertygroup_setmultiproperty uintptr + Lib3MF_multipropertygroup_getmultiproperty uintptr + Lib3MF_multipropertygroup_removemultiproperty uintptr + Lib3MF_multipropertygroup_getlayercount uintptr + Lib3MF_multipropertygroup_addlayer uintptr + Lib3MF_multipropertygroup_getlayer uintptr + Lib3MF_multipropertygroup_removelayer uintptr + Lib3MF_image3d_getname uintptr + Lib3MF_image3d_setname uintptr + Lib3MF_image3d_isimagestack uintptr + Lib3MF_imagestack_getrowcount uintptr + Lib3MF_imagestack_setrowcount uintptr + Lib3MF_imagestack_getcolumncount uintptr + Lib3MF_imagestack_setcolumncount uintptr + Lib3MF_imagestack_getsheetcount uintptr + Lib3MF_imagestack_getsheet uintptr + Lib3MF_imagestack_setsheet uintptr + Lib3MF_imagestack_createemptysheet uintptr + Lib3MF_imagestack_createsheetfrombuffer uintptr + Lib3MF_imagestack_createsheetfromfile uintptr + Lib3MF_attachment_getpath uintptr + Lib3MF_attachment_setpath uintptr + Lib3MF_attachment_packagepart uintptr + Lib3MF_attachment_getrelationshiptype uintptr + Lib3MF_attachment_setrelationshiptype uintptr + Lib3MF_attachment_writetofile uintptr + Lib3MF_attachment_readfromfile uintptr + Lib3MF_attachment_readfromcallback uintptr + Lib3MF_attachment_getstreamsize uintptr + Lib3MF_attachment_writetobuffer uintptr + Lib3MF_attachment_readfrombuffer uintptr + Lib3MF_texture2d_getattachment uintptr + Lib3MF_texture2d_setattachment uintptr + Lib3MF_texture2d_getcontenttype uintptr + Lib3MF_texture2d_setcontenttype uintptr + Lib3MF_texture2d_gettilestyleuv uintptr + Lib3MF_texture2d_settilestyleuv uintptr + Lib3MF_texture2d_getfilter uintptr + Lib3MF_texture2d_setfilter uintptr + Lib3MF_builditem_getobjectresource uintptr + Lib3MF_builditem_getuuid uintptr + Lib3MF_builditem_setuuid uintptr + Lib3MF_builditem_getobjectresourceid uintptr + Lib3MF_builditem_hasobjecttransform uintptr + Lib3MF_builditem_getobjecttransform uintptr + Lib3MF_builditem_setobjecttransform uintptr + Lib3MF_builditem_getpartnumber uintptr + Lib3MF_builditem_setpartnumber uintptr + Lib3MF_builditem_getmetadatagroup uintptr + Lib3MF_builditem_getoutbox uintptr + Lib3MF_builditemiterator_movenext uintptr + Lib3MF_builditemiterator_moveprevious uintptr + Lib3MF_builditemiterator_getcurrent uintptr + Lib3MF_builditemiterator_clone uintptr + Lib3MF_builditemiterator_count uintptr + Lib3MF_slice_setvertices uintptr + Lib3MF_slice_getvertices uintptr + Lib3MF_slice_getvertexcount uintptr + Lib3MF_slice_addpolygon uintptr + Lib3MF_slice_getpolygoncount uintptr + Lib3MF_slice_setpolygonindices uintptr + Lib3MF_slice_getpolygonindices uintptr + Lib3MF_slice_getpolygonindexcount uintptr + Lib3MF_slice_getztop uintptr + Lib3MF_slicestack_getbottomz uintptr + Lib3MF_slicestack_getslicecount uintptr + Lib3MF_slicestack_getslice uintptr + Lib3MF_slicestack_addslice uintptr + Lib3MF_slicestack_getslicerefcount uintptr + Lib3MF_slicestack_addslicestackreference uintptr + Lib3MF_slicestack_getslicestackreference uintptr + Lib3MF_slicestack_collapseslicereferences uintptr + Lib3MF_slicestack_setownpath uintptr + Lib3MF_slicestack_getownpath uintptr + Lib3MF_consumer_getconsumerid uintptr + Lib3MF_consumer_getkeyid uintptr + Lib3MF_consumer_getkeyvalue uintptr + Lib3MF_accessright_getconsumer uintptr + Lib3MF_accessright_getwrappingalgorithm uintptr + Lib3MF_accessright_getmgfalgorithm uintptr + Lib3MF_accessright_getdigestmethod uintptr + Lib3MF_contentencryptionparams_getencryptionalgorithm uintptr + Lib3MF_contentencryptionparams_getkey uintptr + Lib3MF_contentencryptionparams_getinitializationvector uintptr + Lib3MF_contentencryptionparams_getauthenticationtag uintptr + Lib3MF_contentencryptionparams_setauthenticationtag uintptr Lib3MF_contentencryptionparams_getadditionalauthenticationdata uintptr - Lib3MF_contentencryptionparams_getdescriptor uintptr - Lib3MF_contentencryptionparams_getkeyuuid uintptr - Lib3MF_resourcedata_getpath uintptr - Lib3MF_resourcedata_getencryptionalgorithm uintptr - Lib3MF_resourcedata_getcompression uintptr - Lib3MF_resourcedata_getadditionalauthenticationdata uintptr - Lib3MF_resourcedatagroup_getkeyuuid uintptr - Lib3MF_resourcedatagroup_addaccessright uintptr - Lib3MF_resourcedatagroup_findaccessrightbyconsumer uintptr - Lib3MF_resourcedatagroup_removeaccessright uintptr - Lib3MF_keystore_addconsumer uintptr - Lib3MF_keystore_getconsumercount uintptr - Lib3MF_keystore_getconsumer uintptr - Lib3MF_keystore_removeconsumer uintptr - Lib3MF_keystore_findconsumer uintptr - Lib3MF_keystore_getresourcedatagroupcount uintptr - Lib3MF_keystore_addresourcedatagroup uintptr - Lib3MF_keystore_getresourcedatagroup uintptr - Lib3MF_keystore_removeresourcedatagroup uintptr - Lib3MF_keystore_findresourcedatagroup uintptr - Lib3MF_keystore_addresourcedata uintptr - Lib3MF_keystore_removeresourcedata uintptr - Lib3MF_keystore_findresourcedata uintptr - Lib3MF_keystore_getresourcedatacount uintptr - Lib3MF_keystore_getresourcedata uintptr - Lib3MF_keystore_getuuid uintptr - Lib3MF_keystore_setuuid uintptr - Lib3MF_model_rootmodelpart uintptr - Lib3MF_model_findorcreatepackagepart uintptr - Lib3MF_model_setunit uintptr - Lib3MF_model_getunit uintptr - Lib3MF_model_getlanguage uintptr - Lib3MF_model_setlanguage uintptr - Lib3MF_model_querywriter uintptr - Lib3MF_model_queryreader uintptr - Lib3MF_model_gettexture2dbyid uintptr - Lib3MF_model_getpropertytypebyid uintptr - Lib3MF_model_getbasematerialgroupbyid uintptr - Lib3MF_model_gettexture2dgroupbyid uintptr - Lib3MF_model_getcompositematerialsbyid uintptr - Lib3MF_model_getmultipropertygroupbyid uintptr - Lib3MF_model_getmeshobjectbyid uintptr - Lib3MF_model_getcomponentsobjectbyid uintptr - Lib3MF_model_getcolorgroupbyid uintptr - Lib3MF_model_getslicestackbyid uintptr - Lib3MF_model_getbuilduuid uintptr - Lib3MF_model_setbuilduuid uintptr - Lib3MF_model_getbuilditems uintptr - Lib3MF_model_getoutbox uintptr - Lib3MF_model_getresources uintptr - Lib3MF_model_getobjects uintptr - Lib3MF_model_getmeshobjects uintptr - Lib3MF_model_getcomponentsobjects uintptr - Lib3MF_model_gettexture2ds uintptr - Lib3MF_model_getbasematerialgroups uintptr - Lib3MF_model_getcolorgroups uintptr - Lib3MF_model_gettexture2dgroups uintptr - Lib3MF_model_getcompositematerials uintptr - Lib3MF_model_getmultipropertygroups uintptr - Lib3MF_model_getslicestacks uintptr - Lib3MF_model_mergetomodel uintptr - Lib3MF_model_addmeshobject uintptr - Lib3MF_model_addcomponentsobject uintptr - Lib3MF_model_addslicestack uintptr - Lib3MF_model_addtexture2dfromattachment uintptr - Lib3MF_model_addbasematerialgroup uintptr - Lib3MF_model_addcolorgroup uintptr - Lib3MF_model_addtexture2dgroup uintptr - Lib3MF_model_addcompositematerials uintptr - Lib3MF_model_addmultipropertygroup uintptr - Lib3MF_model_addbuilditem uintptr - Lib3MF_model_removebuilditem uintptr - Lib3MF_model_getmetadatagroup uintptr - Lib3MF_model_addattachment uintptr - Lib3MF_model_removeattachment uintptr - Lib3MF_model_getattachment uintptr - Lib3MF_model_findattachment uintptr - Lib3MF_model_getattachmentcount uintptr - Lib3MF_model_haspackagethumbnailattachment uintptr - Lib3MF_model_createpackagethumbnailattachment uintptr - Lib3MF_model_getpackagethumbnailattachment uintptr - Lib3MF_model_removepackagethumbnailattachment uintptr - Lib3MF_model_addcustomcontenttype uintptr - Lib3MF_model_removecustomcontenttype uintptr - Lib3MF_model_setrandomnumbercallback uintptr - Lib3MF_model_getkeystore uintptr - Lib3MF_getlibraryversion uintptr - Lib3MF_getprereleaseinformation uintptr - Lib3MF_getbuildinformation uintptr - Lib3MF_getspecificationversion uintptr - Lib3MF_createmodel uintptr - Lib3MF_release uintptr - Lib3MF_acquire uintptr - Lib3MF_setjournal uintptr - Lib3MF_getlasterror uintptr - Lib3MF_getsymbollookupmethod uintptr - Lib3MF_retrieveprogressmessage uintptr - Lib3MF_rgbatocolor uintptr - Lib3MF_floatrgbatocolor uintptr - Lib3MF_colortorgba uintptr - Lib3MF_colortofloatrgba uintptr - Lib3MF_getidentitytransform uintptr - Lib3MF_getuniformscaletransform uintptr - Lib3MF_getscaletransform uintptr - Lib3MF_gettranslationtransform uintptr + Lib3MF_contentencryptionparams_getdescriptor uintptr + Lib3MF_contentencryptionparams_getkeyuuid uintptr + Lib3MF_resourcedata_getpath uintptr + Lib3MF_resourcedata_getencryptionalgorithm uintptr + Lib3MF_resourcedata_getcompression uintptr + Lib3MF_resourcedata_getadditionalauthenticationdata uintptr + Lib3MF_resourcedatagroup_getkeyuuid uintptr + Lib3MF_resourcedatagroup_addaccessright uintptr + Lib3MF_resourcedatagroup_findaccessrightbyconsumer uintptr + Lib3MF_resourcedatagroup_removeaccessright uintptr + Lib3MF_keystore_addconsumer uintptr + Lib3MF_keystore_getconsumercount uintptr + Lib3MF_keystore_getconsumer uintptr + Lib3MF_keystore_removeconsumer uintptr + Lib3MF_keystore_findconsumer uintptr + Lib3MF_keystore_getresourcedatagroupcount uintptr + Lib3MF_keystore_addresourcedatagroup uintptr + Lib3MF_keystore_getresourcedatagroup uintptr + Lib3MF_keystore_removeresourcedatagroup uintptr + Lib3MF_keystore_findresourcedatagroup uintptr + Lib3MF_keystore_addresourcedata uintptr + Lib3MF_keystore_removeresourcedata uintptr + Lib3MF_keystore_findresourcedata uintptr + Lib3MF_keystore_getresourcedatacount uintptr + Lib3MF_keystore_getresourcedata uintptr + Lib3MF_keystore_getuuid uintptr + Lib3MF_keystore_setuuid uintptr + Lib3MF_model_rootmodelpart uintptr + Lib3MF_model_findorcreatepackagepart uintptr + Lib3MF_model_setunit uintptr + Lib3MF_model_getunit uintptr + Lib3MF_model_getlanguage uintptr + Lib3MF_model_setlanguage uintptr + Lib3MF_model_querywriter uintptr + Lib3MF_model_queryreader uintptr + Lib3MF_model_gettexture2dbyid uintptr + Lib3MF_model_getpropertytypebyid uintptr + Lib3MF_model_getbasematerialgroupbyid uintptr + Lib3MF_model_gettexture2dgroupbyid uintptr + Lib3MF_model_getcompositematerialsbyid uintptr + Lib3MF_model_getmultipropertygroupbyid uintptr + Lib3MF_model_getmeshobjectbyid uintptr + Lib3MF_model_getcomponentsobjectbyid uintptr + Lib3MF_model_getcolorgroupbyid uintptr + Lib3MF_model_getslicestackbyid uintptr + Lib3MF_model_getbuilduuid uintptr + Lib3MF_model_setbuilduuid uintptr + Lib3MF_model_getbuilditems uintptr + Lib3MF_model_getoutbox uintptr + Lib3MF_model_getresources uintptr + Lib3MF_model_getobjects uintptr + Lib3MF_model_getmeshobjects uintptr + Lib3MF_model_getcomponentsobjects uintptr + Lib3MF_model_gettexture2ds uintptr + Lib3MF_model_getbasematerialgroups uintptr + Lib3MF_model_getcolorgroups uintptr + Lib3MF_model_gettexture2dgroups uintptr + Lib3MF_model_getcompositematerials uintptr + Lib3MF_model_getmultipropertygroups uintptr + Lib3MF_model_getslicestacks uintptr + Lib3MF_model_getimage3ds uintptr + Lib3MF_model_getscalarfields uintptr + Lib3MF_model_getvector3dfields uintptr + Lib3MF_model_mergetomodel uintptr + Lib3MF_model_addmeshobject uintptr + Lib3MF_model_addcomponentsobject uintptr + Lib3MF_model_addslicestack uintptr + Lib3MF_model_addtexture2dfromattachment uintptr + Lib3MF_model_addbasematerialgroup uintptr + Lib3MF_model_addcolorgroup uintptr + Lib3MF_model_addtexture2dgroup uintptr + Lib3MF_model_addcompositematerials uintptr + Lib3MF_model_addmultipropertygroup uintptr + Lib3MF_model_addimagestack uintptr + Lib3MF_model_getimagestackbyid uintptr + Lib3MF_model_addscalarfieldfromimage3d uintptr + Lib3MF_model_addscalarfieldcomposed uintptr + Lib3MF_model_addscalarfieldconstant uintptr + Lib3MF_model_getscalarfieldbyid uintptr + Lib3MF_model_getscalarfieldfromimage3dbyid uintptr + Lib3MF_model_getscalarfieldcomposedbyid uintptr + Lib3MF_model_getscalarfieldconstantbyid uintptr + Lib3MF_model_addvector3dfieldfromimage3d uintptr + Lib3MF_model_addvector3dfieldcomposed uintptr + Lib3MF_model_addvector3dfieldconstant uintptr + Lib3MF_model_getvector3dfieldbyid uintptr + Lib3MF_model_getvector3dfieldfromimage3dbyid uintptr + Lib3MF_model_getvector3dfieldcomposedbyid uintptr + Lib3MF_model_getvector3dfieldconstantbyid uintptr + Lib3MF_model_addbuilditem uintptr + Lib3MF_model_removebuilditem uintptr + Lib3MF_model_getmetadatagroup uintptr + Lib3MF_model_addattachment uintptr + Lib3MF_model_removeattachment uintptr + Lib3MF_model_getattachment uintptr + Lib3MF_model_findattachment uintptr + Lib3MF_model_getattachmentcount uintptr + Lib3MF_model_haspackagethumbnailattachment uintptr + Lib3MF_model_createpackagethumbnailattachment uintptr + Lib3MF_model_getpackagethumbnailattachment uintptr + Lib3MF_model_removepackagethumbnailattachment uintptr + Lib3MF_model_addcustomcontenttype uintptr + Lib3MF_model_removecustomcontenttype uintptr + Lib3MF_model_setrandomnumbercallback uintptr + Lib3MF_model_getkeystore uintptr + Lib3MF_getlibraryversion uintptr + Lib3MF_getprereleaseinformation uintptr + Lib3MF_getbuildinformation uintptr + Lib3MF_getspecificationversion uintptr + Lib3MF_createmodel uintptr + Lib3MF_release uintptr + Lib3MF_acquire uintptr + Lib3MF_setjournal uintptr + Lib3MF_getlasterror uintptr + Lib3MF_getsymbollookupmethod uintptr + Lib3MF_retrieveprogressmessage uintptr + Lib3MF_rgbatocolor uintptr + Lib3MF_floatrgbatocolor uintptr + Lib3MF_colortorgba uintptr + Lib3MF_colortofloatrgba uintptr + Lib3MF_getidentitytransform uintptr + Lib3MF_getuniformscaletransform uintptr + Lib3MF_getscaletransform uintptr + Lib3MF_gettranslationtransform uintptr } type Lib3MFImplementationHandle interface { @@ -871,7 +998,22 @@ func (implementation *Lib3MFImplementation) Initialize(DLLFileName string) error if err != nil { return errors.New("Could not get function lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup: " + err.Error()) } - + + implementation.Lib3MF_image3diterator_getcurrentimage3d, err = syscall.GetProcAddress(dllHandle, "lib3mf_image3diterator_getcurrentimage3d") + if (err != nil) { + return errors.New("Could not get function lib3mf_image3diterator_getcurrentimage3d: " + err.Error()) + } + + implementation.Lib3MF_scalarfielditerator_getcurrentscalarfield, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfielditerator_getcurrentscalarfield") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfielditerator_getcurrentscalarfield: " + err.Error()) + } + + implementation.Lib3MF_vector3dfielditerator_getcurrentvector3dfield, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfielditerator_getcurrentvector3dfield") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfielditerator_getcurrentvector3dfield: " + err.Error()) + } + implementation.Lib3MF_metadata_getnamespace, err = syscall.GetProcAddress(dllHandle, "lib3mf_metadata_getnamespace") if err != nil { return errors.New("Could not get function lib3mf_metadata_getnamespace: " + err.Error()) @@ -1166,7 +1308,12 @@ func (implementation *Lib3MFImplementation) Initialize(DLLFileName string) error if err != nil { return errors.New("Could not get function lib3mf_meshobject_beamlattice: " + err.Error()) } - + + implementation.Lib3MF_meshobject_volumedata, err = syscall.GetProcAddress(dllHandle, "lib3mf_meshobject_volumedata") + if (err != nil) { + return errors.New("Could not get function lib3mf_meshobject_volumedata: " + err.Error()) + } + implementation.Lib3MF_beamlattice_getminlength, err = syscall.GetProcAddress(dllHandle, "lib3mf_beamlattice_getminlength") if err != nil { return errors.New("Could not get function lib3mf_beamlattice_getminlength: " + err.Error()) @@ -1281,7 +1428,462 @@ func (implementation *Lib3MFImplementation) Initialize(DLLFileName string) error if err != nil { return errors.New("Could not get function lib3mf_beamlattice_getbeamset: " + err.Error()) } - + + implementation.Lib3MF_scalarfield_getname, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfield_getname") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfield_getname: " + err.Error()) + } + + implementation.Lib3MF_scalarfield_setname, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfield_setname") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfield_setname: " + err.Error()) + } + + implementation.Lib3MF_scalarfield_isfromimage3d, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfield_isfromimage3d") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfield_isfromimage3d: " + err.Error()) + } + + implementation.Lib3MF_scalarfield_isconstant, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfield_isconstant") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfield_isconstant: " + err.Error()) + } + + implementation.Lib3MF_scalarfield_iscomposed, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfield_iscomposed") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfield_iscomposed: " + err.Error()) + } + + implementation.Lib3MF_vector3dfield_getname, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfield_getname") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfield_getname: " + err.Error()) + } + + implementation.Lib3MF_vector3dfield_setname, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfield_setname") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfield_setname: " + err.Error()) + } + + implementation.Lib3MF_vector3dfield_isfromimage3d, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfield_isfromimage3d") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfield_isfromimage3d: " + err.Error()) + } + + implementation.Lib3MF_vector3dfield_isconstant, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfield_isconstant") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfield_isconstant: " + err.Error()) + } + + implementation.Lib3MF_vector3dfield_iscomposed, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfield_iscomposed") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfield_iscomposed: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_getimage, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_getimage") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_getimage: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_setimage, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_setimage") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_setimage: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_setchannel, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_setchannel") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_setchannel: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_getchannel, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_getchannel") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_getchannel: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_setfilter, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_setfilter") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_setfilter: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_getfilter, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_getfilter") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_getfilter: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_settilestyles, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_settilestyles") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_settilestyles: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_gettilestyles, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_gettilestyles") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_gettilestyles: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_getoffset, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_getoffset") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_getoffset: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_setoffset, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_setoffset") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_setoffset: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_getscale, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_getscale") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_getscale: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldfromimage3d_setscale, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldfromimage3d_setscale") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldfromimage3d_setscale: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldconstant_getvalue, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldconstant_getvalue") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldconstant_getvalue: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldconstant_setvalue, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldconstant_setvalue") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldconstant_setvalue: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldcomposed_setmethod, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldcomposed_setmethod") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldcomposed_setmethod: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldcomposed_getmethod, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldcomposed_getmethod") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldcomposed_getmethod: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldcomposed_getfactor1, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldcomposed_getfactor1") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldcomposed_getfactor1: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldcomposed_setfactor1, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldcomposed_setfactor1") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldcomposed_setfactor1: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldcomposed_getfactor2, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldcomposed_getfactor2") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldcomposed_getfactor2: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldcomposed_setfactor2, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldcomposed_setfactor2") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldcomposed_setfactor2: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldcomposed_scalarfieldreference1, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldcomposed_scalarfieldreference1") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldcomposed_scalarfieldreference1: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldcomposed_scalarfieldreference2, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldcomposed_scalarfieldreference2") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldcomposed_scalarfieldreference2: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldcomposed_scalarfieldreferencemask, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldcomposed_scalarfieldreferencemask") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldcomposed_scalarfieldreferencemask: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldfromimage3d_getimage, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldfromimage3d_getimage") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldfromimage3d_getimage: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldfromimage3d_setimage, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldfromimage3d_setimage") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldfromimage3d_setimage: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldfromimage3d_setfilter, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldfromimage3d_setfilter") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldfromimage3d_setfilter: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldfromimage3d_getfilter, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldfromimage3d_getfilter") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldfromimage3d_getfilter: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldfromimage3d_settilestyles, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldfromimage3d_settilestyles") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldfromimage3d_settilestyles: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldfromimage3d_gettilestyles, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldfromimage3d_gettilestyles") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldfromimage3d_gettilestyles: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldfromimage3d_getoffset, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldfromimage3d_getoffset") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldfromimage3d_getoffset: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldfromimage3d_setoffset, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldfromimage3d_setoffset") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldfromimage3d_setoffset: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldfromimage3d_getscale, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldfromimage3d_getscale") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldfromimage3d_getscale: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldfromimage3d_setscale, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldfromimage3d_setscale") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldfromimage3d_setscale: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldconstant_getvaluex, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldconstant_getvaluex") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldconstant_getvaluex: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldconstant_setvaluex, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldconstant_setvaluex") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldconstant_setvaluex: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldconstant_getvaluey, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldconstant_getvaluey") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldconstant_getvaluey: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldconstant_setvaluey, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldconstant_setvaluey") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldconstant_setvaluey: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldconstant_getvaluez, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldconstant_getvaluez") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldconstant_getvaluez: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldconstant_setvaluez, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldconstant_setvaluez") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldconstant_setvaluez: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldcomposed_setmethod, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldcomposed_setmethod") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldcomposed_setmethod: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldcomposed_getmethod, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldcomposed_getmethod") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldcomposed_getmethod: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldcomposed_setspace, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldcomposed_setspace") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldcomposed_setspace: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldcomposed_getspace, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldcomposed_getspace") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldcomposed_getspace: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldcomposed_getfactor1, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldcomposed_getfactor1") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldcomposed_getfactor1: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldcomposed_setfactor1, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldcomposed_setfactor1") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldcomposed_setfactor1: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldcomposed_getfactor2, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldcomposed_getfactor2") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldcomposed_getfactor2: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldcomposed_setfactor2, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldcomposed_setfactor2") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldcomposed_setfactor2: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldcomposed_vector3dfieldreference1, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldcomposed_vector3dfieldreference1") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldcomposed_vector3dfieldreference1: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldcomposed_vector3dfieldreference2, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldcomposed_vector3dfieldreference2") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldcomposed_vector3dfieldreference2: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldcomposed_scalarfieldreferencemask, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldcomposed_scalarfieldreferencemask") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldcomposed_scalarfieldreferencemask: " + err.Error()) + } + + implementation.Lib3MF_fieldreference_getfieldresourceid, err = syscall.GetProcAddress(dllHandle, "lib3mf_fieldreference_getfieldresourceid") + if (err != nil) { + return errors.New("Could not get function lib3mf_fieldreference_getfieldresourceid: " + err.Error()) + } + + implementation.Lib3MF_fieldreference_setfieldresourceid, err = syscall.GetProcAddress(dllHandle, "lib3mf_fieldreference_setfieldresourceid") + if (err != nil) { + return errors.New("Could not get function lib3mf_fieldreference_setfieldresourceid: " + err.Error()) + } + + implementation.Lib3MF_fieldreference_gettransform, err = syscall.GetProcAddress(dllHandle, "lib3mf_fieldreference_gettransform") + if (err != nil) { + return errors.New("Could not get function lib3mf_fieldreference_gettransform: " + err.Error()) + } + + implementation.Lib3MF_fieldreference_settransform, err = syscall.GetProcAddress(dllHandle, "lib3mf_fieldreference_settransform") + if (err != nil) { + return errors.New("Could not get function lib3mf_fieldreference_settransform: " + err.Error()) + } + + implementation.Lib3MF_scalarfieldreference_setscalarfield, err = syscall.GetProcAddress(dllHandle, "lib3mf_scalarfieldreference_setscalarfield") + if (err != nil) { + return errors.New("Could not get function lib3mf_scalarfieldreference_setscalarfield: " + err.Error()) + } + + implementation.Lib3MF_vector3dfieldreference_setvector3dfield, err = syscall.GetProcAddress(dllHandle, "lib3mf_vector3dfieldreference_setvector3dfield") + if (err != nil) { + return errors.New("Could not get function lib3mf_vector3dfieldreference_setvector3dfield: " + err.Error()) + } + + implementation.Lib3MF_volumedataboundary_getsolidthreshold, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedataboundary_getsolidthreshold") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedataboundary_getsolidthreshold: " + err.Error()) + } + + implementation.Lib3MF_volumedataboundary_setsolidthreshold, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedataboundary_setsolidthreshold") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedataboundary_setsolidthreshold: " + err.Error()) + } + + implementation.Lib3MF_volumedatacomposite_getbasematerialgroup, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedatacomposite_getbasematerialgroup") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedatacomposite_getbasematerialgroup: " + err.Error()) + } + + implementation.Lib3MF_volumedatacomposite_setbasematerialgroup, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedatacomposite_setbasematerialgroup") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedatacomposite_setbasematerialgroup: " + err.Error()) + } + + implementation.Lib3MF_volumedatacomposite_getmaterialmappingcount, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedatacomposite_getmaterialmappingcount") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedatacomposite_getmaterialmappingcount: " + err.Error()) + } + + implementation.Lib3MF_volumedatacomposite_getmaterialmapping, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedatacomposite_getmaterialmapping") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedatacomposite_getmaterialmapping: " + err.Error()) + } + + implementation.Lib3MF_volumedatacomposite_addmaterialmapping, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedatacomposite_addmaterialmapping") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedatacomposite_addmaterialmapping: " + err.Error()) + } + + implementation.Lib3MF_volumedatacomposite_removematerialmapping, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedatacomposite_removematerialmapping") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedatacomposite_removematerialmapping: " + err.Error()) + } + + implementation.Lib3MF_volumedataproperty_getname, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedataproperty_getname") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedataproperty_getname: " + err.Error()) + } + + implementation.Lib3MF_volumedataproperty_setisrequired, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedataproperty_setisrequired") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedataproperty_setisrequired: " + err.Error()) + } + + implementation.Lib3MF_volumedataproperty_isrequired, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedataproperty_isrequired") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedataproperty_isrequired: " + err.Error()) + } + + implementation.Lib3MF_volumedata_getboundary, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_getboundary") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_getboundary: " + err.Error()) + } + + implementation.Lib3MF_volumedata_createnewboundary, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_createnewboundary") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_createnewboundary: " + err.Error()) + } + + implementation.Lib3MF_volumedata_removeboundary, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_removeboundary") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_removeboundary: " + err.Error()) + } + + implementation.Lib3MF_volumedata_getcomposite, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_getcomposite") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_getcomposite: " + err.Error()) + } + + implementation.Lib3MF_volumedata_createnewcomposite, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_createnewcomposite") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_createnewcomposite: " + err.Error()) + } + + implementation.Lib3MF_volumedata_removecomposite, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_removecomposite") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_removecomposite: " + err.Error()) + } + + implementation.Lib3MF_volumedata_getcolor, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_getcolor") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_getcolor: " + err.Error()) + } + + implementation.Lib3MF_volumedata_createnewcolor, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_createnewcolor") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_createnewcolor: " + err.Error()) + } + + implementation.Lib3MF_volumedata_removecolor, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_removecolor") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_removecolor: " + err.Error()) + } + + implementation.Lib3MF_volumedata_getpropertycount, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_getpropertycount") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_getpropertycount: " + err.Error()) + } + + implementation.Lib3MF_volumedata_getproperty, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_getproperty") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_getproperty: " + err.Error()) + } + + implementation.Lib3MF_volumedata_addpropertyfromscalarfield, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_addpropertyfromscalarfield") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_addpropertyfromscalarfield: " + err.Error()) + } + + implementation.Lib3MF_volumedata_addpropertyfromvector3dfield, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_addpropertyfromvector3dfield") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_addpropertyfromvector3dfield: " + err.Error()) + } + + implementation.Lib3MF_volumedata_removeproperty, err = syscall.GetProcAddress(dllHandle, "lib3mf_volumedata_removeproperty") + if (err != nil) { + return errors.New("Could not get function lib3mf_volumedata_removeproperty: " + err.Error()) + } + implementation.Lib3MF_component_getobjectresource, err = syscall.GetProcAddress(dllHandle, "lib3mf_component_getobjectresource") if err != nil { return errors.New("Could not get function lib3mf_component_getobjectresource: " + err.Error()) @@ -1561,7 +2163,72 @@ func (implementation *Lib3MFImplementation) Initialize(DLLFileName string) error if err != nil { return errors.New("Could not get function lib3mf_multipropertygroup_removelayer: " + err.Error()) } - + + implementation.Lib3MF_image3d_getname, err = syscall.GetProcAddress(dllHandle, "lib3mf_image3d_getname") + if (err != nil) { + return errors.New("Could not get function lib3mf_image3d_getname: " + err.Error()) + } + + implementation.Lib3MF_image3d_setname, err = syscall.GetProcAddress(dllHandle, "lib3mf_image3d_setname") + if (err != nil) { + return errors.New("Could not get function lib3mf_image3d_setname: " + err.Error()) + } + + implementation.Lib3MF_image3d_isimagestack, err = syscall.GetProcAddress(dllHandle, "lib3mf_image3d_isimagestack") + if (err != nil) { + return errors.New("Could not get function lib3mf_image3d_isimagestack: " + err.Error()) + } + + implementation.Lib3MF_imagestack_getrowcount, err = syscall.GetProcAddress(dllHandle, "lib3mf_imagestack_getrowcount") + if (err != nil) { + return errors.New("Could not get function lib3mf_imagestack_getrowcount: " + err.Error()) + } + + implementation.Lib3MF_imagestack_setrowcount, err = syscall.GetProcAddress(dllHandle, "lib3mf_imagestack_setrowcount") + if (err != nil) { + return errors.New("Could not get function lib3mf_imagestack_setrowcount: " + err.Error()) + } + + implementation.Lib3MF_imagestack_getcolumncount, err = syscall.GetProcAddress(dllHandle, "lib3mf_imagestack_getcolumncount") + if (err != nil) { + return errors.New("Could not get function lib3mf_imagestack_getcolumncount: " + err.Error()) + } + + implementation.Lib3MF_imagestack_setcolumncount, err = syscall.GetProcAddress(dllHandle, "lib3mf_imagestack_setcolumncount") + if (err != nil) { + return errors.New("Could not get function lib3mf_imagestack_setcolumncount: " + err.Error()) + } + + implementation.Lib3MF_imagestack_getsheetcount, err = syscall.GetProcAddress(dllHandle, "lib3mf_imagestack_getsheetcount") + if (err != nil) { + return errors.New("Could not get function lib3mf_imagestack_getsheetcount: " + err.Error()) + } + + implementation.Lib3MF_imagestack_getsheet, err = syscall.GetProcAddress(dllHandle, "lib3mf_imagestack_getsheet") + if (err != nil) { + return errors.New("Could not get function lib3mf_imagestack_getsheet: " + err.Error()) + } + + implementation.Lib3MF_imagestack_setsheet, err = syscall.GetProcAddress(dllHandle, "lib3mf_imagestack_setsheet") + if (err != nil) { + return errors.New("Could not get function lib3mf_imagestack_setsheet: " + err.Error()) + } + + implementation.Lib3MF_imagestack_createemptysheet, err = syscall.GetProcAddress(dllHandle, "lib3mf_imagestack_createemptysheet") + if (err != nil) { + return errors.New("Could not get function lib3mf_imagestack_createemptysheet: " + err.Error()) + } + + implementation.Lib3MF_imagestack_createsheetfrombuffer, err = syscall.GetProcAddress(dllHandle, "lib3mf_imagestack_createsheetfrombuffer") + if (err != nil) { + return errors.New("Could not get function lib3mf_imagestack_createsheetfrombuffer: " + err.Error()) + } + + implementation.Lib3MF_imagestack_createsheetfromfile, err = syscall.GetProcAddress(dllHandle, "lib3mf_imagestack_createsheetfromfile") + if (err != nil) { + return errors.New("Could not get function lib3mf_imagestack_createsheetfromfile: " + err.Error()) + } + implementation.Lib3MF_attachment_getpath, err = syscall.GetProcAddress(dllHandle, "lib3mf_attachment_getpath") if err != nil { return errors.New("Could not get function lib3mf_attachment_getpath: " + err.Error()) @@ -2196,7 +2863,22 @@ func (implementation *Lib3MFImplementation) Initialize(DLLFileName string) error if err != nil { return errors.New("Could not get function lib3mf_model_getslicestacks: " + err.Error()) } - + + implementation.Lib3MF_model_getimage3ds, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getimage3ds") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getimage3ds: " + err.Error()) + } + + implementation.Lib3MF_model_getscalarfields, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getscalarfields") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getscalarfields: " + err.Error()) + } + + implementation.Lib3MF_model_getvector3dfields, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getvector3dfields") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getvector3dfields: " + err.Error()) + } + implementation.Lib3MF_model_mergetomodel, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_mergetomodel") if err != nil { return errors.New("Could not get function lib3mf_model_mergetomodel: " + err.Error()) @@ -2246,7 +2928,87 @@ func (implementation *Lib3MFImplementation) Initialize(DLLFileName string) error if err != nil { return errors.New("Could not get function lib3mf_model_addmultipropertygroup: " + err.Error()) } - + + implementation.Lib3MF_model_addimagestack, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_addimagestack") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_addimagestack: " + err.Error()) + } + + implementation.Lib3MF_model_getimagestackbyid, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getimagestackbyid") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getimagestackbyid: " + err.Error()) + } + + implementation.Lib3MF_model_addscalarfieldfromimage3d, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_addscalarfieldfromimage3d") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_addscalarfieldfromimage3d: " + err.Error()) + } + + implementation.Lib3MF_model_addscalarfieldcomposed, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_addscalarfieldcomposed") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_addscalarfieldcomposed: " + err.Error()) + } + + implementation.Lib3MF_model_addscalarfieldconstant, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_addscalarfieldconstant") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_addscalarfieldconstant: " + err.Error()) + } + + implementation.Lib3MF_model_getscalarfieldbyid, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getscalarfieldbyid") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getscalarfieldbyid: " + err.Error()) + } + + implementation.Lib3MF_model_getscalarfieldfromimage3dbyid, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getscalarfieldfromimage3dbyid") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getscalarfieldfromimage3dbyid: " + err.Error()) + } + + implementation.Lib3MF_model_getscalarfieldcomposedbyid, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getscalarfieldcomposedbyid") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getscalarfieldcomposedbyid: " + err.Error()) + } + + implementation.Lib3MF_model_getscalarfieldconstantbyid, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getscalarfieldconstantbyid") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getscalarfieldconstantbyid: " + err.Error()) + } + + implementation.Lib3MF_model_addvector3dfieldfromimage3d, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_addvector3dfieldfromimage3d") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_addvector3dfieldfromimage3d: " + err.Error()) + } + + implementation.Lib3MF_model_addvector3dfieldcomposed, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_addvector3dfieldcomposed") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_addvector3dfieldcomposed: " + err.Error()) + } + + implementation.Lib3MF_model_addvector3dfieldconstant, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_addvector3dfieldconstant") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_addvector3dfieldconstant: " + err.Error()) + } + + implementation.Lib3MF_model_getvector3dfieldbyid, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getvector3dfieldbyid") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getvector3dfieldbyid: " + err.Error()) + } + + implementation.Lib3MF_model_getvector3dfieldfromimage3dbyid, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getvector3dfieldfromimage3dbyid") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getvector3dfieldfromimage3dbyid: " + err.Error()) + } + + implementation.Lib3MF_model_getvector3dfieldcomposedbyid, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getvector3dfieldcomposedbyid") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getvector3dfieldcomposedbyid: " + err.Error()) + } + + implementation.Lib3MF_model_getvector3dfieldconstantbyid, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_getvector3dfieldconstantbyid") + if (err != nil) { + return errors.New("Could not get function lib3mf_model_getvector3dfieldconstantbyid: " + err.Error()) + } + implementation.Lib3MF_model_addbuilditem, err = syscall.GetProcAddress(dllHandle, "lib3mf_model_addbuilditem") if err != nil { return errors.New("Could not get function lib3mf_model_addbuilditem: " + err.Error()) @@ -3301,10 +4063,61 @@ func (implementation *Lib3MFImplementation) MultiPropertyGroupIterator_GetCurren } err = implementation.CallFunction(implementation.Lib3MF_multipropertygroupiterator_getcurrentmultipropertygroup, implementation_multipropertygroupiterator.GetDLLInHandle(), hResource.GetDLLOutHandle()) - if err != nil { + if (err != nil) { + return hResource, err + } + + return hResource, err +} + +func (implementation *Lib3MFImplementation) Image3DIterator_GetCurrentImage3D(Image3DIterator Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hResource := implementation.NewHandle() + + implementation_image3diterator, err := implementation.GetWrapperHandle(Image3DIterator) + if (err != nil) { + return hResource, err + } + + err = implementation.CallFunction(implementation.Lib3MF_image3diterator_getcurrentimage3d, implementation_image3diterator.GetDLLInHandle(), hResource.GetDLLOutHandle()) + if (err != nil) { + return hResource, err + } + + return hResource, err +} + +func (implementation *Lib3MFImplementation) ScalarFieldIterator_GetCurrentScalarField(ScalarFieldIterator Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hResource := implementation.NewHandle() + + implementation_scalarfielditerator, err := implementation.GetWrapperHandle(ScalarFieldIterator) + if (err != nil) { + return hResource, err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfielditerator_getcurrentscalarfield, implementation_scalarfielditerator.GetDLLInHandle(), hResource.GetDLLOutHandle()) + if (err != nil) { + return hResource, err + } + + return hResource, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldIterator_GetCurrentVector3DField(Vector3DFieldIterator Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hResource := implementation.NewHandle() + + implementation_vector3dfielditerator, err := implementation.GetWrapperHandle(Vector3DFieldIterator) + if (err != nil) { return hResource, err } + err = implementation.CallFunction(implementation.Lib3MF_vector3dfielditerator_getcurrentvector3dfield, implementation_vector3dfielditerator.GetDLLInHandle(), hResource.GetDLLOutHandle()) + if (err != nil) { + return hResource, err + } + return hResource, err } @@ -4403,6 +5216,23 @@ func (implementation *Lib3MFImplementation) MeshObject_BeamLattice(MeshObject Li return hTheBeamLattice, err } +func (implementation *Lib3MFImplementation) MeshObject_VolumeData(MeshObject Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheVolumeData := implementation.NewHandle() + + implementation_meshobject, err := implementation.GetWrapperHandle(MeshObject) + if (err != nil) { + return hTheVolumeData, err + } + + err = implementation.CallFunction(implementation.Lib3MF_meshobject_volumedata, implementation_meshobject.GetDLLInHandle(), hTheVolumeData.GetDLLOutHandle()) + if (err != nil) { + return hTheVolumeData, err + } + + return hTheVolumeData, err +} + func (implementation *Lib3MFImplementation) BeamLattice_GetMinLength(BeamLattice Lib3MFHandle) (float64, error) { var err error = nil var dMinLength float64 = 0 @@ -4797,256 +5627,1887 @@ func (implementation *Lib3MFImplementation) BeamLattice_GetBeamSet(BeamLattice L return hBeamSet, err } -func (implementation *Lib3MFImplementation) Component_GetObjectResource(Component Lib3MFHandle) (Lib3MFHandle, error) { +func (implementation *Lib3MFImplementation) ScalarField_GetName(ScalarField Lib3MFHandle) (string, error) { var err error = nil - hObjectResource := implementation.NewHandle() + var neededforName int64 = 0 + var filledinName int64 = 0 + + implementation_scalarfield, err := implementation.GetWrapperHandle(ScalarField) + if (err != nil) { + return "", err + } - implementation_component, err := implementation.GetWrapperHandle(Component) - if err != nil { - return hObjectResource, err + err = implementation.CallFunction(implementation.Lib3MF_scalarfield_getname, implementation_scalarfield.GetDLLInHandle(), Int64InValue(0), Int64OutValue(&neededforName), Int64InValue(0)) + if (err != nil) { + return "", err + } + bufferSizeName := neededforName + bufferName := make([]byte, bufferSizeName) + err = implementation.CallFunction(implementation.Lib3MF_scalarfield_getname, implementation_scalarfield.GetDLLInHandle(), Int64InValue(bufferSizeName), Int64OutValue(&filledinName), uintptr(unsafe.Pointer(&bufferName[0]))) + if (err != nil) { + return "", err } + + return string(bufferName[:(filledinName-1)]), err +} - err = implementation.CallFunction(implementation.Lib3MF_component_getobjectresource, implementation_component.GetDLLInHandle(), hObjectResource.GetDLLOutHandle()) - if err != nil { - return hObjectResource, err +func (implementation *Lib3MFImplementation) ScalarField_SetName(ScalarField Lib3MFHandle, sName string) (error) { + var err error = nil + + implementation_scalarfield, err := implementation.GetWrapperHandle(ScalarField) + if (err != nil) { + return err } - return hObjectResource, err + err = implementation.CallFunction(implementation.Lib3MF_scalarfield_setname, implementation_scalarfield.GetDLLInHandle(), StringInValue(sName)) + if (err != nil) { + return err + } + + return err } -func (implementation *Lib3MFImplementation) Component_GetObjectResourceID(Component Lib3MFHandle) (uint32, error) { +func (implementation *Lib3MFImplementation) ScalarField_IsFromImage3D(ScalarField Lib3MFHandle) (bool, error) { var err error = nil - var nUniqueResourceID uint32 = 0 + var bIsFromImage3D int64 = 0 + + implementation_scalarfield, err := implementation.GetWrapperHandle(ScalarField) + if (err != nil) { + return false, err + } - implementation_component, err := implementation.GetWrapperHandle(Component) - if err != nil { - return 0, err + err = implementation.CallFunction(implementation.Lib3MF_scalarfield_isfromimage3d, implementation_scalarfield.GetDLLInHandle(), Int64OutValue(&bIsFromImage3D)) + if (err != nil) { + return false, err } + + return (bIsFromImage3D != 0), err +} - err = implementation.CallFunction(implementation.Lib3MF_component_getobjectresourceid, implementation_component.GetDLLInHandle(), UInt32OutValue(&nUniqueResourceID)) - if err != nil { - return 0, err +func (implementation *Lib3MFImplementation) ScalarField_IsConstant(ScalarField Lib3MFHandle) (bool, error) { + var err error = nil + var bIsConstant int64 = 0 + + implementation_scalarfield, err := implementation.GetWrapperHandle(ScalarField) + if (err != nil) { + return false, err } - return uint32(nUniqueResourceID), err + err = implementation.CallFunction(implementation.Lib3MF_scalarfield_isconstant, implementation_scalarfield.GetDLLInHandle(), Int64OutValue(&bIsConstant)) + if (err != nil) { + return false, err + } + + return (bIsConstant != 0), err } -func (implementation *Lib3MFImplementation) Component_GetUUID(Component Lib3MFHandle) (bool, string, error) { +func (implementation *Lib3MFImplementation) ScalarField_IsComposed(ScalarField Lib3MFHandle) (bool, error) { var err error = nil - var bHasUUID int64 = 0 - var neededforUUID int64 = 0 - var filledinUUID int64 = 0 - - implementation_component, err := implementation.GetWrapperHandle(Component) - if err != nil { - return false, "", err + var bIsComposed int64 = 0 + + implementation_scalarfield, err := implementation.GetWrapperHandle(ScalarField) + if (err != nil) { + return false, err } - err = implementation.CallFunction(implementation.Lib3MF_component_getuuid, implementation_component.GetDLLInHandle(), Int64OutValue(&bHasUUID), Int64InValue(0), Int64OutValue(&neededforUUID), Int64InValue(0)) - if err != nil { - return false, "", err + err = implementation.CallFunction(implementation.Lib3MF_scalarfield_iscomposed, implementation_scalarfield.GetDLLInHandle(), Int64OutValue(&bIsComposed)) + if (err != nil) { + return false, err } - bufferSizeUUID := neededforUUID - bufferUUID := make([]byte, bufferSizeUUID) - err = implementation.CallFunction(implementation.Lib3MF_component_getuuid, implementation_component.GetDLLInHandle(), Int64OutValue(&bHasUUID), Int64InValue(bufferSizeUUID), Int64OutValue(&filledinUUID), uintptr(unsafe.Pointer(&bufferUUID[0]))) - if err != nil { - return false, "", err + + return (bIsComposed != 0), err +} + +func (implementation *Lib3MFImplementation) Vector3DField_GetName(Vector3DField Lib3MFHandle) (string, error) { + var err error = nil + var neededforName int64 = 0 + var filledinName int64 = 0 + + implementation_vector3dfield, err := implementation.GetWrapperHandle(Vector3DField) + if (err != nil) { + return "", err } - return (bHasUUID != 0), string(bufferUUID[:(filledinUUID - 1)]), err + err = implementation.CallFunction(implementation.Lib3MF_vector3dfield_getname, implementation_vector3dfield.GetDLLInHandle(), Int64InValue(0), Int64OutValue(&neededforName), Int64InValue(0)) + if (err != nil) { + return "", err + } + bufferSizeName := neededforName + bufferName := make([]byte, bufferSizeName) + err = implementation.CallFunction(implementation.Lib3MF_vector3dfield_getname, implementation_vector3dfield.GetDLLInHandle(), Int64InValue(bufferSizeName), Int64OutValue(&filledinName), uintptr(unsafe.Pointer(&bufferName[0]))) + if (err != nil) { + return "", err + } + + return string(bufferName[:(filledinName-1)]), err } -func (implementation *Lib3MFImplementation) Component_SetUUID(Component Lib3MFHandle, sUUID string) error { +func (implementation *Lib3MFImplementation) Vector3DField_SetName(Vector3DField Lib3MFHandle, sName string) (error) { var err error = nil - - implementation_component, err := implementation.GetWrapperHandle(Component) - if err != nil { + + implementation_vector3dfield, err := implementation.GetWrapperHandle(Vector3DField) + if (err != nil) { return err } - err = implementation.CallFunction(implementation.Lib3MF_component_setuuid, implementation_component.GetDLLInHandle(), StringInValue(sUUID)) - if err != nil { + err = implementation.CallFunction(implementation.Lib3MF_vector3dfield_setname, implementation_vector3dfield.GetDLLInHandle(), StringInValue(sName)) + if (err != nil) { return err } - + return err } -func (implementation *Lib3MFImplementation) Component_HasTransform(Component Lib3MFHandle) (bool, error) { +func (implementation *Lib3MFImplementation) Vector3DField_IsFromImage3D(Vector3DField Lib3MFHandle) (bool, error) { var err error = nil - var bHasTransform int64 = 0 - - implementation_component, err := implementation.GetWrapperHandle(Component) - if err != nil { + var bIsFromImage3D int64 = 0 + + implementation_vector3dfield, err := implementation.GetWrapperHandle(Vector3DField) + if (err != nil) { return false, err } - err = implementation.CallFunction(implementation.Lib3MF_component_hastransform, implementation_component.GetDLLInHandle(), Int64OutValue(&bHasTransform)) - if err != nil { + err = implementation.CallFunction(implementation.Lib3MF_vector3dfield_isfromimage3d, implementation_vector3dfield.GetDLLInHandle(), Int64OutValue(&bIsFromImage3D)) + if (err != nil) { return false, err } - - return (bHasTransform != 0), err + + return (bIsFromImage3D != 0), err } -func (implementation *Lib3MFImplementation) Component_GetTransform(Component Lib3MFHandle) (sLib3MFTransform, error) { +func (implementation *Lib3MFImplementation) Vector3DField_IsConstant(Vector3DField Lib3MFHandle) (bool, error) { var err error = nil - var sTransform sLib3MFTransform - - implementation_component, err := implementation.GetWrapperHandle(Component) - if err != nil { - return sTransform, err + var bIsConstant int64 = 0 + + implementation_vector3dfield, err := implementation.GetWrapperHandle(Vector3DField) + if (err != nil) { + return false, err } - err = implementation.CallFunction(implementation.Lib3MF_component_gettransform, implementation_component.GetDLLInHandle(), 0) - if err != nil { - return sTransform, err + err = implementation.CallFunction(implementation.Lib3MF_vector3dfield_isconstant, implementation_vector3dfield.GetDLLInHandle(), Int64OutValue(&bIsConstant)) + if (err != nil) { + return false, err } - - return sTransform, err + + return (bIsConstant != 0), err } -func (implementation *Lib3MFImplementation) Component_SetTransform(Component Lib3MFHandle, sTransform sLib3MFTransform) error { +func (implementation *Lib3MFImplementation) Vector3DField_IsComposed(Vector3DField Lib3MFHandle) (bool, error) { var err error = nil + var bIsComposed int64 = 0 + + implementation_vector3dfield, err := implementation.GetWrapperHandle(Vector3DField) + if (err != nil) { + return false, err + } - implementation_component, err := implementation.GetWrapperHandle(Component) - if err != nil { - return err + err = implementation.CallFunction(implementation.Lib3MF_vector3dfield_iscomposed, implementation_vector3dfield.GetDLLInHandle(), Int64OutValue(&bIsComposed)) + if (err != nil) { + return false, err } + + return (bIsComposed != 0), err +} - err = implementation.CallFunction(implementation.Lib3MF_component_settransform, implementation_component.GetDLLInHandle(), uintptr(unsafe.Pointer(&sTransform))) - if err != nil { - return err +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_GetImage(ScalarFieldFromImage3D Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hImage3D := implementation.NewHandle() + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { + return hImage3D, err } - return err + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_getimage, implementation_scalarfieldfromimage3d.GetDLLInHandle(), hImage3D.GetDLLOutHandle()) + if (err != nil) { + return hImage3D, err + } + + return hImage3D, err } -func (implementation *Lib3MFImplementation) ComponentsObject_AddComponent(ComponentsObject Lib3MFHandle, ObjectResource Lib3MFHandle, sTransform sLib3MFTransform) (Lib3MFHandle, error) { +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_SetImage(ScalarFieldFromImage3D Lib3MFHandle, Image3D Lib3MFHandle) (error) { var err error = nil - hComponentInstance := implementation.NewHandle() - - implementation_componentsobject, err := implementation.GetWrapperHandle(ComponentsObject) - if err != nil { - return hComponentInstance, err + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { + return err } - implementation_objectresource, err := implementation.GetWrapperHandle(ObjectResource) - if err != nil { - return hComponentInstance, err + implementation_image3d, err := implementation.GetWrapperHandle(Image3D) + if (err != nil) { + return err } - - ObjectResourceDLLHandle := implementation_objectresource.GetDLLInHandle() - if ObjectResourceDLLHandle == 0 { + + Image3DDLLHandle := implementation_image3d.GetDLLInHandle() + if (Image3DDLLHandle == 0) { err := fmt.Errorf("Handle must not be 0.") - return hComponentInstance, err + return err } - err = implementation.CallFunction(implementation.Lib3MF_componentsobject_addcomponent, implementation_componentsobject.GetDLLInHandle(), ObjectResourceDLLHandle, uintptr(unsafe.Pointer(&sTransform)), hComponentInstance.GetDLLOutHandle()) - if err != nil { - return hComponentInstance, err + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_setimage, implementation_scalarfieldfromimage3d.GetDLLInHandle(), Image3DDLLHandle) + if (err != nil) { + return err } - - return hComponentInstance, err + + return err } -func (implementation *Lib3MFImplementation) ComponentsObject_GetComponent(ComponentsObject Lib3MFHandle, nIndex uint32) (Lib3MFHandle, error) { +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_SetChannel(ScalarFieldFromImage3D Lib3MFHandle, eName ELib3MFChannelName) (error) { var err error = nil - hComponentInstance := implementation.NewHandle() - - implementation_componentsobject, err := implementation.GetWrapperHandle(ComponentsObject) - if err != nil { - return hComponentInstance, err + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { + return err } - err = implementation.CallFunction(implementation.Lib3MF_componentsobject_getcomponent, implementation_componentsobject.GetDLLInHandle(), UInt32InValue(nIndex), hComponentInstance.GetDLLOutHandle()) - if err != nil { - return hComponentInstance, err + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_setchannel, implementation_scalarfieldfromimage3d.GetDLLInHandle(), uintptr(eName)) + if (err != nil) { + return err } - - return hComponentInstance, err + + return err } -func (implementation *Lib3MFImplementation) ComponentsObject_GetComponentCount(ComponentsObject Lib3MFHandle) (uint32, error) { +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_GetChannel(ScalarFieldFromImage3D Lib3MFHandle) (ELib3MFChannelName, error) { var err error = nil - var nCount uint32 = 0 - - implementation_componentsobject, err := implementation.GetWrapperHandle(ComponentsObject) - if err != nil { + var eName uint64 = 0 + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { return 0, err } - err = implementation.CallFunction(implementation.Lib3MF_componentsobject_getcomponentcount, implementation_componentsobject.GetDLLInHandle(), UInt32OutValue(&nCount)) - if err != nil { + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_getchannel, implementation_scalarfieldfromimage3d.GetDLLInHandle(), UInt64OutValue(&eName)) + if (err != nil) { return 0, err } - - return uint32(nCount), err + + return ELib3MFChannelName (eName), err } -func (implementation *Lib3MFImplementation) BeamSet_SetName(BeamSet Lib3MFHandle, sName string) error { +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_SetFilter(ScalarFieldFromImage3D Lib3MFHandle, eFilter ELib3MFTextureFilter) (error) { var err error = nil - - implementation_beamset, err := implementation.GetWrapperHandle(BeamSet) - if err != nil { + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { return err } - err = implementation.CallFunction(implementation.Lib3MF_beamset_setname, implementation_beamset.GetDLLInHandle(), StringInValue(sName)) - if err != nil { + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_setfilter, implementation_scalarfieldfromimage3d.GetDLLInHandle(), uintptr(eFilter)) + if (err != nil) { return err } - + return err } -func (implementation *Lib3MFImplementation) BeamSet_GetName(BeamSet Lib3MFHandle) (string, error) { +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_GetFilter(ScalarFieldFromImage3D Lib3MFHandle) (ELib3MFTextureFilter, error) { var err error = nil - var neededforName int64 = 0 - var filledinName int64 = 0 - - implementation_beamset, err := implementation.GetWrapperHandle(BeamSet) - if err != nil { - return "", err + var eFilter uint64 = 0 + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { + return 0, err } - err = implementation.CallFunction(implementation.Lib3MF_beamset_getname, implementation_beamset.GetDLLInHandle(), Int64InValue(0), Int64OutValue(&neededforName), Int64InValue(0)) - if err != nil { - return "", err - } - bufferSizeName := neededforName - bufferName := make([]byte, bufferSizeName) - err = implementation.CallFunction(implementation.Lib3MF_beamset_getname, implementation_beamset.GetDLLInHandle(), Int64InValue(bufferSizeName), Int64OutValue(&filledinName), uintptr(unsafe.Pointer(&bufferName[0]))) - if err != nil { - return "", err + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_getfilter, implementation_scalarfieldfromimage3d.GetDLLInHandle(), UInt64OutValue(&eFilter)) + if (err != nil) { + return 0, err } - - return string(bufferName[:(filledinName - 1)]), err + + return ELib3MFTextureFilter (eFilter), err } -func (implementation *Lib3MFImplementation) BeamSet_SetIdentifier(BeamSet Lib3MFHandle, sIdentifier string) error { +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_SetTileStyles(ScalarFieldFromImage3D Lib3MFHandle, eTileStyleU ELib3MFTextureTileStyle, eTileStyleV ELib3MFTextureTileStyle, eTileStyleW ELib3MFTextureTileStyle) (error) { var err error = nil - - implementation_beamset, err := implementation.GetWrapperHandle(BeamSet) - if err != nil { + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { return err } - err = implementation.CallFunction(implementation.Lib3MF_beamset_setidentifier, implementation_beamset.GetDLLInHandle(), StringInValue(sIdentifier)) - if err != nil { + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_settilestyles, implementation_scalarfieldfromimage3d.GetDLLInHandle(), uintptr(eTileStyleU), uintptr(eTileStyleV), uintptr(eTileStyleW)) + if (err != nil) { return err } - + return err } -func (implementation *Lib3MFImplementation) BeamSet_GetIdentifier(BeamSet Lib3MFHandle) (string, error) { +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_GetTileStyles(ScalarFieldFromImage3D Lib3MFHandle) (ELib3MFTextureTileStyle, ELib3MFTextureTileStyle, ELib3MFTextureTileStyle, error) { var err error = nil - var neededforIdentifier int64 = 0 - var filledinIdentifier int64 = 0 - - implementation_beamset, err := implementation.GetWrapperHandle(BeamSet) - if err != nil { - return "", err + var eTileStyleU uint64 = 0 + var eTileStyleV uint64 = 0 + var eTileStyleW uint64 = 0 + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { + return 0, 0, 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_gettilestyles, implementation_scalarfieldfromimage3d.GetDLLInHandle(), UInt64OutValue(&eTileStyleU), UInt64OutValue(&eTileStyleV), UInt64OutValue(&eTileStyleW)) + if (err != nil) { + return 0, 0, 0, err + } + + return ELib3MFTextureTileStyle (eTileStyleU), ELib3MFTextureTileStyle (eTileStyleV), ELib3MFTextureTileStyle (eTileStyleW), err +} + +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_GetOffset(ScalarFieldFromImage3D Lib3MFHandle) (float64, error) { + var err error = nil + var dOffset float64 = 0 + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_getoffset, implementation_scalarfieldfromimage3d.GetDLLInHandle(), Float64OutValue(&dOffset)) + if (err != nil) { + return 0, err + } + + return dOffset, err +} + +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_SetOffset(ScalarFieldFromImage3D Lib3MFHandle, dOffset float64) (error) { + var err error = nil + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_setoffset, implementation_scalarfieldfromimage3d.GetDLLInHandle(), Float64InValue(dOffset)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_GetScale(ScalarFieldFromImage3D Lib3MFHandle) (float64, error) { + var err error = nil + var dScale float64 = 0 + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_getscale, implementation_scalarfieldfromimage3d.GetDLLInHandle(), Float64OutValue(&dScale)) + if (err != nil) { + return 0, err + } + + return dScale, err +} + +func (implementation *Lib3MFImplementation) ScalarFieldFromImage3D_SetScale(ScalarFieldFromImage3D Lib3MFHandle, dScale float64) (error) { + var err error = nil + + implementation_scalarfieldfromimage3d, err := implementation.GetWrapperHandle(ScalarFieldFromImage3D) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldfromimage3d_setscale, implementation_scalarfieldfromimage3d.GetDLLInHandle(), Float64InValue(dScale)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) ScalarFieldConstant_GetValue(ScalarFieldConstant Lib3MFHandle) (float64, error) { + var err error = nil + var dValue float64 = 0 + + implementation_scalarfieldconstant, err := implementation.GetWrapperHandle(ScalarFieldConstant) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldconstant_getvalue, implementation_scalarfieldconstant.GetDLLInHandle(), Float64OutValue(&dValue)) + if (err != nil) { + return 0, err + } + + return dValue, err +} + +func (implementation *Lib3MFImplementation) ScalarFieldConstant_SetValue(ScalarFieldConstant Lib3MFHandle, dValue float64) (error) { + var err error = nil + + implementation_scalarfieldconstant, err := implementation.GetWrapperHandle(ScalarFieldConstant) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldconstant_setvalue, implementation_scalarfieldconstant.GetDLLInHandle(), Float64InValue(dValue)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) ScalarFieldComposed_SetMethod(ScalarFieldComposed Lib3MFHandle, eTheMethod ELib3MFCompositionMethod) (error) { + var err error = nil + + implementation_scalarfieldcomposed, err := implementation.GetWrapperHandle(ScalarFieldComposed) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldcomposed_setmethod, implementation_scalarfieldcomposed.GetDLLInHandle(), uintptr(eTheMethod)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) ScalarFieldComposed_GetMethod(ScalarFieldComposed Lib3MFHandle) (ELib3MFCompositionMethod, error) { + var err error = nil + var eTheMethod uint64 = 0 + + implementation_scalarfieldcomposed, err := implementation.GetWrapperHandle(ScalarFieldComposed) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldcomposed_getmethod, implementation_scalarfieldcomposed.GetDLLInHandle(), UInt64OutValue(&eTheMethod)) + if (err != nil) { + return 0, err + } + + return ELib3MFCompositionMethod (eTheMethod), err +} + +func (implementation *Lib3MFImplementation) ScalarFieldComposed_GetFactor1(ScalarFieldComposed Lib3MFHandle) (float64, error) { + var err error = nil + var dFactor1 float64 = 0 + + implementation_scalarfieldcomposed, err := implementation.GetWrapperHandle(ScalarFieldComposed) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldcomposed_getfactor1, implementation_scalarfieldcomposed.GetDLLInHandle(), Float64OutValue(&dFactor1)) + if (err != nil) { + return 0, err + } + + return dFactor1, err +} + +func (implementation *Lib3MFImplementation) ScalarFieldComposed_SetFactor1(ScalarFieldComposed Lib3MFHandle, dFactor1 float64) (error) { + var err error = nil + + implementation_scalarfieldcomposed, err := implementation.GetWrapperHandle(ScalarFieldComposed) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldcomposed_setfactor1, implementation_scalarfieldcomposed.GetDLLInHandle(), Float64InValue(dFactor1)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) ScalarFieldComposed_GetFactor2(ScalarFieldComposed Lib3MFHandle) (float64, error) { + var err error = nil + var dFactor2 float64 = 0 + + implementation_scalarfieldcomposed, err := implementation.GetWrapperHandle(ScalarFieldComposed) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldcomposed_getfactor2, implementation_scalarfieldcomposed.GetDLLInHandle(), Float64OutValue(&dFactor2)) + if (err != nil) { + return 0, err + } + + return dFactor2, err +} + +func (implementation *Lib3MFImplementation) ScalarFieldComposed_SetFactor2(ScalarFieldComposed Lib3MFHandle, dFactor2 float64) (error) { + var err error = nil + + implementation_scalarfieldcomposed, err := implementation.GetWrapperHandle(ScalarFieldComposed) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldcomposed_setfactor2, implementation_scalarfieldcomposed.GetDLLInHandle(), Float64InValue(dFactor2)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) ScalarFieldComposed_ScalarFieldReference1(ScalarFieldComposed Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheScalarFieldReference1 := implementation.NewHandle() + + implementation_scalarfieldcomposed, err := implementation.GetWrapperHandle(ScalarFieldComposed) + if (err != nil) { + return hTheScalarFieldReference1, err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldcomposed_scalarfieldreference1, implementation_scalarfieldcomposed.GetDLLInHandle(), hTheScalarFieldReference1.GetDLLOutHandle()) + if (err != nil) { + return hTheScalarFieldReference1, err + } + + return hTheScalarFieldReference1, err +} + +func (implementation *Lib3MFImplementation) ScalarFieldComposed_ScalarFieldReference2(ScalarFieldComposed Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheScalarFieldReference1 := implementation.NewHandle() + + implementation_scalarfieldcomposed, err := implementation.GetWrapperHandle(ScalarFieldComposed) + if (err != nil) { + return hTheScalarFieldReference1, err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldcomposed_scalarfieldreference2, implementation_scalarfieldcomposed.GetDLLInHandle(), hTheScalarFieldReference1.GetDLLOutHandle()) + if (err != nil) { + return hTheScalarFieldReference1, err + } + + return hTheScalarFieldReference1, err +} + +func (implementation *Lib3MFImplementation) ScalarFieldComposed_ScalarFieldReferenceMask(ScalarFieldComposed Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheScalarFieldReferenceMask := implementation.NewHandle() + + implementation_scalarfieldcomposed, err := implementation.GetWrapperHandle(ScalarFieldComposed) + if (err != nil) { + return hTheScalarFieldReferenceMask, err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldcomposed_scalarfieldreferencemask, implementation_scalarfieldcomposed.GetDLLInHandle(), hTheScalarFieldReferenceMask.GetDLLOutHandle()) + if (err != nil) { + return hTheScalarFieldReferenceMask, err + } + + return hTheScalarFieldReferenceMask, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldFromImage3D_GetImage(Vector3DFieldFromImage3D Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hImage3D := implementation.NewHandle() + + implementation_vector3dfieldfromimage3d, err := implementation.GetWrapperHandle(Vector3DFieldFromImage3D) + if (err != nil) { + return hImage3D, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldfromimage3d_getimage, implementation_vector3dfieldfromimage3d.GetDLLInHandle(), hImage3D.GetDLLOutHandle()) + if (err != nil) { + return hImage3D, err + } + + return hImage3D, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldFromImage3D_SetImage(Vector3DFieldFromImage3D Lib3MFHandle, Image3D Lib3MFHandle) (error) { + var err error = nil + + implementation_vector3dfieldfromimage3d, err := implementation.GetWrapperHandle(Vector3DFieldFromImage3D) + if (err != nil) { + return err + } + implementation_image3d, err := implementation.GetWrapperHandle(Image3D) + if (err != nil) { + return err + } + + Image3DDLLHandle := implementation_image3d.GetDLLInHandle() + if (Image3DDLLHandle == 0) { + err := fmt.Errorf("Handle must not be 0.") + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldfromimage3d_setimage, implementation_vector3dfieldfromimage3d.GetDLLInHandle(), Image3DDLLHandle) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldFromImage3D_SetFilter(Vector3DFieldFromImage3D Lib3MFHandle, eFilter ELib3MFTextureFilter) (error) { + var err error = nil + + implementation_vector3dfieldfromimage3d, err := implementation.GetWrapperHandle(Vector3DFieldFromImage3D) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldfromimage3d_setfilter, implementation_vector3dfieldfromimage3d.GetDLLInHandle(), uintptr(eFilter)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldFromImage3D_GetFilter(Vector3DFieldFromImage3D Lib3MFHandle) (ELib3MFTextureFilter, error) { + var err error = nil + var eFilter uint64 = 0 + + implementation_vector3dfieldfromimage3d, err := implementation.GetWrapperHandle(Vector3DFieldFromImage3D) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldfromimage3d_getfilter, implementation_vector3dfieldfromimage3d.GetDLLInHandle(), UInt64OutValue(&eFilter)) + if (err != nil) { + return 0, err + } + + return ELib3MFTextureFilter (eFilter), err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldFromImage3D_SetTileStyles(Vector3DFieldFromImage3D Lib3MFHandle, eTileStyleU ELib3MFTextureTileStyle, eTileStyleV ELib3MFTextureTileStyle, eTileStyleW ELib3MFTextureTileStyle) (error) { + var err error = nil + + implementation_vector3dfieldfromimage3d, err := implementation.GetWrapperHandle(Vector3DFieldFromImage3D) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldfromimage3d_settilestyles, implementation_vector3dfieldfromimage3d.GetDLLInHandle(), uintptr(eTileStyleU), uintptr(eTileStyleV), uintptr(eTileStyleW)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldFromImage3D_GetTileStyles(Vector3DFieldFromImage3D Lib3MFHandle) (ELib3MFTextureTileStyle, ELib3MFTextureTileStyle, ELib3MFTextureTileStyle, error) { + var err error = nil + var eTileStyleU uint64 = 0 + var eTileStyleV uint64 = 0 + var eTileStyleW uint64 = 0 + + implementation_vector3dfieldfromimage3d, err := implementation.GetWrapperHandle(Vector3DFieldFromImage3D) + if (err != nil) { + return 0, 0, 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldfromimage3d_gettilestyles, implementation_vector3dfieldfromimage3d.GetDLLInHandle(), UInt64OutValue(&eTileStyleU), UInt64OutValue(&eTileStyleV), UInt64OutValue(&eTileStyleW)) + if (err != nil) { + return 0, 0, 0, err + } + + return ELib3MFTextureTileStyle (eTileStyleU), ELib3MFTextureTileStyle (eTileStyleV), ELib3MFTextureTileStyle (eTileStyleW), err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldFromImage3D_GetOffset(Vector3DFieldFromImage3D Lib3MFHandle) (float64, error) { + var err error = nil + var dOffset float64 = 0 + + implementation_vector3dfieldfromimage3d, err := implementation.GetWrapperHandle(Vector3DFieldFromImage3D) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldfromimage3d_getoffset, implementation_vector3dfieldfromimage3d.GetDLLInHandle(), Float64OutValue(&dOffset)) + if (err != nil) { + return 0, err + } + + return dOffset, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldFromImage3D_SetOffset(Vector3DFieldFromImage3D Lib3MFHandle, dOffset float64) (error) { + var err error = nil + + implementation_vector3dfieldfromimage3d, err := implementation.GetWrapperHandle(Vector3DFieldFromImage3D) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldfromimage3d_setoffset, implementation_vector3dfieldfromimage3d.GetDLLInHandle(), Float64InValue(dOffset)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldFromImage3D_GetScale(Vector3DFieldFromImage3D Lib3MFHandle) (float64, error) { + var err error = nil + var dScale float64 = 0 + + implementation_vector3dfieldfromimage3d, err := implementation.GetWrapperHandle(Vector3DFieldFromImage3D) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldfromimage3d_getscale, implementation_vector3dfieldfromimage3d.GetDLLInHandle(), Float64OutValue(&dScale)) + if (err != nil) { + return 0, err + } + + return dScale, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldFromImage3D_SetScale(Vector3DFieldFromImage3D Lib3MFHandle, dScale float64) (error) { + var err error = nil + + implementation_vector3dfieldfromimage3d, err := implementation.GetWrapperHandle(Vector3DFieldFromImage3D) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldfromimage3d_setscale, implementation_vector3dfieldfromimage3d.GetDLLInHandle(), Float64InValue(dScale)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldConstant_GetValueX(Vector3DFieldConstant Lib3MFHandle) (float64, error) { + var err error = nil + var dValueX float64 = 0 + + implementation_vector3dfieldconstant, err := implementation.GetWrapperHandle(Vector3DFieldConstant) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldconstant_getvaluex, implementation_vector3dfieldconstant.GetDLLInHandle(), Float64OutValue(&dValueX)) + if (err != nil) { + return 0, err + } + + return dValueX, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldConstant_SetValueX(Vector3DFieldConstant Lib3MFHandle, dValueX float64) (error) { + var err error = nil + + implementation_vector3dfieldconstant, err := implementation.GetWrapperHandle(Vector3DFieldConstant) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldconstant_setvaluex, implementation_vector3dfieldconstant.GetDLLInHandle(), Float64InValue(dValueX)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldConstant_GetValueY(Vector3DFieldConstant Lib3MFHandle) (float64, error) { + var err error = nil + var dValueY float64 = 0 + + implementation_vector3dfieldconstant, err := implementation.GetWrapperHandle(Vector3DFieldConstant) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldconstant_getvaluey, implementation_vector3dfieldconstant.GetDLLInHandle(), Float64OutValue(&dValueY)) + if (err != nil) { + return 0, err + } + + return dValueY, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldConstant_SetValueY(Vector3DFieldConstant Lib3MFHandle, dValueY float64) (error) { + var err error = nil + + implementation_vector3dfieldconstant, err := implementation.GetWrapperHandle(Vector3DFieldConstant) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldconstant_setvaluey, implementation_vector3dfieldconstant.GetDLLInHandle(), Float64InValue(dValueY)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldConstant_GetValueZ(Vector3DFieldConstant Lib3MFHandle) (float64, error) { + var err error = nil + var dValueZ float64 = 0 + + implementation_vector3dfieldconstant, err := implementation.GetWrapperHandle(Vector3DFieldConstant) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldconstant_getvaluez, implementation_vector3dfieldconstant.GetDLLInHandle(), Float64OutValue(&dValueZ)) + if (err != nil) { + return 0, err + } + + return dValueZ, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldConstant_SetValueZ(Vector3DFieldConstant Lib3MFHandle, dValueZ float64) (error) { + var err error = nil + + implementation_vector3dfieldconstant, err := implementation.GetWrapperHandle(Vector3DFieldConstant) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldconstant_setvaluez, implementation_vector3dfieldconstant.GetDLLInHandle(), Float64InValue(dValueZ)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldComposed_SetMethod(Vector3DFieldComposed Lib3MFHandle, eTheMethod ELib3MFCompositionMethod) (error) { + var err error = nil + + implementation_vector3dfieldcomposed, err := implementation.GetWrapperHandle(Vector3DFieldComposed) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldcomposed_setmethod, implementation_vector3dfieldcomposed.GetDLLInHandle(), uintptr(eTheMethod)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldComposed_GetMethod(Vector3DFieldComposed Lib3MFHandle) (ELib3MFCompositionMethod, error) { + var err error = nil + var eTheMethod uint64 = 0 + + implementation_vector3dfieldcomposed, err := implementation.GetWrapperHandle(Vector3DFieldComposed) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldcomposed_getmethod, implementation_vector3dfieldcomposed.GetDLLInHandle(), UInt64OutValue(&eTheMethod)) + if (err != nil) { + return 0, err + } + + return ELib3MFCompositionMethod (eTheMethod), err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldComposed_SetSpace(Vector3DFieldComposed Lib3MFHandle, eTheSpace ELib3MFCompositionSpace) (error) { + var err error = nil + + implementation_vector3dfieldcomposed, err := implementation.GetWrapperHandle(Vector3DFieldComposed) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldcomposed_setspace, implementation_vector3dfieldcomposed.GetDLLInHandle(), uintptr(eTheSpace)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldComposed_GetSpace(Vector3DFieldComposed Lib3MFHandle) (ELib3MFCompositionSpace, error) { + var err error = nil + var eTheSpace uint64 = 0 + + implementation_vector3dfieldcomposed, err := implementation.GetWrapperHandle(Vector3DFieldComposed) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldcomposed_getspace, implementation_vector3dfieldcomposed.GetDLLInHandle(), UInt64OutValue(&eTheSpace)) + if (err != nil) { + return 0, err + } + + return ELib3MFCompositionSpace (eTheSpace), err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldComposed_GetFactor1(Vector3DFieldComposed Lib3MFHandle) (float64, error) { + var err error = nil + var dFactor1 float64 = 0 + + implementation_vector3dfieldcomposed, err := implementation.GetWrapperHandle(Vector3DFieldComposed) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldcomposed_getfactor1, implementation_vector3dfieldcomposed.GetDLLInHandle(), Float64OutValue(&dFactor1)) + if (err != nil) { + return 0, err + } + + return dFactor1, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldComposed_SetFactor1(Vector3DFieldComposed Lib3MFHandle, dFactor1 float64) (error) { + var err error = nil + + implementation_vector3dfieldcomposed, err := implementation.GetWrapperHandle(Vector3DFieldComposed) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldcomposed_setfactor1, implementation_vector3dfieldcomposed.GetDLLInHandle(), Float64InValue(dFactor1)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldComposed_GetFactor2(Vector3DFieldComposed Lib3MFHandle) (float64, error) { + var err error = nil + var dFactor2 float64 = 0 + + implementation_vector3dfieldcomposed, err := implementation.GetWrapperHandle(Vector3DFieldComposed) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldcomposed_getfactor2, implementation_vector3dfieldcomposed.GetDLLInHandle(), Float64OutValue(&dFactor2)) + if (err != nil) { + return 0, err + } + + return dFactor2, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldComposed_SetFactor2(Vector3DFieldComposed Lib3MFHandle, dFactor2 float64) (error) { + var err error = nil + + implementation_vector3dfieldcomposed, err := implementation.GetWrapperHandle(Vector3DFieldComposed) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldcomposed_setfactor2, implementation_vector3dfieldcomposed.GetDLLInHandle(), Float64InValue(dFactor2)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldComposed_Vector3DFieldReference1(Vector3DFieldComposed Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheVector3DFieldReference1 := implementation.NewHandle() + + implementation_vector3dfieldcomposed, err := implementation.GetWrapperHandle(Vector3DFieldComposed) + if (err != nil) { + return hTheVector3DFieldReference1, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldcomposed_vector3dfieldreference1, implementation_vector3dfieldcomposed.GetDLLInHandle(), hTheVector3DFieldReference1.GetDLLOutHandle()) + if (err != nil) { + return hTheVector3DFieldReference1, err + } + + return hTheVector3DFieldReference1, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldComposed_Vector3DFieldReference2(Vector3DFieldComposed Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheVector3DFieldReference1 := implementation.NewHandle() + + implementation_vector3dfieldcomposed, err := implementation.GetWrapperHandle(Vector3DFieldComposed) + if (err != nil) { + return hTheVector3DFieldReference1, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldcomposed_vector3dfieldreference2, implementation_vector3dfieldcomposed.GetDLLInHandle(), hTheVector3DFieldReference1.GetDLLOutHandle()) + if (err != nil) { + return hTheVector3DFieldReference1, err + } + + return hTheVector3DFieldReference1, err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldComposed_ScalarFieldReferenceMask(Vector3DFieldComposed Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheScalarFieldReferenceMask := implementation.NewHandle() + + implementation_vector3dfieldcomposed, err := implementation.GetWrapperHandle(Vector3DFieldComposed) + if (err != nil) { + return hTheScalarFieldReferenceMask, err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldcomposed_scalarfieldreferencemask, implementation_vector3dfieldcomposed.GetDLLInHandle(), hTheScalarFieldReferenceMask.GetDLLOutHandle()) + if (err != nil) { + return hTheScalarFieldReferenceMask, err + } + + return hTheScalarFieldReferenceMask, err +} + +func (implementation *Lib3MFImplementation) FieldReference_GetFieldResourceID(FieldReference Lib3MFHandle) (uint32, error) { + var err error = nil + var nUniqueResourceID uint32 = 0 + + implementation_fieldreference, err := implementation.GetWrapperHandle(FieldReference) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_fieldreference_getfieldresourceid, implementation_fieldreference.GetDLLInHandle(), UInt32OutValue(&nUniqueResourceID)) + if (err != nil) { + return 0, err + } + + return uint32(nUniqueResourceID), err +} + +func (implementation *Lib3MFImplementation) FieldReference_SetFieldResourceID(FieldReference Lib3MFHandle, nUniqueResourceID uint32) (error) { + var err error = nil + + implementation_fieldreference, err := implementation.GetWrapperHandle(FieldReference) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_fieldreference_setfieldresourceid, implementation_fieldreference.GetDLLInHandle(), UInt32InValue(nUniqueResourceID)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) FieldReference_GetTransform(FieldReference Lib3MFHandle) (sLib3MFTransform, error) { + var err error = nil + var sTransform sLib3MFTransform + + implementation_fieldreference, err := implementation.GetWrapperHandle(FieldReference) + if (err != nil) { + return sTransform, err + } + + err = implementation.CallFunction(implementation.Lib3MF_fieldreference_gettransform, implementation_fieldreference.GetDLLInHandle(), 0) + if (err != nil) { + return sTransform, err + } + + return sTransform, err +} + +func (implementation *Lib3MFImplementation) FieldReference_SetTransform(FieldReference Lib3MFHandle, sTransform sLib3MFTransform) (error) { + var err error = nil + + implementation_fieldreference, err := implementation.GetWrapperHandle(FieldReference) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_fieldreference_settransform, implementation_fieldreference.GetDLLInHandle(), uintptr(unsafe.Pointer(&sTransform))) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) ScalarFieldReference_SetScalarField(ScalarFieldReference Lib3MFHandle, TheScalarField Lib3MFHandle) (error) { + var err error = nil + + implementation_scalarfieldreference, err := implementation.GetWrapperHandle(ScalarFieldReference) + if (err != nil) { + return err + } + implementation_thescalarfield, err := implementation.GetWrapperHandle(TheScalarField) + if (err != nil) { + return err + } + + TheScalarFieldDLLHandle := implementation_thescalarfield.GetDLLInHandle() + if (TheScalarFieldDLLHandle == 0) { + err := fmt.Errorf("Handle must not be 0.") + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_scalarfieldreference_setscalarfield, implementation_scalarfieldreference.GetDLLInHandle(), TheScalarFieldDLLHandle) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Vector3DFieldReference_SetVector3DField(Vector3DFieldReference Lib3MFHandle, TheVector3DField Lib3MFHandle) (error) { + var err error = nil + + implementation_vector3dfieldreference, err := implementation.GetWrapperHandle(Vector3DFieldReference) + if (err != nil) { + return err + } + implementation_thevector3dfield, err := implementation.GetWrapperHandle(TheVector3DField) + if (err != nil) { + return err + } + + TheVector3DFieldDLLHandle := implementation_thevector3dfield.GetDLLInHandle() + if (TheVector3DFieldDLLHandle == 0) { + err := fmt.Errorf("Handle must not be 0.") + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_vector3dfieldreference_setvector3dfield, implementation_vector3dfieldreference.GetDLLInHandle(), TheVector3DFieldDLLHandle) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) VolumeDataBoundary_GetSolidThreshold(VolumeDataBoundary Lib3MFHandle) (float64, error) { + var err error = nil + var dTheSolidThreshold float64 = 0 + + implementation_volumedataboundary, err := implementation.GetWrapperHandle(VolumeDataBoundary) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedataboundary_getsolidthreshold, implementation_volumedataboundary.GetDLLInHandle(), Float64OutValue(&dTheSolidThreshold)) + if (err != nil) { + return 0, err + } + + return dTheSolidThreshold, err +} + +func (implementation *Lib3MFImplementation) VolumeDataBoundary_SetSolidThreshold(VolumeDataBoundary Lib3MFHandle, dTheSolidThreshold float64) (error) { + var err error = nil + + implementation_volumedataboundary, err := implementation.GetWrapperHandle(VolumeDataBoundary) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedataboundary_setsolidthreshold, implementation_volumedataboundary.GetDLLInHandle(), Float64InValue(dTheSolidThreshold)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) VolumeDataComposite_GetBaseMaterialGroup(VolumeDataComposite Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hBaseMaterialGroupInstance := implementation.NewHandle() + + implementation_volumedatacomposite, err := implementation.GetWrapperHandle(VolumeDataComposite) + if (err != nil) { + return hBaseMaterialGroupInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedatacomposite_getbasematerialgroup, implementation_volumedatacomposite.GetDLLInHandle(), hBaseMaterialGroupInstance.GetDLLOutHandle()) + if (err != nil) { + return hBaseMaterialGroupInstance, err + } + + return hBaseMaterialGroupInstance, err +} + +func (implementation *Lib3MFImplementation) VolumeDataComposite_SetBaseMaterialGroup(VolumeDataComposite Lib3MFHandle, BaseMaterialGroupInstance Lib3MFHandle) (error) { + var err error = nil + + implementation_volumedatacomposite, err := implementation.GetWrapperHandle(VolumeDataComposite) + if (err != nil) { + return err + } + implementation_basematerialgroupinstance, err := implementation.GetWrapperHandle(BaseMaterialGroupInstance) + if (err != nil) { + return err + } + + BaseMaterialGroupInstanceDLLHandle := implementation_basematerialgroupinstance.GetDLLInHandle() + if (BaseMaterialGroupInstanceDLLHandle == 0) { + err := fmt.Errorf("Handle must not be 0.") + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedatacomposite_setbasematerialgroup, implementation_volumedatacomposite.GetDLLInHandle(), BaseMaterialGroupInstanceDLLHandle) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) VolumeDataComposite_GetMaterialMappingCount(VolumeDataComposite Lib3MFHandle) (uint32, error) { + var err error = nil + var nCount uint32 = 0 + + implementation_volumedatacomposite, err := implementation.GetWrapperHandle(VolumeDataComposite) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedatacomposite_getmaterialmappingcount, implementation_volumedatacomposite.GetDLLInHandle(), UInt32OutValue(&nCount)) + if (err != nil) { + return 0, err + } + + return uint32(nCount), err +} + +func (implementation *Lib3MFImplementation) VolumeDataComposite_GetMaterialMapping(VolumeDataComposite Lib3MFHandle, nIndex uint32) (Lib3MFHandle, error) { + var err error = nil + hTheMaterialMapping := implementation.NewHandle() + + implementation_volumedatacomposite, err := implementation.GetWrapperHandle(VolumeDataComposite) + if (err != nil) { + return hTheMaterialMapping, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedatacomposite_getmaterialmapping, implementation_volumedatacomposite.GetDLLInHandle(), UInt32InValue(nIndex), hTheMaterialMapping.GetDLLOutHandle()) + if (err != nil) { + return hTheMaterialMapping, err + } + + return hTheMaterialMapping, err +} + +func (implementation *Lib3MFImplementation) VolumeDataComposite_AddMaterialMapping(VolumeDataComposite Lib3MFHandle, sTransform sLib3MFTransform) (Lib3MFHandle, error) { + var err error = nil + hTheMaterialMapping := implementation.NewHandle() + + implementation_volumedatacomposite, err := implementation.GetWrapperHandle(VolumeDataComposite) + if (err != nil) { + return hTheMaterialMapping, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedatacomposite_addmaterialmapping, implementation_volumedatacomposite.GetDLLInHandle(), uintptr(unsafe.Pointer(&sTransform)), hTheMaterialMapping.GetDLLOutHandle()) + if (err != nil) { + return hTheMaterialMapping, err + } + + return hTheMaterialMapping, err +} + +func (implementation *Lib3MFImplementation) VolumeDataComposite_RemoveMaterialMapping(VolumeDataComposite Lib3MFHandle, nIndex uint32) (error) { + var err error = nil + + implementation_volumedatacomposite, err := implementation.GetWrapperHandle(VolumeDataComposite) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedatacomposite_removematerialmapping, implementation_volumedatacomposite.GetDLLInHandle(), UInt32InValue(nIndex)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) VolumeDataProperty_GetName(VolumeDataProperty Lib3MFHandle) (string, error) { + var err error = nil + var neededforPropertyName int64 = 0 + var filledinPropertyName int64 = 0 + + implementation_volumedataproperty, err := implementation.GetWrapperHandle(VolumeDataProperty) + if (err != nil) { + return "", err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedataproperty_getname, implementation_volumedataproperty.GetDLLInHandle(), Int64InValue(0), Int64OutValue(&neededforPropertyName), Int64InValue(0)) + if (err != nil) { + return "", err + } + bufferSizePropertyName := neededforPropertyName + bufferPropertyName := make([]byte, bufferSizePropertyName) + err = implementation.CallFunction(implementation.Lib3MF_volumedataproperty_getname, implementation_volumedataproperty.GetDLLInHandle(), Int64InValue(bufferSizePropertyName), Int64OutValue(&filledinPropertyName), uintptr(unsafe.Pointer(&bufferPropertyName[0]))) + if (err != nil) { + return "", err + } + + return string(bufferPropertyName[:(filledinPropertyName-1)]), err +} + +func (implementation *Lib3MFImplementation) VolumeDataProperty_SetIsRequired(VolumeDataProperty Lib3MFHandle, bIsRequired bool) (error) { + var err error = nil + var nIsRequired uint8 = 0 + if (bIsRequired) { + nIsRequired = 1 + } + + + implementation_volumedataproperty, err := implementation.GetWrapperHandle(VolumeDataProperty) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedataproperty_setisrequired, implementation_volumedataproperty.GetDLLInHandle(), UInt8InValue(nIsRequired)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) VolumeDataProperty_IsRequired(VolumeDataProperty Lib3MFHandle) (bool, error) { + var err error = nil + var bIsRequired int64 = 0 + + implementation_volumedataproperty, err := implementation.GetWrapperHandle(VolumeDataProperty) + if (err != nil) { + return false, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedataproperty_isrequired, implementation_volumedataproperty.GetDLLInHandle(), Int64OutValue(&bIsRequired)) + if (err != nil) { + return false, err + } + + return (bIsRequired != 0), err +} + +func (implementation *Lib3MFImplementation) VolumeData_GetBoundary(VolumeData Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheLevelSetData := implementation.NewHandle() + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return hTheLevelSetData, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_getboundary, implementation_volumedata.GetDLLInHandle(), hTheLevelSetData.GetDLLOutHandle()) + if (err != nil) { + return hTheLevelSetData, err + } + + return hTheLevelSetData, err +} + +func (implementation *Lib3MFImplementation) VolumeData_CreateNewBoundary(VolumeData Lib3MFHandle, TheScalarField Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheLevelSetData := implementation.NewHandle() + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return hTheLevelSetData, err + } + implementation_thescalarfield, err := implementation.GetWrapperHandle(TheScalarField) + if (err != nil) { + return hTheLevelSetData, err + } + + TheScalarFieldDLLHandle := implementation_thescalarfield.GetDLLInHandle() + if (TheScalarFieldDLLHandle == 0) { + err := fmt.Errorf("Handle must not be 0.") + return hTheLevelSetData, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_createnewboundary, implementation_volumedata.GetDLLInHandle(), TheScalarFieldDLLHandle, hTheLevelSetData.GetDLLOutHandle()) + if (err != nil) { + return hTheLevelSetData, err + } + + return hTheLevelSetData, err +} + +func (implementation *Lib3MFImplementation) VolumeData_RemoveBoundary(VolumeData Lib3MFHandle) (error) { + var err error = nil + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_removeboundary, implementation_volumedata.GetDLLInHandle()) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) VolumeData_GetComposite(VolumeData Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheCompositeData := implementation.NewHandle() + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return hTheCompositeData, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_getcomposite, implementation_volumedata.GetDLLInHandle(), hTheCompositeData.GetDLLOutHandle()) + if (err != nil) { + return hTheCompositeData, err + } + + return hTheCompositeData, err +} + +func (implementation *Lib3MFImplementation) VolumeData_CreateNewComposite(VolumeData Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheCompositeData := implementation.NewHandle() + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return hTheCompositeData, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_createnewcomposite, implementation_volumedata.GetDLLInHandle(), hTheCompositeData.GetDLLOutHandle()) + if (err != nil) { + return hTheCompositeData, err + } + + return hTheCompositeData, err +} + +func (implementation *Lib3MFImplementation) VolumeData_RemoveComposite(VolumeData Lib3MFHandle) (error) { + var err error = nil + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_removecomposite, implementation_volumedata.GetDLLInHandle()) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) VolumeData_GetColor(VolumeData Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheColorData := implementation.NewHandle() + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return hTheColorData, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_getcolor, implementation_volumedata.GetDLLInHandle(), hTheColorData.GetDLLOutHandle()) + if (err != nil) { + return hTheColorData, err + } + + return hTheColorData, err +} + +func (implementation *Lib3MFImplementation) VolumeData_CreateNewColor(VolumeData Lib3MFHandle, TheVector3DField Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheColorData := implementation.NewHandle() + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return hTheColorData, err + } + implementation_thevector3dfield, err := implementation.GetWrapperHandle(TheVector3DField) + if (err != nil) { + return hTheColorData, err + } + + TheVector3DFieldDLLHandle := implementation_thevector3dfield.GetDLLInHandle() + if (TheVector3DFieldDLLHandle == 0) { + err := fmt.Errorf("Handle must not be 0.") + return hTheColorData, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_createnewcolor, implementation_volumedata.GetDLLInHandle(), TheVector3DFieldDLLHandle, hTheColorData.GetDLLOutHandle()) + if (err != nil) { + return hTheColorData, err + } + + return hTheColorData, err +} + +func (implementation *Lib3MFImplementation) VolumeData_RemoveColor(VolumeData Lib3MFHandle) (error) { + var err error = nil + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_removecolor, implementation_volumedata.GetDLLInHandle()) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) VolumeData_GetPropertyCount(VolumeData Lib3MFHandle) (uint32, error) { + var err error = nil + var nCount uint32 = 0 + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_getpropertycount, implementation_volumedata.GetDLLInHandle(), UInt32OutValue(&nCount)) + if (err != nil) { + return 0, err + } + + return uint32(nCount), err +} + +func (implementation *Lib3MFImplementation) VolumeData_GetProperty(VolumeData Lib3MFHandle, nIndex uint32) (Lib3MFHandle, error) { + var err error = nil + hTheVolumeDataProperty := implementation.NewHandle() + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return hTheVolumeDataProperty, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_getproperty, implementation_volumedata.GetDLLInHandle(), UInt32InValue(nIndex), hTheVolumeDataProperty.GetDLLOutHandle()) + if (err != nil) { + return hTheVolumeDataProperty, err + } + + return hTheVolumeDataProperty, err +} + +func (implementation *Lib3MFImplementation) VolumeData_AddPropertyFromScalarField(VolumeData Lib3MFHandle, sName string, TheScalarField Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheVolumeDataProperty := implementation.NewHandle() + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return hTheVolumeDataProperty, err + } + implementation_thescalarfield, err := implementation.GetWrapperHandle(TheScalarField) + if (err != nil) { + return hTheVolumeDataProperty, err + } + + TheScalarFieldDLLHandle := implementation_thescalarfield.GetDLLInHandle() + if (TheScalarFieldDLLHandle == 0) { + err := fmt.Errorf("Handle must not be 0.") + return hTheVolumeDataProperty, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_addpropertyfromscalarfield, implementation_volumedata.GetDLLInHandle(), StringInValue(sName), TheScalarFieldDLLHandle, hTheVolumeDataProperty.GetDLLOutHandle()) + if (err != nil) { + return hTheVolumeDataProperty, err + } + + return hTheVolumeDataProperty, err +} + +func (implementation *Lib3MFImplementation) VolumeData_AddPropertyFromVector3DField(VolumeData Lib3MFHandle, sName string, TheVector3DField Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheVolumeDataProperty := implementation.NewHandle() + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return hTheVolumeDataProperty, err + } + implementation_thevector3dfield, err := implementation.GetWrapperHandle(TheVector3DField) + if (err != nil) { + return hTheVolumeDataProperty, err + } + + TheVector3DFieldDLLHandle := implementation_thevector3dfield.GetDLLInHandle() + if (TheVector3DFieldDLLHandle == 0) { + err := fmt.Errorf("Handle must not be 0.") + return hTheVolumeDataProperty, err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_addpropertyfromvector3dfield, implementation_volumedata.GetDLLInHandle(), StringInValue(sName), TheVector3DFieldDLLHandle, hTheVolumeDataProperty.GetDLLOutHandle()) + if (err != nil) { + return hTheVolumeDataProperty, err + } + + return hTheVolumeDataProperty, err +} + +func (implementation *Lib3MFImplementation) VolumeData_RemoveProperty(VolumeData Lib3MFHandle, nIndex uint32) (error) { + var err error = nil + + implementation_volumedata, err := implementation.GetWrapperHandle(VolumeData) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_volumedata_removeproperty, implementation_volumedata.GetDLLInHandle(), UInt32InValue(nIndex)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Component_GetObjectResource(Component Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hObjectResource := implementation.NewHandle() + + implementation_component, err := implementation.GetWrapperHandle(Component) + if err != nil { + return hObjectResource, err + } + + err = implementation.CallFunction(implementation.Lib3MF_component_getobjectresource, implementation_component.GetDLLInHandle(), hObjectResource.GetDLLOutHandle()) + if err != nil { + return hObjectResource, err + } + + return hObjectResource, err +} + +func (implementation *Lib3MFImplementation) Component_GetObjectResourceID(Component Lib3MFHandle) (uint32, error) { + var err error = nil + var nUniqueResourceID uint32 = 0 + + implementation_component, err := implementation.GetWrapperHandle(Component) + if err != nil { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_component_getobjectresourceid, implementation_component.GetDLLInHandle(), UInt32OutValue(&nUniqueResourceID)) + if err != nil { + return 0, err + } + + return uint32(nUniqueResourceID), err +} + +func (implementation *Lib3MFImplementation) Component_GetUUID(Component Lib3MFHandle) (bool, string, error) { + var err error = nil + var bHasUUID int64 = 0 + var neededforUUID int64 = 0 + var filledinUUID int64 = 0 + + implementation_component, err := implementation.GetWrapperHandle(Component) + if err != nil { + return false, "", err + } + + err = implementation.CallFunction(implementation.Lib3MF_component_getuuid, implementation_component.GetDLLInHandle(), Int64OutValue(&bHasUUID), Int64InValue(0), Int64OutValue(&neededforUUID), Int64InValue(0)) + if err != nil { + return false, "", err + } + bufferSizeUUID := neededforUUID + bufferUUID := make([]byte, bufferSizeUUID) + err = implementation.CallFunction(implementation.Lib3MF_component_getuuid, implementation_component.GetDLLInHandle(), Int64OutValue(&bHasUUID), Int64InValue(bufferSizeUUID), Int64OutValue(&filledinUUID), uintptr(unsafe.Pointer(&bufferUUID[0]))) + if err != nil { + return false, "", err + } + + return (bHasUUID != 0), string(bufferUUID[:(filledinUUID - 1)]), err +} + +func (implementation *Lib3MFImplementation) Component_SetUUID(Component Lib3MFHandle, sUUID string) error { + var err error = nil + + implementation_component, err := implementation.GetWrapperHandle(Component) + if err != nil { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_component_setuuid, implementation_component.GetDLLInHandle(), StringInValue(sUUID)) + if err != nil { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Component_HasTransform(Component Lib3MFHandle) (bool, error) { + var err error = nil + var bHasTransform int64 = 0 + + implementation_component, err := implementation.GetWrapperHandle(Component) + if err != nil { + return false, err + } + + err = implementation.CallFunction(implementation.Lib3MF_component_hastransform, implementation_component.GetDLLInHandle(), Int64OutValue(&bHasTransform)) + if err != nil { + return false, err + } + + return (bHasTransform != 0), err +} + +func (implementation *Lib3MFImplementation) Component_GetTransform(Component Lib3MFHandle) (sLib3MFTransform, error) { + var err error = nil + var sTransform sLib3MFTransform + + implementation_component, err := implementation.GetWrapperHandle(Component) + if err != nil { + return sTransform, err + } + + err = implementation.CallFunction(implementation.Lib3MF_component_gettransform, implementation_component.GetDLLInHandle(), 0) + if err != nil { + return sTransform, err + } + + return sTransform, err +} + +func (implementation *Lib3MFImplementation) Component_SetTransform(Component Lib3MFHandle, sTransform sLib3MFTransform) error { + var err error = nil + + implementation_component, err := implementation.GetWrapperHandle(Component) + if err != nil { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_component_settransform, implementation_component.GetDLLInHandle(), uintptr(unsafe.Pointer(&sTransform))) + if err != nil { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) ComponentsObject_AddComponent(ComponentsObject Lib3MFHandle, ObjectResource Lib3MFHandle, sTransform sLib3MFTransform) (Lib3MFHandle, error) { + var err error = nil + hComponentInstance := implementation.NewHandle() + + implementation_componentsobject, err := implementation.GetWrapperHandle(ComponentsObject) + if err != nil { + return hComponentInstance, err + } + implementation_objectresource, err := implementation.GetWrapperHandle(ObjectResource) + if err != nil { + return hComponentInstance, err + } + + ObjectResourceDLLHandle := implementation_objectresource.GetDLLInHandle() + if ObjectResourceDLLHandle == 0 { + err := fmt.Errorf("Handle must not be 0.") + return hComponentInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_componentsobject_addcomponent, implementation_componentsobject.GetDLLInHandle(), ObjectResourceDLLHandle, uintptr(unsafe.Pointer(&sTransform)), hComponentInstance.GetDLLOutHandle()) + if err != nil { + return hComponentInstance, err + } + + return hComponentInstance, err +} + +func (implementation *Lib3MFImplementation) ComponentsObject_GetComponent(ComponentsObject Lib3MFHandle, nIndex uint32) (Lib3MFHandle, error) { + var err error = nil + hComponentInstance := implementation.NewHandle() + + implementation_componentsobject, err := implementation.GetWrapperHandle(ComponentsObject) + if err != nil { + return hComponentInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_componentsobject_getcomponent, implementation_componentsobject.GetDLLInHandle(), UInt32InValue(nIndex), hComponentInstance.GetDLLOutHandle()) + if err != nil { + return hComponentInstance, err + } + + return hComponentInstance, err +} + +func (implementation *Lib3MFImplementation) ComponentsObject_GetComponentCount(ComponentsObject Lib3MFHandle) (uint32, error) { + var err error = nil + var nCount uint32 = 0 + + implementation_componentsobject, err := implementation.GetWrapperHandle(ComponentsObject) + if err != nil { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_componentsobject_getcomponentcount, implementation_componentsobject.GetDLLInHandle(), UInt32OutValue(&nCount)) + if err != nil { + return 0, err + } + + return uint32(nCount), err +} + +func (implementation *Lib3MFImplementation) BeamSet_SetName(BeamSet Lib3MFHandle, sName string) error { + var err error = nil + + implementation_beamset, err := implementation.GetWrapperHandle(BeamSet) + if err != nil { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_beamset_setname, implementation_beamset.GetDLLInHandle(), StringInValue(sName)) + if err != nil { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) BeamSet_GetName(BeamSet Lib3MFHandle) (string, error) { + var err error = nil + var neededforName int64 = 0 + var filledinName int64 = 0 + + implementation_beamset, err := implementation.GetWrapperHandle(BeamSet) + if err != nil { + return "", err + } + + err = implementation.CallFunction(implementation.Lib3MF_beamset_getname, implementation_beamset.GetDLLInHandle(), Int64InValue(0), Int64OutValue(&neededforName), Int64InValue(0)) + if err != nil { + return "", err + } + bufferSizeName := neededforName + bufferName := make([]byte, bufferSizeName) + err = implementation.CallFunction(implementation.Lib3MF_beamset_getname, implementation_beamset.GetDLLInHandle(), Int64InValue(bufferSizeName), Int64OutValue(&filledinName), uintptr(unsafe.Pointer(&bufferName[0]))) + if err != nil { + return "", err + } + + return string(bufferName[:(filledinName - 1)]), err +} + +func (implementation *Lib3MFImplementation) BeamSet_SetIdentifier(BeamSet Lib3MFHandle, sIdentifier string) error { + var err error = nil + + implementation_beamset, err := implementation.GetWrapperHandle(BeamSet) + if err != nil { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_beamset_setidentifier, implementation_beamset.GetDLLInHandle(), StringInValue(sIdentifier)) + if err != nil { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) BeamSet_GetIdentifier(BeamSet Lib3MFHandle) (string, error) { + var err error = nil + var neededforIdentifier int64 = 0 + var filledinIdentifier int64 = 0 + + implementation_beamset, err := implementation.GetWrapperHandle(BeamSet) + if err != nil { + return "", err } err = implementation.CallFunction(implementation.Lib3MF_beamset_getidentifier, implementation_beamset.GetDLLInHandle(), Int64InValue(0), Int64OutValue(&neededforIdentifier), Int64InValue(0)) @@ -5696,148 +8157,382 @@ func (implementation *Lib3MFImplementation) MultiPropertyGroup_GetAllPropertyIDs return make([]uint32, 0), err } - return bufferPropertyIDs, err + return bufferPropertyIDs, err +} + +func (implementation *Lib3MFImplementation) MultiPropertyGroup_AddMultiProperty(MultiPropertyGroup Lib3MFHandle, PropertyIDs []uint32) (uint32, error) { + var err error = nil + var nPropertyID uint32 = 0 + + implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) + if err != nil { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_addmultiproperty, implementation_multipropertygroup.GetDLLInHandle(), 0, 0, UInt32OutValue(&nPropertyID)) + if err != nil { + return 0, err + } + + return uint32(nPropertyID), err +} + +func (implementation *Lib3MFImplementation) MultiPropertyGroup_SetMultiProperty(MultiPropertyGroup Lib3MFHandle, nPropertyID uint32, PropertyIDs []uint32) error { + var err error = nil + + implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) + if err != nil { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_setmultiproperty, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nPropertyID), 0, 0) + if err != nil { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) MultiPropertyGroup_GetMultiProperty(MultiPropertyGroup Lib3MFHandle, nPropertyID uint32) ([]uint32, error) { + var err error = nil + var neededforPropertyIDs int64 = 0 + var filledinPropertyIDs int64 = 0 + bufferPropertyIDs := make([]uint32, 0) + + implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) + if err != nil { + return make([]uint32, 0), err + } + + err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_getmultiproperty, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nPropertyID), Int64InValue(0), Int64OutValue(&neededforPropertyIDs), Int64InValue(0)) + if err != nil { + return make([]uint32, 0), err + } + bufferSizePropertyIDs := neededforPropertyIDs + bufferPropertyIDs = make([]uint32, bufferSizePropertyIDs) + err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_getmultiproperty, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nPropertyID), Int64InValue(bufferSizePropertyIDs), Int64OutValue(&filledinPropertyIDs), uintptr(unsafe.Pointer(&bufferPropertyIDs[0]))) + if err != nil { + return make([]uint32, 0), err + } + + return bufferPropertyIDs, err +} + +func (implementation *Lib3MFImplementation) MultiPropertyGroup_RemoveMultiProperty(MultiPropertyGroup Lib3MFHandle, nPropertyID uint32) error { + var err error = nil + + implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) + if err != nil { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_removemultiproperty, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nPropertyID)) + if err != nil { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) MultiPropertyGroup_GetLayerCount(MultiPropertyGroup Lib3MFHandle) (uint32, error) { + var err error = nil + var nCount uint32 = 0 + + implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) + if err != nil { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_getlayercount, implementation_multipropertygroup.GetDLLInHandle(), UInt32OutValue(&nCount)) + if err != nil { + return 0, err + } + + return uint32(nCount), err +} + +func (implementation *Lib3MFImplementation) MultiPropertyGroup_AddLayer(MultiPropertyGroup Lib3MFHandle, sTheLayer sLib3MFMultiPropertyLayer) (uint32, error) { + var err error = nil + var nLayerIndex uint32 = 0 + + implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) + if err != nil { + return 0, err + } + + err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_addlayer, implementation_multipropertygroup.GetDLLInHandle(), uintptr(unsafe.Pointer(&sTheLayer)), UInt32OutValue(&nLayerIndex)) + if err != nil { + return 0, err + } + + return uint32(nLayerIndex), err +} + +func (implementation *Lib3MFImplementation) MultiPropertyGroup_GetLayer(MultiPropertyGroup Lib3MFHandle, nLayerIndex uint32) (sLib3MFMultiPropertyLayer, error) { + var err error = nil + var sTheLayer sLib3MFMultiPropertyLayer + + implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) + if err != nil { + return sTheLayer, err + } + + err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_getlayer, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nLayerIndex), 0) + if err != nil { + return sTheLayer, err + } + + return sTheLayer, err +} + +func (implementation *Lib3MFImplementation) MultiPropertyGroup_RemoveLayer(MultiPropertyGroup Lib3MFHandle, nLayerIndex uint32) error { + var err error = nil + + implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) + if err != nil { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_removelayer, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nLayerIndex)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Image3D_GetName(Image3D Lib3MFHandle) (string, error) { + var err error = nil + var neededforName int64 = 0 + var filledinName int64 = 0 + + implementation_image3d, err := implementation.GetWrapperHandle(Image3D) + if (err != nil) { + return "", err + } + + err = implementation.CallFunction(implementation.Lib3MF_image3d_getname, implementation_image3d.GetDLLInHandle(), Int64InValue(0), Int64OutValue(&neededforName), Int64InValue(0)) + if (err != nil) { + return "", err + } + bufferSizeName := neededforName + bufferName := make([]byte, bufferSizeName) + err = implementation.CallFunction(implementation.Lib3MF_image3d_getname, implementation_image3d.GetDLLInHandle(), Int64InValue(bufferSizeName), Int64OutValue(&filledinName), uintptr(unsafe.Pointer(&bufferName[0]))) + if (err != nil) { + return "", err + } + + return string(bufferName[:(filledinName-1)]), err +} + +func (implementation *Lib3MFImplementation) Image3D_SetName(Image3D Lib3MFHandle, sName string) (error) { + var err error = nil + + implementation_image3d, err := implementation.GetWrapperHandle(Image3D) + if (err != nil) { + return err + } + + err = implementation.CallFunction(implementation.Lib3MF_image3d_setname, implementation_image3d.GetDLLInHandle(), StringInValue(sName)) + if (err != nil) { + return err + } + + return err +} + +func (implementation *Lib3MFImplementation) Image3D_IsImageStack(Image3D Lib3MFHandle) (bool, error) { + var err error = nil + var bIsImageStack int64 = 0 + + implementation_image3d, err := implementation.GetWrapperHandle(Image3D) + if (err != nil) { + return false, err + } + + err = implementation.CallFunction(implementation.Lib3MF_image3d_isimagestack, implementation_image3d.GetDLLInHandle(), Int64OutValue(&bIsImageStack)) + if (err != nil) { + return false, err + } + + return (bIsImageStack != 0), err } -func (implementation *Lib3MFImplementation) MultiPropertyGroup_AddMultiProperty(MultiPropertyGroup Lib3MFHandle, PropertyIDs []uint32) (uint32, error) { +func (implementation *Lib3MFImplementation) ImageStack_GetRowCount(ImageStack Lib3MFHandle) (uint32, error) { var err error = nil - var nPropertyID uint32 = 0 - - implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) - if err != nil { + var nRowCount uint32 = 0 + + implementation_imagestack, err := implementation.GetWrapperHandle(ImageStack) + if (err != nil) { return 0, err } - err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_addmultiproperty, implementation_multipropertygroup.GetDLLInHandle(), 0, 0, UInt32OutValue(&nPropertyID)) - if err != nil { + err = implementation.CallFunction(implementation.Lib3MF_imagestack_getrowcount, implementation_imagestack.GetDLLInHandle(), UInt32OutValue(&nRowCount)) + if (err != nil) { return 0, err } - - return uint32(nPropertyID), err + + return uint32(nRowCount), err } -func (implementation *Lib3MFImplementation) MultiPropertyGroup_SetMultiProperty(MultiPropertyGroup Lib3MFHandle, nPropertyID uint32, PropertyIDs []uint32) error { +func (implementation *Lib3MFImplementation) ImageStack_SetRowCount(ImageStack Lib3MFHandle, nRowCount uint32) (error) { var err error = nil - - implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) - if err != nil { + + implementation_imagestack, err := implementation.GetWrapperHandle(ImageStack) + if (err != nil) { return err } - err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_setmultiproperty, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nPropertyID), 0, 0) - if err != nil { + err = implementation.CallFunction(implementation.Lib3MF_imagestack_setrowcount, implementation_imagestack.GetDLLInHandle(), UInt32InValue(nRowCount)) + if (err != nil) { return err } - + return err } -func (implementation *Lib3MFImplementation) MultiPropertyGroup_GetMultiProperty(MultiPropertyGroup Lib3MFHandle, nPropertyID uint32) ([]uint32, error) { +func (implementation *Lib3MFImplementation) ImageStack_GetColumnCount(ImageStack Lib3MFHandle) (uint32, error) { var err error = nil - var neededforPropertyIDs int64 = 0 - var filledinPropertyIDs int64 = 0 - bufferPropertyIDs := make([]uint32, 0) - - implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) - if err != nil { - return make([]uint32, 0), err + var nColumnCount uint32 = 0 + + implementation_imagestack, err := implementation.GetWrapperHandle(ImageStack) + if (err != nil) { + return 0, err } - err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_getmultiproperty, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nPropertyID), Int64InValue(0), Int64OutValue(&neededforPropertyIDs), Int64InValue(0)) - if err != nil { - return make([]uint32, 0), err - } - bufferSizePropertyIDs := neededforPropertyIDs - bufferPropertyIDs = make([]uint32, bufferSizePropertyIDs) - err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_getmultiproperty, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nPropertyID), Int64InValue(bufferSizePropertyIDs), Int64OutValue(&filledinPropertyIDs), uintptr(unsafe.Pointer(&bufferPropertyIDs[0]))) - if err != nil { - return make([]uint32, 0), err + err = implementation.CallFunction(implementation.Lib3MF_imagestack_getcolumncount, implementation_imagestack.GetDLLInHandle(), UInt32OutValue(&nColumnCount)) + if (err != nil) { + return 0, err } - - return bufferPropertyIDs, err + + return uint32(nColumnCount), err } -func (implementation *Lib3MFImplementation) MultiPropertyGroup_RemoveMultiProperty(MultiPropertyGroup Lib3MFHandle, nPropertyID uint32) error { +func (implementation *Lib3MFImplementation) ImageStack_SetColumnCount(ImageStack Lib3MFHandle, nColumnCount uint32) (error) { var err error = nil - - implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) - if err != nil { + + implementation_imagestack, err := implementation.GetWrapperHandle(ImageStack) + if (err != nil) { return err } - err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_removemultiproperty, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nPropertyID)) - if err != nil { + err = implementation.CallFunction(implementation.Lib3MF_imagestack_setcolumncount, implementation_imagestack.GetDLLInHandle(), UInt32InValue(nColumnCount)) + if (err != nil) { return err } - + return err } -func (implementation *Lib3MFImplementation) MultiPropertyGroup_GetLayerCount(MultiPropertyGroup Lib3MFHandle) (uint32, error) { +func (implementation *Lib3MFImplementation) ImageStack_GetSheetCount(ImageStack Lib3MFHandle) (uint32, error) { var err error = nil - var nCount uint32 = 0 - - implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) - if err != nil { + var nSheetCount uint32 = 0 + + implementation_imagestack, err := implementation.GetWrapperHandle(ImageStack) + if (err != nil) { return 0, err } - err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_getlayercount, implementation_multipropertygroup.GetDLLInHandle(), UInt32OutValue(&nCount)) - if err != nil { + err = implementation.CallFunction(implementation.Lib3MF_imagestack_getsheetcount, implementation_imagestack.GetDLLInHandle(), UInt32OutValue(&nSheetCount)) + if (err != nil) { return 0, err } - - return uint32(nCount), err + + return uint32(nSheetCount), err } -func (implementation *Lib3MFImplementation) MultiPropertyGroup_AddLayer(MultiPropertyGroup Lib3MFHandle, sTheLayer sLib3MFMultiPropertyLayer) (uint32, error) { +func (implementation *Lib3MFImplementation) ImageStack_GetSheet(ImageStack Lib3MFHandle, nIndex uint32) (Lib3MFHandle, error) { var err error = nil - var nLayerIndex uint32 = 0 - - implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) - if err != nil { - return 0, err + hSheet := implementation.NewHandle() + + implementation_imagestack, err := implementation.GetWrapperHandle(ImageStack) + if (err != nil) { + return hSheet, err } - err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_addlayer, implementation_multipropertygroup.GetDLLInHandle(), uintptr(unsafe.Pointer(&sTheLayer)), UInt32OutValue(&nLayerIndex)) - if err != nil { - return 0, err + err = implementation.CallFunction(implementation.Lib3MF_imagestack_getsheet, implementation_imagestack.GetDLLInHandle(), UInt32InValue(nIndex), hSheet.GetDLLOutHandle()) + if (err != nil) { + return hSheet, err } - - return uint32(nLayerIndex), err + + return hSheet, err } -func (implementation *Lib3MFImplementation) MultiPropertyGroup_GetLayer(MultiPropertyGroup Lib3MFHandle, nLayerIndex uint32) (sLib3MFMultiPropertyLayer, error) { +func (implementation *Lib3MFImplementation) ImageStack_SetSheet(ImageStack Lib3MFHandle, nIndex uint32, Sheet Lib3MFHandle) (error) { var err error = nil - var sTheLayer sLib3MFMultiPropertyLayer + + implementation_imagestack, err := implementation.GetWrapperHandle(ImageStack) + if (err != nil) { + return err + } + implementation_sheet, err := implementation.GetWrapperHandle(Sheet) + if (err != nil) { + return err + } + + SheetDLLHandle := implementation_sheet.GetDLLInHandle() + if (SheetDLLHandle == 0) { + err := fmt.Errorf("Handle must not be 0.") + return err + } - implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) - if err != nil { - return sTheLayer, err + err = implementation.CallFunction(implementation.Lib3MF_imagestack_setsheet, implementation_imagestack.GetDLLInHandle(), UInt32InValue(nIndex), SheetDLLHandle) + if (err != nil) { + return err } + + return err +} - err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_getlayer, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nLayerIndex), 0) - if err != nil { - return sTheLayer, err +func (implementation *Lib3MFImplementation) ImageStack_CreateEmptySheet(ImageStack Lib3MFHandle, nIndex uint32, sPath string) (Lib3MFHandle, error) { + var err error = nil + hSheet := implementation.NewHandle() + + implementation_imagestack, err := implementation.GetWrapperHandle(ImageStack) + if (err != nil) { + return hSheet, err } - return sTheLayer, err + err = implementation.CallFunction(implementation.Lib3MF_imagestack_createemptysheet, implementation_imagestack.GetDLLInHandle(), UInt32InValue(nIndex), StringInValue(sPath), hSheet.GetDLLOutHandle()) + if (err != nil) { + return hSheet, err + } + + return hSheet, err } -func (implementation *Lib3MFImplementation) MultiPropertyGroup_RemoveLayer(MultiPropertyGroup Lib3MFHandle, nLayerIndex uint32) error { +func (implementation *Lib3MFImplementation) ImageStack_CreateSheetFromBuffer(ImageStack Lib3MFHandle, nIndex uint32, sPath string, Data []uint8) (Lib3MFHandle, error) { var err error = nil + hSheet := implementation.NewHandle() + + implementation_imagestack, err := implementation.GetWrapperHandle(ImageStack) + if (err != nil) { + return hSheet, err + } - implementation_multipropertygroup, err := implementation.GetWrapperHandle(MultiPropertyGroup) - if err != nil { - return err + err = implementation.CallFunction(implementation.Lib3MF_imagestack_createsheetfrombuffer, implementation_imagestack.GetDLLInHandle(), UInt32InValue(nIndex), StringInValue(sPath), 0, 0, hSheet.GetDLLOutHandle()) + if (err != nil) { + return hSheet, err } + + return hSheet, err +} - err = implementation.CallFunction(implementation.Lib3MF_multipropertygroup_removelayer, implementation_multipropertygroup.GetDLLInHandle(), UInt32InValue(nLayerIndex)) - if err != nil { - return err +func (implementation *Lib3MFImplementation) ImageStack_CreateSheetFromFile(ImageStack Lib3MFHandle, nIndex uint32, sPath string, sFileName string) (Lib3MFHandle, error) { + var err error = nil + hSheet := implementation.NewHandle() + + implementation_imagestack, err := implementation.GetWrapperHandle(ImageStack) + if (err != nil) { + return hSheet, err } - return err + err = implementation.CallFunction(implementation.Lib3MF_imagestack_createsheetfromfile, implementation_imagestack.GetDLLInHandle(), UInt32InValue(nIndex), StringInValue(sPath), StringInValue(sFileName), hSheet.GetDLLOutHandle()) + if (err != nil) { + return hSheet, err + } + + return hSheet, err } func (implementation *Lib3MFImplementation) Attachment_GetPath(Attachment Lib3MFHandle) (string, error) { @@ -8240,10 +10935,61 @@ func (implementation *Lib3MFImplementation) Model_GetSliceStacks(Model Lib3MFHan } err = implementation.CallFunction(implementation.Lib3MF_model_getslicestacks, implementation_model.GetDLLInHandle(), hResourceIterator.GetDLLOutHandle()) - if err != nil { + if (err != nil) { + return hResourceIterator, err + } + + return hResourceIterator, err +} + +func (implementation *Lib3MFImplementation) Model_GetImage3Ds(Model Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hResourceIterator := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hResourceIterator, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_getimage3ds, implementation_model.GetDLLInHandle(), hResourceIterator.GetDLLOutHandle()) + if (err != nil) { + return hResourceIterator, err + } + + return hResourceIterator, err +} + +func (implementation *Lib3MFImplementation) Model_GetScalarFields(Model Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hResourceIterator := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hResourceIterator, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_getscalarfields, implementation_model.GetDLLInHandle(), hResourceIterator.GetDLLOutHandle()) + if (err != nil) { + return hResourceIterator, err + } + + return hResourceIterator, err +} + +func (implementation *Lib3MFImplementation) Model_GetVector3DFields(Model Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hResourceIterator := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { return hResourceIterator, err } + err = implementation.CallFunction(implementation.Lib3MF_model_getvector3dfields, implementation_model.GetDLLInHandle(), hResourceIterator.GetDLLOutHandle()) + if (err != nil) { + return hResourceIterator, err + } + return hResourceIterator, err } @@ -8447,6 +11193,298 @@ func (implementation *Lib3MFImplementation) Model_AddMultiPropertyGroup(Model Li return hMultiPropertyGroupInstance, err } +func (implementation *Lib3MFImplementation) Model_AddImageStack(Model Lib3MFHandle, nColumnCount uint32, nRowCount uint32, nSheetCount uint32) (Lib3MFHandle, error) { + var err error = nil + hInstance := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_addimagestack, implementation_model.GetDLLInHandle(), UInt32InValue(nColumnCount), UInt32InValue(nRowCount), UInt32InValue(nSheetCount), hInstance.GetDLLOutHandle()) + if (err != nil) { + return hInstance, err + } + + return hInstance, err +} + +func (implementation *Lib3MFImplementation) Model_GetImageStackByID(Model Lib3MFHandle, nUniqueResourceID uint32) (Lib3MFHandle, error) { + var err error = nil + hImageStackInstance := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hImageStackInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_getimagestackbyid, implementation_model.GetDLLInHandle(), UInt32InValue(nUniqueResourceID), hImageStackInstance.GetDLLOutHandle()) + if (err != nil) { + return hImageStackInstance, err + } + + return hImageStackInstance, err +} + +func (implementation *Lib3MFImplementation) Model_AddScalarFieldFromImage3D(Model Lib3MFHandle, Image3D Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheScalarFieldFromImage3D := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hTheScalarFieldFromImage3D, err + } + implementation_image3d, err := implementation.GetWrapperHandle(Image3D) + if (err != nil) { + return hTheScalarFieldFromImage3D, err + } + + Image3DDLLHandle := implementation_image3d.GetDLLInHandle() + if (Image3DDLLHandle == 0) { + err := fmt.Errorf("Handle must not be 0.") + return hTheScalarFieldFromImage3D, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_addscalarfieldfromimage3d, implementation_model.GetDLLInHandle(), Image3DDLLHandle, hTheScalarFieldFromImage3D.GetDLLOutHandle()) + if (err != nil) { + return hTheScalarFieldFromImage3D, err + } + + return hTheScalarFieldFromImage3D, err +} + +func (implementation *Lib3MFImplementation) Model_AddScalarFieldComposed(Model Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheScalarFieldComposed := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hTheScalarFieldComposed, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_addscalarfieldcomposed, implementation_model.GetDLLInHandle(), hTheScalarFieldComposed.GetDLLOutHandle()) + if (err != nil) { + return hTheScalarFieldComposed, err + } + + return hTheScalarFieldComposed, err +} + +func (implementation *Lib3MFImplementation) Model_AddScalarFieldConstant(Model Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheScalarFieldConstant := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hTheScalarFieldConstant, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_addscalarfieldconstant, implementation_model.GetDLLInHandle(), hTheScalarFieldConstant.GetDLLOutHandle()) + if (err != nil) { + return hTheScalarFieldConstant, err + } + + return hTheScalarFieldConstant, err +} + +func (implementation *Lib3MFImplementation) Model_GetScalarFieldByID(Model Lib3MFHandle, nUniqueResourceID uint32) (Lib3MFHandle, error) { + var err error = nil + hScalarFieldInstance := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hScalarFieldInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_getscalarfieldbyid, implementation_model.GetDLLInHandle(), UInt32InValue(nUniqueResourceID), hScalarFieldInstance.GetDLLOutHandle()) + if (err != nil) { + return hScalarFieldInstance, err + } + + return hScalarFieldInstance, err +} + +func (implementation *Lib3MFImplementation) Model_GetScalarFieldFromImage3DByID(Model Lib3MFHandle, nUniqueResourceID uint32) (Lib3MFHandle, error) { + var err error = nil + hScalarFieldFromImage3DInstance := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hScalarFieldFromImage3DInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_getscalarfieldfromimage3dbyid, implementation_model.GetDLLInHandle(), UInt32InValue(nUniqueResourceID), hScalarFieldFromImage3DInstance.GetDLLOutHandle()) + if (err != nil) { + return hScalarFieldFromImage3DInstance, err + } + + return hScalarFieldFromImage3DInstance, err +} + +func (implementation *Lib3MFImplementation) Model_GetScalarFieldComposedByID(Model Lib3MFHandle, nUniqueResourceID uint32) (Lib3MFHandle, error) { + var err error = nil + hScalarFieldComposedInstance := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hScalarFieldComposedInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_getscalarfieldcomposedbyid, implementation_model.GetDLLInHandle(), UInt32InValue(nUniqueResourceID), hScalarFieldComposedInstance.GetDLLOutHandle()) + if (err != nil) { + return hScalarFieldComposedInstance, err + } + + return hScalarFieldComposedInstance, err +} + +func (implementation *Lib3MFImplementation) Model_GetScalarFieldConstantByID(Model Lib3MFHandle, nUniqueResourceID uint32) (Lib3MFHandle, error) { + var err error = nil + hScalarFieldConstantInstance := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hScalarFieldConstantInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_getscalarfieldconstantbyid, implementation_model.GetDLLInHandle(), UInt32InValue(nUniqueResourceID), hScalarFieldConstantInstance.GetDLLOutHandle()) + if (err != nil) { + return hScalarFieldConstantInstance, err + } + + return hScalarFieldConstantInstance, err +} + +func (implementation *Lib3MFImplementation) Model_AddVector3DFieldFromImage3D(Model Lib3MFHandle, Image3D Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheVector3DFieldFromImage3D := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hTheVector3DFieldFromImage3D, err + } + implementation_image3d, err := implementation.GetWrapperHandle(Image3D) + if (err != nil) { + return hTheVector3DFieldFromImage3D, err + } + + Image3DDLLHandle := implementation_image3d.GetDLLInHandle() + if (Image3DDLLHandle == 0) { + err := fmt.Errorf("Handle must not be 0.") + return hTheVector3DFieldFromImage3D, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_addvector3dfieldfromimage3d, implementation_model.GetDLLInHandle(), Image3DDLLHandle, hTheVector3DFieldFromImage3D.GetDLLOutHandle()) + if (err != nil) { + return hTheVector3DFieldFromImage3D, err + } + + return hTheVector3DFieldFromImage3D, err +} + +func (implementation *Lib3MFImplementation) Model_AddVector3DFieldComposed(Model Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheVector3DFieldComposed := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hTheVector3DFieldComposed, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_addvector3dfieldcomposed, implementation_model.GetDLLInHandle(), hTheVector3DFieldComposed.GetDLLOutHandle()) + if (err != nil) { + return hTheVector3DFieldComposed, err + } + + return hTheVector3DFieldComposed, err +} + +func (implementation *Lib3MFImplementation) Model_AddVector3DFieldConstant(Model Lib3MFHandle) (Lib3MFHandle, error) { + var err error = nil + hTheVector3DFieldConstant := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hTheVector3DFieldConstant, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_addvector3dfieldconstant, implementation_model.GetDLLInHandle(), hTheVector3DFieldConstant.GetDLLOutHandle()) + if (err != nil) { + return hTheVector3DFieldConstant, err + } + + return hTheVector3DFieldConstant, err +} + +func (implementation *Lib3MFImplementation) Model_GetVector3DFieldByID(Model Lib3MFHandle, nUniqueResourceID uint32) (Lib3MFHandle, error) { + var err error = nil + hVector3DFieldInstance := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hVector3DFieldInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_getvector3dfieldbyid, implementation_model.GetDLLInHandle(), UInt32InValue(nUniqueResourceID), hVector3DFieldInstance.GetDLLOutHandle()) + if (err != nil) { + return hVector3DFieldInstance, err + } + + return hVector3DFieldInstance, err +} + +func (implementation *Lib3MFImplementation) Model_GetVector3DFieldFromImage3DByID(Model Lib3MFHandle, nUniqueResourceID uint32) (Lib3MFHandle, error) { + var err error = nil + hVector3DFieldFromImage3DInstance := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hVector3DFieldFromImage3DInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_getvector3dfieldfromimage3dbyid, implementation_model.GetDLLInHandle(), UInt32InValue(nUniqueResourceID), hVector3DFieldFromImage3DInstance.GetDLLOutHandle()) + if (err != nil) { + return hVector3DFieldFromImage3DInstance, err + } + + return hVector3DFieldFromImage3DInstance, err +} + +func (implementation *Lib3MFImplementation) Model_GetVector3DFieldComposedByID(Model Lib3MFHandle, nUniqueResourceID uint32) (Lib3MFHandle, error) { + var err error = nil + hVector3DFieldComposedInstance := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hVector3DFieldComposedInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_getvector3dfieldcomposedbyid, implementation_model.GetDLLInHandle(), UInt32InValue(nUniqueResourceID), hVector3DFieldComposedInstance.GetDLLOutHandle()) + if (err != nil) { + return hVector3DFieldComposedInstance, err + } + + return hVector3DFieldComposedInstance, err +} + +func (implementation *Lib3MFImplementation) Model_GetVector3DFieldConstantByID(Model Lib3MFHandle, nUniqueResourceID uint32) (Lib3MFHandle, error) { + var err error = nil + hVector3DFieldConstantInstance := implementation.NewHandle() + + implementation_model, err := implementation.GetWrapperHandle(Model) + if (err != nil) { + return hVector3DFieldConstantInstance, err + } + + err = implementation.CallFunction(implementation.Lib3MF_model_getvector3dfieldconstantbyid, implementation_model.GetDLLInHandle(), UInt32InValue(nUniqueResourceID), hVector3DFieldConstantInstance.GetDLLOutHandle()) + if (err != nil) { + return hVector3DFieldConstantInstance, err + } + + return hVector3DFieldConstantInstance, err +} + func (implementation *Lib3MFImplementation) Model_AddBuildItem(Model Lib3MFHandle, Object Lib3MFHandle, sTransform sLib3MFTransform) (Lib3MFHandle, error) { var err error = nil hBuildItemInstance := implementation.NewHandle() diff --git a/Autogenerated/Bindings/Go/lib3mf_types.h b/Autogenerated/Bindings/Go/lib3mf_types.h index 6f2dcf6a4..696aec4eb 100644 --- a/Autogenerated/Bindings/Go/lib3mf_types.h +++ b/Autogenerated/Bindings/Go/lib3mf_types.h @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -84,8 +84,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 3 -#define LIB3MF_VERSION_MICRO 2 +#define LIB3MF_VERSION_MINOR 4 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -130,13 +130,18 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER 140 /** A progress identifier is unknown */ #define LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT 141 /** An element buffer exceeds its spec limit */ #define LIB3MF_ERROR_INVALIDRESOURCE 142 /** A resource is invalid */ +#define LIB3MF_ERROR_INVALIDLEVELSET 143 /** A level set is invalid */ #define LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE 2000 /** This object type is not valid for beamlattices */ #define LIB3MF_ERROR_INVALIDKEYSTORE 3000 /** The keystore object is invalid */ #define LIB3MF_ERROR_INVALIDKEYSTORECONSUMER 3001 /** The consumer keystore object is invalid */ #define LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND 3002 /** A consumer has not been found */ #define LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND 3003 /** A resource data has not been found */ #define LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED 3004 /** A Key or Conentent encryption callback has not been registered */ -#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key siue is invalid */ +#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key size is invalid */ +#define LIB3MF_ERROR_INCOMPATIBLEPORTTYPES 4000 /** Link could not be added, the port types are incompatible */ +#define LIB3MF_ERROR_GRAPHISCYCLIC 4001 /** The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted. */ +#define LIB3MF_ERROR_INPUTNOTSET 4002 /** The input of a node is not set. */ +#define LIB3MF_ERROR_INVALIDNODECONFIGURATION 4003 /** The selected node configuration is not supported */ /************************************************************************************************************************* Error strings for Lib3MF @@ -181,13 +186,18 @@ inline const char * LIB3MF_GETERRORSTRING (Lib3MFResult nErrorCode) { case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "A progress identifier is unknown"; case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "An element buffer exceeds its spec limit"; case LIB3MF_ERROR_INVALIDRESOURCE: return "A resource is invalid"; + case LIB3MF_ERROR_INVALIDLEVELSET: return "A level set is invalid"; case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "This object type is not valid for beamlattices"; case LIB3MF_ERROR_INVALIDKEYSTORE: return "The keystore object is invalid"; case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "The consumer keystore object is invalid"; case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: return "A consumer has not been found"; case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "A resource data has not been found"; case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "A Key or Conentent encryption callback has not been registered"; - case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key siue is invalid"; + case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key size is invalid"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "Link could not be added, the port types are incompatible"; + case LIB3MF_ERROR_GRAPHISCYCLIC: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case LIB3MF_ERROR_INPUTNOTSET: return "The input of a node is not set."; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "The selected node configuration is not supported"; default: return "unknown error"; } } @@ -212,11 +222,21 @@ typedef Lib3MFHandle Lib3MF_ColorGroupIterator; typedef Lib3MFHandle Lib3MF_Texture2DGroupIterator; typedef Lib3MFHandle Lib3MF_CompositeMaterialsIterator; typedef Lib3MFHandle Lib3MF_MultiPropertyGroupIterator; +typedef Lib3MFHandle Lib3MF_Image3DIterator; +typedef Lib3MFHandle Lib3MF_FunctionIterator; +typedef Lib3MFHandle Lib3MF_LevelSetIterator; typedef Lib3MFHandle Lib3MF_MetaData; typedef Lib3MFHandle Lib3MF_MetaDataGroup; typedef Lib3MFHandle Lib3MF_Object; typedef Lib3MFHandle Lib3MF_MeshObject; +typedef Lib3MFHandle Lib3MF_LevelSet; typedef Lib3MFHandle Lib3MF_BeamLattice; +typedef Lib3MFHandle Lib3MF_FunctionReference; +typedef Lib3MFHandle Lib3MF_VolumeDataColor; +typedef Lib3MFHandle Lib3MF_MaterialMapping; +typedef Lib3MFHandle Lib3MF_VolumeDataComposite; +typedef Lib3MFHandle Lib3MF_VolumeDataProperty; +typedef Lib3MFHandle Lib3MF_VolumeData; typedef Lib3MFHandle Lib3MF_Component; typedef Lib3MFHandle Lib3MF_ComponentsObject; typedef Lib3MFHandle Lib3MF_BeamSet; @@ -225,8 +245,71 @@ typedef Lib3MFHandle Lib3MF_ColorGroup; typedef Lib3MFHandle Lib3MF_Texture2DGroup; typedef Lib3MFHandle Lib3MF_CompositeMaterials; typedef Lib3MFHandle Lib3MF_MultiPropertyGroup; +typedef Lib3MFHandle Lib3MF_Image3D; +typedef Lib3MFHandle Lib3MF_ImageStack; typedef Lib3MFHandle Lib3MF_Attachment; typedef Lib3MFHandle Lib3MF_Texture2D; +typedef Lib3MFHandle Lib3MF_ImplicitPort; +typedef Lib3MFHandle Lib3MF_Iterator; +typedef Lib3MFHandle Lib3MF_ImplicitPortIterator; +typedef Lib3MFHandle Lib3MF_ImplicitNode; +typedef Lib3MFHandle Lib3MF_OneInputNode; +typedef Lib3MFHandle Lib3MF_SinNode; +typedef Lib3MFHandle Lib3MF_CosNode; +typedef Lib3MFHandle Lib3MF_TanNode; +typedef Lib3MFHandle Lib3MF_ArcSinNode; +typedef Lib3MFHandle Lib3MF_ArcCosNode; +typedef Lib3MFHandle Lib3MF_ArcTanNode; +typedef Lib3MFHandle Lib3MF_SinhNode; +typedef Lib3MFHandle Lib3MF_CoshNode; +typedef Lib3MFHandle Lib3MF_TanhNode; +typedef Lib3MFHandle Lib3MF_RoundNode; +typedef Lib3MFHandle Lib3MF_CeilNode; +typedef Lib3MFHandle Lib3MF_FloorNode; +typedef Lib3MFHandle Lib3MF_SignNode; +typedef Lib3MFHandle Lib3MF_FractNode; +typedef Lib3MFHandle Lib3MF_AbsNode; +typedef Lib3MFHandle Lib3MF_ExpNode; +typedef Lib3MFHandle Lib3MF_LogNode; +typedef Lib3MFHandle Lib3MF_Log2Node; +typedef Lib3MFHandle Lib3MF_Log10Node; +typedef Lib3MFHandle Lib3MF_LengthNode; +typedef Lib3MFHandle Lib3MF_TransposeNode; +typedef Lib3MFHandle Lib3MF_InverseNode; +typedef Lib3MFHandle Lib3MF_SqrtNode; +typedef Lib3MFHandle Lib3MF_ResourceIdNode; +typedef Lib3MFHandle Lib3MF_TwoInputNode; +typedef Lib3MFHandle Lib3MF_AdditionNode; +typedef Lib3MFHandle Lib3MF_SubtractionNode; +typedef Lib3MFHandle Lib3MF_MultiplicationNode; +typedef Lib3MFHandle Lib3MF_DivisionNode; +typedef Lib3MFHandle Lib3MF_DotNode; +typedef Lib3MFHandle Lib3MF_CrossNode; +typedef Lib3MFHandle Lib3MF_ArcTan2Node; +typedef Lib3MFHandle Lib3MF_MatVecMultiplicationNode; +typedef Lib3MFHandle Lib3MF_MinNode; +typedef Lib3MFHandle Lib3MF_MaxNode; +typedef Lib3MFHandle Lib3MF_FmodNode; +typedef Lib3MFHandle Lib3MF_ModNode; +typedef Lib3MFHandle Lib3MF_PowNode; +typedef Lib3MFHandle Lib3MF_SelectNode; +typedef Lib3MFHandle Lib3MF_ClampNode; +typedef Lib3MFHandle Lib3MF_ComposeVectorNode; +typedef Lib3MFHandle Lib3MF_VectorFromScalarNode; +typedef Lib3MFHandle Lib3MF_DecomposeVectorNode; +typedef Lib3MFHandle Lib3MF_ComposeMatrixNode; +typedef Lib3MFHandle Lib3MF_MatrixFromRowsNode; +typedef Lib3MFHandle Lib3MF_MatrixFromColumnsNode; +typedef Lib3MFHandle Lib3MF_ConstantNode; +typedef Lib3MFHandle Lib3MF_ConstVecNode; +typedef Lib3MFHandle Lib3MF_ConstMatNode; +typedef Lib3MFHandle Lib3MF_MeshNode; +typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_FunctionCallNode; +typedef Lib3MFHandle Lib3MF_NodeIterator; +typedef Lib3MFHandle Lib3MF_Function; +typedef Lib3MFHandle Lib3MF_ImplicitFunction; +typedef Lib3MFHandle Lib3MF_FunctionFromImage3D; typedef Lib3MFHandle Lib3MF_BuildItem; typedef Lib3MFHandle Lib3MF_BuildItemIterator; typedef Lib3MFHandle Lib3MF_Slice; @@ -305,7 +388,7 @@ typedef enum eLib3MFBeamLatticeClipMode { } eLib3MFBeamLatticeClipMode; typedef enum eLib3MFBeamLatticeBallMode { - eBeamLatticeBallModeNone = 0, + eBeamLatticeBallModeBeamLatticeBallModeNone = 0, eBeamLatticeBallModeMixed = 1, eBeamLatticeBallModeAll = 2 } eLib3MFBeamLatticeBallMode; @@ -343,6 +426,103 @@ typedef enum eLib3MFBlendMethod { eBlendMethodMultiply = 2 } eLib3MFBlendMethod; +typedef enum eLib3MFChannelName { + eChannelNameRed = 0, + eChannelNameGreen = 1, + eChannelNameBlue = 2, + eChannelNameAlpha = 3 +} eLib3MFChannelName; + +typedef enum eLib3MFCompositionMethod { + eCompositionMethodWeightedSum = 0, + eCompositionMethodMultiply = 1, + eCompositionMethodMin = 2, + eCompositionMethodMax = 3, + eCompositionMethodMask = 4 +} eLib3MFCompositionMethod; + +typedef enum eLib3MFCompositionSpace { + eCompositionSpaceRaw = 0, + eCompositionSpaceLinearColor = 1 +} eLib3MFCompositionSpace; + +/** +* enum eLib3MFImplicitNodeType - The type of the node +*/ +typedef enum eLib3MFImplicitNodeType { + eImplicitNodeTypeAddition = 1, /** Adds to values (scalar or vector) */ + eImplicitNodeTypeSubtraction = 2, /** Subtracts two values (scalar or vector) */ + eImplicitNodeTypeMultiplication = 3, /** Multiplies two values (scalar or vector) */ + eImplicitNodeTypeDivision = 4, /** Divides two values (scalar or vector) */ + eImplicitNodeTypeConstant = 5, /** A constant scalar value */ + eImplicitNodeTypeConstVec = 6, /** A constant vector value */ + eImplicitNodeTypeConstMat = 7, /** A constant matrix value */ + eImplicitNodeTypeComposeVector = 8, /** Creates a vector from three scalar values */ + eImplicitNodeTypeDecomposeVector = 9, /** Decomposes a vector into three scalar values */ + eImplicitNodeTypeComposeMatrix = 10, /** Creates a matrix from nine scalar values */ + eImplicitNodeTypeMatrixFromColumns = 11, /** Creates a matrix from three column vector values */ + eImplicitNodeTypeMatrixFromRows = 12, /** Creates a matrix from three row vector values */ + eImplicitNodeTypeDot = 13, /** Calculates the dot product of two vector values */ + eImplicitNodeTypeCross = 14, /** Calculates the cross product of two vector values */ + eImplicitNodeTypeMatVecMultiplication = 15, /** Multiplies a matrix with a vector */ + eImplicitNodeTypeTranspose = 16, /** Transposes a matrix */ + eImplicitNodeTypeInverse = 17, /** Computes the inverse of a matrix */ + eImplicitNodeTypeSinus = 18, /** Calculates the sinus */ + eImplicitNodeTypeCosinus = 19, /** Calculates the cosinus */ + eImplicitNodeTypeTan = 20, /** Calculates the tangent */ + eImplicitNodeTypeArcSin = 21, /** Calculates the arcsinus */ + eImplicitNodeTypeArcCos = 22, /** Calculates the arccosinus */ + eImplicitNodeTypeArcTan = 23, /** Calculates the arctangent */ + eImplicitNodeTypeArcTan2 = 24, /** Calculates the arctangent */ + eImplicitNodeTypeMin = 25, /** Calculates the minimum tow values */ + eImplicitNodeTypeMax = 26, /** Calculates the maximum of two values */ + eImplicitNodeTypeAbs = 27, /** Calcul the absolute value */ + eImplicitNodeTypeFmod = 28, /** Computes the remainder of the divison of the inputs (same behavior as C fmod) */ + eImplicitNodeTypePow = 29, /** Calculates the power A^B */ + eImplicitNodeTypeSqrt = 30, /** Calculates the square root */ + eImplicitNodeTypeExp = 31, /** Exponential function */ + eImplicitNodeTypeLog = 32, /** Natural logarithmus */ + eImplicitNodeTypeLog2 = 33, /** Logarithmus to the base 2 */ + eImplicitNodeTypeLog10 = 34, /** Logarithmus to the base 10 */ + eImplicitNodeTypeSelect = 35, /** If A is less B returns C, else D */ + eImplicitNodeTypeClamp = 36, /** Clamps the input value to min and max */ + eImplicitNodeTypeSinh = 37, /** Calculates the hyperbolic sine */ + eImplicitNodeTypeCosh = 38, /** Calculates the hyperbolic cosine */ + eImplicitNodeTypeTanh = 39, /** Calculates the hyperbolic tangent */ + eImplicitNodeTypeRound = 40, /** Rounds a scalar value to the nearest integer */ + eImplicitNodeTypeCeil = 41, /** Rounds a scalar value up to the nearest integer */ + eImplicitNodeTypeFloor = 42, /** Rounds a scalar value down to the nearest integer */ + eImplicitNodeTypeSign = 43, /** Returns the sign */ + eImplicitNodeTypeFract = 44, /** Returns the fractional part */ + eImplicitNodeTypeFunctionCall = 45, /** Calls a function */ + eImplicitNodeTypeMesh = 46, /** Calculates the signed distance to a mesh */ + eImplicitNodeTypeLength = 47, /** Calculates the length of a vector */ + eImplicitNodeTypeConstResourceID = 48, /** Selects a resource (function, mesh etc.) */ + eImplicitNodeTypeVectorFromScalar = 49, /** Creates a vector from one scalar values */ + eImplicitNodeTypeUnsignedMesh = 50, /** Calculates the unsigned distance to a mesh */ + eImplicitNodeTypeMod = 51 /** Calculates the modulo of two values (same behaviour as glsl mod) */ +} eLib3MFImplicitNodeType; + +/** +* enum eLib3MFImplicitPortType - The type of the port +*/ +typedef enum eLib3MFImplicitPortType { + eImplicitPortTypeScalar = 1, /** Scalar */ + eImplicitPortTypeVector = 2, /** Vector */ + eImplicitPortTypeMatrix = 3, /** 4x4 Matrix */ + eImplicitPortTypeResourceID = 4 /** Resource ID */ +} eLib3MFImplicitPortType; + +/** +* enum eLib3MFImplicitNodeConfiguration - Defines the input and output types of a node +*/ +typedef enum eLib3MFImplicitNodeConfiguration { + eImplicitNodeConfigurationDefault = 1, /** Default */ + eImplicitNodeConfigurationScalarToScalar = 2, /** Scalar -> Scalar */ + eImplicitNodeConfigurationVectorToVector = 3, /** Vector -> Vector */ + eImplicitNodeConfigurationMatrixToMatrix = 4 /** Matrix -> Matrix */ +} eLib3MFImplicitNodeConfiguration; + typedef enum eLib3MFEncryptionAlgorithm { eEncryptionAlgorithmAES256_GCM = 1 /** http://www.w3.org/2009/xmlenc11#aes256-gcm */ } eLib3MFEncryptionAlgorithm; @@ -433,6 +613,36 @@ typedef union { int m_code; } structEnumLib3MFBlendMethod; +typedef union { + eLib3MFChannelName m_enum; + int m_code; +} structEnumLib3MFChannelName; + +typedef union { + eLib3MFCompositionMethod m_enum; + int m_code; +} structEnumLib3MFCompositionMethod; + +typedef union { + eLib3MFCompositionSpace m_enum; + int m_code; +} structEnumLib3MFCompositionSpace; + +typedef union { + eLib3MFImplicitNodeType m_enum; + int m_code; +} structEnumLib3MFImplicitNodeType; + +typedef union { + eLib3MFImplicitPortType m_enum; + int m_code; +} structEnumLib3MFImplicitPortType; + +typedef union { + eLib3MFImplicitNodeConfiguration m_enum; + int m_code; +} structEnumLib3MFImplicitNodeConfiguration; + typedef union { eLib3MFEncryptionAlgorithm m_enum; int m_code; @@ -523,6 +733,14 @@ typedef struct sLib3MFBall { Lib3MF_double m_Radius; } sLib3MFBall; +typedef struct sLib3MFVector { + Lib3MF_double m_Coordinates[3]; +} sLib3MFVector; + +typedef struct sLib3MFMatrix4x4 { + Lib3MF_double m_Field[4][4]; +} sLib3MFMatrix4x4; + #pragma pack () /************************************************************************************************************************* diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc index e1cec341d..2bef1bdf1 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc +++ b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.cc @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -96,6 +96,9 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Texture2DGroupIterator_GetCurrentTexture2DGroup = NULL; pWrapperTable->m_CompositeMaterialsIterator_GetCurrentCompositeMaterials = NULL; pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup = NULL; + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = NULL; + pWrapperTable->m_FunctionIterator_GetCurrentFunction = NULL; + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = NULL; pWrapperTable->m_MetaData_GetNameSpace = NULL; pWrapperTable->m_MetaData_SetNameSpace = NULL; pWrapperTable->m_MetaData_GetName = NULL; @@ -121,6 +124,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Object_SetPartNumber = NULL; pWrapperTable->m_Object_IsMeshObject = NULL; pWrapperTable->m_Object_IsComponentsObject = NULL; + pWrapperTable->m_Object_IsLevelSetObject = NULL; pWrapperTable->m_Object_IsValid = NULL; pWrapperTable->m_Object_SetAttachmentAsThumbnail = NULL; pWrapperTable->m_Object_GetThumbnailAttachment = NULL; @@ -155,6 +159,24 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_MeshObject_SetGeometry = NULL; pWrapperTable->m_MeshObject_IsManifoldAndOriented = NULL; pWrapperTable->m_MeshObject_BeamLattice = NULL; + pWrapperTable->m_MeshObject_GetVolumeData = NULL; + pWrapperTable->m_MeshObject_SetVolumeData = NULL; + pWrapperTable->m_LevelSet_GetFunction = NULL; + pWrapperTable->m_LevelSet_SetFunction = NULL; + pWrapperTable->m_LevelSet_GetTransform = NULL; + pWrapperTable->m_LevelSet_SetTransform = NULL; + pWrapperTable->m_LevelSet_GetChannelName = NULL; + pWrapperTable->m_LevelSet_SetChannelName = NULL; + pWrapperTable->m_LevelSet_SetMinFeatureSize = NULL; + pWrapperTable->m_LevelSet_GetMinFeatureSize = NULL; + pWrapperTable->m_LevelSet_SetFallBackValue = NULL; + pWrapperTable->m_LevelSet_GetFallBackValue = NULL; + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = NULL; + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = NULL; + pWrapperTable->m_LevelSet_SetMesh = NULL; + pWrapperTable->m_LevelSet_GetMesh = NULL; + pWrapperTable->m_LevelSet_GetVolumeData = NULL; + pWrapperTable->m_LevelSet_SetVolumeData = NULL; pWrapperTable->m_BeamLattice_GetMinLength = NULL; pWrapperTable->m_BeamLattice_SetMinLength = NULL; pWrapperTable->m_BeamLattice_GetClipping = NULL; @@ -178,6 +200,35 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_BeamLattice_GetBeamSetCount = NULL; pWrapperTable->m_BeamLattice_AddBeamSet = NULL; pWrapperTable->m_BeamLattice_GetBeamSet = NULL; + pWrapperTable->m_FunctionReference_GetFunctionResourceID = NULL; + pWrapperTable->m_FunctionReference_SetFunctionResourceID = NULL; + pWrapperTable->m_FunctionReference_GetTransform = NULL; + pWrapperTable->m_FunctionReference_SetTransform = NULL; + pWrapperTable->m_FunctionReference_GetChannelName = NULL; + pWrapperTable->m_FunctionReference_SetChannelName = NULL; + pWrapperTable->m_FunctionReference_SetMinFeatureSize = NULL; + pWrapperTable->m_FunctionReference_GetMinFeatureSize = NULL; + pWrapperTable->m_FunctionReference_SetFallBackValue = NULL; + pWrapperTable->m_FunctionReference_GetFallBackValue = NULL; + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = NULL; + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = NULL; + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = NULL; + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = NULL; + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = NULL; + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = NULL; + pWrapperTable->m_VolumeDataProperty_GetName = NULL; + pWrapperTable->m_VolumeDataProperty_SetIsRequired = NULL; + pWrapperTable->m_VolumeDataProperty_IsRequired = NULL; + pWrapperTable->m_VolumeData_GetComposite = NULL; + pWrapperTable->m_VolumeData_CreateNewComposite = NULL; + pWrapperTable->m_VolumeData_RemoveComposite = NULL; + pWrapperTable->m_VolumeData_GetColor = NULL; + pWrapperTable->m_VolumeData_CreateNewColor = NULL; + pWrapperTable->m_VolumeData_RemoveColor = NULL; + pWrapperTable->m_VolumeData_GetPropertyCount = NULL; + pWrapperTable->m_VolumeData_GetProperty = NULL; + pWrapperTable->m_VolumeData_AddPropertyFromFunction = NULL; + pWrapperTable->m_VolumeData_RemoveProperty = NULL; pWrapperTable->m_Component_GetObjectResource = NULL; pWrapperTable->m_Component_GetObjectResourceID = NULL; pWrapperTable->m_Component_GetUUID = NULL; @@ -234,6 +285,19 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_MultiPropertyGroup_AddLayer = NULL; pWrapperTable->m_MultiPropertyGroup_GetLayer = NULL; pWrapperTable->m_MultiPropertyGroup_RemoveLayer = NULL; + pWrapperTable->m_Image3D_GetName = NULL; + pWrapperTable->m_Image3D_SetName = NULL; + pWrapperTable->m_Image3D_IsImageStack = NULL; + pWrapperTable->m_ImageStack_GetRowCount = NULL; + pWrapperTable->m_ImageStack_SetRowCount = NULL; + pWrapperTable->m_ImageStack_GetColumnCount = NULL; + pWrapperTable->m_ImageStack_SetColumnCount = NULL; + pWrapperTable->m_ImageStack_GetSheetCount = NULL; + pWrapperTable->m_ImageStack_GetSheet = NULL; + pWrapperTable->m_ImageStack_SetSheet = NULL; + pWrapperTable->m_ImageStack_CreateEmptySheet = NULL; + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = NULL; + pWrapperTable->m_ImageStack_CreateSheetFromFile = NULL; pWrapperTable->m_Attachment_GetPath = NULL; pWrapperTable->m_Attachment_SetPath = NULL; pWrapperTable->m_Attachment_PackagePart = NULL; @@ -253,6 +317,173 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Texture2D_SetTileStyleUV = NULL; pWrapperTable->m_Texture2D_GetFilter = NULL; pWrapperTable->m_Texture2D_SetFilter = NULL; + pWrapperTable->m_ImplicitPort_GetIdentifier = NULL; + pWrapperTable->m_ImplicitPort_SetIdentifier = NULL; + pWrapperTable->m_ImplicitPort_GetDisplayName = NULL; + pWrapperTable->m_ImplicitPort_SetDisplayName = NULL; + pWrapperTable->m_ImplicitPort_SetType = NULL; + pWrapperTable->m_ImplicitPort_GetType = NULL; + pWrapperTable->m_ImplicitPort_GetReference = NULL; + pWrapperTable->m_ImplicitPort_SetReference = NULL; + pWrapperTable->m_Iterator_MoveNext = NULL; + pWrapperTable->m_Iterator_MovePrevious = NULL; + pWrapperTable->m_Iterator_Count = NULL; + pWrapperTable->m_ImplicitPortIterator_GetCurrent = NULL; + pWrapperTable->m_ImplicitNode_GetIdentifier = NULL; + pWrapperTable->m_ImplicitNode_SetIdentifier = NULL; + pWrapperTable->m_ImplicitNode_GetDisplayName = NULL; + pWrapperTable->m_ImplicitNode_SetDisplayName = NULL; + pWrapperTable->m_ImplicitNode_GetTag = NULL; + pWrapperTable->m_ImplicitNode_SetTag = NULL; + pWrapperTable->m_ImplicitNode_GetNodeType = NULL; + pWrapperTable->m_ImplicitNode_AddInput = NULL; + pWrapperTable->m_ImplicitNode_GetInputs = NULL; + pWrapperTable->m_ImplicitNode_AddOutput = NULL; + pWrapperTable->m_ImplicitNode_GetOutputs = NULL; + pWrapperTable->m_ImplicitNode_FindInput = NULL; + pWrapperTable->m_ImplicitNode_FindOutput = NULL; + pWrapperTable->m_ImplicitNode_AreTypesValid = NULL; + pWrapperTable->m_OneInputNode_GetInputA = NULL; + pWrapperTable->m_OneInputNode_GetOutputResult = NULL; + pWrapperTable->m_ResourceIdNode_SetResource = NULL; + pWrapperTable->m_ResourceIdNode_GetResource = NULL; + pWrapperTable->m_ResourceIdNode_GetOutputValue = NULL; + pWrapperTable->m_TwoInputNode_GetInputB = NULL; + pWrapperTable->m_SelectNode_GetInputB = NULL; + pWrapperTable->m_SelectNode_GetInputC = NULL; + pWrapperTable->m_SelectNode_GetInputD = NULL; + pWrapperTable->m_ClampNode_GetInputMin = NULL; + pWrapperTable->m_ClampNode_GetInputMax = NULL; + pWrapperTable->m_ComposeVectorNode_GetInputX = NULL; + pWrapperTable->m_ComposeVectorNode_GetInputY = NULL; + pWrapperTable->m_ComposeVectorNode_GetInputZ = NULL; + pWrapperTable->m_ComposeVectorNode_GetOutputResult = NULL; + pWrapperTable->m_DecomposeVectorNode_GetInputA = NULL; + pWrapperTable->m_DecomposeVectorNode_GetOutputX = NULL; + pWrapperTable->m_DecomposeVectorNode_GetOutputY = NULL; + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = NULL; + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputA = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputB = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputC = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetInputD = NULL; + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = NULL; + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = NULL; + pWrapperTable->m_ConstantNode_SetConstant = NULL; + pWrapperTable->m_ConstantNode_GetConstant = NULL; + pWrapperTable->m_ConstantNode_GetOutputValue = NULL; + pWrapperTable->m_ConstVecNode_SetVector = NULL; + pWrapperTable->m_ConstVecNode_GetVector = NULL; + pWrapperTable->m_ConstVecNode_GetOutputVector = NULL; + pWrapperTable->m_ConstMatNode_SetMatrix = NULL; + pWrapperTable->m_ConstMatNode_GetMatrix = NULL; + pWrapperTable->m_ConstMatNode_GetOutputMatrix = NULL; + pWrapperTable->m_MeshNode_GetInputMesh = NULL; + pWrapperTable->m_MeshNode_GetInputPos = NULL; + pWrapperTable->m_MeshNode_GetOutputDistance = NULL; + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = NULL; + pWrapperTable->m_UnsignedMeshNode_GetInputPos = NULL; + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = NULL; + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = NULL; + pWrapperTable->m_NodeIterator_GetCurrent = NULL; + pWrapperTable->m_Function_GetDisplayName = NULL; + pWrapperTable->m_Function_SetDisplayName = NULL; + pWrapperTable->m_Function_AddInput = NULL; + pWrapperTable->m_Function_GetInputs = NULL; + pWrapperTable->m_Function_RemoveInput = NULL; + pWrapperTable->m_Function_AddOutput = NULL; + pWrapperTable->m_Function_GetOutputs = NULL; + pWrapperTable->m_Function_RemoveOutput = NULL; + pWrapperTable->m_Function_FindInput = NULL; + pWrapperTable->m_Function_FindOutput = NULL; + pWrapperTable->m_ImplicitFunction_GetIdentifier = NULL; + pWrapperTable->m_ImplicitFunction_SetIdentifier = NULL; + pWrapperTable->m_ImplicitFunction_AddNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSinNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCosNode = NULL; + pWrapperTable->m_ImplicitFunction_AddTanNode = NULL; + pWrapperTable->m_ImplicitFunction_AddArcSinNode = NULL; + pWrapperTable->m_ImplicitFunction_AddArcCosNode = NULL; + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = NULL; + pWrapperTable->m_ImplicitFunction_AddSinhNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCoshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddTanhNode = NULL; + pWrapperTable->m_ImplicitFunction_AddRoundNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCeilNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFloorNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSignNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFractNode = NULL; + pWrapperTable->m_ImplicitFunction_AddAbsNode = NULL; + pWrapperTable->m_ImplicitFunction_AddExpNode = NULL; + pWrapperTable->m_ImplicitFunction_AddLogNode = NULL; + pWrapperTable->m_ImplicitFunction_AddLog2Node = NULL; + pWrapperTable->m_ImplicitFunction_AddLog10Node = NULL; + pWrapperTable->m_ImplicitFunction_AddLengthNode = NULL; + pWrapperTable->m_ImplicitFunction_AddTransposeNode = NULL; + pWrapperTable->m_ImplicitFunction_InverseNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSqrtNode = NULL; + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = NULL; + pWrapperTable->m_ImplicitFunction_AddAdditionNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = NULL; + pWrapperTable->m_ImplicitFunction_AddDivisionNode = NULL; + pWrapperTable->m_ImplicitFunction_AddDotNode = NULL; + pWrapperTable->m_ImplicitFunction_AddCrossNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMinNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMaxNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFmodNode = NULL; + pWrapperTable->m_ImplicitFunction_AddPowNode = NULL; + pWrapperTable->m_ImplicitFunction_AddSelectNode = NULL; + pWrapperTable->m_ImplicitFunction_AddClampNode = NULL; + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = NULL; + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = NULL; + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = NULL; + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = NULL; + pWrapperTable->m_ImplicitFunction_AddConstantNode = NULL; + pWrapperTable->m_ImplicitFunction_AddConstVecNode = NULL; + pWrapperTable->m_ImplicitFunction_AddConstMatNode = NULL; + pWrapperTable->m_ImplicitFunction_AddMeshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = NULL; + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = NULL; + pWrapperTable->m_ImplicitFunction_GetNodes = NULL; + pWrapperTable->m_ImplicitFunction_RemoveNode = NULL; + pWrapperTable->m_ImplicitFunction_AddLink = NULL; + pWrapperTable->m_ImplicitFunction_AddLinkByNames = NULL; + pWrapperTable->m_ImplicitFunction_Clear = NULL; + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = NULL; + pWrapperTable->m_FunctionFromImage3D_GetImage3D = NULL; + pWrapperTable->m_FunctionFromImage3D_SetImage3D = NULL; + pWrapperTable->m_FunctionFromImage3D_SetFilter = NULL; + pWrapperTable->m_FunctionFromImage3D_GetFilter = NULL; + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = NULL; + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = NULL; + pWrapperTable->m_FunctionFromImage3D_GetOffset = NULL; + pWrapperTable->m_FunctionFromImage3D_SetOffset = NULL; + pWrapperTable->m_FunctionFromImage3D_GetScale = NULL; + pWrapperTable->m_FunctionFromImage3D_SetScale = NULL; pWrapperTable->m_BuildItem_GetObjectResource = NULL; pWrapperTable->m_BuildItem_GetUUID = NULL; pWrapperTable->m_BuildItem_SetUUID = NULL; @@ -347,6 +578,7 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_GetComponentsObjectByID = NULL; pWrapperTable->m_Model_GetColorGroupByID = NULL; pWrapperTable->m_Model_GetSliceStackByID = NULL; + pWrapperTable->m_Model_GetLevelSetByID = NULL; pWrapperTable->m_Model_GetBuildUUID = NULL; pWrapperTable->m_Model_SetBuildUUID = NULL; pWrapperTable->m_Model_GetBuildItems = NULL; @@ -362,7 +594,9 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_GetCompositeMaterials = NULL; pWrapperTable->m_Model_GetMultiPropertyGroups = NULL; pWrapperTable->m_Model_GetSliceStacks = NULL; + pWrapperTable->m_Model_GetImage3Ds = NULL; pWrapperTable->m_Model_MergeToModel = NULL; + pWrapperTable->m_Model_MergeFromModel = NULL; pWrapperTable->m_Model_AddMeshObject = NULL; pWrapperTable->m_Model_AddComponentsObject = NULL; pWrapperTable->m_Model_AddSliceStack = NULL; @@ -372,6 +606,8 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_AddTexture2DGroup = NULL; pWrapperTable->m_Model_AddCompositeMaterials = NULL; pWrapperTable->m_Model_AddMultiPropertyGroup = NULL; + pWrapperTable->m_Model_AddImageStack = NULL; + pWrapperTable->m_Model_GetImageStackByID = NULL; pWrapperTable->m_Model_AddBuildItem = NULL; pWrapperTable->m_Model_RemoveBuildItem = NULL; pWrapperTable->m_Model_GetMetaDataGroup = NULL; @@ -388,6 +624,13 @@ Lib3MFResult InitLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable) pWrapperTable->m_Model_RemoveCustomContentType = NULL; pWrapperTable->m_Model_SetRandomNumberCallback = NULL; pWrapperTable->m_Model_GetKeyStore = NULL; + pWrapperTable->m_Model_GetFunctions = NULL; + pWrapperTable->m_Model_AddImplicitFunction = NULL; + pWrapperTable->m_Model_AddFunctionFromImage3D = NULL; + pWrapperTable->m_Model_AddVolumeData = NULL; + pWrapperTable->m_Model_AddLevelSet = NULL; + pWrapperTable->m_Model_GetLevelSets = NULL; + pWrapperTable->m_Model_RemoveResource = NULL; pWrapperTable->m_GetLibraryVersion = NULL; pWrapperTable->m_GetPrereleaseInformation = NULL; pWrapperTable->m_GetBuildInformation = NULL; @@ -893,6 +1136,33 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = (PLib3MFImage3DIterator_GetCurrentImage3DPtr) GetProcAddress(hLibrary, "lib3mf_image3diterator_getcurrentimage3d"); + #else // _WIN32 + pWrapperTable->m_Image3DIterator_GetCurrentImage3D = (PLib3MFImage3DIterator_GetCurrentImage3DPtr) dlsym(hLibrary, "lib3mf_image3diterator_getcurrentimage3d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3DIterator_GetCurrentImage3D == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionIterator_GetCurrentFunction = (PLib3MFFunctionIterator_GetCurrentFunctionPtr) GetProcAddress(hLibrary, "lib3mf_functioniterator_getcurrentfunction"); + #else // _WIN32 + pWrapperTable->m_FunctionIterator_GetCurrentFunction = (PLib3MFFunctionIterator_GetCurrentFunctionPtr) dlsym(hLibrary, "lib3mf_functioniterator_getcurrentfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionIterator_GetCurrentFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = (PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) GetProcAddress(hLibrary, "lib3mf_levelsetiterator_getcurrentlevelset"); + #else // _WIN32 + pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet = (PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) dlsym(hLibrary, "lib3mf_levelsetiterator_getcurrentlevelset"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSetIterator_GetCurrentLevelSet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_MetaData_GetNameSpace = (PLib3MFMetaData_GetNameSpacePtr) GetProcAddress(hLibrary, "lib3mf_metadata_getnamespace"); #else // _WIN32 @@ -1118,6 +1388,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Object_IsComponentsObject == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) GetProcAddress(hLibrary, "lib3mf_object_islevelsetobject"); + #else // _WIN32 + pWrapperTable->m_Object_IsLevelSetObject = (PLib3MFObject_IsLevelSetObjectPtr) dlsym(hLibrary, "lib3mf_object_islevelsetobject"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Object_IsLevelSetObject == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Object_IsValid = (PLib3MFObject_IsValidPtr) GetProcAddress(hLibrary, "lib3mf_object_isvalid"); #else // _WIN32 @@ -1424,6 +1703,168 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_MeshObject_BeamLattice == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_MeshObject_GetVolumeData = (PLib3MFMeshObject_GetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_getvolumedata"); + #else // _WIN32 + pWrapperTable->m_MeshObject_GetVolumeData = (PLib3MFMeshObject_GetVolumeDataPtr) dlsym(hLibrary, "lib3mf_meshobject_getvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_GetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshObject_SetVolumeData = (PLib3MFMeshObject_SetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_meshobject_setvolumedata"); + #else // _WIN32 + pWrapperTable->m_MeshObject_SetVolumeData = (PLib3MFMeshObject_SetVolumeDataPtr) dlsym(hLibrary, "lib3mf_meshobject_setvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshObject_SetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetFunction = (PLib3MFLevelSet_GetFunctionPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getfunction"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetFunction = (PLib3MFLevelSet_GetFunctionPtr) dlsym(hLibrary, "lib3mf_levelset_getfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetFunction = (PLib3MFLevelSet_SetFunctionPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setfunction"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetFunction = (PLib3MFLevelSet_SetFunctionPtr) dlsym(hLibrary, "lib3mf_levelset_setfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetTransform = (PLib3MFLevelSet_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_levelset_gettransform"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetTransform = (PLib3MFLevelSet_GetTransformPtr) dlsym(hLibrary, "lib3mf_levelset_gettransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetTransform = (PLib3MFLevelSet_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_levelset_settransform"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetTransform = (PLib3MFLevelSet_SetTransformPtr) dlsym(hLibrary, "lib3mf_levelset_settransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetChannelName = (PLib3MFLevelSet_GetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getchannelname"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetChannelName = (PLib3MFLevelSet_GetChannelNamePtr) dlsym(hLibrary, "lib3mf_levelset_getchannelname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetChannelName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetChannelName = (PLib3MFLevelSet_SetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setchannelname"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetChannelName = (PLib3MFLevelSet_SetChannelNamePtr) dlsym(hLibrary, "lib3mf_levelset_setchannelname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetChannelName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMinFeatureSize = (PLib3MFLevelSet_SetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setminfeaturesize"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMinFeatureSize = (PLib3MFLevelSet_SetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_levelset_setminfeaturesize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMinFeatureSize == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMinFeatureSize = (PLib3MFLevelSet_GetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getminfeaturesize"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMinFeatureSize = (PLib3MFLevelSet_GetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_levelset_getminfeaturesize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMinFeatureSize == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetFallBackValue = (PLib3MFLevelSet_SetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_levelset_setfallbackvalue"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetFallBackValue = (PLib3MFLevelSet_SetFallBackValuePtr) dlsym(hLibrary, "lib3mf_levelset_setfallbackvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetFallBackValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetFallBackValue = (PLib3MFLevelSet_GetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_levelset_getfallbackvalue"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetFallBackValue = (PLib3MFLevelSet_GetFallBackValuePtr) dlsym(hLibrary, "lib3mf_levelset_getfallbackvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetFallBackValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = (PLib3MFLevelSet_SetMeshBBoxOnlyPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setmeshbboxonly"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMeshBBoxOnly = (PLib3MFLevelSet_SetMeshBBoxOnlyPtr) dlsym(hLibrary, "lib3mf_levelset_setmeshbboxonly"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMeshBBoxOnly == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = (PLib3MFLevelSet_GetMeshBBoxOnlyPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getmeshbboxonly"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMeshBBoxOnly = (PLib3MFLevelSet_GetMeshBBoxOnlyPtr) dlsym(hLibrary, "lib3mf_levelset_getmeshbboxonly"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMeshBBoxOnly == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetMesh = (PLib3MFLevelSet_SetMeshPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setmesh"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetMesh = (PLib3MFLevelSet_SetMeshPtr) dlsym(hLibrary, "lib3mf_levelset_setmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetMesh = (PLib3MFLevelSet_GetMeshPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getmesh"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetMesh = (PLib3MFLevelSet_GetMeshPtr) dlsym(hLibrary, "lib3mf_levelset_getmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_GetVolumeData = (PLib3MFLevelSet_GetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_levelset_getvolumedata"); + #else // _WIN32 + pWrapperTable->m_LevelSet_GetVolumeData = (PLib3MFLevelSet_GetVolumeDataPtr) dlsym(hLibrary, "lib3mf_levelset_getvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_GetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_LevelSet_SetVolumeData = (PLib3MFLevelSet_SetVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_levelset_setvolumedata"); + #else // _WIN32 + pWrapperTable->m_LevelSet_SetVolumeData = (PLib3MFLevelSet_SetVolumeDataPtr) dlsym(hLibrary, "lib3mf_levelset_setvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_LevelSet_SetVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_BeamLattice_GetMinLength = (PLib3MFBeamLattice_GetMinLengthPtr) GetProcAddress(hLibrary, "lib3mf_beamlattice_getminlength"); #else // _WIN32 @@ -1632,678 +2073,2559 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresource"); + pWrapperTable->m_FunctionReference_GetFunctionResourceID = (PLib3MFFunctionReference_GetFunctionResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getfunctionresourceid"); #else // _WIN32 - pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) dlsym(hLibrary, "lib3mf_component_getobjectresource"); + pWrapperTable->m_FunctionReference_GetFunctionResourceID = (PLib3MFFunctionReference_GetFunctionResourceIDPtr) dlsym(hLibrary, "lib3mf_functionreference_getfunctionresourceid"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetObjectResource == NULL) + if (pWrapperTable->m_FunctionReference_GetFunctionResourceID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresourceid"); + pWrapperTable->m_FunctionReference_SetFunctionResourceID = (PLib3MFFunctionReference_SetFunctionResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setfunctionresourceid"); #else // _WIN32 - pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) dlsym(hLibrary, "lib3mf_component_getobjectresourceid"); + pWrapperTable->m_FunctionReference_SetFunctionResourceID = (PLib3MFFunctionReference_SetFunctionResourceIDPtr) dlsym(hLibrary, "lib3mf_functionreference_setfunctionresourceid"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetObjectResourceID == NULL) + if (pWrapperTable->m_FunctionReference_SetFunctionResourceID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getuuid"); + pWrapperTable->m_FunctionReference_GetTransform = (PLib3MFFunctionReference_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_gettransform"); #else // _WIN32 - pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) dlsym(hLibrary, "lib3mf_component_getuuid"); + pWrapperTable->m_FunctionReference_GetTransform = (PLib3MFFunctionReference_GetTransformPtr) dlsym(hLibrary, "lib3mf_functionreference_gettransform"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetUUID == NULL) + if (pWrapperTable->m_FunctionReference_GetTransform == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_setuuid"); + pWrapperTable->m_FunctionReference_SetTransform = (PLib3MFFunctionReference_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_functionreference_settransform"); #else // _WIN32 - pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) dlsym(hLibrary, "lib3mf_component_setuuid"); + pWrapperTable->m_FunctionReference_SetTransform = (PLib3MFFunctionReference_SetTransformPtr) dlsym(hLibrary, "lib3mf_functionreference_settransform"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_SetUUID == NULL) + if (pWrapperTable->m_FunctionReference_SetTransform == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_hastransform"); + pWrapperTable->m_FunctionReference_GetChannelName = (PLib3MFFunctionReference_GetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getchannelname"); #else // _WIN32 - pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) dlsym(hLibrary, "lib3mf_component_hastransform"); + pWrapperTable->m_FunctionReference_GetChannelName = (PLib3MFFunctionReference_GetChannelNamePtr) dlsym(hLibrary, "lib3mf_functionreference_getchannelname"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_HasTransform == NULL) + if (pWrapperTable->m_FunctionReference_GetChannelName == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_gettransform"); + pWrapperTable->m_FunctionReference_SetChannelName = (PLib3MFFunctionReference_SetChannelNamePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setchannelname"); #else // _WIN32 - pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) dlsym(hLibrary, "lib3mf_component_gettransform"); + pWrapperTable->m_FunctionReference_SetChannelName = (PLib3MFFunctionReference_SetChannelNamePtr) dlsym(hLibrary, "lib3mf_functionreference_setchannelname"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_GetTransform == NULL) + if (pWrapperTable->m_FunctionReference_SetChannelName == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_settransform"); + pWrapperTable->m_FunctionReference_SetMinFeatureSize = (PLib3MFFunctionReference_SetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setminfeaturesize"); #else // _WIN32 - pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) dlsym(hLibrary, "lib3mf_component_settransform"); + pWrapperTable->m_FunctionReference_SetMinFeatureSize = (PLib3MFFunctionReference_SetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_functionreference_setminfeaturesize"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Component_SetTransform == NULL) + if (pWrapperTable->m_FunctionReference_SetMinFeatureSize == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_addcomponent"); + pWrapperTable->m_FunctionReference_GetMinFeatureSize = (PLib3MFFunctionReference_GetMinFeatureSizePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getminfeaturesize"); #else // _WIN32 - pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_addcomponent"); + pWrapperTable->m_FunctionReference_GetMinFeatureSize = (PLib3MFFunctionReference_GetMinFeatureSizePtr) dlsym(hLibrary, "lib3mf_functionreference_getminfeaturesize"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_AddComponent == NULL) + if (pWrapperTable->m_FunctionReference_GetMinFeatureSize == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponent"); + pWrapperTable->m_FunctionReference_SetFallBackValue = (PLib3MFFunctionReference_SetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_setfallbackvalue"); #else // _WIN32 - pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponent"); + pWrapperTable->m_FunctionReference_SetFallBackValue = (PLib3MFFunctionReference_SetFallBackValuePtr) dlsym(hLibrary, "lib3mf_functionreference_setfallbackvalue"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_GetComponent == NULL) + if (pWrapperTable->m_FunctionReference_SetFallBackValue == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + pWrapperTable->m_FunctionReference_GetFallBackValue = (PLib3MFFunctionReference_GetFallBackValuePtr) GetProcAddress(hLibrary, "lib3mf_functionreference_getfallbackvalue"); #else // _WIN32 - pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + pWrapperTable->m_FunctionReference_GetFallBackValue = (PLib3MFFunctionReference_GetFallBackValuePtr) dlsym(hLibrary, "lib3mf_functionreference_getfallbackvalue"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ComponentsObject_GetComponentCount == NULL) + if (pWrapperTable->m_FunctionReference_GetFallBackValue == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_setname"); + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = (PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getbasematerialgroup"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) dlsym(hLibrary, "lib3mf_beamset_setname"); + pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup = (PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getbasematerialgroup"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetName == NULL) + if (pWrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_getname"); + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = (PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_setbasematerialgroup"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) dlsym(hLibrary, "lib3mf_beamset_getname"); + pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup = (PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_setbasematerialgroup"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetName == NULL) + if (pWrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = (PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getmaterialmappingcount"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_setidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount = (PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getmaterialmappingcount"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetIdentifier == NULL) + if (pWrapperTable->m_VolumeDataComposite_GetMaterialMappingCount == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = (PLib3MFVolumeDataComposite_GetMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_getmaterialmapping"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_getidentifier"); + pWrapperTable->m_VolumeDataComposite_GetMaterialMapping = (PLib3MFVolumeDataComposite_GetMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_getmaterialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_GetMaterialMapping == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = (PLib3MFVolumeDataComposite_AddMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_addmaterialmapping"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_AddMaterialMapping = (PLib3MFVolumeDataComposite_AddMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_addmaterialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_AddMaterialMapping == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = (PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) GetProcAddress(hLibrary, "lib3mf_volumedatacomposite_removematerialmapping"); + #else // _WIN32 + pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping = (PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) dlsym(hLibrary, "lib3mf_volumedatacomposite_removematerialmapping"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataComposite_RemoveMaterialMapping == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_GetName = (PLib3MFVolumeDataProperty_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_getname"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_GetName = (PLib3MFVolumeDataProperty_GetNamePtr) dlsym(hLibrary, "lib3mf_volumedataproperty_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_SetIsRequired = (PLib3MFVolumeDataProperty_SetIsRequiredPtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_setisrequired"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_SetIsRequired = (PLib3MFVolumeDataProperty_SetIsRequiredPtr) dlsym(hLibrary, "lib3mf_volumedataproperty_setisrequired"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_SetIsRequired == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeDataProperty_IsRequired = (PLib3MFVolumeDataProperty_IsRequiredPtr) GetProcAddress(hLibrary, "lib3mf_volumedataproperty_isrequired"); + #else // _WIN32 + pWrapperTable->m_VolumeDataProperty_IsRequired = (PLib3MFVolumeDataProperty_IsRequiredPtr) dlsym(hLibrary, "lib3mf_volumedataproperty_isrequired"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeDataProperty_IsRequired == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetComposite = (PLib3MFVolumeData_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getcomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetComposite = (PLib3MFVolumeData_GetCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_getcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_CreateNewComposite = (PLib3MFVolumeData_CreateNewCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_createnewcomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_CreateNewComposite = (PLib3MFVolumeData_CreateNewCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_createnewcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_CreateNewComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveComposite = (PLib3MFVolumeData_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removecomposite"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveComposite = (PLib3MFVolumeData_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_volumedata_removecomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetColor = (PLib3MFVolumeData_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getcolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetColor = (PLib3MFVolumeData_GetColorPtr) dlsym(hLibrary, "lib3mf_volumedata_getcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_CreateNewColor = (PLib3MFVolumeData_CreateNewColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_createnewcolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_CreateNewColor = (PLib3MFVolumeData_CreateNewColorPtr) dlsym(hLibrary, "lib3mf_volumedata_createnewcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_CreateNewColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveColor = (PLib3MFVolumeData_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removecolor"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveColor = (PLib3MFVolumeData_RemoveColorPtr) dlsym(hLibrary, "lib3mf_volumedata_removecolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetPropertyCount = (PLib3MFVolumeData_GetPropertyCountPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getpropertycount"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetPropertyCount = (PLib3MFVolumeData_GetPropertyCountPtr) dlsym(hLibrary, "lib3mf_volumedata_getpropertycount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetPropertyCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_GetProperty = (PLib3MFVolumeData_GetPropertyPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_getproperty"); + #else // _WIN32 + pWrapperTable->m_VolumeData_GetProperty = (PLib3MFVolumeData_GetPropertyPtr) dlsym(hLibrary, "lib3mf_volumedata_getproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_GetProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_AddPropertyFromFunction = (PLib3MFVolumeData_AddPropertyFromFunctionPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_addpropertyfromfunction"); + #else // _WIN32 + pWrapperTable->m_VolumeData_AddPropertyFromFunction = (PLib3MFVolumeData_AddPropertyFromFunctionPtr) dlsym(hLibrary, "lib3mf_volumedata_addpropertyfromfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_AddPropertyFromFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_VolumeData_RemoveProperty = (PLib3MFVolumeData_RemovePropertyPtr) GetProcAddress(hLibrary, "lib3mf_volumedata_removeproperty"); + #else // _WIN32 + pWrapperTable->m_VolumeData_RemoveProperty = (PLib3MFVolumeData_RemovePropertyPtr) dlsym(hLibrary, "lib3mf_volumedata_removeproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_VolumeData_RemoveProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresource"); + #else // _WIN32 + pWrapperTable->m_Component_GetObjectResource = (PLib3MFComponent_GetObjectResourcePtr) dlsym(hLibrary, "lib3mf_component_getobjectresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetObjectResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getobjectresourceid"); + #else // _WIN32 + pWrapperTable->m_Component_GetObjectResourceID = (PLib3MFComponent_GetObjectResourceIDPtr) dlsym(hLibrary, "lib3mf_component_getobjectresourceid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetObjectResourceID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_getuuid"); + #else // _WIN32 + pWrapperTable->m_Component_GetUUID = (PLib3MFComponent_GetUUIDPtr) dlsym(hLibrary, "lib3mf_component_getuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetUUID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) GetProcAddress(hLibrary, "lib3mf_component_setuuid"); + #else // _WIN32 + pWrapperTable->m_Component_SetUUID = (PLib3MFComponent_SetUUIDPtr) dlsym(hLibrary, "lib3mf_component_setuuid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_SetUUID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_hastransform"); + #else // _WIN32 + pWrapperTable->m_Component_HasTransform = (PLib3MFComponent_HasTransformPtr) dlsym(hLibrary, "lib3mf_component_hastransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_HasTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_gettransform"); + #else // _WIN32 + pWrapperTable->m_Component_GetTransform = (PLib3MFComponent_GetTransformPtr) dlsym(hLibrary, "lib3mf_component_gettransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_GetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) GetProcAddress(hLibrary, "lib3mf_component_settransform"); + #else // _WIN32 + pWrapperTable->m_Component_SetTransform = (PLib3MFComponent_SetTransformPtr) dlsym(hLibrary, "lib3mf_component_settransform"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Component_SetTransform == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_addcomponent"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_AddComponent = (PLib3MFComponentsObject_AddComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_addcomponent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_AddComponent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponent"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_GetComponent = (PLib3MFComponentsObject_GetComponentPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_GetComponent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) GetProcAddress(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + #else // _WIN32 + pWrapperTable->m_ComponentsObject_GetComponentCount = (PLib3MFComponentsObject_GetComponentCountPtr) dlsym(hLibrary, "lib3mf_componentsobject_getcomponentcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComponentsObject_GetComponentCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_setname"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetName = (PLib3MFBeamSet_SetNamePtr) dlsym(hLibrary, "lib3mf_beamset_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_beamset_getname"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetName = (PLib3MFBeamSet_GetNamePtr) dlsym(hLibrary, "lib3mf_beamset_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setidentifier"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetIdentifier = (PLib3MFBeamSet_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getidentifier"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetIdentifier = (PLib3MFBeamSet_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_beamset_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferencecount"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getreferencecount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetReferenceCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferencecount"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferencecount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetBallReferenceCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setballreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setballreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_SetBallReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferences"); + #else // _WIN32 + pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferences"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BeamSet_GetBallReferences == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_AddMaterial == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_removematerial"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_removematerial"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_RemoveMaterial == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getname"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setname"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_SetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_SetDisplayColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + #else // _WIN32 + pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_BaseMaterialGroup_GetDisplayColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_addcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_addcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_AddColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_removecolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_removecolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_RemoveColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_setcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_setcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_SetColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcolor"); + #else // _WIN32 + pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcolor"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ColorGroup_GetColor == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getcount"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_AddTex2Coord == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetTex2Coord == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_RemoveTex2Coord == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + #else // _WIN32 + pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2DGroup_GetTexture2D == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcount"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) dlsym(hLibrary, "lib3mf_compositematerials_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_addcomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_addcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_AddComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_removecomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_removecomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_RemoveComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcomposite"); + #else // _WIN32 + pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_getcomposite"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_CompositeMaterials_GetComposite == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getcount"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_AddMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_SetMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetLayerCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addlayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addlayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_AddLayer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_GetLayer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removelayer"); + #else // _WIN32 + pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removelayer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MultiPropertyGroup_RemoveLayer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_GetName = (PLib3MFImage3D_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_image3d_getname"); + #else // _WIN32 + pWrapperTable->m_Image3D_GetName = (PLib3MFImage3D_GetNamePtr) dlsym(hLibrary, "lib3mf_image3d_getname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_GetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_SetName = (PLib3MFImage3D_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_image3d_setname"); + #else // _WIN32 + pWrapperTable->m_Image3D_SetName = (PLib3MFImage3D_SetNamePtr) dlsym(hLibrary, "lib3mf_image3d_setname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_SetName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Image3D_IsImageStack = (PLib3MFImage3D_IsImageStackPtr) GetProcAddress(hLibrary, "lib3mf_image3d_isimagestack"); + #else // _WIN32 + pWrapperTable->m_Image3D_IsImageStack = (PLib3MFImage3D_IsImageStackPtr) dlsym(hLibrary, "lib3mf_image3d_isimagestack"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Image3D_IsImageStack == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetRowCount = (PLib3MFImageStack_GetRowCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getrowcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetRowCount = (PLib3MFImageStack_GetRowCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getrowcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetRowCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetRowCount = (PLib3MFImageStack_SetRowCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setrowcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetRowCount = (PLib3MFImageStack_SetRowCountPtr) dlsym(hLibrary, "lib3mf_imagestack_setrowcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetRowCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetColumnCount = (PLib3MFImageStack_GetColumnCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getcolumncount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetColumnCount = (PLib3MFImageStack_GetColumnCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getcolumncount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetColumnCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetColumnCount = (PLib3MFImageStack_SetColumnCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setcolumncount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetColumnCount = (PLib3MFImageStack_SetColumnCountPtr) dlsym(hLibrary, "lib3mf_imagestack_setcolumncount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetColumnCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetSheetCount = (PLib3MFImageStack_GetSheetCountPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getsheetcount"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetSheetCount = (PLib3MFImageStack_GetSheetCountPtr) dlsym(hLibrary, "lib3mf_imagestack_getsheetcount"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetSheetCount == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_GetSheet = (PLib3MFImageStack_GetSheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_getsheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_GetSheet = (PLib3MFImageStack_GetSheetPtr) dlsym(hLibrary, "lib3mf_imagestack_getsheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_GetSheet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_SetSheet = (PLib3MFImageStack_SetSheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_setsheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_SetSheet = (PLib3MFImageStack_SetSheetPtr) dlsym(hLibrary, "lib3mf_imagestack_setsheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_SetSheet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateEmptySheet = (PLib3MFImageStack_CreateEmptySheetPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createemptysheet"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateEmptySheet = (PLib3MFImageStack_CreateEmptySheetPtr) dlsym(hLibrary, "lib3mf_imagestack_createemptysheet"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateEmptySheet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = (PLib3MFImageStack_CreateSheetFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createsheetfrombuffer"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromBuffer = (PLib3MFImageStack_CreateSheetFromBufferPtr) dlsym(hLibrary, "lib3mf_imagestack_createsheetfrombuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateSheetFromBuffer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromFile = (PLib3MFImageStack_CreateSheetFromFilePtr) GetProcAddress(hLibrary, "lib3mf_imagestack_createsheetfromfile"); + #else // _WIN32 + pWrapperTable->m_ImageStack_CreateSheetFromFile = (PLib3MFImageStack_CreateSheetFromFilePtr) dlsym(hLibrary, "lib3mf_imagestack_createsheetfromfile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImageStack_CreateSheetFromFile == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_getpath"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) dlsym(hLibrary, "lib3mf_attachment_getpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetPath == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_setpath"); + #else // _WIN32 + pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) dlsym(hLibrary, "lib3mf_attachment_setpath"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_SetPath == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) GetProcAddress(hLibrary, "lib3mf_attachment_packagepart"); + #else // _WIN32 + pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) dlsym(hLibrary, "lib3mf_attachment_packagepart"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_PackagePart == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getrelationshiptype"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_getrelationshiptype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetRelationShipType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_setrelationshiptype"); + #else // _WIN32 + pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_setrelationshiptype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_SetRelationShipType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetofile"); + #else // _WIN32 + pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) dlsym(hLibrary, "lib3mf_attachment_writetofile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_WriteToFile == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromfile"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) dlsym(hLibrary, "lib3mf_attachment_readfromfile"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromFile == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromcallback"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) dlsym(hLibrary, "lib3mf_attachment_readfromcallback"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromCallback == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getstreamsize"); + #else // _WIN32 + pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) dlsym(hLibrary, "lib3mf_attachment_getstreamsize"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_GetStreamSize == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetobuffer"); + #else // _WIN32 + pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) dlsym(hLibrary, "lib3mf_attachment_writetobuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_WriteToBuffer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfrombuffer"); + #else // _WIN32 + pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) dlsym(hLibrary, "lib3mf_attachment_readfrombuffer"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Attachment_ReadFromBuffer == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getattachment"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_getattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetAttachment == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setattachment"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_setattachment"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetAttachment == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getcontenttype"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_getcontenttype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetContentType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setcontenttype"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_setcontenttype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetContentType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetTileStyleUV == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_settilestyleuv"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_settilestyleuv"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetTileStyleUV == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getfilter"); + #else // _WIN32 + pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_getfilter"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_GetFilter == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setfilter"); + #else // _WIN32 + pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_setfilter"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Texture2D_SetFilter == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetIdentifier = (PLib3MFImplicitPort_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetIdentifier = (PLib3MFImplicitPort_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitport_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetIdentifier = (PLib3MFImplicitPort_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetIdentifier = (PLib3MFImplicitPort_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitport_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetDisplayName = (PLib3MFImplicitPort_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetDisplayName = (PLib3MFImplicitPort_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitport_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetDisplayName = (PLib3MFImplicitPort_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetDisplayName = (PLib3MFImplicitPort_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitport_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetType = (PLib3MFImplicitPort_SetTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_settype"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetType = (PLib3MFImplicitPort_SetTypePtr) dlsym(hLibrary, "lib3mf_implicitport_settype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetType = (PLib3MFImplicitPort_GetTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_gettype"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetType = (PLib3MFImplicitPort_GetTypePtr) dlsym(hLibrary, "lib3mf_implicitport_gettype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_GetReference = (PLib3MFImplicitPort_GetReferencePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_getreference"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_GetReference = (PLib3MFImplicitPort_GetReferencePtr) dlsym(hLibrary, "lib3mf_implicitport_getreference"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_GetReference == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPort_SetReference = (PLib3MFImplicitPort_SetReferencePtr) GetProcAddress(hLibrary, "lib3mf_implicitport_setreference"); + #else // _WIN32 + pWrapperTable->m_ImplicitPort_SetReference = (PLib3MFImplicitPort_SetReferencePtr) dlsym(hLibrary, "lib3mf_implicitport_setreference"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPort_SetReference == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_MoveNext = (PLib3MFIterator_MoveNextPtr) GetProcAddress(hLibrary, "lib3mf_iterator_movenext"); + #else // _WIN32 + pWrapperTable->m_Iterator_MoveNext = (PLib3MFIterator_MoveNextPtr) dlsym(hLibrary, "lib3mf_iterator_movenext"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_MoveNext == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_MovePrevious = (PLib3MFIterator_MovePreviousPtr) GetProcAddress(hLibrary, "lib3mf_iterator_moveprevious"); + #else // _WIN32 + pWrapperTable->m_Iterator_MovePrevious = (PLib3MFIterator_MovePreviousPtr) dlsym(hLibrary, "lib3mf_iterator_moveprevious"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_MovePrevious == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Iterator_Count = (PLib3MFIterator_CountPtr) GetProcAddress(hLibrary, "lib3mf_iterator_count"); + #else // _WIN32 + pWrapperTable->m_Iterator_Count = (PLib3MFIterator_CountPtr) dlsym(hLibrary, "lib3mf_iterator_count"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Iterator_Count == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitPortIterator_GetCurrent = (PLib3MFImplicitPortIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_implicitportiterator_getcurrent"); + #else // _WIN32 + pWrapperTable->m_ImplicitPortIterator_GetCurrent = (PLib3MFImplicitPortIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_implicitportiterator_getcurrent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitPortIterator_GetCurrent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetIdentifier = (PLib3MFImplicitNode_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetIdentifier = (PLib3MFImplicitNode_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitnode_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetIdentifier = (PLib3MFImplicitNode_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetIdentifier = (PLib3MFImplicitNode_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitnode_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetDisplayName = (PLib3MFImplicitNode_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetDisplayName = (PLib3MFImplicitNode_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitnode_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetDisplayName = (PLib3MFImplicitNode_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetDisplayName = (PLib3MFImplicitNode_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_implicitnode_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetTag = (PLib3MFImplicitNode_GetTagPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_gettag"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetTag = (PLib3MFImplicitNode_GetTagPtr) dlsym(hLibrary, "lib3mf_implicitnode_gettag"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetTag == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_SetTag = (PLib3MFImplicitNode_SetTagPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_settag"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_SetTag = (PLib3MFImplicitNode_SetTagPtr) dlsym(hLibrary, "lib3mf_implicitnode_settag"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_SetTag == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetNodeType = (PLib3MFImplicitNode_GetNodeTypePtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getnodetype"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetNodeType = (PLib3MFImplicitNode_GetNodeTypePtr) dlsym(hLibrary, "lib3mf_implicitnode_getnodetype"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetNodeType == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AddInput = (PLib3MFImplicitNode_AddInputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_addinput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AddInput = (PLib3MFImplicitNode_AddInputPtr) dlsym(hLibrary, "lib3mf_implicitnode_addinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AddInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetInputs = (PLib3MFImplicitNode_GetInputsPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getinputs"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetInputs = (PLib3MFImplicitNode_GetInputsPtr) dlsym(hLibrary, "lib3mf_implicitnode_getinputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetInputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AddOutput = (PLib3MFImplicitNode_AddOutputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_addoutput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AddOutput = (PLib3MFImplicitNode_AddOutputPtr) dlsym(hLibrary, "lib3mf_implicitnode_addoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AddOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_GetOutputs = (PLib3MFImplicitNode_GetOutputsPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_getoutputs"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_GetOutputs = (PLib3MFImplicitNode_GetOutputsPtr) dlsym(hLibrary, "lib3mf_implicitnode_getoutputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_GetOutputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_FindInput = (PLib3MFImplicitNode_FindInputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_findinput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_FindInput = (PLib3MFImplicitNode_FindInputPtr) dlsym(hLibrary, "lib3mf_implicitnode_findinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_FindInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_FindOutput = (PLib3MFImplicitNode_FindOutputPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_findoutput"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_FindOutput = (PLib3MFImplicitNode_FindOutputPtr) dlsym(hLibrary, "lib3mf_implicitnode_findoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_FindOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitNode_AreTypesValid = (PLib3MFImplicitNode_AreTypesValidPtr) GetProcAddress(hLibrary, "lib3mf_implicitnode_aretypesvalid"); + #else // _WIN32 + pWrapperTable->m_ImplicitNode_AreTypesValid = (PLib3MFImplicitNode_AreTypesValidPtr) dlsym(hLibrary, "lib3mf_implicitnode_aretypesvalid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitNode_AreTypesValid == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_OneInputNode_GetInputA = (PLib3MFOneInputNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_oneinputnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_OneInputNode_GetInputA = (PLib3MFOneInputNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_oneinputnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_OneInputNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_OneInputNode_GetOutputResult = (PLib3MFOneInputNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_oneinputnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_OneInputNode_GetOutputResult = (PLib3MFOneInputNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_oneinputnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_OneInputNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_SetResource = (PLib3MFResourceIdNode_SetResourcePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_setresource"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_SetResource = (PLib3MFResourceIdNode_SetResourcePtr) dlsym(hLibrary, "lib3mf_resourceidnode_setresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_SetResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_GetResource = (PLib3MFResourceIdNode_GetResourcePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_getresource"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_GetResource = (PLib3MFResourceIdNode_GetResourcePtr) dlsym(hLibrary, "lib3mf_resourceidnode_getresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_GetResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ResourceIdNode_GetOutputValue = (PLib3MFResourceIdNode_GetOutputValuePtr) GetProcAddress(hLibrary, "lib3mf_resourceidnode_getoutputvalue"); + #else // _WIN32 + pWrapperTable->m_ResourceIdNode_GetOutputValue = (PLib3MFResourceIdNode_GetOutputValuePtr) dlsym(hLibrary, "lib3mf_resourceidnode_getoutputvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ResourceIdNode_GetOutputValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_TwoInputNode_GetInputB = (PLib3MFTwoInputNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_twoinputnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_TwoInputNode_GetInputB = (PLib3MFTwoInputNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_twoinputnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_TwoInputNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputB = (PLib3MFSelectNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputB = (PLib3MFSelectNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputC = (PLib3MFSelectNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputC = (PLib3MFSelectNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputC == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_SelectNode_GetInputD = (PLib3MFSelectNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_selectnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_SelectNode_GetInputD = (PLib3MFSelectNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_selectnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_SelectNode_GetInputD == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ClampNode_GetInputMin = (PLib3MFClampNode_GetInputMinPtr) GetProcAddress(hLibrary, "lib3mf_clampnode_getinputmin"); + #else // _WIN32 + pWrapperTable->m_ClampNode_GetInputMin = (PLib3MFClampNode_GetInputMinPtr) dlsym(hLibrary, "lib3mf_clampnode_getinputmin"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ClampNode_GetInputMin == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ClampNode_GetInputMax = (PLib3MFClampNode_GetInputMaxPtr) GetProcAddress(hLibrary, "lib3mf_clampnode_getinputmax"); + #else // _WIN32 + pWrapperTable->m_ClampNode_GetInputMax = (PLib3MFClampNode_GetInputMaxPtr) dlsym(hLibrary, "lib3mf_clampnode_getinputmax"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ClampNode_GetInputMax == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputX = (PLib3MFComposeVectorNode_GetInputXPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputx"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputX = (PLib3MFComposeVectorNode_GetInputXPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputx"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputX == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputY = (PLib3MFComposeVectorNode_GetInputYPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputy"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputY = (PLib3MFComposeVectorNode_GetInputYPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputy"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputY == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputZ = (PLib3MFComposeVectorNode_GetInputZPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getinputz"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetInputZ = (PLib3MFComposeVectorNode_GetInputZPtr) dlsym(hLibrary, "lib3mf_composevectornode_getinputz"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetInputZ == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeVectorNode_GetOutputResult = (PLib3MFComposeVectorNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_composevectornode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_ComposeVectorNode_GetOutputResult = (PLib3MFComposeVectorNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_composevectornode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeVectorNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetInputA = (PLib3MFDecomposeVectorNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getinputa"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetInputA = (PLib3MFDecomposeVectorNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputX = (PLib3MFDecomposeVectorNode_GetOutputXPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputx"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputX = (PLib3MFDecomposeVectorNode_GetOutputXPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputx"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputX == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputY = (PLib3MFDecomposeVectorNode_GetOutputYPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputy"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputY = (PLib3MFDecomposeVectorNode_GetOutputYPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputy"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputY == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = (PLib3MFDecomposeVectorNode_GetOutputZPtr) GetProcAddress(hLibrary, "lib3mf_decomposevectornode_getoutputz"); + #else // _WIN32 + pWrapperTable->m_DecomposeVectorNode_GetOutputZ = (PLib3MFDecomposeVectorNode_GetOutputZPtr) dlsym(hLibrary, "lib3mf_decomposevectornode_getoutputz"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_DecomposeVectorNode_GetOutputZ == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = (PLib3MFComposeMatrixNode_GetInputM00Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm00"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM00 = (PLib3MFComposeMatrixNode_GetInputM00Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm00"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM00 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = (PLib3MFComposeMatrixNode_GetInputM01Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm01"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM01 = (PLib3MFComposeMatrixNode_GetInputM01Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm01"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM01 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = (PLib3MFComposeMatrixNode_GetInputM02Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm02"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM02 = (PLib3MFComposeMatrixNode_GetInputM02Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm02"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM02 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = (PLib3MFComposeMatrixNode_GetInputM03Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm03"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM03 = (PLib3MFComposeMatrixNode_GetInputM03Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm03"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM03 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = (PLib3MFComposeMatrixNode_GetInputM10Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm10"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM10 = (PLib3MFComposeMatrixNode_GetInputM10Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm10"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM10 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = (PLib3MFComposeMatrixNode_GetInputM11Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm11"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM11 = (PLib3MFComposeMatrixNode_GetInputM11Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm11"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM11 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = (PLib3MFComposeMatrixNode_GetInputM12Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm12"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM12 = (PLib3MFComposeMatrixNode_GetInputM12Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm12"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM12 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = (PLib3MFComposeMatrixNode_GetInputM13Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm13"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM13 = (PLib3MFComposeMatrixNode_GetInputM13Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm13"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM13 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = (PLib3MFComposeMatrixNode_GetInputM20Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm20"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM20 = (PLib3MFComposeMatrixNode_GetInputM20Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm20"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM20 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = (PLib3MFComposeMatrixNode_GetInputM21Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm21"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM21 = (PLib3MFComposeMatrixNode_GetInputM21Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm21"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM21 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = (PLib3MFComposeMatrixNode_GetInputM22Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm22"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM22 = (PLib3MFComposeMatrixNode_GetInputM22Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm22"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM22 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = (PLib3MFComposeMatrixNode_GetInputM23Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm23"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM23 = (PLib3MFComposeMatrixNode_GetInputM23Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm23"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM23 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = (PLib3MFComposeMatrixNode_GetInputM30Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm30"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM30 = (PLib3MFComposeMatrixNode_GetInputM30Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm30"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM30 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = (PLib3MFComposeMatrixNode_GetInputM31Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm31"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM31 = (PLib3MFComposeMatrixNode_GetInputM31Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm31"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM31 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = (PLib3MFComposeMatrixNode_GetInputM32Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm32"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM32 = (PLib3MFComposeMatrixNode_GetInputM32Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm32"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM32 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = (PLib3MFComposeMatrixNode_GetInputM33Ptr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getinputm33"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetInputM33 = (PLib3MFComposeMatrixNode_GetInputM33Ptr) dlsym(hLibrary, "lib3mf_composematrixnode_getinputm33"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetInputM33 == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = (PLib3MFComposeMatrixNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_composematrixnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_ComposeMatrixNode_GetOutputResult = (PLib3MFComposeMatrixNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_composematrixnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ComposeMatrixNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputA = (PLib3MFMatrixFromRowsNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputA = (PLib3MFMatrixFromRowsNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputB = (PLib3MFMatrixFromRowsNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputB = (PLib3MFMatrixFromRowsNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputC = (PLib3MFMatrixFromRowsNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputC = (PLib3MFMatrixFromRowsNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputC == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputD = (PLib3MFMatrixFromRowsNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetInputD = (PLib3MFMatrixFromRowsNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetInputD == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = (PLib3MFMatrixFromRowsNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromrowsnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_MatrixFromRowsNode_GetOutputResult = (PLib3MFMatrixFromRowsNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_matrixfromrowsnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromRowsNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = (PLib3MFMatrixFromColumnsNode_GetInputAPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputa"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputA = (PLib3MFMatrixFromColumnsNode_GetInputAPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputa"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputA == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = (PLib3MFMatrixFromColumnsNode_GetInputBPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputb"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputB = (PLib3MFMatrixFromColumnsNode_GetInputBPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputb"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputB == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = (PLib3MFMatrixFromColumnsNode_GetInputCPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputc"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputC = (PLib3MFMatrixFromColumnsNode_GetInputCPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputc"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputC == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = (PLib3MFMatrixFromColumnsNode_GetInputDPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputd"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetInputD = (PLib3MFMatrixFromColumnsNode_GetInputDPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getinputd"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetInputD == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = (PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) GetProcAddress(hLibrary, "lib3mf_matrixfromcolumnsnode_getoutputresult"); + #else // _WIN32 + pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult = (PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) dlsym(hLibrary, "lib3mf_matrixfromcolumnsnode_getoutputresult"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MatrixFromColumnsNode_GetOutputResult == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_SetConstant = (PLib3MFConstantNode_SetConstantPtr) GetProcAddress(hLibrary, "lib3mf_constantnode_setconstant"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_SetConstant = (PLib3MFConstantNode_SetConstantPtr) dlsym(hLibrary, "lib3mf_constantnode_setconstant"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_SetConstant == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_GetConstant = (PLib3MFConstantNode_GetConstantPtr) GetProcAddress(hLibrary, "lib3mf_constantnode_getconstant"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_GetConstant = (PLib3MFConstantNode_GetConstantPtr) dlsym(hLibrary, "lib3mf_constantnode_getconstant"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_GetConstant == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstantNode_GetOutputValue = (PLib3MFConstantNode_GetOutputValuePtr) GetProcAddress(hLibrary, "lib3mf_constantnode_getoutputvalue"); + #else // _WIN32 + pWrapperTable->m_ConstantNode_GetOutputValue = (PLib3MFConstantNode_GetOutputValuePtr) dlsym(hLibrary, "lib3mf_constantnode_getoutputvalue"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstantNode_GetOutputValue == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_SetVector = (PLib3MFConstVecNode_SetVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_setvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_SetVector = (PLib3MFConstVecNode_SetVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_setvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_SetVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_GetVector = (PLib3MFConstVecNode_GetVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_getvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_GetVector = (PLib3MFConstVecNode_GetVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_getvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_GetVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstVecNode_GetOutputVector = (PLib3MFConstVecNode_GetOutputVectorPtr) GetProcAddress(hLibrary, "lib3mf_constvecnode_getoutputvector"); + #else // _WIN32 + pWrapperTable->m_ConstVecNode_GetOutputVector = (PLib3MFConstVecNode_GetOutputVectorPtr) dlsym(hLibrary, "lib3mf_constvecnode_getoutputvector"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstVecNode_GetOutputVector == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_SetMatrix = (PLib3MFConstMatNode_SetMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_setmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_SetMatrix = (PLib3MFConstMatNode_SetMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_setmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_SetMatrix == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_GetMatrix = (PLib3MFConstMatNode_GetMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_getmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_GetMatrix = (PLib3MFConstMatNode_GetMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_getmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_GetMatrix == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ConstMatNode_GetOutputMatrix = (PLib3MFConstMatNode_GetOutputMatrixPtr) GetProcAddress(hLibrary, "lib3mf_constmatnode_getoutputmatrix"); + #else // _WIN32 + pWrapperTable->m_ConstMatNode_GetOutputMatrix = (PLib3MFConstMatNode_GetOutputMatrixPtr) dlsym(hLibrary, "lib3mf_constmatnode_getoutputmatrix"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ConstMatNode_GetOutputMatrix == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetInputMesh = (PLib3MFMeshNode_GetInputMeshPtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getinputmesh"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetInputMesh = (PLib3MFMeshNode_GetInputMeshPtr) dlsym(hLibrary, "lib3mf_meshnode_getinputmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetInputMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetInputPos = (PLib3MFMeshNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetInputPos = (PLib3MFMeshNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_meshnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_MeshNode_GetOutputDistance = (PLib3MFMeshNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_meshnode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_MeshNode_GetOutputDistance = (PLib3MFMeshNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_meshnode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_MeshNode_GetOutputDistance == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = (PLib3MFUnsignedMeshNode_GetInputMeshPtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getinputmesh"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputMesh = (PLib3MFUnsignedMeshNode_GetInputMeshPtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getinputmesh"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetInputMesh == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputPos = (PLib3MFUnsignedMeshNode_GetInputPosPtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getinputpos"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetInputPos = (PLib3MFUnsignedMeshNode_GetInputPosPtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getinputpos"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetInputPos == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = (PLib3MFUnsignedMeshNode_GetOutputDistancePtr) GetProcAddress(hLibrary, "lib3mf_unsignedmeshnode_getoutputdistance"); + #else // _WIN32 + pWrapperTable->m_UnsignedMeshNode_GetOutputDistance = (PLib3MFUnsignedMeshNode_GetOutputDistancePtr) dlsym(hLibrary, "lib3mf_unsignedmeshnode_getoutputdistance"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_UnsignedMeshNode_GetOutputDistance == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) GetProcAddress(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); + #else // _WIN32 + pWrapperTable->m_FunctionCallNode_GetInputFunctionID = (PLib3MFFunctionCallNode_GetInputFunctionIDPtr) dlsym(hLibrary, "lib3mf_functioncallnode_getinputfunctionid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_FunctionCallNode_GetInputFunctionID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_NodeIterator_GetCurrent = (PLib3MFNodeIterator_GetCurrentPtr) GetProcAddress(hLibrary, "lib3mf_nodeiterator_getcurrent"); + #else // _WIN32 + pWrapperTable->m_NodeIterator_GetCurrent = (PLib3MFNodeIterator_GetCurrentPtr) dlsym(hLibrary, "lib3mf_nodeiterator_getcurrent"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_NodeIterator_GetCurrent == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetDisplayName = (PLib3MFFunction_GetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_function_getdisplayname"); + #else // _WIN32 + pWrapperTable->m_Function_GetDisplayName = (PLib3MFFunction_GetDisplayNamePtr) dlsym(hLibrary, "lib3mf_function_getdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_SetDisplayName = (PLib3MFFunction_SetDisplayNamePtr) GetProcAddress(hLibrary, "lib3mf_function_setdisplayname"); + #else // _WIN32 + pWrapperTable->m_Function_SetDisplayName = (PLib3MFFunction_SetDisplayNamePtr) dlsym(hLibrary, "lib3mf_function_setdisplayname"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_SetDisplayName == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_AddInput = (PLib3MFFunction_AddInputPtr) GetProcAddress(hLibrary, "lib3mf_function_addinput"); + #else // _WIN32 + pWrapperTable->m_Function_AddInput = (PLib3MFFunction_AddInputPtr) dlsym(hLibrary, "lib3mf_function_addinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_AddInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetInputs = (PLib3MFFunction_GetInputsPtr) GetProcAddress(hLibrary, "lib3mf_function_getinputs"); + #else // _WIN32 + pWrapperTable->m_Function_GetInputs = (PLib3MFFunction_GetInputsPtr) dlsym(hLibrary, "lib3mf_function_getinputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetInputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_RemoveInput = (PLib3MFFunction_RemoveInputPtr) GetProcAddress(hLibrary, "lib3mf_function_removeinput"); + #else // _WIN32 + pWrapperTable->m_Function_RemoveInput = (PLib3MFFunction_RemoveInputPtr) dlsym(hLibrary, "lib3mf_function_removeinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_RemoveInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_AddOutput = (PLib3MFFunction_AddOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_addoutput"); + #else // _WIN32 + pWrapperTable->m_Function_AddOutput = (PLib3MFFunction_AddOutputPtr) dlsym(hLibrary, "lib3mf_function_addoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_AddOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_GetOutputs = (PLib3MFFunction_GetOutputsPtr) GetProcAddress(hLibrary, "lib3mf_function_getoutputs"); + #else // _WIN32 + pWrapperTable->m_Function_GetOutputs = (PLib3MFFunction_GetOutputsPtr) dlsym(hLibrary, "lib3mf_function_getoutputs"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_GetOutputs == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_RemoveOutput = (PLib3MFFunction_RemoveOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_removeoutput"); + #else // _WIN32 + pWrapperTable->m_Function_RemoveOutput = (PLib3MFFunction_RemoveOutputPtr) dlsym(hLibrary, "lib3mf_function_removeoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_RemoveOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_FindInput = (PLib3MFFunction_FindInputPtr) GetProcAddress(hLibrary, "lib3mf_function_findinput"); + #else // _WIN32 + pWrapperTable->m_Function_FindInput = (PLib3MFFunction_FindInputPtr) dlsym(hLibrary, "lib3mf_function_findinput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_FindInput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Function_FindOutput = (PLib3MFFunction_FindOutputPtr) GetProcAddress(hLibrary, "lib3mf_function_findoutput"); + #else // _WIN32 + pWrapperTable->m_Function_FindOutput = (PLib3MFFunction_FindOutputPtr) dlsym(hLibrary, "lib3mf_function_findoutput"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Function_FindOutput == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_GetIdentifier = (PLib3MFImplicitFunction_GetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_getidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_GetIdentifier = (PLib3MFImplicitFunction_GetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitfunction_getidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_GetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_SetIdentifier = (PLib3MFImplicitFunction_SetIdentifierPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_setidentifier"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_SetIdentifier = (PLib3MFImplicitFunction_SetIdentifierPtr) dlsym(hLibrary, "lib3mf_implicitfunction_setidentifier"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_SetIdentifier == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddNode = (PLib3MFImplicitFunction_AddNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddNode = (PLib3MFImplicitFunction_AddNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddSinNode = (PLib3MFImplicitFunction_AddSinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsinnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddSinNode = (PLib3MFImplicitFunction_AddSinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsinnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddSinNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddCosNode = (PLib3MFImplicitFunction_AddCosNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcosnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddCosNode = (PLib3MFImplicitFunction_AddCosNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcosnode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddCosNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddTanNode = (PLib3MFImplicitFunction_AddTanNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtannode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddTanNode = (PLib3MFImplicitFunction_AddTanNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtannode"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_ImplicitFunction_AddTanNode == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcSinNode = (PLib3MFImplicitFunction_AddArcSinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarcsinnode"); + #else // _WIN32 + pWrapperTable->m_ImplicitFunction_AddArcSinNode = (PLib3MFImplicitFunction_AddArcSinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarcsinnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetIdentifier == NULL) + if (pWrapperTable->m_ImplicitFunction_AddArcSinNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferencecount"); + pWrapperTable->m_ImplicitFunction_AddArcCosNode = (PLib3MFImplicitFunction_AddArcCosNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarccosnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetReferenceCount = (PLib3MFBeamSet_GetReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getreferencecount"); + pWrapperTable->m_ImplicitFunction_AddArcCosNode = (PLib3MFImplicitFunction_AddArcCosNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarccosnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetReferenceCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddArcCosNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setreferences"); + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = (PLib3MFImplicitFunction_AddArcTan2NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addarctan2node"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetReferences = (PLib3MFBeamSet_SetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setreferences"); + pWrapperTable->m_ImplicitFunction_AddArcTan2Node = (PLib3MFImplicitFunction_AddArcTan2NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addarctan2node"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddArcTan2Node == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getreferences"); + pWrapperTable->m_ImplicitFunction_AddSinhNode = (PLib3MFImplicitFunction_AddSinhNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsinhnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetReferences = (PLib3MFBeamSet_GetReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getreferences"); + pWrapperTable->m_ImplicitFunction_AddSinhNode = (PLib3MFImplicitFunction_AddSinhNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsinhnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSinhNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferencecount"); + pWrapperTable->m_ImplicitFunction_AddCoshNode = (PLib3MFImplicitFunction_AddCoshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcoshnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetBallReferenceCount = (PLib3MFBeamSet_GetBallReferenceCountPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferencecount"); + pWrapperTable->m_ImplicitFunction_AddCoshNode = (PLib3MFImplicitFunction_AddCoshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcoshnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetBallReferenceCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddCoshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_setballreferences"); + pWrapperTable->m_ImplicitFunction_AddTanhNode = (PLib3MFImplicitFunction_AddTanhNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtanhnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_SetBallReferences = (PLib3MFBeamSet_SetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_setballreferences"); + pWrapperTable->m_ImplicitFunction_AddTanhNode = (PLib3MFImplicitFunction_AddTanhNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtanhnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_SetBallReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddTanhNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) GetProcAddress(hLibrary, "lib3mf_beamset_getballreferences"); + pWrapperTable->m_ImplicitFunction_AddRoundNode = (PLib3MFImplicitFunction_AddRoundNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addroundnode"); #else // _WIN32 - pWrapperTable->m_BeamSet_GetBallReferences = (PLib3MFBeamSet_GetBallReferencesPtr) dlsym(hLibrary, "lib3mf_beamset_getballreferences"); + pWrapperTable->m_ImplicitFunction_AddRoundNode = (PLib3MFImplicitFunction_AddRoundNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addroundnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BeamSet_GetBallReferences == NULL) + if (pWrapperTable->m_ImplicitFunction_AddRoundNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddCeilNode = (PLib3MFImplicitFunction_AddCeilNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addceilnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetCount = (PLib3MFBaseMaterialGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddCeilNode = (PLib3MFImplicitFunction_AddCeilNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addceilnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddCeilNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddFloorNode = (PLib3MFImplicitFunction_AddFloorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfloornode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs = (PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddFloorNode = (PLib3MFImplicitFunction_AddFloorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfloornode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFloorNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + pWrapperTable->m_ImplicitFunction_AddSignNode = (PLib3MFImplicitFunction_AddSignNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsignnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_AddMaterial = (PLib3MFBaseMaterialGroup_AddMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_addmaterial"); + pWrapperTable->m_ImplicitFunction_AddSignNode = (PLib3MFImplicitFunction_AddSignNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsignnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_AddMaterial == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSignNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_removematerial"); + pWrapperTable->m_ImplicitFunction_AddFractNode = (PLib3MFImplicitFunction_AddFractNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfractnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_RemoveMaterial = (PLib3MFBaseMaterialGroup_RemoveMaterialPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_removematerial"); + pWrapperTable->m_ImplicitFunction_AddFractNode = (PLib3MFImplicitFunction_AddFractNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfractnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_RemoveMaterial == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFractNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getname"); + pWrapperTable->m_ImplicitFunction_AddAbsNode = (PLib3MFImplicitFunction_AddAbsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addabsnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetName = (PLib3MFBaseMaterialGroup_GetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getname"); + pWrapperTable->m_ImplicitFunction_AddAbsNode = (PLib3MFImplicitFunction_AddAbsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addabsnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetName == NULL) + if (pWrapperTable->m_ImplicitFunction_AddAbsNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setname"); + pWrapperTable->m_ImplicitFunction_AddExpNode = (PLib3MFImplicitFunction_AddExpNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addexpnode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetName = (PLib3MFBaseMaterialGroup_SetNamePtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setname"); + pWrapperTable->m_ImplicitFunction_AddExpNode = (PLib3MFImplicitFunction_AddExpNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addexpnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_SetName == NULL) + if (pWrapperTable->m_ImplicitFunction_AddExpNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLogNode = (PLib3MFImplicitFunction_AddLogNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlognode"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_SetDisplayColor = (PLib3MFBaseMaterialGroup_SetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_setdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLogNode = (PLib3MFImplicitFunction_AddLogNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlognode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_SetDisplayColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLogNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) GetProcAddress(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLog2Node = (PLib3MFImplicitFunction_AddLog2NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlog2node"); #else // _WIN32 - pWrapperTable->m_BaseMaterialGroup_GetDisplayColor = (PLib3MFBaseMaterialGroup_GetDisplayColorPtr) dlsym(hLibrary, "lib3mf_basematerialgroup_getdisplaycolor"); + pWrapperTable->m_ImplicitFunction_AddLog2Node = (PLib3MFImplicitFunction_AddLog2NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlog2node"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_BaseMaterialGroup_GetDisplayColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLog2Node == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddLog10Node = (PLib3MFImplicitFunction_AddLog10NodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlog10node"); #else // _WIN32 - pWrapperTable->m_ColorGroup_GetCount = (PLib3MFColorGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddLog10Node = (PLib3MFImplicitFunction_AddLog10NodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlog10node"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLog10Node == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddLengthNode = (PLib3MFImplicitFunction_AddLengthNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlengthnode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_GetAllPropertyIDs = (PLib3MFColorGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_colorgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddLengthNode = (PLib3MFImplicitFunction_AddLengthNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlengthnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLengthNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_addcolor"); + pWrapperTable->m_ImplicitFunction_AddTransposeNode = (PLib3MFImplicitFunction_AddTransposeNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addtransposenode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_AddColor = (PLib3MFColorGroup_AddColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_addcolor"); + pWrapperTable->m_ImplicitFunction_AddTransposeNode = (PLib3MFImplicitFunction_AddTransposeNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addtransposenode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_AddColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddTransposeNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_removecolor"); + pWrapperTable->m_ImplicitFunction_InverseNode = (PLib3MFImplicitFunction_InverseNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_inversenode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_RemoveColor = (PLib3MFColorGroup_RemoveColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_removecolor"); + pWrapperTable->m_ImplicitFunction_InverseNode = (PLib3MFImplicitFunction_InverseNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_inversenode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_RemoveColor == NULL) + if (pWrapperTable->m_ImplicitFunction_InverseNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_setcolor"); + pWrapperTable->m_ImplicitFunction_AddSqrtNode = (PLib3MFImplicitFunction_AddSqrtNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsqrtnode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_SetColor = (PLib3MFColorGroup_SetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_setcolor"); + pWrapperTable->m_ImplicitFunction_AddSqrtNode = (PLib3MFImplicitFunction_AddSqrtNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsqrtnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_SetColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSqrtNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) GetProcAddress(hLibrary, "lib3mf_colorgroup_getcolor"); + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = (PLib3MFImplicitFunction_AddResourceIdNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addresourceidnode"); #else // _WIN32 - pWrapperTable->m_ColorGroup_GetColor = (PLib3MFColorGroup_GetColorPtr) dlsym(hLibrary, "lib3mf_colorgroup_getcolor"); + pWrapperTable->m_ImplicitFunction_AddResourceIdNode = (PLib3MFImplicitFunction_AddResourceIdNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addresourceidnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_ColorGroup_GetColor == NULL) + if (pWrapperTable->m_ImplicitFunction_AddResourceIdNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddAdditionNode = (PLib3MFImplicitFunction_AddAdditionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addadditionnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetCount = (PLib3MFTexture2DGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddAdditionNode = (PLib3MFImplicitFunction_AddAdditionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addadditionnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddAdditionNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = (PLib3MFImplicitFunction_AddSubtractionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addsubtractionnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs = (PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddSubtractionNode = (PLib3MFImplicitFunction_AddSubtractionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addsubtractionnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSubtractionNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = (PLib3MFImplicitFunction_AddMultiplicationNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmultiplicationnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_AddTex2Coord = (PLib3MFTexture2DGroup_AddTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_addtex2coord"); + pWrapperTable->m_ImplicitFunction_AddMultiplicationNode = (PLib3MFImplicitFunction_AddMultiplicationNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmultiplicationnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_AddTex2Coord == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMultiplicationNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + pWrapperTable->m_ImplicitFunction_AddDivisionNode = (PLib3MFImplicitFunction_AddDivisionNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddivisionnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetTex2Coord = (PLib3MFTexture2DGroup_GetTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettex2coord"); + pWrapperTable->m_ImplicitFunction_AddDivisionNode = (PLib3MFImplicitFunction_AddDivisionNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddivisionnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetTex2Coord == NULL) + if (pWrapperTable->m_ImplicitFunction_AddDivisionNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + pWrapperTable->m_ImplicitFunction_AddDotNode = (PLib3MFImplicitFunction_AddDotNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddotnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_RemoveTex2Coord = (PLib3MFTexture2DGroup_RemoveTex2CoordPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_removetex2coord"); + pWrapperTable->m_ImplicitFunction_AddDotNode = (PLib3MFImplicitFunction_AddDotNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddotnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_RemoveTex2Coord == NULL) + if (pWrapperTable->m_ImplicitFunction_AddDotNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) GetProcAddress(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + pWrapperTable->m_ImplicitFunction_AddCrossNode = (PLib3MFImplicitFunction_AddCrossNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcrossnode"); #else // _WIN32 - pWrapperTable->m_Texture2DGroup_GetTexture2D = (PLib3MFTexture2DGroup_GetTexture2DPtr) dlsym(hLibrary, "lib3mf_texture2dgroup_gettexture2d"); + pWrapperTable->m_ImplicitFunction_AddCrossNode = (PLib3MFImplicitFunction_AddCrossNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcrossnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2DGroup_GetTexture2D == NULL) + if (pWrapperTable->m_ImplicitFunction_AddCrossNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcount"); + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = (PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatvecmultiplicationnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetCount = (PLib3MFCompositeMaterials_GetCountPtr) dlsym(hLibrary, "lib3mf_compositematerials_getcount"); + pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode = (PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatvecmultiplicationnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddMinNode = (PLib3MFImplicitFunction_AddMinNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addminnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs = (PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_compositematerials_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddMinNode = (PLib3MFImplicitFunction_AddMinNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addminnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMinNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + pWrapperTable->m_ImplicitFunction_AddMaxNode = (PLib3MFImplicitFunction_AddMaxNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmaxnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup = (PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) dlsym(hLibrary, "lib3mf_compositematerials_getbasematerialgroup"); + pWrapperTable->m_ImplicitFunction_AddMaxNode = (PLib3MFImplicitFunction_AddMaxNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmaxnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMaxNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_addcomposite"); + pWrapperTable->m_ImplicitFunction_AddFmodNode = (PLib3MFImplicitFunction_AddFmodNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfmodnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_AddComposite = (PLib3MFCompositeMaterials_AddCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_addcomposite"); + pWrapperTable->m_ImplicitFunction_AddFmodNode = (PLib3MFImplicitFunction_AddFmodNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfmodnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_AddComposite == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFmodNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_removecomposite"); + pWrapperTable->m_ImplicitFunction_AddPowNode = (PLib3MFImplicitFunction_AddPowNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addpownode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_RemoveComposite = (PLib3MFCompositeMaterials_RemoveCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_removecomposite"); + pWrapperTable->m_ImplicitFunction_AddPowNode = (PLib3MFImplicitFunction_AddPowNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addpownode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_RemoveComposite == NULL) + if (pWrapperTable->m_ImplicitFunction_AddPowNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) GetProcAddress(hLibrary, "lib3mf_compositematerials_getcomposite"); + pWrapperTable->m_ImplicitFunction_AddSelectNode = (PLib3MFImplicitFunction_AddSelectNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addselectnode"); #else // _WIN32 - pWrapperTable->m_CompositeMaterials_GetComposite = (PLib3MFCompositeMaterials_GetCompositePtr) dlsym(hLibrary, "lib3mf_compositematerials_getcomposite"); + pWrapperTable->m_ImplicitFunction_AddSelectNode = (PLib3MFImplicitFunction_AddSelectNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addselectnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_CompositeMaterials_GetComposite == NULL) + if (pWrapperTable->m_ImplicitFunction_AddSelectNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddClampNode = (PLib3MFImplicitFunction_AddClampNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addclampnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetCount = (PLib3MFMultiPropertyGroup_GetCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getcount"); + pWrapperTable->m_ImplicitFunction_AddClampNode = (PLib3MFImplicitFunction_AddClampNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addclampnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddClampNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = (PLib3MFImplicitFunction_AddComposeVectorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcomposevectornode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs = (PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getallpropertyids"); + pWrapperTable->m_ImplicitFunction_AddComposeVectorNode = (PLib3MFImplicitFunction_AddComposeVectorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcomposevectornode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == NULL) + if (pWrapperTable->m_ImplicitFunction_AddComposeVectorNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = (PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addvectorfromscalarnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddMultiProperty = (PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode = (PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addvectorfromscalarnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_AddMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddVectorFromScalarNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = (PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_adddecomposevectornode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_SetMultiProperty = (PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_setmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode = (PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_adddecomposevectornode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_SetMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddDecomposeVectorNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = (PLib3MFImplicitFunction_AddComposeMatrixNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addcomposematrixnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetMultiProperty = (PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getmultiproperty"); + pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode = (PLib3MFImplicitFunction_AddComposeMatrixNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addcomposematrixnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddComposeMatrixNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = (PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatrixfromrowsnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty = (PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removemultiproperty"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode = (PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatrixfromrowsnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = (PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmatrixfromcolumnsnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayerCount = (PLib3MFMultiPropertyGroup_GetLayerCountPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayercount"); + pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode = (PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmatrixfromcolumnsnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetLayerCount == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_addlayer"); + pWrapperTable->m_ImplicitFunction_AddConstantNode = (PLib3MFImplicitFunction_AddConstantNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstantnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_AddLayer = (PLib3MFMultiPropertyGroup_AddLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_addlayer"); + pWrapperTable->m_ImplicitFunction_AddConstantNode = (PLib3MFImplicitFunction_AddConstantNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstantnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_AddLayer == NULL) + if (pWrapperTable->m_ImplicitFunction_AddConstantNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_getlayer"); + pWrapperTable->m_ImplicitFunction_AddConstVecNode = (PLib3MFImplicitFunction_AddConstVecNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstvecnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_GetLayer = (PLib3MFMultiPropertyGroup_GetLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_getlayer"); + pWrapperTable->m_ImplicitFunction_AddConstVecNode = (PLib3MFImplicitFunction_AddConstVecNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstvecnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_GetLayer == NULL) + if (pWrapperTable->m_ImplicitFunction_AddConstVecNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) GetProcAddress(hLibrary, "lib3mf_multipropertygroup_removelayer"); + pWrapperTable->m_ImplicitFunction_AddConstMatNode = (PLib3MFImplicitFunction_AddConstMatNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addconstmatnode"); #else // _WIN32 - pWrapperTable->m_MultiPropertyGroup_RemoveLayer = (PLib3MFMultiPropertyGroup_RemoveLayerPtr) dlsym(hLibrary, "lib3mf_multipropertygroup_removelayer"); + pWrapperTable->m_ImplicitFunction_AddConstMatNode = (PLib3MFImplicitFunction_AddConstMatNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addconstmatnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_MultiPropertyGroup_RemoveLayer == NULL) + if (pWrapperTable->m_ImplicitFunction_AddConstMatNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_getpath"); + pWrapperTable->m_ImplicitFunction_AddMeshNode = (PLib3MFImplicitFunction_AddMeshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addmeshnode"); #else // _WIN32 - pWrapperTable->m_Attachment_GetPath = (PLib3MFAttachment_GetPathPtr) dlsym(hLibrary, "lib3mf_attachment_getpath"); + pWrapperTable->m_ImplicitFunction_AddMeshNode = (PLib3MFImplicitFunction_AddMeshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addmeshnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetPath == NULL) + if (pWrapperTable->m_ImplicitFunction_AddMeshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) GetProcAddress(hLibrary, "lib3mf_attachment_setpath"); + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = (PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addunsignedmeshnode"); #else // _WIN32 - pWrapperTable->m_Attachment_SetPath = (PLib3MFAttachment_SetPathPtr) dlsym(hLibrary, "lib3mf_attachment_setpath"); + pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode = (PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addunsignedmeshnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_SetPath == NULL) + if (pWrapperTable->m_ImplicitFunction_AddUnsignedMeshNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) GetProcAddress(hLibrary, "lib3mf_attachment_packagepart"); + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); #else // _WIN32 - pWrapperTable->m_Attachment_PackagePart = (PLib3MFAttachment_PackagePartPtr) dlsym(hLibrary, "lib3mf_attachment_packagepart"); + pWrapperTable->m_ImplicitFunction_AddFunctionCallNode = (PLib3MFImplicitFunction_AddFunctionCallNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_addfunctioncallnode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_PackagePart == NULL) + if (pWrapperTable->m_ImplicitFunction_AddFunctionCallNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getrelationshiptype"); + pWrapperTable->m_ImplicitFunction_GetNodes = (PLib3MFImplicitFunction_GetNodesPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_getnodes"); #else // _WIN32 - pWrapperTable->m_Attachment_GetRelationShipType = (PLib3MFAttachment_GetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_getrelationshiptype"); + pWrapperTable->m_ImplicitFunction_GetNodes = (PLib3MFImplicitFunction_GetNodesPtr) dlsym(hLibrary, "lib3mf_implicitfunction_getnodes"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetRelationShipType == NULL) + if (pWrapperTable->m_ImplicitFunction_GetNodes == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) GetProcAddress(hLibrary, "lib3mf_attachment_setrelationshiptype"); + pWrapperTable->m_ImplicitFunction_RemoveNode = (PLib3MFImplicitFunction_RemoveNodePtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_removenode"); #else // _WIN32 - pWrapperTable->m_Attachment_SetRelationShipType = (PLib3MFAttachment_SetRelationShipTypePtr) dlsym(hLibrary, "lib3mf_attachment_setrelationshiptype"); + pWrapperTable->m_ImplicitFunction_RemoveNode = (PLib3MFImplicitFunction_RemoveNodePtr) dlsym(hLibrary, "lib3mf_implicitfunction_removenode"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_SetRelationShipType == NULL) + if (pWrapperTable->m_ImplicitFunction_RemoveNode == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetofile"); + pWrapperTable->m_ImplicitFunction_AddLink = (PLib3MFImplicitFunction_AddLinkPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlink"); #else // _WIN32 - pWrapperTable->m_Attachment_WriteToFile = (PLib3MFAttachment_WriteToFilePtr) dlsym(hLibrary, "lib3mf_attachment_writetofile"); + pWrapperTable->m_ImplicitFunction_AddLink = (PLib3MFImplicitFunction_AddLinkPtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlink"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_WriteToFile == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLink == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromfile"); + pWrapperTable->m_ImplicitFunction_AddLinkByNames = (PLib3MFImplicitFunction_AddLinkByNamesPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_addlinkbynames"); #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromFile = (PLib3MFAttachment_ReadFromFilePtr) dlsym(hLibrary, "lib3mf_attachment_readfromfile"); + pWrapperTable->m_ImplicitFunction_AddLinkByNames = (PLib3MFImplicitFunction_AddLinkByNamesPtr) dlsym(hLibrary, "lib3mf_implicitfunction_addlinkbynames"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromFile == NULL) + if (pWrapperTable->m_ImplicitFunction_AddLinkByNames == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfromcallback"); + pWrapperTable->m_ImplicitFunction_Clear = (PLib3MFImplicitFunction_ClearPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_clear"); #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromCallback = (PLib3MFAttachment_ReadFromCallbackPtr) dlsym(hLibrary, "lib3mf_attachment_readfromcallback"); + pWrapperTable->m_ImplicitFunction_Clear = (PLib3MFImplicitFunction_ClearPtr) dlsym(hLibrary, "lib3mf_implicitfunction_clear"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromCallback == NULL) + if (pWrapperTable->m_ImplicitFunction_Clear == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) GetProcAddress(hLibrary, "lib3mf_attachment_getstreamsize"); + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = (PLib3MFImplicitFunction_SortNodesTopologicallyPtr) GetProcAddress(hLibrary, "lib3mf_implicitfunction_sortnodestopologically"); #else // _WIN32 - pWrapperTable->m_Attachment_GetStreamSize = (PLib3MFAttachment_GetStreamSizePtr) dlsym(hLibrary, "lib3mf_attachment_getstreamsize"); + pWrapperTable->m_ImplicitFunction_SortNodesTopologically = (PLib3MFImplicitFunction_SortNodesTopologicallyPtr) dlsym(hLibrary, "lib3mf_implicitfunction_sortnodestopologically"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_GetStreamSize == NULL) + if (pWrapperTable->m_ImplicitFunction_SortNodesTopologically == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_writetobuffer"); + pWrapperTable->m_FunctionFromImage3D_GetImage3D = (PLib3MFFunctionFromImage3D_GetImage3DPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getimage3d"); #else // _WIN32 - pWrapperTable->m_Attachment_WriteToBuffer = (PLib3MFAttachment_WriteToBufferPtr) dlsym(hLibrary, "lib3mf_attachment_writetobuffer"); + pWrapperTable->m_FunctionFromImage3D_GetImage3D = (PLib3MFFunctionFromImage3D_GetImage3DPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getimage3d"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_WriteToBuffer == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetImage3D == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) GetProcAddress(hLibrary, "lib3mf_attachment_readfrombuffer"); + pWrapperTable->m_FunctionFromImage3D_SetImage3D = (PLib3MFFunctionFromImage3D_SetImage3DPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setimage3d"); #else // _WIN32 - pWrapperTable->m_Attachment_ReadFromBuffer = (PLib3MFAttachment_ReadFromBufferPtr) dlsym(hLibrary, "lib3mf_attachment_readfrombuffer"); + pWrapperTable->m_FunctionFromImage3D_SetImage3D = (PLib3MFFunctionFromImage3D_SetImage3DPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setimage3d"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Attachment_ReadFromBuffer == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetImage3D == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getattachment"); + pWrapperTable->m_FunctionFromImage3D_SetFilter = (PLib3MFFunctionFromImage3D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setfilter"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetAttachment = (PLib3MFTexture2D_GetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_getattachment"); + pWrapperTable->m_FunctionFromImage3D_SetFilter = (PLib3MFFunctionFromImage3D_SetFilterPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setfilter"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetAttachment == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetFilter == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setattachment"); + pWrapperTable->m_FunctionFromImage3D_GetFilter = (PLib3MFFunctionFromImage3D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getfilter"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetAttachment = (PLib3MFTexture2D_SetAttachmentPtr) dlsym(hLibrary, "lib3mf_texture2d_setattachment"); + pWrapperTable->m_FunctionFromImage3D_GetFilter = (PLib3MFFunctionFromImage3D_GetFilterPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getfilter"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetAttachment == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetFilter == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getcontenttype"); + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = (PLib3MFFunctionFromImage3D_SetTileStylesPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_settilestyles"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetContentType = (PLib3MFTexture2D_GetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_getcontenttype"); + pWrapperTable->m_FunctionFromImage3D_SetTileStyles = (PLib3MFFunctionFromImage3D_SetTileStylesPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_settilestyles"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetContentType == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetTileStyles == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setcontenttype"); + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = (PLib3MFFunctionFromImage3D_GetTileStylesPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_gettilestyles"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetContentType = (PLib3MFTexture2D_SetContentTypePtr) dlsym(hLibrary, "lib3mf_texture2d_setcontenttype"); + pWrapperTable->m_FunctionFromImage3D_GetTileStyles = (PLib3MFFunctionFromImage3D_GetTileStylesPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_gettilestyles"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetContentType == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetTileStyles == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_GetOffset = (PLib3MFFunctionFromImage3D_GetOffsetPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getoffset"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetTileStyleUV = (PLib3MFTexture2D_GetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_gettilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_GetOffset = (PLib3MFFunctionFromImage3D_GetOffsetPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getoffset"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetTileStyleUV == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetOffset == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_settilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_SetOffset = (PLib3MFFunctionFromImage3D_SetOffsetPtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setoffset"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetTileStyleUV = (PLib3MFTexture2D_SetTileStyleUVPtr) dlsym(hLibrary, "lib3mf_texture2d_settilestyleuv"); + pWrapperTable->m_FunctionFromImage3D_SetOffset = (PLib3MFFunctionFromImage3D_SetOffsetPtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setoffset"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetTileStyleUV == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetOffset == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_getfilter"); + pWrapperTable->m_FunctionFromImage3D_GetScale = (PLib3MFFunctionFromImage3D_GetScalePtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_getscale"); #else // _WIN32 - pWrapperTable->m_Texture2D_GetFilter = (PLib3MFTexture2D_GetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_getfilter"); + pWrapperTable->m_FunctionFromImage3D_GetScale = (PLib3MFFunctionFromImage3D_GetScalePtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_getscale"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_GetFilter == NULL) + if (pWrapperTable->m_FunctionFromImage3D_GetScale == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 - pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) GetProcAddress(hLibrary, "lib3mf_texture2d_setfilter"); + pWrapperTable->m_FunctionFromImage3D_SetScale = (PLib3MFFunctionFromImage3D_SetScalePtr) GetProcAddress(hLibrary, "lib3mf_functionfromimage3d_setscale"); #else // _WIN32 - pWrapperTable->m_Texture2D_SetFilter = (PLib3MFTexture2D_SetFilterPtr) dlsym(hLibrary, "lib3mf_texture2d_setfilter"); + pWrapperTable->m_FunctionFromImage3D_SetScale = (PLib3MFFunctionFromImage3D_SetScalePtr) dlsym(hLibrary, "lib3mf_functionfromimage3d_setscale"); dlerror(); #endif // _WIN32 - if (pWrapperTable->m_Texture2D_SetFilter == NULL) + if (pWrapperTable->m_FunctionFromImage3D_SetScale == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; #ifdef _WIN32 @@ -3152,6 +5474,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetSliceStackByID == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsetbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetLevelSetByID = (PLib3MFModel_GetLevelSetByIDPtr) dlsym(hLibrary, "lib3mf_model_getlevelsetbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLevelSetByID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_GetBuildUUID = (PLib3MFModel_GetBuildUUIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getbuilduuid"); #else // _WIN32 @@ -3287,6 +5618,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetSliceStacks == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetImage3Ds = (PLib3MFModel_GetImage3DsPtr) GetProcAddress(hLibrary, "lib3mf_model_getimage3ds"); + #else // _WIN32 + pWrapperTable->m_Model_GetImage3Ds = (PLib3MFModel_GetImage3DsPtr) dlsym(hLibrary, "lib3mf_model_getimage3ds"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetImage3Ds == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_MergeToModel = (PLib3MFModel_MergeToModelPtr) GetProcAddress(hLibrary, "lib3mf_model_mergetomodel"); #else // _WIN32 @@ -3296,6 +5636,15 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_MergeToModel == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_MergeFromModel = (PLib3MFModel_MergeFromModelPtr) GetProcAddress(hLibrary, "lib3mf_model_mergefrommodel"); + #else // _WIN32 + pWrapperTable->m_Model_MergeFromModel = (PLib3MFModel_MergeFromModelPtr) dlsym(hLibrary, "lib3mf_model_mergefrommodel"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_MergeFromModel == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_AddMeshObject = (PLib3MFModel_AddMeshObjectPtr) GetProcAddress(hLibrary, "lib3mf_model_addmeshobject"); #else // _WIN32 @@ -3377,6 +5726,24 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_AddMultiPropertyGroup == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_AddImageStack = (PLib3MFModel_AddImageStackPtr) GetProcAddress(hLibrary, "lib3mf_model_addimagestack"); + #else // _WIN32 + pWrapperTable->m_Model_AddImageStack = (PLib3MFModel_AddImageStackPtr) dlsym(hLibrary, "lib3mf_model_addimagestack"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddImageStack == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetImageStackByID = (PLib3MFModel_GetImageStackByIDPtr) GetProcAddress(hLibrary, "lib3mf_model_getimagestackbyid"); + #else // _WIN32 + pWrapperTable->m_Model_GetImageStackByID = (PLib3MFModel_GetImageStackByIDPtr) dlsym(hLibrary, "lib3mf_model_getimagestackbyid"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetImageStackByID == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_Model_AddBuildItem = (PLib3MFModel_AddBuildItemPtr) GetProcAddress(hLibrary, "lib3mf_model_addbuilditem"); #else // _WIN32 @@ -3521,6 +5888,69 @@ Lib3MFResult LoadLib3MFWrapperTable(sLib3MFDynamicWrapperTable * pWrapperTable, if (pWrapperTable->m_Model_GetKeyStore == NULL) return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 + pWrapperTable->m_Model_GetFunctions = (PLib3MFModel_GetFunctionsPtr) GetProcAddress(hLibrary, "lib3mf_model_getfunctions"); + #else // _WIN32 + pWrapperTable->m_Model_GetFunctions = (PLib3MFModel_GetFunctionsPtr) dlsym(hLibrary, "lib3mf_model_getfunctions"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetFunctions == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddImplicitFunction = (PLib3MFModel_AddImplicitFunctionPtr) GetProcAddress(hLibrary, "lib3mf_model_addimplicitfunction"); + #else // _WIN32 + pWrapperTable->m_Model_AddImplicitFunction = (PLib3MFModel_AddImplicitFunctionPtr) dlsym(hLibrary, "lib3mf_model_addimplicitfunction"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddImplicitFunction == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddFunctionFromImage3D = (PLib3MFModel_AddFunctionFromImage3DPtr) GetProcAddress(hLibrary, "lib3mf_model_addfunctionfromimage3d"); + #else // _WIN32 + pWrapperTable->m_Model_AddFunctionFromImage3D = (PLib3MFModel_AddFunctionFromImage3DPtr) dlsym(hLibrary, "lib3mf_model_addfunctionfromimage3d"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddFunctionFromImage3D == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddVolumeData = (PLib3MFModel_AddVolumeDataPtr) GetProcAddress(hLibrary, "lib3mf_model_addvolumedata"); + #else // _WIN32 + pWrapperTable->m_Model_AddVolumeData = (PLib3MFModel_AddVolumeDataPtr) dlsym(hLibrary, "lib3mf_model_addvolumedata"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddVolumeData == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_AddLevelSet = (PLib3MFModel_AddLevelSetPtr) GetProcAddress(hLibrary, "lib3mf_model_addlevelset"); + #else // _WIN32 + pWrapperTable->m_Model_AddLevelSet = (PLib3MFModel_AddLevelSetPtr) dlsym(hLibrary, "lib3mf_model_addlevelset"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_AddLevelSet == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_GetLevelSets = (PLib3MFModel_GetLevelSetsPtr) GetProcAddress(hLibrary, "lib3mf_model_getlevelsets"); + #else // _WIN32 + pWrapperTable->m_Model_GetLevelSets = (PLib3MFModel_GetLevelSetsPtr) dlsym(hLibrary, "lib3mf_model_getlevelsets"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_GetLevelSets == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + + #ifdef _WIN32 + pWrapperTable->m_Model_RemoveResource = (PLib3MFModel_RemoveResourcePtr) GetProcAddress(hLibrary, "lib3mf_model_removeresource"); + #else // _WIN32 + pWrapperTable->m_Model_RemoveResource = (PLib3MFModel_RemoveResourcePtr) dlsym(hLibrary, "lib3mf_model_removeresource"); + dlerror(); + #endif // _WIN32 + if (pWrapperTable->m_Model_RemoveResource == NULL) + return LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT; + #ifdef _WIN32 pWrapperTable->m_GetLibraryVersion = (PLib3MFGetLibraryVersionPtr) GetProcAddress(hLibrary, "lib3mf_getlibraryversion"); #else // _WIN32 diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h index 044c754bb..d7fcaf59a 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h +++ b/Autogenerated/Bindings/NodeJS/lib3mf_dynamic.h @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -562,6 +562,45 @@ typedef Lib3MFResult (*PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMate */ typedef Lib3MFResult (*PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr) (Lib3MF_MultiPropertyGroupIterator pMultiPropertyGroupIterator, Lib3MF_MultiPropertyGroup * pResource); +/************************************************************************************************************************* + Class definition for Image3DIterator +**************************************************************************************************************************/ + +/** +* Returns the Image3D the iterator points at. +* +* @param[in] pImage3DIterator - Image3DIterator instance. +* @param[out] pResource - returns the Image3D instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3DIterator_GetCurrentImage3DPtr) (Lib3MF_Image3DIterator pImage3DIterator, Lib3MF_Image3D * pResource); + +/************************************************************************************************************************* + Class definition for FunctionIterator +**************************************************************************************************************************/ + +/** +* Returns the Function the iterator points at. +* +* @param[in] pFunctionIterator - FunctionIterator instance. +* @param[out] pResource - returns the Function instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionIterator_GetCurrentFunctionPtr) (Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource); + +/************************************************************************************************************************* + Class definition for LevelSetIterator +**************************************************************************************************************************/ + +/** +* Returns the LevelSet the iterator points at. +* +* @param[in] pLevelSetIterator - LevelSetIterator instance. +* @param[out] pResource - returns the MeshObject instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSetIterator_GetCurrentLevelSetPtr) (Lib3MF_LevelSetIterator pLevelSetIterator, Lib3MF_LevelSet * pResource); + /************************************************************************************************************************* Class definition for MetaData **************************************************************************************************************************/ @@ -821,6 +860,15 @@ typedef Lib3MFResult (*PLib3MFObject_IsMeshObjectPtr) (Lib3MF_Object pObject, bo */ typedef Lib3MFResult (*PLib3MFObject_IsComponentsObjectPtr) (Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFObject_IsLevelSetObjectPtr) (Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. * @@ -1153,6 +1201,174 @@ typedef Lib3MFResult (*PLib3MFMeshObject_IsManifoldAndOrientedPtr) (Lib3MF_MeshO */ typedef Lib3MFResult (*PLib3MFMeshObject_BeamLatticePtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_BeamLattice * pTheBeamLattice); +/** +* Retrieves the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshObject_GetVolumeDataPtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshObject_SetVolumeDataPtr) (Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData pTheVolumeData); + +/************************************************************************************************************************* + Class definition for LevelSet +**************************************************************************************************************************/ + +/** +* Returns the function that is used as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetFunctionPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_Function * pTheFunction); + +/** +* Sets the function to use as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetFunctionPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_Function pTheFunction); + +/** +* Returns the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTransform - the transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetTransformPtr) (Lib3MF_LevelSet pLevelSet, sLib3MFTransform * pTransform); + +/** +* Sets the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetTransformPtr) (Lib3MF_LevelSet pLevelSet, const sLib3MFTransform * pTransform); + +/** +* Returns the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetChannelNamePtr) (Lib3MF_LevelSet pLevelSet, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); + +/** +* Sets the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pChannelName - new name of the function output channel +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetChannelNamePtr) (Lib3MF_LevelSet pLevelSet, const char * pChannelName); + +/** +* Sets the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMinFeatureSizePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double dMinFeatureSize); + +/** +* Returns the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMinFeatureSizePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double * pMinFeatureSize); + +/** +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dFallBackValue - fallback value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetFallBackValuePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double dFallBackValue); + +/** +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pFallBackValue - fallback value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetFallBackValuePtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_double * pFallBackValue); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshBBoxOnlyPtr) (Lib3MF_LevelSet pLevelSet, bool bMeshBBoxOnly); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshBBoxOnlyPtr) (Lib3MF_LevelSet pLevelSet, bool * pMeshBBoxOnly); + +/** +* Sets the mesh to use as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject pTheMesh); + +/** +* Returns the mesh that is used as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetMeshPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); + +/** +* Retrieves the VolumeData this Object. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheVolumeData - the VolumeData of this Object +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_GetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this LevelSet. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFLevelSet_SetVolumeDataPtr) (Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData pTheVolumeData); + /************************************************************************************************************************* Class definition for BeamLattice **************************************************************************************************************************/ @@ -1383,784 +1599,3179 @@ typedef Lib3MFResult (*PLib3MFBeamLattice_AddBeamSetPtr) (Lib3MF_BeamLattice pBe typedef Lib3MFResult (*PLib3MFBeamLattice_GetBeamSetPtr) (Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet); /************************************************************************************************************************* - Class definition for Component + Class definition for FunctionReference **************************************************************************************************************************/ /** -* Returns the Resource Instance of the component. +* Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. * -* @param[in] pComponent - Component instance. -* @param[out] pObjectResource - filled with the Resource Instance. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourcePtr) (Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetFunctionResourceIDPtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 * pUniqueResourceID); /** -* Returns the UniqueResourceID of the component. +* Sets the UniqueResourceID to refer to. * -* @param[in] pComponent - Component instance. -* @param[out] pUniqueResourceID - returns the UniqueResourceID. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nUniqueResourceID - UniqueResourceID of the function * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourceIDPtr) (Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetFunctionResourceIDPtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 nUniqueResourceID); /** -* returns, whether a component has a UUID and, if true, the component's UUID +* Returns the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[out] pHasUUID - flag whether the component has a UUID -* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) -* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pTransform - the transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetUUIDPtr) (Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetTransformPtr) (Lib3MF_FunctionReference pFunctionReference, sLib3MFTransform * pTransform); /** -* sets the component's UUID +* Sets the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pTransform - new transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_SetUUIDPtr) (Lib3MF_Component pComponent, const char * pUUID); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetTransformPtr) (Lib3MF_FunctionReference pFunctionReference, const sLib3MFTransform * pTransform); /** -* Returns, if the component has a different transformation than the identity matrix +* Returns the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_HasTransformPtr) (Lib3MF_Component pComponent, bool * pHasTransform); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetChannelNamePtr) (Lib3MF_FunctionReference pFunctionReference, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); /** -* Returns the transformation matrix of the component. +* Sets the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pTransform - filled with the component transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pChannelName - new name of the function output channel * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_GetTransformPtr) (Lib3MF_Component pComponent, sLib3MFTransform * pTransform); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetChannelNamePtr) (Lib3MF_FunctionReference pFunctionReference, const char * pChannelName); /** -* Sets the transformation matrix of the component. +* Sets the minimal feature size as a hint for the function evaluator * -* @param[in] pComponent - Component instance. -* @param[in] pTransform - new transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponent_SetTransformPtr) (Lib3MF_Component pComponent, const sLib3MFTransform * pTransform); - -/************************************************************************************************************************* - Class definition for ComponentsObject -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFFunctionReference_SetMinFeatureSizePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dMinFeatureSize); /** -* Adds a new component to a components object. +* Returns the minimal feature size as a hint for the function evaluator * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] pObjectResource - object to add as component. Must not lead to circular references! -* @param[in] pTransform - optional transform matrix for the component. -* @param[out] pComponentInstance - new component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_AddComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetMinFeatureSizePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pMinFeatureSize); /** -* Retrieves a component from a component object. +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) -* @param[out] pComponentInstance - component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dFallBackValue - fallback value * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); +typedef Lib3MFResult (*PLib3MFFunctionReference_SetFallBackValuePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dFallBackValue); /** -* Retrieves a component count of a component object. +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[out] pCount - returns the component count +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pFallBackValue - fallback value * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentCountPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFFunctionReference_GetFallBackValuePtr) (Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pFallBackValue); /************************************************************************************************************************* - Class definition for BeamSet + Class definition for VolumeDataColor **************************************************************************************************************************/ -/** -* Sets a beamset's name string -* -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pName - new name of the beamset. -* @return error code or 0 (success) -*/ -typedef Lib3MFResult (*PLib3MFBeamSet_SetNamePtr) (Lib3MF_BeamSet pBeamSet, const char * pName); +/************************************************************************************************************************* + Class definition for MaterialMapping +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for VolumeDataComposite +**************************************************************************************************************************/ /** -* Retrieves a beamset's name string +* Returns the BaseMaterialGroup used within this volume data item * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pBaseMaterialGroupInstance - The BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetNamePtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); /** -* Sets a beamset's identifier string +* Sets the BaseMaterialGroup to use within this volume data item. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pIdentifier - new name of the beamset. +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const char * pIdentifier); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance); /** -* Retrieves a beamset's identifier string +* Returns the number of material mappings of this VolumeDataComposite element * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) -* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pCount - the number of material mappings. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Retrieves the reference count of a beamset +* Returns MaterialMappting with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the reference count +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - Index of the MaterialMapping in question. +* @param[out] pTheMaterialMapping - MaterialMapping used in this element * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_GetMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Sets the references of a beamset +* Adds a the MaterialMapping * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pTransform - new transformation matrix +* @param[out] pTheMaterialMapping - The new MaterialMapping * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_AddMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, const sLib3MFTransform * pTransform, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Retrieves the references of a beamset +* Removes the MaterialMapping with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - The index of the MaterialMapping to be removed. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr) (Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex); + +/************************************************************************************************************************* + Class definition for VolumeDataProperty +**************************************************************************************************************************/ /** -* Retrieves the ball reference count of a beamset +* Gets the qualified name of this property. * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the ball reference count +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] nPropertyNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pPropertyNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPropertyNameBuffer - buffer of The qualified name of this property., may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_GetNamePtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, const Lib3MF_uint32 nPropertyNameBufferSize, Lib3MF_uint32* pPropertyNameNeededChars, char * pPropertyNameBuffer); /** -* Sets the ball references of a beamset +* Sets whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_SetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_SetIsRequiredPtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, bool bIsRequired); /** -* Retrieves the ball references of a beamset +* Returns whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[out] pIsRequired - Is this property required to process this 3MF document instance? * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); +typedef Lib3MFResult (*PLib3MFVolumeDataProperty_IsRequiredPtr) (Lib3MF_VolumeDataProperty pVolumeDataProperty, bool * pIsRequired); /************************************************************************************************************************* - Class definition for BaseMaterialGroup + Class definition for VolumeData **************************************************************************************************************************/ /** -* Retrieves the count of base materials in the material group. +* Returns the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[out] pCount - returns the count of base materials. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - filled with the VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetCountPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFVolumeData_GetCompositePtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* returns all the PropertyIDs of all materials in this group +* Creates a new VolumeDataComposite for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - The new VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFVolumeData_CreateNewCompositePtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* Adds a new material to the material group +* Removes the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] pName - new name of the base material. -* @param[in] pDisplayColor - Display color of the material -* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_AddMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFVolumeData_RemoveCompositePtr) (Lib3MF_VolumeData pVolumeData); /** -* Removes a material from the material group. +* Returns the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheColorData - filled with the VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_RemoveMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFVolumeData_GetColorPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataColor * pTheColorData); /** -* Returns the base material's name +* Creates a new VolumeDataColor for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheColorData - The new VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +typedef Lib3MFResult (*PLib3MFVolumeData_CreateNewColorPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataColor * pTheColorData); /** -* Sets a base material's name +* Removes the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pName - new name of the base material. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); +typedef Lib3MFResult (*PLib3MFVolumeData_RemoveColorPtr) (Lib3MF_VolumeData pVolumeData); /** -* Sets a base material's display color. +* Returns the number of VolumeDataProperty * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyCountPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); /** -* Returns a base material's display color. +* Returns the VolumeDataProperty at a given Index * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[out] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be returned. +* @param[out] pTheVolumeDataProperty - the VolumeDataProperty at the given index. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFVolumeData_GetPropertyPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Adds a new VolumeDataProperty from a Function +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pName - the qualified name (namespace+name) of the Property +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheVolumeDataProperty - the newly created VolumeDataProperty. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFVolumeData_AddPropertyFromFunctionPtr) (Lib3MF_VolumeData pVolumeData, const char * pName, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Removes the VolumeDataProperty with a given index +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFVolumeData_RemovePropertyPtr) (Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex); /************************************************************************************************************************* - Class definition for ColorGroup + Class definition for Component **************************************************************************************************************************/ /** -* Retrieves the count of base materials in this Color Group. +* Returns the Resource Instance of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[out] pCount - returns the count of colors within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pObjectResource - filled with the Resource Instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetCountPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourcePtr) (Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); /** -* returns all the PropertyIDs of all colors within this group +* Returns the UniqueResourceID of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @param[in] pComponent - Component instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetAllPropertyIDsPtr) (Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFComponent_GetObjectResourceIDPtr) (Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); /** -* Adds a new value. +* returns, whether a component has a UUID and, if true, the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] pTheColor - The new color -* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pHasUUID - flag whether the component has a UUID +* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) +* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_AddColorPtr) (Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFComponent_GetUUIDPtr) (Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); /** -* Removes a color from the color group. +* sets the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @param[in] pComponent - Component instance. +* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_RemoveColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFComponent_SetUUIDPtr) (Lib3MF_Component pComponent, const char * pUUID); /** -* Sets a color value. +* Returns, if the component has a different transformation than the identity matrix * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[in] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_SetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFComponent_HasTransformPtr) (Lib3MF_Component pComponent, bool * pHasTransform); /** -* Sets a color value. +* Returns the transformation matrix of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[out] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pTransform - filled with the component transformation matrix * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFColorGroup_GetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); +typedef Lib3MFResult (*PLib3MFComponent_GetTransformPtr) (Lib3MF_Component pComponent, sLib3MFTransform * pTransform); + +/** +* Sets the transformation matrix of the component. +* +* @param[in] pComponent - Component instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComponent_SetTransformPtr) (Lib3MF_Component pComponent, const sLib3MFTransform * pTransform); /************************************************************************************************************************* - Class definition for Texture2DGroup + Class definition for ComponentsObject **************************************************************************************************************************/ /** -* Retrieves the count of tex2coords in the Texture2DGroup. +* Adds a new component to a components object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pCount - returns the count of tex2coords. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] pObjectResource - object to add as component. Must not lead to circular references! +* @param[in] pTransform - optional transform matrix for the component. +* @param[out] pComponentInstance - new component instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetCountPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFComponentsObject_AddComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance); /** -* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* Retrieves a component from a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) +* @param[out] pComponentInstance - component instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); /** -* Adds a new tex2coord to the Texture2DGroup +* Retrieves a component count of a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. -* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[out] pCount - returns the component count * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_AddTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFComponentsObject_GetComponentCountPtr) (Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); + +/************************************************************************************************************************* + Class definition for BeamSet +**************************************************************************************************************************/ /** -* Obtains a tex2coord to the Texture2DGroup +* Sets a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. -* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pName - new name of the beamset. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate); +typedef Lib3MFResult (*PLib3MFBeamSet_SetNamePtr) (Lib3MF_BeamSet pBeamSet, const char * pName); /** -* Removes a tex2coords from the Texture2DGroup. +* Retrieves a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_RemoveTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFBeamSet_GetNamePtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); /** -* Obtains the texture2D instance of this group. +* Sets a beamset's identifier string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pIdentifier - new name of the beamset. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTexture2DPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); +typedef Lib3MFResult (*PLib3MFBeamSet_SetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const char * pIdentifier); + +/** +* Retrieves a beamset's identifier string +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetIdentifierPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Retrieves the reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the reference count +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_SetReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the ball reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the ball reference count +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferenceCountPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_SetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); + +/** +* Retrieves the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBeamSet_GetBallReferencesPtr) (Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); /************************************************************************************************************************* - Class definition for CompositeMaterials + Class definition for BaseMaterialGroup **************************************************************************************************************************/ /** -* Retrieves the count of Composite-s in the CompositeMaterials. +* Retrieves the count of base materials in the material group. * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pCount - returns the count of Composite-s +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[out] pCount - returns the count of base materials. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCountPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetCountPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); /** -* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* returns all the PropertyIDs of all materials in this group * -* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetAllPropertyIDsPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new material to the material group +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] pName - new name of the base material. +* @param[in] pDisplayColor - Display color of the material +* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_AddMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a material from the material group. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_RemoveMaterialPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); + +/** +* Returns the base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* Sets a base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pName - new name of the base material. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetNamePtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); + +/** +* Sets a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_SetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); + +/** +* Returns a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[out] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFBaseMaterialGroup_GetDisplayColorPtr) (Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); + +/************************************************************************************************************************* + Class definition for ColorGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of base materials in this Color Group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[out] pCount - returns the count of colors within this color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetCountPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all colors within this group +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetAllPropertyIDsPtr) (Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] pTheColor - The new color +* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_AddColorPtr) (Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a color from the color group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_RemoveColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[in] pTheColor - The color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_SetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[out] pTheColor - The color +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFColorGroup_GetColorPtr) (Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor); + +/************************************************************************************************************************* + Class definition for Texture2DGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of tex2coords in the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pCount - returns the count of tex2coords. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetCountPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetAllPropertyIDsPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_AddTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); + +/** +* Obtains a tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. +* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate); + +/** +* Removes a tex2coords from the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_RemoveTex2CoordPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); + +/** +* Obtains the texture2D instance of this group. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2DGroup_GetTexture2DPtr) (Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); + +/************************************************************************************************************************* + Class definition for CompositeMaterials +**************************************************************************************************************************/ + +/** +* Retrieves the count of Composite-s in the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pCount - returns the count of Composite-s +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCountPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. * @param[in] nPropertyIDsBufferSize - Number of elements in buffer * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. * @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the Composite-Mixing Values in the CompositeMaterials. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetAllPropertyIDsPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); + +/** +* Adds a new Composite-Mixing Values to the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite +* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_AddCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_RemoveCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); + +/** +* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer); + +/************************************************************************************************************************* + Class definition for MultiPropertyGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the count of MultiProperty-s +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new MultiProperty to the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. +* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Sets the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Removes a MultiProperty from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); + +/** +* Retrieves the number of layers of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the number of layers +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup +* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); + +/** +* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried +* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer); + +/** +* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); + +/************************************************************************************************************************* + Class definition for Image3D +**************************************************************************************************************************/ + +/** +* returns the name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of the name of this Image3D, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_GetNamePtr) (Lib3MF_Image3D pImage3D, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* sets a new name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] pName - the new name of this Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_SetNamePtr) (Lib3MF_Image3D pImage3D, const char * pName); + +/** +* Retrieves, if this Image3D is a ImageStack +* +* @param[in] pImage3D - Image3D instance. +* @param[out] pIsImageStack - returns, whether the Image3D is an ImageStack +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImage3D_IsImageStackPtr) (Lib3MF_Image3D pImage3D, bool * pIsImageStack); + +/************************************************************************************************************************* + Class definition for ImageStack +**************************************************************************************************************************/ + +/** +* Retrieves the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pRowCount - number of rows +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetRowCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pRowCount); + +/** +* Sets the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nRowCount - number of rows +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetRowCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nRowCount); + +/** +* Retrieves the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pColumnCount - number of columns +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetColumnCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pColumnCount); + +/** +* Sets the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nColumnCount - number of columns +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetColumnCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nColumnCount); + +/** +* Retrieves the number of images in the stack. +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pSheetCount - number of images +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetSheetCountPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pSheetCount); + +/** +* Retrieves a sheet of the stack. Raises an error if sheet is not set. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_GetSheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pSheet); + +/** +* Sets a sheet to an existing attachment. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_SetSheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment pSheet); + +/** +* Creates a new sheet attachment with empty data. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateEmptySheetPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a memory buffer. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] nDataBufferSize - Number of elements in buffer +* @param[in] pDataBuffer - uint8 buffer of binary image data +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateSheetFromBufferPtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a file on disk. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] pFileName - file name to read from +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImageStack_CreateSheetFromFilePtr) (Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, const char * pFileName, Lib3MF_Attachment * pSheet); + +/************************************************************************************************************************* + Class definition for Attachment +**************************************************************************************************************************/ + +/** +* Retrieves an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetPathPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new path of the attachment. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_SetPathPtr) (Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Returns the PackagePart that is this attachment. +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pPackagePart - The PackagePart of this attachment. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_PackagePartPtr) (Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); + +/** +* Retrieves an attachment's relationship type +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's relationship type. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new relationship type string. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Writes out the attachment as file. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to write into. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to read from. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pTheReadCallback - Callback to call for reading a data chunk +* @param[in] nStreamSize - number of bytes the callback returns +* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. +* @param[in] pUserData - Userdata that is passed to the callback function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromCallbackPtr) (Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); + +/** +* Retrieves the size of the attachment stream +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pStreamSize - the stream size +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); + +/** +* Writes out the attachment into a buffer +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); + +/** +* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFAttachment_ReadFromBufferPtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); + +/************************************************************************************************************************* + Class definition for Texture2D +**************************************************************************************************************************/ + +/** +* Retrieves the attachment located at the path of the texture. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); + +/** +* Sets the texture's package path to the path of the attachment. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pContentType - returns content type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eContentType - new Content Type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType); + +/** +* Retrieves a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pTileStyleU - returns tilestyle type enum. +* @param[out] pTileStyleV - returns tilestyle type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV); + +/** +* Sets a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eTileStyleU - new tilestyle type enum. +* @param[in] eTileStyleV - new tilestyle type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV); + +/** +* Retrieves a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pFilter - returns filter type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_GetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter); + +/** +* Sets a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eFilter - sets new filter type enum. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTexture2D_SetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter); + +/************************************************************************************************************************* + Class definition for ImplicitPort +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetIdentifierPtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetIdentifierPtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pIdentifier); + +/** +* Retrieves the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetDisplayNamePtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetDisplayNamePtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pDisplayName); + +/** +* Sets the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] eImplicitPortType - the type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetTypePtr) (Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType eImplicitPortType); + +/** +* Retrieves the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[out] pImplicitPortType - the type +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetTypePtr) (Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType * pImplicitPortType); + +/** +* Retrieves the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nReferenceBufferSize - size of the buffer (including trailing 0) +* @param[out] pReferenceNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pReferenceBuffer - buffer of the reference, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_GetReferencePtr) (Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nReferenceBufferSize, Lib3MF_uint32* pReferenceNeededChars, char * pReferenceBuffer); + +/** +* Sets the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pReference - the reference +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPort_SetReferencePtr) (Lib3MF_ImplicitPort pImplicitPort, const char * pReference); + +/************************************************************************************************************************* + Class definition for Iterator +**************************************************************************************************************************/ + +/** +* Iterates to the next item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasNext - Iterates to the next item in the list. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_MoveNextPtr) (Lib3MF_Iterator pIterator, bool * pHasNext); + +/** +* Iterates to the previous item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasPrevious - Iterates to the previous item in the list. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_MovePreviousPtr) (Lib3MF_Iterator pIterator, bool * pHasPrevious); + +/** +* Returns the number of items the iterator captures. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pCount - returns the number of items the iterator captures. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFIterator_CountPtr) (Lib3MF_Iterator pIterator, Lib3MF_uint64 * pCount); + +/************************************************************************************************************************* + Class definition for ImplicitPortIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pImplicitPortIterator - ImplicitPortIterator instance. +* @param[out] pPort - The current element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitPortIterator_GetCurrentPtr) (Lib3MF_ImplicitPortIterator pImplicitPortIterator, Lib3MF_ImplicitPort * pPort); + +/************************************************************************************************************************* + Class definition for ImplicitNode +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetIdentifierPtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetIdentifierPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier); + +/** +* Retrieves the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetDisplayNamePtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetDisplayNamePtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pDisplayName); + +/** +* Retrieves the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nTagBufferSize - size of the buffer (including trailing 0) +* @param[out] pTagNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pTagBuffer - buffer of the tag, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetTagPtr) (Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nTagBufferSize, Lib3MF_uint32* pTagNeededChars, char * pTagBuffer); + +/** +* Sets the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pTag - the tag +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_SetTagPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pTag); + +/** +* Retrieves the type of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pType - the type of the node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetNodeTypePtr) (Lib3MF_ImplicitNode pImplicitNode, eLib3MFImplicitNodeType * pType); + +/** +* Add an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[out] pPort - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AddInputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator for the inputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetInputsPtr) (Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Add an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[out] pPort - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AddOutputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator the outputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_GetOutputsPtr) (Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Retrieves an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_FindInputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_FindOutputPtr) (Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/** +* Checks if the types of the input and output ports are valid for the node type +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pValid - true, if the types are valid +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitNode_AreTypesValidPtr) (Lib3MF_ImplicitNode pImplicitNode, bool * pValid); + +/************************************************************************************************************************* + Class definition for OneInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pInput - the input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFOneInputNode_GetInputAPtr) (Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves the output +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFOneInputNode_GetOutputResultPtr) (Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for SinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcSinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcCosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SinhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CoshNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for RoundNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CeilNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FloorNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SignNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FractNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for AbsNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ExpNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LogNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log10Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LengthNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TransposeNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for InverseNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SqrtNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ResourceIdNode +**************************************************************************************************************************/ + +/** +* Sets the Resource that the resourceid attribute of the node will point to +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[in] pResource - the resource +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_SetResourcePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource pResource); + +/** +* Retrieves the resource of the node +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pResource - the resource +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_GetResourcePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource * pResource); + +/** +* Retrieves the output +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFResourceIdNode_GetOutputValuePtr) (Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for TwoInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pTwoInputNode - TwoInputNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFTwoInputNode_GetInputBPtr) (Lib3MF_TwoInputNode pTwoInputNode, Lib3MF_ImplicitPort * pB); + +/************************************************************************************************************************* + Class definition for AdditionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SubtractionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DivisionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DotNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CrossNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTan2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MatVecMultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MaxNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FmodNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ModNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for PowNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SelectNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputBPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pB); + +/** +* Retrieves the third input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pC - the third input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputCPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pC); + +/** +* Retrieves the fourth input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pD - the fourth input +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFSelectNode_GetInputDPtr) (Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pD); + +/************************************************************************************************************************* + Class definition for ClampNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the lower limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMin - the input for the lower limit +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFClampNode_GetInputMinPtr) (Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMin); + +/** +* Retrieves the input for the upper limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMax - the input for the upper limit +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFClampNode_GetInputMaxPtr) (Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMax); + +/************************************************************************************************************************* + Class definition for ComposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the x component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pX - the input for the x component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputXPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the input for the y component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pY - the input for the y component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputYPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the input for the z component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pZ - the input for the z component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetInputZPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/** +* Retrieves the output +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeVectorNode_GetOutputResultPtr) (Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for VectorFromScalarNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DecomposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pA - the input port for the vector to decompose +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetInputAPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pA); + +/** +* Retrieves the output for the x component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pX - the output for the x component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputXPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the output for the y component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pY - the output for the y component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputYPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the output for the z component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pZ - the output for the z component +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFDecomposeVectorNode_GetOutputZPtr) (Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/************************************************************************************************************************* + Class definition for ComposeMatrixNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the element 0 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM00 - the input for the m00 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM00Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM00); + +/** +* Retrieves the input for the element 0 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM01 - the input for the m01 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM01Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM01); + +/** +* Retrieves the input for the element 0 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM02 - the input for the m02 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM02Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM02); + +/** +* Retrieves the input for the element 0 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM03 - the input for the m03 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM03Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM03); + +/** +* Retrieves the input for the element 1 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM10 - the input for the m10 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM10Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM10); + +/** +* Retrieves the input for the element 1 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM11 - the input for the m11 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM11Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM11); + +/** +* Retrieves the input for the element 1 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM12 - the input for the m12 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM12Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM12); + +/** +* Retrieves the input for the element 1 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM13 - the input for the m3 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM13Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM13); + +/** +* Retrieves the input for the element 2 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM20 - the input for the m2 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM20Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM20); + +/** +* Retrieves the input for the element 2 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM21 - +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM21Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM21); + +/** +* Retrieves the input for the element 2 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM22 - the input for the m22 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM22Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM22); + +/** +* Retrieves the input for the element 2 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM23 - the input for the m23 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM23Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM23); + +/** +* Retrieves the input for the element 3 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM30 - the input for the m30 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM30Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM30); + +/** +* Retrieves the input for the element 3 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM31 - the input for the m31 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM31Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM31); + +/** +* Retrieves the input for the element 3 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM32 - the input for the m32 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM32Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM32); + +/** +* Retrieves the input for the element 3 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM33 - the input for the m33 element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetInputM33Ptr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM33); + +/** +* Retrieves the output +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFComposeMatrixNode_GetOutputResultPtr) (Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromRowsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow0 - the input for the first row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputAPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow0); + +/** +* Retrieves the input for the second row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow1 - the input for the second row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputBPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow1); + +/** +* Retrieves the input for the third row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow2 - the input for the third row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputCPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow2); + +/** +* Retrieves the input for the fourth row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow3 - the input for the fourth row +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetInputDPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromRowsNode_GetOutputResultPtr) (Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromColumnsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn0 - the input for the first column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputAPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn0); + +/** +* Retrieves the input for the second column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn1 - the input for the second column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputBPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn1); + +/** +* Retrieves the input for the third column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn2 - the input for the third column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputCPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn2); + +/** +* Retrieves the input for the fourth column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn3 - the input for the fourth column +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetInputDPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMatrixFromColumnsNode_GetOutputResultPtr) (Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for ConstantNode +**************************************************************************************************************************/ + +/** +* Sets the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[in] dValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_SetConstantPtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_double dValue); + +/** +* Retrieves the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_GetConstantPtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_double * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstantNode_GetOutputValuePtr) (Lib3MF_ConstantNode pConstantNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for ConstVecNode +**************************************************************************************************************************/ + +/** +* Sets the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_SetVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, const sLib3MFVector * pValue); + +/** +* Retrieves the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_GetVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, sLib3MFVector * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pVector - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstVecNode_GetOutputVectorPtr) (Lib3MF_ConstVecNode pConstVecNode, Lib3MF_ImplicitPort * pVector); + +/************************************************************************************************************************* + Class definition for ConstMatNode +**************************************************************************************************************************/ + +/** +* Sets the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_SetMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, const sLib3MFMatrix4x4 * pValue); + +/** +* Retrieves the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pValue - the matrix +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_GetMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, sLib3MFMatrix4x4 * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pMatrix - the output +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFConstMatNode_GetOutputMatrixPtr) (Lib3MF_ConstMatNode pConstMatNode, Lib3MF_ImplicitPort * pMatrix); + +/************************************************************************************************************************* + Class definition for MeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetInputMeshPtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetInputPosPtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pDistance - the output port for the signed distance to the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFMeshNode_GetOutputDistancePtr) (Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for UnsignedMeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputMeshPtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetInputPosPtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pDistance - the output port for the unsigned distance to the mesh +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFUnsignedMeshNode_GetOutputDistancePtr) (Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for FunctionCallNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionCallNode - FunctionCallNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionCallNode_GetInputFunctionIDPtr) (Lib3MF_FunctionCallNode pFunctionCallNode, Lib3MF_ImplicitPort * pFunction); + +/************************************************************************************************************************* + Class definition for NodeIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pNodeIterator - NodeIterator instance. +* @param[out] pNode - The current element +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFNodeIterator_GetCurrentPtr) (Lib3MF_NodeIterator pNodeIterator, Lib3MF_ImplicitNode * pNode); + +/************************************************************************************************************************* + Class definition for Function +**************************************************************************************************************************/ + +/** +* Retrieves the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetDisplayNamePtr) (Lib3MF_Function pFunction, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_SetDisplayNamePtr) (Lib3MF_Function pFunction, const char * pDisplayName); + +/** +* Add an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_AddInputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the list of inputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetInputsPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an input +* +* @param[in] pFunction - Function instance. +* @param[in] pInput - The input to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_RemoveInputPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPort pInput); + +/** +* Add an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_AddOutputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the outputs +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_GetOutputsPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an output +* +* @param[in] pFunction - Function instance. +* @param[in] pOutput - The output to be removed +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_RemoveOutputPtr) (Lib3MF_Function pFunction, Lib3MF_ImplicitPort pOutput); + +/** +* Retrieves an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_FindInputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunction_FindOutputPtr) (Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/************************************************************************************************************************* + Class definition for ImplicitFunction +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_GetIdentifierPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_SetIdentifierPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier); + +/** +* Add a node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] eNodeType - the type of the node +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, eLib3MFImplicitNodeType eNodeType, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ImplicitNode * pNode); + +/** +* Add a SinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinNode * pNode); + +/** +* Add a CosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCosNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CosNode * pNode); + +/** +* Add a TanNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTanNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanNode * pNode); + +/** +* Add a ArcSinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcSinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcSinNode * pNode); + +/** +* Add a ArcCosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcCosNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcCosNode * pNode); + +/** +* Add a ArcTan2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddArcTan2NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcTan2Node * pNode); + +/** +* Add a SinhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSinhNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinhNode * pNode); + +/** +* Add a CoshNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCoshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CoshNode * pNode); + +/** +* Add a TanhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTanhNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanhNode * pNode); + +/** +* Add a RoundNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddRoundNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_RoundNode * pNode); + +/** +* Add a CeilNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCeilNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CeilNode * pNode); + +/** +* Add a FloorNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFloorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FloorNode * pNode); + +/** +* Add a SignNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSignNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SignNode * pNode); + +/** +* Add a FractNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFractNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FractNode * pNode); + +/** +* Add a AbsNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddAbsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AbsNode * pNode); + +/** +* Add a ExpNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddExpNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ExpNode * pNode); + +/** +* Add a LogNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLogNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_LogNode * pNode); + +/** +* Add a Log2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLog2NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log2Node * pNode); + +/** +* Add a Log10Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLog10NodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log10Node * pNode); + +/** +* Add a LengthNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLengthNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_LengthNode * pNode); + +/** +* Add a TransposeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddTransposeNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TransposeNode * pNode); + +/** +* Add a InverseNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_InverseNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_InverseNode * pNode); + +/** +* Add a SqrtNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSqrtNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SqrtNode * pNode); + +/** +* Add a ResourceIdNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddResourceIdNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ResourceIdNode * pNode); + +/** +* Add an AdditionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddAdditionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AdditionNode * pNode); + +/** +* Add a SubtractionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSubtractionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SubtractionNode * pNode); + +/** +* Add a MultiplicationNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMultiplicationNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MultiplicationNode * pNode); + +/** +* Add a DivisionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDivisionNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_DivisionNode * pNode); + +/** +* Add a DotNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDotNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DotNode * pNode); + +/** +* Add a CrossNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddCrossNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_CrossNode * pNode); /** -* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* Add a MatVecMultiplicationNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetBaseMaterialGroupPtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatVecMultiplicationNode * pNode); /** -* Adds a new Composite-Mixing Values to the CompositeMaterials. +* Add a MinNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite -* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_AddCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMinNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MinNode * pNode); /** -* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* Add a MaxNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_RemoveCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMaxNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MaxNode * pNode); /** -* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* Add a FmodNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFCompositeMaterials_GetCompositePtr) (Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer); - -/************************************************************************************************************************* - Class definition for MultiPropertyGroup -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFmodNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FmodNode * pNode); /** -* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* Add a PowNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the count of MultiProperty-s +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddPowNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_PowNode * pNode); /** -* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* Add a SelectNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetAllPropertyIDsPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddSelectNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SelectNode * pNode); /** -* Adds a new MultiProperty to the MultiPropertyGroup. +* Add a ClampNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. -* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddClampNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ClampNode * pNode); /** -* Sets the PropertyIDs of a MultiProperty. +* Add a ComposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_SetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddComposeVectorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeVectorNode * pNode); /** -* Obtains the PropertyIDs of a MultiProperty. +* Add a VectorFromScalar * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddVectorFromScalarNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_VectorFromScalarNode * pNode); /** -* Removes a MultiProperty from this MultiPropertyGroup. +* Add a DecomposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveMultiPropertyPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddDecomposeVectorNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DecomposeVectorNode * pNode); /** -* Retrieves the number of layers of this MultiPropertyGroup. +* Add a ComposeMatrixNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the number of layers +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerCountPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddComposeMatrixNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeMatrixNode * pNode); /** -* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* Add a MatrixFromRowsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup -* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_AddLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromRowsNode * pNode); /** -* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* Add a MatrixFromColumnsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried -* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_GetLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromColumnsNode * pNode); /** -* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* Add a ConstantNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFMultiPropertyGroup_RemoveLayerPtr) (Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); - -/************************************************************************************************************************* - Class definition for Attachment -**************************************************************************************************************************/ +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstantNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstantNode * pNode); /** -* Retrieves an attachment's package path. This function will be removed in a later release. +* Add a ConstVecNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetPathPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstVecNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstVecNode * pNode); /** -* Sets an attachment's package path. This function will be removed in a later release. +* Add a ConstMatNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new path of the attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_SetPathPtr) (Lib3MF_Attachment pAttachment, const char * pPath); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddConstMatNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstMatNode * pNode); /** -* Returns the PackagePart that is this attachment. +* Add a MeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[out] pPackagePart - The PackagePart of this attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_PackagePartPtr) (Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MeshNode * pNode); /** -* Retrieves an attachment's relationship type +* Add a UnsignedMeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddUnsignedMeshNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); /** -* Sets an attachment's relationship type. +* Add a FunctionCallNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new relationship type string. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_SetRelationShipTypePtr) (Lib3MF_Attachment pAttachment, const char * pPath); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddFunctionCallNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode); /** -* Writes out the attachment as file. +* Retrieves the nodes * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to write into. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[out] pIterator - iterator for the list of nodes * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_WriteToFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); +typedef Lib3MFResult (*PLib3MFImplicitFunction_GetNodesPtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_NodeIterator * pIterator); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Removes a node * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to read from. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pNode - The node to be removed * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromFilePtr) (Lib3MF_Attachment pAttachment, const char * pFileName); +typedef Lib3MFResult (*PLib3MFImplicitFunction_RemoveNodePtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitNode pNode); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[in] pTheReadCallback - Callback to call for reading a data chunk -* @param[in] nStreamSize - number of bytes the callback returns -* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. -* @param[in] pUserData - Userdata that is passed to the callback function +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - the source port +* @param[in] pTarget - the target port * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromCallbackPtr) (Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLinkPtr) (Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitPort pSource, Lib3MF_ImplicitPort pTarget); /** -* Retrieves the size of the attachment stream +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[out] pStreamSize - the stream size +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - name of the source port in the format nodename.portname +* @param[in] pTarget - name of the target port in the format nodename.portname * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_GetStreamSizePtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); +typedef Lib3MFResult (*PLib3MFImplicitFunction_AddLinkByNamesPtr) (Lib3MF_ImplicitFunction pImplicitFunction, const char * pSource, const char * pTarget); /** -* Writes out the attachment into a buffer +* Clears the function * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_WriteToBufferPtr) (Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_ClearPtr) (Lib3MF_ImplicitFunction pImplicitFunction); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Sorts the nodes topologically * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFAttachment_ReadFromBufferPtr) (Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); +typedef Lib3MFResult (*PLib3MFImplicitFunction_SortNodesTopologicallyPtr) (Lib3MF_ImplicitFunction pImplicitFunction); /************************************************************************************************************************* - Class definition for Texture2D + Class definition for FunctionFromImage3D **************************************************************************************************************************/ /** -* Retrieves the attachment located at the path of the texture. +* Returns the selected 3D image. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pImage3D - image instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetImage3DPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D * pImage3D); /** -* Sets the texture's package path to the path of the attachment. +* Sets the 3D image of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] pImage3D - image instance * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetAttachmentPtr) (Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetImage3DPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D pImage3D); /** -* Retrieves a texture's content type. +* Sets the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pContentType - returns content type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eFilter - texture filter * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetFilterPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter eFilter); /** -* Retrieves a texture's content type. +* Returns the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eContentType - new Content Type +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pFilter - texture filter * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetContentTypePtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetFilterPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter * pFilter); /** -* Retrieves a texture's tilestyle type. +* Sets the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pTileStyleU - returns tilestyle type enum. -* @param[out] pTileStyleV - returns tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eTileStyleU - tile style in U +* @param[in] eTileStyleV - tile style in V +* @param[in] eTileStyleW - tile style in W * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetTileStylesPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV, eLib3MFTextureTileStyle eTileStyleW); /** -* Sets a texture's tilestyle type. +* Retrieves the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eTileStyleU - new tilestyle type enum. -* @param[in] eTileStyleV - new tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pTileStyleU - tile style in U +* @param[out] pTileStyleV - tile style in V +* @param[out] pTileStyleW - tile style in W * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetTileStyleUVPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetTileStylesPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV, eLib3MFTextureTileStyle * pTileStyleW); /** -* Retrieves a texture's filter type. +* returns the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pFilter - returns filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_GetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetOffsetPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pOffset); /** -* Sets a texture's filter type. +* Sets the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eFilter - sets new filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -typedef Lib3MFResult (*PLib3MFTexture2D_SetFilterPtr) (Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter); +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetOffsetPtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dOffset); + +/** +* returns the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_GetScalePtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pScale); + +/** +* Sets the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFFunctionFromImage3D_SetScalePtr) (Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dScale); /************************************************************************************************************************* Class definition for BuildItem @@ -3132,6 +5743,16 @@ typedef Lib3MFResult (*PLib3MFModel_GetColorGroupByIDPtr) (Lib3MF_Model pModel, */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -3270,6 +5891,15 @@ typedef Lib3MFResult (*PLib3MFModel_GetMultiPropertyGroupsPtr) (Lib3MF_Model pMo */ typedef Lib3MFResult (*PLib3MFModel_GetSliceStacksPtr) (Lib3MF_Model pModel, Lib3MF_SliceStackIterator * pResourceIterator); +/** +* creates a resource iterator instance with all image3d resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetImage3DsPtr) (Lib3MF_Model pModel, Lib3MF_Image3DIterator * pResourceIterator); + /** * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. * @@ -3279,6 +5909,15 @@ typedef Lib3MFResult (*PLib3MFModel_GetSliceStacksPtr) (Lib3MF_Model pModel, Lib */ typedef Lib3MFResult (*PLib3MFModel_MergeToModelPtr) (Lib3MF_Model pModel, Lib3MF_Model * pMergedModelInstance); +/** +* Merges the given model into this model. +* +* @param[in] pModel - Model instance. +* @param[in] pModelInstance - model to be merged +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_MergeFromModelPtr) (Lib3MF_Model pModel, Lib3MF_Model pModelInstance); + /** * adds an empty mesh object to the model. * @@ -3364,6 +6003,28 @@ typedef Lib3MFResult (*PLib3MFModel_AddCompositeMaterialsPtr) (Lib3MF_Model pMod */ typedef Lib3MFResult (*PLib3MFModel_AddMultiPropertyGroupPtr) (Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance); +/** +* creates a new 3D Image Resource +* +* @param[in] pModel - Model instance. +* @param[in] nColumnCount - the number of columns in each sheet. +* @param[in] nRowCount - the number of rows in each sheet. +* @param[in] nSheetCount - the number of sheets in the image stack. +* @param[out] pInstance - returns the new ImageStack instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddImageStackPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nColumnCount, Lib3MF_uint32 nRowCount, Lib3MF_uint32 nSheetCount, Lib3MF_ImageStack * pInstance); + +/** +* finds an ImageStack object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pImageStackInstance - returns the image stack instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetImageStackByIDPtr) (Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ImageStack * pImageStackInstance); + /** * adds a build item to the model. * @@ -3515,6 +6176,70 @@ typedef Lib3MFResult (*PLib3MFModel_SetRandomNumberCallbackPtr) (Lib3MF_Model pM */ typedef Lib3MFResult (*PLib3MFModel_GetKeyStorePtr) (Lib3MF_Model pModel, Lib3MF_KeyStore * pKeyStore); +/** +* creates a resource iterator for all functions +* +* @param[in] pModel - Model instance. +* @param[out] pTheResourceIterator - returns the resource iterator +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetFunctionsPtr) (Lib3MF_Model pModel, Lib3MF_FunctionIterator * pTheResourceIterator); + +/** +* adds a function described by nodes to the model +* +* @param[in] pModel - Model instance. +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddImplicitFunctionPtr) (Lib3MF_Model pModel, Lib3MF_ImplicitFunction * pFunctionInstance); + +/** +* adds a function defined by an image3d to the model +* +* @param[in] pModel - Model instance. +* @param[in] pImage3DInstance - the Image3D-instance used for this function +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddFunctionFromImage3DPtr) (Lib3MF_Model pModel, Lib3MF_Image3D pImage3DInstance, Lib3MF_FunctionFromImage3D * pFunctionInstance); + +/** +* adds a volume data resource to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pVolumeDataInstance - returns the new volume data instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddVolumeDataPtr) (Lib3MF_Model pModel, Lib3MF_VolumeData * pVolumeDataInstance); + +/** +* adds an empty boundary shape object to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pLevelSetInstance - returns the mesh object instance +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_AddLevelSetPtr) (Lib3MF_Model pModel, Lib3MF_LevelSet * pLevelSetInstance); + +/** +* creates a resource iterator instance with all boundary shape resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_GetLevelSetsPtr) (Lib3MF_Model pModel, Lib3MF_LevelSetIterator * pResourceIterator); + +/** +* Removes a resource from the model +* +* @param[in] pModel - Model instance. +* @param[in] pResource - The resource to remove +* @return error code or 0 (success) +*/ +typedef Lib3MFResult (*PLib3MFModel_RemoveResourcePtr) (Lib3MF_Model pModel, Lib3MF_Resource pResource); + /************************************************************************************************************************* Global functions **************************************************************************************************************************/ @@ -3767,6 +6492,9 @@ typedef struct { PLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupPtr m_Texture2DGroupIterator_GetCurrentTexture2DGroup; PLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsPtr m_CompositeMaterialsIterator_GetCurrentCompositeMaterials; PLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupPtr m_MultiPropertyGroupIterator_GetCurrentMultiPropertyGroup; + PLib3MFImage3DIterator_GetCurrentImage3DPtr m_Image3DIterator_GetCurrentImage3D; + PLib3MFFunctionIterator_GetCurrentFunctionPtr m_FunctionIterator_GetCurrentFunction; + PLib3MFLevelSetIterator_GetCurrentLevelSetPtr m_LevelSetIterator_GetCurrentLevelSet; PLib3MFMetaData_GetNameSpacePtr m_MetaData_GetNameSpace; PLib3MFMetaData_SetNameSpacePtr m_MetaData_SetNameSpace; PLib3MFMetaData_GetNamePtr m_MetaData_GetName; @@ -3792,6 +6520,7 @@ typedef struct { PLib3MFObject_SetPartNumberPtr m_Object_SetPartNumber; PLib3MFObject_IsMeshObjectPtr m_Object_IsMeshObject; PLib3MFObject_IsComponentsObjectPtr m_Object_IsComponentsObject; + PLib3MFObject_IsLevelSetObjectPtr m_Object_IsLevelSetObject; PLib3MFObject_IsValidPtr m_Object_IsValid; PLib3MFObject_SetAttachmentAsThumbnailPtr m_Object_SetAttachmentAsThumbnail; PLib3MFObject_GetThumbnailAttachmentPtr m_Object_GetThumbnailAttachment; @@ -3826,6 +6555,24 @@ typedef struct { PLib3MFMeshObject_SetGeometryPtr m_MeshObject_SetGeometry; PLib3MFMeshObject_IsManifoldAndOrientedPtr m_MeshObject_IsManifoldAndOriented; PLib3MFMeshObject_BeamLatticePtr m_MeshObject_BeamLattice; + PLib3MFMeshObject_GetVolumeDataPtr m_MeshObject_GetVolumeData; + PLib3MFMeshObject_SetVolumeDataPtr m_MeshObject_SetVolumeData; + PLib3MFLevelSet_GetFunctionPtr m_LevelSet_GetFunction; + PLib3MFLevelSet_SetFunctionPtr m_LevelSet_SetFunction; + PLib3MFLevelSet_GetTransformPtr m_LevelSet_GetTransform; + PLib3MFLevelSet_SetTransformPtr m_LevelSet_SetTransform; + PLib3MFLevelSet_GetChannelNamePtr m_LevelSet_GetChannelName; + PLib3MFLevelSet_SetChannelNamePtr m_LevelSet_SetChannelName; + PLib3MFLevelSet_SetMinFeatureSizePtr m_LevelSet_SetMinFeatureSize; + PLib3MFLevelSet_GetMinFeatureSizePtr m_LevelSet_GetMinFeatureSize; + PLib3MFLevelSet_SetFallBackValuePtr m_LevelSet_SetFallBackValue; + PLib3MFLevelSet_GetFallBackValuePtr m_LevelSet_GetFallBackValue; + PLib3MFLevelSet_SetMeshBBoxOnlyPtr m_LevelSet_SetMeshBBoxOnly; + PLib3MFLevelSet_GetMeshBBoxOnlyPtr m_LevelSet_GetMeshBBoxOnly; + PLib3MFLevelSet_SetMeshPtr m_LevelSet_SetMesh; + PLib3MFLevelSet_GetMeshPtr m_LevelSet_GetMesh; + PLib3MFLevelSet_GetVolumeDataPtr m_LevelSet_GetVolumeData; + PLib3MFLevelSet_SetVolumeDataPtr m_LevelSet_SetVolumeData; PLib3MFBeamLattice_GetMinLengthPtr m_BeamLattice_GetMinLength; PLib3MFBeamLattice_SetMinLengthPtr m_BeamLattice_SetMinLength; PLib3MFBeamLattice_GetClippingPtr m_BeamLattice_GetClipping; @@ -3849,6 +6596,35 @@ typedef struct { PLib3MFBeamLattice_GetBeamSetCountPtr m_BeamLattice_GetBeamSetCount; PLib3MFBeamLattice_AddBeamSetPtr m_BeamLattice_AddBeamSet; PLib3MFBeamLattice_GetBeamSetPtr m_BeamLattice_GetBeamSet; + PLib3MFFunctionReference_GetFunctionResourceIDPtr m_FunctionReference_GetFunctionResourceID; + PLib3MFFunctionReference_SetFunctionResourceIDPtr m_FunctionReference_SetFunctionResourceID; + PLib3MFFunctionReference_GetTransformPtr m_FunctionReference_GetTransform; + PLib3MFFunctionReference_SetTransformPtr m_FunctionReference_SetTransform; + PLib3MFFunctionReference_GetChannelNamePtr m_FunctionReference_GetChannelName; + PLib3MFFunctionReference_SetChannelNamePtr m_FunctionReference_SetChannelName; + PLib3MFFunctionReference_SetMinFeatureSizePtr m_FunctionReference_SetMinFeatureSize; + PLib3MFFunctionReference_GetMinFeatureSizePtr m_FunctionReference_GetMinFeatureSize; + PLib3MFFunctionReference_SetFallBackValuePtr m_FunctionReference_SetFallBackValue; + PLib3MFFunctionReference_GetFallBackValuePtr m_FunctionReference_GetFallBackValue; + PLib3MFVolumeDataComposite_GetBaseMaterialGroupPtr m_VolumeDataComposite_GetBaseMaterialGroup; + PLib3MFVolumeDataComposite_SetBaseMaterialGroupPtr m_VolumeDataComposite_SetBaseMaterialGroup; + PLib3MFVolumeDataComposite_GetMaterialMappingCountPtr m_VolumeDataComposite_GetMaterialMappingCount; + PLib3MFVolumeDataComposite_GetMaterialMappingPtr m_VolumeDataComposite_GetMaterialMapping; + PLib3MFVolumeDataComposite_AddMaterialMappingPtr m_VolumeDataComposite_AddMaterialMapping; + PLib3MFVolumeDataComposite_RemoveMaterialMappingPtr m_VolumeDataComposite_RemoveMaterialMapping; + PLib3MFVolumeDataProperty_GetNamePtr m_VolumeDataProperty_GetName; + PLib3MFVolumeDataProperty_SetIsRequiredPtr m_VolumeDataProperty_SetIsRequired; + PLib3MFVolumeDataProperty_IsRequiredPtr m_VolumeDataProperty_IsRequired; + PLib3MFVolumeData_GetCompositePtr m_VolumeData_GetComposite; + PLib3MFVolumeData_CreateNewCompositePtr m_VolumeData_CreateNewComposite; + PLib3MFVolumeData_RemoveCompositePtr m_VolumeData_RemoveComposite; + PLib3MFVolumeData_GetColorPtr m_VolumeData_GetColor; + PLib3MFVolumeData_CreateNewColorPtr m_VolumeData_CreateNewColor; + PLib3MFVolumeData_RemoveColorPtr m_VolumeData_RemoveColor; + PLib3MFVolumeData_GetPropertyCountPtr m_VolumeData_GetPropertyCount; + PLib3MFVolumeData_GetPropertyPtr m_VolumeData_GetProperty; + PLib3MFVolumeData_AddPropertyFromFunctionPtr m_VolumeData_AddPropertyFromFunction; + PLib3MFVolumeData_RemovePropertyPtr m_VolumeData_RemoveProperty; PLib3MFComponent_GetObjectResourcePtr m_Component_GetObjectResource; PLib3MFComponent_GetObjectResourceIDPtr m_Component_GetObjectResourceID; PLib3MFComponent_GetUUIDPtr m_Component_GetUUID; @@ -3905,6 +6681,19 @@ typedef struct { PLib3MFMultiPropertyGroup_AddLayerPtr m_MultiPropertyGroup_AddLayer; PLib3MFMultiPropertyGroup_GetLayerPtr m_MultiPropertyGroup_GetLayer; PLib3MFMultiPropertyGroup_RemoveLayerPtr m_MultiPropertyGroup_RemoveLayer; + PLib3MFImage3D_GetNamePtr m_Image3D_GetName; + PLib3MFImage3D_SetNamePtr m_Image3D_SetName; + PLib3MFImage3D_IsImageStackPtr m_Image3D_IsImageStack; + PLib3MFImageStack_GetRowCountPtr m_ImageStack_GetRowCount; + PLib3MFImageStack_SetRowCountPtr m_ImageStack_SetRowCount; + PLib3MFImageStack_GetColumnCountPtr m_ImageStack_GetColumnCount; + PLib3MFImageStack_SetColumnCountPtr m_ImageStack_SetColumnCount; + PLib3MFImageStack_GetSheetCountPtr m_ImageStack_GetSheetCount; + PLib3MFImageStack_GetSheetPtr m_ImageStack_GetSheet; + PLib3MFImageStack_SetSheetPtr m_ImageStack_SetSheet; + PLib3MFImageStack_CreateEmptySheetPtr m_ImageStack_CreateEmptySheet; + PLib3MFImageStack_CreateSheetFromBufferPtr m_ImageStack_CreateSheetFromBuffer; + PLib3MFImageStack_CreateSheetFromFilePtr m_ImageStack_CreateSheetFromFile; PLib3MFAttachment_GetPathPtr m_Attachment_GetPath; PLib3MFAttachment_SetPathPtr m_Attachment_SetPath; PLib3MFAttachment_PackagePartPtr m_Attachment_PackagePart; @@ -3924,6 +6713,173 @@ typedef struct { PLib3MFTexture2D_SetTileStyleUVPtr m_Texture2D_SetTileStyleUV; PLib3MFTexture2D_GetFilterPtr m_Texture2D_GetFilter; PLib3MFTexture2D_SetFilterPtr m_Texture2D_SetFilter; + PLib3MFImplicitPort_GetIdentifierPtr m_ImplicitPort_GetIdentifier; + PLib3MFImplicitPort_SetIdentifierPtr m_ImplicitPort_SetIdentifier; + PLib3MFImplicitPort_GetDisplayNamePtr m_ImplicitPort_GetDisplayName; + PLib3MFImplicitPort_SetDisplayNamePtr m_ImplicitPort_SetDisplayName; + PLib3MFImplicitPort_SetTypePtr m_ImplicitPort_SetType; + PLib3MFImplicitPort_GetTypePtr m_ImplicitPort_GetType; + PLib3MFImplicitPort_GetReferencePtr m_ImplicitPort_GetReference; + PLib3MFImplicitPort_SetReferencePtr m_ImplicitPort_SetReference; + PLib3MFIterator_MoveNextPtr m_Iterator_MoveNext; + PLib3MFIterator_MovePreviousPtr m_Iterator_MovePrevious; + PLib3MFIterator_CountPtr m_Iterator_Count; + PLib3MFImplicitPortIterator_GetCurrentPtr m_ImplicitPortIterator_GetCurrent; + PLib3MFImplicitNode_GetIdentifierPtr m_ImplicitNode_GetIdentifier; + PLib3MFImplicitNode_SetIdentifierPtr m_ImplicitNode_SetIdentifier; + PLib3MFImplicitNode_GetDisplayNamePtr m_ImplicitNode_GetDisplayName; + PLib3MFImplicitNode_SetDisplayNamePtr m_ImplicitNode_SetDisplayName; + PLib3MFImplicitNode_GetTagPtr m_ImplicitNode_GetTag; + PLib3MFImplicitNode_SetTagPtr m_ImplicitNode_SetTag; + PLib3MFImplicitNode_GetNodeTypePtr m_ImplicitNode_GetNodeType; + PLib3MFImplicitNode_AddInputPtr m_ImplicitNode_AddInput; + PLib3MFImplicitNode_GetInputsPtr m_ImplicitNode_GetInputs; + PLib3MFImplicitNode_AddOutputPtr m_ImplicitNode_AddOutput; + PLib3MFImplicitNode_GetOutputsPtr m_ImplicitNode_GetOutputs; + PLib3MFImplicitNode_FindInputPtr m_ImplicitNode_FindInput; + PLib3MFImplicitNode_FindOutputPtr m_ImplicitNode_FindOutput; + PLib3MFImplicitNode_AreTypesValidPtr m_ImplicitNode_AreTypesValid; + PLib3MFOneInputNode_GetInputAPtr m_OneInputNode_GetInputA; + PLib3MFOneInputNode_GetOutputResultPtr m_OneInputNode_GetOutputResult; + PLib3MFResourceIdNode_SetResourcePtr m_ResourceIdNode_SetResource; + PLib3MFResourceIdNode_GetResourcePtr m_ResourceIdNode_GetResource; + PLib3MFResourceIdNode_GetOutputValuePtr m_ResourceIdNode_GetOutputValue; + PLib3MFTwoInputNode_GetInputBPtr m_TwoInputNode_GetInputB; + PLib3MFSelectNode_GetInputBPtr m_SelectNode_GetInputB; + PLib3MFSelectNode_GetInputCPtr m_SelectNode_GetInputC; + PLib3MFSelectNode_GetInputDPtr m_SelectNode_GetInputD; + PLib3MFClampNode_GetInputMinPtr m_ClampNode_GetInputMin; + PLib3MFClampNode_GetInputMaxPtr m_ClampNode_GetInputMax; + PLib3MFComposeVectorNode_GetInputXPtr m_ComposeVectorNode_GetInputX; + PLib3MFComposeVectorNode_GetInputYPtr m_ComposeVectorNode_GetInputY; + PLib3MFComposeVectorNode_GetInputZPtr m_ComposeVectorNode_GetInputZ; + PLib3MFComposeVectorNode_GetOutputResultPtr m_ComposeVectorNode_GetOutputResult; + PLib3MFDecomposeVectorNode_GetInputAPtr m_DecomposeVectorNode_GetInputA; + PLib3MFDecomposeVectorNode_GetOutputXPtr m_DecomposeVectorNode_GetOutputX; + PLib3MFDecomposeVectorNode_GetOutputYPtr m_DecomposeVectorNode_GetOutputY; + PLib3MFDecomposeVectorNode_GetOutputZPtr m_DecomposeVectorNode_GetOutputZ; + PLib3MFComposeMatrixNode_GetInputM00Ptr m_ComposeMatrixNode_GetInputM00; + PLib3MFComposeMatrixNode_GetInputM01Ptr m_ComposeMatrixNode_GetInputM01; + PLib3MFComposeMatrixNode_GetInputM02Ptr m_ComposeMatrixNode_GetInputM02; + PLib3MFComposeMatrixNode_GetInputM03Ptr m_ComposeMatrixNode_GetInputM03; + PLib3MFComposeMatrixNode_GetInputM10Ptr m_ComposeMatrixNode_GetInputM10; + PLib3MFComposeMatrixNode_GetInputM11Ptr m_ComposeMatrixNode_GetInputM11; + PLib3MFComposeMatrixNode_GetInputM12Ptr m_ComposeMatrixNode_GetInputM12; + PLib3MFComposeMatrixNode_GetInputM13Ptr m_ComposeMatrixNode_GetInputM13; + PLib3MFComposeMatrixNode_GetInputM20Ptr m_ComposeMatrixNode_GetInputM20; + PLib3MFComposeMatrixNode_GetInputM21Ptr m_ComposeMatrixNode_GetInputM21; + PLib3MFComposeMatrixNode_GetInputM22Ptr m_ComposeMatrixNode_GetInputM22; + PLib3MFComposeMatrixNode_GetInputM23Ptr m_ComposeMatrixNode_GetInputM23; + PLib3MFComposeMatrixNode_GetInputM30Ptr m_ComposeMatrixNode_GetInputM30; + PLib3MFComposeMatrixNode_GetInputM31Ptr m_ComposeMatrixNode_GetInputM31; + PLib3MFComposeMatrixNode_GetInputM32Ptr m_ComposeMatrixNode_GetInputM32; + PLib3MFComposeMatrixNode_GetInputM33Ptr m_ComposeMatrixNode_GetInputM33; + PLib3MFComposeMatrixNode_GetOutputResultPtr m_ComposeMatrixNode_GetOutputResult; + PLib3MFMatrixFromRowsNode_GetInputAPtr m_MatrixFromRowsNode_GetInputA; + PLib3MFMatrixFromRowsNode_GetInputBPtr m_MatrixFromRowsNode_GetInputB; + PLib3MFMatrixFromRowsNode_GetInputCPtr m_MatrixFromRowsNode_GetInputC; + PLib3MFMatrixFromRowsNode_GetInputDPtr m_MatrixFromRowsNode_GetInputD; + PLib3MFMatrixFromRowsNode_GetOutputResultPtr m_MatrixFromRowsNode_GetOutputResult; + PLib3MFMatrixFromColumnsNode_GetInputAPtr m_MatrixFromColumnsNode_GetInputA; + PLib3MFMatrixFromColumnsNode_GetInputBPtr m_MatrixFromColumnsNode_GetInputB; + PLib3MFMatrixFromColumnsNode_GetInputCPtr m_MatrixFromColumnsNode_GetInputC; + PLib3MFMatrixFromColumnsNode_GetInputDPtr m_MatrixFromColumnsNode_GetInputD; + PLib3MFMatrixFromColumnsNode_GetOutputResultPtr m_MatrixFromColumnsNode_GetOutputResult; + PLib3MFConstantNode_SetConstantPtr m_ConstantNode_SetConstant; + PLib3MFConstantNode_GetConstantPtr m_ConstantNode_GetConstant; + PLib3MFConstantNode_GetOutputValuePtr m_ConstantNode_GetOutputValue; + PLib3MFConstVecNode_SetVectorPtr m_ConstVecNode_SetVector; + PLib3MFConstVecNode_GetVectorPtr m_ConstVecNode_GetVector; + PLib3MFConstVecNode_GetOutputVectorPtr m_ConstVecNode_GetOutputVector; + PLib3MFConstMatNode_SetMatrixPtr m_ConstMatNode_SetMatrix; + PLib3MFConstMatNode_GetMatrixPtr m_ConstMatNode_GetMatrix; + PLib3MFConstMatNode_GetOutputMatrixPtr m_ConstMatNode_GetOutputMatrix; + PLib3MFMeshNode_GetInputMeshPtr m_MeshNode_GetInputMesh; + PLib3MFMeshNode_GetInputPosPtr m_MeshNode_GetInputPos; + PLib3MFMeshNode_GetOutputDistancePtr m_MeshNode_GetOutputDistance; + PLib3MFUnsignedMeshNode_GetInputMeshPtr m_UnsignedMeshNode_GetInputMesh; + PLib3MFUnsignedMeshNode_GetInputPosPtr m_UnsignedMeshNode_GetInputPos; + PLib3MFUnsignedMeshNode_GetOutputDistancePtr m_UnsignedMeshNode_GetOutputDistance; + PLib3MFFunctionCallNode_GetInputFunctionIDPtr m_FunctionCallNode_GetInputFunctionID; + PLib3MFNodeIterator_GetCurrentPtr m_NodeIterator_GetCurrent; + PLib3MFFunction_GetDisplayNamePtr m_Function_GetDisplayName; + PLib3MFFunction_SetDisplayNamePtr m_Function_SetDisplayName; + PLib3MFFunction_AddInputPtr m_Function_AddInput; + PLib3MFFunction_GetInputsPtr m_Function_GetInputs; + PLib3MFFunction_RemoveInputPtr m_Function_RemoveInput; + PLib3MFFunction_AddOutputPtr m_Function_AddOutput; + PLib3MFFunction_GetOutputsPtr m_Function_GetOutputs; + PLib3MFFunction_RemoveOutputPtr m_Function_RemoveOutput; + PLib3MFFunction_FindInputPtr m_Function_FindInput; + PLib3MFFunction_FindOutputPtr m_Function_FindOutput; + PLib3MFImplicitFunction_GetIdentifierPtr m_ImplicitFunction_GetIdentifier; + PLib3MFImplicitFunction_SetIdentifierPtr m_ImplicitFunction_SetIdentifier; + PLib3MFImplicitFunction_AddNodePtr m_ImplicitFunction_AddNode; + PLib3MFImplicitFunction_AddSinNodePtr m_ImplicitFunction_AddSinNode; + PLib3MFImplicitFunction_AddCosNodePtr m_ImplicitFunction_AddCosNode; + PLib3MFImplicitFunction_AddTanNodePtr m_ImplicitFunction_AddTanNode; + PLib3MFImplicitFunction_AddArcSinNodePtr m_ImplicitFunction_AddArcSinNode; + PLib3MFImplicitFunction_AddArcCosNodePtr m_ImplicitFunction_AddArcCosNode; + PLib3MFImplicitFunction_AddArcTan2NodePtr m_ImplicitFunction_AddArcTan2Node; + PLib3MFImplicitFunction_AddSinhNodePtr m_ImplicitFunction_AddSinhNode; + PLib3MFImplicitFunction_AddCoshNodePtr m_ImplicitFunction_AddCoshNode; + PLib3MFImplicitFunction_AddTanhNodePtr m_ImplicitFunction_AddTanhNode; + PLib3MFImplicitFunction_AddRoundNodePtr m_ImplicitFunction_AddRoundNode; + PLib3MFImplicitFunction_AddCeilNodePtr m_ImplicitFunction_AddCeilNode; + PLib3MFImplicitFunction_AddFloorNodePtr m_ImplicitFunction_AddFloorNode; + PLib3MFImplicitFunction_AddSignNodePtr m_ImplicitFunction_AddSignNode; + PLib3MFImplicitFunction_AddFractNodePtr m_ImplicitFunction_AddFractNode; + PLib3MFImplicitFunction_AddAbsNodePtr m_ImplicitFunction_AddAbsNode; + PLib3MFImplicitFunction_AddExpNodePtr m_ImplicitFunction_AddExpNode; + PLib3MFImplicitFunction_AddLogNodePtr m_ImplicitFunction_AddLogNode; + PLib3MFImplicitFunction_AddLog2NodePtr m_ImplicitFunction_AddLog2Node; + PLib3MFImplicitFunction_AddLog10NodePtr m_ImplicitFunction_AddLog10Node; + PLib3MFImplicitFunction_AddLengthNodePtr m_ImplicitFunction_AddLengthNode; + PLib3MFImplicitFunction_AddTransposeNodePtr m_ImplicitFunction_AddTransposeNode; + PLib3MFImplicitFunction_InverseNodePtr m_ImplicitFunction_InverseNode; + PLib3MFImplicitFunction_AddSqrtNodePtr m_ImplicitFunction_AddSqrtNode; + PLib3MFImplicitFunction_AddResourceIdNodePtr m_ImplicitFunction_AddResourceIdNode; + PLib3MFImplicitFunction_AddAdditionNodePtr m_ImplicitFunction_AddAdditionNode; + PLib3MFImplicitFunction_AddSubtractionNodePtr m_ImplicitFunction_AddSubtractionNode; + PLib3MFImplicitFunction_AddMultiplicationNodePtr m_ImplicitFunction_AddMultiplicationNode; + PLib3MFImplicitFunction_AddDivisionNodePtr m_ImplicitFunction_AddDivisionNode; + PLib3MFImplicitFunction_AddDotNodePtr m_ImplicitFunction_AddDotNode; + PLib3MFImplicitFunction_AddCrossNodePtr m_ImplicitFunction_AddCrossNode; + PLib3MFImplicitFunction_AddMatVecMultiplicationNodePtr m_ImplicitFunction_AddMatVecMultiplicationNode; + PLib3MFImplicitFunction_AddMinNodePtr m_ImplicitFunction_AddMinNode; + PLib3MFImplicitFunction_AddMaxNodePtr m_ImplicitFunction_AddMaxNode; + PLib3MFImplicitFunction_AddFmodNodePtr m_ImplicitFunction_AddFmodNode; + PLib3MFImplicitFunction_AddPowNodePtr m_ImplicitFunction_AddPowNode; + PLib3MFImplicitFunction_AddSelectNodePtr m_ImplicitFunction_AddSelectNode; + PLib3MFImplicitFunction_AddClampNodePtr m_ImplicitFunction_AddClampNode; + PLib3MFImplicitFunction_AddComposeVectorNodePtr m_ImplicitFunction_AddComposeVectorNode; + PLib3MFImplicitFunction_AddVectorFromScalarNodePtr m_ImplicitFunction_AddVectorFromScalarNode; + PLib3MFImplicitFunction_AddDecomposeVectorNodePtr m_ImplicitFunction_AddDecomposeVectorNode; + PLib3MFImplicitFunction_AddComposeMatrixNodePtr m_ImplicitFunction_AddComposeMatrixNode; + PLib3MFImplicitFunction_AddMatrixFromRowsNodePtr m_ImplicitFunction_AddMatrixFromRowsNode; + PLib3MFImplicitFunction_AddMatrixFromColumnsNodePtr m_ImplicitFunction_AddMatrixFromColumnsNode; + PLib3MFImplicitFunction_AddConstantNodePtr m_ImplicitFunction_AddConstantNode; + PLib3MFImplicitFunction_AddConstVecNodePtr m_ImplicitFunction_AddConstVecNode; + PLib3MFImplicitFunction_AddConstMatNodePtr m_ImplicitFunction_AddConstMatNode; + PLib3MFImplicitFunction_AddMeshNodePtr m_ImplicitFunction_AddMeshNode; + PLib3MFImplicitFunction_AddUnsignedMeshNodePtr m_ImplicitFunction_AddUnsignedMeshNode; + PLib3MFImplicitFunction_AddFunctionCallNodePtr m_ImplicitFunction_AddFunctionCallNode; + PLib3MFImplicitFunction_GetNodesPtr m_ImplicitFunction_GetNodes; + PLib3MFImplicitFunction_RemoveNodePtr m_ImplicitFunction_RemoveNode; + PLib3MFImplicitFunction_AddLinkPtr m_ImplicitFunction_AddLink; + PLib3MFImplicitFunction_AddLinkByNamesPtr m_ImplicitFunction_AddLinkByNames; + PLib3MFImplicitFunction_ClearPtr m_ImplicitFunction_Clear; + PLib3MFImplicitFunction_SortNodesTopologicallyPtr m_ImplicitFunction_SortNodesTopologically; + PLib3MFFunctionFromImage3D_GetImage3DPtr m_FunctionFromImage3D_GetImage3D; + PLib3MFFunctionFromImage3D_SetImage3DPtr m_FunctionFromImage3D_SetImage3D; + PLib3MFFunctionFromImage3D_SetFilterPtr m_FunctionFromImage3D_SetFilter; + PLib3MFFunctionFromImage3D_GetFilterPtr m_FunctionFromImage3D_GetFilter; + PLib3MFFunctionFromImage3D_SetTileStylesPtr m_FunctionFromImage3D_SetTileStyles; + PLib3MFFunctionFromImage3D_GetTileStylesPtr m_FunctionFromImage3D_GetTileStyles; + PLib3MFFunctionFromImage3D_GetOffsetPtr m_FunctionFromImage3D_GetOffset; + PLib3MFFunctionFromImage3D_SetOffsetPtr m_FunctionFromImage3D_SetOffset; + PLib3MFFunctionFromImage3D_GetScalePtr m_FunctionFromImage3D_GetScale; + PLib3MFFunctionFromImage3D_SetScalePtr m_FunctionFromImage3D_SetScale; PLib3MFBuildItem_GetObjectResourcePtr m_BuildItem_GetObjectResource; PLib3MFBuildItem_GetUUIDPtr m_BuildItem_GetUUID; PLib3MFBuildItem_SetUUIDPtr m_BuildItem_SetUUID; @@ -4018,6 +6974,7 @@ typedef struct { PLib3MFModel_GetComponentsObjectByIDPtr m_Model_GetComponentsObjectByID; PLib3MFModel_GetColorGroupByIDPtr m_Model_GetColorGroupByID; PLib3MFModel_GetSliceStackByIDPtr m_Model_GetSliceStackByID; + PLib3MFModel_GetLevelSetByIDPtr m_Model_GetLevelSetByID; PLib3MFModel_GetBuildUUIDPtr m_Model_GetBuildUUID; PLib3MFModel_SetBuildUUIDPtr m_Model_SetBuildUUID; PLib3MFModel_GetBuildItemsPtr m_Model_GetBuildItems; @@ -4033,7 +6990,9 @@ typedef struct { PLib3MFModel_GetCompositeMaterialsPtr m_Model_GetCompositeMaterials; PLib3MFModel_GetMultiPropertyGroupsPtr m_Model_GetMultiPropertyGroups; PLib3MFModel_GetSliceStacksPtr m_Model_GetSliceStacks; + PLib3MFModel_GetImage3DsPtr m_Model_GetImage3Ds; PLib3MFModel_MergeToModelPtr m_Model_MergeToModel; + PLib3MFModel_MergeFromModelPtr m_Model_MergeFromModel; PLib3MFModel_AddMeshObjectPtr m_Model_AddMeshObject; PLib3MFModel_AddComponentsObjectPtr m_Model_AddComponentsObject; PLib3MFModel_AddSliceStackPtr m_Model_AddSliceStack; @@ -4043,6 +7002,8 @@ typedef struct { PLib3MFModel_AddTexture2DGroupPtr m_Model_AddTexture2DGroup; PLib3MFModel_AddCompositeMaterialsPtr m_Model_AddCompositeMaterials; PLib3MFModel_AddMultiPropertyGroupPtr m_Model_AddMultiPropertyGroup; + PLib3MFModel_AddImageStackPtr m_Model_AddImageStack; + PLib3MFModel_GetImageStackByIDPtr m_Model_GetImageStackByID; PLib3MFModel_AddBuildItemPtr m_Model_AddBuildItem; PLib3MFModel_RemoveBuildItemPtr m_Model_RemoveBuildItem; PLib3MFModel_GetMetaDataGroupPtr m_Model_GetMetaDataGroup; @@ -4059,6 +7020,13 @@ typedef struct { PLib3MFModel_RemoveCustomContentTypePtr m_Model_RemoveCustomContentType; PLib3MFModel_SetRandomNumberCallbackPtr m_Model_SetRandomNumberCallback; PLib3MFModel_GetKeyStorePtr m_Model_GetKeyStore; + PLib3MFModel_GetFunctionsPtr m_Model_GetFunctions; + PLib3MFModel_AddImplicitFunctionPtr m_Model_AddImplicitFunction; + PLib3MFModel_AddFunctionFromImage3DPtr m_Model_AddFunctionFromImage3D; + PLib3MFModel_AddVolumeDataPtr m_Model_AddVolumeData; + PLib3MFModel_AddLevelSetPtr m_Model_AddLevelSet; + PLib3MFModel_GetLevelSetsPtr m_Model_GetLevelSets; + PLib3MFModel_RemoveResourcePtr m_Model_RemoveResource; PLib3MFGetLibraryVersionPtr m_GetLibraryVersion; PLib3MFGetPrereleaseInformationPtr m_GetPrereleaseInformation; PLib3MFGetBuildInformationPtr m_GetBuildInformation; diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_nodeaddon.cc b/Autogenerated/Bindings/NodeJS/lib3mf_nodeaddon.cc index 96e56c3d9..5e403cfd6 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_nodeaddon.cc +++ b/Autogenerated/Bindings/NodeJS/lib3mf_nodeaddon.cc @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++ Implementation file for the Node addon class of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -64,11 +64,21 @@ void InitAll(v8::Local exports, v8::Local module) CLib3MFTexture2DGroupIterator::Init(); CLib3MFCompositeMaterialsIterator::Init(); CLib3MFMultiPropertyGroupIterator::Init(); + CLib3MFImage3DIterator::Init(); + CLib3MFFunctionIterator::Init(); + CLib3MFLevelSetIterator::Init(); CLib3MFMetaData::Init(); CLib3MFMetaDataGroup::Init(); CLib3MFObject::Init(); CLib3MFMeshObject::Init(); + CLib3MFLevelSet::Init(); CLib3MFBeamLattice::Init(); + CLib3MFFunctionReference::Init(); + CLib3MFVolumeDataColor::Init(); + CLib3MFMaterialMapping::Init(); + CLib3MFVolumeDataComposite::Init(); + CLib3MFVolumeDataProperty::Init(); + CLib3MFVolumeData::Init(); CLib3MFComponent::Init(); CLib3MFComponentsObject::Init(); CLib3MFBeamSet::Init(); @@ -77,8 +87,71 @@ void InitAll(v8::Local exports, v8::Local module) CLib3MFTexture2DGroup::Init(); CLib3MFCompositeMaterials::Init(); CLib3MFMultiPropertyGroup::Init(); + CLib3MFImage3D::Init(); + CLib3MFImageStack::Init(); CLib3MFAttachment::Init(); CLib3MFTexture2D::Init(); + CLib3MFImplicitPort::Init(); + CLib3MFIterator::Init(); + CLib3MFImplicitPortIterator::Init(); + CLib3MFImplicitNode::Init(); + CLib3MFOneInputNode::Init(); + CLib3MFSinNode::Init(); + CLib3MFCosNode::Init(); + CLib3MFTanNode::Init(); + CLib3MFArcSinNode::Init(); + CLib3MFArcCosNode::Init(); + CLib3MFArcTanNode::Init(); + CLib3MFSinhNode::Init(); + CLib3MFCoshNode::Init(); + CLib3MFTanhNode::Init(); + CLib3MFRoundNode::Init(); + CLib3MFCeilNode::Init(); + CLib3MFFloorNode::Init(); + CLib3MFSignNode::Init(); + CLib3MFFractNode::Init(); + CLib3MFAbsNode::Init(); + CLib3MFExpNode::Init(); + CLib3MFLogNode::Init(); + CLib3MFLog2Node::Init(); + CLib3MFLog10Node::Init(); + CLib3MFLengthNode::Init(); + CLib3MFTransposeNode::Init(); + CLib3MFInverseNode::Init(); + CLib3MFSqrtNode::Init(); + CLib3MFResourceIdNode::Init(); + CLib3MFTwoInputNode::Init(); + CLib3MFAdditionNode::Init(); + CLib3MFSubtractionNode::Init(); + CLib3MFMultiplicationNode::Init(); + CLib3MFDivisionNode::Init(); + CLib3MFDotNode::Init(); + CLib3MFCrossNode::Init(); + CLib3MFArcTan2Node::Init(); + CLib3MFMatVecMultiplicationNode::Init(); + CLib3MFMinNode::Init(); + CLib3MFMaxNode::Init(); + CLib3MFFmodNode::Init(); + CLib3MFModNode::Init(); + CLib3MFPowNode::Init(); + CLib3MFSelectNode::Init(); + CLib3MFClampNode::Init(); + CLib3MFComposeVectorNode::Init(); + CLib3MFVectorFromScalarNode::Init(); + CLib3MFDecomposeVectorNode::Init(); + CLib3MFComposeMatrixNode::Init(); + CLib3MFMatrixFromRowsNode::Init(); + CLib3MFMatrixFromColumnsNode::Init(); + CLib3MFConstantNode::Init(); + CLib3MFConstVecNode::Init(); + CLib3MFConstMatNode::Init(); + CLib3MFMeshNode::Init(); + CLib3MFUnsignedMeshNode::Init(); + CLib3MFFunctionCallNode::Init(); + CLib3MFNodeIterator::Init(); + CLib3MFFunction::Init(); + CLib3MFImplicitFunction::Init(); + CLib3MFFunctionFromImage3D::Init(); CLib3MFBuildItem::Init(); CLib3MFBuildItemIterator::Init(); CLib3MFSlice::Init(); diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc index 36b978e15..2ed51aabd 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc +++ b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.cc @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++ Implementation file for the Node wrapper class of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -57,11 +57,21 @@ Persistent CLib3MFColorGroupIterator::constructor; Persistent CLib3MFTexture2DGroupIterator::constructor; Persistent CLib3MFCompositeMaterialsIterator::constructor; Persistent CLib3MFMultiPropertyGroupIterator::constructor; +Persistent CLib3MFImage3DIterator::constructor; +Persistent CLib3MFFunctionIterator::constructor; +Persistent CLib3MFLevelSetIterator::constructor; Persistent CLib3MFMetaData::constructor; Persistent CLib3MFMetaDataGroup::constructor; Persistent CLib3MFObject::constructor; Persistent CLib3MFMeshObject::constructor; +Persistent CLib3MFLevelSet::constructor; Persistent CLib3MFBeamLattice::constructor; +Persistent CLib3MFFunctionReference::constructor; +Persistent CLib3MFVolumeDataColor::constructor; +Persistent CLib3MFMaterialMapping::constructor; +Persistent CLib3MFVolumeDataComposite::constructor; +Persistent CLib3MFVolumeDataProperty::constructor; +Persistent CLib3MFVolumeData::constructor; Persistent CLib3MFComponent::constructor; Persistent CLib3MFComponentsObject::constructor; Persistent CLib3MFBeamSet::constructor; @@ -70,8 +80,71 @@ Persistent CLib3MFColorGroup::constructor; Persistent CLib3MFTexture2DGroup::constructor; Persistent CLib3MFCompositeMaterials::constructor; Persistent CLib3MFMultiPropertyGroup::constructor; +Persistent CLib3MFImage3D::constructor; +Persistent CLib3MFImageStack::constructor; Persistent CLib3MFAttachment::constructor; Persistent CLib3MFTexture2D::constructor; +Persistent CLib3MFImplicitPort::constructor; +Persistent CLib3MFIterator::constructor; +Persistent CLib3MFImplicitPortIterator::constructor; +Persistent CLib3MFImplicitNode::constructor; +Persistent CLib3MFOneInputNode::constructor; +Persistent CLib3MFSinNode::constructor; +Persistent CLib3MFCosNode::constructor; +Persistent CLib3MFTanNode::constructor; +Persistent CLib3MFArcSinNode::constructor; +Persistent CLib3MFArcCosNode::constructor; +Persistent CLib3MFArcTanNode::constructor; +Persistent CLib3MFSinhNode::constructor; +Persistent CLib3MFCoshNode::constructor; +Persistent CLib3MFTanhNode::constructor; +Persistent CLib3MFRoundNode::constructor; +Persistent CLib3MFCeilNode::constructor; +Persistent CLib3MFFloorNode::constructor; +Persistent CLib3MFSignNode::constructor; +Persistent CLib3MFFractNode::constructor; +Persistent CLib3MFAbsNode::constructor; +Persistent CLib3MFExpNode::constructor; +Persistent CLib3MFLogNode::constructor; +Persistent CLib3MFLog2Node::constructor; +Persistent CLib3MFLog10Node::constructor; +Persistent CLib3MFLengthNode::constructor; +Persistent CLib3MFTransposeNode::constructor; +Persistent CLib3MFInverseNode::constructor; +Persistent CLib3MFSqrtNode::constructor; +Persistent CLib3MFResourceIdNode::constructor; +Persistent CLib3MFTwoInputNode::constructor; +Persistent CLib3MFAdditionNode::constructor; +Persistent CLib3MFSubtractionNode::constructor; +Persistent CLib3MFMultiplicationNode::constructor; +Persistent CLib3MFDivisionNode::constructor; +Persistent CLib3MFDotNode::constructor; +Persistent CLib3MFCrossNode::constructor; +Persistent CLib3MFArcTan2Node::constructor; +Persistent CLib3MFMatVecMultiplicationNode::constructor; +Persistent CLib3MFMinNode::constructor; +Persistent CLib3MFMaxNode::constructor; +Persistent CLib3MFFmodNode::constructor; +Persistent CLib3MFModNode::constructor; +Persistent CLib3MFPowNode::constructor; +Persistent CLib3MFSelectNode::constructor; +Persistent CLib3MFClampNode::constructor; +Persistent CLib3MFComposeVectorNode::constructor; +Persistent CLib3MFVectorFromScalarNode::constructor; +Persistent CLib3MFDecomposeVectorNode::constructor; +Persistent CLib3MFComposeMatrixNode::constructor; +Persistent CLib3MFMatrixFromRowsNode::constructor; +Persistent CLib3MFMatrixFromColumnsNode::constructor; +Persistent CLib3MFConstantNode::constructor; +Persistent CLib3MFConstVecNode::constructor; +Persistent CLib3MFConstMatNode::constructor; +Persistent CLib3MFMeshNode::constructor; +Persistent CLib3MFUnsignedMeshNode::constructor; +Persistent CLib3MFFunctionCallNode::constructor; +Persistent CLib3MFNodeIterator::constructor; +Persistent CLib3MFFunction::constructor; +Persistent CLib3MFImplicitFunction::constructor; +Persistent CLib3MFFunctionFromImage3D::constructor; Persistent CLib3MFBuildItem::constructor; Persistent CLib3MFBuildItemIterator::constructor; Persistent CLib3MFSlice::constructor; @@ -1088,6 +1161,167 @@ Local convertLib3MFBallToObject(Isolate* isolate, sLib3MFBall sBall) return returnInstance; } +/************************************************************************************************************************* + Class sLib3MFVector Conversion +**************************************************************************************************************************/ +sLib3MFVector convertObjectToLib3MFVector(Isolate* isolate, const Local & pParamValue) +{ + sLib3MFVector sVector; + Local context = isolate->GetCurrentContext(); + int rowIndex; + + for (rowIndex = 0; rowIndex < 3; rowIndex++) + sVector.m_Coordinates[rowIndex] = 0.0; + + if (pParamValue->IsObject()) { + MaybeLocal maybeObject = pParamValue->ToObject(context); + + if (!maybeObject.IsEmpty()) { + Local obj = maybeObject.ToLocalChecked(); + + // Coordinates Member + MaybeLocal maybeValCoordinates = obj->Get(context, String::NewFromUtf8(isolate, "Coordinates")); + if (!maybeValCoordinates.IsEmpty()) { + Local valCoordinates = maybeValCoordinates.ToLocalChecked(); + if (valCoordinates->IsArray()) { + Local arrayCoordinates = Local::Cast(valCoordinates); + for (int rowIndex = 0; rowIndex < 3; rowIndex++) { + MaybeLocal mlocalValue = arrayCoordinates->Get(context, rowIndex); + Local localValue; + if (mlocalValue.ToLocal(&localValue)) { + if (localValue->IsNumber()) { + MaybeLocal localNumber = localValue->ToNumber(context); + sVector.m_Coordinates[rowIndex] = localNumber.ToLocalChecked()->NumberValue(isolate->GetCurrentContext()).ToChecked(); + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Coordinates array entry is not a number" ))); + } + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Coordinates array entry is invalid" ))); + } + } + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Coordinates member is not an array" ))); + } + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Coordinates member not found in object" ))); + } + + + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "invalid object passed." ))); + } + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "expected object parameter." ))); + } + + return sVector; +} + + + +Local convertLib3MFVectorToObject(Isolate* isolate, sLib3MFVector sVector) +{ + Local returnInstance = Object::New(isolate); + Local newCoordinates = Array::New(isolate, 3); + for (int rowIndex = 0; rowIndex < 3; rowIndex++) { + newCoordinates->Set(rowIndex, Number::New(isolate, sVector.m_Coordinates[rowIndex])); + } + returnInstance->Set(String::NewFromUtf8(isolate, "Coordinates"), newCoordinates); + + + return returnInstance; +} + +/************************************************************************************************************************* + Class sLib3MFMatrix4x4 Conversion +**************************************************************************************************************************/ +sLib3MFMatrix4x4 convertObjectToLib3MFMatrix4x4(Isolate* isolate, const Local & pParamValue) +{ + sLib3MFMatrix4x4 sMatrix4x4; + Local context = isolate->GetCurrentContext(); + int rowIndex; + int columnIndex; + + for (columnIndex = 0; columnIndex < 4; columnIndex++) + for (rowIndex = 0; rowIndex < 4; rowIndex++) + sMatrix4x4.m_Field[columnIndex][rowIndex] = 0.0; + + if (pParamValue->IsObject()) { + MaybeLocal maybeObject = pParamValue->ToObject(context); + + if (!maybeObject.IsEmpty()) { + Local obj = maybeObject.ToLocalChecked(); + + // Field Member + MaybeLocal maybeValField = obj->Get(context, String::NewFromUtf8(isolate, "Field")); + if (!maybeValField.IsEmpty()) { + Local valField = maybeValField.ToLocalChecked(); + if (valField->IsArray()) { + Local arrayField = Local::Cast(valField); + for (int colIndex = 0; colIndex < 4; colIndex++) { + MaybeLocal mlocalCol = arrayField->Get(context, colIndex); + Local localCol; + if (mlocalCol.ToLocal(&localCol)) { + if (localCol->IsArray()) { + Local localColArray = Local::Cast(localCol); + for (int rowIndex = 0; rowIndex < 4; rowIndex++) { + MaybeLocal mlocalValue = localColArray->Get(context, rowIndex); + Local localValue; + if (mlocalValue.ToLocal(&localValue)) { + if (localValue->IsNumber()) { + MaybeLocal localNumber = localValue->ToNumber(context); + sMatrix4x4.m_Field[colIndex][rowIndex] = localNumber.ToLocalChecked()->NumberValue(isolate->GetCurrentContext()).ToChecked(); + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Field array entry is not a number" ))); + } + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Field array entry is invalid" ))); + } + } + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Field array entry is not an array" ))); + } + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Field array entry is invalid" ))); + } + } + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Field member is not an array" ))); + } + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "Field member not found in object" ))); + } + + + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "invalid object passed." ))); + } + } else { + isolate->ThrowException(Exception::TypeError(String::NewFromUtf8(isolate, "expected object parameter." ))); + } + + return sMatrix4x4; +} + + + +Local convertLib3MFMatrix4x4ToObject(Isolate* isolate, sLib3MFMatrix4x4 sMatrix4x4) +{ + Local returnInstance = Object::New(isolate); + Local newField = Array::New(isolate, 4); + for (int colIndex = 0; colIndex < 4; colIndex++) { + Local colArray = Array::New(isolate, 4); + for (int rowIndex = 0; rowIndex < 4; rowIndex++) { + colArray->Set(rowIndex, Number::New(isolate, sMatrix4x4.m_Field[colIndex][rowIndex])); + } + newField->Set(colIndex, colArray); + } + returnInstance->Set(String::NewFromUtf8(isolate, "Field"), newField); + + + return returnInstance; +} + /************************************************************************************************************************* Class CLib3MFBaseClass Implementation **************************************************************************************************************************/ @@ -3248,59 +3482,49 @@ void CLib3MFMultiPropertyGroupIterator::GetCurrentMultiPropertyGroup(const Funct } /************************************************************************************************************************* - Class CLib3MFMetaData Implementation + Class CLib3MFImage3DIterator Implementation **************************************************************************************************************************/ -CLib3MFMetaData::CLib3MFMetaData() +CLib3MFImage3DIterator::CLib3MFImage3DIterator() : CLib3MFBaseClass() { } -CLib3MFMetaData::~CLib3MFMetaData() +CLib3MFImage3DIterator::~CLib3MFImage3DIterator() { } -void CLib3MFMetaData::Init() +void CLib3MFImage3DIterator::Init() { Isolate* isolate = Isolate::GetCurrent(); // Prepare constructor template Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMetaData")); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFImage3DIterator")); tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "GetNameSpace", GetNameSpace); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetNameSpace", SetNameSpace); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetName", GetName); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetName", SetName); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetKey", GetKey); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetMustPreserve", GetMustPreserve); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetMustPreserve", SetMustPreserve); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetType", GetType); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetType", SetType); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetValue", GetValue); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetValue", SetValue); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetCurrentImage3D", GetCurrentImage3D); constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); } -void CLib3MFMetaData::New(const FunctionCallbackInfo& args) +void CLib3MFImage3DIterator::New(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); if (args.IsConstructCall()) { CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFMetaData * metadataInstance = new CLib3MFMetaData(); - metadataInstance->Wrap(args.This()); + CLib3MFImage3DIterator * image3diteratorInstance = new CLib3MFImage3DIterator(); + image3diteratorInstance->Wrap(args.This()); args.GetReturnValue().Set(args.This()); } else { - RaiseError(isolate, "Lib3MFMetaData: Invalid call to Constructor"); + RaiseError(isolate, "Lib3MFImage3DIterator: Invalid call to Constructor"); } } -Local CLib3MFMetaData::NewInstance(Local pParent, Lib3MFHandle pHandle) +Local CLib3MFImage3DIterator::NewInstance(Local pParent, Lib3MFHandle pHandle) { Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); @@ -3314,121 +3538,368 @@ Local CLib3MFMetaData::NewInstance(Local pParent, Lib3MFHandle p } -void CLib3MFMetaData::GetNameSpace(const FunctionCallbackInfo& args) +void CLib3MFImage3DIterator::GetCurrentImage3D(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int bytesNeededNameSpace = 0; - unsigned int bytesWrittenNameSpace = 0; + Lib3MFHandle hReturnResource = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetNameSpace."); - if (wrapperTable->m_MetaData_GetNameSpace == nullptr) - throw std::runtime_error("Could not call Lib3MF method MetaData::GetNameSpace."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCurrentImage3D."); + if (wrapperTable->m_Image3DIterator_GetCurrentImage3D == nullptr) + throw std::runtime_error("Could not call Lib3MF method Image3DIterator::GetCurrentImage3D."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult initErrorCode = wrapperTable->m_MetaData_GetNameSpace(instanceHandle, 0, &bytesNeededNameSpace, nullptr); - CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); - std::vector bufferNameSpace; - bufferNameSpace.resize(bytesNeededNameSpace); - Lib3MFResult errorCode = wrapperTable->m_MetaData_GetNameSpace(instanceHandle, bytesNeededNameSpace, &bytesWrittenNameSpace, &bufferNameSpace[0]); + Lib3MFResult errorCode = wrapperTable->m_Image3DIterator_GetCurrentImage3D(instanceHandle, &hReturnResource); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferNameSpace[0])); + Local instanceObjResource = CLib3MFImage3D::NewInstance(args.Holder(), hReturnResource); + args.GetReturnValue().Set(instanceObjResource); } catch (std::exception & E) { RaiseError(isolate, E.what()); } } +/************************************************************************************************************************* + Class CLib3MFFunctionIterator Implementation +**************************************************************************************************************************/ -void CLib3MFMetaData::SetNameSpace(const FunctionCallbackInfo& args) +CLib3MFFunctionIterator::CLib3MFFunctionIterator() + : CLib3MFBaseClass() { - Isolate* isolate = args.GetIsolate(); - HandleScope scope(isolate); - try { - if (!args[0]->IsString()) { - throw std::runtime_error("Expected string parameter 0 (NameSpace)"); - } - v8::String::Utf8Value sutf8NameSpace(isolate, args[0]); - std::string sNameSpace = *sutf8NameSpace; - sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); - if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetNameSpace."); - if (wrapperTable->m_MetaData_SetNameSpace == nullptr) - throw std::runtime_error("Could not call Lib3MF method MetaData::SetNameSpace."); - Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MetaData_SetNameSpace(instanceHandle, sNameSpace.c_str()); - CheckError(isolate, wrapperTable, instanceHandle, errorCode); +} - } catch (std::exception & E) { - RaiseError(isolate, E.what()); - } +CLib3MFFunctionIterator::~CLib3MFFunctionIterator() +{ } +void CLib3MFFunctionIterator::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); -void CLib3MFMetaData::GetName(const FunctionCallbackInfo& args) + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFFunctionIterator")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetCurrentFunction", GetCurrentFunction); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFFunctionIterator::New(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); - try { - unsigned int bytesNeededName = 0; - unsigned int bytesWrittenName = 0; - sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); - if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetName."); - if (wrapperTable->m_MetaData_GetName == nullptr) - throw std::runtime_error("Could not call Lib3MF method MetaData::GetName."); - Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult initErrorCode = wrapperTable->m_MetaData_GetName(instanceHandle, 0, &bytesNeededName, nullptr); - CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); - std::vector bufferName; - bufferName.resize(bytesNeededName); - Lib3MFResult errorCode = wrapperTable->m_MetaData_GetName(instanceHandle, bytesNeededName, &bytesWrittenName, &bufferName[0]); - CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferName[0])); - } catch (std::exception & E) { - RaiseError(isolate, E.what()); + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFFunctionIterator * functioniteratorInstance = new CLib3MFFunctionIterator(); + functioniteratorInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFFunctionIterator: Invalid call to Constructor"); + } +} + +Local CLib3MFFunctionIterator::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); } + return instance; } -void CLib3MFMetaData::SetName(const FunctionCallbackInfo& args) +void CLib3MFFunctionIterator::GetCurrentFunction(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsString()) { - throw std::runtime_error("Expected string parameter 0 (Name)"); - } - v8::String::Utf8Value sutf8Name(isolate, args[0]); - std::string sName = *sutf8Name; + Lib3MFHandle hReturnResource = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetName."); - if (wrapperTable->m_MetaData_SetName == nullptr) - throw std::runtime_error("Could not call Lib3MF method MetaData::SetName."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCurrentFunction."); + if (wrapperTable->m_FunctionIterator_GetCurrentFunction == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionIterator::GetCurrentFunction."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MetaData_SetName(instanceHandle, sName.c_str()); + Lib3MFResult errorCode = wrapperTable->m_FunctionIterator_GetCurrentFunction(instanceHandle, &hReturnResource); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjResource = CLib3MFFunction::NewInstance(args.Holder(), hReturnResource); + args.GetReturnValue().Set(instanceObjResource); } catch (std::exception & E) { RaiseError(isolate, E.what()); } } +/************************************************************************************************************************* + Class CLib3MFLevelSetIterator Implementation +**************************************************************************************************************************/ -void CLib3MFMetaData::GetKey(const FunctionCallbackInfo& args) +CLib3MFLevelSetIterator::CLib3MFLevelSetIterator() + : CLib3MFBaseClass() { - Isolate* isolate = args.GetIsolate(); - HandleScope scope(isolate); - try { - unsigned int bytesNeededKey = 0; - unsigned int bytesWrittenKey = 0; - sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); - if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetKey."); - if (wrapperTable->m_MetaData_GetKey == nullptr) +} + +CLib3MFLevelSetIterator::~CLib3MFLevelSetIterator() +{ +} + +void CLib3MFLevelSetIterator::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFLevelSetIterator")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetCurrentLevelSet", GetCurrentLevelSet); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFLevelSetIterator::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFLevelSetIterator * levelsetiteratorInstance = new CLib3MFLevelSetIterator(); + levelsetiteratorInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFLevelSetIterator: Invalid call to Constructor"); + } +} + +Local CLib3MFLevelSetIterator::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFLevelSetIterator::GetCurrentLevelSet(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnResource = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCurrentLevelSet."); + if (wrapperTable->m_LevelSetIterator_GetCurrentLevelSet == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSetIterator::GetCurrentLevelSet."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_LevelSetIterator_GetCurrentLevelSet(instanceHandle, &hReturnResource); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjResource = CLib3MFLevelSet::NewInstance(args.Holder(), hReturnResource); + args.GetReturnValue().Set(instanceObjResource); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFMetaData Implementation +**************************************************************************************************************************/ + +CLib3MFMetaData::CLib3MFMetaData() + : CLib3MFBaseClass() +{ +} + +CLib3MFMetaData::~CLib3MFMetaData() +{ +} + +void CLib3MFMetaData::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMetaData")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetNameSpace", GetNameSpace); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetNameSpace", SetNameSpace); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetName", GetName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetName", SetName); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetKey", GetKey); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetMustPreserve", GetMustPreserve); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetMustPreserve", SetMustPreserve); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetType", GetType); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetType", SetType); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetValue", GetValue); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetValue", SetValue); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFMetaData::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFMetaData * metadataInstance = new CLib3MFMetaData(); + metadataInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFMetaData: Invalid call to Constructor"); + } +} + +Local CLib3MFMetaData::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFMetaData::GetNameSpace(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededNameSpace = 0; + unsigned int bytesWrittenNameSpace = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetNameSpace."); + if (wrapperTable->m_MetaData_GetNameSpace == nullptr) + throw std::runtime_error("Could not call Lib3MF method MetaData::GetNameSpace."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_MetaData_GetNameSpace(instanceHandle, 0, &bytesNeededNameSpace, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferNameSpace; + bufferNameSpace.resize(bytesNeededNameSpace); + Lib3MFResult errorCode = wrapperTable->m_MetaData_GetNameSpace(instanceHandle, bytesNeededNameSpace, &bytesWrittenNameSpace, &bufferNameSpace[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferNameSpace[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMetaData::SetNameSpace(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (NameSpace)"); + } + v8::String::Utf8Value sutf8NameSpace(isolate, args[0]); + std::string sNameSpace = *sutf8NameSpace; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetNameSpace."); + if (wrapperTable->m_MetaData_SetNameSpace == nullptr) + throw std::runtime_error("Could not call Lib3MF method MetaData::SetNameSpace."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MetaData_SetNameSpace(instanceHandle, sNameSpace.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMetaData::GetName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededName = 0; + unsigned int bytesWrittenName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetName."); + if (wrapperTable->m_MetaData_GetName == nullptr) + throw std::runtime_error("Could not call Lib3MF method MetaData::GetName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_MetaData_GetName(instanceHandle, 0, &bytesNeededName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferName; + bufferName.resize(bytesNeededName); + Lib3MFResult errorCode = wrapperTable->m_MetaData_GetName(instanceHandle, bytesNeededName, &bytesWrittenName, &bufferName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMetaData::SetName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Name)"); + } + v8::String::Utf8Value sutf8Name(isolate, args[0]); + std::string sName = *sutf8Name; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetName."); + if (wrapperTable->m_MetaData_SetName == nullptr) + throw std::runtime_error("Could not call Lib3MF method MetaData::SetName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MetaData_SetName(instanceHandle, sName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMetaData::GetKey(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededKey = 0; + unsigned int bytesWrittenKey = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetKey."); + if (wrapperTable->m_MetaData_GetKey == nullptr) throw std::runtime_error("Could not call Lib3MF method MetaData::GetKey."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); Lib3MFResult initErrorCode = wrapperTable->m_MetaData_GetKey(instanceHandle, 0, &bytesNeededKey, nullptr); @@ -3867,6 +4338,7 @@ void CLib3MFObject::Init() NODE_SET_PROTOTYPE_METHOD(tpl, "SetPartNumber", SetPartNumber); NODE_SET_PROTOTYPE_METHOD(tpl, "IsMeshObject", IsMeshObject); NODE_SET_PROTOTYPE_METHOD(tpl, "IsComponentsObject", IsComponentsObject); + NODE_SET_PROTOTYPE_METHOD(tpl, "IsLevelSetObject", IsLevelSetObject); NODE_SET_PROTOTYPE_METHOD(tpl, "IsValid", IsValid); NODE_SET_PROTOTYPE_METHOD(tpl, "SetAttachmentAsThumbnail", SetAttachmentAsThumbnail); NODE_SET_PROTOTYPE_METHOD(tpl, "GetThumbnailAttachment", GetThumbnailAttachment); @@ -4108,6 +4580,28 @@ void CLib3MFObject::IsComponentsObject(const FunctionCallbackInfo& args) } +void CLib3MFObject::IsLevelSetObject(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + bool bReturnIsLevelSetObject = false; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method IsLevelSetObject."); + if (wrapperTable->m_Object_IsLevelSetObject == nullptr) + throw std::runtime_error("Could not call Lib3MF method Object::IsLevelSetObject."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Object_IsLevelSetObject(instanceHandle, &bReturnIsLevelSetObject); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Boolean::New(isolate, bReturnIsLevelSetObject)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + void CLib3MFObject::IsValid(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); @@ -4487,6 +4981,8 @@ void CLib3MFMeshObject::Init() NODE_SET_PROTOTYPE_METHOD(tpl, "SetGeometry", SetGeometry); NODE_SET_PROTOTYPE_METHOD(tpl, "IsManifoldAndOriented", IsManifoldAndOriented); NODE_SET_PROTOTYPE_METHOD(tpl, "BeamLattice", BeamLattice); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetVolumeData", GetVolumeData); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetVolumeData", SetVolumeData); constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); } @@ -4998,72 +5494,116 @@ void CLib3MFMeshObject::BeamLattice(const FunctionCallbackInfo& args) } } -/************************************************************************************************************************* - Class CLib3MFBeamLattice Implementation + +void CLib3MFMeshObject::GetVolumeData(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnTheVolumeData = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetVolumeData."); + if (wrapperTable->m_MeshObject_GetVolumeData == nullptr) + throw std::runtime_error("Could not call Lib3MF method MeshObject::GetVolumeData."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MeshObject_GetVolumeData(instanceHandle, &hReturnTheVolumeData); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjTheVolumeData = CLib3MFVolumeData::NewInstance(args.Holder(), hReturnTheVolumeData); + args.GetReturnValue().Set(instanceObjTheVolumeData); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMeshObject::SetVolumeData(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (TheVolumeData)"); + } + Local objTheVolumeData = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFVolumeData * instanceTheVolumeData = ObjectWrap::Unwrap(objTheVolumeData); + if (instanceTheVolumeData == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (TheVolumeData)"); + Lib3MFHandle hTheVolumeData = instanceTheVolumeData->getHandle( objTheVolumeData ); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetVolumeData."); + if (wrapperTable->m_MeshObject_SetVolumeData == nullptr) + throw std::runtime_error("Could not call Lib3MF method MeshObject::SetVolumeData."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MeshObject_SetVolumeData(instanceHandle, hTheVolumeData); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFLevelSet Implementation **************************************************************************************************************************/ -CLib3MFBeamLattice::CLib3MFBeamLattice() +CLib3MFLevelSet::CLib3MFLevelSet() : CLib3MFBaseClass() { } -CLib3MFBeamLattice::~CLib3MFBeamLattice() +CLib3MFLevelSet::~CLib3MFLevelSet() { } -void CLib3MFBeamLattice::Init() +void CLib3MFLevelSet::Init() { Isolate* isolate = Isolate::GetCurrent(); // Prepare constructor template Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFBeamLattice")); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFLevelSet")); tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "GetMinLength", GetMinLength); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetMinLength", SetMinLength); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetClipping", GetClipping); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetClipping", SetClipping); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetRepresentation", GetRepresentation); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetRepresentation", SetRepresentation); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBallOptions", GetBallOptions); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetBallOptions", SetBallOptions); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBeamCount", GetBeamCount); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBeam", GetBeam); - NODE_SET_PROTOTYPE_METHOD(tpl, "AddBeam", AddBeam); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetBeam", SetBeam); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetBeams", SetBeams); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBeams", GetBeams); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBallCount", GetBallCount); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBall", GetBall); - NODE_SET_PROTOTYPE_METHOD(tpl, "AddBall", AddBall); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetBall", SetBall); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetBalls", SetBalls); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBalls", GetBalls); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBeamSetCount", GetBeamSetCount); - NODE_SET_PROTOTYPE_METHOD(tpl, "AddBeamSet", AddBeamSet); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBeamSet", GetBeamSet); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetFunction", GetFunction); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetFunction", SetFunction); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetTransform", GetTransform); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetTransform", SetTransform); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetChannelName", GetChannelName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetChannelName", SetChannelName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetMinFeatureSize", SetMinFeatureSize); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetMinFeatureSize", GetMinFeatureSize); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetFallBackValue", SetFallBackValue); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetFallBackValue", GetFallBackValue); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetMeshBBoxOnly", SetMeshBBoxOnly); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetMeshBBoxOnly", GetMeshBBoxOnly); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetMesh", SetMesh); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetMesh", GetMesh); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetVolumeData", GetVolumeData); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetVolumeData", SetVolumeData); constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); } -void CLib3MFBeamLattice::New(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::New(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); if (args.IsConstructCall()) { CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFBeamLattice * beamlatticeInstance = new CLib3MFBeamLattice(); - beamlatticeInstance->Wrap(args.This()); + CLib3MFLevelSet * levelsetInstance = new CLib3MFLevelSet(); + levelsetInstance->Wrap(args.This()); args.GetReturnValue().Set(args.This()); } else { - RaiseError(isolate, "Lib3MFBeamLattice: Invalid call to Constructor"); + RaiseError(isolate, "Lib3MFLevelSet: Invalid call to Constructor"); } } -Local CLib3MFBeamLattice::NewInstance(Local pParent, Lib3MFHandle pHandle) +Local CLib3MFLevelSet::NewInstance(Local pParent, Lib3MFHandle pHandle) { Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); @@ -5077,21 +5617,22 @@ Local CLib3MFBeamLattice::NewInstance(Local pParent, Lib3MFHandl } -void CLib3MFBeamLattice::GetMinLength(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::GetFunction(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - double dReturnMinLength = 0.0; + Lib3MFHandle hReturnTheFunction = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetMinLength."); - if (wrapperTable->m_BeamLattice_GetMinLength == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetMinLength."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetFunction."); + if (wrapperTable->m_LevelSet_GetFunction == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::GetFunction."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetMinLength(instanceHandle, &dReturnMinLength); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_GetFunction(instanceHandle, &hReturnTheFunction); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Number::New(isolate, dReturnMinLength)); + Local instanceObjTheFunction = CLib3MFFunction::NewInstance(args.Holder(), hReturnTheFunction); + args.GetReturnValue().Set(instanceObjTheFunction); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5099,22 +5640,26 @@ void CLib3MFBeamLattice::GetMinLength(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::SetMinLength(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::SetFunction(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsNumber()) { - throw std::runtime_error("Expected double parameter 0 (MinLength)"); + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (TheFunction)"); } - double dMinLength = (double) args[0]->NumberValue(isolate->GetCurrentContext()).ToChecked(); + Local objTheFunction = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFFunction * instanceTheFunction = ObjectWrap::Unwrap(objTheFunction); + if (instanceTheFunction == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (TheFunction)"); + Lib3MFHandle hTheFunction = instanceTheFunction->getHandle( objTheFunction ); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetMinLength."); - if (wrapperTable->m_BeamLattice_SetMinLength == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetMinLength."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetFunction."); + if (wrapperTable->m_LevelSet_SetFunction == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::SetFunction."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetMinLength(instanceHandle, dMinLength); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_SetFunction(instanceHandle, hTheFunction); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -5123,25 +5668,21 @@ void CLib3MFBeamLattice::SetMinLength(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::GetClipping(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::GetTransform(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - Local outObject = Object::New(isolate); - eLib3MFBeamLatticeClipMode eReturnClipMode; - unsigned int nReturnUniqueResourceID = 0; + sLib3MFTransform sReturnTransform; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetClipping."); - if (wrapperTable->m_BeamLattice_GetClipping == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetClipping."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTransform."); + if (wrapperTable->m_LevelSet_GetTransform == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::GetTransform."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetClipping(instanceHandle, &eReturnClipMode, &nReturnUniqueResourceID); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_GetTransform(instanceHandle, &sReturnTransform); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "ClipMode"), Integer::New(isolate, (int)eReturnClipMode)); - outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "UniqueResourceID"), Integer::NewFromUnsigned(isolate, nReturnUniqueResourceID)); - args.GetReturnValue().Set(outObject); + args.GetReturnValue().Set(convertLib3MFTransformToObject(isolate, sReturnTransform)); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5149,26 +5690,22 @@ void CLib3MFBeamLattice::GetClipping(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::SetClipping(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::SetTransform(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected enum parameter 0 (ClipMode)"); - } - if (!args[1]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 1 (UniqueResourceID)"); + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected struct parameter 0 (Transform)"); } - unsigned int eClipMode = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - unsigned int nUniqueResourceID = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFTransform sTransform = convertObjectToLib3MFTransform(isolate, args[0]); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetClipping."); - if (wrapperTable->m_BeamLattice_SetClipping == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetClipping."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetTransform."); + if (wrapperTable->m_LevelSet_SetTransform == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::SetTransform."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetClipping(instanceHandle, (eLib3MFBeamLatticeClipMode) eClipMode, nUniqueResourceID); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_SetTransform(instanceHandle, &sTransform); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -5177,25 +5714,26 @@ void CLib3MFBeamLattice::SetClipping(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::GetRepresentation(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::GetChannelName(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - Local outObject = Object::New(isolate); - bool bReturnHasRepresentation = false; - unsigned int nReturnUniqueResourceID = 0; + unsigned int bytesNeededChannelName = 0; + unsigned int bytesWrittenChannelName = 0; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetRepresentation."); - if (wrapperTable->m_BeamLattice_GetRepresentation == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetRepresentation."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetChannelName."); + if (wrapperTable->m_LevelSet_GetChannelName == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::GetChannelName."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetRepresentation(instanceHandle, &bReturnHasRepresentation, &nReturnUniqueResourceID); + Lib3MFResult initErrorCode = wrapperTable->m_LevelSet_GetChannelName(instanceHandle, 0, &bytesNeededChannelName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferChannelName; + bufferChannelName.resize(bytesNeededChannelName); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_GetChannelName(instanceHandle, bytesNeededChannelName, &bytesWrittenChannelName, &bufferChannelName[0]); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "HasRepresentation"), Boolean::New(isolate, bReturnHasRepresentation)); - outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "UniqueResourceID"), Integer::NewFromUnsigned(isolate, nReturnUniqueResourceID)); - args.GetReturnValue().Set(outObject); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferChannelName[0])); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5203,49 +5741,24 @@ void CLib3MFBeamLattice::GetRepresentation(const FunctionCallbackInfo& ar } -void CLib3MFBeamLattice::SetRepresentation(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::SetChannelName(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (UniqueResourceID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (ChannelName)"); } - unsigned int nUniqueResourceID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); - if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetRepresentation."); - if (wrapperTable->m_BeamLattice_SetRepresentation == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetRepresentation."); - Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetRepresentation(instanceHandle, nUniqueResourceID); - CheckError(isolate, wrapperTable, instanceHandle, errorCode); - - } catch (std::exception & E) { - RaiseError(isolate, E.what()); - } -} - - -void CLib3MFBeamLattice::GetBallOptions(const FunctionCallbackInfo& args) -{ - Isolate* isolate = args.GetIsolate(); - HandleScope scope(isolate); - try { - Local outObject = Object::New(isolate); - eLib3MFBeamLatticeBallMode eReturnBallMode; - double dReturnBallRadius = 0.0; + v8::String::Utf8Value sutf8ChannelName(isolate, args[0]); + std::string sChannelName = *sutf8ChannelName; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBallOptions."); - if (wrapperTable->m_BeamLattice_GetBallOptions == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBallOptions."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetChannelName."); + if (wrapperTable->m_LevelSet_SetChannelName == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::SetChannelName."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBallOptions(instanceHandle, &eReturnBallMode, &dReturnBallRadius); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_SetChannelName(instanceHandle, sChannelName.c_str()); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "BallMode"), Integer::New(isolate, (int)eReturnBallMode)); - outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "BallRadius"), Number::New(isolate, dReturnBallRadius)); - args.GetReturnValue().Set(outObject); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5253,26 +5766,22 @@ void CLib3MFBeamLattice::GetBallOptions(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::SetBallOptions(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::SetMinFeatureSize(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected enum parameter 0 (BallMode)"); - } - if (!args[1]->IsNumber()) { - throw std::runtime_error("Expected double parameter 1 (BallRadius)"); + if (!args[0]->IsNumber()) { + throw std::runtime_error("Expected double parameter 0 (MinFeatureSize)"); } - unsigned int eBallMode = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - double dBallRadius = (double) args[1]->NumberValue(isolate->GetCurrentContext()).ToChecked(); + double dMinFeatureSize = (double) args[0]->NumberValue(isolate->GetCurrentContext()).ToChecked(); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBallOptions."); - if (wrapperTable->m_BeamLattice_SetBallOptions == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetBallOptions."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetMinFeatureSize."); + if (wrapperTable->m_LevelSet_SetMinFeatureSize == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::SetMinFeatureSize."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetBallOptions(instanceHandle, (eLib3MFBeamLatticeBallMode) eBallMode, dBallRadius); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_SetMinFeatureSize(instanceHandle, dMinFeatureSize); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -5281,21 +5790,21 @@ void CLib3MFBeamLattice::SetBallOptions(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::GetBeamCount(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::GetMinFeatureSize(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + double dReturnMinFeatureSize = 0.0; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBeamCount."); - if (wrapperTable->m_BeamLattice_GetBeamCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBeamCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetMinFeatureSize."); + if (wrapperTable->m_LevelSet_GetMinFeatureSize == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::GetMinFeatureSize."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBeamCount(instanceHandle, &nReturnCount); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_GetMinFeatureSize(instanceHandle, &dReturnMinFeatureSize); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + args.GetReturnValue().Set(Number::New(isolate, dReturnMinFeatureSize)); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5303,25 +5812,23 @@ void CLib3MFBeamLattice::GetBeamCount(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::GetBeam(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::SetFallBackValue(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + if (!args[0]->IsNumber()) { + throw std::runtime_error("Expected double parameter 0 (FallBackValue)"); } - unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - sLib3MFBeam sReturnBeamInfo; + double dFallBackValue = (double) args[0]->NumberValue(isolate->GetCurrentContext()).ToChecked(); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBeam."); - if (wrapperTable->m_BeamLattice_GetBeam == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBeam."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetFallBackValue."); + if (wrapperTable->m_LevelSet_SetFallBackValue == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::SetFallBackValue."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBeam(instanceHandle, nIndex, &sReturnBeamInfo); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_SetFallBackValue(instanceHandle, dFallBackValue); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(convertLib3MFBeamToObject(isolate, sReturnBeamInfo)); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5329,25 +5836,21 @@ void CLib3MFBeamLattice::GetBeam(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::AddBeam(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::GetFallBackValue(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsObject()) { - throw std::runtime_error("Expected struct parameter 0 (BeamInfo)"); - } - sLib3MFBeam sBeamInfo = convertObjectToLib3MFBeam(isolate, args[0]); - unsigned int nReturnIndex = 0; + double dReturnFallBackValue = 0.0; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method AddBeam."); - if (wrapperTable->m_BeamLattice_AddBeam == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::AddBeam."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetFallBackValue."); + if (wrapperTable->m_LevelSet_GetFallBackValue == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::GetFallBackValue."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_AddBeam(instanceHandle, &sBeamInfo, &nReturnIndex); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_GetFallBackValue(instanceHandle, &dReturnFallBackValue); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnIndex)); + args.GetReturnValue().Set(Number::New(isolate, dReturnFallBackValue)); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5355,26 +5858,22 @@ void CLib3MFBeamLattice::AddBeam(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::SetBeam(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::SetMeshBBoxOnly(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (Index)"); - } - if (!args[1]->IsObject()) { - throw std::runtime_error("Expected struct parameter 1 (BeamInfo)"); + if (!args[0]->IsBoolean()) { + throw std::runtime_error("Expected bool parameter 0 (MeshBBoxOnly)"); } - unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - sLib3MFBeam sBeamInfo = convertObjectToLib3MFBeam(isolate, args[1]); + bool bMeshBBoxOnly = args[0]->BooleanValue(isolate->GetCurrentContext()).ToChecked(); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBeam."); - if (wrapperTable->m_BeamLattice_SetBeam == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetBeam."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetMeshBBoxOnly."); + if (wrapperTable->m_LevelSet_SetMeshBBoxOnly == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::SetMeshBBoxOnly."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetBeam(instanceHandle, nIndex, &sBeamInfo); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_SetMeshBBoxOnly(instanceHandle, bMeshBBoxOnly); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -5383,19 +5882,21 @@ void CLib3MFBeamLattice::SetBeam(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::SetBeams(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::GetMeshBBoxOnly(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { + bool bReturnMeshBBoxOnly = false; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBeams."); - if (wrapperTable->m_BeamLattice_SetBeams == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetBeams."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetMeshBBoxOnly."); + if (wrapperTable->m_LevelSet_GetMeshBBoxOnly == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::GetMeshBBoxOnly."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetBeams(instanceHandle, 0, nullptr); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_GetMeshBBoxOnly(instanceHandle, &bReturnMeshBBoxOnly); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Boolean::New(isolate, bReturnMeshBBoxOnly)); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5403,18 +5904,26 @@ void CLib3MFBeamLattice::SetBeams(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::GetBeams(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::SetMesh(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (TheMesh)"); + } + Local objTheMesh = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFMeshObject * instanceTheMesh = ObjectWrap::Unwrap(objTheMesh); + if (instanceTheMesh == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (TheMesh)"); + Lib3MFHandle hTheMesh = instanceTheMesh->getHandle( objTheMesh ); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBeams."); - if (wrapperTable->m_BeamLattice_GetBeams == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBeams."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetMesh."); + if (wrapperTable->m_LevelSet_SetMesh == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::SetMesh."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBeams(instanceHandle, 0, nullptr, nullptr); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_SetMesh(instanceHandle, hTheMesh); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -5423,21 +5932,22 @@ void CLib3MFBeamLattice::GetBeams(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::GetBallCount(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::GetMesh(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + Lib3MFHandle hReturnTheMesh = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBallCount."); - if (wrapperTable->m_BeamLattice_GetBallCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBallCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetMesh."); + if (wrapperTable->m_LevelSet_GetMesh == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::GetMesh."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBallCount(instanceHandle, &nReturnCount); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_GetMesh(instanceHandle, &hReturnTheMesh); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + Local instanceObjTheMesh = CLib3MFMeshObject::NewInstance(args.Holder(), hReturnTheMesh); + args.GetReturnValue().Set(instanceObjTheMesh); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5445,25 +5955,22 @@ void CLib3MFBeamLattice::GetBallCount(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::GetBall(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::GetVolumeData(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (Index)"); - } - unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - sLib3MFBall sReturnBallInfo; + Lib3MFHandle hReturnTheVolumeData = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBall."); - if (wrapperTable->m_BeamLattice_GetBall == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBall."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetVolumeData."); + if (wrapperTable->m_LevelSet_GetVolumeData == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::GetVolumeData."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBall(instanceHandle, nIndex, &sReturnBallInfo); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_GetVolumeData(instanceHandle, &hReturnTheVolumeData); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(convertLib3MFBallToObject(isolate, sReturnBallInfo)); + Local instanceObjTheVolumeData = CLib3MFVolumeData::NewInstance(args.Holder(), hReturnTheVolumeData); + args.GetReturnValue().Set(instanceObjTheVolumeData); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5471,115 +5978,9580 @@ void CLib3MFBeamLattice::GetBall(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::AddBall(const FunctionCallbackInfo& args) +void CLib3MFLevelSet::SetVolumeData(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { if (!args[0]->IsObject()) { - throw std::runtime_error("Expected struct parameter 0 (BallInfo)"); + throw std::runtime_error("Expected class parameter 0 (TheVolumeData)"); } - sLib3MFBall sBallInfo = convertObjectToLib3MFBall(isolate, args[0]); - unsigned int nReturnIndex = 0; + Local objTheVolumeData = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFVolumeData * instanceTheVolumeData = ObjectWrap::Unwrap(objTheVolumeData); + if (instanceTheVolumeData == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (TheVolumeData)"); + Lib3MFHandle hTheVolumeData = instanceTheVolumeData->getHandle( objTheVolumeData ); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method AddBall."); - if (wrapperTable->m_BeamLattice_AddBall == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::AddBall."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetVolumeData."); + if (wrapperTable->m_LevelSet_SetVolumeData == nullptr) + throw std::runtime_error("Could not call Lib3MF method LevelSet::SetVolumeData."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_AddBall(instanceHandle, &sBallInfo, &nReturnIndex); + Lib3MFResult errorCode = wrapperTable->m_LevelSet_SetVolumeData(instanceHandle, hTheVolumeData); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnIndex)); } catch (std::exception & E) { RaiseError(isolate, E.what()); } } - -void CLib3MFBeamLattice::SetBall(const FunctionCallbackInfo& args) +/************************************************************************************************************************* + Class CLib3MFBeamLattice Implementation +**************************************************************************************************************************/ + +CLib3MFBeamLattice::CLib3MFBeamLattice() + : CLib3MFBaseClass() +{ +} + +CLib3MFBeamLattice::~CLib3MFBeamLattice() +{ +} + +void CLib3MFBeamLattice::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFBeamLattice")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetMinLength", GetMinLength); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetMinLength", SetMinLength); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetClipping", GetClipping); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetClipping", SetClipping); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetRepresentation", GetRepresentation); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetRepresentation", SetRepresentation); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBallOptions", GetBallOptions); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetBallOptions", SetBallOptions); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBeamCount", GetBeamCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBeam", GetBeam); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddBeam", AddBeam); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetBeam", SetBeam); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetBeams", SetBeams); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBeams", GetBeams); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBallCount", GetBallCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBall", GetBall); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddBall", AddBall); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetBall", SetBall); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetBalls", SetBalls); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBalls", GetBalls); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBeamSetCount", GetBeamSetCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddBeamSet", AddBeamSet); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBeamSet", GetBeamSet); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFBeamLattice::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFBeamLattice * beamlatticeInstance = new CLib3MFBeamLattice(); + beamlatticeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFBeamLattice: Invalid call to Constructor"); + } +} + +Local CLib3MFBeamLattice::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFBeamLattice::GetMinLength(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + double dReturnMinLength = 0.0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetMinLength."); + if (wrapperTable->m_BeamLattice_GetMinLength == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetMinLength."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetMinLength(instanceHandle, &dReturnMinLength); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Number::New(isolate, dReturnMinLength)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::SetMinLength(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsNumber()) { + throw std::runtime_error("Expected double parameter 0 (MinLength)"); + } + double dMinLength = (double) args[0]->NumberValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetMinLength."); + if (wrapperTable->m_BeamLattice_SetMinLength == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetMinLength."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetMinLength(instanceHandle, dMinLength); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::GetClipping(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Local outObject = Object::New(isolate); + eLib3MFBeamLatticeClipMode eReturnClipMode; + unsigned int nReturnUniqueResourceID = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetClipping."); + if (wrapperTable->m_BeamLattice_GetClipping == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetClipping."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetClipping(instanceHandle, &eReturnClipMode, &nReturnUniqueResourceID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "ClipMode"), Integer::New(isolate, (int)eReturnClipMode)); + outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "UniqueResourceID"), Integer::NewFromUnsigned(isolate, nReturnUniqueResourceID)); + args.GetReturnValue().Set(outObject); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::SetClipping(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + throw std::runtime_error("Expected enum parameter 0 (ClipMode)"); } - if (!args[1]->IsObject()) { - throw std::runtime_error("Expected struct parameter 1 (BallInfo)"); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 1 (UniqueResourceID)"); } - unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - sLib3MFBall sBallInfo = convertObjectToLib3MFBall(isolate, args[1]); + unsigned int eClipMode = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + unsigned int nUniqueResourceID = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBall."); - if (wrapperTable->m_BeamLattice_SetBall == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetBall."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetClipping."); + if (wrapperTable->m_BeamLattice_SetClipping == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetClipping."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetBall(instanceHandle, nIndex, &sBallInfo); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetClipping(instanceHandle, (eLib3MFBeamLatticeClipMode) eClipMode, nUniqueResourceID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::GetRepresentation(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Local outObject = Object::New(isolate); + bool bReturnHasRepresentation = false; + unsigned int nReturnUniqueResourceID = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetRepresentation."); + if (wrapperTable->m_BeamLattice_GetRepresentation == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetRepresentation."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetRepresentation(instanceHandle, &bReturnHasRepresentation, &nReturnUniqueResourceID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "HasRepresentation"), Boolean::New(isolate, bReturnHasRepresentation)); + outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "UniqueResourceID"), Integer::NewFromUnsigned(isolate, nReturnUniqueResourceID)); + args.GetReturnValue().Set(outObject); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::SetRepresentation(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (UniqueResourceID)"); + } + unsigned int nUniqueResourceID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetRepresentation."); + if (wrapperTable->m_BeamLattice_SetRepresentation == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetRepresentation."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetRepresentation(instanceHandle, nUniqueResourceID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::GetBallOptions(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Local outObject = Object::New(isolate); + eLib3MFBeamLatticeBallMode eReturnBallMode; + double dReturnBallRadius = 0.0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBallOptions."); + if (wrapperTable->m_BeamLattice_GetBallOptions == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBallOptions."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBallOptions(instanceHandle, &eReturnBallMode, &dReturnBallRadius); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "BallMode"), Integer::New(isolate, (int)eReturnBallMode)); + outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "BallRadius"), Number::New(isolate, dReturnBallRadius)); + args.GetReturnValue().Set(outObject); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::SetBallOptions(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 0 (BallMode)"); + } + if (!args[1]->IsNumber()) { + throw std::runtime_error("Expected double parameter 1 (BallRadius)"); + } + unsigned int eBallMode = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + double dBallRadius = (double) args[1]->NumberValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBallOptions."); + if (wrapperTable->m_BeamLattice_SetBallOptions == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetBallOptions."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetBallOptions(instanceHandle, (eLib3MFBeamLatticeBallMode) eBallMode, dBallRadius); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::GetBeamCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBeamCount."); + if (wrapperTable->m_BeamLattice_GetBeamCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBeamCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBeamCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::GetBeam(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFBeam sReturnBeamInfo; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBeam."); + if (wrapperTable->m_BeamLattice_GetBeam == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBeam."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBeam(instanceHandle, nIndex, &sReturnBeamInfo); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(convertLib3MFBeamToObject(isolate, sReturnBeamInfo)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::AddBeam(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected struct parameter 0 (BeamInfo)"); + } + sLib3MFBeam sBeamInfo = convertObjectToLib3MFBeam(isolate, args[0]); + unsigned int nReturnIndex = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddBeam."); + if (wrapperTable->m_BeamLattice_AddBeam == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::AddBeam."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_AddBeam(instanceHandle, &sBeamInfo, &nReturnIndex); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnIndex)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::SetBeam(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + if (!args[1]->IsObject()) { + throw std::runtime_error("Expected struct parameter 1 (BeamInfo)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFBeam sBeamInfo = convertObjectToLib3MFBeam(isolate, args[1]); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBeam."); + if (wrapperTable->m_BeamLattice_SetBeam == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetBeam."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetBeam(instanceHandle, nIndex, &sBeamInfo); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::SetBeams(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBeams."); + if (wrapperTable->m_BeamLattice_SetBeams == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetBeams."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetBeams(instanceHandle, 0, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::GetBeams(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBeams."); + if (wrapperTable->m_BeamLattice_GetBeams == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBeams."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBeams(instanceHandle, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::GetBallCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBallCount."); + if (wrapperTable->m_BeamLattice_GetBallCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBallCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBallCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::GetBall(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFBall sReturnBallInfo; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBall."); + if (wrapperTable->m_BeamLattice_GetBall == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBall."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBall(instanceHandle, nIndex, &sReturnBallInfo); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(convertLib3MFBallToObject(isolate, sReturnBallInfo)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::AddBall(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected struct parameter 0 (BallInfo)"); + } + sLib3MFBall sBallInfo = convertObjectToLib3MFBall(isolate, args[0]); + unsigned int nReturnIndex = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddBall."); + if (wrapperTable->m_BeamLattice_AddBall == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::AddBall."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_AddBall(instanceHandle, &sBallInfo, &nReturnIndex); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnIndex)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::SetBall(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + if (!args[1]->IsObject()) { + throw std::runtime_error("Expected struct parameter 1 (BallInfo)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFBall sBallInfo = convertObjectToLib3MFBall(isolate, args[1]); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBall."); + if (wrapperTable->m_BeamLattice_SetBall == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetBall."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetBall(instanceHandle, nIndex, &sBallInfo); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::SetBalls(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBalls."); + if (wrapperTable->m_BeamLattice_SetBalls == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetBalls."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetBalls(instanceHandle, 0, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::GetBalls(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBalls."); + if (wrapperTable->m_BeamLattice_GetBalls == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBalls."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBalls(instanceHandle, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::GetBeamSetCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBeamSetCount."); + if (wrapperTable->m_BeamLattice_GetBeamSetCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBeamSetCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBeamSetCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::AddBeamSet(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnBeamSet = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddBeamSet."); + if (wrapperTable->m_BeamLattice_AddBeamSet == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::AddBeamSet."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_AddBeamSet(instanceHandle, &hReturnBeamSet); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjBeamSet = CLib3MFBeamSet::NewInstance(args.Holder(), hReturnBeamSet); + args.GetReturnValue().Set(instanceObjBeamSet); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamLattice::GetBeamSet(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Lib3MFHandle hReturnBeamSet = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBeamSet."); + if (wrapperTable->m_BeamLattice_GetBeamSet == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBeamSet."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBeamSet(instanceHandle, nIndex, &hReturnBeamSet); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjBeamSet = CLib3MFBeamSet::NewInstance(args.Holder(), hReturnBeamSet); + args.GetReturnValue().Set(instanceObjBeamSet); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFFunctionReference Implementation +**************************************************************************************************************************/ + +CLib3MFFunctionReference::CLib3MFFunctionReference() + : CLib3MFBaseClass() +{ +} + +CLib3MFFunctionReference::~CLib3MFFunctionReference() +{ +} + +void CLib3MFFunctionReference::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFFunctionReference")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetFunctionResourceID", GetFunctionResourceID); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetFunctionResourceID", SetFunctionResourceID); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetTransform", GetTransform); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetTransform", SetTransform); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetChannelName", GetChannelName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetChannelName", SetChannelName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetMinFeatureSize", SetMinFeatureSize); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetMinFeatureSize", GetMinFeatureSize); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetFallBackValue", SetFallBackValue); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetFallBackValue", GetFallBackValue); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFFunctionReference::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFFunctionReference * functionreferenceInstance = new CLib3MFFunctionReference(); + functionreferenceInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFFunctionReference: Invalid call to Constructor"); + } +} + +Local CLib3MFFunctionReference::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFFunctionReference::GetFunctionResourceID(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnUniqueResourceID = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetFunctionResourceID."); + if (wrapperTable->m_FunctionReference_GetFunctionResourceID == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionReference::GetFunctionResourceID."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionReference_GetFunctionResourceID(instanceHandle, &nReturnUniqueResourceID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnUniqueResourceID)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionReference::SetFunctionResourceID(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (UniqueResourceID)"); + } + unsigned int nUniqueResourceID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetFunctionResourceID."); + if (wrapperTable->m_FunctionReference_SetFunctionResourceID == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionReference::SetFunctionResourceID."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionReference_SetFunctionResourceID(instanceHandle, nUniqueResourceID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionReference::GetTransform(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFTransform sReturnTransform; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTransform."); + if (wrapperTable->m_FunctionReference_GetTransform == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionReference::GetTransform."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionReference_GetTransform(instanceHandle, &sReturnTransform); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(convertLib3MFTransformToObject(isolate, sReturnTransform)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionReference::SetTransform(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected struct parameter 0 (Transform)"); + } + sLib3MFTransform sTransform = convertObjectToLib3MFTransform(isolate, args[0]); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetTransform."); + if (wrapperTable->m_FunctionReference_SetTransform == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionReference::SetTransform."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionReference_SetTransform(instanceHandle, &sTransform); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionReference::GetChannelName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededChannelName = 0; + unsigned int bytesWrittenChannelName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetChannelName."); + if (wrapperTable->m_FunctionReference_GetChannelName == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionReference::GetChannelName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_FunctionReference_GetChannelName(instanceHandle, 0, &bytesNeededChannelName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferChannelName; + bufferChannelName.resize(bytesNeededChannelName); + Lib3MFResult errorCode = wrapperTable->m_FunctionReference_GetChannelName(instanceHandle, bytesNeededChannelName, &bytesWrittenChannelName, &bufferChannelName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferChannelName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionReference::SetChannelName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (ChannelName)"); + } + v8::String::Utf8Value sutf8ChannelName(isolate, args[0]); + std::string sChannelName = *sutf8ChannelName; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetChannelName."); + if (wrapperTable->m_FunctionReference_SetChannelName == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionReference::SetChannelName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionReference_SetChannelName(instanceHandle, sChannelName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionReference::SetMinFeatureSize(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsNumber()) { + throw std::runtime_error("Expected double parameter 0 (MinFeatureSize)"); + } + double dMinFeatureSize = (double) args[0]->NumberValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetMinFeatureSize."); + if (wrapperTable->m_FunctionReference_SetMinFeatureSize == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionReference::SetMinFeatureSize."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionReference_SetMinFeatureSize(instanceHandle, dMinFeatureSize); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionReference::GetMinFeatureSize(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + double dReturnMinFeatureSize = 0.0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetMinFeatureSize."); + if (wrapperTable->m_FunctionReference_GetMinFeatureSize == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionReference::GetMinFeatureSize."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionReference_GetMinFeatureSize(instanceHandle, &dReturnMinFeatureSize); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Number::New(isolate, dReturnMinFeatureSize)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionReference::SetFallBackValue(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsNumber()) { + throw std::runtime_error("Expected double parameter 0 (FallBackValue)"); + } + double dFallBackValue = (double) args[0]->NumberValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetFallBackValue."); + if (wrapperTable->m_FunctionReference_SetFallBackValue == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionReference::SetFallBackValue."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionReference_SetFallBackValue(instanceHandle, dFallBackValue); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionReference::GetFallBackValue(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + double dReturnFallBackValue = 0.0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetFallBackValue."); + if (wrapperTable->m_FunctionReference_GetFallBackValue == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionReference::GetFallBackValue."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionReference_GetFallBackValue(instanceHandle, &dReturnFallBackValue); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Number::New(isolate, dReturnFallBackValue)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFVolumeDataColor Implementation +**************************************************************************************************************************/ + +CLib3MFVolumeDataColor::CLib3MFVolumeDataColor() + : CLib3MFBaseClass() +{ +} + +CLib3MFVolumeDataColor::~CLib3MFVolumeDataColor() +{ +} + +void CLib3MFVolumeDataColor::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFVolumeDataColor")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFVolumeDataColor::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFVolumeDataColor * volumedatacolorInstance = new CLib3MFVolumeDataColor(); + volumedatacolorInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFVolumeDataColor: Invalid call to Constructor"); + } +} + +Local CLib3MFVolumeDataColor::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFMaterialMapping Implementation +**************************************************************************************************************************/ + +CLib3MFMaterialMapping::CLib3MFMaterialMapping() + : CLib3MFBaseClass() +{ +} + +CLib3MFMaterialMapping::~CLib3MFMaterialMapping() +{ +} + +void CLib3MFMaterialMapping::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMaterialMapping")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFMaterialMapping::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFMaterialMapping * materialmappingInstance = new CLib3MFMaterialMapping(); + materialmappingInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFMaterialMapping: Invalid call to Constructor"); + } +} + +Local CLib3MFMaterialMapping::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFVolumeDataComposite Implementation +**************************************************************************************************************************/ + +CLib3MFVolumeDataComposite::CLib3MFVolumeDataComposite() + : CLib3MFBaseClass() +{ +} + +CLib3MFVolumeDataComposite::~CLib3MFVolumeDataComposite() +{ +} + +void CLib3MFVolumeDataComposite::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFVolumeDataComposite")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBaseMaterialGroup", GetBaseMaterialGroup); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetBaseMaterialGroup", SetBaseMaterialGroup); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetMaterialMappingCount", GetMaterialMappingCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetMaterialMapping", GetMaterialMapping); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddMaterialMapping", AddMaterialMapping); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveMaterialMapping", RemoveMaterialMapping); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFVolumeDataComposite::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFVolumeDataComposite * volumedatacompositeInstance = new CLib3MFVolumeDataComposite(); + volumedatacompositeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFVolumeDataComposite: Invalid call to Constructor"); + } +} + +Local CLib3MFVolumeDataComposite::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFVolumeDataComposite::GetBaseMaterialGroup(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnBaseMaterialGroupInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBaseMaterialGroup."); + if (wrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeDataComposite::GetBaseMaterialGroup."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeDataComposite_GetBaseMaterialGroup(instanceHandle, &hReturnBaseMaterialGroupInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjBaseMaterialGroupInstance = CLib3MFBaseMaterialGroup::NewInstance(args.Holder(), hReturnBaseMaterialGroupInstance); + args.GetReturnValue().Set(instanceObjBaseMaterialGroupInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeDataComposite::SetBaseMaterialGroup(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (BaseMaterialGroupInstance)"); + } + Local objBaseMaterialGroupInstance = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFBaseMaterialGroup * instanceBaseMaterialGroupInstance = ObjectWrap::Unwrap(objBaseMaterialGroupInstance); + if (instanceBaseMaterialGroupInstance == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (BaseMaterialGroupInstance)"); + Lib3MFHandle hBaseMaterialGroupInstance = instanceBaseMaterialGroupInstance->getHandle( objBaseMaterialGroupInstance ); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBaseMaterialGroup."); + if (wrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeDataComposite::SetBaseMaterialGroup."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeDataComposite_SetBaseMaterialGroup(instanceHandle, hBaseMaterialGroupInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeDataComposite::GetMaterialMappingCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetMaterialMappingCount."); + if (wrapperTable->m_VolumeDataComposite_GetMaterialMappingCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeDataComposite::GetMaterialMappingCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeDataComposite_GetMaterialMappingCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeDataComposite::GetMaterialMapping(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Lib3MFHandle hReturnTheMaterialMapping = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetMaterialMapping."); + if (wrapperTable->m_VolumeDataComposite_GetMaterialMapping == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeDataComposite::GetMaterialMapping."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeDataComposite_GetMaterialMapping(instanceHandle, nIndex, &hReturnTheMaterialMapping); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjTheMaterialMapping = CLib3MFMaterialMapping::NewInstance(args.Holder(), hReturnTheMaterialMapping); + args.GetReturnValue().Set(instanceObjTheMaterialMapping); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeDataComposite::AddMaterialMapping(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected struct parameter 0 (Transform)"); + } + sLib3MFTransform sTransform = convertObjectToLib3MFTransform(isolate, args[0]); + Lib3MFHandle hReturnTheMaterialMapping = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMaterialMapping."); + if (wrapperTable->m_VolumeDataComposite_AddMaterialMapping == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeDataComposite::AddMaterialMapping."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeDataComposite_AddMaterialMapping(instanceHandle, &sTransform, &hReturnTheMaterialMapping); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjTheMaterialMapping = CLib3MFMaterialMapping::NewInstance(args.Holder(), hReturnTheMaterialMapping); + args.GetReturnValue().Set(instanceObjTheMaterialMapping); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeDataComposite::RemoveMaterialMapping(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveMaterialMapping."); + if (wrapperTable->m_VolumeDataComposite_RemoveMaterialMapping == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeDataComposite::RemoveMaterialMapping."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeDataComposite_RemoveMaterialMapping(instanceHandle, nIndex); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFVolumeDataProperty Implementation +**************************************************************************************************************************/ + +CLib3MFVolumeDataProperty::CLib3MFVolumeDataProperty() + : CLib3MFBaseClass() +{ +} + +CLib3MFVolumeDataProperty::~CLib3MFVolumeDataProperty() +{ +} + +void CLib3MFVolumeDataProperty::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFVolumeDataProperty")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetName", GetName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetIsRequired", SetIsRequired); + NODE_SET_PROTOTYPE_METHOD(tpl, "IsRequired", IsRequired); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFVolumeDataProperty::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFVolumeDataProperty * volumedatapropertyInstance = new CLib3MFVolumeDataProperty(); + volumedatapropertyInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFVolumeDataProperty: Invalid call to Constructor"); + } +} + +Local CLib3MFVolumeDataProperty::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFVolumeDataProperty::GetName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededPropertyName = 0; + unsigned int bytesWrittenPropertyName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetName."); + if (wrapperTable->m_VolumeDataProperty_GetName == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeDataProperty::GetName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_VolumeDataProperty_GetName(instanceHandle, 0, &bytesNeededPropertyName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferPropertyName; + bufferPropertyName.resize(bytesNeededPropertyName); + Lib3MFResult errorCode = wrapperTable->m_VolumeDataProperty_GetName(instanceHandle, bytesNeededPropertyName, &bytesWrittenPropertyName, &bufferPropertyName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferPropertyName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeDataProperty::SetIsRequired(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsBoolean()) { + throw std::runtime_error("Expected bool parameter 0 (IsRequired)"); + } + bool bIsRequired = args[0]->BooleanValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetIsRequired."); + if (wrapperTable->m_VolumeDataProperty_SetIsRequired == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeDataProperty::SetIsRequired."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeDataProperty_SetIsRequired(instanceHandle, bIsRequired); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeDataProperty::IsRequired(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + bool bReturnIsRequired = false; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method IsRequired."); + if (wrapperTable->m_VolumeDataProperty_IsRequired == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeDataProperty::IsRequired."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeDataProperty_IsRequired(instanceHandle, &bReturnIsRequired); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Boolean::New(isolate, bReturnIsRequired)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFVolumeData Implementation +**************************************************************************************************************************/ + +CLib3MFVolumeData::CLib3MFVolumeData() + : CLib3MFBaseClass() +{ +} + +CLib3MFVolumeData::~CLib3MFVolumeData() +{ +} + +void CLib3MFVolumeData::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFVolumeData")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetComposite", GetComposite); + NODE_SET_PROTOTYPE_METHOD(tpl, "CreateNewComposite", CreateNewComposite); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveComposite", RemoveComposite); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetColor", GetColor); + NODE_SET_PROTOTYPE_METHOD(tpl, "CreateNewColor", CreateNewColor); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveColor", RemoveColor); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetPropertyCount", GetPropertyCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetProperty", GetProperty); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddPropertyFromFunction", AddPropertyFromFunction); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveProperty", RemoveProperty); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFVolumeData::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFVolumeData * volumedataInstance = new CLib3MFVolumeData(); + volumedataInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFVolumeData: Invalid call to Constructor"); + } +} + +Local CLib3MFVolumeData::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFVolumeData::GetComposite(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnTheCompositeData = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetComposite."); + if (wrapperTable->m_VolumeData_GetComposite == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeData::GetComposite."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeData_GetComposite(instanceHandle, &hReturnTheCompositeData); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjTheCompositeData = CLib3MFVolumeDataComposite::NewInstance(args.Holder(), hReturnTheCompositeData); + args.GetReturnValue().Set(instanceObjTheCompositeData); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeData::CreateNewComposite(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnTheCompositeData = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method CreateNewComposite."); + if (wrapperTable->m_VolumeData_CreateNewComposite == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeData::CreateNewComposite."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeData_CreateNewComposite(instanceHandle, &hReturnTheCompositeData); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjTheCompositeData = CLib3MFVolumeDataComposite::NewInstance(args.Holder(), hReturnTheCompositeData); + args.GetReturnValue().Set(instanceObjTheCompositeData); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeData::RemoveComposite(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveComposite."); + if (wrapperTable->m_VolumeData_RemoveComposite == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeData::RemoveComposite."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeData_RemoveComposite(instanceHandle); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeData::GetColor(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnTheColorData = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetColor."); + if (wrapperTable->m_VolumeData_GetColor == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeData::GetColor."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeData_GetColor(instanceHandle, &hReturnTheColorData); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjTheColorData = CLib3MFVolumeDataColor::NewInstance(args.Holder(), hReturnTheColorData); + args.GetReturnValue().Set(instanceObjTheColorData); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeData::CreateNewColor(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (TheFunction)"); + } + Local objTheFunction = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFFunction * instanceTheFunction = ObjectWrap::Unwrap(objTheFunction); + if (instanceTheFunction == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (TheFunction)"); + Lib3MFHandle hTheFunction = instanceTheFunction->getHandle( objTheFunction ); + Lib3MFHandle hReturnTheColorData = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method CreateNewColor."); + if (wrapperTable->m_VolumeData_CreateNewColor == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeData::CreateNewColor."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeData_CreateNewColor(instanceHandle, hTheFunction, &hReturnTheColorData); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjTheColorData = CLib3MFVolumeDataColor::NewInstance(args.Holder(), hReturnTheColorData); + args.GetReturnValue().Set(instanceObjTheColorData); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeData::RemoveColor(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveColor."); + if (wrapperTable->m_VolumeData_RemoveColor == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeData::RemoveColor."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeData_RemoveColor(instanceHandle); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeData::GetPropertyCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetPropertyCount."); + if (wrapperTable->m_VolumeData_GetPropertyCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeData::GetPropertyCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeData_GetPropertyCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeData::GetProperty(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Lib3MFHandle hReturnTheVolumeDataProperty = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetProperty."); + if (wrapperTable->m_VolumeData_GetProperty == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeData::GetProperty."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeData_GetProperty(instanceHandle, nIndex, &hReturnTheVolumeDataProperty); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjTheVolumeDataProperty = CLib3MFVolumeDataProperty::NewInstance(args.Holder(), hReturnTheVolumeDataProperty); + args.GetReturnValue().Set(instanceObjTheVolumeDataProperty); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeData::AddPropertyFromFunction(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Name)"); + } + if (!args[1]->IsObject()) { + throw std::runtime_error("Expected class parameter 1 (TheFunction)"); + } + v8::String::Utf8Value sutf8Name(isolate, args[0]); + std::string sName = *sutf8Name; + Local objTheFunction = args[1]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFFunction * instanceTheFunction = ObjectWrap::Unwrap(objTheFunction); + if (instanceTheFunction == nullptr) + throw std::runtime_error("Invalid Object parameter 1 (TheFunction)"); + Lib3MFHandle hTheFunction = instanceTheFunction->getHandle( objTheFunction ); + Lib3MFHandle hReturnTheVolumeDataProperty = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddPropertyFromFunction."); + if (wrapperTable->m_VolumeData_AddPropertyFromFunction == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeData::AddPropertyFromFunction."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeData_AddPropertyFromFunction(instanceHandle, sName.c_str(), hTheFunction, &hReturnTheVolumeDataProperty); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjTheVolumeDataProperty = CLib3MFVolumeDataProperty::NewInstance(args.Holder(), hReturnTheVolumeDataProperty); + args.GetReturnValue().Set(instanceObjTheVolumeDataProperty); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFVolumeData::RemoveProperty(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveProperty."); + if (wrapperTable->m_VolumeData_RemoveProperty == nullptr) + throw std::runtime_error("Could not call Lib3MF method VolumeData::RemoveProperty."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_VolumeData_RemoveProperty(instanceHandle, nIndex); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFComponent Implementation +**************************************************************************************************************************/ + +CLib3MFComponent::CLib3MFComponent() + : CLib3MFBaseClass() +{ +} + +CLib3MFComponent::~CLib3MFComponent() +{ +} + +void CLib3MFComponent::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFComponent")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetObjectResource", GetObjectResource); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetObjectResourceID", GetObjectResourceID); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetUUID", GetUUID); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetUUID", SetUUID); + NODE_SET_PROTOTYPE_METHOD(tpl, "HasTransform", HasTransform); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetTransform", GetTransform); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetTransform", SetTransform); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFComponent::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFComponent * componentInstance = new CLib3MFComponent(); + componentInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFComponent: Invalid call to Constructor"); + } +} + +Local CLib3MFComponent::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFComponent::GetObjectResource(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnObjectResource = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetObjectResource."); + if (wrapperTable->m_Component_GetObjectResource == nullptr) + throw std::runtime_error("Could not call Lib3MF method Component::GetObjectResource."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Component_GetObjectResource(instanceHandle, &hReturnObjectResource); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjObjectResource = CLib3MFObject::NewInstance(args.Holder(), hReturnObjectResource); + args.GetReturnValue().Set(instanceObjObjectResource); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComponent::GetObjectResourceID(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnUniqueResourceID = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetObjectResourceID."); + if (wrapperTable->m_Component_GetObjectResourceID == nullptr) + throw std::runtime_error("Could not call Lib3MF method Component::GetObjectResourceID."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Component_GetObjectResourceID(instanceHandle, &nReturnUniqueResourceID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnUniqueResourceID)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComponent::GetUUID(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Local outObject = Object::New(isolate); + bool bReturnHasUUID = false; + unsigned int bytesNeededUUID = 0; + unsigned int bytesWrittenUUID = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetUUID."); + if (wrapperTable->m_Component_GetUUID == nullptr) + throw std::runtime_error("Could not call Lib3MF method Component::GetUUID."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_Component_GetUUID(instanceHandle, &bReturnHasUUID, 0, &bytesNeededUUID, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferUUID; + bufferUUID.resize(bytesNeededUUID); + Lib3MFResult errorCode = wrapperTable->m_Component_GetUUID(instanceHandle, &bReturnHasUUID, bytesNeededUUID, &bytesWrittenUUID, &bufferUUID[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "HasUUID"), Boolean::New(isolate, bReturnHasUUID)); + outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "UUID"), String::NewFromUtf8(isolate, &bufferUUID[0])); + args.GetReturnValue().Set(outObject); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComponent::SetUUID(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (UUID)"); + } + v8::String::Utf8Value sutf8UUID(isolate, args[0]); + std::string sUUID = *sutf8UUID; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetUUID."); + if (wrapperTable->m_Component_SetUUID == nullptr) + throw std::runtime_error("Could not call Lib3MF method Component::SetUUID."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Component_SetUUID(instanceHandle, sUUID.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComponent::HasTransform(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + bool bReturnHasTransform = false; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method HasTransform."); + if (wrapperTable->m_Component_HasTransform == nullptr) + throw std::runtime_error("Could not call Lib3MF method Component::HasTransform."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Component_HasTransform(instanceHandle, &bReturnHasTransform); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Boolean::New(isolate, bReturnHasTransform)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComponent::GetTransform(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFTransform sReturnTransform; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTransform."); + if (wrapperTable->m_Component_GetTransform == nullptr) + throw std::runtime_error("Could not call Lib3MF method Component::GetTransform."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Component_GetTransform(instanceHandle, &sReturnTransform); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(convertLib3MFTransformToObject(isolate, sReturnTransform)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComponent::SetTransform(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected struct parameter 0 (Transform)"); + } + sLib3MFTransform sTransform = convertObjectToLib3MFTransform(isolate, args[0]); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetTransform."); + if (wrapperTable->m_Component_SetTransform == nullptr) + throw std::runtime_error("Could not call Lib3MF method Component::SetTransform."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Component_SetTransform(instanceHandle, &sTransform); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFComponentsObject Implementation +**************************************************************************************************************************/ + +CLib3MFComponentsObject::CLib3MFComponentsObject() + : CLib3MFBaseClass() +{ +} + +CLib3MFComponentsObject::~CLib3MFComponentsObject() +{ +} + +void CLib3MFComponentsObject::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFComponentsObject")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "AddComponent", AddComponent); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetComponent", GetComponent); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetComponentCount", GetComponentCount); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFComponentsObject::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFComponentsObject * componentsobjectInstance = new CLib3MFComponentsObject(); + componentsobjectInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFComponentsObject: Invalid call to Constructor"); + } +} + +Local CLib3MFComponentsObject::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFComponentsObject::AddComponent(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (ObjectResource)"); + } + if (!args[1]->IsObject()) { + throw std::runtime_error("Expected struct parameter 1 (Transform)"); + } + Local objObjectResource = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFObject * instanceObjectResource = ObjectWrap::Unwrap(objObjectResource); + if (instanceObjectResource == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (ObjectResource)"); + Lib3MFHandle hObjectResource = instanceObjectResource->getHandle( objObjectResource ); + sLib3MFTransform sTransform = convertObjectToLib3MFTransform(isolate, args[1]); + Lib3MFHandle hReturnComponentInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddComponent."); + if (wrapperTable->m_ComponentsObject_AddComponent == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComponentsObject::AddComponent."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComponentsObject_AddComponent(instanceHandle, hObjectResource, &sTransform, &hReturnComponentInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjComponentInstance = CLib3MFComponent::NewInstance(args.Holder(), hReturnComponentInstance); + args.GetReturnValue().Set(instanceObjComponentInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComponentsObject::GetComponent(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Lib3MFHandle hReturnComponentInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetComponent."); + if (wrapperTable->m_ComponentsObject_GetComponent == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComponentsObject::GetComponent."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComponentsObject_GetComponent(instanceHandle, nIndex, &hReturnComponentInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjComponentInstance = CLib3MFComponent::NewInstance(args.Holder(), hReturnComponentInstance); + args.GetReturnValue().Set(instanceObjComponentInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComponentsObject::GetComponentCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetComponentCount."); + if (wrapperTable->m_ComponentsObject_GetComponentCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComponentsObject::GetComponentCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComponentsObject_GetComponentCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFBeamSet Implementation +**************************************************************************************************************************/ + +CLib3MFBeamSet::CLib3MFBeamSet() + : CLib3MFBaseClass() +{ +} + +CLib3MFBeamSet::~CLib3MFBeamSet() +{ +} + +void CLib3MFBeamSet::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFBeamSet")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "SetName", SetName); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetName", GetName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetIdentifier", SetIdentifier); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetIdentifier", GetIdentifier); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetReferenceCount", GetReferenceCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetReferences", SetReferences); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetReferences", GetReferences); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBallReferenceCount", GetBallReferenceCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetBallReferences", SetBallReferences); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBallReferences", GetBallReferences); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFBeamSet::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFBeamSet * beamsetInstance = new CLib3MFBeamSet(); + beamsetInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFBeamSet: Invalid call to Constructor"); + } +} + +Local CLib3MFBeamSet::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFBeamSet::SetName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Name)"); + } + v8::String::Utf8Value sutf8Name(isolate, args[0]); + std::string sName = *sutf8Name; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetName."); + if (wrapperTable->m_BeamSet_SetName == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamSet::SetName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamSet_SetName(instanceHandle, sName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamSet::GetName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededName = 0; + unsigned int bytesWrittenName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetName."); + if (wrapperTable->m_BeamSet_GetName == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamSet::GetName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_BeamSet_GetName(instanceHandle, 0, &bytesNeededName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferName; + bufferName.resize(bytesNeededName); + Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetName(instanceHandle, bytesNeededName, &bytesWrittenName, &bufferName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamSet::SetIdentifier(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetIdentifier."); + if (wrapperTable->m_BeamSet_SetIdentifier == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamSet::SetIdentifier."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamSet_SetIdentifier(instanceHandle, sIdentifier.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamSet::GetIdentifier(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededIdentifier = 0; + unsigned int bytesWrittenIdentifier = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetIdentifier."); + if (wrapperTable->m_BeamSet_GetIdentifier == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamSet::GetIdentifier."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_BeamSet_GetIdentifier(instanceHandle, 0, &bytesNeededIdentifier, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferIdentifier; + bufferIdentifier.resize(bytesNeededIdentifier); + Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetIdentifier(instanceHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferIdentifier[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamSet::GetReferenceCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetReferenceCount."); + if (wrapperTable->m_BeamSet_GetReferenceCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamSet::GetReferenceCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetReferenceCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamSet::SetReferences(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetReferences."); + if (wrapperTable->m_BeamSet_SetReferences == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamSet::SetReferences."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamSet_SetReferences(instanceHandle, 0, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamSet::GetReferences(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetReferences."); + if (wrapperTable->m_BeamSet_GetReferences == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamSet::GetReferences."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetReferences(instanceHandle, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamSet::GetBallReferenceCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBallReferenceCount."); + if (wrapperTable->m_BeamSet_GetBallReferenceCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamSet::GetBallReferenceCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetBallReferenceCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamSet::SetBallReferences(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBallReferences."); + if (wrapperTable->m_BeamSet_SetBallReferences == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamSet::SetBallReferences."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamSet_SetBallReferences(instanceHandle, 0, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBeamSet::GetBallReferences(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBallReferences."); + if (wrapperTable->m_BeamSet_GetBallReferences == nullptr) + throw std::runtime_error("Could not call Lib3MF method BeamSet::GetBallReferences."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetBallReferences(instanceHandle, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFBaseMaterialGroup Implementation +**************************************************************************************************************************/ + +CLib3MFBaseMaterialGroup::CLib3MFBaseMaterialGroup() + : CLib3MFBaseClass() +{ +} + +CLib3MFBaseMaterialGroup::~CLib3MFBaseMaterialGroup() +{ +} + +void CLib3MFBaseMaterialGroup::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFBaseMaterialGroup")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetCount", GetCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetAllPropertyIDs", GetAllPropertyIDs); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddMaterial", AddMaterial); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveMaterial", RemoveMaterial); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetName", GetName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetName", SetName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetDisplayColor", SetDisplayColor); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetDisplayColor", GetDisplayColor); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFBaseMaterialGroup::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFBaseMaterialGroup * basematerialgroupInstance = new CLib3MFBaseMaterialGroup(); + basematerialgroupInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFBaseMaterialGroup: Invalid call to Constructor"); + } +} + +Local CLib3MFBaseMaterialGroup::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFBaseMaterialGroup::GetCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCount."); + if (wrapperTable->m_BaseMaterialGroup_GetCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::GetCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_GetCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBaseMaterialGroup::GetAllPropertyIDs(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAllPropertyIDs."); + if (wrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == nullptr) + throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::GetAllPropertyIDs."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs(instanceHandle, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBaseMaterialGroup::AddMaterial(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Name)"); + } + if (!args[1]->IsObject()) { + throw std::runtime_error("Expected struct parameter 1 (DisplayColor)"); + } + v8::String::Utf8Value sutf8Name(isolate, args[0]); + std::string sName = *sutf8Name; + sLib3MFColor sDisplayColor = convertObjectToLib3MFColor(isolate, args[1]); + unsigned int nReturnPropertyID = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMaterial."); + if (wrapperTable->m_BaseMaterialGroup_AddMaterial == nullptr) + throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::AddMaterial."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_AddMaterial(instanceHandle, sName.c_str(), &sDisplayColor, &nReturnPropertyID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnPropertyID)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBaseMaterialGroup::RemoveMaterial(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveMaterial."); + if (wrapperTable->m_BaseMaterialGroup_RemoveMaterial == nullptr) + throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::RemoveMaterial."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_RemoveMaterial(instanceHandle, nPropertyID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBaseMaterialGroup::GetName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + unsigned int bytesNeededName = 0; + unsigned int bytesWrittenName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetName."); + if (wrapperTable->m_BaseMaterialGroup_GetName == nullptr) + throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::GetName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_BaseMaterialGroup_GetName(instanceHandle, nPropertyID, 0, &bytesNeededName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferName; + bufferName.resize(bytesNeededName); + Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_GetName(instanceHandle, nPropertyID, bytesNeededName, &bytesWrittenName, &bufferName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBaseMaterialGroup::SetName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (Name)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8Name(isolate, args[1]); + std::string sName = *sutf8Name; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetName."); + if (wrapperTable->m_BaseMaterialGroup_SetName == nullptr) + throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::SetName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_SetName(instanceHandle, nPropertyID, sName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBaseMaterialGroup::SetDisplayColor(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + if (!args[1]->IsObject()) { + throw std::runtime_error("Expected struct parameter 1 (TheColor)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFColor sTheColor = convertObjectToLib3MFColor(isolate, args[1]); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetDisplayColor."); + if (wrapperTable->m_BaseMaterialGroup_SetDisplayColor == nullptr) + throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::SetDisplayColor."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_SetDisplayColor(instanceHandle, nPropertyID, &sTheColor); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFBaseMaterialGroup::GetDisplayColor(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFColor sReturnTheColor; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetDisplayColor."); + if (wrapperTable->m_BaseMaterialGroup_GetDisplayColor == nullptr) + throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::GetDisplayColor."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_GetDisplayColor(instanceHandle, nPropertyID, &sReturnTheColor); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(convertLib3MFColorToObject(isolate, sReturnTheColor)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFColorGroup Implementation +**************************************************************************************************************************/ + +CLib3MFColorGroup::CLib3MFColorGroup() + : CLib3MFBaseClass() +{ +} + +CLib3MFColorGroup::~CLib3MFColorGroup() +{ +} + +void CLib3MFColorGroup::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFColorGroup")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetCount", GetCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetAllPropertyIDs", GetAllPropertyIDs); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddColor", AddColor); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveColor", RemoveColor); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetColor", SetColor); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetColor", GetColor); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFColorGroup::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFColorGroup * colorgroupInstance = new CLib3MFColorGroup(); + colorgroupInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFColorGroup: Invalid call to Constructor"); + } +} + +Local CLib3MFColorGroup::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFColorGroup::GetCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCount."); + if (wrapperTable->m_ColorGroup_GetCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method ColorGroup::GetCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ColorGroup_GetCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFColorGroup::GetAllPropertyIDs(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAllPropertyIDs."); + if (wrapperTable->m_ColorGroup_GetAllPropertyIDs == nullptr) + throw std::runtime_error("Could not call Lib3MF method ColorGroup::GetAllPropertyIDs."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ColorGroup_GetAllPropertyIDs(instanceHandle, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFColorGroup::AddColor(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected struct parameter 0 (TheColor)"); + } + sLib3MFColor sTheColor = convertObjectToLib3MFColor(isolate, args[0]); + unsigned int nReturnPropertyID = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddColor."); + if (wrapperTable->m_ColorGroup_AddColor == nullptr) + throw std::runtime_error("Could not call Lib3MF method ColorGroup::AddColor."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ColorGroup_AddColor(instanceHandle, &sTheColor, &nReturnPropertyID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnPropertyID)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFColorGroup::RemoveColor(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveColor."); + if (wrapperTable->m_ColorGroup_RemoveColor == nullptr) + throw std::runtime_error("Could not call Lib3MF method ColorGroup::RemoveColor."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ColorGroup_RemoveColor(instanceHandle, nPropertyID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFColorGroup::SetColor(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + if (!args[1]->IsObject()) { + throw std::runtime_error("Expected struct parameter 1 (TheColor)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFColor sTheColor = convertObjectToLib3MFColor(isolate, args[1]); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetColor."); + if (wrapperTable->m_ColorGroup_SetColor == nullptr) + throw std::runtime_error("Could not call Lib3MF method ColorGroup::SetColor."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ColorGroup_SetColor(instanceHandle, nPropertyID, &sTheColor); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFColorGroup::GetColor(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFColor sReturnTheColor; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetColor."); + if (wrapperTable->m_ColorGroup_GetColor == nullptr) + throw std::runtime_error("Could not call Lib3MF method ColorGroup::GetColor."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ColorGroup_GetColor(instanceHandle, nPropertyID, &sReturnTheColor); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(convertLib3MFColorToObject(isolate, sReturnTheColor)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFTexture2DGroup Implementation +**************************************************************************************************************************/ + +CLib3MFTexture2DGroup::CLib3MFTexture2DGroup() + : CLib3MFBaseClass() +{ +} + +CLib3MFTexture2DGroup::~CLib3MFTexture2DGroup() +{ +} + +void CLib3MFTexture2DGroup::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFTexture2DGroup")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetCount", GetCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetAllPropertyIDs", GetAllPropertyIDs); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddTex2Coord", AddTex2Coord); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetTex2Coord", GetTex2Coord); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveTex2Coord", RemoveTex2Coord); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetTexture2D", GetTexture2D); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFTexture2DGroup::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFTexture2DGroup * texture2dgroupInstance = new CLib3MFTexture2DGroup(); + texture2dgroupInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFTexture2DGroup: Invalid call to Constructor"); + } +} + +Local CLib3MFTexture2DGroup::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFTexture2DGroup::GetCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCount."); + if (wrapperTable->m_Texture2DGroup_GetCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::GetCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_GetCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2DGroup::GetAllPropertyIDs(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAllPropertyIDs."); + if (wrapperTable->m_Texture2DGroup_GetAllPropertyIDs == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::GetAllPropertyIDs."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_GetAllPropertyIDs(instanceHandle, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2DGroup::AddTex2Coord(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected struct parameter 0 (UVCoordinate)"); + } + sLib3MFTex2Coord sUVCoordinate = convertObjectToLib3MFTex2Coord(isolate, args[0]); + unsigned int nReturnPropertyID = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddTex2Coord."); + if (wrapperTable->m_Texture2DGroup_AddTex2Coord == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::AddTex2Coord."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_AddTex2Coord(instanceHandle, &sUVCoordinate, &nReturnPropertyID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnPropertyID)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2DGroup::GetTex2Coord(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFTex2Coord sReturnUVCoordinate; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTex2Coord."); + if (wrapperTable->m_Texture2DGroup_GetTex2Coord == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::GetTex2Coord."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_GetTex2Coord(instanceHandle, nPropertyID, &sReturnUVCoordinate); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(convertLib3MFTex2CoordToObject(isolate, sReturnUVCoordinate)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2DGroup::RemoveTex2Coord(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveTex2Coord."); + if (wrapperTable->m_Texture2DGroup_RemoveTex2Coord == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::RemoveTex2Coord."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_RemoveTex2Coord(instanceHandle, nPropertyID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2DGroup::GetTexture2D(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnTexture2DInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTexture2D."); + if (wrapperTable->m_Texture2DGroup_GetTexture2D == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::GetTexture2D."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_GetTexture2D(instanceHandle, &hReturnTexture2DInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjTexture2DInstance = CLib3MFTexture2D::NewInstance(args.Holder(), hReturnTexture2DInstance); + args.GetReturnValue().Set(instanceObjTexture2DInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFCompositeMaterials Implementation +**************************************************************************************************************************/ + +CLib3MFCompositeMaterials::CLib3MFCompositeMaterials() + : CLib3MFBaseClass() +{ +} + +CLib3MFCompositeMaterials::~CLib3MFCompositeMaterials() +{ +} + +void CLib3MFCompositeMaterials::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFCompositeMaterials")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetCount", GetCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetAllPropertyIDs", GetAllPropertyIDs); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetBaseMaterialGroup", GetBaseMaterialGroup); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddComposite", AddComposite); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveComposite", RemoveComposite); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetComposite", GetComposite); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFCompositeMaterials::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFCompositeMaterials * compositematerialsInstance = new CLib3MFCompositeMaterials(); + compositematerialsInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFCompositeMaterials: Invalid call to Constructor"); + } +} + +Local CLib3MFCompositeMaterials::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFCompositeMaterials::GetCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCount."); + if (wrapperTable->m_CompositeMaterials_GetCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::GetCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_GetCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFCompositeMaterials::GetAllPropertyIDs(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAllPropertyIDs."); + if (wrapperTable->m_CompositeMaterials_GetAllPropertyIDs == nullptr) + throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::GetAllPropertyIDs."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_GetAllPropertyIDs(instanceHandle, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFCompositeMaterials::GetBaseMaterialGroup(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnBaseMaterialGroupInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBaseMaterialGroup."); + if (wrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == nullptr) + throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::GetBaseMaterialGroup."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_GetBaseMaterialGroup(instanceHandle, &hReturnBaseMaterialGroupInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjBaseMaterialGroupInstance = CLib3MFBaseMaterialGroup::NewInstance(args.Holder(), hReturnBaseMaterialGroupInstance); + args.GetReturnValue().Set(instanceObjBaseMaterialGroupInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFCompositeMaterials::AddComposite(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnPropertyID = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddComposite."); + if (wrapperTable->m_CompositeMaterials_AddComposite == nullptr) + throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::AddComposite."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_AddComposite(instanceHandle, 0, nullptr, &nReturnPropertyID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnPropertyID)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFCompositeMaterials::RemoveComposite(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveComposite."); + if (wrapperTable->m_CompositeMaterials_RemoveComposite == nullptr) + throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::RemoveComposite."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_RemoveComposite(instanceHandle, nPropertyID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFCompositeMaterials::GetComposite(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetComposite."); + if (wrapperTable->m_CompositeMaterials_GetComposite == nullptr) + throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::GetComposite."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_GetComposite(instanceHandle, nPropertyID, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFMultiPropertyGroup Implementation +**************************************************************************************************************************/ + +CLib3MFMultiPropertyGroup::CLib3MFMultiPropertyGroup() + : CLib3MFBaseClass() +{ +} + +CLib3MFMultiPropertyGroup::~CLib3MFMultiPropertyGroup() +{ +} + +void CLib3MFMultiPropertyGroup::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMultiPropertyGroup")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetCount", GetCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetAllPropertyIDs", GetAllPropertyIDs); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddMultiProperty", AddMultiProperty); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetMultiProperty", SetMultiProperty); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetMultiProperty", GetMultiProperty); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveMultiProperty", RemoveMultiProperty); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetLayerCount", GetLayerCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddLayer", AddLayer); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetLayer", GetLayer); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveLayer", RemoveLayer); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFMultiPropertyGroup::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFMultiPropertyGroup * multipropertygroupInstance = new CLib3MFMultiPropertyGroup(); + multipropertygroupInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFMultiPropertyGroup: Invalid call to Constructor"); + } +} + +Local CLib3MFMultiPropertyGroup::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFMultiPropertyGroup::GetCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCount."); + if (wrapperTable->m_MultiPropertyGroup_GetCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::GetCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_GetCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMultiPropertyGroup::GetAllPropertyIDs(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAllPropertyIDs."); + if (wrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == nullptr) + throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::GetAllPropertyIDs."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs(instanceHandle, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMultiPropertyGroup::AddMultiProperty(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnPropertyID = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMultiProperty."); + if (wrapperTable->m_MultiPropertyGroup_AddMultiProperty == nullptr) + throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::AddMultiProperty."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_AddMultiProperty(instanceHandle, 0, nullptr, &nReturnPropertyID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnPropertyID)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMultiPropertyGroup::SetMultiProperty(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetMultiProperty."); + if (wrapperTable->m_MultiPropertyGroup_SetMultiProperty == nullptr) + throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::SetMultiProperty."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_SetMultiProperty(instanceHandle, nPropertyID, 0, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMultiPropertyGroup::GetMultiProperty(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetMultiProperty."); + if (wrapperTable->m_MultiPropertyGroup_GetMultiProperty == nullptr) + throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::GetMultiProperty."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_GetMultiProperty(instanceHandle, nPropertyID, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMultiPropertyGroup::RemoveMultiProperty(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + } + unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveMultiProperty."); + if (wrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == nullptr) + throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::RemoveMultiProperty."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_RemoveMultiProperty(instanceHandle, nPropertyID); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMultiPropertyGroup::GetLayerCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetLayerCount."); + if (wrapperTable->m_MultiPropertyGroup_GetLayerCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::GetLayerCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_GetLayerCount(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMultiPropertyGroup::AddLayer(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected struct parameter 0 (TheLayer)"); + } + sLib3MFMultiPropertyLayer sTheLayer = convertObjectToLib3MFMultiPropertyLayer(isolate, args[0]); + unsigned int nReturnLayerIndex = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddLayer."); + if (wrapperTable->m_MultiPropertyGroup_AddLayer == nullptr) + throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::AddLayer."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_AddLayer(instanceHandle, &sTheLayer, &nReturnLayerIndex); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnLayerIndex)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMultiPropertyGroup::GetLayer(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (LayerIndex)"); + } + unsigned int nLayerIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFMultiPropertyLayer sReturnTheLayer; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetLayer."); + if (wrapperTable->m_MultiPropertyGroup_GetLayer == nullptr) + throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::GetLayer."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_GetLayer(instanceHandle, nLayerIndex, &sReturnTheLayer); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(convertLib3MFMultiPropertyLayerToObject(isolate, sReturnTheLayer)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMultiPropertyGroup::RemoveLayer(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (LayerIndex)"); + } + unsigned int nLayerIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveLayer."); + if (wrapperTable->m_MultiPropertyGroup_RemoveLayer == nullptr) + throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::RemoveLayer."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_RemoveLayer(instanceHandle, nLayerIndex); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFImage3D Implementation +**************************************************************************************************************************/ + +CLib3MFImage3D::CLib3MFImage3D() + : CLib3MFBaseClass() +{ +} + +CLib3MFImage3D::~CLib3MFImage3D() +{ +} + +void CLib3MFImage3D::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFImage3D")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetName", GetName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetName", SetName); + NODE_SET_PROTOTYPE_METHOD(tpl, "IsImageStack", IsImageStack); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFImage3D::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFImage3D * image3dInstance = new CLib3MFImage3D(); + image3dInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFImage3D: Invalid call to Constructor"); + } +} + +Local CLib3MFImage3D::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFImage3D::GetName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededName = 0; + unsigned int bytesWrittenName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetName."); + if (wrapperTable->m_Image3D_GetName == nullptr) + throw std::runtime_error("Could not call Lib3MF method Image3D::GetName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_Image3D_GetName(instanceHandle, 0, &bytesNeededName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferName; + bufferName.resize(bytesNeededName); + Lib3MFResult errorCode = wrapperTable->m_Image3D_GetName(instanceHandle, bytesNeededName, &bytesWrittenName, &bufferName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImage3D::SetName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Name)"); + } + v8::String::Utf8Value sutf8Name(isolate, args[0]); + std::string sName = *sutf8Name; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetName."); + if (wrapperTable->m_Image3D_SetName == nullptr) + throw std::runtime_error("Could not call Lib3MF method Image3D::SetName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Image3D_SetName(instanceHandle, sName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImage3D::IsImageStack(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + bool bReturnIsImageStack = false; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method IsImageStack."); + if (wrapperTable->m_Image3D_IsImageStack == nullptr) + throw std::runtime_error("Could not call Lib3MF method Image3D::IsImageStack."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Image3D_IsImageStack(instanceHandle, &bReturnIsImageStack); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Boolean::New(isolate, bReturnIsImageStack)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFImageStack Implementation +**************************************************************************************************************************/ + +CLib3MFImageStack::CLib3MFImageStack() + : CLib3MFBaseClass() +{ +} + +CLib3MFImageStack::~CLib3MFImageStack() +{ +} + +void CLib3MFImageStack::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFImageStack")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetRowCount", GetRowCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetRowCount", SetRowCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetColumnCount", GetColumnCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetColumnCount", SetColumnCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetSheetCount", GetSheetCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetSheet", GetSheet); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetSheet", SetSheet); + NODE_SET_PROTOTYPE_METHOD(tpl, "CreateEmptySheet", CreateEmptySheet); + NODE_SET_PROTOTYPE_METHOD(tpl, "CreateSheetFromBuffer", CreateSheetFromBuffer); + NODE_SET_PROTOTYPE_METHOD(tpl, "CreateSheetFromFile", CreateSheetFromFile); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFImageStack::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFImageStack * imagestackInstance = new CLib3MFImageStack(); + imagestackInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFImageStack: Invalid call to Constructor"); + } +} + +Local CLib3MFImageStack::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFImageStack::GetRowCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnRowCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetRowCount."); + if (wrapperTable->m_ImageStack_GetRowCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImageStack::GetRowCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImageStack_GetRowCount(instanceHandle, &nReturnRowCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnRowCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImageStack::SetRowCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (RowCount)"); + } + unsigned int nRowCount = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetRowCount."); + if (wrapperTable->m_ImageStack_SetRowCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImageStack::SetRowCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImageStack_SetRowCount(instanceHandle, nRowCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImageStack::GetColumnCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnColumnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetColumnCount."); + if (wrapperTable->m_ImageStack_GetColumnCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImageStack::GetColumnCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImageStack_GetColumnCount(instanceHandle, &nReturnColumnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnColumnCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImageStack::SetColumnCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (ColumnCount)"); + } + unsigned int nColumnCount = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetColumnCount."); + if (wrapperTable->m_ImageStack_SetColumnCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImageStack::SetColumnCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImageStack_SetColumnCount(instanceHandle, nColumnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImageStack::GetSheetCount(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int nReturnSheetCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetSheetCount."); + if (wrapperTable->m_ImageStack_GetSheetCount == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImageStack::GetSheetCount."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImageStack_GetSheetCount(instanceHandle, &nReturnSheetCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnSheetCount)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImageStack::GetSheet(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Lib3MFHandle hReturnSheet = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetSheet."); + if (wrapperTable->m_ImageStack_GetSheet == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImageStack::GetSheet."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImageStack_GetSheet(instanceHandle, nIndex, &hReturnSheet); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjSheet = CLib3MFAttachment::NewInstance(args.Holder(), hReturnSheet); + args.GetReturnValue().Set(instanceObjSheet); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImageStack::SetSheet(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + if (!args[1]->IsObject()) { + throw std::runtime_error("Expected class parameter 1 (Sheet)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Local objSheet = args[1]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFAttachment * instanceSheet = ObjectWrap::Unwrap(objSheet); + if (instanceSheet == nullptr) + throw std::runtime_error("Invalid Object parameter 1 (Sheet)"); + Lib3MFHandle hSheet = instanceSheet->getHandle( objSheet ); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetSheet."); + if (wrapperTable->m_ImageStack_SetSheet == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImageStack::SetSheet."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImageStack_SetSheet(instanceHandle, nIndex, hSheet); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImageStack::CreateEmptySheet(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (Path)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8Path(isolate, args[1]); + std::string sPath = *sutf8Path; + Lib3MFHandle hReturnSheet = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method CreateEmptySheet."); + if (wrapperTable->m_ImageStack_CreateEmptySheet == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImageStack::CreateEmptySheet."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImageStack_CreateEmptySheet(instanceHandle, nIndex, sPath.c_str(), &hReturnSheet); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjSheet = CLib3MFAttachment::NewInstance(args.Holder(), hReturnSheet); + args.GetReturnValue().Set(instanceObjSheet); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImageStack::CreateSheetFromBuffer(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (Path)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8Path(isolate, args[1]); + std::string sPath = *sutf8Path; + Lib3MFHandle hReturnSheet = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method CreateSheetFromBuffer."); + if (wrapperTable->m_ImageStack_CreateSheetFromBuffer == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImageStack::CreateSheetFromBuffer."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImageStack_CreateSheetFromBuffer(instanceHandle, nIndex, sPath.c_str(), 0, nullptr, &hReturnSheet); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjSheet = CLib3MFAttachment::NewInstance(args.Holder(), hReturnSheet); + args.GetReturnValue().Set(instanceObjSheet); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImageStack::CreateSheetFromFile(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (Index)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (Path)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (FileName)"); + } + unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8Path(isolate, args[1]); + std::string sPath = *sutf8Path; + v8::String::Utf8Value sutf8FileName(isolate, args[2]); + std::string sFileName = *sutf8FileName; + Lib3MFHandle hReturnSheet = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method CreateSheetFromFile."); + if (wrapperTable->m_ImageStack_CreateSheetFromFile == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImageStack::CreateSheetFromFile."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImageStack_CreateSheetFromFile(instanceHandle, nIndex, sPath.c_str(), sFileName.c_str(), &hReturnSheet); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjSheet = CLib3MFAttachment::NewInstance(args.Holder(), hReturnSheet); + args.GetReturnValue().Set(instanceObjSheet); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFAttachment Implementation +**************************************************************************************************************************/ + +CLib3MFAttachment::CLib3MFAttachment() + : CLib3MFBaseClass() +{ +} + +CLib3MFAttachment::~CLib3MFAttachment() +{ +} + +void CLib3MFAttachment::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFAttachment")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetPath", GetPath); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetPath", SetPath); + NODE_SET_PROTOTYPE_METHOD(tpl, "PackagePart", PackagePart); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetRelationShipType", GetRelationShipType); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetRelationShipType", SetRelationShipType); + NODE_SET_PROTOTYPE_METHOD(tpl, "WriteToFile", WriteToFile); + NODE_SET_PROTOTYPE_METHOD(tpl, "ReadFromFile", ReadFromFile); + NODE_SET_PROTOTYPE_METHOD(tpl, "ReadFromCallback", ReadFromCallback); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetStreamSize", GetStreamSize); + NODE_SET_PROTOTYPE_METHOD(tpl, "WriteToBuffer", WriteToBuffer); + NODE_SET_PROTOTYPE_METHOD(tpl, "ReadFromBuffer", ReadFromBuffer); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFAttachment::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFAttachment * attachmentInstance = new CLib3MFAttachment(); + attachmentInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFAttachment: Invalid call to Constructor"); + } +} + +Local CLib3MFAttachment::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFAttachment::GetPath(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededPath = 0; + unsigned int bytesWrittenPath = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetPath."); + if (wrapperTable->m_Attachment_GetPath == nullptr) + throw std::runtime_error("Could not call Lib3MF method Attachment::GetPath."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_Attachment_GetPath(instanceHandle, 0, &bytesNeededPath, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferPath; + bufferPath.resize(bytesNeededPath); + Lib3MFResult errorCode = wrapperTable->m_Attachment_GetPath(instanceHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferPath[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFAttachment::SetPath(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Path)"); + } + v8::String::Utf8Value sutf8Path(isolate, args[0]); + std::string sPath = *sutf8Path; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetPath."); + if (wrapperTable->m_Attachment_SetPath == nullptr) + throw std::runtime_error("Could not call Lib3MF method Attachment::SetPath."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Attachment_SetPath(instanceHandle, sPath.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFAttachment::PackagePart(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnPackagePart = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method PackagePart."); + if (wrapperTable->m_Attachment_PackagePart == nullptr) + throw std::runtime_error("Could not call Lib3MF method Attachment::PackagePart."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Attachment_PackagePart(instanceHandle, &hReturnPackagePart); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjPackagePart = CLib3MFPackagePart::NewInstance(args.Holder(), hReturnPackagePart); + args.GetReturnValue().Set(instanceObjPackagePart); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFAttachment::GetRelationShipType(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededPath = 0; + unsigned int bytesWrittenPath = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetRelationShipType."); + if (wrapperTable->m_Attachment_GetRelationShipType == nullptr) + throw std::runtime_error("Could not call Lib3MF method Attachment::GetRelationShipType."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_Attachment_GetRelationShipType(instanceHandle, 0, &bytesNeededPath, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferPath; + bufferPath.resize(bytesNeededPath); + Lib3MFResult errorCode = wrapperTable->m_Attachment_GetRelationShipType(instanceHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferPath[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFAttachment::SetRelationShipType(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Path)"); + } + v8::String::Utf8Value sutf8Path(isolate, args[0]); + std::string sPath = *sutf8Path; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetRelationShipType."); + if (wrapperTable->m_Attachment_SetRelationShipType == nullptr) + throw std::runtime_error("Could not call Lib3MF method Attachment::SetRelationShipType."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Attachment_SetRelationShipType(instanceHandle, sPath.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFAttachment::WriteToFile(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (FileName)"); + } + v8::String::Utf8Value sutf8FileName(isolate, args[0]); + std::string sFileName = *sutf8FileName; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method WriteToFile."); + if (wrapperTable->m_Attachment_WriteToFile == nullptr) + throw std::runtime_error("Could not call Lib3MF method Attachment::WriteToFile."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Attachment_WriteToFile(instanceHandle, sFileName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFAttachment::ReadFromFile(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (FileName)"); + } + v8::String::Utf8Value sutf8FileName(isolate, args[0]); + std::string sFileName = *sutf8FileName; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method ReadFromFile."); + if (wrapperTable->m_Attachment_ReadFromFile == nullptr) + throw std::runtime_error("Could not call Lib3MF method Attachment::ReadFromFile."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Attachment_ReadFromFile(instanceHandle, sFileName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFAttachment::ReadFromCallback(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[1]->IsString()) { + throw std::runtime_error("Expected uint64 parameter 1 (StreamSize)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected pointer parameter 3 (UserData)"); + } + v8::String::Utf8Value sutf8StreamSize(isolate, args[1]); + std::string sStreamSize = *sutf8StreamSize; + uint64_t nStreamSize = stoull(sStreamSize); + v8::String::Utf8Value sutf8UserData(isolate, args[3]); + std::string sUserData = *sutf8UserData; + uint64_t nUserData = stoull(sUserData); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method ReadFromCallback."); + if (wrapperTable->m_Attachment_ReadFromCallback == nullptr) + throw std::runtime_error("Could not call Lib3MF method Attachment::ReadFromCallback."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Attachment_ReadFromCallback(instanceHandle, nullptr, nStreamSize, nullptr, (void*) nUserData); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFAttachment::GetStreamSize(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + uint64_t nReturnStreamSize = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetStreamSize."); + if (wrapperTable->m_Attachment_GetStreamSize == nullptr) + throw std::runtime_error("Could not call Lib3MF method Attachment::GetStreamSize."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Attachment_GetStreamSize(instanceHandle, &nReturnStreamSize); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, std::to_string(nReturnStreamSize).c_str())); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFAttachment::WriteToBuffer(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method WriteToBuffer."); + if (wrapperTable->m_Attachment_WriteToBuffer == nullptr) + throw std::runtime_error("Could not call Lib3MF method Attachment::WriteToBuffer."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Attachment_WriteToBuffer(instanceHandle, 0, nullptr, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFAttachment::ReadFromBuffer(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method ReadFromBuffer."); + if (wrapperTable->m_Attachment_ReadFromBuffer == nullptr) + throw std::runtime_error("Could not call Lib3MF method Attachment::ReadFromBuffer."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Attachment_ReadFromBuffer(instanceHandle, 0, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFTexture2D Implementation +**************************************************************************************************************************/ + +CLib3MFTexture2D::CLib3MFTexture2D() + : CLib3MFBaseClass() +{ +} + +CLib3MFTexture2D::~CLib3MFTexture2D() +{ +} + +void CLib3MFTexture2D::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFTexture2D")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetAttachment", GetAttachment); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetAttachment", SetAttachment); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetContentType", GetContentType); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetContentType", SetContentType); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetTileStyleUV", GetTileStyleUV); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetTileStyleUV", SetTileStyleUV); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetFilter", GetFilter); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetFilter", SetFilter); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFTexture2D::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFTexture2D * texture2dInstance = new CLib3MFTexture2D(); + texture2dInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFTexture2D: Invalid call to Constructor"); + } +} + +Local CLib3MFTexture2D::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFTexture2D::GetAttachment(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnAttachment = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAttachment."); + if (wrapperTable->m_Texture2D_GetAttachment == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2D::GetAttachment."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2D_GetAttachment(instanceHandle, &hReturnAttachment); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjAttachment = CLib3MFAttachment::NewInstance(args.Holder(), hReturnAttachment); + args.GetReturnValue().Set(instanceObjAttachment); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2D::SetAttachment(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (Attachment)"); + } + Local objAttachment = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFAttachment * instanceAttachment = ObjectWrap::Unwrap(objAttachment); + if (instanceAttachment == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (Attachment)"); + Lib3MFHandle hAttachment = instanceAttachment->getHandle( objAttachment ); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetAttachment."); + if (wrapperTable->m_Texture2D_SetAttachment == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2D::SetAttachment."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2D_SetAttachment(instanceHandle, hAttachment); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2D::GetContentType(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + eLib3MFTextureType eReturnContentType; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetContentType."); + if (wrapperTable->m_Texture2D_GetContentType == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2D::GetContentType."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2D_GetContentType(instanceHandle, &eReturnContentType); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::New(isolate, (int)eReturnContentType)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2D::SetContentType(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 0 (ContentType)"); + } + unsigned int eContentType = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetContentType."); + if (wrapperTable->m_Texture2D_SetContentType == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2D::SetContentType."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2D_SetContentType(instanceHandle, (eLib3MFTextureType) eContentType); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2D::GetTileStyleUV(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Local outObject = Object::New(isolate); + eLib3MFTextureTileStyle eReturnTileStyleU; + eLib3MFTextureTileStyle eReturnTileStyleV; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTileStyleUV."); + if (wrapperTable->m_Texture2D_GetTileStyleUV == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2D::GetTileStyleUV."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2D_GetTileStyleUV(instanceHandle, &eReturnTileStyleU, &eReturnTileStyleV); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "TileStyleU"), Integer::New(isolate, (int)eReturnTileStyleU)); + outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "TileStyleV"), Integer::New(isolate, (int)eReturnTileStyleV)); + args.GetReturnValue().Set(outObject); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2D::SetTileStyleUV(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 0 (TileStyleU)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (TileStyleV)"); + } + unsigned int eTileStyleU = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + unsigned int eTileStyleV = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetTileStyleUV."); + if (wrapperTable->m_Texture2D_SetTileStyleUV == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2D::SetTileStyleUV."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2D_SetTileStyleUV(instanceHandle, (eLib3MFTextureTileStyle) eTileStyleU, (eLib3MFTextureTileStyle) eTileStyleV); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2D::GetFilter(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + eLib3MFTextureFilter eReturnFilter; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetFilter."); + if (wrapperTable->m_Texture2D_GetFilter == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2D::GetFilter."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2D_GetFilter(instanceHandle, &eReturnFilter); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::New(isolate, (int)eReturnFilter)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFTexture2D::SetFilter(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 0 (Filter)"); + } + unsigned int eFilter = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetFilter."); + if (wrapperTable->m_Texture2D_SetFilter == nullptr) + throw std::runtime_error("Could not call Lib3MF method Texture2D::SetFilter."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Texture2D_SetFilter(instanceHandle, (eLib3MFTextureFilter) eFilter); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFImplicitPort Implementation +**************************************************************************************************************************/ + +CLib3MFImplicitPort::CLib3MFImplicitPort() + : CLib3MFBaseClass() +{ +} + +CLib3MFImplicitPort::~CLib3MFImplicitPort() +{ +} + +void CLib3MFImplicitPort::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFImplicitPort")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetIdentifier", GetIdentifier); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetIdentifier", SetIdentifier); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetDisplayName", GetDisplayName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetDisplayName", SetDisplayName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetType", SetType); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetType", GetType); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetReference", GetReference); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetReference", SetReference); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFImplicitPort::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFImplicitPort * implicitportInstance = new CLib3MFImplicitPort(); + implicitportInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFImplicitPort: Invalid call to Constructor"); + } +} + +Local CLib3MFImplicitPort::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFImplicitPort::GetIdentifier(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededIdentifier = 0; + unsigned int bytesWrittenIdentifier = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetIdentifier."); + if (wrapperTable->m_ImplicitPort_GetIdentifier == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitPort::GetIdentifier."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_ImplicitPort_GetIdentifier(instanceHandle, 0, &bytesNeededIdentifier, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferIdentifier; + bufferIdentifier.resize(bytesNeededIdentifier); + Lib3MFResult errorCode = wrapperTable->m_ImplicitPort_GetIdentifier(instanceHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferIdentifier[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitPort::SetIdentifier(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetIdentifier."); + if (wrapperTable->m_ImplicitPort_SetIdentifier == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitPort::SetIdentifier."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitPort_SetIdentifier(instanceHandle, sIdentifier.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitPort::GetDisplayName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededDisplayName = 0; + unsigned int bytesWrittenDisplayName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetDisplayName."); + if (wrapperTable->m_ImplicitPort_GetDisplayName == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitPort::GetDisplayName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_ImplicitPort_GetDisplayName(instanceHandle, 0, &bytesNeededDisplayName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferDisplayName; + bufferDisplayName.resize(bytesNeededDisplayName); + Lib3MFResult errorCode = wrapperTable->m_ImplicitPort_GetDisplayName(instanceHandle, bytesNeededDisplayName, &bytesWrittenDisplayName, &bufferDisplayName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferDisplayName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitPort::SetDisplayName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (DisplayName)"); + } + v8::String::Utf8Value sutf8DisplayName(isolate, args[0]); + std::string sDisplayName = *sutf8DisplayName; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetDisplayName."); + if (wrapperTable->m_ImplicitPort_SetDisplayName == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitPort::SetDisplayName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitPort_SetDisplayName(instanceHandle, sDisplayName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitPort::SetType(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 0 (ImplicitPortType)"); + } + unsigned int eImplicitPortType = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetType."); + if (wrapperTable->m_ImplicitPort_SetType == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitPort::SetType."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitPort_SetType(instanceHandle, (eLib3MFImplicitPortType) eImplicitPortType); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitPort::GetType(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + eLib3MFImplicitPortType eReturnImplicitPortType; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetType."); + if (wrapperTable->m_ImplicitPort_GetType == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitPort::GetType."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitPort_GetType(instanceHandle, &eReturnImplicitPortType); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::New(isolate, (int)eReturnImplicitPortType)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitPort::GetReference(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededReference = 0; + unsigned int bytesWrittenReference = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetReference."); + if (wrapperTable->m_ImplicitPort_GetReference == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitPort::GetReference."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_ImplicitPort_GetReference(instanceHandle, 0, &bytesNeededReference, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferReference; + bufferReference.resize(bytesNeededReference); + Lib3MFResult errorCode = wrapperTable->m_ImplicitPort_GetReference(instanceHandle, bytesNeededReference, &bytesWrittenReference, &bufferReference[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferReference[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitPort::SetReference(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Reference)"); + } + v8::String::Utf8Value sutf8Reference(isolate, args[0]); + std::string sReference = *sutf8Reference; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetReference."); + if (wrapperTable->m_ImplicitPort_SetReference == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitPort::SetReference."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitPort_SetReference(instanceHandle, sReference.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFIterator Implementation +**************************************************************************************************************************/ + +CLib3MFIterator::CLib3MFIterator() + : CLib3MFBaseClass() +{ +} + +CLib3MFIterator::~CLib3MFIterator() +{ +} + +void CLib3MFIterator::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFIterator")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "MoveNext", MoveNext); + NODE_SET_PROTOTYPE_METHOD(tpl, "MovePrevious", MovePrevious); + NODE_SET_PROTOTYPE_METHOD(tpl, "Count", Count); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFIterator::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFIterator * iteratorInstance = new CLib3MFIterator(); + iteratorInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFIterator: Invalid call to Constructor"); + } +} + +Local CLib3MFIterator::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFIterator::MoveNext(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + bool bReturnHasNext = false; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method MoveNext."); + if (wrapperTable->m_Iterator_MoveNext == nullptr) + throw std::runtime_error("Could not call Lib3MF method Iterator::MoveNext."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Iterator_MoveNext(instanceHandle, &bReturnHasNext); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Boolean::New(isolate, bReturnHasNext)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFIterator::MovePrevious(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + bool bReturnHasPrevious = false; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method MovePrevious."); + if (wrapperTable->m_Iterator_MovePrevious == nullptr) + throw std::runtime_error("Could not call Lib3MF method Iterator::MovePrevious."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Iterator_MovePrevious(instanceHandle, &bReturnHasPrevious); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Boolean::New(isolate, bReturnHasPrevious)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFIterator::Count(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + uint64_t nReturnCount = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method Count."); + if (wrapperTable->m_Iterator_Count == nullptr) + throw std::runtime_error("Could not call Lib3MF method Iterator::Count."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Iterator_Count(instanceHandle, &nReturnCount); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, std::to_string(nReturnCount).c_str())); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFImplicitPortIterator Implementation +**************************************************************************************************************************/ + +CLib3MFImplicitPortIterator::CLib3MFImplicitPortIterator() + : CLib3MFBaseClass() +{ +} + +CLib3MFImplicitPortIterator::~CLib3MFImplicitPortIterator() +{ +} + +void CLib3MFImplicitPortIterator::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFImplicitPortIterator")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetCurrent", GetCurrent); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFImplicitPortIterator::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFImplicitPortIterator * implicitportiteratorInstance = new CLib3MFImplicitPortIterator(); + implicitportiteratorInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFImplicitPortIterator: Invalid call to Constructor"); + } +} + +Local CLib3MFImplicitPortIterator::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFImplicitPortIterator::GetCurrent(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnPort = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCurrent."); + if (wrapperTable->m_ImplicitPortIterator_GetCurrent == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitPortIterator::GetCurrent."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitPortIterator_GetCurrent(instanceHandle, &hReturnPort); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjPort = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnPort); + args.GetReturnValue().Set(instanceObjPort); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFImplicitNode Implementation +**************************************************************************************************************************/ + +CLib3MFImplicitNode::CLib3MFImplicitNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFImplicitNode::~CLib3MFImplicitNode() +{ +} + +void CLib3MFImplicitNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFImplicitNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetIdentifier", GetIdentifier); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetIdentifier", SetIdentifier); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetDisplayName", GetDisplayName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetDisplayName", SetDisplayName); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetTag", GetTag); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetTag", SetTag); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetNodeType", GetNodeType); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddInput", AddInput); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputs", GetInputs); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddOutput", AddOutput); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputs", GetOutputs); + NODE_SET_PROTOTYPE_METHOD(tpl, "FindInput", FindInput); + NODE_SET_PROTOTYPE_METHOD(tpl, "FindOutput", FindOutput); + NODE_SET_PROTOTYPE_METHOD(tpl, "AreTypesValid", AreTypesValid); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFImplicitNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFImplicitNode * implicitnodeInstance = new CLib3MFImplicitNode(); + implicitnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFImplicitNode: Invalid call to Constructor"); + } +} + +Local CLib3MFImplicitNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFImplicitNode::GetIdentifier(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededIdentifier = 0; + unsigned int bytesWrittenIdentifier = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetIdentifier."); + if (wrapperTable->m_ImplicitNode_GetIdentifier == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::GetIdentifier."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_ImplicitNode_GetIdentifier(instanceHandle, 0, &bytesNeededIdentifier, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferIdentifier; + bufferIdentifier.resize(bytesNeededIdentifier); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_GetIdentifier(instanceHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferIdentifier[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::SetIdentifier(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetIdentifier."); + if (wrapperTable->m_ImplicitNode_SetIdentifier == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::SetIdentifier."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_SetIdentifier(instanceHandle, sIdentifier.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::GetDisplayName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededDisplayName = 0; + unsigned int bytesWrittenDisplayName = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetDisplayName."); + if (wrapperTable->m_ImplicitNode_GetDisplayName == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::GetDisplayName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_ImplicitNode_GetDisplayName(instanceHandle, 0, &bytesNeededDisplayName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferDisplayName; + bufferDisplayName.resize(bytesNeededDisplayName); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_GetDisplayName(instanceHandle, bytesNeededDisplayName, &bytesWrittenDisplayName, &bufferDisplayName[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferDisplayName[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::SetDisplayName(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (DisplayName)"); + } + v8::String::Utf8Value sutf8DisplayName(isolate, args[0]); + std::string sDisplayName = *sutf8DisplayName; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetDisplayName."); + if (wrapperTable->m_ImplicitNode_SetDisplayName == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::SetDisplayName."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_SetDisplayName(instanceHandle, sDisplayName.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::GetTag(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + unsigned int bytesNeededTag = 0; + unsigned int bytesWrittenTag = 0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTag."); + if (wrapperTable->m_ImplicitNode_GetTag == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::GetTag."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult initErrorCode = wrapperTable->m_ImplicitNode_GetTag(instanceHandle, 0, &bytesNeededTag, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferTag; + bufferTag.resize(bytesNeededTag); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_GetTag(instanceHandle, bytesNeededTag, &bytesWrittenTag, &bufferTag[0]); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferTag[0])); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::SetTag(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Tag)"); + } + v8::String::Utf8Value sutf8Tag(isolate, args[0]); + std::string sTag = *sutf8Tag; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetTag."); + if (wrapperTable->m_ImplicitNode_SetTag == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::SetTag."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_SetTag(instanceHandle, sTag.c_str()); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::GetNodeType(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + eLib3MFImplicitNodeType eReturnType; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetNodeType."); + if (wrapperTable->m_ImplicitNode_GetNodeType == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::GetNodeType."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_GetNodeType(instanceHandle, &eReturnType); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::New(isolate, (int)eReturnType)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::AddInput(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + Lib3MFHandle hReturnPort = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddInput."); + if (wrapperTable->m_ImplicitNode_AddInput == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::AddInput."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_AddInput(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), &hReturnPort); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjPort = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnPort); + args.GetReturnValue().Set(instanceObjPort); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::GetInputs(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnIterator = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputs."); + if (wrapperTable->m_ImplicitNode_GetInputs == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::GetInputs."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_GetInputs(instanceHandle, &hReturnIterator); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjIterator = CLib3MFImplicitPortIterator::NewInstance(args.Holder(), hReturnIterator); + args.GetReturnValue().Set(instanceObjIterator); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::AddOutput(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + Lib3MFHandle hReturnPort = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddOutput."); + if (wrapperTable->m_ImplicitNode_AddOutput == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::AddOutput."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_AddOutput(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), &hReturnPort); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjPort = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnPort); + args.GetReturnValue().Set(instanceObjPort); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::GetOutputs(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnIterator = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputs."); + if (wrapperTable->m_ImplicitNode_GetOutputs == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::GetOutputs."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_GetOutputs(instanceHandle, &hReturnIterator); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjIterator = CLib3MFImplicitPortIterator::NewInstance(args.Holder(), hReturnIterator); + args.GetReturnValue().Set(instanceObjIterator); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::FindInput(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + Lib3MFHandle hReturnInput = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method FindInput."); + if (wrapperTable->m_ImplicitNode_FindInput == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::FindInput."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_FindInput(instanceHandle, sIdentifier.c_str(), &hReturnInput); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjInput = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnInput); + args.GetReturnValue().Set(instanceObjInput); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::FindOutput(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + Lib3MFHandle hReturnOutput = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method FindOutput."); + if (wrapperTable->m_ImplicitNode_FindOutput == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::FindOutput."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_FindOutput(instanceHandle, sIdentifier.c_str(), &hReturnOutput); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjOutput = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnOutput); + args.GetReturnValue().Set(instanceObjOutput); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitNode::AreTypesValid(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + bool bReturnValid = false; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AreTypesValid."); + if (wrapperTable->m_ImplicitNode_AreTypesValid == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitNode::AreTypesValid."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitNode_AreTypesValid(instanceHandle, &bReturnValid); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Boolean::New(isolate, bReturnValid)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFOneInputNode Implementation +**************************************************************************************************************************/ + +CLib3MFOneInputNode::CLib3MFOneInputNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFOneInputNode::~CLib3MFOneInputNode() +{ +} + +void CLib3MFOneInputNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFOneInputNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputA", GetInputA); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputResult", GetOutputResult); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFOneInputNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFOneInputNode * oneinputnodeInstance = new CLib3MFOneInputNode(); + oneinputnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFOneInputNode: Invalid call to Constructor"); + } +} + +Local CLib3MFOneInputNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFOneInputNode::GetInputA(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnInput = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputA."); + if (wrapperTable->m_OneInputNode_GetInputA == nullptr) + throw std::runtime_error("Could not call Lib3MF method OneInputNode::GetInputA."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_OneInputNode_GetInputA(instanceHandle, &hReturnInput); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjInput = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnInput); + args.GetReturnValue().Set(instanceObjInput); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFOneInputNode::GetOutputResult(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnResult = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputResult."); + if (wrapperTable->m_OneInputNode_GetOutputResult == nullptr) + throw std::runtime_error("Could not call Lib3MF method OneInputNode::GetOutputResult."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_OneInputNode_GetOutputResult(instanceHandle, &hReturnResult); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjResult = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnResult); + args.GetReturnValue().Set(instanceObjResult); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFSinNode Implementation +**************************************************************************************************************************/ + +CLib3MFSinNode::CLib3MFSinNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFSinNode::~CLib3MFSinNode() +{ +} + +void CLib3MFSinNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFSinNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFSinNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFSinNode * sinnodeInstance = new CLib3MFSinNode(); + sinnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFSinNode: Invalid call to Constructor"); + } +} + +Local CLib3MFSinNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFCosNode Implementation +**************************************************************************************************************************/ + +CLib3MFCosNode::CLib3MFCosNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFCosNode::~CLib3MFCosNode() +{ +} + +void CLib3MFCosNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFCosNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFCosNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFCosNode * cosnodeInstance = new CLib3MFCosNode(); + cosnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFCosNode: Invalid call to Constructor"); + } +} + +Local CLib3MFCosNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFTanNode Implementation +**************************************************************************************************************************/ + +CLib3MFTanNode::CLib3MFTanNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFTanNode::~CLib3MFTanNode() +{ +} + +void CLib3MFTanNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFTanNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFTanNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFTanNode * tannodeInstance = new CLib3MFTanNode(); + tannodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFTanNode: Invalid call to Constructor"); + } +} + +Local CLib3MFTanNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFArcSinNode Implementation +**************************************************************************************************************************/ + +CLib3MFArcSinNode::CLib3MFArcSinNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFArcSinNode::~CLib3MFArcSinNode() +{ +} + +void CLib3MFArcSinNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFArcSinNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFArcSinNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFArcSinNode * arcsinnodeInstance = new CLib3MFArcSinNode(); + arcsinnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFArcSinNode: Invalid call to Constructor"); + } +} + +Local CLib3MFArcSinNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFArcCosNode Implementation +**************************************************************************************************************************/ + +CLib3MFArcCosNode::CLib3MFArcCosNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFArcCosNode::~CLib3MFArcCosNode() +{ +} + +void CLib3MFArcCosNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFArcCosNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFArcCosNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFArcCosNode * arccosnodeInstance = new CLib3MFArcCosNode(); + arccosnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFArcCosNode: Invalid call to Constructor"); + } +} + +Local CLib3MFArcCosNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFArcTanNode Implementation +**************************************************************************************************************************/ + +CLib3MFArcTanNode::CLib3MFArcTanNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFArcTanNode::~CLib3MFArcTanNode() +{ +} + +void CLib3MFArcTanNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFArcTanNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFArcTanNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFArcTanNode * arctannodeInstance = new CLib3MFArcTanNode(); + arctannodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFArcTanNode: Invalid call to Constructor"); + } +} + +Local CLib3MFArcTanNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFSinhNode Implementation +**************************************************************************************************************************/ + +CLib3MFSinhNode::CLib3MFSinhNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFSinhNode::~CLib3MFSinhNode() +{ +} + +void CLib3MFSinhNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFSinhNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFSinhNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFSinhNode * sinhnodeInstance = new CLib3MFSinhNode(); + sinhnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFSinhNode: Invalid call to Constructor"); + } +} + +Local CLib3MFSinhNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFCoshNode Implementation +**************************************************************************************************************************/ + +CLib3MFCoshNode::CLib3MFCoshNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFCoshNode::~CLib3MFCoshNode() +{ +} + +void CLib3MFCoshNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFCoshNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFCoshNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFCoshNode * coshnodeInstance = new CLib3MFCoshNode(); + coshnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFCoshNode: Invalid call to Constructor"); + } +} + +Local CLib3MFCoshNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFTanhNode Implementation +**************************************************************************************************************************/ + +CLib3MFTanhNode::CLib3MFTanhNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFTanhNode::~CLib3MFTanhNode() +{ +} + +void CLib3MFTanhNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFTanhNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFTanhNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFTanhNode * tanhnodeInstance = new CLib3MFTanhNode(); + tanhnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFTanhNode: Invalid call to Constructor"); + } +} + +Local CLib3MFTanhNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFRoundNode Implementation +**************************************************************************************************************************/ + +CLib3MFRoundNode::CLib3MFRoundNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFRoundNode::~CLib3MFRoundNode() +{ +} + +void CLib3MFRoundNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFRoundNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFRoundNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFRoundNode * roundnodeInstance = new CLib3MFRoundNode(); + roundnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFRoundNode: Invalid call to Constructor"); + } +} + +Local CLib3MFRoundNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFCeilNode Implementation +**************************************************************************************************************************/ + +CLib3MFCeilNode::CLib3MFCeilNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFCeilNode::~CLib3MFCeilNode() +{ +} + +void CLib3MFCeilNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFCeilNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFCeilNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFCeilNode * ceilnodeInstance = new CLib3MFCeilNode(); + ceilnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFCeilNode: Invalid call to Constructor"); + } +} + +Local CLib3MFCeilNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFFloorNode Implementation +**************************************************************************************************************************/ + +CLib3MFFloorNode::CLib3MFFloorNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFFloorNode::~CLib3MFFloorNode() +{ +} + +void CLib3MFFloorNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFFloorNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFFloorNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFFloorNode * floornodeInstance = new CLib3MFFloorNode(); + floornodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFFloorNode: Invalid call to Constructor"); + } +} + +Local CLib3MFFloorNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFSignNode Implementation +**************************************************************************************************************************/ + +CLib3MFSignNode::CLib3MFSignNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFSignNode::~CLib3MFSignNode() +{ +} + +void CLib3MFSignNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFSignNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFSignNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFSignNode * signnodeInstance = new CLib3MFSignNode(); + signnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFSignNode: Invalid call to Constructor"); + } +} + +Local CLib3MFSignNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFFractNode Implementation +**************************************************************************************************************************/ + +CLib3MFFractNode::CLib3MFFractNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFFractNode::~CLib3MFFractNode() +{ +} + +void CLib3MFFractNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFFractNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFFractNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFFractNode * fractnodeInstance = new CLib3MFFractNode(); + fractnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFFractNode: Invalid call to Constructor"); + } +} + +Local CLib3MFFractNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFAbsNode Implementation +**************************************************************************************************************************/ + +CLib3MFAbsNode::CLib3MFAbsNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFAbsNode::~CLib3MFAbsNode() +{ +} + +void CLib3MFAbsNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFAbsNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFAbsNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFAbsNode * absnodeInstance = new CLib3MFAbsNode(); + absnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFAbsNode: Invalid call to Constructor"); + } +} + +Local CLib3MFAbsNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFExpNode Implementation +**************************************************************************************************************************/ + +CLib3MFExpNode::CLib3MFExpNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFExpNode::~CLib3MFExpNode() +{ +} + +void CLib3MFExpNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFExpNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFExpNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFExpNode * expnodeInstance = new CLib3MFExpNode(); + expnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFExpNode: Invalid call to Constructor"); + } +} + +Local CLib3MFExpNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFLogNode Implementation +**************************************************************************************************************************/ + +CLib3MFLogNode::CLib3MFLogNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFLogNode::~CLib3MFLogNode() +{ +} + +void CLib3MFLogNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFLogNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFLogNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFLogNode * lognodeInstance = new CLib3MFLogNode(); + lognodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFLogNode: Invalid call to Constructor"); + } +} + +Local CLib3MFLogNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFLog2Node Implementation +**************************************************************************************************************************/ + +CLib3MFLog2Node::CLib3MFLog2Node() + : CLib3MFBaseClass() +{ +} + +CLib3MFLog2Node::~CLib3MFLog2Node() +{ +} + +void CLib3MFLog2Node::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFLog2Node")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFLog2Node::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFLog2Node * log2nodeInstance = new CLib3MFLog2Node(); + log2nodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFLog2Node: Invalid call to Constructor"); + } +} + +Local CLib3MFLog2Node::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFLog10Node Implementation +**************************************************************************************************************************/ + +CLib3MFLog10Node::CLib3MFLog10Node() + : CLib3MFBaseClass() +{ +} + +CLib3MFLog10Node::~CLib3MFLog10Node() +{ +} + +void CLib3MFLog10Node::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFLog10Node")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFLog10Node::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFLog10Node * log10nodeInstance = new CLib3MFLog10Node(); + log10nodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFLog10Node: Invalid call to Constructor"); + } +} + +Local CLib3MFLog10Node::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFLengthNode Implementation +**************************************************************************************************************************/ + +CLib3MFLengthNode::CLib3MFLengthNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFLengthNode::~CLib3MFLengthNode() +{ +} + +void CLib3MFLengthNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFLengthNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFLengthNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFLengthNode * lengthnodeInstance = new CLib3MFLengthNode(); + lengthnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFLengthNode: Invalid call to Constructor"); + } +} + +Local CLib3MFLengthNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFTransposeNode Implementation +**************************************************************************************************************************/ + +CLib3MFTransposeNode::CLib3MFTransposeNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFTransposeNode::~CLib3MFTransposeNode() +{ +} + +void CLib3MFTransposeNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFTransposeNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFTransposeNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFTransposeNode * transposenodeInstance = new CLib3MFTransposeNode(); + transposenodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFTransposeNode: Invalid call to Constructor"); + } +} + +Local CLib3MFTransposeNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFInverseNode Implementation +**************************************************************************************************************************/ + +CLib3MFInverseNode::CLib3MFInverseNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFInverseNode::~CLib3MFInverseNode() +{ +} + +void CLib3MFInverseNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFInverseNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFInverseNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFInverseNode * inversenodeInstance = new CLib3MFInverseNode(); + inversenodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFInverseNode: Invalid call to Constructor"); + } +} + +Local CLib3MFInverseNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFSqrtNode Implementation +**************************************************************************************************************************/ + +CLib3MFSqrtNode::CLib3MFSqrtNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFSqrtNode::~CLib3MFSqrtNode() +{ +} + +void CLib3MFSqrtNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFSqrtNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFSqrtNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFSqrtNode * sqrtnodeInstance = new CLib3MFSqrtNode(); + sqrtnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFSqrtNode: Invalid call to Constructor"); + } +} + +Local CLib3MFSqrtNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFResourceIdNode Implementation +**************************************************************************************************************************/ + +CLib3MFResourceIdNode::CLib3MFResourceIdNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFResourceIdNode::~CLib3MFResourceIdNode() +{ +} + +void CLib3MFResourceIdNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFResourceIdNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "SetResource", SetResource); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetResource", GetResource); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputValue", GetOutputValue); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFResourceIdNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFResourceIdNode * resourceidnodeInstance = new CLib3MFResourceIdNode(); + resourceidnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFResourceIdNode: Invalid call to Constructor"); + } +} + +Local CLib3MFResourceIdNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFResourceIdNode::SetResource(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (Resource)"); + } + Local objResource = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFResource * instanceResource = ObjectWrap::Unwrap(objResource); + if (instanceResource == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (Resource)"); + Lib3MFHandle hResource = instanceResource->getHandle( objResource ); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetResource."); + if (wrapperTable->m_ResourceIdNode_SetResource == nullptr) + throw std::runtime_error("Could not call Lib3MF method ResourceIdNode::SetResource."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ResourceIdNode_SetResource(instanceHandle, hResource); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFResourceIdNode::GetResource(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnResource = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetResource."); + if (wrapperTable->m_ResourceIdNode_GetResource == nullptr) + throw std::runtime_error("Could not call Lib3MF method ResourceIdNode::GetResource."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ResourceIdNode_GetResource(instanceHandle, &hReturnResource); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjResource = CLib3MFResource::NewInstance(args.Holder(), hReturnResource); + args.GetReturnValue().Set(instanceObjResource); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFResourceIdNode::GetOutputValue(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnValue = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputValue."); + if (wrapperTable->m_ResourceIdNode_GetOutputValue == nullptr) + throw std::runtime_error("Could not call Lib3MF method ResourceIdNode::GetOutputValue."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ResourceIdNode_GetOutputValue(instanceHandle, &hReturnValue); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjValue = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnValue); + args.GetReturnValue().Set(instanceObjValue); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFTwoInputNode Implementation +**************************************************************************************************************************/ + +CLib3MFTwoInputNode::CLib3MFTwoInputNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFTwoInputNode::~CLib3MFTwoInputNode() +{ +} + +void CLib3MFTwoInputNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFTwoInputNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputB", GetInputB); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFTwoInputNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFTwoInputNode * twoinputnodeInstance = new CLib3MFTwoInputNode(); + twoinputnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFTwoInputNode: Invalid call to Constructor"); + } +} + +Local CLib3MFTwoInputNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFTwoInputNode::GetInputB(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnB = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputB."); + if (wrapperTable->m_TwoInputNode_GetInputB == nullptr) + throw std::runtime_error("Could not call Lib3MF method TwoInputNode::GetInputB."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_TwoInputNode_GetInputB(instanceHandle, &hReturnB); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjB = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnB); + args.GetReturnValue().Set(instanceObjB); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFAdditionNode Implementation +**************************************************************************************************************************/ + +CLib3MFAdditionNode::CLib3MFAdditionNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFAdditionNode::~CLib3MFAdditionNode() +{ +} + +void CLib3MFAdditionNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFAdditionNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFAdditionNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFAdditionNode * additionnodeInstance = new CLib3MFAdditionNode(); + additionnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFAdditionNode: Invalid call to Constructor"); + } +} + +Local CLib3MFAdditionNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFSubtractionNode Implementation +**************************************************************************************************************************/ + +CLib3MFSubtractionNode::CLib3MFSubtractionNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFSubtractionNode::~CLib3MFSubtractionNode() +{ +} + +void CLib3MFSubtractionNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFSubtractionNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFSubtractionNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFSubtractionNode * subtractionnodeInstance = new CLib3MFSubtractionNode(); + subtractionnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFSubtractionNode: Invalid call to Constructor"); + } +} + +Local CLib3MFSubtractionNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFMultiplicationNode Implementation +**************************************************************************************************************************/ + +CLib3MFMultiplicationNode::CLib3MFMultiplicationNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFMultiplicationNode::~CLib3MFMultiplicationNode() +{ +} + +void CLib3MFMultiplicationNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMultiplicationNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFMultiplicationNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFMultiplicationNode * multiplicationnodeInstance = new CLib3MFMultiplicationNode(); + multiplicationnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFMultiplicationNode: Invalid call to Constructor"); + } +} + +Local CLib3MFMultiplicationNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFDivisionNode Implementation +**************************************************************************************************************************/ + +CLib3MFDivisionNode::CLib3MFDivisionNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFDivisionNode::~CLib3MFDivisionNode() +{ +} + +void CLib3MFDivisionNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFDivisionNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFDivisionNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFDivisionNode * divisionnodeInstance = new CLib3MFDivisionNode(); + divisionnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFDivisionNode: Invalid call to Constructor"); + } +} + +Local CLib3MFDivisionNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFDotNode Implementation +**************************************************************************************************************************/ + +CLib3MFDotNode::CLib3MFDotNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFDotNode::~CLib3MFDotNode() +{ +} + +void CLib3MFDotNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFDotNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFDotNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFDotNode * dotnodeInstance = new CLib3MFDotNode(); + dotnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFDotNode: Invalid call to Constructor"); + } +} + +Local CLib3MFDotNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFCrossNode Implementation +**************************************************************************************************************************/ + +CLib3MFCrossNode::CLib3MFCrossNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFCrossNode::~CLib3MFCrossNode() +{ +} + +void CLib3MFCrossNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFCrossNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFCrossNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFCrossNode * crossnodeInstance = new CLib3MFCrossNode(); + crossnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFCrossNode: Invalid call to Constructor"); + } +} + +Local CLib3MFCrossNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFArcTan2Node Implementation +**************************************************************************************************************************/ + +CLib3MFArcTan2Node::CLib3MFArcTan2Node() + : CLib3MFBaseClass() +{ +} + +CLib3MFArcTan2Node::~CLib3MFArcTan2Node() +{ +} + +void CLib3MFArcTan2Node::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFArcTan2Node")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFArcTan2Node::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFArcTan2Node * arctan2nodeInstance = new CLib3MFArcTan2Node(); + arctan2nodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFArcTan2Node: Invalid call to Constructor"); + } +} + +Local CLib3MFArcTan2Node::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFMatVecMultiplicationNode Implementation +**************************************************************************************************************************/ + +CLib3MFMatVecMultiplicationNode::CLib3MFMatVecMultiplicationNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFMatVecMultiplicationNode::~CLib3MFMatVecMultiplicationNode() +{ +} + +void CLib3MFMatVecMultiplicationNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMatVecMultiplicationNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFMatVecMultiplicationNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFMatVecMultiplicationNode * matvecmultiplicationnodeInstance = new CLib3MFMatVecMultiplicationNode(); + matvecmultiplicationnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFMatVecMultiplicationNode: Invalid call to Constructor"); + } +} + +Local CLib3MFMatVecMultiplicationNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFMinNode Implementation +**************************************************************************************************************************/ + +CLib3MFMinNode::CLib3MFMinNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFMinNode::~CLib3MFMinNode() +{ +} + +void CLib3MFMinNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMinNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFMinNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFMinNode * minnodeInstance = new CLib3MFMinNode(); + minnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFMinNode: Invalid call to Constructor"); + } +} + +Local CLib3MFMinNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFMaxNode Implementation +**************************************************************************************************************************/ + +CLib3MFMaxNode::CLib3MFMaxNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFMaxNode::~CLib3MFMaxNode() +{ +} + +void CLib3MFMaxNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMaxNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFMaxNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFMaxNode * maxnodeInstance = new CLib3MFMaxNode(); + maxnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFMaxNode: Invalid call to Constructor"); + } +} + +Local CLib3MFMaxNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFFmodNode Implementation +**************************************************************************************************************************/ + +CLib3MFFmodNode::CLib3MFFmodNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFFmodNode::~CLib3MFFmodNode() +{ +} + +void CLib3MFFmodNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFFmodNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFFmodNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFFmodNode * fmodnodeInstance = new CLib3MFFmodNode(); + fmodnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFFmodNode: Invalid call to Constructor"); + } +} + +Local CLib3MFFmodNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFModNode Implementation +**************************************************************************************************************************/ + +CLib3MFModNode::CLib3MFModNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFModNode::~CLib3MFModNode() +{ +} + +void CLib3MFModNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFModNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFModNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFModNode * modnodeInstance = new CLib3MFModNode(); + modnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFModNode: Invalid call to Constructor"); + } +} + +Local CLib3MFModNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFPowNode Implementation +**************************************************************************************************************************/ + +CLib3MFPowNode::CLib3MFPowNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFPowNode::~CLib3MFPowNode() +{ +} + +void CLib3MFPowNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFPowNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFPowNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFPowNode * pownodeInstance = new CLib3MFPowNode(); + pownodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFPowNode: Invalid call to Constructor"); + } +} + +Local CLib3MFPowNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFSelectNode Implementation +**************************************************************************************************************************/ + +CLib3MFSelectNode::CLib3MFSelectNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFSelectNode::~CLib3MFSelectNode() +{ +} + +void CLib3MFSelectNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFSelectNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputB", GetInputB); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputC", GetInputC); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputD", GetInputD); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFSelectNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFSelectNode * selectnodeInstance = new CLib3MFSelectNode(); + selectnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFSelectNode: Invalid call to Constructor"); + } +} + +Local CLib3MFSelectNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFSelectNode::GetInputB(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnB = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputB."); + if (wrapperTable->m_SelectNode_GetInputB == nullptr) + throw std::runtime_error("Could not call Lib3MF method SelectNode::GetInputB."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_SelectNode_GetInputB(instanceHandle, &hReturnB); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjB = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnB); + args.GetReturnValue().Set(instanceObjB); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFSelectNode::GetInputC(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnC = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputC."); + if (wrapperTable->m_SelectNode_GetInputC == nullptr) + throw std::runtime_error("Could not call Lib3MF method SelectNode::GetInputC."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_SelectNode_GetInputC(instanceHandle, &hReturnC); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjC = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnC); + args.GetReturnValue().Set(instanceObjC); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFSelectNode::GetInputD(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnD = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputD."); + if (wrapperTable->m_SelectNode_GetInputD == nullptr) + throw std::runtime_error("Could not call Lib3MF method SelectNode::GetInputD."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_SelectNode_GetInputD(instanceHandle, &hReturnD); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjD = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnD); + args.GetReturnValue().Set(instanceObjD); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFClampNode Implementation +**************************************************************************************************************************/ + +CLib3MFClampNode::CLib3MFClampNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFClampNode::~CLib3MFClampNode() +{ +} + +void CLib3MFClampNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFClampNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputMin", GetInputMin); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputMax", GetInputMax); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFClampNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFClampNode * clampnodeInstance = new CLib3MFClampNode(); + clampnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFClampNode: Invalid call to Constructor"); + } +} + +Local CLib3MFClampNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFClampNode::GetInputMin(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnMin = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputMin."); + if (wrapperTable->m_ClampNode_GetInputMin == nullptr) + throw std::runtime_error("Could not call Lib3MF method ClampNode::GetInputMin."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ClampNode_GetInputMin(instanceHandle, &hReturnMin); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjMin = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnMin); + args.GetReturnValue().Set(instanceObjMin); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFClampNode::GetInputMax(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnMax = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputMax."); + if (wrapperTable->m_ClampNode_GetInputMax == nullptr) + throw std::runtime_error("Could not call Lib3MF method ClampNode::GetInputMax."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ClampNode_GetInputMax(instanceHandle, &hReturnMax); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjMax = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnMax); + args.GetReturnValue().Set(instanceObjMax); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFComposeVectorNode Implementation +**************************************************************************************************************************/ + +CLib3MFComposeVectorNode::CLib3MFComposeVectorNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFComposeVectorNode::~CLib3MFComposeVectorNode() +{ +} + +void CLib3MFComposeVectorNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFComposeVectorNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputX", GetInputX); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputY", GetInputY); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputZ", GetInputZ); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputResult", GetOutputResult); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFComposeVectorNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFComposeVectorNode * composevectornodeInstance = new CLib3MFComposeVectorNode(); + composevectornodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFComposeVectorNode: Invalid call to Constructor"); + } +} + +Local CLib3MFComposeVectorNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFComposeVectorNode::GetInputX(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnX = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputX."); + if (wrapperTable->m_ComposeVectorNode_GetInputX == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeVectorNode::GetInputX."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeVectorNode_GetInputX(instanceHandle, &hReturnX); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjX = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnX); + args.GetReturnValue().Set(instanceObjX); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeVectorNode::GetInputY(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnY = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputY."); + if (wrapperTable->m_ComposeVectorNode_GetInputY == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeVectorNode::GetInputY."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeVectorNode_GetInputY(instanceHandle, &hReturnY); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjY = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnY); + args.GetReturnValue().Set(instanceObjY); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeVectorNode::GetInputZ(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnZ = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputZ."); + if (wrapperTable->m_ComposeVectorNode_GetInputZ == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeVectorNode::GetInputZ."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeVectorNode_GetInputZ(instanceHandle, &hReturnZ); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjZ = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnZ); + args.GetReturnValue().Set(instanceObjZ); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeVectorNode::GetOutputResult(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnResult = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputResult."); + if (wrapperTable->m_ComposeVectorNode_GetOutputResult == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeVectorNode::GetOutputResult."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeVectorNode_GetOutputResult(instanceHandle, &hReturnResult); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjResult = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnResult); + args.GetReturnValue().Set(instanceObjResult); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFVectorFromScalarNode Implementation +**************************************************************************************************************************/ + +CLib3MFVectorFromScalarNode::CLib3MFVectorFromScalarNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFVectorFromScalarNode::~CLib3MFVectorFromScalarNode() +{ +} + +void CLib3MFVectorFromScalarNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFVectorFromScalarNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFVectorFromScalarNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFVectorFromScalarNode * vectorfromscalarnodeInstance = new CLib3MFVectorFromScalarNode(); + vectorfromscalarnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFVectorFromScalarNode: Invalid call to Constructor"); + } +} + +Local CLib3MFVectorFromScalarNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + +/************************************************************************************************************************* + Class CLib3MFDecomposeVectorNode Implementation +**************************************************************************************************************************/ + +CLib3MFDecomposeVectorNode::CLib3MFDecomposeVectorNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFDecomposeVectorNode::~CLib3MFDecomposeVectorNode() +{ +} + +void CLib3MFDecomposeVectorNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFDecomposeVectorNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputA", GetInputA); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputX", GetOutputX); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputY", GetOutputY); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputZ", GetOutputZ); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFDecomposeVectorNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFDecomposeVectorNode * decomposevectornodeInstance = new CLib3MFDecomposeVectorNode(); + decomposevectornodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFDecomposeVectorNode: Invalid call to Constructor"); + } +} + +Local CLib3MFDecomposeVectorNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFDecomposeVectorNode::GetInputA(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnA = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputA."); + if (wrapperTable->m_DecomposeVectorNode_GetInputA == nullptr) + throw std::runtime_error("Could not call Lib3MF method DecomposeVectorNode::GetInputA."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_DecomposeVectorNode_GetInputA(instanceHandle, &hReturnA); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjA = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnA); + args.GetReturnValue().Set(instanceObjA); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFDecomposeVectorNode::GetOutputX(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnX = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputX."); + if (wrapperTable->m_DecomposeVectorNode_GetOutputX == nullptr) + throw std::runtime_error("Could not call Lib3MF method DecomposeVectorNode::GetOutputX."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_DecomposeVectorNode_GetOutputX(instanceHandle, &hReturnX); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjX = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnX); + args.GetReturnValue().Set(instanceObjX); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFDecomposeVectorNode::GetOutputY(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnY = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputY."); + if (wrapperTable->m_DecomposeVectorNode_GetOutputY == nullptr) + throw std::runtime_error("Could not call Lib3MF method DecomposeVectorNode::GetOutputY."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_DecomposeVectorNode_GetOutputY(instanceHandle, &hReturnY); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjY = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnY); + args.GetReturnValue().Set(instanceObjY); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFDecomposeVectorNode::GetOutputZ(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnZ = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputZ."); + if (wrapperTable->m_DecomposeVectorNode_GetOutputZ == nullptr) + throw std::runtime_error("Could not call Lib3MF method DecomposeVectorNode::GetOutputZ."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_DecomposeVectorNode_GetOutputZ(instanceHandle, &hReturnZ); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjZ = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnZ); + args.GetReturnValue().Set(instanceObjZ); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFComposeMatrixNode Implementation +**************************************************************************************************************************/ + +CLib3MFComposeMatrixNode::CLib3MFComposeMatrixNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFComposeMatrixNode::~CLib3MFComposeMatrixNode() +{ +} + +void CLib3MFComposeMatrixNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFComposeMatrixNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM00", GetInputM00); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM01", GetInputM01); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM02", GetInputM02); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM03", GetInputM03); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM10", GetInputM10); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM11", GetInputM11); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM12", GetInputM12); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM13", GetInputM13); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM20", GetInputM20); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM21", GetInputM21); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM22", GetInputM22); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM23", GetInputM23); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM30", GetInputM30); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM31", GetInputM31); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM32", GetInputM32); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputM33", GetInputM33); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputResult", GetOutputResult); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFComposeMatrixNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFComposeMatrixNode * composematrixnodeInstance = new CLib3MFComposeMatrixNode(); + composematrixnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFComposeMatrixNode: Invalid call to Constructor"); + } +} + +Local CLib3MFComposeMatrixNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFComposeMatrixNode::GetInputM00(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM00 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM00."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM00 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM00."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM00(instanceHandle, &hReturnM00); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM00 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM00); + args.GetReturnValue().Set(instanceObjM00); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM01(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM01 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM01."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM01 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM01."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM01(instanceHandle, &hReturnM01); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM01 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM01); + args.GetReturnValue().Set(instanceObjM01); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM02(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM02 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM02."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM02 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM02."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM02(instanceHandle, &hReturnM02); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM02 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM02); + args.GetReturnValue().Set(instanceObjM02); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM03(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM03 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM03."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM03 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM03."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM03(instanceHandle, &hReturnM03); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM03 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM03); + args.GetReturnValue().Set(instanceObjM03); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM10(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM10 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM10."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM10 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM10."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM10(instanceHandle, &hReturnM10); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM10 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM10); + args.GetReturnValue().Set(instanceObjM10); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM11(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM11 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM11."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM11 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM11."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM11(instanceHandle, &hReturnM11); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM11 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM11); + args.GetReturnValue().Set(instanceObjM11); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM12(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM12 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM12."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM12 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM12."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM12(instanceHandle, &hReturnM12); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM12 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM12); + args.GetReturnValue().Set(instanceObjM12); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM13(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM13 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM13."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM13 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM13."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM13(instanceHandle, &hReturnM13); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM13 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM13); + args.GetReturnValue().Set(instanceObjM13); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM20(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM20 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM20."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM20 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM20."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM20(instanceHandle, &hReturnM20); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM20 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM20); + args.GetReturnValue().Set(instanceObjM20); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM21(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM21 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM21."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM21 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM21."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM21(instanceHandle, &hReturnM21); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM21 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM21); + args.GetReturnValue().Set(instanceObjM21); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM22(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM22 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM22."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM22 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM22."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM22(instanceHandle, &hReturnM22); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM22 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM22); + args.GetReturnValue().Set(instanceObjM22); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM23(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM23 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM23."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM23 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM23."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM23(instanceHandle, &hReturnM23); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM23 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM23); + args.GetReturnValue().Set(instanceObjM23); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM30(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM30 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM30."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM30 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM30."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM30(instanceHandle, &hReturnM30); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM30 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM30); + args.GetReturnValue().Set(instanceObjM30); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM31(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM31 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM31."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM31 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM31."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM31(instanceHandle, &hReturnM31); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM31 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM31); + args.GetReturnValue().Set(instanceObjM31); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM32(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM32 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM32."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM32 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM32."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM32(instanceHandle, &hReturnM32); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM32 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM32); + args.GetReturnValue().Set(instanceObjM32); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetInputM33(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnM33 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputM33."); + if (wrapperTable->m_ComposeMatrixNode_GetInputM33 == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetInputM33."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetInputM33(instanceHandle, &hReturnM33); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjM33 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnM33); + args.GetReturnValue().Set(instanceObjM33); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFComposeMatrixNode::GetOutputResult(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnResult = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputResult."); + if (wrapperTable->m_ComposeMatrixNode_GetOutputResult == nullptr) + throw std::runtime_error("Could not call Lib3MF method ComposeMatrixNode::GetOutputResult."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ComposeMatrixNode_GetOutputResult(instanceHandle, &hReturnResult); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjResult = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnResult); + args.GetReturnValue().Set(instanceObjResult); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFMatrixFromRowsNode Implementation +**************************************************************************************************************************/ + +CLib3MFMatrixFromRowsNode::CLib3MFMatrixFromRowsNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFMatrixFromRowsNode::~CLib3MFMatrixFromRowsNode() +{ +} + +void CLib3MFMatrixFromRowsNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMatrixFromRowsNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputA", GetInputA); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputB", GetInputB); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputC", GetInputC); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputD", GetInputD); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputResult", GetOutputResult); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFMatrixFromRowsNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFMatrixFromRowsNode * matrixfromrowsnodeInstance = new CLib3MFMatrixFromRowsNode(); + matrixfromrowsnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFMatrixFromRowsNode: Invalid call to Constructor"); + } +} + +Local CLib3MFMatrixFromRowsNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFMatrixFromRowsNode::GetInputA(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnRow0 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputA."); + if (wrapperTable->m_MatrixFromRowsNode_GetInputA == nullptr) + throw std::runtime_error("Could not call Lib3MF method MatrixFromRowsNode::GetInputA."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MatrixFromRowsNode_GetInputA(instanceHandle, &hReturnRow0); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjRow0 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnRow0); + args.GetReturnValue().Set(instanceObjRow0); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMatrixFromRowsNode::GetInputB(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnRow1 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputB."); + if (wrapperTable->m_MatrixFromRowsNode_GetInputB == nullptr) + throw std::runtime_error("Could not call Lib3MF method MatrixFromRowsNode::GetInputB."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MatrixFromRowsNode_GetInputB(instanceHandle, &hReturnRow1); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjRow1 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnRow1); + args.GetReturnValue().Set(instanceObjRow1); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMatrixFromRowsNode::GetInputC(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnRow2 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputC."); + if (wrapperTable->m_MatrixFromRowsNode_GetInputC == nullptr) + throw std::runtime_error("Could not call Lib3MF method MatrixFromRowsNode::GetInputC."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MatrixFromRowsNode_GetInputC(instanceHandle, &hReturnRow2); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjRow2 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnRow2); + args.GetReturnValue().Set(instanceObjRow2); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMatrixFromRowsNode::GetInputD(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnRow3 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputD."); + if (wrapperTable->m_MatrixFromRowsNode_GetInputD == nullptr) + throw std::runtime_error("Could not call Lib3MF method MatrixFromRowsNode::GetInputD."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MatrixFromRowsNode_GetInputD(instanceHandle, &hReturnRow3); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjRow3 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnRow3); + args.GetReturnValue().Set(instanceObjRow3); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMatrixFromRowsNode::GetOutputResult(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnResult = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputResult."); + if (wrapperTable->m_MatrixFromRowsNode_GetOutputResult == nullptr) + throw std::runtime_error("Could not call Lib3MF method MatrixFromRowsNode::GetOutputResult."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MatrixFromRowsNode_GetOutputResult(instanceHandle, &hReturnResult); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjResult = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnResult); + args.GetReturnValue().Set(instanceObjResult); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFMatrixFromColumnsNode Implementation +**************************************************************************************************************************/ + +CLib3MFMatrixFromColumnsNode::CLib3MFMatrixFromColumnsNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFMatrixFromColumnsNode::~CLib3MFMatrixFromColumnsNode() +{ +} + +void CLib3MFMatrixFromColumnsNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMatrixFromColumnsNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputA", GetInputA); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputB", GetInputB); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputC", GetInputC); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputD", GetInputD); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputResult", GetOutputResult); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFMatrixFromColumnsNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFMatrixFromColumnsNode * matrixfromcolumnsnodeInstance = new CLib3MFMatrixFromColumnsNode(); + matrixfromcolumnsnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFMatrixFromColumnsNode: Invalid call to Constructor"); + } +} + +Local CLib3MFMatrixFromColumnsNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFMatrixFromColumnsNode::GetInputA(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnColumn0 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputA."); + if (wrapperTable->m_MatrixFromColumnsNode_GetInputA == nullptr) + throw std::runtime_error("Could not call Lib3MF method MatrixFromColumnsNode::GetInputA."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MatrixFromColumnsNode_GetInputA(instanceHandle, &hReturnColumn0); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjColumn0 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnColumn0); + args.GetReturnValue().Set(instanceObjColumn0); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMatrixFromColumnsNode::GetInputB(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnColumn1 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputB."); + if (wrapperTable->m_MatrixFromColumnsNode_GetInputB == nullptr) + throw std::runtime_error("Could not call Lib3MF method MatrixFromColumnsNode::GetInputB."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MatrixFromColumnsNode_GetInputB(instanceHandle, &hReturnColumn1); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjColumn1 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnColumn1); + args.GetReturnValue().Set(instanceObjColumn1); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMatrixFromColumnsNode::GetInputC(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnColumn2 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputC."); + if (wrapperTable->m_MatrixFromColumnsNode_GetInputC == nullptr) + throw std::runtime_error("Could not call Lib3MF method MatrixFromColumnsNode::GetInputC."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MatrixFromColumnsNode_GetInputC(instanceHandle, &hReturnColumn2); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjColumn2 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnColumn2); + args.GetReturnValue().Set(instanceObjColumn2); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMatrixFromColumnsNode::GetInputD(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnColumn3 = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputD."); + if (wrapperTable->m_MatrixFromColumnsNode_GetInputD == nullptr) + throw std::runtime_error("Could not call Lib3MF method MatrixFromColumnsNode::GetInputD."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MatrixFromColumnsNode_GetInputD(instanceHandle, &hReturnColumn3); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjColumn3 = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnColumn3); + args.GetReturnValue().Set(instanceObjColumn3); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFMatrixFromColumnsNode::GetOutputResult(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnResult = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputResult."); + if (wrapperTable->m_MatrixFromColumnsNode_GetOutputResult == nullptr) + throw std::runtime_error("Could not call Lib3MF method MatrixFromColumnsNode::GetOutputResult."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_MatrixFromColumnsNode_GetOutputResult(instanceHandle, &hReturnResult); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjResult = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnResult); + args.GetReturnValue().Set(instanceObjResult); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFConstantNode Implementation +**************************************************************************************************************************/ + +CLib3MFConstantNode::CLib3MFConstantNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFConstantNode::~CLib3MFConstantNode() +{ +} + +void CLib3MFConstantNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFConstantNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "SetConstant", SetConstant); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetConstant", GetConstant); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputValue", GetOutputValue); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFConstantNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFConstantNode * constantnodeInstance = new CLib3MFConstantNode(); + constantnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFConstantNode: Invalid call to Constructor"); + } +} + +Local CLib3MFConstantNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFConstantNode::SetConstant(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsNumber()) { + throw std::runtime_error("Expected double parameter 0 (Value)"); + } + double dValue = (double) args[0]->NumberValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetConstant."); + if (wrapperTable->m_ConstantNode_SetConstant == nullptr) + throw std::runtime_error("Could not call Lib3MF method ConstantNode::SetConstant."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ConstantNode_SetConstant(instanceHandle, dValue); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFConstantNode::GetConstant(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + double dReturnValue = 0.0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetConstant."); + if (wrapperTable->m_ConstantNode_GetConstant == nullptr) + throw std::runtime_error("Could not call Lib3MF method ConstantNode::GetConstant."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ConstantNode_GetConstant(instanceHandle, &dReturnValue); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Number::New(isolate, dReturnValue)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFConstantNode::GetOutputValue(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnValue = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputValue."); + if (wrapperTable->m_ConstantNode_GetOutputValue == nullptr) + throw std::runtime_error("Could not call Lib3MF method ConstantNode::GetOutputValue."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ConstantNode_GetOutputValue(instanceHandle, &hReturnValue); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjValue = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnValue); + args.GetReturnValue().Set(instanceObjValue); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFConstVecNode Implementation +**************************************************************************************************************************/ + +CLib3MFConstVecNode::CLib3MFConstVecNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFConstVecNode::~CLib3MFConstVecNode() +{ +} + +void CLib3MFConstVecNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFConstVecNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "SetVector", SetVector); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetVector", GetVector); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputVector", GetOutputVector); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFConstVecNode::New(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFConstVecNode * constvecnodeInstance = new CLib3MFConstVecNode(); + constvecnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFConstVecNode: Invalid call to Constructor"); + } +} + +Local CLib3MFConstVecNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} + + +void CLib3MFConstVecNode::SetVector(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected struct parameter 0 (Value)"); + } + sLib3MFVector sValue = convertObjectToLib3MFVector(isolate, args[0]); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetVector."); + if (wrapperTable->m_ConstVecNode_SetVector == nullptr) + throw std::runtime_error("Could not call Lib3MF method ConstVecNode::SetVector."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ConstVecNode_SetVector(instanceHandle, &sValue); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFConstVecNode::GetVector(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + sLib3MFVector sReturnValue; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetVector."); + if (wrapperTable->m_ConstVecNode_GetVector == nullptr) + throw std::runtime_error("Could not call Lib3MF method ConstVecNode::GetVector."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ConstVecNode_GetVector(instanceHandle, &sReturnValue); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(convertLib3MFVectorToObject(isolate, sReturnValue)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFConstVecNode::GetOutputVector(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnVector = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputVector."); + if (wrapperTable->m_ConstVecNode_GetOutputVector == nullptr) + throw std::runtime_error("Could not call Lib3MF method ConstVecNode::GetOutputVector."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ConstVecNode_GetOutputVector(instanceHandle, &hReturnVector); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjVector = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnVector); + args.GetReturnValue().Set(instanceObjVector); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFConstMatNode Implementation +**************************************************************************************************************************/ + +CLib3MFConstMatNode::CLib3MFConstMatNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFConstMatNode::~CLib3MFConstMatNode() +{ +} + +void CLib3MFConstMatNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFConstMatNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); - } catch (std::exception & E) { - RaiseError(isolate, E.what()); - } -} + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "SetMatrix", SetMatrix); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetMatrix", GetMatrix); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputMatrix", GetOutputMatrix); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); +} -void CLib3MFBeamLattice::SetBalls(const FunctionCallbackInfo& args) +void CLib3MFConstMatNode::New(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); - try { - sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); - if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBalls."); - if (wrapperTable->m_BeamLattice_SetBalls == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::SetBalls."); - Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_SetBalls(instanceHandle, 0, nullptr); - CheckError(isolate, wrapperTable, instanceHandle, errorCode); - } catch (std::exception & E) { - RaiseError(isolate, E.what()); + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFConstMatNode * constmatnodeInstance = new CLib3MFConstMatNode(); + constmatnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFConstMatNode: Invalid call to Constructor"); } } - -void CLib3MFBeamLattice::GetBalls(const FunctionCallbackInfo& args) +Local CLib3MFConstMatNode::NewInstance(Local pParent, Lib3MFHandle pHandle) { - Isolate* isolate = args.GetIsolate(); + Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); - try { - sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); - if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBalls."); - if (wrapperTable->m_BeamLattice_GetBalls == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBalls."); - Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBalls(instanceHandle, 0, nullptr, nullptr); - CheckError(isolate, wrapperTable, instanceHandle, errorCode); - - } catch (std::exception & E) { - RaiseError(isolate, E.what()); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); } + return instance; } -void CLib3MFBeamLattice::GetBeamSetCount(const FunctionCallbackInfo& args) +void CLib3MFConstMatNode::SetMatrix(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected struct parameter 0 (Value)"); + } + sLib3MFMatrix4x4 sValue = convertObjectToLib3MFMatrix4x4(isolate, args[0]); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBeamSetCount."); - if (wrapperTable->m_BeamLattice_GetBeamSetCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBeamSetCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetMatrix."); + if (wrapperTable->m_ConstMatNode_SetMatrix == nullptr) + throw std::runtime_error("Could not call Lib3MF method ConstMatNode::SetMatrix."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBeamSetCount(instanceHandle, &nReturnCount); + Lib3MFResult errorCode = wrapperTable->m_ConstMatNode_SetMatrix(instanceHandle, &sValue); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5587,22 +15559,21 @@ void CLib3MFBeamLattice::GetBeamSetCount(const FunctionCallbackInfo& args } -void CLib3MFBeamLattice::AddBeamSet(const FunctionCallbackInfo& args) +void CLib3MFConstMatNode::GetMatrix(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - Lib3MFHandle hReturnBeamSet = nullptr; + sLib3MFMatrix4x4 sReturnValue; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method AddBeamSet."); - if (wrapperTable->m_BeamLattice_AddBeamSet == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::AddBeamSet."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetMatrix."); + if (wrapperTable->m_ConstMatNode_GetMatrix == nullptr) + throw std::runtime_error("Could not call Lib3MF method ConstMatNode::GetMatrix."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_AddBeamSet(instanceHandle, &hReturnBeamSet); + Lib3MFResult errorCode = wrapperTable->m_ConstMatNode_GetMatrix(instanceHandle, &sReturnValue); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - Local instanceObjBeamSet = CLib3MFBeamSet::NewInstance(args.Holder(), hReturnBeamSet); - args.GetReturnValue().Set(instanceObjBeamSet); + args.GetReturnValue().Set(convertLib3MFMatrix4x4ToObject(isolate, sReturnValue)); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5610,26 +15581,22 @@ void CLib3MFBeamLattice::AddBeamSet(const FunctionCallbackInfo& args) } -void CLib3MFBeamLattice::GetBeamSet(const FunctionCallbackInfo& args) +void CLib3MFConstMatNode::GetOutputMatrix(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (Index)"); - } - unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - Lib3MFHandle hReturnBeamSet = nullptr; + Lib3MFHandle hReturnMatrix = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBeamSet."); - if (wrapperTable->m_BeamLattice_GetBeamSet == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamLattice::GetBeamSet."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputMatrix."); + if (wrapperTable->m_ConstMatNode_GetOutputMatrix == nullptr) + throw std::runtime_error("Could not call Lib3MF method ConstMatNode::GetOutputMatrix."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamLattice_GetBeamSet(instanceHandle, nIndex, &hReturnBeamSet); + Lib3MFResult errorCode = wrapperTable->m_ConstMatNode_GetOutputMatrix(instanceHandle, &hReturnMatrix); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - Local instanceObjBeamSet = CLib3MFBeamSet::NewInstance(args.Holder(), hReturnBeamSet); - args.GetReturnValue().Set(instanceObjBeamSet); + Local instanceObjMatrix = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnMatrix); + args.GetReturnValue().Set(instanceObjMatrix); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5637,55 +15604,51 @@ void CLib3MFBeamLattice::GetBeamSet(const FunctionCallbackInfo& args) } /************************************************************************************************************************* - Class CLib3MFComponent Implementation + Class CLib3MFMeshNode Implementation **************************************************************************************************************************/ -CLib3MFComponent::CLib3MFComponent() +CLib3MFMeshNode::CLib3MFMeshNode() : CLib3MFBaseClass() { } -CLib3MFComponent::~CLib3MFComponent() +CLib3MFMeshNode::~CLib3MFMeshNode() { } -void CLib3MFComponent::Init() +void CLib3MFMeshNode::Init() { Isolate* isolate = Isolate::GetCurrent(); // Prepare constructor template Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFComponent")); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMeshNode")); tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "GetObjectResource", GetObjectResource); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetObjectResourceID", GetObjectResourceID); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetUUID", GetUUID); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetUUID", SetUUID); - NODE_SET_PROTOTYPE_METHOD(tpl, "HasTransform", HasTransform); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetTransform", GetTransform); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetTransform", SetTransform); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputMesh", GetInputMesh); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputPos", GetInputPos); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputDistance", GetOutputDistance); constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); } -void CLib3MFComponent::New(const FunctionCallbackInfo& args) +void CLib3MFMeshNode::New(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); if (args.IsConstructCall()) { CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFComponent * componentInstance = new CLib3MFComponent(); - componentInstance->Wrap(args.This()); + CLib3MFMeshNode * meshnodeInstance = new CLib3MFMeshNode(); + meshnodeInstance->Wrap(args.This()); args.GetReturnValue().Set(args.This()); } else { - RaiseError(isolate, "Lib3MFComponent: Invalid call to Constructor"); + RaiseError(isolate, "Lib3MFMeshNode: Invalid call to Constructor"); } } -Local CLib3MFComponent::NewInstance(Local pParent, Lib3MFHandle pHandle) +Local CLib3MFMeshNode::NewInstance(Local pParent, Lib3MFHandle pHandle) { Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); @@ -5699,22 +15662,22 @@ Local CLib3MFComponent::NewInstance(Local pParent, Lib3MFHandle } -void CLib3MFComponent::GetObjectResource(const FunctionCallbackInfo& args) +void CLib3MFMeshNode::GetInputMesh(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - Lib3MFHandle hReturnObjectResource = nullptr; + Lib3MFHandle hReturnMesh = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetObjectResource."); - if (wrapperTable->m_Component_GetObjectResource == nullptr) - throw std::runtime_error("Could not call Lib3MF method Component::GetObjectResource."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputMesh."); + if (wrapperTable->m_MeshNode_GetInputMesh == nullptr) + throw std::runtime_error("Could not call Lib3MF method MeshNode::GetInputMesh."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Component_GetObjectResource(instanceHandle, &hReturnObjectResource); + Lib3MFResult errorCode = wrapperTable->m_MeshNode_GetInputMesh(instanceHandle, &hReturnMesh); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - Local instanceObjObjectResource = CLib3MFObject::NewInstance(args.Holder(), hReturnObjectResource); - args.GetReturnValue().Set(instanceObjObjectResource); + Local instanceObjMesh = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnMesh); + args.GetReturnValue().Set(instanceObjMesh); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5722,21 +15685,22 @@ void CLib3MFComponent::GetObjectResource(const FunctionCallbackInfo& args } -void CLib3MFComponent::GetObjectResourceID(const FunctionCallbackInfo& args) +void CLib3MFMeshNode::GetInputPos(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnUniqueResourceID = 0; + Lib3MFHandle hReturnPos = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetObjectResourceID."); - if (wrapperTable->m_Component_GetObjectResourceID == nullptr) - throw std::runtime_error("Could not call Lib3MF method Component::GetObjectResourceID."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputPos."); + if (wrapperTable->m_MeshNode_GetInputPos == nullptr) + throw std::runtime_error("Could not call Lib3MF method MeshNode::GetInputPos."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Component_GetObjectResourceID(instanceHandle, &nReturnUniqueResourceID); + Lib3MFResult errorCode = wrapperTable->m_MeshNode_GetInputPos(instanceHandle, &hReturnPos); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnUniqueResourceID)); + Local instanceObjPos = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnPos); + args.GetReturnValue().Set(instanceObjPos); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5744,77 +15708,103 @@ void CLib3MFComponent::GetObjectResourceID(const FunctionCallbackInfo& ar } -void CLib3MFComponent::GetUUID(const FunctionCallbackInfo& args) +void CLib3MFMeshNode::GetOutputDistance(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - Local outObject = Object::New(isolate); - bool bReturnHasUUID = false; - unsigned int bytesNeededUUID = 0; - unsigned int bytesWrittenUUID = 0; + Lib3MFHandle hReturnDistance = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetUUID."); - if (wrapperTable->m_Component_GetUUID == nullptr) - throw std::runtime_error("Could not call Lib3MF method Component::GetUUID."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputDistance."); + if (wrapperTable->m_MeshNode_GetOutputDistance == nullptr) + throw std::runtime_error("Could not call Lib3MF method MeshNode::GetOutputDistance."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult initErrorCode = wrapperTable->m_Component_GetUUID(instanceHandle, &bReturnHasUUID, 0, &bytesNeededUUID, nullptr); - CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); - std::vector bufferUUID; - bufferUUID.resize(bytesNeededUUID); - Lib3MFResult errorCode = wrapperTable->m_Component_GetUUID(instanceHandle, &bReturnHasUUID, bytesNeededUUID, &bytesWrittenUUID, &bufferUUID[0]); + Lib3MFResult errorCode = wrapperTable->m_MeshNode_GetOutputDistance(instanceHandle, &hReturnDistance); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "HasUUID"), Boolean::New(isolate, bReturnHasUUID)); - outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "UUID"), String::NewFromUtf8(isolate, &bufferUUID[0])); - args.GetReturnValue().Set(outObject); + Local instanceObjDistance = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnDistance); + args.GetReturnValue().Set(instanceObjDistance); } catch (std::exception & E) { RaiseError(isolate, E.what()); } } +/************************************************************************************************************************* + Class CLib3MFUnsignedMeshNode Implementation +**************************************************************************************************************************/ -void CLib3MFComponent::SetUUID(const FunctionCallbackInfo& args) +CLib3MFUnsignedMeshNode::CLib3MFUnsignedMeshNode() + : CLib3MFBaseClass() +{ +} + +CLib3MFUnsignedMeshNode::~CLib3MFUnsignedMeshNode() +{ +} + +void CLib3MFUnsignedMeshNode::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFUnsignedMeshNode")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); + + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputMesh", GetInputMesh); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputPos", GetInputPos); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputDistance", GetOutputDistance); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); + +} + +void CLib3MFUnsignedMeshNode::New(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); - try { - if (!args[0]->IsString()) { - throw std::runtime_error("Expected string parameter 0 (UUID)"); - } - v8::String::Utf8Value sutf8UUID(isolate, args[0]); - std::string sUUID = *sutf8UUID; - sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); - if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetUUID."); - if (wrapperTable->m_Component_SetUUID == nullptr) - throw std::runtime_error("Could not call Lib3MF method Component::SetUUID."); - Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Component_SetUUID(instanceHandle, sUUID.c_str()); - CheckError(isolate, wrapperTable, instanceHandle, errorCode); - } catch (std::exception & E) { - RaiseError(isolate, E.what()); + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFUnsignedMeshNode * unsignedmeshnodeInstance = new CLib3MFUnsignedMeshNode(); + unsignedmeshnodeInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFUnsignedMeshNode: Invalid call to Constructor"); + } +} + +Local CLib3MFUnsignedMeshNode::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); } + return instance; } -void CLib3MFComponent::HasTransform(const FunctionCallbackInfo& args) +void CLib3MFUnsignedMeshNode::GetInputMesh(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - bool bReturnHasTransform = false; + Lib3MFHandle hReturnMesh = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method HasTransform."); - if (wrapperTable->m_Component_HasTransform == nullptr) - throw std::runtime_error("Could not call Lib3MF method Component::HasTransform."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputMesh."); + if (wrapperTable->m_UnsignedMeshNode_GetInputMesh == nullptr) + throw std::runtime_error("Could not call Lib3MF method UnsignedMeshNode::GetInputMesh."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Component_HasTransform(instanceHandle, &bReturnHasTransform); + Lib3MFResult errorCode = wrapperTable->m_UnsignedMeshNode_GetInputMesh(instanceHandle, &hReturnMesh); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Boolean::New(isolate, bReturnHasTransform)); + Local instanceObjMesh = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnMesh); + args.GetReturnValue().Set(instanceObjMesh); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5822,21 +15812,22 @@ void CLib3MFComponent::HasTransform(const FunctionCallbackInfo& args) } -void CLib3MFComponent::GetTransform(const FunctionCallbackInfo& args) +void CLib3MFUnsignedMeshNode::GetInputPos(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - sLib3MFTransform sReturnTransform; + Lib3MFHandle hReturnPos = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTransform."); - if (wrapperTable->m_Component_GetTransform == nullptr) - throw std::runtime_error("Could not call Lib3MF method Component::GetTransform."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputPos."); + if (wrapperTable->m_UnsignedMeshNode_GetInputPos == nullptr) + throw std::runtime_error("Could not call Lib3MF method UnsignedMeshNode::GetInputPos."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Component_GetTransform(instanceHandle, &sReturnTransform); + Lib3MFResult errorCode = wrapperTable->m_UnsignedMeshNode_GetInputPos(instanceHandle, &hReturnPos); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(convertLib3MFTransformToObject(isolate, sReturnTransform)); + Local instanceObjPos = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnPos); + args.GetReturnValue().Set(instanceObjPos); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5844,23 +15835,22 @@ void CLib3MFComponent::GetTransform(const FunctionCallbackInfo& args) } -void CLib3MFComponent::SetTransform(const FunctionCallbackInfo& args) +void CLib3MFUnsignedMeshNode::GetOutputDistance(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsObject()) { - throw std::runtime_error("Expected struct parameter 0 (Transform)"); - } - sLib3MFTransform sTransform = convertObjectToLib3MFTransform(isolate, args[0]); + Lib3MFHandle hReturnDistance = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetTransform."); - if (wrapperTable->m_Component_SetTransform == nullptr) - throw std::runtime_error("Could not call Lib3MF method Component::SetTransform."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputDistance."); + if (wrapperTable->m_UnsignedMeshNode_GetOutputDistance == nullptr) + throw std::runtime_error("Could not call Lib3MF method UnsignedMeshNode::GetOutputDistance."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Component_SetTransform(instanceHandle, &sTransform); + Lib3MFResult errorCode = wrapperTable->m_UnsignedMeshNode_GetOutputDistance(instanceHandle, &hReturnDistance); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjDistance = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnDistance); + args.GetReturnValue().Set(instanceObjDistance); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -5868,51 +15858,49 @@ void CLib3MFComponent::SetTransform(const FunctionCallbackInfo& args) } /************************************************************************************************************************* - Class CLib3MFComponentsObject Implementation + Class CLib3MFFunctionCallNode Implementation **************************************************************************************************************************/ -CLib3MFComponentsObject::CLib3MFComponentsObject() +CLib3MFFunctionCallNode::CLib3MFFunctionCallNode() : CLib3MFBaseClass() { } -CLib3MFComponentsObject::~CLib3MFComponentsObject() +CLib3MFFunctionCallNode::~CLib3MFFunctionCallNode() { } -void CLib3MFComponentsObject::Init() +void CLib3MFFunctionCallNode::Init() { Isolate* isolate = Isolate::GetCurrent(); // Prepare constructor template Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFComponentsObject")); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFFunctionCallNode")); tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "AddComponent", AddComponent); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetComponent", GetComponent); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetComponentCount", GetComponentCount); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputFunctionID", GetInputFunctionID); constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); } -void CLib3MFComponentsObject::New(const FunctionCallbackInfo& args) +void CLib3MFFunctionCallNode::New(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); if (args.IsConstructCall()) { CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFComponentsObject * componentsobjectInstance = new CLib3MFComponentsObject(); - componentsobjectInstance->Wrap(args.This()); + CLib3MFFunctionCallNode * functioncallnodeInstance = new CLib3MFFunctionCallNode(); + functioncallnodeInstance->Wrap(args.This()); args.GetReturnValue().Set(args.This()); } else { - RaiseError(isolate, "Lib3MFComponentsObject: Invalid call to Constructor"); + RaiseError(isolate, "Lib3MFFunctionCallNode: Invalid call to Constructor"); } } -Local CLib3MFComponentsObject::NewInstance(Local pParent, Lib3MFHandle pHandle) +Local CLib3MFFunctionCallNode::NewInstance(Local pParent, Lib3MFHandle pHandle) { Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); @@ -5926,83 +15914,101 @@ Local CLib3MFComponentsObject::NewInstance(Local pParent, Lib3MF } -void CLib3MFComponentsObject::AddComponent(const FunctionCallbackInfo& args) +void CLib3MFFunctionCallNode::GetInputFunctionID(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsObject()) { - throw std::runtime_error("Expected class parameter 0 (ObjectResource)"); - } - if (!args[1]->IsObject()) { - throw std::runtime_error("Expected struct parameter 1 (Transform)"); - } - Local objObjectResource = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); - CLib3MFObject * instanceObjectResource = ObjectWrap::Unwrap(objObjectResource); - if (instanceObjectResource == nullptr) - throw std::runtime_error("Invalid Object parameter 0 (ObjectResource)"); - Lib3MFHandle hObjectResource = instanceObjectResource->getHandle( objObjectResource ); - sLib3MFTransform sTransform = convertObjectToLib3MFTransform(isolate, args[1]); - Lib3MFHandle hReturnComponentInstance = nullptr; + Lib3MFHandle hReturnFunction = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method AddComponent."); - if (wrapperTable->m_ComponentsObject_AddComponent == nullptr) - throw std::runtime_error("Could not call Lib3MF method ComponentsObject::AddComponent."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputFunctionID."); + if (wrapperTable->m_FunctionCallNode_GetInputFunctionID == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionCallNode::GetInputFunctionID."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_ComponentsObject_AddComponent(instanceHandle, hObjectResource, &sTransform, &hReturnComponentInstance); + Lib3MFResult errorCode = wrapperTable->m_FunctionCallNode_GetInputFunctionID(instanceHandle, &hReturnFunction); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - Local instanceObjComponentInstance = CLib3MFComponent::NewInstance(args.Holder(), hReturnComponentInstance); - args.GetReturnValue().Set(instanceObjComponentInstance); + Local instanceObjFunction = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnFunction); + args.GetReturnValue().Set(instanceObjFunction); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + +/************************************************************************************************************************* + Class CLib3MFNodeIterator Implementation +**************************************************************************************************************************/ + +CLib3MFNodeIterator::CLib3MFNodeIterator() + : CLib3MFBaseClass() +{ +} + +CLib3MFNodeIterator::~CLib3MFNodeIterator() +{ +} + +void CLib3MFNodeIterator::Init() +{ + Isolate* isolate = Isolate::GetCurrent(); + + // Prepare constructor template + Local tpl = FunctionTemplate::New(isolate, New); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFNodeIterator")); + tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); - } catch (std::exception & E) { - RaiseError(isolate, E.what()); - } -} + // Prototype + NODE_SET_PROTOTYPE_METHOD(tpl, "GetCurrent", GetCurrent); + constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); +} -void CLib3MFComponentsObject::GetComponent(const FunctionCallbackInfo& args) +void CLib3MFNodeIterator::New(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); - try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (Index)"); - } - unsigned int nIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - Lib3MFHandle hReturnComponentInstance = nullptr; - sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); - if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetComponent."); - if (wrapperTable->m_ComponentsObject_GetComponent == nullptr) - throw std::runtime_error("Could not call Lib3MF method ComponentsObject::GetComponent."); - Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_ComponentsObject_GetComponent(instanceHandle, nIndex, &hReturnComponentInstance); - CheckError(isolate, wrapperTable, instanceHandle, errorCode); - Local instanceObjComponentInstance = CLib3MFComponent::NewInstance(args.Holder(), hReturnComponentInstance); - args.GetReturnValue().Set(instanceObjComponentInstance); - } catch (std::exception & E) { - RaiseError(isolate, E.what()); + if (args.IsConstructCall()) { + CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); + CLib3MFNodeIterator * nodeiteratorInstance = new CLib3MFNodeIterator(); + nodeiteratorInstance->Wrap(args.This()); + args.GetReturnValue().Set(args.This()); + } else { + RaiseError(isolate, "Lib3MFNodeIterator: Invalid call to Constructor"); } } +Local CLib3MFNodeIterator::NewInstance(Local pParent, Lib3MFHandle pHandle) +{ + Isolate* isolate = Isolate::GetCurrent(); + HandleScope scope(isolate); + Local cons = Local::New(isolate, constructor); + Local instance; + if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { + instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); + instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } + return instance; +} -void CLib3MFComponentsObject::GetComponentCount(const FunctionCallbackInfo& args) + +void CLib3MFNodeIterator::GetCurrent(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetComponentCount."); - if (wrapperTable->m_ComponentsObject_GetComponentCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method ComponentsObject::GetComponentCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCurrent."); + if (wrapperTable->m_NodeIterator_GetCurrent == nullptr) + throw std::runtime_error("Could not call Lib3MF method NodeIterator::GetCurrent."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_ComponentsObject_GetComponentCount(instanceHandle, &nReturnCount); + Lib3MFResult errorCode = wrapperTable->m_NodeIterator_GetCurrent(instanceHandle, &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + Local instanceObjNode = CLib3MFImplicitNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6010,58 +16016,58 @@ void CLib3MFComponentsObject::GetComponentCount(const FunctionCallbackInfo tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFBeamSet")); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFFunction")); tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "SetName", SetName); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetName", GetName); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetIdentifier", SetIdentifier); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetIdentifier", GetIdentifier); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetReferenceCount", GetReferenceCount); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetReferences", SetReferences); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetReferences", GetReferences); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBallReferenceCount", GetBallReferenceCount); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetBallReferences", SetBallReferences); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBallReferences", GetBallReferences); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetDisplayName", GetDisplayName); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetDisplayName", SetDisplayName); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddInput", AddInput); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetInputs", GetInputs); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveInput", RemoveInput); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddOutput", AddOutput); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOutputs", GetOutputs); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveOutput", RemoveOutput); + NODE_SET_PROTOTYPE_METHOD(tpl, "FindInput", FindInput); + NODE_SET_PROTOTYPE_METHOD(tpl, "FindOutput", FindOutput); constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); } -void CLib3MFBeamSet::New(const FunctionCallbackInfo& args) +void CLib3MFFunction::New(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); if (args.IsConstructCall()) { CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFBeamSet * beamsetInstance = new CLib3MFBeamSet(); - beamsetInstance->Wrap(args.This()); + CLib3MFFunction * functionInstance = new CLib3MFFunction(); + functionInstance->Wrap(args.This()); args.GetReturnValue().Set(args.This()); } else { - RaiseError(isolate, "Lib3MFBeamSet: Invalid call to Constructor"); + RaiseError(isolate, "Lib3MFFunction: Invalid call to Constructor"); } } -Local CLib3MFBeamSet::NewInstance(Local pParent, Lib3MFHandle pHandle) +Local CLib3MFFunction::NewInstance(Local pParent, Lib3MFHandle pHandle) { Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); @@ -6075,24 +16081,26 @@ Local CLib3MFBeamSet::NewInstance(Local pParent, Lib3MFHandle pH } -void CLib3MFBeamSet::SetName(const FunctionCallbackInfo& args) +void CLib3MFFunction::GetDisplayName(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsString()) { - throw std::runtime_error("Expected string parameter 0 (Name)"); - } - v8::String::Utf8Value sutf8Name(isolate, args[0]); - std::string sName = *sutf8Name; + unsigned int bytesNeededDisplayName = 0; + unsigned int bytesWrittenDisplayName = 0; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetName."); - if (wrapperTable->m_BeamSet_SetName == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamSet::SetName."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetDisplayName."); + if (wrapperTable->m_Function_GetDisplayName == nullptr) + throw std::runtime_error("Could not call Lib3MF method Function::GetDisplayName."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamSet_SetName(instanceHandle, sName.c_str()); + Lib3MFResult initErrorCode = wrapperTable->m_Function_GetDisplayName(instanceHandle, 0, &bytesNeededDisplayName, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferDisplayName; + bufferDisplayName.resize(bytesNeededDisplayName); + Lib3MFResult errorCode = wrapperTable->m_Function_GetDisplayName(instanceHandle, bytesNeededDisplayName, &bytesWrittenDisplayName, &bufferDisplayName[0]); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferDisplayName[0])); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6100,26 +16108,24 @@ void CLib3MFBeamSet::SetName(const FunctionCallbackInfo& args) } -void CLib3MFBeamSet::GetName(const FunctionCallbackInfo& args) +void CLib3MFFunction::SetDisplayName(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int bytesNeededName = 0; - unsigned int bytesWrittenName = 0; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (DisplayName)"); + } + v8::String::Utf8Value sutf8DisplayName(isolate, args[0]); + std::string sDisplayName = *sutf8DisplayName; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetName."); - if (wrapperTable->m_BeamSet_GetName == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamSet::GetName."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetDisplayName."); + if (wrapperTable->m_Function_SetDisplayName == nullptr) + throw std::runtime_error("Could not call Lib3MF method Function::SetDisplayName."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult initErrorCode = wrapperTable->m_BeamSet_GetName(instanceHandle, 0, &bytesNeededName, nullptr); - CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); - std::vector bufferName; - bufferName.resize(bytesNeededName); - Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetName(instanceHandle, bytesNeededName, &bytesWrittenName, &bufferName[0]); + Lib3MFResult errorCode = wrapperTable->m_Function_SetDisplayName(instanceHandle, sDisplayName.c_str()); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferName[0])); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6127,7 +16133,7 @@ void CLib3MFBeamSet::GetName(const FunctionCallbackInfo& args) } -void CLib3MFBeamSet::SetIdentifier(const FunctionCallbackInfo& args) +void CLib3MFFunction::AddInput(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); @@ -6135,16 +16141,28 @@ void CLib3MFBeamSet::SetIdentifier(const FunctionCallbackInfo& args) if (!args[0]->IsString()) { throw std::runtime_error("Expected string parameter 0 (Identifier)"); } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 2 (Type)"); + } v8::String::Utf8Value sutf8Identifier(isolate, args[0]); std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + unsigned int eType = (unsigned int) args[2]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Lib3MFHandle hReturnPort = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetIdentifier."); - if (wrapperTable->m_BeamSet_SetIdentifier == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamSet::SetIdentifier."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddInput."); + if (wrapperTable->m_Function_AddInput == nullptr) + throw std::runtime_error("Could not call Lib3MF method Function::AddInput."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamSet_SetIdentifier(instanceHandle, sIdentifier.c_str()); + Lib3MFResult errorCode = wrapperTable->m_Function_AddInput(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), (eLib3MFImplicitPortType) eType, &hReturnPort); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjPort = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnPort); + args.GetReturnValue().Set(instanceObjPort); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6152,26 +16170,22 @@ void CLib3MFBeamSet::SetIdentifier(const FunctionCallbackInfo& args) } -void CLib3MFBeamSet::GetIdentifier(const FunctionCallbackInfo& args) +void CLib3MFFunction::GetInputs(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int bytesNeededIdentifier = 0; - unsigned int bytesWrittenIdentifier = 0; + Lib3MFHandle hReturnIterator = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetIdentifier."); - if (wrapperTable->m_BeamSet_GetIdentifier == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamSet::GetIdentifier."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetInputs."); + if (wrapperTable->m_Function_GetInputs == nullptr) + throw std::runtime_error("Could not call Lib3MF method Function::GetInputs."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult initErrorCode = wrapperTable->m_BeamSet_GetIdentifier(instanceHandle, 0, &bytesNeededIdentifier, nullptr); - CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); - std::vector bufferIdentifier; - bufferIdentifier.resize(bytesNeededIdentifier); - Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetIdentifier(instanceHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0]); + Lib3MFResult errorCode = wrapperTable->m_Function_GetInputs(instanceHandle, &hReturnIterator); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferIdentifier[0])); + Local instanceObjIterator = CLib3MFImplicitPortIterator::NewInstance(args.Holder(), hReturnIterator); + args.GetReturnValue().Set(instanceObjIterator); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6179,21 +16193,27 @@ void CLib3MFBeamSet::GetIdentifier(const FunctionCallbackInfo& args) } -void CLib3MFBeamSet::GetReferenceCount(const FunctionCallbackInfo& args) +void CLib3MFFunction::RemoveInput(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (Input)"); + } + Local objInput = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFImplicitPort * instanceInput = ObjectWrap::Unwrap(objInput); + if (instanceInput == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (Input)"); + Lib3MFHandle hInput = instanceInput->getHandle( objInput ); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetReferenceCount."); - if (wrapperTable->m_BeamSet_GetReferenceCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamSet::GetReferenceCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveInput."); + if (wrapperTable->m_Function_RemoveInput == nullptr) + throw std::runtime_error("Could not call Lib3MF method Function::RemoveInput."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetReferenceCount(instanceHandle, &nReturnCount); + Lib3MFResult errorCode = wrapperTable->m_Function_RemoveInput(instanceHandle, hInput); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6201,19 +16221,36 @@ void CLib3MFBeamSet::GetReferenceCount(const FunctionCallbackInfo& args) } -void CLib3MFBeamSet::SetReferences(const FunctionCallbackInfo& args) +void CLib3MFFunction::AddOutput(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 2 (Type)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + unsigned int eType = (unsigned int) args[2]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Lib3MFHandle hReturnPort = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetReferences."); - if (wrapperTable->m_BeamSet_SetReferences == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamSet::SetReferences."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddOutput."); + if (wrapperTable->m_Function_AddOutput == nullptr) + throw std::runtime_error("Could not call Lib3MF method Function::AddOutput."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamSet_SetReferences(instanceHandle, 0, nullptr); + Lib3MFResult errorCode = wrapperTable->m_Function_AddOutput(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), (eLib3MFImplicitPortType) eType, &hReturnPort); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjPort = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnPort); + args.GetReturnValue().Set(instanceObjPort); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6221,19 +16258,22 @@ void CLib3MFBeamSet::SetReferences(const FunctionCallbackInfo& args) } -void CLib3MFBeamSet::GetReferences(const FunctionCallbackInfo& args) +void CLib3MFFunction::GetOutputs(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { + Lib3MFHandle hReturnIterator = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetReferences."); - if (wrapperTable->m_BeamSet_GetReferences == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamSet::GetReferences."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOutputs."); + if (wrapperTable->m_Function_GetOutputs == nullptr) + throw std::runtime_error("Could not call Lib3MF method Function::GetOutputs."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetReferences(instanceHandle, 0, nullptr, nullptr); + Lib3MFResult errorCode = wrapperTable->m_Function_GetOutputs(instanceHandle, &hReturnIterator); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjIterator = CLib3MFImplicitPortIterator::NewInstance(args.Holder(), hReturnIterator); + args.GetReturnValue().Set(instanceObjIterator); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6241,21 +16281,27 @@ void CLib3MFBeamSet::GetReferences(const FunctionCallbackInfo& args) } -void CLib3MFBeamSet::GetBallReferenceCount(const FunctionCallbackInfo& args) +void CLib3MFFunction::RemoveOutput(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (Output)"); + } + Local objOutput = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFImplicitPort * instanceOutput = ObjectWrap::Unwrap(objOutput); + if (instanceOutput == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (Output)"); + Lib3MFHandle hOutput = instanceOutput->getHandle( objOutput ); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBallReferenceCount."); - if (wrapperTable->m_BeamSet_GetBallReferenceCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamSet::GetBallReferenceCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveOutput."); + if (wrapperTable->m_Function_RemoveOutput == nullptr) + throw std::runtime_error("Could not call Lib3MF method Function::RemoveOutput."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetBallReferenceCount(instanceHandle, &nReturnCount); + Lib3MFResult errorCode = wrapperTable->m_Function_RemoveOutput(instanceHandle, hOutput); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6263,19 +16309,27 @@ void CLib3MFBeamSet::GetBallReferenceCount(const FunctionCallbackInfo& ar } -void CLib3MFBeamSet::SetBallReferences(const FunctionCallbackInfo& args) +void CLib3MFFunction::FindInput(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + Lib3MFHandle hReturnInput = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetBallReferences."); - if (wrapperTable->m_BeamSet_SetBallReferences == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamSet::SetBallReferences."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method FindInput."); + if (wrapperTable->m_Function_FindInput == nullptr) + throw std::runtime_error("Could not call Lib3MF method Function::FindInput."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamSet_SetBallReferences(instanceHandle, 0, nullptr); + Lib3MFResult errorCode = wrapperTable->m_Function_FindInput(instanceHandle, sIdentifier.c_str(), &hReturnInput); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjInput = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnInput); + args.GetReturnValue().Set(instanceObjInput); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6283,19 +16337,27 @@ void CLib3MFBeamSet::SetBallReferences(const FunctionCallbackInfo& args) } -void CLib3MFBeamSet::GetBallReferences(const FunctionCallbackInfo& args) +void CLib3MFFunction::FindOutput(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + Lib3MFHandle hReturnOutput = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBallReferences."); - if (wrapperTable->m_BeamSet_GetBallReferences == nullptr) - throw std::runtime_error("Could not call Lib3MF method BeamSet::GetBallReferences."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method FindOutput."); + if (wrapperTable->m_Function_FindOutput == nullptr) + throw std::runtime_error("Could not call Lib3MF method Function::FindOutput."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BeamSet_GetBallReferences(instanceHandle, 0, nullptr, nullptr); + Lib3MFResult errorCode = wrapperTable->m_Function_FindOutput(instanceHandle, sIdentifier.c_str(), &hReturnOutput); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjOutput = CLib3MFImplicitPort::NewInstance(args.Holder(), hReturnOutput); + args.GetReturnValue().Set(instanceObjOutput); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6303,56 +16365,106 @@ void CLib3MFBeamSet::GetBallReferences(const FunctionCallbackInfo& args) } /************************************************************************************************************************* - Class CLib3MFBaseMaterialGroup Implementation + Class CLib3MFImplicitFunction Implementation **************************************************************************************************************************/ -CLib3MFBaseMaterialGroup::CLib3MFBaseMaterialGroup() +CLib3MFImplicitFunction::CLib3MFImplicitFunction() : CLib3MFBaseClass() { } -CLib3MFBaseMaterialGroup::~CLib3MFBaseMaterialGroup() +CLib3MFImplicitFunction::~CLib3MFImplicitFunction() { } -void CLib3MFBaseMaterialGroup::Init() +void CLib3MFImplicitFunction::Init() { Isolate* isolate = Isolate::GetCurrent(); // Prepare constructor template Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFBaseMaterialGroup")); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFImplicitFunction")); tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "GetCount", GetCount); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetAllPropertyIDs", GetAllPropertyIDs); - NODE_SET_PROTOTYPE_METHOD(tpl, "AddMaterial", AddMaterial); - NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveMaterial", RemoveMaterial); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetName", GetName); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetName", SetName); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetDisplayColor", SetDisplayColor); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetDisplayColor", GetDisplayColor); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetIdentifier", GetIdentifier); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetIdentifier", SetIdentifier); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddNode", AddNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddSinNode", AddSinNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddCosNode", AddCosNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddTanNode", AddTanNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddArcSinNode", AddArcSinNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddArcCosNode", AddArcCosNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddArcTan2Node", AddArcTan2Node); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddSinhNode", AddSinhNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddCoshNode", AddCoshNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddTanhNode", AddTanhNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddRoundNode", AddRoundNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddCeilNode", AddCeilNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddFloorNode", AddFloorNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddSignNode", AddSignNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddFractNode", AddFractNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddAbsNode", AddAbsNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddExpNode", AddExpNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddLogNode", AddLogNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddLog2Node", AddLog2Node); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddLog10Node", AddLog10Node); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddLengthNode", AddLengthNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddTransposeNode", AddTransposeNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "InverseNode", InverseNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddSqrtNode", AddSqrtNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddResourceIdNode", AddResourceIdNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddAdditionNode", AddAdditionNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddSubtractionNode", AddSubtractionNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddMultiplicationNode", AddMultiplicationNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddDivisionNode", AddDivisionNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddDotNode", AddDotNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddCrossNode", AddCrossNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddMatVecMultiplicationNode", AddMatVecMultiplicationNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddMinNode", AddMinNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddMaxNode", AddMaxNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddFmodNode", AddFmodNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddPowNode", AddPowNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddSelectNode", AddSelectNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddClampNode", AddClampNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddComposeVectorNode", AddComposeVectorNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddVectorFromScalarNode", AddVectorFromScalarNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddDecomposeVectorNode", AddDecomposeVectorNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddComposeMatrixNode", AddComposeMatrixNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddMatrixFromRowsNode", AddMatrixFromRowsNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddMatrixFromColumnsNode", AddMatrixFromColumnsNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddConstantNode", AddConstantNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddConstVecNode", AddConstVecNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddConstMatNode", AddConstMatNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddMeshNode", AddMeshNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddUnsignedMeshNode", AddUnsignedMeshNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddFunctionCallNode", AddFunctionCallNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetNodes", GetNodes); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveNode", RemoveNode); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddLink", AddLink); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddLinkByNames", AddLinkByNames); + NODE_SET_PROTOTYPE_METHOD(tpl, "Clear", Clear); + NODE_SET_PROTOTYPE_METHOD(tpl, "SortNodesTopologically", SortNodesTopologically); constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); } -void CLib3MFBaseMaterialGroup::New(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::New(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); if (args.IsConstructCall()) { CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFBaseMaterialGroup * basematerialgroupInstance = new CLib3MFBaseMaterialGroup(); - basematerialgroupInstance->Wrap(args.This()); + CLib3MFImplicitFunction * implicitfunctionInstance = new CLib3MFImplicitFunction(); + implicitfunctionInstance->Wrap(args.This()); args.GetReturnValue().Set(args.This()); } else { - RaiseError(isolate, "Lib3MFBaseMaterialGroup: Invalid call to Constructor"); + RaiseError(isolate, "Lib3MFImplicitFunction: Invalid call to Constructor"); } } -Local CLib3MFBaseMaterialGroup::NewInstance(Local pParent, Lib3MFHandle pHandle) +Local CLib3MFImplicitFunction::NewInstance(Local pParent, Lib3MFHandle pHandle) { Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); @@ -6366,21 +16478,26 @@ Local CLib3MFBaseMaterialGroup::NewInstance(Local pParent, Lib3M } -void CLib3MFBaseMaterialGroup::GetCount(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::GetIdentifier(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + unsigned int bytesNeededIdentifier = 0; + unsigned int bytesWrittenIdentifier = 0; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCount."); - if (wrapperTable->m_BaseMaterialGroup_GetCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::GetCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetIdentifier."); + if (wrapperTable->m_ImplicitFunction_GetIdentifier == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::GetIdentifier."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_GetCount(instanceHandle, &nReturnCount); + Lib3MFResult initErrorCode = wrapperTable->m_ImplicitFunction_GetIdentifier(instanceHandle, 0, &bytesNeededIdentifier, nullptr); + CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); + std::vector bufferIdentifier; + bufferIdentifier.resize(bytesNeededIdentifier); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_GetIdentifier(instanceHandle, bytesNeededIdentifier, &bytesWrittenIdentifier, &bufferIdentifier[0]); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferIdentifier[0])); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6388,18 +16505,23 @@ void CLib3MFBaseMaterialGroup::GetCount(const FunctionCallbackInfo& args) } -void CLib3MFBaseMaterialGroup::GetAllPropertyIDs(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::SetIdentifier(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAllPropertyIDs."); - if (wrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs == nullptr) - throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::GetAllPropertyIDs."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetIdentifier."); + if (wrapperTable->m_ImplicitFunction_SetIdentifier == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::SetIdentifier."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_GetAllPropertyIDs(instanceHandle, 0, nullptr, nullptr); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_SetIdentifier(instanceHandle, sIdentifier.c_str()); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -6408,30 +16530,87 @@ void CLib3MFBaseMaterialGroup::GetAllPropertyIDs(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddNode(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 0 (NodeType)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (Identifier)"); + } + if (!args[2]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 2 (Configuration)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (DisplayName)"); + } + if (!args[4]->IsString()) { + throw std::runtime_error("Expected string parameter 4 (Tag)"); + } + unsigned int eNodeType = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8Identifier(isolate, args[1]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[2]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[3]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[4]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddNode."); + if (wrapperTable->m_ImplicitFunction_AddNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddNode(instanceHandle, (eLib3MFImplicitNodeType) eNodeType, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFImplicitNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFImplicitFunction::AddSinNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { if (!args[0]->IsString()) { - throw std::runtime_error("Expected string parameter 0 (Name)"); + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - if (!args[1]->IsObject()) { - throw std::runtime_error("Expected struct parameter 1 (DisplayColor)"); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); } - v8::String::Utf8Value sutf8Name(isolate, args[0]); - std::string sName = *sutf8Name; - sLib3MFColor sDisplayColor = convertObjectToLib3MFColor(isolate, args[1]); - unsigned int nReturnPropertyID = 0; + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMaterial."); - if (wrapperTable->m_BaseMaterialGroup_AddMaterial == nullptr) - throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::AddMaterial."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddSinNode."); + if (wrapperTable->m_ImplicitFunction_AddSinNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddSinNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_AddMaterial(instanceHandle, sName.c_str(), &sDisplayColor, &nReturnPropertyID); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddSinNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnPropertyID)); + Local instanceObjNode = CLib3MFSinNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6439,23 +16618,41 @@ void CLib3MFBaseMaterialGroup::AddMaterial(const FunctionCallbackInfo& ar } -void CLib3MFBaseMaterialGroup::RemoveMaterial(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddCosNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveMaterial."); - if (wrapperTable->m_BaseMaterialGroup_RemoveMaterial == nullptr) - throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::RemoveMaterial."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddCosNode."); + if (wrapperTable->m_ImplicitFunction_AddCosNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddCosNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_RemoveMaterial(instanceHandle, nPropertyID); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddCosNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFCosNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6463,30 +16660,41 @@ void CLib3MFBaseMaterialGroup::RemoveMaterial(const FunctionCallbackInfo& } -void CLib3MFBaseMaterialGroup::GetName(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddTanNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - unsigned int bytesNeededName = 0; - unsigned int bytesWrittenName = 0; + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetName."); - if (wrapperTable->m_BaseMaterialGroup_GetName == nullptr) - throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::GetName."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddTanNode."); + if (wrapperTable->m_ImplicitFunction_AddTanNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddTanNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult initErrorCode = wrapperTable->m_BaseMaterialGroup_GetName(instanceHandle, nPropertyID, 0, &bytesNeededName, nullptr); - CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); - std::vector bufferName; - bufferName.resize(bytesNeededName); - Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_GetName(instanceHandle, nPropertyID, bytesNeededName, &bytesWrittenName, &bufferName[0]); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddTanNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferName[0])); + Local instanceObjNode = CLib3MFTanNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6494,28 +16702,41 @@ void CLib3MFBaseMaterialGroup::GetName(const FunctionCallbackInfo& args) } -void CLib3MFBaseMaterialGroup::SetName(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddArcSinNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - if (!args[1]->IsString()) { - throw std::runtime_error("Expected string parameter 1 (Name)"); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - v8::String::Utf8Value sutf8Name(isolate, args[1]); - std::string sName = *sutf8Name; + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetName."); - if (wrapperTable->m_BaseMaterialGroup_SetName == nullptr) - throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::SetName."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddArcSinNode."); + if (wrapperTable->m_ImplicitFunction_AddArcSinNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddArcSinNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_SetName(instanceHandle, nPropertyID, sName.c_str()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddArcSinNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFArcSinNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6523,27 +16744,41 @@ void CLib3MFBaseMaterialGroup::SetName(const FunctionCallbackInfo& args) } -void CLib3MFBaseMaterialGroup::SetDisplayColor(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddArcCosNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - if (!args[1]->IsObject()) { - throw std::runtime_error("Expected struct parameter 1 (TheColor)"); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - sLib3MFColor sTheColor = convertObjectToLib3MFColor(isolate, args[1]); + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetDisplayColor."); - if (wrapperTable->m_BaseMaterialGroup_SetDisplayColor == nullptr) - throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::SetDisplayColor."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddArcCosNode."); + if (wrapperTable->m_ImplicitFunction_AddArcCosNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddArcCosNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_SetDisplayColor(instanceHandle, nPropertyID, &sTheColor); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddArcCosNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFArcCosNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6551,108 +16786,125 @@ void CLib3MFBaseMaterialGroup::SetDisplayColor(const FunctionCallbackInfo } -void CLib3MFBaseMaterialGroup::GetDisplayColor(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddArcTan2Node(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - sLib3MFColor sReturnTheColor; + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetDisplayColor."); - if (wrapperTable->m_BaseMaterialGroup_GetDisplayColor == nullptr) - throw std::runtime_error("Could not call Lib3MF method BaseMaterialGroup::GetDisplayColor."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddArcTan2Node."); + if (wrapperTable->m_ImplicitFunction_AddArcTan2Node == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddArcTan2Node."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_BaseMaterialGroup_GetDisplayColor(instanceHandle, nPropertyID, &sReturnTheColor); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddArcTan2Node(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(convertLib3MFColorToObject(isolate, sReturnTheColor)); + Local instanceObjNode = CLib3MFArcTan2Node::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); } } -/************************************************************************************************************************* - Class CLib3MFColorGroup Implementation -**************************************************************************************************************************/ - -CLib3MFColorGroup::CLib3MFColorGroup() - : CLib3MFBaseClass() -{ -} - -CLib3MFColorGroup::~CLib3MFColorGroup() -{ -} - -void CLib3MFColorGroup::Init() -{ - Isolate* isolate = Isolate::GetCurrent(); - - // Prepare constructor template - Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFColorGroup")); - tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); - - // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "GetCount", GetCount); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetAllPropertyIDs", GetAllPropertyIDs); - NODE_SET_PROTOTYPE_METHOD(tpl, "AddColor", AddColor); - NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveColor", RemoveColor); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetColor", SetColor); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetColor", GetColor); - constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); - -} -void CLib3MFColorGroup::New(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddSinhNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddSinhNode."); + if (wrapperTable->m_ImplicitFunction_AddSinhNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddSinhNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddSinhNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFSinhNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); - if (args.IsConstructCall()) { - CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFColorGroup * colorgroupInstance = new CLib3MFColorGroup(); - colorgroupInstance->Wrap(args.This()); - args.GetReturnValue().Set(args.This()); - } else { - RaiseError(isolate, "Lib3MFColorGroup: Invalid call to Constructor"); - } -} - -Local CLib3MFColorGroup::NewInstance(Local pParent, Lib3MFHandle pHandle) -{ - Isolate* isolate = Isolate::GetCurrent(); - HandleScope scope(isolate); - Local cons = Local::New(isolate, constructor); - Local instance; - if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { - instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); - instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } catch (std::exception & E) { + RaiseError(isolate, E.what()); } - return instance; } -void CLib3MFColorGroup::GetCount(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddCoshNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCount."); - if (wrapperTable->m_ColorGroup_GetCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method ColorGroup::GetCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddCoshNode."); + if (wrapperTable->m_ImplicitFunction_AddCoshNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddCoshNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_ColorGroup_GetCount(instanceHandle, &nReturnCount); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddCoshNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + Local instanceObjNode = CLib3MFCoshNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6660,19 +16912,41 @@ void CLib3MFColorGroup::GetCount(const FunctionCallbackInfo& args) } -void CLib3MFColorGroup::GetAllPropertyIDs(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddTanhNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAllPropertyIDs."); - if (wrapperTable->m_ColorGroup_GetAllPropertyIDs == nullptr) - throw std::runtime_error("Could not call Lib3MF method ColorGroup::GetAllPropertyIDs."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddTanhNode."); + if (wrapperTable->m_ImplicitFunction_AddTanhNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddTanhNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_ColorGroup_GetAllPropertyIDs(instanceHandle, 0, nullptr, nullptr); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddTanhNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFTanhNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6680,25 +16954,41 @@ void CLib3MFColorGroup::GetAllPropertyIDs(const FunctionCallbackInfo& arg } -void CLib3MFColorGroup::AddColor(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddRoundNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsObject()) { - throw std::runtime_error("Expected struct parameter 0 (TheColor)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - sLib3MFColor sTheColor = convertObjectToLib3MFColor(isolate, args[0]); - unsigned int nReturnPropertyID = 0; + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method AddColor."); - if (wrapperTable->m_ColorGroup_AddColor == nullptr) - throw std::runtime_error("Could not call Lib3MF method ColorGroup::AddColor."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddRoundNode."); + if (wrapperTable->m_ImplicitFunction_AddRoundNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddRoundNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_ColorGroup_AddColor(instanceHandle, &sTheColor, &nReturnPropertyID); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddRoundNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnPropertyID)); + Local instanceObjNode = CLib3MFRoundNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6706,23 +16996,41 @@ void CLib3MFColorGroup::AddColor(const FunctionCallbackInfo& args) } -void CLib3MFColorGroup::RemoveColor(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddCeilNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveColor."); - if (wrapperTable->m_ColorGroup_RemoveColor == nullptr) - throw std::runtime_error("Could not call Lib3MF method ColorGroup::RemoveColor."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddCeilNode."); + if (wrapperTable->m_ImplicitFunction_AddCeilNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddCeilNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_ColorGroup_RemoveColor(instanceHandle, nPropertyID); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddCeilNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFCeilNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6730,27 +17038,41 @@ void CLib3MFColorGroup::RemoveColor(const FunctionCallbackInfo& args) } -void CLib3MFColorGroup::SetColor(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddFloorNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - if (!args[1]->IsObject()) { - throw std::runtime_error("Expected struct parameter 1 (TheColor)"); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - sLib3MFColor sTheColor = convertObjectToLib3MFColor(isolate, args[1]); + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetColor."); - if (wrapperTable->m_ColorGroup_SetColor == nullptr) - throw std::runtime_error("Could not call Lib3MF method ColorGroup::SetColor."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddFloorNode."); + if (wrapperTable->m_ImplicitFunction_AddFloorNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddFloorNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_ColorGroup_SetColor(instanceHandle, nPropertyID, &sTheColor); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddFloorNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFFloorNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6758,108 +17080,125 @@ void CLib3MFColorGroup::SetColor(const FunctionCallbackInfo& args) } -void CLib3MFColorGroup::GetColor(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddSignNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - sLib3MFColor sReturnTheColor; + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetColor."); - if (wrapperTable->m_ColorGroup_GetColor == nullptr) - throw std::runtime_error("Could not call Lib3MF method ColorGroup::GetColor."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddSignNode."); + if (wrapperTable->m_ImplicitFunction_AddSignNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddSignNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_ColorGroup_GetColor(instanceHandle, nPropertyID, &sReturnTheColor); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddSignNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(convertLib3MFColorToObject(isolate, sReturnTheColor)); + Local instanceObjNode = CLib3MFSignNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); } } -/************************************************************************************************************************* - Class CLib3MFTexture2DGroup Implementation -**************************************************************************************************************************/ - -CLib3MFTexture2DGroup::CLib3MFTexture2DGroup() - : CLib3MFBaseClass() -{ -} - -CLib3MFTexture2DGroup::~CLib3MFTexture2DGroup() -{ -} - -void CLib3MFTexture2DGroup::Init() -{ - Isolate* isolate = Isolate::GetCurrent(); - - // Prepare constructor template - Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFTexture2DGroup")); - tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); - - // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "GetCount", GetCount); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetAllPropertyIDs", GetAllPropertyIDs); - NODE_SET_PROTOTYPE_METHOD(tpl, "AddTex2Coord", AddTex2Coord); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetTex2Coord", GetTex2Coord); - NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveTex2Coord", RemoveTex2Coord); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetTexture2D", GetTexture2D); - constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); - -} -void CLib3MFTexture2DGroup::New(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddFractNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddFractNode."); + if (wrapperTable->m_ImplicitFunction_AddFractNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddFractNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddFractNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFFractNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); - if (args.IsConstructCall()) { - CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFTexture2DGroup * texture2dgroupInstance = new CLib3MFTexture2DGroup(); - texture2dgroupInstance->Wrap(args.This()); - args.GetReturnValue().Set(args.This()); - } else { - RaiseError(isolate, "Lib3MFTexture2DGroup: Invalid call to Constructor"); - } -} - -Local CLib3MFTexture2DGroup::NewInstance(Local pParent, Lib3MFHandle pHandle) -{ - Isolate* isolate = Isolate::GetCurrent(); - HandleScope scope(isolate); - Local cons = Local::New(isolate, constructor); - Local instance; - if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { - instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); - instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + } catch (std::exception & E) { + RaiseError(isolate, E.what()); } - return instance; } -void CLib3MFTexture2DGroup::GetCount(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddAbsNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCount."); - if (wrapperTable->m_Texture2DGroup_GetCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::GetCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddAbsNode."); + if (wrapperTable->m_ImplicitFunction_AddAbsNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddAbsNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_GetCount(instanceHandle, &nReturnCount); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddAbsNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + Local instanceObjNode = CLib3MFAbsNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6867,19 +17206,41 @@ void CLib3MFTexture2DGroup::GetCount(const FunctionCallbackInfo& args) } -void CLib3MFTexture2DGroup::GetAllPropertyIDs(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddExpNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAllPropertyIDs."); - if (wrapperTable->m_Texture2DGroup_GetAllPropertyIDs == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::GetAllPropertyIDs."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddExpNode."); + if (wrapperTable->m_ImplicitFunction_AddExpNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddExpNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_GetAllPropertyIDs(instanceHandle, 0, nullptr, nullptr); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddExpNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFExpNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6887,25 +17248,41 @@ void CLib3MFTexture2DGroup::GetAllPropertyIDs(const FunctionCallbackInfo& } -void CLib3MFTexture2DGroup::AddTex2Coord(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddLogNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsObject()) { - throw std::runtime_error("Expected struct parameter 0 (UVCoordinate)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - sLib3MFTex2Coord sUVCoordinate = convertObjectToLib3MFTex2Coord(isolate, args[0]); - unsigned int nReturnPropertyID = 0; + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method AddTex2Coord."); - if (wrapperTable->m_Texture2DGroup_AddTex2Coord == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::AddTex2Coord."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddLogNode."); + if (wrapperTable->m_ImplicitFunction_AddLogNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddLogNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_AddTex2Coord(instanceHandle, &sUVCoordinate, &nReturnPropertyID); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddLogNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnPropertyID)); + Local instanceObjNode = CLib3MFLogNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6913,25 +17290,41 @@ void CLib3MFTexture2DGroup::AddTex2Coord(const FunctionCallbackInfo& args } -void CLib3MFTexture2DGroup::GetTex2Coord(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddLog2Node(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - sLib3MFTex2Coord sReturnUVCoordinate; + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTex2Coord."); - if (wrapperTable->m_Texture2DGroup_GetTex2Coord == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::GetTex2Coord."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddLog2Node."); + if (wrapperTable->m_ImplicitFunction_AddLog2Node == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddLog2Node."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_GetTex2Coord(instanceHandle, nPropertyID, &sReturnUVCoordinate); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddLog2Node(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(convertLib3MFTex2CoordToObject(isolate, sReturnUVCoordinate)); + Local instanceObjNode = CLib3MFLog2Node::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6939,23 +17332,41 @@ void CLib3MFTexture2DGroup::GetTex2Coord(const FunctionCallbackInfo& args } -void CLib3MFTexture2DGroup::RemoveTex2Coord(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddLog10Node(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveTex2Coord."); - if (wrapperTable->m_Texture2DGroup_RemoveTex2Coord == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::RemoveTex2Coord."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddLog10Node."); + if (wrapperTable->m_ImplicitFunction_AddLog10Node == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddLog10Node."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_RemoveTex2Coord(instanceHandle, nPropertyID); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddLog10Node(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFLog10Node::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -6963,105 +17374,159 @@ void CLib3MFTexture2DGroup::RemoveTex2Coord(const FunctionCallbackInfo& a } -void CLib3MFTexture2DGroup::GetTexture2D(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddLengthNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - Lib3MFHandle hReturnTexture2DInstance = nullptr; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTexture2D."); - if (wrapperTable->m_Texture2DGroup_GetTexture2D == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2DGroup::GetTexture2D."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddLengthNode."); + if (wrapperTable->m_ImplicitFunction_AddLengthNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddLengthNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2DGroup_GetTexture2D(instanceHandle, &hReturnTexture2DInstance); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddLengthNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - Local instanceObjTexture2DInstance = CLib3MFTexture2D::NewInstance(args.Holder(), hReturnTexture2DInstance); - args.GetReturnValue().Set(instanceObjTexture2DInstance); + Local instanceObjNode = CLib3MFLengthNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { - RaiseError(isolate, E.what()); - } -} - -/************************************************************************************************************************* - Class CLib3MFCompositeMaterials Implementation -**************************************************************************************************************************/ - -CLib3MFCompositeMaterials::CLib3MFCompositeMaterials() - : CLib3MFBaseClass() -{ -} - -CLib3MFCompositeMaterials::~CLib3MFCompositeMaterials() -{ -} - -void CLib3MFCompositeMaterials::Init() -{ - Isolate* isolate = Isolate::GetCurrent(); - - // Prepare constructor template - Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFCompositeMaterials")); - tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); - - // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "GetCount", GetCount); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetAllPropertyIDs", GetAllPropertyIDs); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetBaseMaterialGroup", GetBaseMaterialGroup); - NODE_SET_PROTOTYPE_METHOD(tpl, "AddComposite", AddComposite); - NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveComposite", RemoveComposite); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetComposite", GetComposite); - constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); - + RaiseError(isolate, E.what()); + } } -void CLib3MFCompositeMaterials::New(const FunctionCallbackInfo& args) + +void CLib3MFImplicitFunction::AddTransposeNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddTransposeNode."); + if (wrapperTable->m_ImplicitFunction_AddTransposeNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddTransposeNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddTransposeNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFTransposeNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); - if (args.IsConstructCall()) { - CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFCompositeMaterials * compositematerialsInstance = new CLib3MFCompositeMaterials(); - compositematerialsInstance->Wrap(args.This()); - args.GetReturnValue().Set(args.This()); - } else { - RaiseError(isolate, "Lib3MFCompositeMaterials: Invalid call to Constructor"); + } catch (std::exception & E) { + RaiseError(isolate, E.what()); } } -Local CLib3MFCompositeMaterials::NewInstance(Local pParent, Lib3MFHandle pHandle) + +void CLib3MFImplicitFunction::InverseNode(const FunctionCallbackInfo& args) { - Isolate* isolate = Isolate::GetCurrent(); + Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); - Local cons = Local::New(isolate, constructor); - Local instance; - if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { - instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); - instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method InverseNode."); + if (wrapperTable->m_ImplicitFunction_InverseNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::InverseNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_InverseNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFInverseNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); } - return instance; } -void CLib3MFCompositeMaterials::GetCount(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddSqrtNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCount."); - if (wrapperTable->m_CompositeMaterials_GetCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::GetCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddSqrtNode."); + if (wrapperTable->m_ImplicitFunction_AddSqrtNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddSqrtNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_GetCount(instanceHandle, &nReturnCount); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddSqrtNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + Local instanceObjNode = CLib3MFSqrtNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7069,19 +17534,37 @@ void CLib3MFCompositeMaterials::GetCount(const FunctionCallbackInfo& args } -void CLib3MFCompositeMaterials::GetAllPropertyIDs(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddResourceIdNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAllPropertyIDs."); - if (wrapperTable->m_CompositeMaterials_GetAllPropertyIDs == nullptr) - throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::GetAllPropertyIDs."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddResourceIdNode."); + if (wrapperTable->m_ImplicitFunction_AddResourceIdNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddResourceIdNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_GetAllPropertyIDs(instanceHandle, 0, nullptr, nullptr); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddResourceIdNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFResourceIdNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7089,22 +17572,41 @@ void CLib3MFCompositeMaterials::GetAllPropertyIDs(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddAdditionNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - Lib3MFHandle hReturnBaseMaterialGroupInstance = nullptr; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetBaseMaterialGroup."); - if (wrapperTable->m_CompositeMaterials_GetBaseMaterialGroup == nullptr) - throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::GetBaseMaterialGroup."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddAdditionNode."); + if (wrapperTable->m_ImplicitFunction_AddAdditionNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddAdditionNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_GetBaseMaterialGroup(instanceHandle, &hReturnBaseMaterialGroupInstance); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddAdditionNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - Local instanceObjBaseMaterialGroupInstance = CLib3MFBaseMaterialGroup::NewInstance(args.Holder(), hReturnBaseMaterialGroupInstance); - args.GetReturnValue().Set(instanceObjBaseMaterialGroupInstance); + Local instanceObjNode = CLib3MFAdditionNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7112,21 +17614,41 @@ void CLib3MFCompositeMaterials::GetBaseMaterialGroup(const FunctionCallbackInfo< } -void CLib3MFCompositeMaterials::AddComposite(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddSubtractionNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnPropertyID = 0; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method AddComposite."); - if (wrapperTable->m_CompositeMaterials_AddComposite == nullptr) - throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::AddComposite."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddSubtractionNode."); + if (wrapperTable->m_ImplicitFunction_AddSubtractionNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddSubtractionNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_AddComposite(instanceHandle, 0, nullptr, &nReturnPropertyID); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddSubtractionNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnPropertyID)); + Local instanceObjNode = CLib3MFSubtractionNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7134,23 +17656,41 @@ void CLib3MFCompositeMaterials::AddComposite(const FunctionCallbackInfo& } -void CLib3MFCompositeMaterials::RemoveComposite(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddMultiplicationNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveComposite."); - if (wrapperTable->m_CompositeMaterials_RemoveComposite == nullptr) - throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::RemoveComposite."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMultiplicationNode."); + if (wrapperTable->m_ImplicitFunction_AddMultiplicationNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddMultiplicationNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_RemoveComposite(instanceHandle, nPropertyID); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddMultiplicationNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFMultiplicationNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7158,110 +17698,197 @@ void CLib3MFCompositeMaterials::RemoveComposite(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddDivisionNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetComposite."); - if (wrapperTable->m_CompositeMaterials_GetComposite == nullptr) - throw std::runtime_error("Could not call Lib3MF method CompositeMaterials::GetComposite."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddDivisionNode."); + if (wrapperTable->m_ImplicitFunction_AddDivisionNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddDivisionNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_CompositeMaterials_GetComposite(instanceHandle, nPropertyID, 0, nullptr, nullptr); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddDivisionNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFDivisionNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); } } -/************************************************************************************************************************* - Class CLib3MFMultiPropertyGroup Implementation -**************************************************************************************************************************/ -CLib3MFMultiPropertyGroup::CLib3MFMultiPropertyGroup() - : CLib3MFBaseClass() +void CLib3MFImplicitFunction::AddDotNode(const FunctionCallbackInfo& args) { -} + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddDotNode."); + if (wrapperTable->m_ImplicitFunction_AddDotNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddDotNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddDotNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFDotNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); -CLib3MFMultiPropertyGroup::~CLib3MFMultiPropertyGroup() -{ + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } } -void CLib3MFMultiPropertyGroup::Init() -{ - Isolate* isolate = Isolate::GetCurrent(); - - // Prepare constructor template - Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFMultiPropertyGroup")); - tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); - - // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "GetCount", GetCount); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetAllPropertyIDs", GetAllPropertyIDs); - NODE_SET_PROTOTYPE_METHOD(tpl, "AddMultiProperty", AddMultiProperty); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetMultiProperty", SetMultiProperty); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetMultiProperty", GetMultiProperty); - NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveMultiProperty", RemoveMultiProperty); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetLayerCount", GetLayerCount); - NODE_SET_PROTOTYPE_METHOD(tpl, "AddLayer", AddLayer); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetLayer", GetLayer); - NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveLayer", RemoveLayer); - constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); - -} -void CLib3MFMultiPropertyGroup::New(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddCrossNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddCrossNode."); + if (wrapperTable->m_ImplicitFunction_AddCrossNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddCrossNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddCrossNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFCrossNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); - if (args.IsConstructCall()) { - CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFMultiPropertyGroup * multipropertygroupInstance = new CLib3MFMultiPropertyGroup(); - multipropertygroupInstance->Wrap(args.This()); - args.GetReturnValue().Set(args.This()); - } else { - RaiseError(isolate, "Lib3MFMultiPropertyGroup: Invalid call to Constructor"); + } catch (std::exception & E) { + RaiseError(isolate, E.what()); } } -Local CLib3MFMultiPropertyGroup::NewInstance(Local pParent, Lib3MFHandle pHandle) + +void CLib3MFImplicitFunction::AddMatVecMultiplicationNode(const FunctionCallbackInfo& args) { - Isolate* isolate = Isolate::GetCurrent(); + Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); - Local cons = Local::New(isolate, constructor); - Local instance; - if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { - instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); - instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMatVecMultiplicationNode."); + if (wrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddMatVecMultiplicationNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddMatVecMultiplicationNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFMatVecMultiplicationNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); } - return instance; } -void CLib3MFMultiPropertyGroup::GetCount(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddMinNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetCount."); - if (wrapperTable->m_MultiPropertyGroup_GetCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::GetCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMinNode."); + if (wrapperTable->m_ImplicitFunction_AddMinNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddMinNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_GetCount(instanceHandle, &nReturnCount); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddMinNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + Local instanceObjNode = CLib3MFMinNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7269,19 +17896,41 @@ void CLib3MFMultiPropertyGroup::GetCount(const FunctionCallbackInfo& args } -void CLib3MFMultiPropertyGroup::GetAllPropertyIDs(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddMaxNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAllPropertyIDs."); - if (wrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs == nullptr) - throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::GetAllPropertyIDs."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMaxNode."); + if (wrapperTable->m_ImplicitFunction_AddMaxNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddMaxNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_GetAllPropertyIDs(instanceHandle, 0, nullptr, nullptr); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddMaxNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFMaxNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7289,21 +17938,41 @@ void CLib3MFMultiPropertyGroup::GetAllPropertyIDs(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddFmodNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnPropertyID = 0; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMultiProperty."); - if (wrapperTable->m_MultiPropertyGroup_AddMultiProperty == nullptr) - throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::AddMultiProperty."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddFmodNode."); + if (wrapperTable->m_ImplicitFunction_AddFmodNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddFmodNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_AddMultiProperty(instanceHandle, 0, nullptr, &nReturnPropertyID); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddFmodNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnPropertyID)); + Local instanceObjNode = CLib3MFFmodNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7311,23 +17980,41 @@ void CLib3MFMultiPropertyGroup::AddMultiProperty(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddPowNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetMultiProperty."); - if (wrapperTable->m_MultiPropertyGroup_SetMultiProperty == nullptr) - throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::SetMultiProperty."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddPowNode."); + if (wrapperTable->m_ImplicitFunction_AddPowNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddPowNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_SetMultiProperty(instanceHandle, nPropertyID, 0, nullptr); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddPowNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFPowNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7335,23 +18022,41 @@ void CLib3MFMultiPropertyGroup::SetMultiProperty(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddSelectNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetMultiProperty."); - if (wrapperTable->m_MultiPropertyGroup_GetMultiProperty == nullptr) - throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::GetMultiProperty."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddSelectNode."); + if (wrapperTable->m_ImplicitFunction_AddSelectNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddSelectNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_GetMultiProperty(instanceHandle, nPropertyID, 0, nullptr, nullptr); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddSelectNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFSelectNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7359,23 +18064,41 @@ void CLib3MFMultiPropertyGroup::GetMultiProperty(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddClampNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (PropertyID)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nPropertyID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (Configuration)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (DisplayName)"); + } + if (!args[3]->IsString()) { + throw std::runtime_error("Expected string parameter 3 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + unsigned int eConfiguration = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + v8::String::Utf8Value sutf8DisplayName(isolate, args[2]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[3]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveMultiProperty."); - if (wrapperTable->m_MultiPropertyGroup_RemoveMultiProperty == nullptr) - throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::RemoveMultiProperty."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddClampNode."); + if (wrapperTable->m_ImplicitFunction_AddClampNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddClampNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_RemoveMultiProperty(instanceHandle, nPropertyID); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddClampNode(instanceHandle, sIdentifier.c_str(), (eLib3MFImplicitNodeConfiguration) eConfiguration, sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFClampNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7383,21 +18106,37 @@ void CLib3MFMultiPropertyGroup::RemoveMultiProperty(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddComposeVectorNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int nReturnCount = 0; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetLayerCount."); - if (wrapperTable->m_MultiPropertyGroup_GetLayerCount == nullptr) - throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::GetLayerCount."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddComposeVectorNode."); + if (wrapperTable->m_ImplicitFunction_AddComposeVectorNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddComposeVectorNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_GetLayerCount(instanceHandle, &nReturnCount); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddComposeVectorNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnCount)); + Local instanceObjNode = CLib3MFComposeVectorNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7405,25 +18144,37 @@ void CLib3MFMultiPropertyGroup::GetLayerCount(const FunctionCallbackInfo& } -void CLib3MFMultiPropertyGroup::AddLayer(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddVectorFromScalarNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsObject()) { - throw std::runtime_error("Expected struct parameter 0 (TheLayer)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - sLib3MFMultiPropertyLayer sTheLayer = convertObjectToLib3MFMultiPropertyLayer(isolate, args[0]); - unsigned int nReturnLayerIndex = 0; + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method AddLayer."); - if (wrapperTable->m_MultiPropertyGroup_AddLayer == nullptr) - throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::AddLayer."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddVectorFromScalarNode."); + if (wrapperTable->m_ImplicitFunction_AddVectorFromScalarNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddVectorFromScalarNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_AddLayer(instanceHandle, &sTheLayer, &nReturnLayerIndex); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddVectorFromScalarNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::NewFromUnsigned(isolate, nReturnLayerIndex)); + Local instanceObjNode = CLib3MFVectorFromScalarNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7431,25 +18182,37 @@ void CLib3MFMultiPropertyGroup::AddLayer(const FunctionCallbackInfo& args } -void CLib3MFMultiPropertyGroup::GetLayer(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddDecomposeVectorNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (LayerIndex)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nLayerIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - sLib3MFMultiPropertyLayer sReturnTheLayer; + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetLayer."); - if (wrapperTable->m_MultiPropertyGroup_GetLayer == nullptr) - throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::GetLayer."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddDecomposeVectorNode."); + if (wrapperTable->m_ImplicitFunction_AddDecomposeVectorNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddDecomposeVectorNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_GetLayer(instanceHandle, nLayerIndex, &sReturnTheLayer); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddDecomposeVectorNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(convertLib3MFMultiPropertyLayerToObject(isolate, sReturnTheLayer)); + Local instanceObjNode = CLib3MFDecomposeVectorNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7457,116 +18220,189 @@ void CLib3MFMultiPropertyGroup::GetLayer(const FunctionCallbackInfo& args } -void CLib3MFMultiPropertyGroup::RemoveLayer(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddComposeMatrixNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected uint32 parameter 0 (LayerIndex)"); + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - unsigned int nLayerIndex = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveLayer."); - if (wrapperTable->m_MultiPropertyGroup_RemoveLayer == nullptr) - throw std::runtime_error("Could not call Lib3MF method MultiPropertyGroup::RemoveLayer."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddComposeMatrixNode."); + if (wrapperTable->m_ImplicitFunction_AddComposeMatrixNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddComposeMatrixNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_MultiPropertyGroup_RemoveLayer(instanceHandle, nLayerIndex); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddComposeMatrixNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFComposeMatrixNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); } } -/************************************************************************************************************************* - Class CLib3MFAttachment Implementation -**************************************************************************************************************************/ -CLib3MFAttachment::CLib3MFAttachment() - : CLib3MFBaseClass() +void CLib3MFImplicitFunction::AddMatrixFromRowsNode(const FunctionCallbackInfo& args) { -} + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMatrixFromRowsNode."); + if (wrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddMatrixFromRowsNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddMatrixFromRowsNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFMatrixFromRowsNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); -CLib3MFAttachment::~CLib3MFAttachment() -{ + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } } -void CLib3MFAttachment::Init() -{ - Isolate* isolate = Isolate::GetCurrent(); - - // Prepare constructor template - Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFAttachment")); - tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); - - // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "GetPath", GetPath); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetPath", SetPath); - NODE_SET_PROTOTYPE_METHOD(tpl, "PackagePart", PackagePart); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetRelationShipType", GetRelationShipType); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetRelationShipType", SetRelationShipType); - NODE_SET_PROTOTYPE_METHOD(tpl, "WriteToFile", WriteToFile); - NODE_SET_PROTOTYPE_METHOD(tpl, "ReadFromFile", ReadFromFile); - NODE_SET_PROTOTYPE_METHOD(tpl, "ReadFromCallback", ReadFromCallback); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetStreamSize", GetStreamSize); - NODE_SET_PROTOTYPE_METHOD(tpl, "WriteToBuffer", WriteToBuffer); - NODE_SET_PROTOTYPE_METHOD(tpl, "ReadFromBuffer", ReadFromBuffer); - constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); - -} -void CLib3MFAttachment::New(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddMatrixFromColumnsNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMatrixFromColumnsNode."); + if (wrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddMatrixFromColumnsNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddMatrixFromColumnsNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFMatrixFromColumnsNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); - if (args.IsConstructCall()) { - CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFAttachment * attachmentInstance = new CLib3MFAttachment(); - attachmentInstance->Wrap(args.This()); - args.GetReturnValue().Set(args.This()); - } else { - RaiseError(isolate, "Lib3MFAttachment: Invalid call to Constructor"); + } catch (std::exception & E) { + RaiseError(isolate, E.what()); } } -Local CLib3MFAttachment::NewInstance(Local pParent, Lib3MFHandle pHandle) + +void CLib3MFImplicitFunction::AddConstantNode(const FunctionCallbackInfo& args) { - Isolate* isolate = Isolate::GetCurrent(); + Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); - Local cons = Local::New(isolate, constructor); - Local instance; - if (cons->NewInstance(isolate->GetCurrentContext()).ToLocal(&instance)) { - instance->SetInternalField(NODEWRAPPER_TABLEINDEX, External::New(isolate, CLib3MFBaseClass::getDynamicWrapperTable(pParent))); - instance->SetInternalField(NODEWRAPPER_HANDLEINDEX, External::New(isolate, pHandle)); + try { + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddConstantNode."); + if (wrapperTable->m_ImplicitFunction_AddConstantNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddConstantNode."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddConstantNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFConstantNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); } - return instance; } -void CLib3MFAttachment::GetPath(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddConstVecNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int bytesNeededPath = 0; - unsigned int bytesWrittenPath = 0; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetPath."); - if (wrapperTable->m_Attachment_GetPath == nullptr) - throw std::runtime_error("Could not call Lib3MF method Attachment::GetPath."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddConstVecNode."); + if (wrapperTable->m_ImplicitFunction_AddConstVecNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddConstVecNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult initErrorCode = wrapperTable->m_Attachment_GetPath(instanceHandle, 0, &bytesNeededPath, nullptr); - CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); - std::vector bufferPath; - bufferPath.resize(bytesNeededPath); - Lib3MFResult errorCode = wrapperTable->m_Attachment_GetPath(instanceHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0]); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddConstVecNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferPath[0])); + Local instanceObjNode = CLib3MFConstVecNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7574,24 +18410,37 @@ void CLib3MFAttachment::GetPath(const FunctionCallbackInfo& args) } -void CLib3MFAttachment::SetPath(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddConstMatNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { if (!args[0]->IsString()) { - throw std::runtime_error("Expected string parameter 0 (Path)"); + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - v8::String::Utf8Value sutf8Path(isolate, args[0]); - std::string sPath = *sutf8Path; + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetPath."); - if (wrapperTable->m_Attachment_SetPath == nullptr) - throw std::runtime_error("Could not call Lib3MF method Attachment::SetPath."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddConstMatNode."); + if (wrapperTable->m_ImplicitFunction_AddConstMatNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddConstMatNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Attachment_SetPath(instanceHandle, sPath.c_str()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddConstMatNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFConstMatNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7599,22 +18448,37 @@ void CLib3MFAttachment::SetPath(const FunctionCallbackInfo& args) } -void CLib3MFAttachment::PackagePart(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddMeshNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - Lib3MFHandle hReturnPackagePart = nullptr; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method PackagePart."); - if (wrapperTable->m_Attachment_PackagePart == nullptr) - throw std::runtime_error("Could not call Lib3MF method Attachment::PackagePart."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddMeshNode."); + if (wrapperTable->m_ImplicitFunction_AddMeshNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddMeshNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Attachment_PackagePart(instanceHandle, &hReturnPackagePart); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddMeshNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - Local instanceObjPackagePart = CLib3MFPackagePart::NewInstance(args.Holder(), hReturnPackagePart); - args.GetReturnValue().Set(instanceObjPackagePart); + Local instanceObjNode = CLib3MFMeshNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7622,26 +18486,37 @@ void CLib3MFAttachment::PackagePart(const FunctionCallbackInfo& args) } -void CLib3MFAttachment::GetRelationShipType(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddUnsignedMeshNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - unsigned int bytesNeededPath = 0; - unsigned int bytesWrittenPath = 0; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Identifier)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetRelationShipType."); - if (wrapperTable->m_Attachment_GetRelationShipType == nullptr) - throw std::runtime_error("Could not call Lib3MF method Attachment::GetRelationShipType."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddUnsignedMeshNode."); + if (wrapperTable->m_ImplicitFunction_AddUnsignedMeshNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddUnsignedMeshNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult initErrorCode = wrapperTable->m_Attachment_GetRelationShipType(instanceHandle, 0, &bytesNeededPath, nullptr); - CheckError(isolate, wrapperTable, instanceHandle, initErrorCode); - std::vector bufferPath; - bufferPath.resize(bytesNeededPath); - Lib3MFResult errorCode = wrapperTable->m_Attachment_GetRelationShipType(instanceHandle, bytesNeededPath, &bytesWrittenPath, &bufferPath[0]); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddUnsignedMeshNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(String::NewFromUtf8(isolate, &bufferPath[0])); + Local instanceObjNode = CLib3MFUnsignedMeshNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7649,24 +18524,37 @@ void CLib3MFAttachment::GetRelationShipType(const FunctionCallbackInfo& a } -void CLib3MFAttachment::SetRelationShipType(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddFunctionCallNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { if (!args[0]->IsString()) { - throw std::runtime_error("Expected string parameter 0 (Path)"); + throw std::runtime_error("Expected string parameter 0 (Identifier)"); } - v8::String::Utf8Value sutf8Path(isolate, args[0]); - std::string sPath = *sutf8Path; + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (DisplayName)"); + } + if (!args[2]->IsString()) { + throw std::runtime_error("Expected string parameter 2 (Tag)"); + } + v8::String::Utf8Value sutf8Identifier(isolate, args[0]); + std::string sIdentifier = *sutf8Identifier; + v8::String::Utf8Value sutf8DisplayName(isolate, args[1]); + std::string sDisplayName = *sutf8DisplayName; + v8::String::Utf8Value sutf8Tag(isolate, args[2]); + std::string sTag = *sutf8Tag; + Lib3MFHandle hReturnNode = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetRelationShipType."); - if (wrapperTable->m_Attachment_SetRelationShipType == nullptr) - throw std::runtime_error("Could not call Lib3MF method Attachment::SetRelationShipType."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddFunctionCallNode."); + if (wrapperTable->m_ImplicitFunction_AddFunctionCallNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddFunctionCallNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Attachment_SetRelationShipType(instanceHandle, sPath.c_str()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddFunctionCallNode(instanceHandle, sIdentifier.c_str(), sDisplayName.c_str(), sTag.c_str(), &hReturnNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjNode = CLib3MFFunctionCallNode::NewInstance(args.Holder(), hReturnNode); + args.GetReturnValue().Set(instanceObjNode); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7674,24 +18562,22 @@ void CLib3MFAttachment::SetRelationShipType(const FunctionCallbackInfo& a } -void CLib3MFAttachment::WriteToFile(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::GetNodes(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsString()) { - throw std::runtime_error("Expected string parameter 0 (FileName)"); - } - v8::String::Utf8Value sutf8FileName(isolate, args[0]); - std::string sFileName = *sutf8FileName; + Lib3MFHandle hReturnIterator = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method WriteToFile."); - if (wrapperTable->m_Attachment_WriteToFile == nullptr) - throw std::runtime_error("Could not call Lib3MF method Attachment::WriteToFile."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetNodes."); + if (wrapperTable->m_ImplicitFunction_GetNodes == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::GetNodes."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Attachment_WriteToFile(instanceHandle, sFileName.c_str()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_GetNodes(instanceHandle, &hReturnIterator); CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjIterator = CLib3MFNodeIterator::NewInstance(args.Holder(), hReturnIterator); + args.GetReturnValue().Set(instanceObjIterator); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7699,23 +18585,26 @@ void CLib3MFAttachment::WriteToFile(const FunctionCallbackInfo& args) } -void CLib3MFAttachment::ReadFromFile(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::RemoveNode(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsString()) { - throw std::runtime_error("Expected string parameter 0 (FileName)"); + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (Node)"); } - v8::String::Utf8Value sutf8FileName(isolate, args[0]); - std::string sFileName = *sutf8FileName; + Local objNode = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFImplicitNode * instanceNode = ObjectWrap::Unwrap(objNode); + if (instanceNode == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (Node)"); + Lib3MFHandle hNode = instanceNode->getHandle( objNode ); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method ReadFromFile."); - if (wrapperTable->m_Attachment_ReadFromFile == nullptr) - throw std::runtime_error("Could not call Lib3MF method Attachment::ReadFromFile."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveNode."); + if (wrapperTable->m_ImplicitFunction_RemoveNode == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::RemoveNode."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Attachment_ReadFromFile(instanceHandle, sFileName.c_str()); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_RemoveNode(instanceHandle, hNode); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -7724,30 +18613,34 @@ void CLib3MFAttachment::ReadFromFile(const FunctionCallbackInfo& args) } -void CLib3MFAttachment::ReadFromCallback(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddLink(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[1]->IsString()) { - throw std::runtime_error("Expected uint64 parameter 1 (StreamSize)"); + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (Source)"); } - if (!args[3]->IsString()) { - throw std::runtime_error("Expected pointer parameter 3 (UserData)"); + if (!args[1]->IsObject()) { + throw std::runtime_error("Expected class parameter 1 (Target)"); } - v8::String::Utf8Value sutf8StreamSize(isolate, args[1]); - std::string sStreamSize = *sutf8StreamSize; - uint64_t nStreamSize = stoull(sStreamSize); - v8::String::Utf8Value sutf8UserData(isolate, args[3]); - std::string sUserData = *sutf8UserData; - uint64_t nUserData = stoull(sUserData); + Local objSource = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFImplicitPort * instanceSource = ObjectWrap::Unwrap(objSource); + if (instanceSource == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (Source)"); + Lib3MFHandle hSource = instanceSource->getHandle( objSource ); + Local objTarget = args[1]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFImplicitPort * instanceTarget = ObjectWrap::Unwrap(objTarget); + if (instanceTarget == nullptr) + throw std::runtime_error("Invalid Object parameter 1 (Target)"); + Lib3MFHandle hTarget = instanceTarget->getHandle( objTarget ); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method ReadFromCallback."); - if (wrapperTable->m_Attachment_ReadFromCallback == nullptr) - throw std::runtime_error("Could not call Lib3MF method Attachment::ReadFromCallback."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddLink."); + if (wrapperTable->m_ImplicitFunction_AddLink == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddLink."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Attachment_ReadFromCallback(instanceHandle, nullptr, nStreamSize, nullptr, (void*) nUserData); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddLink(instanceHandle, hSource, hTarget); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -7756,21 +18649,29 @@ void CLib3MFAttachment::ReadFromCallback(const FunctionCallbackInfo& args } -void CLib3MFAttachment::GetStreamSize(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::AddLinkByNames(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - uint64_t nReturnStreamSize = 0; + if (!args[0]->IsString()) { + throw std::runtime_error("Expected string parameter 0 (Source)"); + } + if (!args[1]->IsString()) { + throw std::runtime_error("Expected string parameter 1 (Target)"); + } + v8::String::Utf8Value sutf8Source(isolate, args[0]); + std::string sSource = *sutf8Source; + v8::String::Utf8Value sutf8Target(isolate, args[1]); + std::string sTarget = *sutf8Target; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetStreamSize."); - if (wrapperTable->m_Attachment_GetStreamSize == nullptr) - throw std::runtime_error("Could not call Lib3MF method Attachment::GetStreamSize."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddLinkByNames."); + if (wrapperTable->m_ImplicitFunction_AddLinkByNames == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::AddLinkByNames."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Attachment_GetStreamSize(instanceHandle, &nReturnStreamSize); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_AddLinkByNames(instanceHandle, sSource.c_str(), sTarget.c_str()); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(String::NewFromUtf8(isolate, std::to_string(nReturnStreamSize).c_str())); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7778,18 +18679,18 @@ void CLib3MFAttachment::GetStreamSize(const FunctionCallbackInfo& args) } -void CLib3MFAttachment::WriteToBuffer(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::Clear(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method WriteToBuffer."); - if (wrapperTable->m_Attachment_WriteToBuffer == nullptr) - throw std::runtime_error("Could not call Lib3MF method Attachment::WriteToBuffer."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method Clear."); + if (wrapperTable->m_ImplicitFunction_Clear == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::Clear."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Attachment_WriteToBuffer(instanceHandle, 0, nullptr, nullptr); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_Clear(instanceHandle); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -7798,18 +18699,18 @@ void CLib3MFAttachment::WriteToBuffer(const FunctionCallbackInfo& args) } -void CLib3MFAttachment::ReadFromBuffer(const FunctionCallbackInfo& args) +void CLib3MFImplicitFunction::SortNodesTopologically(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method ReadFromBuffer."); - if (wrapperTable->m_Attachment_ReadFromBuffer == nullptr) - throw std::runtime_error("Could not call Lib3MF method Attachment::ReadFromBuffer."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SortNodesTopologically."); + if (wrapperTable->m_ImplicitFunction_SortNodesTopologically == nullptr) + throw std::runtime_error("Could not call Lib3MF method ImplicitFunction::SortNodesTopologically."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Attachment_ReadFromBuffer(instanceHandle, 0, nullptr); + Lib3MFResult errorCode = wrapperTable->m_ImplicitFunction_SortNodesTopologically(instanceHandle); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -7818,56 +18719,58 @@ void CLib3MFAttachment::ReadFromBuffer(const FunctionCallbackInfo& args) } /************************************************************************************************************************* - Class CLib3MFTexture2D Implementation + Class CLib3MFFunctionFromImage3D Implementation **************************************************************************************************************************/ -CLib3MFTexture2D::CLib3MFTexture2D() +CLib3MFFunctionFromImage3D::CLib3MFFunctionFromImage3D() : CLib3MFBaseClass() { } -CLib3MFTexture2D::~CLib3MFTexture2D() +CLib3MFFunctionFromImage3D::~CLib3MFFunctionFromImage3D() { } -void CLib3MFTexture2D::Init() +void CLib3MFFunctionFromImage3D::Init() { Isolate* isolate = Isolate::GetCurrent(); // Prepare constructor template Local tpl = FunctionTemplate::New(isolate, New); - tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFTexture2D")); + tpl->SetClassName(String::NewFromUtf8(isolate, "Lib3MFFunctionFromImage3D")); tpl->InstanceTemplate()->SetInternalFieldCount(NODEWRAPPER_FIELDCOUNT); // Prototype - NODE_SET_PROTOTYPE_METHOD(tpl, "GetAttachment", GetAttachment); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetAttachment", SetAttachment); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetContentType", GetContentType); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetContentType", SetContentType); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetTileStyleUV", GetTileStyleUV); - NODE_SET_PROTOTYPE_METHOD(tpl, "SetTileStyleUV", SetTileStyleUV); - NODE_SET_PROTOTYPE_METHOD(tpl, "GetFilter", GetFilter); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetImage3D", GetImage3D); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetImage3D", SetImage3D); NODE_SET_PROTOTYPE_METHOD(tpl, "SetFilter", SetFilter); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetFilter", GetFilter); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetTileStyles", SetTileStyles); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetTileStyles", GetTileStyles); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetOffset", GetOffset); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetOffset", SetOffset); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetScale", GetScale); + NODE_SET_PROTOTYPE_METHOD(tpl, "SetScale", SetScale); constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); } -void CLib3MFTexture2D::New(const FunctionCallbackInfo& args) +void CLib3MFFunctionFromImage3D::New(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); if (args.IsConstructCall()) { CLib3MFBaseClass * holderObj = ObjectWrap::Unwrap(args.Holder()); - CLib3MFTexture2D * texture2dInstance = new CLib3MFTexture2D(); - texture2dInstance->Wrap(args.This()); + CLib3MFFunctionFromImage3D * functionfromimage3dInstance = new CLib3MFFunctionFromImage3D(); + functionfromimage3dInstance->Wrap(args.This()); args.GetReturnValue().Set(args.This()); } else { - RaiseError(isolate, "Lib3MFTexture2D: Invalid call to Constructor"); + RaiseError(isolate, "Lib3MFFunctionFromImage3D: Invalid call to Constructor"); } } -Local CLib3MFTexture2D::NewInstance(Local pParent, Lib3MFHandle pHandle) +Local CLib3MFFunctionFromImage3D::NewInstance(Local pParent, Lib3MFHandle pHandle) { Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); @@ -7881,22 +18784,22 @@ Local CLib3MFTexture2D::NewInstance(Local pParent, Lib3MFHandle } -void CLib3MFTexture2D::GetAttachment(const FunctionCallbackInfo& args) +void CLib3MFFunctionFromImage3D::GetImage3D(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - Lib3MFHandle hReturnAttachment = nullptr; + Lib3MFHandle hReturnImage3D = nullptr; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetAttachment."); - if (wrapperTable->m_Texture2D_GetAttachment == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2D::GetAttachment."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetImage3D."); + if (wrapperTable->m_FunctionFromImage3D_GetImage3D == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionFromImage3D::GetImage3D."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2D_GetAttachment(instanceHandle, &hReturnAttachment); + Lib3MFResult errorCode = wrapperTable->m_FunctionFromImage3D_GetImage3D(instanceHandle, &hReturnImage3D); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - Local instanceObjAttachment = CLib3MFAttachment::NewInstance(args.Holder(), hReturnAttachment); - args.GetReturnValue().Set(instanceObjAttachment); + Local instanceObjImage3D = CLib3MFImage3D::NewInstance(args.Holder(), hReturnImage3D); + args.GetReturnValue().Set(instanceObjImage3D); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7904,26 +18807,26 @@ void CLib3MFTexture2D::GetAttachment(const FunctionCallbackInfo& args) } -void CLib3MFTexture2D::SetAttachment(const FunctionCallbackInfo& args) +void CLib3MFFunctionFromImage3D::SetImage3D(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { if (!args[0]->IsObject()) { - throw std::runtime_error("Expected class parameter 0 (Attachment)"); + throw std::runtime_error("Expected class parameter 0 (Image3D)"); } - Local objAttachment = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); - CLib3MFAttachment * instanceAttachment = ObjectWrap::Unwrap(objAttachment); - if (instanceAttachment == nullptr) - throw std::runtime_error("Invalid Object parameter 0 (Attachment)"); - Lib3MFHandle hAttachment = instanceAttachment->getHandle( objAttachment ); + Local objImage3D = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFImage3D * instanceImage3D = ObjectWrap::Unwrap(objImage3D); + if (instanceImage3D == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (Image3D)"); + Lib3MFHandle hImage3D = instanceImage3D->getHandle( objImage3D ); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetAttachment."); - if (wrapperTable->m_Texture2D_SetAttachment == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2D::SetAttachment."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetImage3D."); + if (wrapperTable->m_FunctionFromImage3D_SetImage3D == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionFromImage3D::SetImage3D."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2D_SetAttachment(instanceHandle, hAttachment); + Lib3MFResult errorCode = wrapperTable->m_FunctionFromImage3D_SetImage3D(instanceHandle, hImage3D); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -7932,21 +18835,23 @@ void CLib3MFTexture2D::SetAttachment(const FunctionCallbackInfo& args) } -void CLib3MFTexture2D::GetContentType(const FunctionCallbackInfo& args) +void CLib3MFFunctionFromImage3D::SetFilter(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - eLib3MFTextureType eReturnContentType; + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 0 (Filter)"); + } + unsigned int eFilter = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetContentType."); - if (wrapperTable->m_Texture2D_GetContentType == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2D::GetContentType."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetFilter."); + if (wrapperTable->m_FunctionFromImage3D_SetFilter == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionFromImage3D::SetFilter."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2D_GetContentType(instanceHandle, &eReturnContentType); + Lib3MFResult errorCode = wrapperTable->m_FunctionFromImage3D_SetFilter(instanceHandle, (eLib3MFTextureFilter) eFilter); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::New(isolate, (int)eReturnContentType)); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -7954,22 +18859,52 @@ void CLib3MFTexture2D::GetContentType(const FunctionCallbackInfo& args) } -void CLib3MFTexture2D::SetContentType(const FunctionCallbackInfo& args) +void CLib3MFFunctionFromImage3D::GetFilter(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected enum parameter 0 (ContentType)"); - } - unsigned int eContentType = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + eLib3MFTextureFilter eReturnFilter; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetContentType."); - if (wrapperTable->m_Texture2D_SetContentType == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2D::SetContentType."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetFilter."); + if (wrapperTable->m_FunctionFromImage3D_GetFilter == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionFromImage3D::GetFilter."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionFromImage3D_GetFilter(instanceHandle, &eReturnFilter); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Integer::New(isolate, (int)eReturnFilter)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionFromImage3D::SetTileStyles(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 0 (TileStyleU)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 1 (TileStyleV)"); + } + if (!args[2]->IsUint32()) { + throw std::runtime_error("Expected enum parameter 2 (TileStyleW)"); + } + unsigned int eTileStyleU = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + unsigned int eTileStyleV = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + unsigned int eTileStyleW = (unsigned int) args[2]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetTileStyles."); + if (wrapperTable->m_FunctionFromImage3D_SetTileStyles == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionFromImage3D::SetTileStyles."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2D_SetContentType(instanceHandle, (eLib3MFTextureType) eContentType); + Lib3MFResult errorCode = wrapperTable->m_FunctionFromImage3D_SetTileStyles(instanceHandle, (eLib3MFTextureTileStyle) eTileStyleU, (eLib3MFTextureTileStyle) eTileStyleV, (eLib3MFTextureTileStyle) eTileStyleW); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -7978,7 +18913,7 @@ void CLib3MFTexture2D::SetContentType(const FunctionCallbackInfo& args) } -void CLib3MFTexture2D::GetTileStyleUV(const FunctionCallbackInfo& args) +void CLib3MFFunctionFromImage3D::GetTileStyles(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); @@ -7986,16 +18921,18 @@ void CLib3MFTexture2D::GetTileStyleUV(const FunctionCallbackInfo& args) Local outObject = Object::New(isolate); eLib3MFTextureTileStyle eReturnTileStyleU; eLib3MFTextureTileStyle eReturnTileStyleV; + eLib3MFTextureTileStyle eReturnTileStyleW; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTileStyleUV."); - if (wrapperTable->m_Texture2D_GetTileStyleUV == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2D::GetTileStyleUV."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetTileStyles."); + if (wrapperTable->m_FunctionFromImage3D_GetTileStyles == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionFromImage3D::GetTileStyles."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2D_GetTileStyleUV(instanceHandle, &eReturnTileStyleU, &eReturnTileStyleV); + Lib3MFResult errorCode = wrapperTable->m_FunctionFromImage3D_GetTileStyles(instanceHandle, &eReturnTileStyleU, &eReturnTileStyleV, &eReturnTileStyleW); CheckError(isolate, wrapperTable, instanceHandle, errorCode); outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "TileStyleU"), Integer::New(isolate, (int)eReturnTileStyleU)); outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "TileStyleV"), Integer::New(isolate, (int)eReturnTileStyleV)); + outObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "TileStyleW"), Integer::New(isolate, (int)eReturnTileStyleW)); args.GetReturnValue().Set(outObject); } catch (std::exception & E) { @@ -8004,26 +18941,44 @@ void CLib3MFTexture2D::GetTileStyleUV(const FunctionCallbackInfo& args) } -void CLib3MFTexture2D::SetTileStyleUV(const FunctionCallbackInfo& args) +void CLib3MFFunctionFromImage3D::GetOffset(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected enum parameter 0 (TileStyleU)"); - } - if (!args[1]->IsUint32()) { - throw std::runtime_error("Expected enum parameter 1 (TileStyleV)"); + double dReturnOffset = 0.0; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetOffset."); + if (wrapperTable->m_FunctionFromImage3D_GetOffset == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionFromImage3D::GetOffset."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_FunctionFromImage3D_GetOffset(instanceHandle, &dReturnOffset); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + args.GetReturnValue().Set(Number::New(isolate, dReturnOffset)); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFFunctionFromImage3D::SetOffset(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsNumber()) { + throw std::runtime_error("Expected double parameter 0 (Offset)"); } - unsigned int eTileStyleU = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); - unsigned int eTileStyleV = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + double dOffset = (double) args[0]->NumberValue(isolate->GetCurrentContext()).ToChecked(); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetTileStyleUV."); - if (wrapperTable->m_Texture2D_SetTileStyleUV == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2D::SetTileStyleUV."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetOffset."); + if (wrapperTable->m_FunctionFromImage3D_SetOffset == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionFromImage3D::SetOffset."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2D_SetTileStyleUV(instanceHandle, (eLib3MFTextureTileStyle) eTileStyleU, (eLib3MFTextureTileStyle) eTileStyleV); + Lib3MFResult errorCode = wrapperTable->m_FunctionFromImage3D_SetOffset(instanceHandle, dOffset); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -8032,21 +18987,21 @@ void CLib3MFTexture2D::SetTileStyleUV(const FunctionCallbackInfo& args) } -void CLib3MFTexture2D::GetFilter(const FunctionCallbackInfo& args) +void CLib3MFFunctionFromImage3D::GetScale(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - eLib3MFTextureFilter eReturnFilter; + double dReturnScale = 0.0; sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method GetFilter."); - if (wrapperTable->m_Texture2D_GetFilter == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2D::GetFilter."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetScale."); + if (wrapperTable->m_FunctionFromImage3D_GetScale == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionFromImage3D::GetScale."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2D_GetFilter(instanceHandle, &eReturnFilter); + Lib3MFResult errorCode = wrapperTable->m_FunctionFromImage3D_GetScale(instanceHandle, &dReturnScale); CheckError(isolate, wrapperTable, instanceHandle, errorCode); - args.GetReturnValue().Set(Integer::New(isolate, (int)eReturnFilter)); + args.GetReturnValue().Set(Number::New(isolate, dReturnScale)); } catch (std::exception & E) { RaiseError(isolate, E.what()); @@ -8054,22 +19009,22 @@ void CLib3MFTexture2D::GetFilter(const FunctionCallbackInfo& args) } -void CLib3MFTexture2D::SetFilter(const FunctionCallbackInfo& args) +void CLib3MFFunctionFromImage3D::SetScale(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); HandleScope scope(isolate); try { - if (!args[0]->IsUint32()) { - throw std::runtime_error("Expected enum parameter 0 (Filter)"); + if (!args[0]->IsNumber()) { + throw std::runtime_error("Expected double parameter 0 (Scale)"); } - unsigned int eFilter = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + double dScale = (double) args[0]->NumberValue(isolate->GetCurrentContext()).ToChecked(); sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); if (wrapperTable == nullptr) - throw std::runtime_error("Could not get wrapper table for Lib3MF method SetFilter."); - if (wrapperTable->m_Texture2D_SetFilter == nullptr) - throw std::runtime_error("Could not call Lib3MF method Texture2D::SetFilter."); + throw std::runtime_error("Could not get wrapper table for Lib3MF method SetScale."); + if (wrapperTable->m_FunctionFromImage3D_SetScale == nullptr) + throw std::runtime_error("Could not call Lib3MF method FunctionFromImage3D::SetScale."); Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); - Lib3MFResult errorCode = wrapperTable->m_Texture2D_SetFilter(instanceHandle, (eLib3MFTextureFilter) eFilter); + Lib3MFResult errorCode = wrapperTable->m_FunctionFromImage3D_SetScale(instanceHandle, dScale); CheckError(isolate, wrapperTable, instanceHandle, errorCode); } catch (std::exception & E) { @@ -10629,6 +21584,7 @@ void CLib3MFModel::Init() NODE_SET_PROTOTYPE_METHOD(tpl, "GetComponentsObjectByID", GetComponentsObjectByID); NODE_SET_PROTOTYPE_METHOD(tpl, "GetColorGroupByID", GetColorGroupByID); NODE_SET_PROTOTYPE_METHOD(tpl, "GetSliceStackByID", GetSliceStackByID); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetLevelSetByID", GetLevelSetByID); NODE_SET_PROTOTYPE_METHOD(tpl, "GetBuildUUID", GetBuildUUID); NODE_SET_PROTOTYPE_METHOD(tpl, "SetBuildUUID", SetBuildUUID); NODE_SET_PROTOTYPE_METHOD(tpl, "GetBuildItems", GetBuildItems); @@ -10644,7 +21600,9 @@ void CLib3MFModel::Init() NODE_SET_PROTOTYPE_METHOD(tpl, "GetCompositeMaterials", GetCompositeMaterials); NODE_SET_PROTOTYPE_METHOD(tpl, "GetMultiPropertyGroups", GetMultiPropertyGroups); NODE_SET_PROTOTYPE_METHOD(tpl, "GetSliceStacks", GetSliceStacks); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetImage3Ds", GetImage3Ds); NODE_SET_PROTOTYPE_METHOD(tpl, "MergeToModel", MergeToModel); + NODE_SET_PROTOTYPE_METHOD(tpl, "MergeFromModel", MergeFromModel); NODE_SET_PROTOTYPE_METHOD(tpl, "AddMeshObject", AddMeshObject); NODE_SET_PROTOTYPE_METHOD(tpl, "AddComponentsObject", AddComponentsObject); NODE_SET_PROTOTYPE_METHOD(tpl, "AddSliceStack", AddSliceStack); @@ -10654,6 +21612,8 @@ void CLib3MFModel::Init() NODE_SET_PROTOTYPE_METHOD(tpl, "AddTexture2DGroup", AddTexture2DGroup); NODE_SET_PROTOTYPE_METHOD(tpl, "AddCompositeMaterials", AddCompositeMaterials); NODE_SET_PROTOTYPE_METHOD(tpl, "AddMultiPropertyGroup", AddMultiPropertyGroup); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddImageStack", AddImageStack); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetImageStackByID", GetImageStackByID); NODE_SET_PROTOTYPE_METHOD(tpl, "AddBuildItem", AddBuildItem); NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveBuildItem", RemoveBuildItem); NODE_SET_PROTOTYPE_METHOD(tpl, "GetMetaDataGroup", GetMetaDataGroup); @@ -10670,6 +21630,13 @@ void CLib3MFModel::Init() NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveCustomContentType", RemoveCustomContentType); NODE_SET_PROTOTYPE_METHOD(tpl, "SetRandomNumberCallback", SetRandomNumberCallback); NODE_SET_PROTOTYPE_METHOD(tpl, "GetKeyStore", GetKeyStore); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetFunctions", GetFunctions); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddImplicitFunction", AddImplicitFunction); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddFunctionFromImage3D", AddFunctionFromImage3D); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddVolumeData", AddVolumeData); + NODE_SET_PROTOTYPE_METHOD(tpl, "AddLevelSet", AddLevelSet); + NODE_SET_PROTOTYPE_METHOD(tpl, "GetLevelSets", GetLevelSets); + NODE_SET_PROTOTYPE_METHOD(tpl, "RemoveResource", RemoveResource); constructor.Reset(isolate, tpl->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); } @@ -11204,6 +22171,33 @@ void CLib3MFModel::GetSliceStackByID(const FunctionCallbackInfo& args) } +void CLib3MFModel::GetLevelSetByID(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (UniqueResourceID)"); + } + unsigned int nUniqueResourceID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Lib3MFHandle hReturnLevelSetObjectInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetLevelSetByID."); + if (wrapperTable->m_Model_GetLevelSetByID == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::GetLevelSetByID."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_GetLevelSetByID(instanceHandle, nUniqueResourceID, &hReturnLevelSetObjectInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjLevelSetObjectInstance = CLib3MFLevelSet::NewInstance(args.Holder(), hReturnLevelSetObjectInstance); + args.GetReturnValue().Set(instanceObjLevelSetObjectInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + void CLib3MFModel::GetBuildUUID(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); @@ -11558,6 +22552,29 @@ void CLib3MFModel::GetSliceStacks(const FunctionCallbackInfo& args) } +void CLib3MFModel::GetImage3Ds(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnResourceIterator = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetImage3Ds."); + if (wrapperTable->m_Model_GetImage3Ds == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::GetImage3Ds."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_GetImage3Ds(instanceHandle, &hReturnResourceIterator); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjResourceIterator = CLib3MFImage3DIterator::NewInstance(args.Holder(), hReturnResourceIterator); + args.GetReturnValue().Set(instanceObjResourceIterator); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + void CLib3MFModel::MergeToModel(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); @@ -11581,6 +22598,34 @@ void CLib3MFModel::MergeToModel(const FunctionCallbackInfo& args) } +void CLib3MFModel::MergeFromModel(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (ModelInstance)"); + } + Local objModelInstance = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFModel * instanceModelInstance = ObjectWrap::Unwrap(objModelInstance); + if (instanceModelInstance == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (ModelInstance)"); + Lib3MFHandle hModelInstance = instanceModelInstance->getHandle( objModelInstance ); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method MergeFromModel."); + if (wrapperTable->m_Model_MergeFromModel == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::MergeFromModel."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_MergeFromModel(instanceHandle, hModelInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + void CLib3MFModel::AddMeshObject(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); @@ -11816,6 +22861,68 @@ void CLib3MFModel::AddMultiPropertyGroup(const FunctionCallbackInfo& args } +void CLib3MFModel::AddImageStack(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (ColumnCount)"); + } + if (!args[1]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 1 (RowCount)"); + } + if (!args[2]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 2 (SheetCount)"); + } + unsigned int nColumnCount = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + unsigned int nRowCount = (unsigned int) args[1]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + unsigned int nSheetCount = (unsigned int) args[2]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Lib3MFHandle hReturnInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddImageStack."); + if (wrapperTable->m_Model_AddImageStack == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::AddImageStack."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_AddImageStack(instanceHandle, nColumnCount, nRowCount, nSheetCount, &hReturnInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjInstance = CLib3MFImageStack::NewInstance(args.Holder(), hReturnInstance); + args.GetReturnValue().Set(instanceObjInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFModel::GetImageStackByID(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsUint32()) { + throw std::runtime_error("Expected uint32 parameter 0 (UniqueResourceID)"); + } + unsigned int nUniqueResourceID = (unsigned int) args[0]->IntegerValue(isolate->GetCurrentContext()).ToChecked(); + Lib3MFHandle hReturnImageStackInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetImageStackByID."); + if (wrapperTable->m_Model_GetImageStackByID == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::GetImageStackByID."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_GetImageStackByID(instanceHandle, nUniqueResourceID, &hReturnImageStackInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjImageStackInstance = CLib3MFImageStack::NewInstance(args.Holder(), hReturnImageStackInstance); + args.GetReturnValue().Set(instanceObjImageStackInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + void CLib3MFModel::AddBuildItem(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); @@ -12231,6 +23338,180 @@ void CLib3MFModel::GetKeyStore(const FunctionCallbackInfo& args) } } + +void CLib3MFModel::GetFunctions(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnTheResourceIterator = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetFunctions."); + if (wrapperTable->m_Model_GetFunctions == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::GetFunctions."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_GetFunctions(instanceHandle, &hReturnTheResourceIterator); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjTheResourceIterator = CLib3MFFunctionIterator::NewInstance(args.Holder(), hReturnTheResourceIterator); + args.GetReturnValue().Set(instanceObjTheResourceIterator); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFModel::AddImplicitFunction(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnFunctionInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddImplicitFunction."); + if (wrapperTable->m_Model_AddImplicitFunction == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::AddImplicitFunction."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_AddImplicitFunction(instanceHandle, &hReturnFunctionInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjFunctionInstance = CLib3MFImplicitFunction::NewInstance(args.Holder(), hReturnFunctionInstance); + args.GetReturnValue().Set(instanceObjFunctionInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFModel::AddFunctionFromImage3D(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (Image3DInstance)"); + } + Local objImage3DInstance = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFImage3D * instanceImage3DInstance = ObjectWrap::Unwrap(objImage3DInstance); + if (instanceImage3DInstance == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (Image3DInstance)"); + Lib3MFHandle hImage3DInstance = instanceImage3DInstance->getHandle( objImage3DInstance ); + Lib3MFHandle hReturnFunctionInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddFunctionFromImage3D."); + if (wrapperTable->m_Model_AddFunctionFromImage3D == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::AddFunctionFromImage3D."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_AddFunctionFromImage3D(instanceHandle, hImage3DInstance, &hReturnFunctionInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjFunctionInstance = CLib3MFFunctionFromImage3D::NewInstance(args.Holder(), hReturnFunctionInstance); + args.GetReturnValue().Set(instanceObjFunctionInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFModel::AddVolumeData(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnVolumeDataInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddVolumeData."); + if (wrapperTable->m_Model_AddVolumeData == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::AddVolumeData."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_AddVolumeData(instanceHandle, &hReturnVolumeDataInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjVolumeDataInstance = CLib3MFVolumeData::NewInstance(args.Holder(), hReturnVolumeDataInstance); + args.GetReturnValue().Set(instanceObjVolumeDataInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFModel::AddLevelSet(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnLevelSetInstance = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method AddLevelSet."); + if (wrapperTable->m_Model_AddLevelSet == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::AddLevelSet."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_AddLevelSet(instanceHandle, &hReturnLevelSetInstance); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjLevelSetInstance = CLib3MFLevelSet::NewInstance(args.Holder(), hReturnLevelSetInstance); + args.GetReturnValue().Set(instanceObjLevelSetInstance); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFModel::GetLevelSets(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + Lib3MFHandle hReturnResourceIterator = nullptr; + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method GetLevelSets."); + if (wrapperTable->m_Model_GetLevelSets == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::GetLevelSets."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_GetLevelSets(instanceHandle, &hReturnResourceIterator); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + Local instanceObjResourceIterator = CLib3MFLevelSetIterator::NewInstance(args.Holder(), hReturnResourceIterator); + args.GetReturnValue().Set(instanceObjResourceIterator); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + + +void CLib3MFModel::RemoveResource(const FunctionCallbackInfo& args) +{ + Isolate* isolate = args.GetIsolate(); + HandleScope scope(isolate); + try { + if (!args[0]->IsObject()) { + throw std::runtime_error("Expected class parameter 0 (Resource)"); + } + Local objResource = args[0]->ToObject(isolate->GetCurrentContext()).ToLocalChecked(); + CLib3MFResource * instanceResource = ObjectWrap::Unwrap(objResource); + if (instanceResource == nullptr) + throw std::runtime_error("Invalid Object parameter 0 (Resource)"); + Lib3MFHandle hResource = instanceResource->getHandle( objResource ); + sLib3MFDynamicWrapperTable * wrapperTable = CLib3MFBaseClass::getDynamicWrapperTable(args.Holder()); + if (wrapperTable == nullptr) + throw std::runtime_error("Could not get wrapper table for Lib3MF method RemoveResource."); + if (wrapperTable->m_Model_RemoveResource == nullptr) + throw std::runtime_error("Could not call Lib3MF method Model::RemoveResource."); + Lib3MFHandle instanceHandle = CLib3MFBaseClass::getHandle(args.Holder()); + Lib3MFResult errorCode = wrapperTable->m_Model_RemoveResource(instanceHandle, hResource); + CheckError(isolate, wrapperTable, instanceHandle, errorCode); + + } catch (std::exception & E) { + RaiseError(isolate, E.what()); + } +} + /************************************************************************************************************************* Class CLib3MFWrapper Implementation **************************************************************************************************************************/ @@ -12336,7 +23617,7 @@ void CLib3MFWrapper::New(const FunctionCallbackInfo& args) newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eBeamLatticeClipMode_NoClipMode"), Integer::New(isolate, 0)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eBeamLatticeClipMode_Inside"), Integer::New(isolate, 1)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eBeamLatticeClipMode_Outside"), Integer::New(isolate, 2)); - newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eBeamLatticeBallMode_None"), Integer::New(isolate, 0)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eBeamLatticeBallMode_BeamLatticeBallModeNone"), Integer::New(isolate, 0)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eBeamLatticeBallMode_Mixed"), Integer::New(isolate, 1)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eBeamLatticeBallMode_All"), Integer::New(isolate, 2)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eProgressIdentifier_QUERYCANCELED"), Integer::New(isolate, 0)); @@ -12366,6 +23647,76 @@ void CLib3MFWrapper::New(const FunctionCallbackInfo& args) newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eBlendMethod_NoBlendMethod"), Integer::New(isolate, 0)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eBlendMethod_Mix"), Integer::New(isolate, 1)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eBlendMethod_Multiply"), Integer::New(isolate, 2)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eChannelName_Red"), Integer::New(isolate, 0)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eChannelName_Green"), Integer::New(isolate, 1)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eChannelName_Blue"), Integer::New(isolate, 2)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eChannelName_Alpha"), Integer::New(isolate, 3)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eCompositionMethod_WeightedSum"), Integer::New(isolate, 0)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eCompositionMethod_Multiply"), Integer::New(isolate, 1)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eCompositionMethod_Min"), Integer::New(isolate, 2)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eCompositionMethod_Max"), Integer::New(isolate, 3)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eCompositionMethod_Mask"), Integer::New(isolate, 4)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eCompositionSpace_Raw"), Integer::New(isolate, 0)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eCompositionSpace_LinearColor"), Integer::New(isolate, 1)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Addition"), Integer::New(isolate, 1)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Subtraction"), Integer::New(isolate, 2)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Multiplication"), Integer::New(isolate, 3)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Division"), Integer::New(isolate, 4)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Constant"), Integer::New(isolate, 5)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_ConstVec"), Integer::New(isolate, 6)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_ConstMat"), Integer::New(isolate, 7)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_ComposeVector"), Integer::New(isolate, 8)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_DecomposeVector"), Integer::New(isolate, 9)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_ComposeMatrix"), Integer::New(isolate, 10)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_MatrixFromColumns"), Integer::New(isolate, 11)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_MatrixFromRows"), Integer::New(isolate, 12)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Dot"), Integer::New(isolate, 13)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Cross"), Integer::New(isolate, 14)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_MatVecMultiplication"), Integer::New(isolate, 15)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Transpose"), Integer::New(isolate, 16)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Inverse"), Integer::New(isolate, 17)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Sinus"), Integer::New(isolate, 18)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Cosinus"), Integer::New(isolate, 19)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Tan"), Integer::New(isolate, 20)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_ArcSin"), Integer::New(isolate, 21)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_ArcCos"), Integer::New(isolate, 22)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_ArcTan"), Integer::New(isolate, 23)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_ArcTan2"), Integer::New(isolate, 24)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Min"), Integer::New(isolate, 25)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Max"), Integer::New(isolate, 26)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Abs"), Integer::New(isolate, 27)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Fmod"), Integer::New(isolate, 28)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Pow"), Integer::New(isolate, 29)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Sqrt"), Integer::New(isolate, 30)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Exp"), Integer::New(isolate, 31)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Log"), Integer::New(isolate, 32)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Log2"), Integer::New(isolate, 33)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Log10"), Integer::New(isolate, 34)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Select"), Integer::New(isolate, 35)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Clamp"), Integer::New(isolate, 36)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Sinh"), Integer::New(isolate, 37)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Cosh"), Integer::New(isolate, 38)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Tanh"), Integer::New(isolate, 39)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Round"), Integer::New(isolate, 40)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Ceil"), Integer::New(isolate, 41)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Floor"), Integer::New(isolate, 42)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Sign"), Integer::New(isolate, 43)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Fract"), Integer::New(isolate, 44)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_FunctionCall"), Integer::New(isolate, 45)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Mesh"), Integer::New(isolate, 46)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Length"), Integer::New(isolate, 47)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_ConstResourceID"), Integer::New(isolate, 48)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_VectorFromScalar"), Integer::New(isolate, 49)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_UnsignedMesh"), Integer::New(isolate, 50)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeType_Mod"), Integer::New(isolate, 51)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitPortType_Scalar"), Integer::New(isolate, 1)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitPortType_Vector"), Integer::New(isolate, 2)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitPortType_Matrix"), Integer::New(isolate, 3)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitPortType_ResourceID"), Integer::New(isolate, 4)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_Default"), Integer::New(isolate, 1)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_ScalarToScalar"), Integer::New(isolate, 2)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_VectorToVector"), Integer::New(isolate, 3)); + newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eImplicitNodeConfiguration_MatrixToMatrix"), Integer::New(isolate, 4)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eEncryptionAlgorithm_AES256_GCM"), Integer::New(isolate, 1)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eWrappingAlgorithm_RSA_OAEP"), Integer::New(isolate, 0)); newObject->Set(isolate->GetCurrentContext(), String::NewFromUtf8(isolate, "eMgfAlgorithm_MGF1_SHA1"), Integer::New(isolate, 160)); diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h index 49ce0ade5..bbc2e8ffc 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h +++ b/Autogenerated/Bindings/NodeJS/lib3mf_nodewrapper.h @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++ Header file for the Node wrapper class of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -389,6 +389,60 @@ class CLib3MFMultiPropertyGroupIterator : public CLib3MFBaseClass { }; +/************************************************************************************************************************* + Class CLib3MFImage3DIterator +**************************************************************************************************************************/ +class CLib3MFImage3DIterator : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetCurrentImage3D(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFImage3DIterator(); + ~CLib3MFImage3DIterator(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFFunctionIterator +**************************************************************************************************************************/ +class CLib3MFFunctionIterator : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetCurrentFunction(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFFunctionIterator(); + ~CLib3MFFunctionIterator(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFLevelSetIterator +**************************************************************************************************************************/ +class CLib3MFLevelSetIterator : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetCurrentLevelSet(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFLevelSetIterator(); + ~CLib3MFLevelSetIterator(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + /************************************************************************************************************************* Class CLib3MFMetaData **************************************************************************************************************************/ @@ -455,6 +509,7 @@ class CLib3MFObject : public CLib3MFBaseClass { static void SetPartNumber(const v8::FunctionCallbackInfo& args); static void IsMeshObject(const v8::FunctionCallbackInfo& args); static void IsComponentsObject(const v8::FunctionCallbackInfo& args); + static void IsLevelSetObject(const v8::FunctionCallbackInfo& args); static void IsValid(const v8::FunctionCallbackInfo& args); static void SetAttachmentAsThumbnail(const v8::FunctionCallbackInfo& args); static void GetThumbnailAttachment(const v8::FunctionCallbackInfo& args); @@ -506,6 +561,8 @@ class CLib3MFMeshObject : public CLib3MFBaseClass { static void SetGeometry(const v8::FunctionCallbackInfo& args); static void IsManifoldAndOriented(const v8::FunctionCallbackInfo& args); static void BeamLattice(const v8::FunctionCallbackInfo& args); + static void GetVolumeData(const v8::FunctionCallbackInfo& args); + static void SetVolumeData(const v8::FunctionCallbackInfo& args); public: CLib3MFMeshObject(); @@ -516,6 +573,39 @@ class CLib3MFMeshObject : public CLib3MFBaseClass { }; +/************************************************************************************************************************* + Class CLib3MFLevelSet +**************************************************************************************************************************/ +class CLib3MFLevelSet : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetFunction(const v8::FunctionCallbackInfo& args); + static void SetFunction(const v8::FunctionCallbackInfo& args); + static void GetTransform(const v8::FunctionCallbackInfo& args); + static void SetTransform(const v8::FunctionCallbackInfo& args); + static void GetChannelName(const v8::FunctionCallbackInfo& args); + static void SetChannelName(const v8::FunctionCallbackInfo& args); + static void SetMinFeatureSize(const v8::FunctionCallbackInfo& args); + static void GetMinFeatureSize(const v8::FunctionCallbackInfo& args); + static void SetFallBackValue(const v8::FunctionCallbackInfo& args); + static void GetFallBackValue(const v8::FunctionCallbackInfo& args); + static void SetMeshBBoxOnly(const v8::FunctionCallbackInfo& args); + static void GetMeshBBoxOnly(const v8::FunctionCallbackInfo& args); + static void SetMesh(const v8::FunctionCallbackInfo& args); + static void GetMesh(const v8::FunctionCallbackInfo& args); + static void GetVolumeData(const v8::FunctionCallbackInfo& args); + static void SetVolumeData(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFLevelSet(); + ~CLib3MFLevelSet(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + /************************************************************************************************************************* Class CLib3MFBeamLattice **************************************************************************************************************************/ @@ -556,6 +646,137 @@ class CLib3MFBeamLattice : public CLib3MFBaseClass { }; +/************************************************************************************************************************* + Class CLib3MFFunctionReference +**************************************************************************************************************************/ +class CLib3MFFunctionReference : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetFunctionResourceID(const v8::FunctionCallbackInfo& args); + static void SetFunctionResourceID(const v8::FunctionCallbackInfo& args); + static void GetTransform(const v8::FunctionCallbackInfo& args); + static void SetTransform(const v8::FunctionCallbackInfo& args); + static void GetChannelName(const v8::FunctionCallbackInfo& args); + static void SetChannelName(const v8::FunctionCallbackInfo& args); + static void SetMinFeatureSize(const v8::FunctionCallbackInfo& args); + static void GetMinFeatureSize(const v8::FunctionCallbackInfo& args); + static void SetFallBackValue(const v8::FunctionCallbackInfo& args); + static void GetFallBackValue(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFFunctionReference(); + ~CLib3MFFunctionReference(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFVolumeDataColor +**************************************************************************************************************************/ +class CLib3MFVolumeDataColor : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFVolumeDataColor(); + ~CLib3MFVolumeDataColor(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFMaterialMapping +**************************************************************************************************************************/ +class CLib3MFMaterialMapping : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFMaterialMapping(); + ~CLib3MFMaterialMapping(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFVolumeDataComposite +**************************************************************************************************************************/ +class CLib3MFVolumeDataComposite : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetBaseMaterialGroup(const v8::FunctionCallbackInfo& args); + static void SetBaseMaterialGroup(const v8::FunctionCallbackInfo& args); + static void GetMaterialMappingCount(const v8::FunctionCallbackInfo& args); + static void GetMaterialMapping(const v8::FunctionCallbackInfo& args); + static void AddMaterialMapping(const v8::FunctionCallbackInfo& args); + static void RemoveMaterialMapping(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFVolumeDataComposite(); + ~CLib3MFVolumeDataComposite(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFVolumeDataProperty +**************************************************************************************************************************/ +class CLib3MFVolumeDataProperty : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetName(const v8::FunctionCallbackInfo& args); + static void SetIsRequired(const v8::FunctionCallbackInfo& args); + static void IsRequired(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFVolumeDataProperty(); + ~CLib3MFVolumeDataProperty(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFVolumeData +**************************************************************************************************************************/ +class CLib3MFVolumeData : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetComposite(const v8::FunctionCallbackInfo& args); + static void CreateNewComposite(const v8::FunctionCallbackInfo& args); + static void RemoveComposite(const v8::FunctionCallbackInfo& args); + static void GetColor(const v8::FunctionCallbackInfo& args); + static void CreateNewColor(const v8::FunctionCallbackInfo& args); + static void RemoveColor(const v8::FunctionCallbackInfo& args); + static void GetPropertyCount(const v8::FunctionCallbackInfo& args); + static void GetProperty(const v8::FunctionCallbackInfo& args); + static void AddPropertyFromFunction(const v8::FunctionCallbackInfo& args); + static void RemoveProperty(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFVolumeData(); + ~CLib3MFVolumeData(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + /************************************************************************************************************************* Class CLib3MFComponent **************************************************************************************************************************/ @@ -748,6 +969,53 @@ class CLib3MFMultiPropertyGroup : public CLib3MFBaseClass { }; +/************************************************************************************************************************* + Class CLib3MFImage3D +**************************************************************************************************************************/ +class CLib3MFImage3D : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetName(const v8::FunctionCallbackInfo& args); + static void SetName(const v8::FunctionCallbackInfo& args); + static void IsImageStack(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFImage3D(); + ~CLib3MFImage3D(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFImageStack +**************************************************************************************************************************/ +class CLib3MFImageStack : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetRowCount(const v8::FunctionCallbackInfo& args); + static void SetRowCount(const v8::FunctionCallbackInfo& args); + static void GetColumnCount(const v8::FunctionCallbackInfo& args); + static void SetColumnCount(const v8::FunctionCallbackInfo& args); + static void GetSheetCount(const v8::FunctionCallbackInfo& args); + static void GetSheet(const v8::FunctionCallbackInfo& args); + static void SetSheet(const v8::FunctionCallbackInfo& args); + static void CreateEmptySheet(const v8::FunctionCallbackInfo& args); + static void CreateSheetFromBuffer(const v8::FunctionCallbackInfo& args); + static void CreateSheetFromFile(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFImageStack(); + ~CLib3MFImageStack(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + /************************************************************************************************************************* Class CLib3MFAttachment **************************************************************************************************************************/ @@ -801,6 +1069,1210 @@ class CLib3MFTexture2D : public CLib3MFBaseClass { }; +/************************************************************************************************************************* + Class CLib3MFImplicitPort +**************************************************************************************************************************/ +class CLib3MFImplicitPort : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetIdentifier(const v8::FunctionCallbackInfo& args); + static void SetIdentifier(const v8::FunctionCallbackInfo& args); + static void GetDisplayName(const v8::FunctionCallbackInfo& args); + static void SetDisplayName(const v8::FunctionCallbackInfo& args); + static void SetType(const v8::FunctionCallbackInfo& args); + static void GetType(const v8::FunctionCallbackInfo& args); + static void GetReference(const v8::FunctionCallbackInfo& args); + static void SetReference(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFImplicitPort(); + ~CLib3MFImplicitPort(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFIterator +**************************************************************************************************************************/ +class CLib3MFIterator : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void MoveNext(const v8::FunctionCallbackInfo& args); + static void MovePrevious(const v8::FunctionCallbackInfo& args); + static void Count(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFIterator(); + ~CLib3MFIterator(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFImplicitPortIterator +**************************************************************************************************************************/ +class CLib3MFImplicitPortIterator : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetCurrent(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFImplicitPortIterator(); + ~CLib3MFImplicitPortIterator(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFImplicitNode +**************************************************************************************************************************/ +class CLib3MFImplicitNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetIdentifier(const v8::FunctionCallbackInfo& args); + static void SetIdentifier(const v8::FunctionCallbackInfo& args); + static void GetDisplayName(const v8::FunctionCallbackInfo& args); + static void SetDisplayName(const v8::FunctionCallbackInfo& args); + static void GetTag(const v8::FunctionCallbackInfo& args); + static void SetTag(const v8::FunctionCallbackInfo& args); + static void GetNodeType(const v8::FunctionCallbackInfo& args); + static void AddInput(const v8::FunctionCallbackInfo& args); + static void GetInputs(const v8::FunctionCallbackInfo& args); + static void AddOutput(const v8::FunctionCallbackInfo& args); + static void GetOutputs(const v8::FunctionCallbackInfo& args); + static void FindInput(const v8::FunctionCallbackInfo& args); + static void FindOutput(const v8::FunctionCallbackInfo& args); + static void AreTypesValid(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFImplicitNode(); + ~CLib3MFImplicitNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFOneInputNode +**************************************************************************************************************************/ +class CLib3MFOneInputNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputA(const v8::FunctionCallbackInfo& args); + static void GetOutputResult(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFOneInputNode(); + ~CLib3MFOneInputNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFSinNode +**************************************************************************************************************************/ +class CLib3MFSinNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFSinNode(); + ~CLib3MFSinNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFCosNode +**************************************************************************************************************************/ +class CLib3MFCosNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFCosNode(); + ~CLib3MFCosNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFTanNode +**************************************************************************************************************************/ +class CLib3MFTanNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFTanNode(); + ~CLib3MFTanNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFArcSinNode +**************************************************************************************************************************/ +class CLib3MFArcSinNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFArcSinNode(); + ~CLib3MFArcSinNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFArcCosNode +**************************************************************************************************************************/ +class CLib3MFArcCosNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFArcCosNode(); + ~CLib3MFArcCosNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFArcTanNode +**************************************************************************************************************************/ +class CLib3MFArcTanNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFArcTanNode(); + ~CLib3MFArcTanNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFSinhNode +**************************************************************************************************************************/ +class CLib3MFSinhNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFSinhNode(); + ~CLib3MFSinhNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFCoshNode +**************************************************************************************************************************/ +class CLib3MFCoshNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFCoshNode(); + ~CLib3MFCoshNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFTanhNode +**************************************************************************************************************************/ +class CLib3MFTanhNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFTanhNode(); + ~CLib3MFTanhNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFRoundNode +**************************************************************************************************************************/ +class CLib3MFRoundNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFRoundNode(); + ~CLib3MFRoundNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFCeilNode +**************************************************************************************************************************/ +class CLib3MFCeilNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFCeilNode(); + ~CLib3MFCeilNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFFloorNode +**************************************************************************************************************************/ +class CLib3MFFloorNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFFloorNode(); + ~CLib3MFFloorNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFSignNode +**************************************************************************************************************************/ +class CLib3MFSignNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFSignNode(); + ~CLib3MFSignNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFFractNode +**************************************************************************************************************************/ +class CLib3MFFractNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFFractNode(); + ~CLib3MFFractNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFAbsNode +**************************************************************************************************************************/ +class CLib3MFAbsNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFAbsNode(); + ~CLib3MFAbsNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFExpNode +**************************************************************************************************************************/ +class CLib3MFExpNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFExpNode(); + ~CLib3MFExpNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFLogNode +**************************************************************************************************************************/ +class CLib3MFLogNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFLogNode(); + ~CLib3MFLogNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFLog2Node +**************************************************************************************************************************/ +class CLib3MFLog2Node : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFLog2Node(); + ~CLib3MFLog2Node(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFLog10Node +**************************************************************************************************************************/ +class CLib3MFLog10Node : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFLog10Node(); + ~CLib3MFLog10Node(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFLengthNode +**************************************************************************************************************************/ +class CLib3MFLengthNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFLengthNode(); + ~CLib3MFLengthNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFTransposeNode +**************************************************************************************************************************/ +class CLib3MFTransposeNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFTransposeNode(); + ~CLib3MFTransposeNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFInverseNode +**************************************************************************************************************************/ +class CLib3MFInverseNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFInverseNode(); + ~CLib3MFInverseNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFSqrtNode +**************************************************************************************************************************/ +class CLib3MFSqrtNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFSqrtNode(); + ~CLib3MFSqrtNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFResourceIdNode +**************************************************************************************************************************/ +class CLib3MFResourceIdNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void SetResource(const v8::FunctionCallbackInfo& args); + static void GetResource(const v8::FunctionCallbackInfo& args); + static void GetOutputValue(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFResourceIdNode(); + ~CLib3MFResourceIdNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFTwoInputNode +**************************************************************************************************************************/ +class CLib3MFTwoInputNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputB(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFTwoInputNode(); + ~CLib3MFTwoInputNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFAdditionNode +**************************************************************************************************************************/ +class CLib3MFAdditionNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFAdditionNode(); + ~CLib3MFAdditionNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFSubtractionNode +**************************************************************************************************************************/ +class CLib3MFSubtractionNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFSubtractionNode(); + ~CLib3MFSubtractionNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFMultiplicationNode +**************************************************************************************************************************/ +class CLib3MFMultiplicationNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFMultiplicationNode(); + ~CLib3MFMultiplicationNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFDivisionNode +**************************************************************************************************************************/ +class CLib3MFDivisionNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFDivisionNode(); + ~CLib3MFDivisionNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFDotNode +**************************************************************************************************************************/ +class CLib3MFDotNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFDotNode(); + ~CLib3MFDotNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFCrossNode +**************************************************************************************************************************/ +class CLib3MFCrossNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFCrossNode(); + ~CLib3MFCrossNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFArcTan2Node +**************************************************************************************************************************/ +class CLib3MFArcTan2Node : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFArcTan2Node(); + ~CLib3MFArcTan2Node(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFMatVecMultiplicationNode +**************************************************************************************************************************/ +class CLib3MFMatVecMultiplicationNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFMatVecMultiplicationNode(); + ~CLib3MFMatVecMultiplicationNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFMinNode +**************************************************************************************************************************/ +class CLib3MFMinNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFMinNode(); + ~CLib3MFMinNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFMaxNode +**************************************************************************************************************************/ +class CLib3MFMaxNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFMaxNode(); + ~CLib3MFMaxNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFFmodNode +**************************************************************************************************************************/ +class CLib3MFFmodNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFFmodNode(); + ~CLib3MFFmodNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFModNode +**************************************************************************************************************************/ +class CLib3MFModNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFModNode(); + ~CLib3MFModNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFPowNode +**************************************************************************************************************************/ +class CLib3MFPowNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFPowNode(); + ~CLib3MFPowNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFSelectNode +**************************************************************************************************************************/ +class CLib3MFSelectNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputB(const v8::FunctionCallbackInfo& args); + static void GetInputC(const v8::FunctionCallbackInfo& args); + static void GetInputD(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFSelectNode(); + ~CLib3MFSelectNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFClampNode +**************************************************************************************************************************/ +class CLib3MFClampNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputMin(const v8::FunctionCallbackInfo& args); + static void GetInputMax(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFClampNode(); + ~CLib3MFClampNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFComposeVectorNode +**************************************************************************************************************************/ +class CLib3MFComposeVectorNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputX(const v8::FunctionCallbackInfo& args); + static void GetInputY(const v8::FunctionCallbackInfo& args); + static void GetInputZ(const v8::FunctionCallbackInfo& args); + static void GetOutputResult(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFComposeVectorNode(); + ~CLib3MFComposeVectorNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFVectorFromScalarNode +**************************************************************************************************************************/ +class CLib3MFVectorFromScalarNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + +public: + CLib3MFVectorFromScalarNode(); + ~CLib3MFVectorFromScalarNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFDecomposeVectorNode +**************************************************************************************************************************/ +class CLib3MFDecomposeVectorNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputA(const v8::FunctionCallbackInfo& args); + static void GetOutputX(const v8::FunctionCallbackInfo& args); + static void GetOutputY(const v8::FunctionCallbackInfo& args); + static void GetOutputZ(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFDecomposeVectorNode(); + ~CLib3MFDecomposeVectorNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFComposeMatrixNode +**************************************************************************************************************************/ +class CLib3MFComposeMatrixNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputM00(const v8::FunctionCallbackInfo& args); + static void GetInputM01(const v8::FunctionCallbackInfo& args); + static void GetInputM02(const v8::FunctionCallbackInfo& args); + static void GetInputM03(const v8::FunctionCallbackInfo& args); + static void GetInputM10(const v8::FunctionCallbackInfo& args); + static void GetInputM11(const v8::FunctionCallbackInfo& args); + static void GetInputM12(const v8::FunctionCallbackInfo& args); + static void GetInputM13(const v8::FunctionCallbackInfo& args); + static void GetInputM20(const v8::FunctionCallbackInfo& args); + static void GetInputM21(const v8::FunctionCallbackInfo& args); + static void GetInputM22(const v8::FunctionCallbackInfo& args); + static void GetInputM23(const v8::FunctionCallbackInfo& args); + static void GetInputM30(const v8::FunctionCallbackInfo& args); + static void GetInputM31(const v8::FunctionCallbackInfo& args); + static void GetInputM32(const v8::FunctionCallbackInfo& args); + static void GetInputM33(const v8::FunctionCallbackInfo& args); + static void GetOutputResult(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFComposeMatrixNode(); + ~CLib3MFComposeMatrixNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFMatrixFromRowsNode +**************************************************************************************************************************/ +class CLib3MFMatrixFromRowsNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputA(const v8::FunctionCallbackInfo& args); + static void GetInputB(const v8::FunctionCallbackInfo& args); + static void GetInputC(const v8::FunctionCallbackInfo& args); + static void GetInputD(const v8::FunctionCallbackInfo& args); + static void GetOutputResult(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFMatrixFromRowsNode(); + ~CLib3MFMatrixFromRowsNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFMatrixFromColumnsNode +**************************************************************************************************************************/ +class CLib3MFMatrixFromColumnsNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputA(const v8::FunctionCallbackInfo& args); + static void GetInputB(const v8::FunctionCallbackInfo& args); + static void GetInputC(const v8::FunctionCallbackInfo& args); + static void GetInputD(const v8::FunctionCallbackInfo& args); + static void GetOutputResult(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFMatrixFromColumnsNode(); + ~CLib3MFMatrixFromColumnsNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFConstantNode +**************************************************************************************************************************/ +class CLib3MFConstantNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void SetConstant(const v8::FunctionCallbackInfo& args); + static void GetConstant(const v8::FunctionCallbackInfo& args); + static void GetOutputValue(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFConstantNode(); + ~CLib3MFConstantNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFConstVecNode +**************************************************************************************************************************/ +class CLib3MFConstVecNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void SetVector(const v8::FunctionCallbackInfo& args); + static void GetVector(const v8::FunctionCallbackInfo& args); + static void GetOutputVector(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFConstVecNode(); + ~CLib3MFConstVecNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFConstMatNode +**************************************************************************************************************************/ +class CLib3MFConstMatNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void SetMatrix(const v8::FunctionCallbackInfo& args); + static void GetMatrix(const v8::FunctionCallbackInfo& args); + static void GetOutputMatrix(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFConstMatNode(); + ~CLib3MFConstMatNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFMeshNode +**************************************************************************************************************************/ +class CLib3MFMeshNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputMesh(const v8::FunctionCallbackInfo& args); + static void GetInputPos(const v8::FunctionCallbackInfo& args); + static void GetOutputDistance(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFMeshNode(); + ~CLib3MFMeshNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFUnsignedMeshNode +**************************************************************************************************************************/ +class CLib3MFUnsignedMeshNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputMesh(const v8::FunctionCallbackInfo& args); + static void GetInputPos(const v8::FunctionCallbackInfo& args); + static void GetOutputDistance(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFUnsignedMeshNode(); + ~CLib3MFUnsignedMeshNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFFunctionCallNode +**************************************************************************************************************************/ +class CLib3MFFunctionCallNode : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetInputFunctionID(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFFunctionCallNode(); + ~CLib3MFFunctionCallNode(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFNodeIterator +**************************************************************************************************************************/ +class CLib3MFNodeIterator : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetCurrent(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFNodeIterator(); + ~CLib3MFNodeIterator(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFFunction +**************************************************************************************************************************/ +class CLib3MFFunction : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetDisplayName(const v8::FunctionCallbackInfo& args); + static void SetDisplayName(const v8::FunctionCallbackInfo& args); + static void AddInput(const v8::FunctionCallbackInfo& args); + static void GetInputs(const v8::FunctionCallbackInfo& args); + static void RemoveInput(const v8::FunctionCallbackInfo& args); + static void AddOutput(const v8::FunctionCallbackInfo& args); + static void GetOutputs(const v8::FunctionCallbackInfo& args); + static void RemoveOutput(const v8::FunctionCallbackInfo& args); + static void FindInput(const v8::FunctionCallbackInfo& args); + static void FindOutput(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFFunction(); + ~CLib3MFFunction(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFImplicitFunction +**************************************************************************************************************************/ +class CLib3MFImplicitFunction : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetIdentifier(const v8::FunctionCallbackInfo& args); + static void SetIdentifier(const v8::FunctionCallbackInfo& args); + static void AddNode(const v8::FunctionCallbackInfo& args); + static void AddSinNode(const v8::FunctionCallbackInfo& args); + static void AddCosNode(const v8::FunctionCallbackInfo& args); + static void AddTanNode(const v8::FunctionCallbackInfo& args); + static void AddArcSinNode(const v8::FunctionCallbackInfo& args); + static void AddArcCosNode(const v8::FunctionCallbackInfo& args); + static void AddArcTan2Node(const v8::FunctionCallbackInfo& args); + static void AddSinhNode(const v8::FunctionCallbackInfo& args); + static void AddCoshNode(const v8::FunctionCallbackInfo& args); + static void AddTanhNode(const v8::FunctionCallbackInfo& args); + static void AddRoundNode(const v8::FunctionCallbackInfo& args); + static void AddCeilNode(const v8::FunctionCallbackInfo& args); + static void AddFloorNode(const v8::FunctionCallbackInfo& args); + static void AddSignNode(const v8::FunctionCallbackInfo& args); + static void AddFractNode(const v8::FunctionCallbackInfo& args); + static void AddAbsNode(const v8::FunctionCallbackInfo& args); + static void AddExpNode(const v8::FunctionCallbackInfo& args); + static void AddLogNode(const v8::FunctionCallbackInfo& args); + static void AddLog2Node(const v8::FunctionCallbackInfo& args); + static void AddLog10Node(const v8::FunctionCallbackInfo& args); + static void AddLengthNode(const v8::FunctionCallbackInfo& args); + static void AddTransposeNode(const v8::FunctionCallbackInfo& args); + static void InverseNode(const v8::FunctionCallbackInfo& args); + static void AddSqrtNode(const v8::FunctionCallbackInfo& args); + static void AddResourceIdNode(const v8::FunctionCallbackInfo& args); + static void AddAdditionNode(const v8::FunctionCallbackInfo& args); + static void AddSubtractionNode(const v8::FunctionCallbackInfo& args); + static void AddMultiplicationNode(const v8::FunctionCallbackInfo& args); + static void AddDivisionNode(const v8::FunctionCallbackInfo& args); + static void AddDotNode(const v8::FunctionCallbackInfo& args); + static void AddCrossNode(const v8::FunctionCallbackInfo& args); + static void AddMatVecMultiplicationNode(const v8::FunctionCallbackInfo& args); + static void AddMinNode(const v8::FunctionCallbackInfo& args); + static void AddMaxNode(const v8::FunctionCallbackInfo& args); + static void AddFmodNode(const v8::FunctionCallbackInfo& args); + static void AddPowNode(const v8::FunctionCallbackInfo& args); + static void AddSelectNode(const v8::FunctionCallbackInfo& args); + static void AddClampNode(const v8::FunctionCallbackInfo& args); + static void AddComposeVectorNode(const v8::FunctionCallbackInfo& args); + static void AddVectorFromScalarNode(const v8::FunctionCallbackInfo& args); + static void AddDecomposeVectorNode(const v8::FunctionCallbackInfo& args); + static void AddComposeMatrixNode(const v8::FunctionCallbackInfo& args); + static void AddMatrixFromRowsNode(const v8::FunctionCallbackInfo& args); + static void AddMatrixFromColumnsNode(const v8::FunctionCallbackInfo& args); + static void AddConstantNode(const v8::FunctionCallbackInfo& args); + static void AddConstVecNode(const v8::FunctionCallbackInfo& args); + static void AddConstMatNode(const v8::FunctionCallbackInfo& args); + static void AddMeshNode(const v8::FunctionCallbackInfo& args); + static void AddUnsignedMeshNode(const v8::FunctionCallbackInfo& args); + static void AddFunctionCallNode(const v8::FunctionCallbackInfo& args); + static void GetNodes(const v8::FunctionCallbackInfo& args); + static void RemoveNode(const v8::FunctionCallbackInfo& args); + static void AddLink(const v8::FunctionCallbackInfo& args); + static void AddLinkByNames(const v8::FunctionCallbackInfo& args); + static void Clear(const v8::FunctionCallbackInfo& args); + static void SortNodesTopologically(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFImplicitFunction(); + ~CLib3MFImplicitFunction(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + +/************************************************************************************************************************* + Class CLib3MFFunctionFromImage3D +**************************************************************************************************************************/ +class CLib3MFFunctionFromImage3D : public CLib3MFBaseClass { +private: + static void New(const v8::FunctionCallbackInfo& args); + static v8::Persistent constructor; + static void GetImage3D(const v8::FunctionCallbackInfo& args); + static void SetImage3D(const v8::FunctionCallbackInfo& args); + static void SetFilter(const v8::FunctionCallbackInfo& args); + static void GetFilter(const v8::FunctionCallbackInfo& args); + static void SetTileStyles(const v8::FunctionCallbackInfo& args); + static void GetTileStyles(const v8::FunctionCallbackInfo& args); + static void GetOffset(const v8::FunctionCallbackInfo& args); + static void SetOffset(const v8::FunctionCallbackInfo& args); + static void GetScale(const v8::FunctionCallbackInfo& args); + static void SetScale(const v8::FunctionCallbackInfo& args); + +public: + CLib3MFFunctionFromImage3D(); + ~CLib3MFFunctionFromImage3D(); + + static void Init(); + static v8::Local NewInstance(v8::Local, Lib3MFHandle pHandle); + +}; + /************************************************************************************************************************* Class CLib3MFBuildItem **************************************************************************************************************************/ @@ -1072,6 +2544,7 @@ class CLib3MFModel : public CLib3MFBaseClass { static void GetComponentsObjectByID(const v8::FunctionCallbackInfo& args); static void GetColorGroupByID(const v8::FunctionCallbackInfo& args); static void GetSliceStackByID(const v8::FunctionCallbackInfo& args); + static void GetLevelSetByID(const v8::FunctionCallbackInfo& args); static void GetBuildUUID(const v8::FunctionCallbackInfo& args); static void SetBuildUUID(const v8::FunctionCallbackInfo& args); static void GetBuildItems(const v8::FunctionCallbackInfo& args); @@ -1087,7 +2560,9 @@ class CLib3MFModel : public CLib3MFBaseClass { static void GetCompositeMaterials(const v8::FunctionCallbackInfo& args); static void GetMultiPropertyGroups(const v8::FunctionCallbackInfo& args); static void GetSliceStacks(const v8::FunctionCallbackInfo& args); + static void GetImage3Ds(const v8::FunctionCallbackInfo& args); static void MergeToModel(const v8::FunctionCallbackInfo& args); + static void MergeFromModel(const v8::FunctionCallbackInfo& args); static void AddMeshObject(const v8::FunctionCallbackInfo& args); static void AddComponentsObject(const v8::FunctionCallbackInfo& args); static void AddSliceStack(const v8::FunctionCallbackInfo& args); @@ -1097,6 +2572,8 @@ class CLib3MFModel : public CLib3MFBaseClass { static void AddTexture2DGroup(const v8::FunctionCallbackInfo& args); static void AddCompositeMaterials(const v8::FunctionCallbackInfo& args); static void AddMultiPropertyGroup(const v8::FunctionCallbackInfo& args); + static void AddImageStack(const v8::FunctionCallbackInfo& args); + static void GetImageStackByID(const v8::FunctionCallbackInfo& args); static void AddBuildItem(const v8::FunctionCallbackInfo& args); static void RemoveBuildItem(const v8::FunctionCallbackInfo& args); static void GetMetaDataGroup(const v8::FunctionCallbackInfo& args); @@ -1113,6 +2590,13 @@ class CLib3MFModel : public CLib3MFBaseClass { static void RemoveCustomContentType(const v8::FunctionCallbackInfo& args); static void SetRandomNumberCallback(const v8::FunctionCallbackInfo& args); static void GetKeyStore(const v8::FunctionCallbackInfo& args); + static void GetFunctions(const v8::FunctionCallbackInfo& args); + static void AddImplicitFunction(const v8::FunctionCallbackInfo& args); + static void AddFunctionFromImage3D(const v8::FunctionCallbackInfo& args); + static void AddVolumeData(const v8::FunctionCallbackInfo& args); + static void AddLevelSet(const v8::FunctionCallbackInfo& args); + static void GetLevelSets(const v8::FunctionCallbackInfo& args); + static void RemoveResource(const v8::FunctionCallbackInfo& args); public: CLib3MFModel(); diff --git a/Autogenerated/Bindings/NodeJS/lib3mf_types.h b/Autogenerated/Bindings/NodeJS/lib3mf_types.h index 6f2dcf6a4..696aec4eb 100644 --- a/Autogenerated/Bindings/NodeJS/lib3mf_types.h +++ b/Autogenerated/Bindings/NodeJS/lib3mf_types.h @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated plain C Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -84,8 +84,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 3 -#define LIB3MF_VERSION_MICRO 2 +#define LIB3MF_VERSION_MINOR 4 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -130,13 +130,18 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER 140 /** A progress identifier is unknown */ #define LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT 141 /** An element buffer exceeds its spec limit */ #define LIB3MF_ERROR_INVALIDRESOURCE 142 /** A resource is invalid */ +#define LIB3MF_ERROR_INVALIDLEVELSET 143 /** A level set is invalid */ #define LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE 2000 /** This object type is not valid for beamlattices */ #define LIB3MF_ERROR_INVALIDKEYSTORE 3000 /** The keystore object is invalid */ #define LIB3MF_ERROR_INVALIDKEYSTORECONSUMER 3001 /** The consumer keystore object is invalid */ #define LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND 3002 /** A consumer has not been found */ #define LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND 3003 /** A resource data has not been found */ #define LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED 3004 /** A Key or Conentent encryption callback has not been registered */ -#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key siue is invalid */ +#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key size is invalid */ +#define LIB3MF_ERROR_INCOMPATIBLEPORTTYPES 4000 /** Link could not be added, the port types are incompatible */ +#define LIB3MF_ERROR_GRAPHISCYCLIC 4001 /** The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted. */ +#define LIB3MF_ERROR_INPUTNOTSET 4002 /** The input of a node is not set. */ +#define LIB3MF_ERROR_INVALIDNODECONFIGURATION 4003 /** The selected node configuration is not supported */ /************************************************************************************************************************* Error strings for Lib3MF @@ -181,13 +186,18 @@ inline const char * LIB3MF_GETERRORSTRING (Lib3MFResult nErrorCode) { case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "A progress identifier is unknown"; case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "An element buffer exceeds its spec limit"; case LIB3MF_ERROR_INVALIDRESOURCE: return "A resource is invalid"; + case LIB3MF_ERROR_INVALIDLEVELSET: return "A level set is invalid"; case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "This object type is not valid for beamlattices"; case LIB3MF_ERROR_INVALIDKEYSTORE: return "The keystore object is invalid"; case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "The consumer keystore object is invalid"; case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: return "A consumer has not been found"; case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "A resource data has not been found"; case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "A Key or Conentent encryption callback has not been registered"; - case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key siue is invalid"; + case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key size is invalid"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "Link could not be added, the port types are incompatible"; + case LIB3MF_ERROR_GRAPHISCYCLIC: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case LIB3MF_ERROR_INPUTNOTSET: return "The input of a node is not set."; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "The selected node configuration is not supported"; default: return "unknown error"; } } @@ -212,11 +222,21 @@ typedef Lib3MFHandle Lib3MF_ColorGroupIterator; typedef Lib3MFHandle Lib3MF_Texture2DGroupIterator; typedef Lib3MFHandle Lib3MF_CompositeMaterialsIterator; typedef Lib3MFHandle Lib3MF_MultiPropertyGroupIterator; +typedef Lib3MFHandle Lib3MF_Image3DIterator; +typedef Lib3MFHandle Lib3MF_FunctionIterator; +typedef Lib3MFHandle Lib3MF_LevelSetIterator; typedef Lib3MFHandle Lib3MF_MetaData; typedef Lib3MFHandle Lib3MF_MetaDataGroup; typedef Lib3MFHandle Lib3MF_Object; typedef Lib3MFHandle Lib3MF_MeshObject; +typedef Lib3MFHandle Lib3MF_LevelSet; typedef Lib3MFHandle Lib3MF_BeamLattice; +typedef Lib3MFHandle Lib3MF_FunctionReference; +typedef Lib3MFHandle Lib3MF_VolumeDataColor; +typedef Lib3MFHandle Lib3MF_MaterialMapping; +typedef Lib3MFHandle Lib3MF_VolumeDataComposite; +typedef Lib3MFHandle Lib3MF_VolumeDataProperty; +typedef Lib3MFHandle Lib3MF_VolumeData; typedef Lib3MFHandle Lib3MF_Component; typedef Lib3MFHandle Lib3MF_ComponentsObject; typedef Lib3MFHandle Lib3MF_BeamSet; @@ -225,8 +245,71 @@ typedef Lib3MFHandle Lib3MF_ColorGroup; typedef Lib3MFHandle Lib3MF_Texture2DGroup; typedef Lib3MFHandle Lib3MF_CompositeMaterials; typedef Lib3MFHandle Lib3MF_MultiPropertyGroup; +typedef Lib3MFHandle Lib3MF_Image3D; +typedef Lib3MFHandle Lib3MF_ImageStack; typedef Lib3MFHandle Lib3MF_Attachment; typedef Lib3MFHandle Lib3MF_Texture2D; +typedef Lib3MFHandle Lib3MF_ImplicitPort; +typedef Lib3MFHandle Lib3MF_Iterator; +typedef Lib3MFHandle Lib3MF_ImplicitPortIterator; +typedef Lib3MFHandle Lib3MF_ImplicitNode; +typedef Lib3MFHandle Lib3MF_OneInputNode; +typedef Lib3MFHandle Lib3MF_SinNode; +typedef Lib3MFHandle Lib3MF_CosNode; +typedef Lib3MFHandle Lib3MF_TanNode; +typedef Lib3MFHandle Lib3MF_ArcSinNode; +typedef Lib3MFHandle Lib3MF_ArcCosNode; +typedef Lib3MFHandle Lib3MF_ArcTanNode; +typedef Lib3MFHandle Lib3MF_SinhNode; +typedef Lib3MFHandle Lib3MF_CoshNode; +typedef Lib3MFHandle Lib3MF_TanhNode; +typedef Lib3MFHandle Lib3MF_RoundNode; +typedef Lib3MFHandle Lib3MF_CeilNode; +typedef Lib3MFHandle Lib3MF_FloorNode; +typedef Lib3MFHandle Lib3MF_SignNode; +typedef Lib3MFHandle Lib3MF_FractNode; +typedef Lib3MFHandle Lib3MF_AbsNode; +typedef Lib3MFHandle Lib3MF_ExpNode; +typedef Lib3MFHandle Lib3MF_LogNode; +typedef Lib3MFHandle Lib3MF_Log2Node; +typedef Lib3MFHandle Lib3MF_Log10Node; +typedef Lib3MFHandle Lib3MF_LengthNode; +typedef Lib3MFHandle Lib3MF_TransposeNode; +typedef Lib3MFHandle Lib3MF_InverseNode; +typedef Lib3MFHandle Lib3MF_SqrtNode; +typedef Lib3MFHandle Lib3MF_ResourceIdNode; +typedef Lib3MFHandle Lib3MF_TwoInputNode; +typedef Lib3MFHandle Lib3MF_AdditionNode; +typedef Lib3MFHandle Lib3MF_SubtractionNode; +typedef Lib3MFHandle Lib3MF_MultiplicationNode; +typedef Lib3MFHandle Lib3MF_DivisionNode; +typedef Lib3MFHandle Lib3MF_DotNode; +typedef Lib3MFHandle Lib3MF_CrossNode; +typedef Lib3MFHandle Lib3MF_ArcTan2Node; +typedef Lib3MFHandle Lib3MF_MatVecMultiplicationNode; +typedef Lib3MFHandle Lib3MF_MinNode; +typedef Lib3MFHandle Lib3MF_MaxNode; +typedef Lib3MFHandle Lib3MF_FmodNode; +typedef Lib3MFHandle Lib3MF_ModNode; +typedef Lib3MFHandle Lib3MF_PowNode; +typedef Lib3MFHandle Lib3MF_SelectNode; +typedef Lib3MFHandle Lib3MF_ClampNode; +typedef Lib3MFHandle Lib3MF_ComposeVectorNode; +typedef Lib3MFHandle Lib3MF_VectorFromScalarNode; +typedef Lib3MFHandle Lib3MF_DecomposeVectorNode; +typedef Lib3MFHandle Lib3MF_ComposeMatrixNode; +typedef Lib3MFHandle Lib3MF_MatrixFromRowsNode; +typedef Lib3MFHandle Lib3MF_MatrixFromColumnsNode; +typedef Lib3MFHandle Lib3MF_ConstantNode; +typedef Lib3MFHandle Lib3MF_ConstVecNode; +typedef Lib3MFHandle Lib3MF_ConstMatNode; +typedef Lib3MFHandle Lib3MF_MeshNode; +typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_FunctionCallNode; +typedef Lib3MFHandle Lib3MF_NodeIterator; +typedef Lib3MFHandle Lib3MF_Function; +typedef Lib3MFHandle Lib3MF_ImplicitFunction; +typedef Lib3MFHandle Lib3MF_FunctionFromImage3D; typedef Lib3MFHandle Lib3MF_BuildItem; typedef Lib3MFHandle Lib3MF_BuildItemIterator; typedef Lib3MFHandle Lib3MF_Slice; @@ -305,7 +388,7 @@ typedef enum eLib3MFBeamLatticeClipMode { } eLib3MFBeamLatticeClipMode; typedef enum eLib3MFBeamLatticeBallMode { - eBeamLatticeBallModeNone = 0, + eBeamLatticeBallModeBeamLatticeBallModeNone = 0, eBeamLatticeBallModeMixed = 1, eBeamLatticeBallModeAll = 2 } eLib3MFBeamLatticeBallMode; @@ -343,6 +426,103 @@ typedef enum eLib3MFBlendMethod { eBlendMethodMultiply = 2 } eLib3MFBlendMethod; +typedef enum eLib3MFChannelName { + eChannelNameRed = 0, + eChannelNameGreen = 1, + eChannelNameBlue = 2, + eChannelNameAlpha = 3 +} eLib3MFChannelName; + +typedef enum eLib3MFCompositionMethod { + eCompositionMethodWeightedSum = 0, + eCompositionMethodMultiply = 1, + eCompositionMethodMin = 2, + eCompositionMethodMax = 3, + eCompositionMethodMask = 4 +} eLib3MFCompositionMethod; + +typedef enum eLib3MFCompositionSpace { + eCompositionSpaceRaw = 0, + eCompositionSpaceLinearColor = 1 +} eLib3MFCompositionSpace; + +/** +* enum eLib3MFImplicitNodeType - The type of the node +*/ +typedef enum eLib3MFImplicitNodeType { + eImplicitNodeTypeAddition = 1, /** Adds to values (scalar or vector) */ + eImplicitNodeTypeSubtraction = 2, /** Subtracts two values (scalar or vector) */ + eImplicitNodeTypeMultiplication = 3, /** Multiplies two values (scalar or vector) */ + eImplicitNodeTypeDivision = 4, /** Divides two values (scalar or vector) */ + eImplicitNodeTypeConstant = 5, /** A constant scalar value */ + eImplicitNodeTypeConstVec = 6, /** A constant vector value */ + eImplicitNodeTypeConstMat = 7, /** A constant matrix value */ + eImplicitNodeTypeComposeVector = 8, /** Creates a vector from three scalar values */ + eImplicitNodeTypeDecomposeVector = 9, /** Decomposes a vector into three scalar values */ + eImplicitNodeTypeComposeMatrix = 10, /** Creates a matrix from nine scalar values */ + eImplicitNodeTypeMatrixFromColumns = 11, /** Creates a matrix from three column vector values */ + eImplicitNodeTypeMatrixFromRows = 12, /** Creates a matrix from three row vector values */ + eImplicitNodeTypeDot = 13, /** Calculates the dot product of two vector values */ + eImplicitNodeTypeCross = 14, /** Calculates the cross product of two vector values */ + eImplicitNodeTypeMatVecMultiplication = 15, /** Multiplies a matrix with a vector */ + eImplicitNodeTypeTranspose = 16, /** Transposes a matrix */ + eImplicitNodeTypeInverse = 17, /** Computes the inverse of a matrix */ + eImplicitNodeTypeSinus = 18, /** Calculates the sinus */ + eImplicitNodeTypeCosinus = 19, /** Calculates the cosinus */ + eImplicitNodeTypeTan = 20, /** Calculates the tangent */ + eImplicitNodeTypeArcSin = 21, /** Calculates the arcsinus */ + eImplicitNodeTypeArcCos = 22, /** Calculates the arccosinus */ + eImplicitNodeTypeArcTan = 23, /** Calculates the arctangent */ + eImplicitNodeTypeArcTan2 = 24, /** Calculates the arctangent */ + eImplicitNodeTypeMin = 25, /** Calculates the minimum tow values */ + eImplicitNodeTypeMax = 26, /** Calculates the maximum of two values */ + eImplicitNodeTypeAbs = 27, /** Calcul the absolute value */ + eImplicitNodeTypeFmod = 28, /** Computes the remainder of the divison of the inputs (same behavior as C fmod) */ + eImplicitNodeTypePow = 29, /** Calculates the power A^B */ + eImplicitNodeTypeSqrt = 30, /** Calculates the square root */ + eImplicitNodeTypeExp = 31, /** Exponential function */ + eImplicitNodeTypeLog = 32, /** Natural logarithmus */ + eImplicitNodeTypeLog2 = 33, /** Logarithmus to the base 2 */ + eImplicitNodeTypeLog10 = 34, /** Logarithmus to the base 10 */ + eImplicitNodeTypeSelect = 35, /** If A is less B returns C, else D */ + eImplicitNodeTypeClamp = 36, /** Clamps the input value to min and max */ + eImplicitNodeTypeSinh = 37, /** Calculates the hyperbolic sine */ + eImplicitNodeTypeCosh = 38, /** Calculates the hyperbolic cosine */ + eImplicitNodeTypeTanh = 39, /** Calculates the hyperbolic tangent */ + eImplicitNodeTypeRound = 40, /** Rounds a scalar value to the nearest integer */ + eImplicitNodeTypeCeil = 41, /** Rounds a scalar value up to the nearest integer */ + eImplicitNodeTypeFloor = 42, /** Rounds a scalar value down to the nearest integer */ + eImplicitNodeTypeSign = 43, /** Returns the sign */ + eImplicitNodeTypeFract = 44, /** Returns the fractional part */ + eImplicitNodeTypeFunctionCall = 45, /** Calls a function */ + eImplicitNodeTypeMesh = 46, /** Calculates the signed distance to a mesh */ + eImplicitNodeTypeLength = 47, /** Calculates the length of a vector */ + eImplicitNodeTypeConstResourceID = 48, /** Selects a resource (function, mesh etc.) */ + eImplicitNodeTypeVectorFromScalar = 49, /** Creates a vector from one scalar values */ + eImplicitNodeTypeUnsignedMesh = 50, /** Calculates the unsigned distance to a mesh */ + eImplicitNodeTypeMod = 51 /** Calculates the modulo of two values (same behaviour as glsl mod) */ +} eLib3MFImplicitNodeType; + +/** +* enum eLib3MFImplicitPortType - The type of the port +*/ +typedef enum eLib3MFImplicitPortType { + eImplicitPortTypeScalar = 1, /** Scalar */ + eImplicitPortTypeVector = 2, /** Vector */ + eImplicitPortTypeMatrix = 3, /** 4x4 Matrix */ + eImplicitPortTypeResourceID = 4 /** Resource ID */ +} eLib3MFImplicitPortType; + +/** +* enum eLib3MFImplicitNodeConfiguration - Defines the input and output types of a node +*/ +typedef enum eLib3MFImplicitNodeConfiguration { + eImplicitNodeConfigurationDefault = 1, /** Default */ + eImplicitNodeConfigurationScalarToScalar = 2, /** Scalar -> Scalar */ + eImplicitNodeConfigurationVectorToVector = 3, /** Vector -> Vector */ + eImplicitNodeConfigurationMatrixToMatrix = 4 /** Matrix -> Matrix */ +} eLib3MFImplicitNodeConfiguration; + typedef enum eLib3MFEncryptionAlgorithm { eEncryptionAlgorithmAES256_GCM = 1 /** http://www.w3.org/2009/xmlenc11#aes256-gcm */ } eLib3MFEncryptionAlgorithm; @@ -433,6 +613,36 @@ typedef union { int m_code; } structEnumLib3MFBlendMethod; +typedef union { + eLib3MFChannelName m_enum; + int m_code; +} structEnumLib3MFChannelName; + +typedef union { + eLib3MFCompositionMethod m_enum; + int m_code; +} structEnumLib3MFCompositionMethod; + +typedef union { + eLib3MFCompositionSpace m_enum; + int m_code; +} structEnumLib3MFCompositionSpace; + +typedef union { + eLib3MFImplicitNodeType m_enum; + int m_code; +} structEnumLib3MFImplicitNodeType; + +typedef union { + eLib3MFImplicitPortType m_enum; + int m_code; +} structEnumLib3MFImplicitPortType; + +typedef union { + eLib3MFImplicitNodeConfiguration m_enum; + int m_code; +} structEnumLib3MFImplicitNodeConfiguration; + typedef union { eLib3MFEncryptionAlgorithm m_enum; int m_code; @@ -523,6 +733,14 @@ typedef struct sLib3MFBall { Lib3MF_double m_Radius; } sLib3MFBall; +typedef struct sLib3MFVector { + Lib3MF_double m_Coordinates[3]; +} sLib3MFVector; + +typedef struct sLib3MFMatrix4x4 { + Lib3MF_double m_Field[4][4]; +} sLib3MFMatrix4x4; + #pragma pack () /************************************************************************************************************************* diff --git a/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas b/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas index 8271fb01c..fdb5e2256 100644 --- a/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas +++ b/Autogenerated/Bindings/Pascal/Unit_Lib3MF.pas @@ -1,7 +1,7 @@ {$IFDEF FPC}{$MODE DELPHI}{$ENDIF} (*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -30,7 +30,7 @@ Abstract: This is an autogenerated Pascal Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 *) @@ -54,8 +54,8 @@ interface const LIB3MF_VERSION_MAJOR = 2; - LIB3MF_VERSION_MINOR = 3; - LIB3MF_VERSION_MICRO = 2; + LIB3MF_VERSION_MINOR = 4; + LIB3MF_VERSION_MICRO = 0; LIB3MF_VERSION_PRERELEASEINFO = ''; LIB3MF_VERSION_BUILDINFO = ''; @@ -113,6 +113,7 @@ interface LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER = 140; LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT = 141; LIB3MF_ERROR_INVALIDRESOURCE = 142; + LIB3MF_ERROR_INVALIDLEVELSET = 143; LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE = 2000; LIB3MF_ERROR_INVALIDKEYSTORE = 3000; LIB3MF_ERROR_INVALIDKEYSTORECONSUMER = 3001; @@ -120,6 +121,10 @@ interface LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND = 3003; LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED = 3004; LIB3MF_ERROR_INVALIDKEYSIZE = 3005; + LIB3MF_ERROR_INCOMPATIBLEPORTTYPES = 4000; + LIB3MF_ERROR_GRAPHISCYCLIC = 4001; + LIB3MF_ERROR_INPUTNOTSET = 4002; + LIB3MF_ERROR_INVALIDNODECONFIGURATION = 4003; (************************************************************************************************************************* Declaration of enums @@ -189,7 +194,7 @@ interface ); TLib3MFBeamLatticeBallMode = ( - eBeamLatticeBallModeNone, + eBeamLatticeBallModeBeamLatticeBallModeNone, eBeamLatticeBallModeMixed, eBeamLatticeBallModeAll ); @@ -227,6 +232,94 @@ interface eBlendMethodMultiply ); + TLib3MFChannelName = ( + eChannelNameRed, + eChannelNameGreen, + eChannelNameBlue, + eChannelNameAlpha + ); + + TLib3MFCompositionMethod = ( + eCompositionMethodWeightedSum, + eCompositionMethodMultiply, + eCompositionMethodMin, + eCompositionMethodMax, + eCompositionMethodMask + ); + + TLib3MFCompositionSpace = ( + eCompositionSpaceRaw, + eCompositionSpaceLinearColor + ); + + TLib3MFImplicitNodeType = ( + eImplicitNodeTypeAddition, + eImplicitNodeTypeSubtraction, + eImplicitNodeTypeMultiplication, + eImplicitNodeTypeDivision, + eImplicitNodeTypeConstant, + eImplicitNodeTypeConstVec, + eImplicitNodeTypeConstMat, + eImplicitNodeTypeComposeVector, + eImplicitNodeTypeDecomposeVector, + eImplicitNodeTypeComposeMatrix, + eImplicitNodeTypeMatrixFromColumns, + eImplicitNodeTypeMatrixFromRows, + eImplicitNodeTypeDot, + eImplicitNodeTypeCross, + eImplicitNodeTypeMatVecMultiplication, + eImplicitNodeTypeTranspose, + eImplicitNodeTypeInverse, + eImplicitNodeTypeSinus, + eImplicitNodeTypeCosinus, + eImplicitNodeTypeTan, + eImplicitNodeTypeArcSin, + eImplicitNodeTypeArcCos, + eImplicitNodeTypeArcTan, + eImplicitNodeTypeArcTan2, + eImplicitNodeTypeMin, + eImplicitNodeTypeMax, + eImplicitNodeTypeAbs, + eImplicitNodeTypeFmod, + eImplicitNodeTypePow, + eImplicitNodeTypeSqrt, + eImplicitNodeTypeExp, + eImplicitNodeTypeLog, + eImplicitNodeTypeLog2, + eImplicitNodeTypeLog10, + eImplicitNodeTypeSelect, + eImplicitNodeTypeClamp, + eImplicitNodeTypeSinh, + eImplicitNodeTypeCosh, + eImplicitNodeTypeTanh, + eImplicitNodeTypeRound, + eImplicitNodeTypeCeil, + eImplicitNodeTypeFloor, + eImplicitNodeTypeSign, + eImplicitNodeTypeFract, + eImplicitNodeTypeFunctionCall, + eImplicitNodeTypeMesh, + eImplicitNodeTypeLength, + eImplicitNodeTypeConstResourceID, + eImplicitNodeTypeVectorFromScalar, + eImplicitNodeTypeUnsignedMesh, + eImplicitNodeTypeMod + ); + + TLib3MFImplicitPortType = ( + eImplicitPortTypeScalar, + eImplicitPortTypeVector, + eImplicitPortTypeMatrix, + eImplicitPortTypeResourceID + ); + + TLib3MFImplicitNodeConfiguration = ( + eImplicitNodeConfigurationDefault, + eImplicitNodeConfigurationScalarToScalar, + eImplicitNodeConfigurationVectorToVector, + eImplicitNodeConfigurationMatrixToMatrix + ); + TLib3MFEncryptionAlgorithm = ( eEncryptionAlgorithmAES256_GCM ); @@ -330,6 +423,16 @@ interface FRadius: Double; end; + PLib3MFVector = ^TLib3MFVector; + TLib3MFVector = packed record + FCoordinates: array [0..2] of Double; + end; + + PLib3MFMatrix4x4 = ^TLib3MFMatrix4x4; + TLib3MFMatrix4x4 = packed record + FField: array [0..3, 0..3] of Double; + end; + (************************************************************************************************************************* Declaration of struct arrays @@ -347,6 +450,8 @@ interface ArrayOfLib3MFColor = array of TLib3MFColor; ArrayOfLib3MFBeam = array of TLib3MFBeam; ArrayOfLib3MFBall = array of TLib3MFBall; + ArrayOfLib3MFVector = array of TLib3MFVector; + ArrayOfLib3MFMatrix4x4 = array of TLib3MFMatrix4x4; (************************************************************************************************************************* Declaration of function types @@ -384,11 +489,21 @@ TLib3MFColorGroupIterator = class; TLib3MFTexture2DGroupIterator = class; TLib3MFCompositeMaterialsIterator = class; TLib3MFMultiPropertyGroupIterator = class; + TLib3MFImage3DIterator = class; + TLib3MFFunctionIterator = class; + TLib3MFLevelSetIterator = class; TLib3MFMetaData = class; TLib3MFMetaDataGroup = class; TLib3MFObject = class; TLib3MFMeshObject = class; + TLib3MFLevelSet = class; TLib3MFBeamLattice = class; + TLib3MFFunctionReference = class; + TLib3MFVolumeDataColor = class; + TLib3MFMaterialMapping = class; + TLib3MFVolumeDataComposite = class; + TLib3MFVolumeDataProperty = class; + TLib3MFVolumeData = class; TLib3MFComponent = class; TLib3MFComponentsObject = class; TLib3MFBeamSet = class; @@ -397,8 +512,71 @@ TLib3MFColorGroup = class; TLib3MFTexture2DGroup = class; TLib3MFCompositeMaterials = class; TLib3MFMultiPropertyGroup = class; + TLib3MFImage3D = class; + TLib3MFImageStack = class; TLib3MFAttachment = class; TLib3MFTexture2D = class; + TLib3MFImplicitPort = class; + TLib3MFIterator = class; + TLib3MFImplicitPortIterator = class; + TLib3MFImplicitNode = class; + TLib3MFOneInputNode = class; + TLib3MFSinNode = class; + TLib3MFCosNode = class; + TLib3MFTanNode = class; + TLib3MFArcSinNode = class; + TLib3MFArcCosNode = class; + TLib3MFArcTanNode = class; + TLib3MFSinhNode = class; + TLib3MFCoshNode = class; + TLib3MFTanhNode = class; + TLib3MFRoundNode = class; + TLib3MFCeilNode = class; + TLib3MFFloorNode = class; + TLib3MFSignNode = class; + TLib3MFFractNode = class; + TLib3MFAbsNode = class; + TLib3MFExpNode = class; + TLib3MFLogNode = class; + TLib3MFLog2Node = class; + TLib3MFLog10Node = class; + TLib3MFLengthNode = class; + TLib3MFTransposeNode = class; + TLib3MFInverseNode = class; + TLib3MFSqrtNode = class; + TLib3MFResourceIdNode = class; + TLib3MFTwoInputNode = class; + TLib3MFAdditionNode = class; + TLib3MFSubtractionNode = class; + TLib3MFMultiplicationNode = class; + TLib3MFDivisionNode = class; + TLib3MFDotNode = class; + TLib3MFCrossNode = class; + TLib3MFArcTan2Node = class; + TLib3MFMatVecMultiplicationNode = class; + TLib3MFMinNode = class; + TLib3MFMaxNode = class; + TLib3MFFmodNode = class; + TLib3MFModNode = class; + TLib3MFPowNode = class; + TLib3MFSelectNode = class; + TLib3MFClampNode = class; + TLib3MFComposeVectorNode = class; + TLib3MFVectorFromScalarNode = class; + TLib3MFDecomposeVectorNode = class; + TLib3MFComposeMatrixNode = class; + TLib3MFMatrixFromRowsNode = class; + TLib3MFMatrixFromColumnsNode = class; + TLib3MFConstantNode = class; + TLib3MFConstVecNode = class; + TLib3MFConstMatNode = class; + TLib3MFMeshNode = class; + TLib3MFUnsignedMeshNode = class; + TLib3MFFunctionCallNode = class; + TLib3MFNodeIterator = class; + TLib3MFFunction = class; + TLib3MFImplicitFunction = class; + TLib3MFFunctionFromImage3D = class; TLib3MFBuildItem = class; TLib3MFBuildItemIterator = class; TLib3MFSlice = class; @@ -950,6 +1128,48 @@ TLib3MFModel = class; TLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupFunc = function(pMultiPropertyGroupIterator: TLib3MFHandle; out pResource: TLib3MFHandle): TLib3MFResult; cdecl; +(************************************************************************************************************************* + Function type definitions for Image3DIterator +**************************************************************************************************************************) + + (** + * Returns the Image3D the iterator points at. + * + * @param[in] pImage3DIterator - Image3DIterator instance. + * @param[out] pResource - returns the Image3D instance. + * @return error code or 0 (success) + *) + TLib3MFImage3DIterator_GetCurrentImage3DFunc = function(pImage3DIterator: TLib3MFHandle; out pResource: TLib3MFHandle): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for FunctionIterator +**************************************************************************************************************************) + + (** + * Returns the Function the iterator points at. + * + * @param[in] pFunctionIterator - FunctionIterator instance. + * @param[out] pResource - returns the Function instance. + * @return error code or 0 (success) + *) + TLib3MFFunctionIterator_GetCurrentFunctionFunc = function(pFunctionIterator: TLib3MFHandle; out pResource: TLib3MFHandle): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for LevelSetIterator +**************************************************************************************************************************) + + (** + * Returns the LevelSet the iterator points at. + * + * @param[in] pLevelSetIterator - LevelSetIterator instance. + * @param[out] pResource - returns the MeshObject instance. + * @return error code or 0 (success) + *) + TLib3MFLevelSetIterator_GetCurrentLevelSetFunc = function(pLevelSetIterator: TLib3MFHandle; out pResource: TLib3MFHandle): TLib3MFResult; cdecl; + + (************************************************************************************************************************* Function type definitions for MetaData **************************************************************************************************************************) @@ -1211,6 +1431,15 @@ TLib3MFModel = class; *) TLib3MFObject_IsComponentsObjectFunc = function(pObject: TLib3MFHandle; out pIsComponentsObject: Byte): TLib3MFResult; cdecl; + (** + * Retrieves, if an object is a level set object + * + * @param[in] pObject - Object instance. + * @param[out] pIsLevelSetObject - returns, whether the object is a level set object + * @return error code or 0 (success) + *) + TLib3MFObject_IsLevelSetObjectFunc = function(pObject: TLib3MFHandle; out pIsLevelSetObject: Byte): TLib3MFResult; cdecl; + (** * Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. * @@ -1544,6 +1773,175 @@ TLib3MFModel = class; *) TLib3MFMeshObject_BeamLatticeFunc = function(pMeshObject: TLib3MFHandle; out pTheBeamLattice: TLib3MFHandle): TLib3MFResult; cdecl; + (** + * Retrieves the VolumeData of this MeshObject. + * + * @param[in] pMeshObject - MeshObject instance. + * @param[out] pTheVolumeData - the VolumeData of this MeshObject + * @return error code or 0 (success) + *) + TLib3MFMeshObject_GetVolumeDataFunc = function(pMeshObject: TLib3MFHandle; out pTheVolumeData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sets the VolumeData of this MeshObject. + * + * @param[in] pMeshObject - MeshObject instance. + * @param[in] pTheVolumeData - the VolumeData of this MeshObject + * @return error code or 0 (success) + *) + TLib3MFMeshObject_SetVolumeDataFunc = function(pMeshObject: TLib3MFHandle; const pTheVolumeData: TLib3MFHandle): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for LevelSet +**************************************************************************************************************************) + + (** + * Returns the function that is used as boundary shape. + * + * @param[in] pLevelSet - LevelSet instance. + * @param[out] pTheFunction - the function to use as boundary shape + * @return error code or 0 (success) + *) + TLib3MFLevelSet_GetFunctionFunc = function(pLevelSet: TLib3MFHandle; out pTheFunction: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sets the function to use as boundary shape. + * + * @param[in] pLevelSet - LevelSet instance. + * @param[in] pTheFunction - the function to use as boundary shape + * @return error code or 0 (success) + *) + TLib3MFLevelSet_SetFunctionFunc = function(pLevelSet: TLib3MFHandle; const pTheFunction: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns the transformation matrix into the coordinate system of the referenced Function. + * + * @param[in] pLevelSet - LevelSet instance. + * @param[out] pTransform - the transformation matrix + * @return error code or 0 (success) + *) + TLib3MFLevelSet_GetTransformFunc = function(pLevelSet: TLib3MFHandle; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + + (** + * Sets the transformation matrix into the coordinate system of the referenced Function. + * + * @param[in] pLevelSet - LevelSet instance. + * @param[in] pTransform - new transformation matrix + * @return error code or 0 (success) + *) + TLib3MFLevelSet_SetTransformFunc = function(pLevelSet: TLib3MFHandle; const pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + + (** + * Returns the name of the function output channel to use. + * + * @param[in] pLevelSet - LevelSet instance. + * @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL + * @return error code or 0 (success) + *) + TLib3MFLevelSet_GetChannelNameFunc = function(pLevelSet: TLib3MFHandle; const nChannelNameBufferSize: Cardinal; out pChannelNameNeededChars: Cardinal; pChannelNameBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Sets the name of the function output channel to use. + * + * @param[in] pLevelSet - LevelSet instance. + * @param[in] pChannelName - new name of the function output channel + * @return error code or 0 (success) + *) + TLib3MFLevelSet_SetChannelNameFunc = function(pLevelSet: TLib3MFHandle; const pChannelName: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Sets the minimal feature size as a hint for the function evaluator + * + * @param[in] pLevelSet - LevelSet instance. + * @param[in] dMinFeatureSize - minimal feature size + * @return error code or 0 (success) + *) + TLib3MFLevelSet_SetMinFeatureSizeFunc = function(pLevelSet: TLib3MFHandle; const dMinFeatureSize: Double): TLib3MFResult; cdecl; + + (** + * Returns the minimal feature size as a hint for the function evaluator + * + * @param[in] pLevelSet - LevelSet instance. + * @param[out] pMinFeatureSize - minimal feature size + * @return error code or 0 (success) + *) + TLib3MFLevelSet_GetMinFeatureSizeFunc = function(pLevelSet: TLib3MFHandle; out pMinFeatureSize: Double): TLib3MFResult; cdecl; + + (** + * Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * + * @param[in] pLevelSet - LevelSet instance. + * @param[in] dFallBackValue - fallback value + * @return error code or 0 (success) + *) + TLib3MFLevelSet_SetFallBackValueFunc = function(pLevelSet: TLib3MFHandle; const dFallBackValue: Double): TLib3MFResult; cdecl; + + (** + * Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * + * @param[in] pLevelSet - LevelSet instance. + * @param[out] pFallBackValue - fallback value + * @return error code or 0 (success) + *) + TLib3MFLevelSet_GetFallBackValueFunc = function(pLevelSet: TLib3MFHandle; out pFallBackValue: Double): TLib3MFResult; cdecl; + + (** + * If set only the bounding box of the mesh is intersected with the boundary + * + * @param[in] pLevelSet - LevelSet instance. + * @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + * @return error code or 0 (success) + *) + TLib3MFLevelSet_SetMeshBBoxOnlyFunc = function(pLevelSet: TLib3MFHandle; const bMeshBBoxOnly: Byte): TLib3MFResult; cdecl; + + (** + * If set only the bounding box of the mesh is intersected with the boundary + * + * @param[in] pLevelSet - LevelSet instance. + * @param[out] pMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + * @return error code or 0 (success) + *) + TLib3MFLevelSet_GetMeshBBoxOnlyFunc = function(pLevelSet: TLib3MFHandle; out pMeshBBoxOnly: Byte): TLib3MFResult; cdecl; + + (** + * Sets the mesh to use as evaluation domain + * + * @param[in] pLevelSet - LevelSet instance. + * @param[in] pTheMesh - The mesh + * @return error code or 0 (success) + *) + TLib3MFLevelSet_SetMeshFunc = function(pLevelSet: TLib3MFHandle; const pTheMesh: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns the mesh that is used as evaluation domain + * + * @param[in] pLevelSet - LevelSet instance. + * @param[out] pTheMesh - The mesh + * @return error code or 0 (success) + *) + TLib3MFLevelSet_GetMeshFunc = function(pLevelSet: TLib3MFHandle; out pTheMesh: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Retrieves the VolumeData this Object. + * + * @param[in] pLevelSet - LevelSet instance. + * @param[out] pTheVolumeData - the VolumeData of this Object + * @return error code or 0 (success) + *) + TLib3MFLevelSet_GetVolumeDataFunc = function(pLevelSet: TLib3MFHandle; out pTheVolumeData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sets the VolumeData of this LevelSet. + * + * @param[in] pLevelSet - LevelSet instance. + * @param[in] pTheVolumeData - the VolumeData of this MeshObject + * @return error code or 0 (success) + *) + TLib3MFLevelSet_SetVolumeDataFunc = function(pLevelSet: TLib3MFHandle; const pTheVolumeData: TLib3MFHandle): TLib3MFResult; cdecl; + (************************************************************************************************************************* Function type definitions for BeamLattice @@ -1776,198 +2174,497 @@ TLib3MFModel = class; (************************************************************************************************************************* - Function type definitions for Component + Function type definitions for FunctionReference **************************************************************************************************************************) (** - * Returns the Resource Instance of the component. + * Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. * - * @param[in] pComponent - Component instance. - * @param[out] pObjectResource - filled with the Resource Instance. + * @param[in] pFunctionReference - FunctionReference instance. + * @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) *) - TLib3MFComponent_GetObjectResourceFunc = function(pComponent: TLib3MFHandle; out pObjectResource: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFFunctionReference_GetFunctionResourceIDFunc = function(pFunctionReference: TLib3MFHandle; out pUniqueResourceID: Cardinal): TLib3MFResult; cdecl; (** - * Returns the UniqueResourceID of the component. + * Sets the UniqueResourceID to refer to. * - * @param[in] pComponent - Component instance. - * @param[out] pUniqueResourceID - returns the UniqueResourceID. + * @param[in] pFunctionReference - FunctionReference instance. + * @param[in] nUniqueResourceID - UniqueResourceID of the function * @return error code or 0 (success) *) - TLib3MFComponent_GetObjectResourceIDFunc = function(pComponent: TLib3MFHandle; out pUniqueResourceID: Cardinal): TLib3MFResult; cdecl; + TLib3MFFunctionReference_SetFunctionResourceIDFunc = function(pFunctionReference: TLib3MFHandle; const nUniqueResourceID: Cardinal): TLib3MFResult; cdecl; (** - * returns, whether a component has a UUID and, if true, the component's UUID + * Returns the transformation matrix into the coordinate system of the referenced Function. * - * @param[in] pComponent - Component instance. - * @param[out] pHasUUID - flag whether the component has a UUID - * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) - * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL + * @param[in] pFunctionReference - FunctionReference instance. + * @param[out] pTransform - the transformation matrix * @return error code or 0 (success) *) - TLib3MFComponent_GetUUIDFunc = function(pComponent: TLib3MFHandle; out pHasUUID: Byte; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFFunctionReference_GetTransformFunc = function(pFunctionReference: TLib3MFHandle; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; (** - * sets the component's UUID + * Sets the transformation matrix into the coordinate system of the referenced Function. * - * @param[in] pComponent - Component instance. - * @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @param[in] pFunctionReference - FunctionReference instance. + * @param[in] pTransform - new transformation matrix * @return error code or 0 (success) *) - TLib3MFComponent_SetUUIDFunc = function(pComponent: TLib3MFHandle; const pUUID: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFFunctionReference_SetTransformFunc = function(pFunctionReference: TLib3MFHandle; const pTransform: PLib3MFTransform): TLib3MFResult; cdecl; (** - * Returns, if the component has a different transformation than the identity matrix + * Returns the name of the function output channel to use. * - * @param[in] pComponent - Component instance. - * @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity + * @param[in] pFunctionReference - FunctionReference instance. + * @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL * @return error code or 0 (success) *) - TLib3MFComponent_HasTransformFunc = function(pComponent: TLib3MFHandle; out pHasTransform: Byte): TLib3MFResult; cdecl; + TLib3MFFunctionReference_GetChannelNameFunc = function(pFunctionReference: TLib3MFHandle; const nChannelNameBufferSize: Cardinal; out pChannelNameNeededChars: Cardinal; pChannelNameBuffer: PAnsiChar): TLib3MFResult; cdecl; (** - * Returns the transformation matrix of the component. + * Sets the name of the function output channel to use. * - * @param[in] pComponent - Component instance. - * @param[out] pTransform - filled with the component transformation matrix + * @param[in] pFunctionReference - FunctionReference instance. + * @param[in] pChannelName - new name of the function output channel * @return error code or 0 (success) *) - TLib3MFComponent_GetTransformFunc = function(pComponent: TLib3MFHandle; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + TLib3MFFunctionReference_SetChannelNameFunc = function(pFunctionReference: TLib3MFHandle; const pChannelName: PAnsiChar): TLib3MFResult; cdecl; (** - * Sets the transformation matrix of the component. + * Sets the minimal feature size as a hint for the function evaluator * - * @param[in] pComponent - Component instance. - * @param[in] pTransform - new transformation matrix + * @param[in] pFunctionReference - FunctionReference instance. + * @param[in] dMinFeatureSize - minimal feature size * @return error code or 0 (success) *) - TLib3MFComponent_SetTransformFunc = function(pComponent: TLib3MFHandle; const pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + TLib3MFFunctionReference_SetMinFeatureSizeFunc = function(pFunctionReference: TLib3MFHandle; const dMinFeatureSize: Double): TLib3MFResult; cdecl; - -(************************************************************************************************************************* - Function type definitions for ComponentsObject -**************************************************************************************************************************) - (** - * Adds a new component to a components object. + * Returns the minimal feature size as a hint for the function evaluator * - * @param[in] pComponentsObject - ComponentsObject instance. - * @param[in] pObjectResource - object to add as component. Must not lead to circular references! - * @param[in] pTransform - optional transform matrix for the component. - * @param[out] pComponentInstance - new component instance + * @param[in] pFunctionReference - FunctionReference instance. + * @param[out] pMinFeatureSize - minimal feature size * @return error code or 0 (success) *) - TLib3MFComponentsObject_AddComponentFunc = function(pComponentsObject: TLib3MFHandle; const pObjectResource: TLib3MFHandle; const pTransform: PLib3MFTransform; out pComponentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFFunctionReference_GetMinFeatureSizeFunc = function(pFunctionReference: TLib3MFHandle; out pMinFeatureSize: Double): TLib3MFResult; cdecl; (** - * Retrieves a component from a component object. + * Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * - * @param[in] pComponentsObject - ComponentsObject instance. - * @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) - * @param[out] pComponentInstance - component instance + * @param[in] pFunctionReference - FunctionReference instance. + * @param[in] dFallBackValue - fallback value * @return error code or 0 (success) *) - TLib3MFComponentsObject_GetComponentFunc = function(pComponentsObject: TLib3MFHandle; const nIndex: Cardinal; out pComponentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFFunctionReference_SetFallBackValueFunc = function(pFunctionReference: TLib3MFHandle; const dFallBackValue: Double): TLib3MFResult; cdecl; (** - * Retrieves a component count of a component object. + * Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * - * @param[in] pComponentsObject - ComponentsObject instance. - * @param[out] pCount - returns the component count + * @param[in] pFunctionReference - FunctionReference instance. + * @param[out] pFallBackValue - fallback value * @return error code or 0 (success) *) - TLib3MFComponentsObject_GetComponentCountFunc = function(pComponentsObject: TLib3MFHandle; out pCount: Cardinal): TLib3MFResult; cdecl; + TLib3MFFunctionReference_GetFallBackValueFunc = function(pFunctionReference: TLib3MFHandle; out pFallBackValue: Double): TLib3MFResult; cdecl; (************************************************************************************************************************* - Function type definitions for BeamSet + Function type definitions for VolumeDataColor +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for MaterialMapping +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for VolumeDataComposite **************************************************************************************************************************) (** - * Sets a beamset's name string + * Returns the BaseMaterialGroup used within this volume data item * - * @param[in] pBeamSet - BeamSet instance. - * @param[in] pName - new name of the beamset. + * @param[in] pVolumeDataComposite - VolumeDataComposite instance. + * @param[out] pBaseMaterialGroupInstance - The BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) *) - TLib3MFBeamSet_SetNameFunc = function(pBeamSet: TLib3MFHandle; const pName: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFVolumeDataComposite_GetBaseMaterialGroupFunc = function(pVolumeDataComposite: TLib3MFHandle; out pBaseMaterialGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Retrieves a beamset's name string + * Sets the BaseMaterialGroup to use within this volume data item. * - * @param[in] pBeamSet - BeamSet instance. - * @param[in] nNameBufferSize - size of the buffer (including trailing 0) - * @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL + * @param[in] pVolumeDataComposite - VolumeDataComposite instance. + * @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) *) - TLib3MFBeamSet_GetNameFunc = function(pBeamSet: TLib3MFHandle; const nNameBufferSize: Cardinal; out pNameNeededChars: Cardinal; pNameBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFVolumeDataComposite_SetBaseMaterialGroupFunc = function(pVolumeDataComposite: TLib3MFHandle; const pBaseMaterialGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Sets a beamset's identifier string + * Returns the number of material mappings of this VolumeDataComposite element * - * @param[in] pBeamSet - BeamSet instance. - * @param[in] pIdentifier - new name of the beamset. + * @param[in] pVolumeDataComposite - VolumeDataComposite instance. + * @param[out] pCount - the number of material mappings. * @return error code or 0 (success) *) - TLib3MFBeamSet_SetIdentifierFunc = function(pBeamSet: TLib3MFHandle; const pIdentifier: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFVolumeDataComposite_GetMaterialMappingCountFunc = function(pVolumeDataComposite: TLib3MFHandle; out pCount: Cardinal): TLib3MFResult; cdecl; (** - * Retrieves a beamset's identifier string + * Returns MaterialMappting with given index * - * @param[in] pBeamSet - BeamSet instance. - * @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) - * @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL + * @param[in] pVolumeDataComposite - VolumeDataComposite instance. + * @param[in] nIndex - Index of the MaterialMapping in question. + * @param[out] pTheMaterialMapping - MaterialMapping used in this element * @return error code or 0 (success) *) - TLib3MFBeamSet_GetIdentifierFunc = function(pBeamSet: TLib3MFHandle; const nIdentifierBufferSize: Cardinal; out pIdentifierNeededChars: Cardinal; pIdentifierBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFVolumeDataComposite_GetMaterialMappingFunc = function(pVolumeDataComposite: TLib3MFHandle; const nIndex: Cardinal; out pTheMaterialMapping: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Retrieves the reference count of a beamset + * Adds a the MaterialMapping * - * @param[in] pBeamSet - BeamSet instance. - * @param[out] pCount - returns the reference count + * @param[in] pVolumeDataComposite - VolumeDataComposite instance. + * @param[in] pTransform - new transformation matrix + * @param[out] pTheMaterialMapping - The new MaterialMapping * @return error code or 0 (success) *) - TLib3MFBeamSet_GetReferenceCountFunc = function(pBeamSet: TLib3MFHandle; out pCount: Cardinal): TLib3MFResult; cdecl; + TLib3MFVolumeDataComposite_AddMaterialMappingFunc = function(pVolumeDataComposite: TLib3MFHandle; const pTransform: PLib3MFTransform; out pTheMaterialMapping: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Sets the references of a beamset + * Removes the MaterialMapping with given index * - * @param[in] pBeamSet - BeamSet instance. - * @param[in] nReferencesCount - Number of elements in buffer - * @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset + * @param[in] pVolumeDataComposite - VolumeDataComposite instance. + * @param[in] nIndex - The index of the MaterialMapping to be removed. * @return error code or 0 (success) *) - TLib3MFBeamSet_SetReferencesFunc = function(pBeamSet: TLib3MFHandle; const nReferencesCount: QWord; const pReferencesBuffer: PCardinal): TLib3MFResult; cdecl; + TLib3MFVolumeDataComposite_RemoveMaterialMappingFunc = function(pVolumeDataComposite: TLib3MFHandle; const nIndex: Cardinal): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for VolumeDataProperty +**************************************************************************************************************************) + (** - * Retrieves the references of a beamset + * Gets the qualified name of this property. * - * @param[in] pBeamSet - BeamSet instance. - * @param[in] nReferencesCount - Number of elements in buffer - * @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. - * @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset + * @param[in] pVolumeDataProperty - VolumeDataProperty instance. + * @param[in] nPropertyNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pPropertyNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pPropertyNameBuffer - buffer of The qualified name of this property., may be NULL * @return error code or 0 (success) *) - TLib3MFBeamSet_GetReferencesFunc = function(pBeamSet: TLib3MFHandle; const nReferencesCount: QWord; out pReferencesNeededCount: QWord; pReferencesBuffer: PCardinal): TLib3MFResult; cdecl; + TLib3MFVolumeDataProperty_GetNameFunc = function(pVolumeDataProperty: TLib3MFHandle; const nPropertyNameBufferSize: Cardinal; out pPropertyNameNeededChars: Cardinal; pPropertyNameBuffer: PAnsiChar): TLib3MFResult; cdecl; (** - * Retrieves the ball reference count of a beamset + * Sets whether this property is required to process this 3MF document instance. * - * @param[in] pBeamSet - BeamSet instance. - * @param[out] pCount - returns the ball reference count + * @param[in] pVolumeDataProperty - VolumeDataProperty instance. + * @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. * @return error code or 0 (success) *) - TLib3MFBeamSet_GetBallReferenceCountFunc = function(pBeamSet: TLib3MFHandle; out pCount: Cardinal): TLib3MFResult; cdecl; + TLib3MFVolumeDataProperty_SetIsRequiredFunc = function(pVolumeDataProperty: TLib3MFHandle; const bIsRequired: Byte): TLib3MFResult; cdecl; (** - * Sets the ball references of a beamset + * Returns whether this property is required to process this 3MF document instance. * - * @param[in] pBeamSet - BeamSet instance. + * @param[in] pVolumeDataProperty - VolumeDataProperty instance. + * @param[out] pIsRequired - Is this property required to process this 3MF document instance? + * @return error code or 0 (success) + *) + TLib3MFVolumeDataProperty_IsRequiredFunc = function(pVolumeDataProperty: TLib3MFHandle; out pIsRequired: Byte): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for VolumeData +**************************************************************************************************************************) + + (** + * Returns the VolumeDataComposite of this VolumeData instance + * + * @param[in] pVolumeData - VolumeData instance. + * @param[out] pTheCompositeData - filled with the VolumeDataComposite of this VolumeData instance. + * @return error code or 0 (success) + *) + TLib3MFVolumeData_GetCompositeFunc = function(pVolumeData: TLib3MFHandle; out pTheCompositeData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Creates a new VolumeDataComposite for this VolumeData instance + * + * @param[in] pVolumeData - VolumeData instance. + * @param[out] pTheCompositeData - The new VolumeDataComposite of this VolumeData instance. + * @return error code or 0 (success) + *) + TLib3MFVolumeData_CreateNewCompositeFunc = function(pVolumeData: TLib3MFHandle; out pTheCompositeData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Removes the VolumeDataComposite of this VolumeData instance + * + * @param[in] pVolumeData - VolumeData instance. + * @return error code or 0 (success) + *) + TLib3MFVolumeData_RemoveCompositeFunc = function(pVolumeData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns the VolumeDataColor of this VolumeData instance + * + * @param[in] pVolumeData - VolumeData instance. + * @param[out] pTheColorData - filled with the VolumeDataColor of this VolumeData instance. + * @return error code or 0 (success) + *) + TLib3MFVolumeData_GetColorFunc = function(pVolumeData: TLib3MFHandle; out pTheColorData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Creates a new VolumeDataColor for this VolumeData instance + * + * @param[in] pVolumeData - VolumeData instance. + * @param[in] pTheFunction - Function used in this element + * @param[out] pTheColorData - The new VolumeDataColor of this VolumeData instance. + * @return error code or 0 (success) + *) + TLib3MFVolumeData_CreateNewColorFunc = function(pVolumeData: TLib3MFHandle; const pTheFunction: TLib3MFHandle; out pTheColorData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Removes the VolumeDataColor of this VolumeData instance + * + * @param[in] pVolumeData - VolumeData instance. + * @return error code or 0 (success) + *) + TLib3MFVolumeData_RemoveColorFunc = function(pVolumeData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns the number of VolumeDataProperty + * + * @param[in] pVolumeData - VolumeData instance. + * @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData + * @return error code or 0 (success) + *) + TLib3MFVolumeData_GetPropertyCountFunc = function(pVolumeData: TLib3MFHandle; out pCount: Cardinal): TLib3MFResult; cdecl; + + (** + * Returns the VolumeDataProperty at a given Index + * + * @param[in] pVolumeData - VolumeData instance. + * @param[in] nIndex - the index of the VolumeDataProperty to be returned. + * @param[out] pTheVolumeDataProperty - the VolumeDataProperty at the given index. + * @return error code or 0 (success) + *) + TLib3MFVolumeData_GetPropertyFunc = function(pVolumeData: TLib3MFHandle; const nIndex: Cardinal; out pTheVolumeDataProperty: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Adds a new VolumeDataProperty from a Function + * + * @param[in] pVolumeData - VolumeData instance. + * @param[in] pName - the qualified name (namespace+name) of the Property + * @param[in] pTheFunction - Function used in this element + * @param[out] pTheVolumeDataProperty - the newly created VolumeDataProperty. + * @return error code or 0 (success) + *) + TLib3MFVolumeData_AddPropertyFromFunctionFunc = function(pVolumeData: TLib3MFHandle; const pName: PAnsiChar; const pTheFunction: TLib3MFHandle; out pTheVolumeDataProperty: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Removes the VolumeDataProperty with a given index + * + * @param[in] pVolumeData - VolumeData instance. + * @param[in] nIndex - the index of the VolumeDataProperty to be removed. + * @return error code or 0 (success) + *) + TLib3MFVolumeData_RemovePropertyFunc = function(pVolumeData: TLib3MFHandle; const nIndex: Cardinal): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for Component +**************************************************************************************************************************) + + (** + * Returns the Resource Instance of the component. + * + * @param[in] pComponent - Component instance. + * @param[out] pObjectResource - filled with the Resource Instance. + * @return error code or 0 (success) + *) + TLib3MFComponent_GetObjectResourceFunc = function(pComponent: TLib3MFHandle; out pObjectResource: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns the UniqueResourceID of the component. + * + * @param[in] pComponent - Component instance. + * @param[out] pUniqueResourceID - returns the UniqueResourceID. + * @return error code or 0 (success) + *) + TLib3MFComponent_GetObjectResourceIDFunc = function(pComponent: TLib3MFHandle; out pUniqueResourceID: Cardinal): TLib3MFResult; cdecl; + + (** + * returns, whether a component has a UUID and, if true, the component's UUID + * + * @param[in] pComponent - Component instance. + * @param[out] pHasUUID - flag whether the component has a UUID + * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) + * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL + * @return error code or 0 (success) + *) + TLib3MFComponent_GetUUIDFunc = function(pComponent: TLib3MFHandle; out pHasUUID: Byte; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * sets the component's UUID + * + * @param[in] pComponent - Component instance. + * @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @return error code or 0 (success) + *) + TLib3MFComponent_SetUUIDFunc = function(pComponent: TLib3MFHandle; const pUUID: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Returns, if the component has a different transformation than the identity matrix + * + * @param[in] pComponent - Component instance. + * @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity + * @return error code or 0 (success) + *) + TLib3MFComponent_HasTransformFunc = function(pComponent: TLib3MFHandle; out pHasTransform: Byte): TLib3MFResult; cdecl; + + (** + * Returns the transformation matrix of the component. + * + * @param[in] pComponent - Component instance. + * @param[out] pTransform - filled with the component transformation matrix + * @return error code or 0 (success) + *) + TLib3MFComponent_GetTransformFunc = function(pComponent: TLib3MFHandle; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + + (** + * Sets the transformation matrix of the component. + * + * @param[in] pComponent - Component instance. + * @param[in] pTransform - new transformation matrix + * @return error code or 0 (success) + *) + TLib3MFComponent_SetTransformFunc = function(pComponent: TLib3MFHandle; const pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for ComponentsObject +**************************************************************************************************************************) + + (** + * Adds a new component to a components object. + * + * @param[in] pComponentsObject - ComponentsObject instance. + * @param[in] pObjectResource - object to add as component. Must not lead to circular references! + * @param[in] pTransform - optional transform matrix for the component. + * @param[out] pComponentInstance - new component instance + * @return error code or 0 (success) + *) + TLib3MFComponentsObject_AddComponentFunc = function(pComponentsObject: TLib3MFHandle; const pObjectResource: TLib3MFHandle; const pTransform: PLib3MFTransform; out pComponentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Retrieves a component from a component object. + * + * @param[in] pComponentsObject - ComponentsObject instance. + * @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) + * @param[out] pComponentInstance - component instance + * @return error code or 0 (success) + *) + TLib3MFComponentsObject_GetComponentFunc = function(pComponentsObject: TLib3MFHandle; const nIndex: Cardinal; out pComponentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Retrieves a component count of a component object. + * + * @param[in] pComponentsObject - ComponentsObject instance. + * @param[out] pCount - returns the component count + * @return error code or 0 (success) + *) + TLib3MFComponentsObject_GetComponentCountFunc = function(pComponentsObject: TLib3MFHandle; out pCount: Cardinal): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for BeamSet +**************************************************************************************************************************) + + (** + * Sets a beamset's name string + * + * @param[in] pBeamSet - BeamSet instance. + * @param[in] pName - new name of the beamset. + * @return error code or 0 (success) + *) + TLib3MFBeamSet_SetNameFunc = function(pBeamSet: TLib3MFHandle; const pName: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves a beamset's name string + * + * @param[in] pBeamSet - BeamSet instance. + * @param[in] nNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL + * @return error code or 0 (success) + *) + TLib3MFBeamSet_GetNameFunc = function(pBeamSet: TLib3MFHandle; const nNameBufferSize: Cardinal; out pNameNeededChars: Cardinal; pNameBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Sets a beamset's identifier string + * + * @param[in] pBeamSet - BeamSet instance. + * @param[in] pIdentifier - new name of the beamset. + * @return error code or 0 (success) + *) + TLib3MFBeamSet_SetIdentifierFunc = function(pBeamSet: TLib3MFHandle; const pIdentifier: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves a beamset's identifier string + * + * @param[in] pBeamSet - BeamSet instance. + * @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) + * @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL + * @return error code or 0 (success) + *) + TLib3MFBeamSet_GetIdentifierFunc = function(pBeamSet: TLib3MFHandle; const nIdentifierBufferSize: Cardinal; out pIdentifierNeededChars: Cardinal; pIdentifierBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves the reference count of a beamset + * + * @param[in] pBeamSet - BeamSet instance. + * @param[out] pCount - returns the reference count + * @return error code or 0 (success) + *) + TLib3MFBeamSet_GetReferenceCountFunc = function(pBeamSet: TLib3MFHandle; out pCount: Cardinal): TLib3MFResult; cdecl; + + (** + * Sets the references of a beamset + * + * @param[in] pBeamSet - BeamSet instance. + * @param[in] nReferencesCount - Number of elements in buffer + * @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset + * @return error code or 0 (success) + *) + TLib3MFBeamSet_SetReferencesFunc = function(pBeamSet: TLib3MFHandle; const nReferencesCount: QWord; const pReferencesBuffer: PCardinal): TLib3MFResult; cdecl; + + (** + * Retrieves the references of a beamset + * + * @param[in] pBeamSet - BeamSet instance. + * @param[in] nReferencesCount - Number of elements in buffer + * @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. + * @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset + * @return error code or 0 (success) + *) + TLib3MFBeamSet_GetReferencesFunc = function(pBeamSet: TLib3MFHandle; const nReferencesCount: QWord; out pReferencesNeededCount: QWord; pReferencesBuffer: PCardinal): TLib3MFResult; cdecl; + + (** + * Retrieves the ball reference count of a beamset + * + * @param[in] pBeamSet - BeamSet instance. + * @param[out] pCount - returns the ball reference count + * @return error code or 0 (success) + *) + TLib3MFBeamSet_GetBallReferenceCountFunc = function(pBeamSet: TLib3MFHandle; out pCount: Cardinal): TLib3MFResult; cdecl; + + (** + * Sets the ball references of a beamset + * + * @param[in] pBeamSet - BeamSet instance. * @param[in] nBallReferencesCount - Number of elements in buffer * @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset * @return error code or 0 (success) @@ -2373,15 +3070,155 @@ TLib3MFModel = class; (************************************************************************************************************************* - Function type definitions for Attachment + Function type definitions for Image3D **************************************************************************************************************************) (** - * Retrieves an attachment's package path. This function will be removed in a later release. + * returns the name of this Image3D * - * @param[in] pAttachment - Attachment instance. - * @param[in] nPathBufferSize - size of the buffer (including trailing 0) - * @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[in] pImage3D - Image3D instance. + * @param[in] nNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pNameBuffer - buffer of the name of this Image3D, may be NULL + * @return error code or 0 (success) + *) + TLib3MFImage3D_GetNameFunc = function(pImage3D: TLib3MFHandle; const nNameBufferSize: Cardinal; out pNameNeededChars: Cardinal; pNameBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * sets a new name of this Image3D + * + * @param[in] pImage3D - Image3D instance. + * @param[in] pName - the new name of this Image3D + * @return error code or 0 (success) + *) + TLib3MFImage3D_SetNameFunc = function(pImage3D: TLib3MFHandle; const pName: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves, if this Image3D is a ImageStack + * + * @param[in] pImage3D - Image3D instance. + * @param[out] pIsImageStack - returns, whether the Image3D is an ImageStack + * @return error code or 0 (success) + *) + TLib3MFImage3D_IsImageStackFunc = function(pImage3D: TLib3MFHandle; out pIsImageStack: Byte): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for ImageStack +**************************************************************************************************************************) + + (** + * Retrieves the number of rows in each image of this image3d + * + * @param[in] pImageStack - ImageStack instance. + * @param[out] pRowCount - number of rows + * @return error code or 0 (success) + *) + TLib3MFImageStack_GetRowCountFunc = function(pImageStack: TLib3MFHandle; out pRowCount: Cardinal): TLib3MFResult; cdecl; + + (** + * Sets the number of rows in each image of this image3d + * + * @param[in] pImageStack - ImageStack instance. + * @param[in] nRowCount - number of rows + * @return error code or 0 (success) + *) + TLib3MFImageStack_SetRowCountFunc = function(pImageStack: TLib3MFHandle; const nRowCount: Cardinal): TLib3MFResult; cdecl; + + (** + * Retrieves the number of columns in each image of this image3d + * + * @param[in] pImageStack - ImageStack instance. + * @param[out] pColumnCount - number of columns + * @return error code or 0 (success) + *) + TLib3MFImageStack_GetColumnCountFunc = function(pImageStack: TLib3MFHandle; out pColumnCount: Cardinal): TLib3MFResult; cdecl; + + (** + * Sets the number of columns in each image of this image3d + * + * @param[in] pImageStack - ImageStack instance. + * @param[in] nColumnCount - number of columns + * @return error code or 0 (success) + *) + TLib3MFImageStack_SetColumnCountFunc = function(pImageStack: TLib3MFHandle; const nColumnCount: Cardinal): TLib3MFResult; cdecl; + + (** + * Retrieves the number of images in the stack. + * + * @param[in] pImageStack - ImageStack instance. + * @param[out] pSheetCount - number of images + * @return error code or 0 (success) + *) + TLib3MFImageStack_GetSheetCountFunc = function(pImageStack: TLib3MFHandle; out pSheetCount: Cardinal): TLib3MFResult; cdecl; + + (** + * Retrieves a sheet of the stack. Raises an error if sheet is not set. + * + * @param[in] pImageStack - ImageStack instance. + * @param[in] nIndex - index of the image (0-based) + * @param[out] pSheet - attachment containing the image + * @return error code or 0 (success) + *) + TLib3MFImageStack_GetSheetFunc = function(pImageStack: TLib3MFHandle; const nIndex: Cardinal; out pSheet: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sets a sheet to an existing attachment. + * + * @param[in] pImageStack - ImageStack instance. + * @param[in] nIndex - index of the image (0-based) + * @param[in] pSheet - attachment containing the image + * @return error code or 0 (success) + *) + TLib3MFImageStack_SetSheetFunc = function(pImageStack: TLib3MFHandle; const nIndex: Cardinal; const pSheet: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Creates a new sheet attachment with empty data. + * + * @param[in] pImageStack - ImageStack instance. + * @param[in] nIndex - index of the image (0-based) + * @param[in] pPath - path of part in the package + * @param[out] pSheet - attachment containing the image + * @return error code or 0 (success) + *) + TLib3MFImageStack_CreateEmptySheetFunc = function(pImageStack: TLib3MFHandle; const nIndex: Cardinal; const pPath: PAnsiChar; out pSheet: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Creates a new sheet attachment from a memory buffer. + * + * @param[in] pImageStack - ImageStack instance. + * @param[in] nIndex - index of the image (0-based) + * @param[in] pPath - path of part in the package + * @param[in] nDataCount - Number of elements in buffer + * @param[in] pDataBuffer - uint8 buffer of binary image data + * @param[out] pSheet - attachment containing the image + * @return error code or 0 (success) + *) + TLib3MFImageStack_CreateSheetFromBufferFunc = function(pImageStack: TLib3MFHandle; const nIndex: Cardinal; const pPath: PAnsiChar; const nDataCount: QWord; const pDataBuffer: PByte; out pSheet: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Creates a new sheet attachment from a file on disk. + * + * @param[in] pImageStack - ImageStack instance. + * @param[in] nIndex - index of the image (0-based) + * @param[in] pPath - path of part in the package + * @param[in] pFileName - file name to read from + * @param[out] pSheet - attachment containing the image + * @return error code or 0 (success) + *) + TLib3MFImageStack_CreateSheetFromFileFunc = function(pImageStack: TLib3MFHandle; const nIndex: Cardinal; const pPath: PAnsiChar; const pFileName: PAnsiChar; out pSheet: TLib3MFHandle): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for Attachment +**************************************************************************************************************************) + + (** + * Retrieves an attachment's package path. This function will be removed in a later release. + * + * @param[in] pAttachment - Attachment instance. + * @param[in] nPathBufferSize - size of the buffer (including trailing 0) + * @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. * @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL * @return error code or 0 (success) *) @@ -2566,2135 +3403,5308 @@ TLib3MFModel = class; (************************************************************************************************************************* - Function type definitions for BuildItem + Function type definitions for ImplicitPort **************************************************************************************************************************) (** - * Retrieves the object resource associated to a build item + * Retrieves the identifier of the port * - * @param[in] pBuildItem - BuildItem instance. - * @param[out] pObjectResource - returns the associated resource instance + * @param[in] pImplicitPort - ImplicitPort instance. + * @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) + * @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL * @return error code or 0 (success) *) - TLib3MFBuildItem_GetObjectResourceFunc = function(pBuildItem: TLib3MFHandle; out pObjectResource: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitPort_GetIdentifierFunc = function(pImplicitPort: TLib3MFHandle; const nIdentifierBufferSize: Cardinal; out pIdentifierNeededChars: Cardinal; pIdentifierBuffer: PAnsiChar): TLib3MFResult; cdecl; (** - * returns, whether a build item has a UUID and, if true, the build item's UUID + * Sets the identifier of the port * - * @param[in] pBuildItem - BuildItem instance. - * @param[out] pHasUUID - flag whether the build item has a UUID - * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) - * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL + * @param[in] pImplicitPort - ImplicitPort instance. + * @param[in] pIdentifier - the identifier * @return error code or 0 (success) *) - TLib3MFBuildItem_GetUUIDFunc = function(pBuildItem: TLib3MFHandle; out pHasUUID: Byte; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFImplicitPort_SetIdentifierFunc = function(pImplicitPort: TLib3MFHandle; const pIdentifier: PAnsiChar): TLib3MFResult; cdecl; (** - * sets the build item's UUID + * Retrieves the display name of the port * - * @param[in] pBuildItem - BuildItem instance. - * @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @param[in] pImplicitPort - ImplicitPort instance. + * @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL * @return error code or 0 (success) *) - TLib3MFBuildItem_SetUUIDFunc = function(pBuildItem: TLib3MFHandle; const pUUID: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFImplicitPort_GetDisplayNameFunc = function(pImplicitPort: TLib3MFHandle; const nDisplayNameBufferSize: Cardinal; out pDisplayNameNeededChars: Cardinal; pDisplayNameBuffer: PAnsiChar): TLib3MFResult; cdecl; (** - * Retrieves the object UniqueResourceID associated to a build item + * Sets the display name of the port * - * @param[in] pBuildItem - BuildItem instance. - * @param[out] pUniqueResourceID - returns the UniqueResourceID of the object + * @param[in] pImplicitPort - ImplicitPort instance. + * @param[in] pDisplayName - the display name * @return error code or 0 (success) *) - TLib3MFBuildItem_GetObjectResourceIDFunc = function(pBuildItem: TLib3MFHandle; out pUniqueResourceID: Cardinal): TLib3MFResult; cdecl; + TLib3MFImplicitPort_SetDisplayNameFunc = function(pImplicitPort: TLib3MFHandle; const pDisplayName: PAnsiChar): TLib3MFResult; cdecl; (** - * Checks, if a build item has a non-identity transformation matrix + * Sets the type of the port * - * @param[in] pBuildItem - BuildItem instance. - * @param[out] pHasTransform - returns true, if the transformation matrix is not the identity + * @param[in] pImplicitPort - ImplicitPort instance. + * @param[in] eImplicitPortType - the type * @return error code or 0 (success) *) - TLib3MFBuildItem_HasObjectTransformFunc = function(pBuildItem: TLib3MFHandle; out pHasTransform: Byte): TLib3MFResult; cdecl; + TLib3MFImplicitPort_SetTypeFunc = function(pImplicitPort: TLib3MFHandle; const eImplicitPortType: Integer): TLib3MFResult; cdecl; (** - * Retrieves a build item's transformation matrix. + * Retrieves the type of the port * - * @param[in] pBuildItem - BuildItem instance. - * @param[out] pTransform - returns the transformation matrix + * @param[in] pImplicitPort - ImplicitPort instance. + * @param[out] pImplicitPortType - the type * @return error code or 0 (success) *) - TLib3MFBuildItem_GetObjectTransformFunc = function(pBuildItem: TLib3MFHandle; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + TLib3MFImplicitPort_GetTypeFunc = function(pImplicitPort: TLib3MFHandle; out pImplicitPortType: Integer): TLib3MFResult; cdecl; (** - * Sets a build item's transformation matrix. + * Retrieves the reference of the port, only used for input ports * - * @param[in] pBuildItem - BuildItem instance. - * @param[in] pTransform - new transformation matrix + * @param[in] pImplicitPort - ImplicitPort instance. + * @param[in] nReferenceBufferSize - size of the buffer (including trailing 0) + * @param[out] pReferenceNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pReferenceBuffer - buffer of the reference, may be NULL * @return error code or 0 (success) *) - TLib3MFBuildItem_SetObjectTransformFunc = function(pBuildItem: TLib3MFHandle; const pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + TLib3MFImplicitPort_GetReferenceFunc = function(pImplicitPort: TLib3MFHandle; const nReferenceBufferSize: Cardinal; out pReferenceNeededChars: Cardinal; pReferenceBuffer: PAnsiChar): TLib3MFResult; cdecl; (** - * Retrieves a build item's part number string + * Sets the reference of the port, only used for input ports * - * @param[in] pBuildItem - BuildItem instance. - * @param[in] nPartNumberBufferSize - size of the buffer (including trailing 0) - * @param[out] pPartNumberNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pPartNumberBuffer - buffer of Returns a build item's part number string, may be NULL + * @param[in] pImplicitPort - ImplicitPort instance. + * @param[in] pReference - the reference * @return error code or 0 (success) *) - TLib3MFBuildItem_GetPartNumberFunc = function(pBuildItem: TLib3MFHandle; const nPartNumberBufferSize: Cardinal; out pPartNumberNeededChars: Cardinal; pPartNumberBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFImplicitPort_SetReferenceFunc = function(pImplicitPort: TLib3MFHandle; const pReference: PAnsiChar): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for Iterator +**************************************************************************************************************************) + (** - * Sets a build item's part number string + * Iterates to the next item in the list. * - * @param[in] pBuildItem - BuildItem instance. - * @param[in] pSetPartnumber - new part number string for referencing parts from the outside world + * @param[in] pIterator - Iterator instance. + * @param[out] pHasNext - Iterates to the next item in the list. * @return error code or 0 (success) *) - TLib3MFBuildItem_SetPartNumberFunc = function(pBuildItem: TLib3MFHandle; const pSetPartnumber: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFIterator_MoveNextFunc = function(pIterator: TLib3MFHandle; out pHasNext: Byte): TLib3MFResult; cdecl; (** - * Returns the metadatagroup of this build item + * Iterates to the previous item in the list. * - * @param[in] pBuildItem - BuildItem instance. - * @param[out] pMetaDataGroup - returns an Instance of the metadatagroup of this build item + * @param[in] pIterator - Iterator instance. + * @param[out] pHasPrevious - Iterates to the previous item in the list. * @return error code or 0 (success) *) - TLib3MFBuildItem_GetMetaDataGroupFunc = function(pBuildItem: TLib3MFHandle; out pMetaDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFIterator_MovePreviousFunc = function(pIterator: TLib3MFHandle; out pHasPrevious: Byte): TLib3MFResult; cdecl; (** - * Returns the outbox of a build item + * Returns the number of items the iterator captures. * - * @param[in] pBuildItem - BuildItem instance. - * @param[out] pOutbox - Outbox of this build item + * @param[in] pIterator - Iterator instance. + * @param[out] pCount - returns the number of items the iterator captures. * @return error code or 0 (success) *) - TLib3MFBuildItem_GetOutboxFunc = function(pBuildItem: TLib3MFHandle; pOutbox: PLib3MFBox): TLib3MFResult; cdecl; + TLib3MFIterator_CountFunc = function(pIterator: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; (************************************************************************************************************************* - Function type definitions for BuildItemIterator + Function type definitions for ImplicitPortIterator **************************************************************************************************************************) (** - * Iterates to the next build item in the list. - * - * @param[in] pBuildItemIterator - BuildItemIterator instance. - * @param[out] pHasNext - Iterates to the next build item in the list. - * @return error code or 0 (success) - *) - TLib3MFBuildItemIterator_MoveNextFunc = function(pBuildItemIterator: TLib3MFHandle; out pHasNext: Byte): TLib3MFResult; cdecl; - - (** - * Iterates to the previous build item in the list. - * - * @param[in] pBuildItemIterator - BuildItemIterator instance. - * @param[out] pHasPrevious - Iterates to the previous build item in the list. - * @return error code or 0 (success) - *) - TLib3MFBuildItemIterator_MovePreviousFunc = function(pBuildItemIterator: TLib3MFHandle; out pHasPrevious: Byte): TLib3MFResult; cdecl; - - (** - * Returns the build item the iterator points at. + * Returns the current element * - * @param[in] pBuildItemIterator - BuildItemIterator instance. - * @param[out] pBuildItem - returns the build item instance. + * @param[in] pImplicitPortIterator - ImplicitPortIterator instance. + * @param[out] pPort - The current element * @return error code or 0 (success) *) - TLib3MFBuildItemIterator_GetCurrentFunc = function(pBuildItemIterator: TLib3MFHandle; out pBuildItem: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitPortIterator_GetCurrentFunc = function(pImplicitPortIterator: TLib3MFHandle; out pPort: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for ImplicitNode +**************************************************************************************************************************) + (** - * Creates a new build item iterator with the same build item list. + * Retrieves the identifier of the node * - * @param[in] pBuildItemIterator - BuildItemIterator instance. - * @param[out] pOutBuildItemIterator - returns the cloned Iterator instance + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) + * @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL * @return error code or 0 (success) *) - TLib3MFBuildItemIterator_CloneFunc = function(pBuildItemIterator: TLib3MFHandle; out pOutBuildItemIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitNode_GetIdentifierFunc = function(pImplicitNode: TLib3MFHandle; const nIdentifierBufferSize: Cardinal; out pIdentifierNeededChars: Cardinal; pIdentifierBuffer: PAnsiChar): TLib3MFResult; cdecl; (** - * Returns the number of build items the iterator captures. + * Sets the identifier of the node * - * @param[in] pBuildItemIterator - BuildItemIterator instance. - * @param[out] pCount - returns the number of build items the iterator captures. + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[in] pIdentifier - the identifier * @return error code or 0 (success) *) - TLib3MFBuildItemIterator_CountFunc = function(pBuildItemIterator: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + TLib3MFImplicitNode_SetIdentifierFunc = function(pImplicitNode: TLib3MFHandle; const pIdentifier: PAnsiChar): TLib3MFResult; cdecl; - -(************************************************************************************************************************* - Function type definitions for Slice -**************************************************************************************************************************) - (** - * Set all vertices of a slice. All polygons will be cleared. + * Retrieves the display name of the node * - * @param[in] pSlice - Slice instance. - * @param[in] nVerticesCount - Number of elements in buffer - * @param[in] pVerticesBuffer - Position2D buffer of contains the positions. + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL * @return error code or 0 (success) *) - TLib3MFSlice_SetVerticesFunc = function(pSlice: TLib3MFHandle; const nVerticesCount: QWord; const pVerticesBuffer: PLib3MFPosition2D): TLib3MFResult; cdecl; + TLib3MFImplicitNode_GetDisplayNameFunc = function(pImplicitNode: TLib3MFHandle; const nDisplayNameBufferSize: Cardinal; out pDisplayNameNeededChars: Cardinal; pDisplayNameBuffer: PAnsiChar): TLib3MFResult; cdecl; (** - * Get all vertices of a slice + * Sets the display name of the node * - * @param[in] pSlice - Slice instance. - * @param[in] nVerticesCount - Number of elements in buffer - * @param[out] pVerticesNeededCount - will be filled with the count of the written elements, or needed buffer size. - * @param[out] pVerticesBuffer - Position2D buffer of contains the positions. + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[in] pDisplayName - the display name * @return error code or 0 (success) *) - TLib3MFSlice_GetVerticesFunc = function(pSlice: TLib3MFHandle; const nVerticesCount: QWord; out pVerticesNeededCount: QWord; pVerticesBuffer: PLib3MFPosition2D): TLib3MFResult; cdecl; + TLib3MFImplicitNode_SetDisplayNameFunc = function(pImplicitNode: TLib3MFHandle; const pDisplayName: PAnsiChar): TLib3MFResult; cdecl; (** - * Get the number of vertices in a slice + * Retrieves the tag of the node * - * @param[in] pSlice - Slice instance. - * @param[out] pCount - the number of vertices in the slice + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[in] nTagBufferSize - size of the buffer (including trailing 0) + * @param[out] pTagNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pTagBuffer - buffer of the tag, may be NULL * @return error code or 0 (success) *) - TLib3MFSlice_GetVertexCountFunc = function(pSlice: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + TLib3MFImplicitNode_GetTagFunc = function(pImplicitNode: TLib3MFHandle; const nTagBufferSize: Cardinal; out pTagNeededChars: Cardinal; pTagBuffer: PAnsiChar): TLib3MFResult; cdecl; (** - * Add a new polygon to this slice + * Sets the tag of the node * - * @param[in] pSlice - Slice instance. - * @param[in] nIndicesCount - Number of elements in buffer - * @param[in] pIndicesBuffer - uint32 buffer of the new indices of the new polygon - * @param[out] pIndex - the index of the new polygon + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[in] pTag - the tag * @return error code or 0 (success) *) - TLib3MFSlice_AddPolygonFunc = function(pSlice: TLib3MFHandle; const nIndicesCount: QWord; const pIndicesBuffer: PCardinal; out pIndex: QWord): TLib3MFResult; cdecl; + TLib3MFImplicitNode_SetTagFunc = function(pImplicitNode: TLib3MFHandle; const pTag: PAnsiChar): TLib3MFResult; cdecl; (** - * Get the number of polygons in the slice + * Retrieves the type of the node * - * @param[in] pSlice - Slice instance. - * @param[out] pCount - the number of polygons in the slice + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[out] pType - the type of the node * @return error code or 0 (success) *) - TLib3MFSlice_GetPolygonCountFunc = function(pSlice: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + TLib3MFImplicitNode_GetNodeTypeFunc = function(pImplicitNode: TLib3MFHandle; out pType: Integer): TLib3MFResult; cdecl; (** - * Set all indices of a polygon + * Add an input * - * @param[in] pSlice - Slice instance. - * @param[in] nIndex - the index of the polygon to manipulate - * @param[in] nIndicesCount - Number of elements in buffer - * @param[in] pIndicesBuffer - uint32 buffer of the new indices of the index-th polygon + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[in] pIdentifier - the identifier of the input + * @param[in] pDisplayName - the display name of the input + * @param[out] pPort - * @return error code or 0 (success) *) - TLib3MFSlice_SetPolygonIndicesFunc = function(pSlice: TLib3MFHandle; const nIndex: QWord; const nIndicesCount: QWord; const pIndicesBuffer: PCardinal): TLib3MFResult; cdecl; + TLib3MFImplicitNode_AddInputFunc = function(pImplicitNode: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; out pPort: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Get all vertices of a slice + * Retrieves the inputs * - * @param[in] pSlice - Slice instance. - * @param[in] nIndex - the index of the polygon to manipulate - * @param[in] nIndicesCount - Number of elements in buffer - * @param[out] pIndicesNeededCount - will be filled with the count of the written elements, or needed buffer size. - * @param[out] pIndicesBuffer - uint32 buffer of the indices of the index-th polygon + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[out] pIterator - the iterator for the inputs * @return error code or 0 (success) *) - TLib3MFSlice_GetPolygonIndicesFunc = function(pSlice: TLib3MFHandle; const nIndex: QWord; const nIndicesCount: QWord; out pIndicesNeededCount: QWord; pIndicesBuffer: PCardinal): TLib3MFResult; cdecl; + TLib3MFImplicitNode_GetInputsFunc = function(pImplicitNode: TLib3MFHandle; out pIterator: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Get the number of vertices in a slice + * Add an output * - * @param[in] pSlice - Slice instance. - * @param[in] nIndex - the index of the polygon to manipulate - * @param[out] pCount - the number of indices of the index-th polygon + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[in] pIdentifier - the identifier of the output + * @param[in] pDisplayName - the display name of the output + * @param[out] pPort - * @return error code or 0 (success) *) - TLib3MFSlice_GetPolygonIndexCountFunc = function(pSlice: TLib3MFHandle; const nIndex: QWord; out pCount: QWord): TLib3MFResult; cdecl; + TLib3MFImplicitNode_AddOutputFunc = function(pImplicitNode: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; out pPort: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Get the upper Z-Coordinate of this slice. + * Retrieves the outputs * - * @param[in] pSlice - Slice instance. - * @param[out] pZTop - the upper Z-Coordinate of this slice + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[out] pIterator - the iterator the outputs * @return error code or 0 (success) *) - TLib3MFSlice_GetZTopFunc = function(pSlice: TLib3MFHandle; out pZTop: Double): TLib3MFResult; cdecl; + TLib3MFImplicitNode_GetOutputsFunc = function(pImplicitNode: TLib3MFHandle; out pIterator: TLib3MFHandle): TLib3MFResult; cdecl; - -(************************************************************************************************************************* - Function type definitions for SliceStack -**************************************************************************************************************************) - (** - * Get the lower Z-Coordinate of the slice stack. + * Retrieves an input * - * @param[in] pSliceStack - SliceStack instance. - * @param[out] pZBottom - the lower Z-Coordinate the slice stack + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[in] pIdentifier - the identifier of the input + * @param[out] pInput - the input port * @return error code or 0 (success) *) - TLib3MFSliceStack_GetBottomZFunc = function(pSliceStack: TLib3MFHandle; out pZBottom: Double): TLib3MFResult; cdecl; + TLib3MFImplicitNode_FindInputFunc = function(pImplicitNode: TLib3MFHandle; const pIdentifier: PAnsiChar; out pInput: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Returns the number of slices + * Retrieves an output * - * @param[in] pSliceStack - SliceStack instance. - * @param[out] pCount - the number of slices + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[in] pIdentifier - the identifier of the output + * @param[out] pOutput - the output port * @return error code or 0 (success) *) - TLib3MFSliceStack_GetSliceCountFunc = function(pSliceStack: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + TLib3MFImplicitNode_FindOutputFunc = function(pImplicitNode: TLib3MFHandle; const pIdentifier: PAnsiChar; out pOutput: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Query a slice from the slice stack + * Checks if the types of the input and output ports are valid for the node type * - * @param[in] pSliceStack - SliceStack instance. - * @param[in] nSliceIndex - the index of the slice - * @param[out] pTheSlice - the Slice instance + * @param[in] pImplicitNode - ImplicitNode instance. + * @param[out] pValid - true, if the types are valid * @return error code or 0 (success) *) - TLib3MFSliceStack_GetSliceFunc = function(pSliceStack: TLib3MFHandle; const nSliceIndex: QWord; out pTheSlice: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitNode_AreTypesValidFunc = function(pImplicitNode: TLib3MFHandle; out pValid: Byte): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for OneInputNode +**************************************************************************************************************************) + (** - * Returns the number of slices + * Retrieves the input * - * @param[in] pSliceStack - SliceStack instance. - * @param[in] dZTop - upper Z coordinate of the slice - * @param[out] pTheSlice - a new Slice instance + * @param[in] pOneInputNode - OneInputNode instance. + * @param[out] pInput - the input * @return error code or 0 (success) *) - TLib3MFSliceStack_AddSliceFunc = function(pSliceStack: TLib3MFHandle; const dZTop: Double; out pTheSlice: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFOneInputNode_GetInputAFunc = function(pOneInputNode: TLib3MFHandle; out pInput: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Returns the number of slice refs + * Retrieves the output * - * @param[in] pSliceStack - SliceStack instance. - * @param[out] pCount - the number of slicereferences + * @param[in] pOneInputNode - OneInputNode instance. + * @param[out] pResult - the output * @return error code or 0 (success) *) - TLib3MFSliceStack_GetSliceRefCountFunc = function(pSliceStack: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + TLib3MFOneInputNode_GetOutputResultFunc = function(pOneInputNode: TLib3MFHandle; out pResult: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for SinNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for CosNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for TanNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for ArcSinNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for ArcCosNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for ArcTanNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for SinhNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for CoshNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for TanhNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for RoundNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for CeilNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for FloorNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for SignNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for FractNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for AbsNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for ExpNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for LogNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for Log2Node +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for Log10Node +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for LengthNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for TransposeNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for InverseNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for SqrtNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for ResourceIdNode +**************************************************************************************************************************) + (** - * Adds another existing slicestack as sliceref in this slicestack + * Sets the Resource that the resourceid attribute of the node will point to * - * @param[in] pSliceStack - SliceStack instance. - * @param[in] pTheSliceStack - the slicestack to use as sliceref + * @param[in] pResourceIdNode - ResourceIdNode instance. + * @param[in] pResource - the resource * @return error code or 0 (success) *) - TLib3MFSliceStack_AddSliceStackReferenceFunc = function(pSliceStack: TLib3MFHandle; const pTheSliceStack: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFResourceIdNode_SetResourceFunc = function(pResourceIdNode: TLib3MFHandle; const pResource: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Adds another existing slicestack as sliceref in this slicestack + * Retrieves the resource of the node * - * @param[in] pSliceStack - SliceStack instance. - * @param[in] nSliceRefIndex - the index of the slice ref - * @param[out] pTheSliceStack - the slicestack that is used as sliceref + * @param[in] pResourceIdNode - ResourceIdNode instance. + * @param[out] pResource - the resource * @return error code or 0 (success) *) - TLib3MFSliceStack_GetSliceStackReferenceFunc = function(pSliceStack: TLib3MFHandle; const nSliceRefIndex: QWord; out pTheSliceStack: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFResourceIdNode_GetResourceFunc = function(pResourceIdNode: TLib3MFHandle; out pResource: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Removes the indirection of slices via slice-refs, i.e. creates the slices of all slice refs of this SliceStack as actual slices of this SliceStack. All previously existing slices or slicerefs will be removed. + * Retrieves the output * - * @param[in] pSliceStack - SliceStack instance. + * @param[in] pResourceIdNode - ResourceIdNode instance. + * @param[out] pValue - the output * @return error code or 0 (success) *) - TLib3MFSliceStack_CollapseSliceReferencesFunc = function(pSliceStack: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFResourceIdNode_GetOutputValueFunc = function(pResourceIdNode: TLib3MFHandle; out pValue: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for TwoInputNode +**************************************************************************************************************************) + (** - * Sets the package path where this Slice should be stored. Input an empty string to reset the path + * Retrieves the second input * - * @param[in] pSliceStack - SliceStack instance. - * @param[in] pPath - the package path where this Slice should be stored + * @param[in] pTwoInputNode - TwoInputNode instance. + * @param[out] pB - the second input * @return error code or 0 (success) *) - TLib3MFSliceStack_SetOwnPathFunc = function(pSliceStack: TLib3MFHandle; const pPath: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFTwoInputNode_GetInputBFunc = function(pTwoInputNode: TLib3MFHandle; out pB: TLib3MFHandle): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Function type definitions for AdditionNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for SubtractionNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for MultiplicationNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for DivisionNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for DotNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for CrossNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for ArcTan2Node +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for MatVecMultiplicationNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for MinNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for MaxNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for FmodNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for ModNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for PowNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for SelectNode +**************************************************************************************************************************) + + (** + * Retrieves the second input + * + * @param[in] pSelectNode - SelectNode instance. + * @param[out] pB - the second input + * @return error code or 0 (success) + *) + TLib3MFSelectNode_GetInputBFunc = function(pSelectNode: TLib3MFHandle; out pB: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Obtains the package path where this Slice should be stored. Returns an empty string if the slicestack is stored within the root model. + * Retrieves the third input * - * @param[in] pSliceStack - SliceStack instance. - * @param[in] nPathBufferSize - size of the buffer (including trailing 0) - * @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pPathBuffer - buffer of the package path where this Slice will be stored, may be NULL + * @param[in] pSelectNode - SelectNode instance. + * @param[out] pC - the third input * @return error code or 0 (success) *) - TLib3MFSliceStack_GetOwnPathFunc = function(pSliceStack: TLib3MFHandle; const nPathBufferSize: Cardinal; out pPathNeededChars: Cardinal; pPathBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFSelectNode_GetInputCFunc = function(pSelectNode: TLib3MFHandle; out pC: TLib3MFHandle): TLib3MFResult; cdecl; - -(************************************************************************************************************************* - Function type definitions for Consumer -**************************************************************************************************************************) - (** - * Gets the consumerid + * Retrieves the fourth input * - * @param[in] pConsumer - Consumer instance. - * @param[in] nConsumerIDBufferSize - size of the buffer (including trailing 0) - * @param[out] pConsumerIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pConsumerIDBuffer - buffer of A unique identifier for the consumers, may be NULL + * @param[in] pSelectNode - SelectNode instance. + * @param[out] pD - the fourth input * @return error code or 0 (success) *) - TLib3MFConsumer_GetConsumerIDFunc = function(pConsumer: TLib3MFHandle; const nConsumerIDBufferSize: Cardinal; out pConsumerIDNeededChars: Cardinal; pConsumerIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFSelectNode_GetInputDFunc = function(pSelectNode: TLib3MFHandle; out pD: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for ClampNode +**************************************************************************************************************************) + (** - * Getts the keyid + * Retrieves the input for the lower limit * - * @param[in] pConsumer - Consumer instance. - * @param[in] nKeyIDBufferSize - size of the buffer (including trailing 0) - * @param[out] pKeyIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pKeyIDBuffer - buffer of The identifier for the key of this consumer, may be NULL + * @param[in] pClampNode - ClampNode instance. + * @param[out] pMin - the input for the lower limit * @return error code or 0 (success) *) - TLib3MFConsumer_GetKeyIDFunc = function(pConsumer: TLib3MFHandle; const nKeyIDBufferSize: Cardinal; out pKeyIDNeededChars: Cardinal; pKeyIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFClampNode_GetInputMinFunc = function(pClampNode: TLib3MFHandle; out pMin: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets the keyvalue associated with this consumer + * Retrieves the input for the upper limit * - * @param[in] pConsumer - Consumer instance. - * @param[in] nKeyValueBufferSize - size of the buffer (including trailing 0) - * @param[out] pKeyValueNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pKeyValueBuffer - buffer of The public key, when available, of this consumer, may be NULL + * @param[in] pClampNode - ClampNode instance. + * @param[out] pMax - the input for the upper limit * @return error code or 0 (success) *) - TLib3MFConsumer_GetKeyValueFunc = function(pConsumer: TLib3MFHandle; const nKeyValueBufferSize: Cardinal; out pKeyValueNeededChars: Cardinal; pKeyValueBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFClampNode_GetInputMaxFunc = function(pClampNode: TLib3MFHandle; out pMax: TLib3MFHandle): TLib3MFResult; cdecl; (************************************************************************************************************************* - Function type definitions for AccessRight + Function type definitions for ComposeVectorNode **************************************************************************************************************************) (** - * Gets the consumer associated with this access right + * Retrieves the input for the x component * - * @param[in] pAccessRight - AccessRight instance. - * @param[out] pConsumer - The consumer instance + * @param[in] pComposeVectorNode - ComposeVectorNode instance. + * @param[out] pX - the input for the x component * @return error code or 0 (success) *) - TLib3MFAccessRight_GetConsumerFunc = function(pAccessRight: TLib3MFHandle; out pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFComposeVectorNode_GetInputXFunc = function(pComposeVectorNode: TLib3MFHandle; out pX: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets the associated encryption algorithm + * Retrieves the input for the y component * - * @param[in] pAccessRight - AccessRight instance. - * @param[out] pAlgorithm - The algorithm used for the key in this accessright + * @param[in] pComposeVectorNode - ComposeVectorNode instance. + * @param[out] pY - the input for the y component * @return error code or 0 (success) *) - TLib3MFAccessRight_GetWrappingAlgorithmFunc = function(pAccessRight: TLib3MFHandle; out pAlgorithm: Integer): TLib3MFResult; cdecl; + TLib3MFComposeVectorNode_GetInputYFunc = function(pComposeVectorNode: TLib3MFHandle; out pY: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets the associated mask generation function algorithm + * Retrieves the input for the z component * - * @param[in] pAccessRight - AccessRight instance. - * @param[out] pAlgorithm - The MFG1 algorithm + * @param[in] pComposeVectorNode - ComposeVectorNode instance. + * @param[out] pZ - the input for the z component * @return error code or 0 (success) *) - TLib3MFAccessRight_GetMgfAlgorithmFunc = function(pAccessRight: TLib3MFHandle; out pAlgorithm: Integer): TLib3MFResult; cdecl; + TLib3MFComposeVectorNode_GetInputZFunc = function(pComposeVectorNode: TLib3MFHandle; out pZ: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets the digest method assoicated + * Retrieves the output * - * @param[in] pAccessRight - AccessRight instance. - * @param[out] pAlgorithm - The digest method for this accessright + * @param[in] pComposeVectorNode - ComposeVectorNode instance. + * @param[out] pResult - the output * @return error code or 0 (success) *) - TLib3MFAccessRight_GetDigestMethodFunc = function(pAccessRight: TLib3MFHandle; out pAlgorithm: Integer): TLib3MFResult; cdecl; + TLib3MFComposeVectorNode_GetOutputResultFunc = function(pComposeVectorNode: TLib3MFHandle; out pResult: TLib3MFHandle): TLib3MFResult; cdecl; (************************************************************************************************************************* - Function type definitions for ContentEncryptionParams + Function type definitions for VectorFromScalarNode +**************************************************************************************************************************) + + +(************************************************************************************************************************* + Function type definitions for DecomposeVectorNode **************************************************************************************************************************) (** - * Returns the encryption method to be used in this encryption process + * Retrieves the input * - * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. - * @param[out] pAlgorithm - + * @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. + * @param[out] pA - the input port for the vector to decompose * @return error code or 0 (success) *) - TLib3MFContentEncryptionParams_GetEncryptionAlgorithmFunc = function(pContentEncryptionParams: TLib3MFHandle; out pAlgorithm: Integer): TLib3MFResult; cdecl; + TLib3MFDecomposeVectorNode_GetInputAFunc = function(pDecomposeVectorNode: TLib3MFHandle; out pA: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets the key for the resource associated + * Retrieves the output for the x component * - * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. - * @param[in] nByteDataCount - Number of elements in buffer - * @param[out] pByteDataNeededCount - will be filled with the count of the written elements, or needed buffer size. - * @param[out] pByteDataBuffer - uint8 buffer of Pointer to a buffer where to place the key. + * @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. + * @param[out] pX - the output for the x component * @return error code or 0 (success) *) - TLib3MFContentEncryptionParams_GetKeyFunc = function(pContentEncryptionParams: TLib3MFHandle; const nByteDataCount: QWord; out pByteDataNeededCount: QWord; pByteDataBuffer: PByte): TLib3MFResult; cdecl; + TLib3MFDecomposeVectorNode_GetOutputXFunc = function(pDecomposeVectorNode: TLib3MFHandle; out pX: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets the IV data + * Retrieves the output for the y component * - * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. - * @param[in] nByteDataCount - Number of elements in buffer - * @param[out] pByteDataNeededCount - will be filled with the count of the written elements, or needed buffer size. - * @param[out] pByteDataBuffer - uint8 buffer of Pointer to a buffer where to place the data. + * @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. + * @param[out] pY - the output for the y component * @return error code or 0 (success) *) - TLib3MFContentEncryptionParams_GetInitializationVectorFunc = function(pContentEncryptionParams: TLib3MFHandle; const nByteDataCount: QWord; out pByteDataNeededCount: QWord; pByteDataBuffer: PByte): TLib3MFResult; cdecl; + TLib3MFDecomposeVectorNode_GetOutputYFunc = function(pDecomposeVectorNode: TLib3MFHandle; out pY: TLib3MFHandle): TLib3MFResult; cdecl; (** - * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * Retrieves the output for the z component * - * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. - * @param[in] nByteDataCount - Number of elements in buffer - * @param[out] pByteDataNeededCount - will be filled with the count of the written elements, or needed buffer size. - * @param[out] pByteDataBuffer - uint8 buffer of Pointer to a buffer where to place the data. + * @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. + * @param[out] pZ - the output for the z component * @return error code or 0 (success) *) - TLib3MFContentEncryptionParams_GetAuthenticationTagFunc = function(pContentEncryptionParams: TLib3MFHandle; const nByteDataCount: QWord; out pByteDataNeededCount: QWord; pByteDataBuffer: PByte): TLib3MFResult; cdecl; + TLib3MFDecomposeVectorNode_GetOutputZFunc = function(pDecomposeVectorNode: TLib3MFHandle; out pZ: TLib3MFHandle): TLib3MFResult; cdecl; - (** - * Sets the authentication tag + +(************************************************************************************************************************* + Function type definitions for ComposeMatrixNode +**************************************************************************************************************************) + + (** + * Retrieves the input for the element 0 0 * - * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. - * @param[in] nByteDataCount - Number of elements in buffer - * @param[in] pByteDataBuffer - uint8 buffer of The authentication tag size + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM00 - the input for the m00 element * @return error code or 0 (success) *) - TLib3MFContentEncryptionParams_SetAuthenticationTagFunc = function(pContentEncryptionParams: TLib3MFHandle; const nByteDataCount: QWord; const pByteDataBuffer: PByte): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM00Func = function(pComposeMatrixNode: TLib3MFHandle; out pM00: TLib3MFHandle): TLib3MFResult; cdecl; (** - * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * Retrieves the input for the element 0 1 * - * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. - * @param[in] nByteDataCount - Number of elements in buffer - * @param[out] pByteDataNeededCount - will be filled with the count of the written elements, or needed buffer size. - * @param[out] pByteDataBuffer - uint8 buffer of Buffer where the data will be placed + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM01 - the input for the m01 element * @return error code or 0 (success) *) - TLib3MFContentEncryptionParams_GetAdditionalAuthenticationDataFunc = function(pContentEncryptionParams: TLib3MFHandle; const nByteDataCount: QWord; out pByteDataNeededCount: QWord; pByteDataBuffer: PByte): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM01Func = function(pComposeMatrixNode: TLib3MFHandle; out pM01: TLib3MFHandle): TLib3MFResult; cdecl; (** - * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * Retrieves the input for the element 0 2 * - * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. - * @param[out] pDescriptor - + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM02 - the input for the m02 element * @return error code or 0 (success) *) - TLib3MFContentEncryptionParams_GetDescriptorFunc = function(pContentEncryptionParams: TLib3MFHandle; out pDescriptor: QWord): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM02Func = function(pComposeMatrixNode: TLib3MFHandle; out pM02: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets the resourcedatagroup keyuuid + * Retrieves the input for the element 0 3 * - * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. - * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) - * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pUUIDBuffer - buffer of The resourcedatagroup keyuuid that may be use to reference an external key, may be NULL + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM03 - the input for the m03 element * @return error code or 0 (success) *) - TLib3MFContentEncryptionParams_GetKeyUUIDFunc = function(pContentEncryptionParams: TLib3MFHandle; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM03Func = function(pComposeMatrixNode: TLib3MFHandle; out pM03: TLib3MFHandle): TLib3MFResult; cdecl; - -(************************************************************************************************************************* - Function type definitions for ResourceData -**************************************************************************************************************************) - (** - * Gets the encrypted part path + * Retrieves the input for the element 1 0 * - * @param[in] pResourceData - ResourceData instance. - * @param[out] pPath - The part path + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM10 - the input for the m10 element * @return error code or 0 (success) *) - TLib3MFResourceData_GetPathFunc = function(pResourceData: TLib3MFHandle; out pPath: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM10Func = function(pComposeMatrixNode: TLib3MFHandle; out pM10: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets the encryption algorithm used to encrypt this ResourceData + * Retrieves the input for the element 1 1 * - * @param[in] pResourceData - ResourceData instance. - * @param[out] pEncryptionAlgorithm - The encryption algorithm + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM11 - the input for the m11 element * @return error code or 0 (success) *) - TLib3MFResourceData_GetEncryptionAlgorithmFunc = function(pResourceData: TLib3MFHandle; out pEncryptionAlgorithm: Integer): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM11Func = function(pComposeMatrixNode: TLib3MFHandle; out pM11: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Tells whether this ResourceData is compressed or not + * Retrieves the input for the element 1 2 * - * @param[in] pResourceData - ResourceData instance. - * @param[out] pCompression - The compression method + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM12 - the input for the m12 element * @return error code or 0 (success) *) - TLib3MFResourceData_GetCompressionFunc = function(pResourceData: TLib3MFHandle; out pCompression: Integer): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM12Func = function(pComposeMatrixNode: TLib3MFHandle; out pM12: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Tells whether this ResourceData is compressed or not + * Retrieves the input for the element 1 3 * - * @param[in] pResourceData - ResourceData instance. - * @param[in] nByteDataCount - Number of elements in buffer - * @param[out] pByteDataNeededCount - will be filled with the count of the written elements, or needed buffer size. - * @param[out] pByteDataBuffer - uint8 buffer of The compression method + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM13 - the input for the m3 element * @return error code or 0 (success) *) - TLib3MFResourceData_GetAdditionalAuthenticationDataFunc = function(pResourceData: TLib3MFHandle; const nByteDataCount: QWord; out pByteDataNeededCount: QWord; pByteDataBuffer: PByte): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM13Func = function(pComposeMatrixNode: TLib3MFHandle; out pM13: TLib3MFHandle): TLib3MFResult; cdecl; - -(************************************************************************************************************************* - Function type definitions for ResourceDataGroup -**************************************************************************************************************************) - (** - * Sets the resourcedatagroup keyuuid + * Retrieves the input for the element 2 0 * - * @param[in] pResourceDataGroup - ResourceDataGroup instance. - * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) - * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pUUIDBuffer - buffer of The new resourcedatagroup keyuuid., may be NULL + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM20 - the input for the m2 element * @return error code or 0 (success) *) - TLib3MFResourceDataGroup_GetKeyUUIDFunc = function(pResourceDataGroup: TLib3MFHandle; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM20Func = function(pComposeMatrixNode: TLib3MFHandle; out pM20: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Add accessright to resourcedatagroup element + * Retrieves the input for the element 2 1 * - * @param[in] pResourceDataGroup - ResourceDataGroup instance. - * @param[in] pConsumer - The Consumer reference - * @param[in] eWrappingAlgorithm - The key wrapping algorithm to be used - * @param[in] eMgfAlgorithm - The mask generation function to be used - * @param[in] eDigestMethod - The digest mechanism to be used - * @param[out] pTheAccessRight - The acess right instance + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM21 - * @return error code or 0 (success) *) - TLib3MFResourceDataGroup_AddAccessRightFunc = function(pResourceDataGroup: TLib3MFHandle; const pConsumer: TLib3MFHandle; const eWrappingAlgorithm: Integer; const eMgfAlgorithm: Integer; const eDigestMethod: Integer; out pTheAccessRight: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM21Func = function(pComposeMatrixNode: TLib3MFHandle; out pM21: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Finds the AccessRight associated with a Consumer + * Retrieves the input for the element 2 2 * - * @param[in] pResourceDataGroup - ResourceDataGroup instance. - * @param[in] pConsumer - The Consumer instance - * @param[out] pTheAccessRight - The AcessRight instance + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM22 - the input for the m22 element * @return error code or 0 (success) *) - TLib3MFResourceDataGroup_FindAccessRightByConsumerFunc = function(pResourceDataGroup: TLib3MFHandle; const pConsumer: TLib3MFHandle; out pTheAccessRight: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM22Func = function(pComposeMatrixNode: TLib3MFHandle; out pM22: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Removes access from a Consumer on this resource data group + * Retrieves the input for the element 2 3 * - * @param[in] pResourceDataGroup - ResourceDataGroup instance. - * @param[in] pConsumer - The Consumer instance + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM23 - the input for the m23 element * @return error code or 0 (success) *) - TLib3MFResourceDataGroup_RemoveAccessRightFunc = function(pResourceDataGroup: TLib3MFHandle; const pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM23Func = function(pComposeMatrixNode: TLib3MFHandle; out pM23: TLib3MFHandle): TLib3MFResult; cdecl; - -(************************************************************************************************************************* - Function type definitions for KeyStore -**************************************************************************************************************************) - (** - * Adds a consumer to the keystore + * Retrieves the input for the element 3 0 * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] pConsumerID - A unique identifier for the consumer - * @param[in] pKeyID - The id of the key of the consumer - * @param[in] pKeyValue - The public key for this consumer in PEM format - * @param[out] pConsumer - The consumer instance + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM30 - the input for the m30 element * @return error code or 0 (success) *) - TLib3MFKeyStore_AddConsumerFunc = function(pKeyStore: TLib3MFHandle; const pConsumerID: PAnsiChar; const pKeyID: PAnsiChar; const pKeyValue: PAnsiChar; out pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM30Func = function(pComposeMatrixNode: TLib3MFHandle; out pM30: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets the number of consumers in the keystore + * Retrieves the input for the element 3 1 * - * @param[in] pKeyStore - KeyStore instance. - * @param[out] pCount - The consumer count + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM31 - the input for the m31 element * @return error code or 0 (success) *) - TLib3MFKeyStore_GetConsumerCountFunc = function(pKeyStore: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM31Func = function(pComposeMatrixNode: TLib3MFHandle; out pM31: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Get a consumer from the keystore + * Retrieves the input for the element 3 2 * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] nConsumerIndex - The index of the consumer - * @param[out] pConsumer - The consumer instance + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM32 - the input for the m32 element * @return error code or 0 (success) *) - TLib3MFKeyStore_GetConsumerFunc = function(pKeyStore: TLib3MFHandle; const nConsumerIndex: QWord; out pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM32Func = function(pComposeMatrixNode: TLib3MFHandle; out pM32: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Removes a consumer from the keystore + * Retrieves the input for the element 3 3 * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] pConsumer - The consumer instance to remove + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pM33 - the input for the m33 element * @return error code or 0 (success) *) - TLib3MFKeyStore_RemoveConsumerFunc = function(pKeyStore: TLib3MFHandle; const pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetInputM33Func = function(pComposeMatrixNode: TLib3MFHandle; out pM33: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Finds a consumer by ID + * Retrieves the output * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] pConsumerID - The ID of the consumer - * @param[out] pConsumer - The consumer instance + * @param[in] pComposeMatrixNode - ComposeMatrixNode instance. + * @param[out] pResult - the output * @return error code or 0 (success) *) - TLib3MFKeyStore_FindConsumerFunc = function(pKeyStore: TLib3MFHandle; const pConsumerID: PAnsiChar; out pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFComposeMatrixNode_GetOutputResultFunc = function(pComposeMatrixNode: TLib3MFHandle; out pResult: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for MatrixFromRowsNode +**************************************************************************************************************************) + (** - * Gets the number of resource data group in the keysore + * Retrieves the input for the first row * - * @param[in] pKeyStore - KeyStore instance. - * @param[out] pCount - The number of resource data available + * @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. + * @param[out] pRow0 - the input for the first row * @return error code or 0 (success) *) - TLib3MFKeyStore_GetResourceDataGroupCountFunc = function(pKeyStore: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + TLib3MFMatrixFromRowsNode_GetInputAFunc = function(pMatrixFromRowsNode: TLib3MFHandle; out pRow0: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Adds a resource data group into the keystore. + * Retrieves the input for the second row * - * @param[in] pKeyStore - KeyStore instance. - * @param[out] pResourceDataGroup - The resource data group instance + * @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. + * @param[out] pRow1 - the input for the second row * @return error code or 0 (success) *) - TLib3MFKeyStore_AddResourceDataGroupFunc = function(pKeyStore: TLib3MFHandle; out pResourceDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFMatrixFromRowsNode_GetInputBFunc = function(pMatrixFromRowsNode: TLib3MFHandle; out pRow1: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets a resource data group + * Retrieves the input for the third row * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] nResourceDataIndex - The index of the resource data - * @param[out] pResourceDataGroup - The resource data group instance + * @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. + * @param[out] pRow2 - the input for the third row * @return error code or 0 (success) *) - TLib3MFKeyStore_GetResourceDataGroupFunc = function(pKeyStore: TLib3MFHandle; const nResourceDataIndex: QWord; out pResourceDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFMatrixFromRowsNode_GetInputCFunc = function(pMatrixFromRowsNode: TLib3MFHandle; out pRow2: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Removes a resource data group + * Retrieves the input for the fourth row * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] pResourceDataGroup - The resource data group instance + * @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. + * @param[out] pRow3 - the input for the fourth row * @return error code or 0 (success) *) - TLib3MFKeyStore_RemoveResourceDataGroupFunc = function(pKeyStore: TLib3MFHandle; const pResourceDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFMatrixFromRowsNode_GetInputDFunc = function(pMatrixFromRowsNode: TLib3MFHandle; out pRow3: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Finds a resource data group that contains a particular resourcedata + * Retrieves the output * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] pPartPath - The target path for the resourcedata hold by the resource data group - * @param[out] pResourceDataGroup - The data resource instance + * @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. + * @param[out] pResult - the output * @return error code or 0 (success) *) - TLib3MFKeyStore_FindResourceDataGroupFunc = function(pKeyStore: TLib3MFHandle; const pPartPath: TLib3MFHandle; out pResourceDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFMatrixFromRowsNode_GetOutputResultFunc = function(pMatrixFromRowsNode: TLib3MFHandle; out pResult: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for MatrixFromColumnsNode +**************************************************************************************************************************) + (** - * Add resourcedata to resourcedatagroup element + * Retrieves the input for the first column * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] pResourceDataGroup - The resource data group where to add this resource data - * @param[in] pPartPath - The path of the part to be encrypted - * @param[in] eAlgorithm - The encryption algorithm to be used to encrypt this resource - * @param[in] eCompression - Whether compression should be used prior to encryption - * @param[in] nAdditionalAuthenticationDataCount - Number of elements in buffer - * @param[in] pAdditionalAuthenticationDataBuffer - uint8 buffer of Additional data to be encrypted along the contents for better security - * @param[out] pResourceData - The data resource instance + * @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. + * @param[out] pColumn0 - the input for the first column * @return error code or 0 (success) *) - TLib3MFKeyStore_AddResourceDataFunc = function(pKeyStore: TLib3MFHandle; const pResourceDataGroup: TLib3MFHandle; const pPartPath: TLib3MFHandle; const eAlgorithm: Integer; const eCompression: Integer; const nAdditionalAuthenticationDataCount: QWord; const pAdditionalAuthenticationDataBuffer: PByte; out pResourceData: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFMatrixFromColumnsNode_GetInputAFunc = function(pMatrixFromColumnsNode: TLib3MFHandle; out pColumn0: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Removes a resource data + * Retrieves the input for the second column * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] pResourceData - The resource data to be removed + * @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. + * @param[out] pColumn1 - the input for the second column * @return error code or 0 (success) *) - TLib3MFKeyStore_RemoveResourceDataFunc = function(pKeyStore: TLib3MFHandle; const pResourceData: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFMatrixFromColumnsNode_GetInputBFunc = function(pMatrixFromColumnsNode: TLib3MFHandle; out pColumn1: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Finds a resource data on this resource group + * Retrieves the input for the third column * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] pResourcePath - The target path for the resourcedata - * @param[out] pResourceData - The resource data instance + * @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. + * @param[out] pColumn2 - the input for the third column * @return error code or 0 (success) *) - TLib3MFKeyStore_FindResourceDataFunc = function(pKeyStore: TLib3MFHandle; const pResourcePath: TLib3MFHandle; out pResourceData: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFMatrixFromColumnsNode_GetInputCFunc = function(pMatrixFromColumnsNode: TLib3MFHandle; out pColumn2: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets the number of resource data in the keysore + * Retrieves the input for the fourth column * - * @param[in] pKeyStore - KeyStore instance. - * @param[out] pCount - The number of resource data available + * @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. + * @param[out] pColumn3 - the input for the fourth column * @return error code or 0 (success) *) - TLib3MFKeyStore_GetResourceDataCountFunc = function(pKeyStore: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + TLib3MFMatrixFromColumnsNode_GetInputDFunc = function(pMatrixFromColumnsNode: TLib3MFHandle; out pColumn3: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets a resource data + * Retrieves the output * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] nResourceDataIndex - The index of the resource data - * @param[out] pResourceData - The data resource instance + * @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. + * @param[out] pResult - the output * @return error code or 0 (success) *) - TLib3MFKeyStore_GetResourceDataFunc = function(pKeyStore: TLib3MFHandle; const nResourceDataIndex: QWord; out pResourceData: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFMatrixFromColumnsNode_GetOutputResultFunc = function(pMatrixFromColumnsNode: TLib3MFHandle; out pResult: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for ConstantNode +**************************************************************************************************************************) + (** - * Gets the keystore UUID + * Sets the constant value of the node * - * @param[in] pKeyStore - KeyStore instance. - * @param[out] pHasUUID - flag whether the keystore has a UUID - * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) - * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pUUIDBuffer - buffer of returns the keystore uuid., may be NULL + * @param[in] pConstantNode - ConstantNode instance. + * @param[in] dValue - the value * @return error code or 0 (success) *) - TLib3MFKeyStore_GetUUIDFunc = function(pKeyStore: TLib3MFHandle; out pHasUUID: Byte; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFConstantNode_SetConstantFunc = function(pConstantNode: TLib3MFHandle; const dValue: Double): TLib3MFResult; cdecl; (** - * Sets the keystore UUID + * Retrieves the constant value of the node * - * @param[in] pKeyStore - KeyStore instance. - * @param[in] pUUID - The new keystore uuid. + * @param[in] pConstantNode - ConstantNode instance. + * @param[out] pValue - the value * @return error code or 0 (success) *) - TLib3MFKeyStore_SetUUIDFunc = function(pKeyStore: TLib3MFHandle; const pUUID: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFConstantNode_GetConstantFunc = function(pConstantNode: TLib3MFHandle; out pValue: Double): TLib3MFResult; cdecl; + + (** + * Retrieves the output + * + * @param[in] pConstantNode - ConstantNode instance. + * @param[out] pValue - the output + * @return error code or 0 (success) + *) + TLib3MFConstantNode_GetOutputValueFunc = function(pConstantNode: TLib3MFHandle; out pValue: TLib3MFHandle): TLib3MFResult; cdecl; (************************************************************************************************************************* - Function type definitions for Model + Function type definitions for ConstVecNode **************************************************************************************************************************) (** - * Returns the PackagePart within the OPC package that holds the root model. + * Sets the vector value of the node * - * @param[in] pModel - Model instance. - * @param[out] pRootModelPart - the PackagePart within the OPC package that holds the model-file + * @param[in] pConstVecNode - ConstVecNode instance. + * @param[in] pValue - the value * @return error code or 0 (success) *) - TLib3MFModel_RootModelPartFunc = function(pModel: TLib3MFHandle; out pRootModelPart: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFConstVecNode_SetVectorFunc = function(pConstVecNode: TLib3MFHandle; const pValue: PLib3MFVector): TLib3MFResult; cdecl; (** - * Returns a new PackagePart for use within the OPC package. + * Retrieves the vector value of the node * - * @param[in] pModel - Model instance. - * @param[in] pAbsolutePath - the absolute Path (physical location) within the OPC package - * @param[out] pModelPart - the new PackagePart within the OPC package + * @param[in] pConstVecNode - ConstVecNode instance. + * @param[out] pValue - the value * @return error code or 0 (success) *) - TLib3MFModel_FindOrCreatePackagePartFunc = function(pModel: TLib3MFHandle; const pAbsolutePath: PAnsiChar; out pModelPart: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFConstVecNode_GetVectorFunc = function(pConstVecNode: TLib3MFHandle; pValue: PLib3MFVector): TLib3MFResult; cdecl; (** - * sets the units of a model. + * Retrieves the output * - * @param[in] pModel - Model instance. - * @param[in] eUnit - Unit enum value for the model unit + * @param[in] pConstVecNode - ConstVecNode instance. + * @param[out] pVector - the output * @return error code or 0 (success) *) - TLib3MFModel_SetUnitFunc = function(pModel: TLib3MFHandle; const eUnit: Integer): TLib3MFResult; cdecl; + TLib3MFConstVecNode_GetOutputVectorFunc = function(pConstVecNode: TLib3MFHandle; out pVector: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for ConstMatNode +**************************************************************************************************************************) + (** - * returns the units of a model. + * Sets the matrix value of the node * - * @param[in] pModel - Model instance. - * @param[out] pUnit - Unit enum value for the model unit + * @param[in] pConstMatNode - ConstMatNode instance. + * @param[in] pValue - the value * @return error code or 0 (success) *) - TLib3MFModel_GetUnitFunc = function(pModel: TLib3MFHandle; out pUnit: Integer): TLib3MFResult; cdecl; + TLib3MFConstMatNode_SetMatrixFunc = function(pConstMatNode: TLib3MFHandle; const pValue: PLib3MFMatrix4x4): TLib3MFResult; cdecl; (** - * retrieves the language of a model + * Retrieves the matrix value of the node * - * @param[in] pModel - Model instance. - * @param[in] nLanguageBufferSize - size of the buffer (including trailing 0) - * @param[out] pLanguageNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pLanguageBuffer - buffer of language identifier, may be NULL + * @param[in] pConstMatNode - ConstMatNode instance. + * @param[out] pValue - the matrix * @return error code or 0 (success) *) - TLib3MFModel_GetLanguageFunc = function(pModel: TLib3MFHandle; const nLanguageBufferSize: Cardinal; out pLanguageNeededChars: Cardinal; pLanguageBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFConstMatNode_GetMatrixFunc = function(pConstMatNode: TLib3MFHandle; pValue: PLib3MFMatrix4x4): TLib3MFResult; cdecl; (** - * sets the language of a model + * Retrieves the output * - * @param[in] pModel - Model instance. - * @param[in] pLanguage - language identifier + * @param[in] pConstMatNode - ConstMatNode instance. + * @param[out] pMatrix - the output * @return error code or 0 (success) *) - TLib3MFModel_SetLanguageFunc = function(pModel: TLib3MFHandle; const pLanguage: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFConstMatNode_GetOutputMatrixFunc = function(pConstMatNode: TLib3MFHandle; out pMatrix: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for MeshNode +**************************************************************************************************************************) + (** - * creates a model writer instance for a specific file type + * Retrieves the input for the model resource id of the mesh * - * @param[in] pModel - Model instance. - * @param[in] pWriterClass - string identifier for the file type - * @param[out] pWriterInstance - string identifier for the file type + * @param[in] pMeshNode - MeshNode instance. + * @param[out] pMesh - the input port for the model resource id of the mesh * @return error code or 0 (success) *) - TLib3MFModel_QueryWriterFunc = function(pModel: TLib3MFHandle; const pWriterClass: PAnsiChar; out pWriterInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFMeshNode_GetInputMeshFunc = function(pMeshNode: TLib3MFHandle; out pMesh: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates a model reader instance for a specific file type + * Retrieves the input for the position * - * @param[in] pModel - Model instance. - * @param[in] pReaderClass - string identifier for the file type - * @param[out] pReaderInstance - string identifier for the file type + * @param[in] pMeshNode - MeshNode instance. + * @param[out] pPos - the input port for the position * @return error code or 0 (success) *) - TLib3MFModel_QueryReaderFunc = function(pModel: TLib3MFHandle; const pReaderClass: PAnsiChar; out pReaderInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFMeshNode_GetInputPosFunc = function(pMeshNode: TLib3MFHandle; out pPos: TLib3MFHandle): TLib3MFResult; cdecl; (** - * finds a model resource by its UniqueResourceID + * Retrieves the output * - * @param[in] pModel - Model instance. - * @param[in] nUniqueResourceID - UniqueResourceID - * @param[out] pResource - returns the resource instance + * @param[in] pMeshNode - MeshNode instance. + * @param[out] pDistance - the output port for the signed distance to the mesh * @return error code or 0 (success) *) - TLib3MFModel_GetResourceByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pResource: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFMeshNode_GetOutputDistanceFunc = function(pMeshNode: TLib3MFHandle; out pDistance: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for UnsignedMeshNode +**************************************************************************************************************************) + (** - * finds a model texture by its UniqueResourceID + * Retrieves the input for the model resource id of the mesh * - * @param[in] pModel - Model instance. - * @param[in] nUniqueResourceID - UniqueResourceID - * @param[out] pTextureInstance - returns the texture2d instance + * @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. + * @param[out] pMesh - the input port for the model resource id of the mesh * @return error code or 0 (success) *) - TLib3MFModel_GetTexture2DByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pTextureInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFUnsignedMeshNode_GetInputMeshFunc = function(pUnsignedMeshNode: TLib3MFHandle; out pMesh: TLib3MFHandle): TLib3MFResult; cdecl; (** - * returns a Property's type + * Retrieves the input for the position * - * @param[in] pModel - Model instance. - * @param[in] nUniqueResourceID - Resource ID of the Property to Query - * @param[out] pThePropertyType - returns a Property's type + * @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. + * @param[out] pPos - the input port for the position * @return error code or 0 (success) *) - TLib3MFModel_GetPropertyTypeByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pThePropertyType: Integer): TLib3MFResult; cdecl; + TLib3MFUnsignedMeshNode_GetInputPosFunc = function(pUnsignedMeshNode: TLib3MFHandle; out pPos: TLib3MFHandle): TLib3MFResult; cdecl; (** - * finds a model base material group by its UniqueResourceID + * Retrieves the output * - * @param[in] pModel - Model instance. - * @param[in] nUniqueResourceID - UniqueResourceID - * @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance + * @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. + * @param[out] pDistance - the output port for the unsigned distance to the mesh * @return error code or 0 (success) *) - TLib3MFModel_GetBaseMaterialGroupByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pBaseMaterialGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFUnsignedMeshNode_GetOutputDistanceFunc = function(pUnsignedMeshNode: TLib3MFHandle; out pDistance: TLib3MFHandle): TLib3MFResult; cdecl; - (** - * finds a model texture2d group by its UniqueResourceID + +(************************************************************************************************************************* + Function type definitions for FunctionCallNode +**************************************************************************************************************************) + + (** + * Retrieves the input for the function id * - * @param[in] pModel - Model instance. - * @param[in] nUniqueResourceID - UniqueResourceID - * @param[out] pTexture2DGroupInstance - returns the Texture2DGroup instance + * @param[in] pFunctionCallNode - FunctionCallNode instance. + * @param[out] pFunction - the input port for the function * @return error code or 0 (success) *) - TLib3MFModel_GetTexture2DGroupByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pTexture2DGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFFunctionCallNode_GetInputFunctionIDFunc = function(pFunctionCallNode: TLib3MFHandle; out pFunction: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for NodeIterator +**************************************************************************************************************************) + (** - * finds a model CompositeMaterials by its UniqueResourceID + * Returns the current element * - * @param[in] pModel - Model instance. - * @param[in] nUniqueResourceID - UniqueResourceID - * @param[out] pCompositeMaterialsInstance - returns the CompositeMaterials instance + * @param[in] pNodeIterator - NodeIterator instance. + * @param[out] pNode - The current element * @return error code or 0 (success) *) - TLib3MFModel_GetCompositeMaterialsByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pCompositeMaterialsInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFNodeIterator_GetCurrentFunc = function(pNodeIterator: TLib3MFHandle; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for Function +**************************************************************************************************************************) + (** - * finds a model MultiPropertyGroup by its UniqueResourceID + * Retrieves the display name of the function * - * @param[in] pModel - Model instance. - * @param[in] nUniqueResourceID - UniqueResourceID - * @param[out] pMultiPropertyGroupInstance - returns the MultiPropertyGroup instance + * @param[in] pFunction - Function instance. + * @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) + * @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL * @return error code or 0 (success) *) - TLib3MFModel_GetMultiPropertyGroupByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pMultiPropertyGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFFunction_GetDisplayNameFunc = function(pFunction: TLib3MFHandle; const nDisplayNameBufferSize: Cardinal; out pDisplayNameNeededChars: Cardinal; pDisplayNameBuffer: PAnsiChar): TLib3MFResult; cdecl; (** - * finds a mesh object by its UniqueResourceID + * Sets the display name of the function * - * @param[in] pModel - Model instance. - * @param[in] nUniqueResourceID - UniqueResourceID - * @param[out] pMeshObjectInstance - returns the mesh object instance + * @param[in] pFunction - Function instance. + * @param[in] pDisplayName - the display name * @return error code or 0 (success) *) - TLib3MFModel_GetMeshObjectByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pMeshObjectInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFFunction_SetDisplayNameFunc = function(pFunction: TLib3MFHandle; const pDisplayName: PAnsiChar): TLib3MFResult; cdecl; (** - * finds a components object by its UniqueResourceID + * Add an input * - * @param[in] pModel - Model instance. - * @param[in] nUniqueResourceID - UniqueResourceID - * @param[out] pComponentsObjectInstance - returns the components object instance + * @param[in] pFunction - Function instance. + * @param[in] pIdentifier - the identifier of the input + * @param[in] pDisplayName - the display name of the input + * @param[in] eType - the type of the input + * @param[out] pPort - The added input port * @return error code or 0 (success) *) - TLib3MFModel_GetComponentsObjectByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pComponentsObjectInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFFunction_AddInputFunc = function(pFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const eType: Integer; out pPort: TLib3MFHandle): TLib3MFResult; cdecl; (** - * finds a model color group by its UniqueResourceID + * Retrieves the inputs * - * @param[in] pModel - Model instance. - * @param[in] nUniqueResourceID - UniqueResourceID - * @param[out] pColorGroupInstance - returns the ColorGroup instance + * @param[in] pFunction - Function instance. + * @param[out] pIterator - iterator for the list of inputs * @return error code or 0 (success) *) - TLib3MFModel_GetColorGroupByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pColorGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFFunction_GetInputsFunc = function(pFunction: TLib3MFHandle; out pIterator: TLib3MFHandle): TLib3MFResult; cdecl; (** - * finds a model slicestack by its UniqueResourceID + * Removes an input * - * @param[in] pModel - Model instance. - * @param[in] nUniqueResourceID - UniqueResourceID - * @param[out] pSliceStacInstance - returns the slicestack instance + * @param[in] pFunction - Function instance. + * @param[in] pInput - The input to be removed * @return error code or 0 (success) *) - TLib3MFModel_GetSliceStackByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pSliceStacInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFFunction_RemoveInputFunc = function(pFunction: TLib3MFHandle; const pInput: TLib3MFHandle): TLib3MFResult; cdecl; (** - * returns, whether a build has a UUID and, if true, the build's UUID + * Add an output * - * @param[in] pModel - Model instance. - * @param[out] pHasUUID - flag whether the build has a UUID - * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) - * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL + * @param[in] pFunction - Function instance. + * @param[in] pIdentifier - the identifier of the output + * @param[in] pDisplayName - the display name of the output + * @param[in] eType - the type of the input + * @param[out] pPort - The added input port * @return error code or 0 (success) *) - TLib3MFModel_GetBuildUUIDFunc = function(pModel: TLib3MFHandle; out pHasUUID: Byte; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFFunction_AddOutputFunc = function(pFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const eType: Integer; out pPort: TLib3MFHandle): TLib3MFResult; cdecl; (** - * sets the build's UUID + * Retrieves the outputs * - * @param[in] pModel - Model instance. - * @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @param[in] pFunction - Function instance. + * @param[out] pIterator - iterator for the outputs * @return error code or 0 (success) *) - TLib3MFModel_SetBuildUUIDFunc = function(pModel: TLib3MFHandle; const pUUID: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFFunction_GetOutputsFunc = function(pFunction: TLib3MFHandle; out pIterator: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates a build item iterator instance with all build items. + * Removes an output * - * @param[in] pModel - Model instance. - * @param[out] pBuildItemIterator - returns the iterator instance. + * @param[in] pFunction - Function instance. + * @param[in] pOutput - The output to be removed * @return error code or 0 (success) *) - TLib3MFModel_GetBuildItemsFunc = function(pModel: TLib3MFHandle; out pBuildItemIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFFunction_RemoveOutputFunc = function(pFunction: TLib3MFHandle; const pOutput: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Returns the outbox of a Model + * Retrieves an input * - * @param[in] pModel - Model instance. - * @param[out] pOutbox - Outbox of this Model + * @param[in] pFunction - Function instance. + * @param[in] pIdentifier - the identifier of the input + * @param[out] pInput - the input port * @return error code or 0 (success) *) - TLib3MFModel_GetOutboxFunc = function(pModel: TLib3MFHandle; pOutbox: PLib3MFBox): TLib3MFResult; cdecl; + TLib3MFFunction_FindInputFunc = function(pFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; out pInput: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates a resource iterator instance with all resources. + * Retrieves an output * - * @param[in] pModel - Model instance. - * @param[out] pResourceIterator - returns the iterator instance. + * @param[in] pFunction - Function instance. + * @param[in] pIdentifier - the identifier of the output + * @param[out] pOutput - the output port * @return error code or 0 (success) *) - TLib3MFModel_GetResourcesFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFFunction_FindOutputFunc = function(pFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; out pOutput: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Function type definitions for ImplicitFunction +**************************************************************************************************************************) + (** - * creates a resource iterator instance with all object resources. + * Retrieves the identifier of the function * - * @param[in] pModel - Model instance. - * @param[out] pResourceIterator - returns the iterator instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) + * @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL * @return error code or 0 (success) *) - TLib3MFModel_GetObjectsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_GetIdentifierFunc = function(pImplicitFunction: TLib3MFHandle; const nIdentifierBufferSize: Cardinal; out pIdentifierNeededChars: Cardinal; pIdentifierBuffer: PAnsiChar): TLib3MFResult; cdecl; (** - * creates a resource iterator instance with all mesh object resources. + * Sets the identifier of the function * - * @param[in] pModel - Model instance. - * @param[out] pResourceIterator - returns the iterator instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier * @return error code or 0 (success) *) - TLib3MFModel_GetMeshObjectsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_SetIdentifierFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar): TLib3MFResult; cdecl; (** - * creates a resource iterator instance with all components object resources. + * Add a node * - * @param[in] pModel - Model instance. - * @param[out] pResourceIterator - returns the iterator instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] eNodeType - the type of the node + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetComponentsObjectsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddNodeFunc = function(pImplicitFunction: TLib3MFHandle; const eNodeType: Integer; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates a Texture2DIterator instance with all texture2d resources. + * Add a SinNode * - * @param[in] pModel - Model instance. - * @param[out] pResourceIterator - returns the iterator instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetTexture2DsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddSinNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates a BaseMaterialGroupIterator instance with all base material resources. + * Add a CosNode * - * @param[in] pModel - Model instance. - * @param[out] pResourceIterator - returns the iterator instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetBaseMaterialGroupsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddCosNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates a ColorGroupIterator instance with all ColorGroup resources. + * Add a TanNode * - * @param[in] pModel - Model instance. - * @param[out] pResourceIterator - returns the iterator instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetColorGroupsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddTanNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates a Texture2DGroupIterator instance with all base material resources. + * Add a ArcSinNode * - * @param[in] pModel - Model instance. - * @param[out] pResourceIterator - returns the iterator instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetTexture2DGroupsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddArcSinNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates a CompositeMaterialsIterator instance with all CompositeMaterials resources. + * Add a ArcCosNode * - * @param[in] pModel - Model instance. - * @param[out] pResourceIterator - returns the iterator instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetCompositeMaterialsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddArcCosNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates a MultiPropertyGroupsIterator instance with all MultiPropertyGroup resources. + * Add a ArcTan2Node * - * @param[in] pModel - Model instance. - * @param[out] pResourceIterator - returns the iterator instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetMultiPropertyGroupsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddArcTan2NodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates a resource iterator instance with all slice stack resources. + * Add a SinhNode * - * @param[in] pModel - Model instance. - * @param[out] pResourceIterator - returns the iterator instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetSliceStacksFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddSinhNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. + * Add a CoshNode * - * @param[in] pModel - Model instance. - * @param[out] pMergedModelInstance - returns the merged model instance + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_MergeToModelFunc = function(pModel: TLib3MFHandle; out pMergedModelInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddCoshNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * adds an empty mesh object to the model. + * Add a TanhNode * - * @param[in] pModel - Model instance. - * @param[out] pMeshObjectInstance - returns the mesh object instance + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddMeshObjectFunc = function(pModel: TLib3MFHandle; out pMeshObjectInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddTanhNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * adds an empty component object to the model. + * Add a RoundNode * - * @param[in] pModel - Model instance. - * @param[out] pComponentsObjectInstance - returns the components object instance + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddComponentsObjectFunc = function(pModel: TLib3MFHandle; out pComponentsObjectInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddRoundNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates a new model slicestack by its id + * Add a CeilNode * - * @param[in] pModel - Model instance. - * @param[in] dZBottom - Bottom Z value of the slicestack - * @param[out] pSliceStackInstance - returns the new slicestack instance + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddSliceStackFunc = function(pModel: TLib3MFHandle; const dZBottom: Double; out pSliceStackInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddCeilNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * adds a texture2d resource to the model. Its path is given by that of an existing attachment. + * Add a FloorNode * - * @param[in] pModel - Model instance. - * @param[in] pTextureAttachment - attachment containing the image data. - * @param[out] pTexture2DInstance - returns the new texture instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddTexture2DFromAttachmentFunc = function(pModel: TLib3MFHandle; const pTextureAttachment: TLib3MFHandle; out pTexture2DInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddFloorNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * adds an empty BaseMaterialGroup resource to the model. + * Add a SignNode * - * @param[in] pModel - Model instance. - * @param[out] pBaseMaterialGroupInstance - returns the new base material instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddBaseMaterialGroupFunc = function(pModel: TLib3MFHandle; out pBaseMaterialGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddSignNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * adds an empty ColorGroup resource to the model. + * Add a FractNode * - * @param[in] pModel - Model instance. - * @param[out] pColorGroupInstance - returns the new ColorGroup instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddColorGroupFunc = function(pModel: TLib3MFHandle; out pColorGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddFractNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * adds an empty Texture2DGroup resource to the model. + * Add a AbsNode * - * @param[in] pModel - Model instance. - * @param[in] pTexture2DInstance - The texture2D instance of the created Texture2DGroup. - * @param[out] pTexture2DGroupInstance - returns the new Texture2DGroup instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddTexture2DGroupFunc = function(pModel: TLib3MFHandle; const pTexture2DInstance: TLib3MFHandle; out pTexture2DGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddAbsNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * adds an empty CompositeMaterials resource to the model. + * Add a ExpNode * - * @param[in] pModel - Model instance. - * @param[in] pBaseMaterialGroupInstance - The BaseMaterialGroup instance of the created CompositeMaterials. - * @param[out] pCompositeMaterialsInstance - returns the new CompositeMaterials instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddCompositeMaterialsFunc = function(pModel: TLib3MFHandle; const pBaseMaterialGroupInstance: TLib3MFHandle; out pCompositeMaterialsInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddExpNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * adds an empty MultiPropertyGroup resource to the model. + * Add a LogNode * - * @param[in] pModel - Model instance. - * @param[out] pMultiPropertyGroupInstance - returns the new MultiPropertyGroup instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddMultiPropertyGroupFunc = function(pModel: TLib3MFHandle; out pMultiPropertyGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddLogNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * adds a build item to the model. + * Add a Log2Node * - * @param[in] pModel - Model instance. - * @param[in] pObject - Object instance. - * @param[in] pTransform - Transformation matrix. - * @param[out] pBuildItemInstance - returns the build item instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddBuildItemFunc = function(pModel: TLib3MFHandle; const pObject: TLib3MFHandle; const pTransform: PLib3MFTransform; out pBuildItemInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddLog2NodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * removes a build item from the model + * Add a Log10Node * - * @param[in] pModel - Model instance. - * @param[in] pBuildItemInstance - Build item to remove. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_RemoveBuildItemFunc = function(pModel: TLib3MFHandle; const pBuildItemInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddLog10NodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Returns the metadata of the model as MetaDataGroup + * Add a LengthNode * - * @param[in] pModel - Model instance. - * @param[out] pTheMetaDataGroup - returns an Instance of the metadatagroup of the model + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetMetaDataGroupFunc = function(pModel: TLib3MFHandle; out pTheMetaDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddLengthNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * adds an attachment stream to the model. The OPC part will be related to the model stream with a certain relationship type. + * Add a TransposeNode * - * @param[in] pModel - Model instance. - * @param[in] pURI - Path of the attachment - * @param[in] pRelationShipType - Relationship type of the attachment - * @param[out] pAttachmentInstance - Instance of the attachment object + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddAttachmentFunc = function(pModel: TLib3MFHandle; const pURI: PAnsiChar; const pRelationShipType: PAnsiChar; out pAttachmentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddTransposeNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Removes attachment from the model. + * Add a InverseNode * - * @param[in] pModel - Model instance. - * @param[in] pAttachmentInstance - Attachment instance to remove + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_RemoveAttachmentFunc = function(pModel: TLib3MFHandle; const pAttachmentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_InverseNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * retrieves an attachment stream object from the model.. + * Add a SqrtNode * - * @param[in] pModel - Model instance. - * @param[in] nIndex - Index of the attachment stream - * @param[out] pAttachmentInstance - Instance of the attachment object + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetAttachmentFunc = function(pModel: TLib3MFHandle; const nIndex: Cardinal; out pAttachmentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddSqrtNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * retrieves an attachment stream object from the model. + * Add a ResourceIdNode * - * @param[in] pModel - Model instance. - * @param[in] pURI - Path URI in the package - * @param[out] pAttachmentInstance - Instance of the attachment object + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_FindAttachmentFunc = function(pModel: TLib3MFHandle; const pURI: PAnsiChar; out pAttachmentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddResourceIdNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * retrieves the number of attachments of the model. + * Add an AdditionNode * - * @param[in] pModel - Model instance. - * @param[out] pAttachmentCount - Returns the number of attachments. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetAttachmentCountFunc = function(pModel: TLib3MFHandle; out pAttachmentCount: Cardinal): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddAdditionNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Retrieve whether the OPC package contains a package thumbnail. + * Add a SubtractionNode * - * @param[in] pModel - Model instance. - * @param[out] pHasThumbnail - returns whether the OPC package contains a package thumbnail + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_HasPackageThumbnailAttachmentFunc = function(pModel: TLib3MFHandle; out pHasThumbnail: Byte): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddSubtractionNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Create a new or the existing package thumbnail for the OPC package. + * Add a MultiplicationNode * - * @param[in] pModel - Model instance. - * @param[out] pAttachment - Instance of a new or the existing thumbnailattachment object. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_CreatePackageThumbnailAttachmentFunc = function(pModel: TLib3MFHandle; out pAttachment: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddMultiplicationNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Get the attachment to the OPC package containing the package thumbnail. + * Add a DivisionNode * - * @param[in] pModel - Model instance. - * @param[out] pAttachment - Instance of the thumbnailattachment object or NULL. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetPackageThumbnailAttachmentFunc = function(pModel: TLib3MFHandle; out pAttachment: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddDivisionNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Remove the attachment to the OPC package containing the package thumbnail. + * Add a DotNode * - * @param[in] pModel - Model instance. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_RemovePackageThumbnailAttachmentFunc = function(pModel: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddDotNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Adds a new Content Type to the model. + * Add a CrossNode * - * @param[in] pModel - Model instance. - * @param[in] pExtension - File Extension - * @param[in] pContentType - Content Type Identifier + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_AddCustomContentTypeFunc = function(pModel: TLib3MFHandle; const pExtension: PAnsiChar; const pContentType: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddCrossNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Removes a custom Content Type from the model (UTF8 version). + * Add a MatVecMultiplicationNode * - * @param[in] pModel - Model instance. - * @param[in] pExtension - File Extension + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_RemoveCustomContentTypeFunc = function(pModel: TLib3MFHandle; const pExtension: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddMatVecMultiplicationNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Sets the random number generator callback for use in the library + * Add a MinNode * - * @param[in] pModel - Model instance. - * @param[in] pTheCallback - The callback used to generate random numbers - * @param[in] pUserData - Userdata to be passed to the callback function + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_SetRandomNumberCallbackFunc = function(pModel: TLib3MFHandle; const pTheCallback: PLib3MF_RandomNumberCallback; const pUserData: Pointer): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddMinNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Gets the keystore associated with this model + * Add a MaxNode * - * @param[in] pModel - Model instance. - * @param[out] pKeyStore - The package keystore + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFModel_GetKeyStoreFunc = function(pModel: TLib3MFHandle; out pKeyStore: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddMaxNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; -(************************************************************************************************************************* - Global function definitions -**************************************************************************************************************************) - (** - * retrieves the binary version of this library. + * Add a FmodNode * - * @param[out] pMajor - returns the major version of this library - * @param[out] pMinor - returns the minor version of this library - * @param[out] pMicro - returns the micro version of this library + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFGetLibraryVersionFunc = function(out pMajor: Cardinal; out pMinor: Cardinal; out pMicro: Cardinal): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddFmodNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * retrieves prerelease information of this library. + * Add a PowNode * - * @param[out] pHasPrereleaseInfo - Does the library provide prerelease version? - * @param[in] nPrereleaseInfoBufferSize - size of the buffer (including trailing 0) - * @param[out] pPrereleaseInfoNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pPrereleaseInfoBuffer - buffer of retrieves prerelease information of this library., may be NULL + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFGetPrereleaseInformationFunc = function(out pHasPrereleaseInfo: Byte; const nPrereleaseInfoBufferSize: Cardinal; out pPrereleaseInfoNeededChars: Cardinal; pPrereleaseInfoBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddPowNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * retrieves build information of this library. + * Add a SelectNode * - * @param[out] pHasBuildInfo - Does the library provide build version? - * @param[in] nBuildInformationBufferSize - size of the buffer (including trailing 0) - * @param[out] pBuildInformationNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pBuildInformationBuffer - buffer of retrieves build information of this library., may be NULL + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFGetBuildInformationFunc = function(out pHasBuildInfo: Byte; const nBuildInformationBufferSize: Cardinal; out pBuildInformationNeededChars: Cardinal; pBuildInformationBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddSelectNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * retrieves whether a specification is supported, and if so, which version. + * Add a ClampNode * - * @param[in] pSpecificationURL - URL of extension to check - * @param[out] pIsSupported - returns whether this specification is supported - * @param[out] pMajor - returns the major version of the extension (if IsSupported) - * @param[out] pMinor - returns the minor version of the extension (if IsSupported) - * @param[out] pMicro - returns the micro version of the extension (if IsSupported) + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFGetSpecificationVersionFunc = function(const pSpecificationURL: PAnsiChar; out pIsSupported: Byte; out pMajor: Cardinal; out pMinor: Cardinal; out pMicro: Cardinal): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddClampNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const eConfiguration: Integer; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * creates an empty model instance. + * Add a ComposeVectorNode * - * @param[out] pModel - returns an empty model instance + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFCreateModelFunc = function(out pModel: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddComposeVectorNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * releases shared ownership of an object instance + * Add a VectorFromScalar * - * @param[in] pInstance - the object instance to release + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFReleaseFunc = function(const pInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddVectorFromScalarNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * acquires shared ownership of an object instance + * Add a DecomposeVectorNode * - * @param[in] pInstance - the object instance to acquire + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFAcquireFunc = function(const pInstance: TLib3MFHandle): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddDecomposeVectorNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Sets the journal file path + * Add a ComposeMatrixNode * - * @param[in] pJournalPath - File name of the journal file + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFSetJournalFunc = function(const pJournalPath: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddComposeMatrixNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Retrieves the last error string of an instance + * Add a MatrixFromRowsNode * - * @param[in] pInstance - Object where the error occured. - * @param[in] nLastErrorStringBufferSize - size of the buffer (including trailing 0) - * @param[out] pLastErrorStringNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pLastErrorStringBuffer - buffer of Last Error String, may be NULL - * @param[out] pHasLastError - Returns if the instance has a last error. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFGetLastErrorFunc = function(const pInstance: TLib3MFHandle; const nLastErrorStringBufferSize: Cardinal; out pLastErrorStringNeededChars: Cardinal; pLastErrorStringBuffer: PAnsiChar; out pHasLastError: Byte): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddMatrixFromRowsNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Returns the address of the SymbolLookupMethod + * Add a MatrixFromColumnsNode * - * @param[out] pSymbolLookupMethod - Address of the SymbolAddressMethod + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFGetSymbolLookupMethodFunc = function(out pSymbolLookupMethod: Pointer): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddMatrixFromColumnsNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Return an English text for a progress identifier.|Note: this is the only function you can call from your callback function. + * Add a ConstantNode * - * @param[in] eTheProgressIdentifier - the progress identifier that is passed to the callback function - * @param[in] nProgressMessageBufferSize - size of the buffer (including trailing 0) - * @param[out] pProgressMessageNeededChars - will be filled with the count of the written bytes, or needed buffer size. - * @param[out] pProgressMessageBuffer - buffer of English text for the progress identifier, may be NULL + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFRetrieveProgressMessageFunc = function(const eTheProgressIdentifier: Integer; const nProgressMessageBufferSize: Cardinal; out pProgressMessageNeededChars: Cardinal; pProgressMessageBuffer: PAnsiChar): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddConstantNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Creates a Color from uint8 RGBA values + * Add a ConstVecNode * - * @param[in] nRed - Red value of color (0-255) - * @param[in] nGreen - Green value of color (0-255) - * @param[in] nBlue - Blue value of color (0-255) - * @param[in] nAlpha - Alpha value of color (0-255) - * @param[out] pTheColor - Assembled color + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFRGBAToColorFunc = function(const nRed: Byte; const nGreen: Byte; const nBlue: Byte; const nAlpha: Byte; pTheColor: PLib3MFColor): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddConstVecNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Creates a Color from uint8 RGBA values + * Add a ConstMatNode * - * @param[in] fRed - Red value of color (0-1) - * @param[in] fGreen - Green value of color (0-1) - * @param[in] fBlue - Blue value of color (0-1) - * @param[in] fAlpha - Alpha value of color (0-1) - * @param[out] pTheColor - Assembled color + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFFloatRGBAToColorFunc = function(const fRed: Single; const fGreen: Single; const fBlue: Single; const fAlpha: Single; pTheColor: PLib3MFColor): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddConstMatNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Calculates uint8-RGBA-values from a Color + * Add a MeshNode * - * @param[in] pTheColor - Color to handle - * @param[out] pRed - Red value of color (0-255) - * @param[out] pGreen - Green value of color (0-255) - * @param[out] pBlue - Blue value of color (0-255) - * @param[out] pAlpha - Alpha value of color (0-255) + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFColorToRGBAFunc = function(const pTheColor: PLib3MFColor; out pRed: Byte; out pGreen: Byte; out pBlue: Byte; out pAlpha: Byte): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddMeshNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Calculates float-RGBA-values from a Color + * Add a UnsignedMeshNode * - * @param[in] pTheColor - Color to handle - * @param[out] pRed - Red value of color (0-1) - * @param[out] pGreen - Green value of color (0-1) - * @param[out] pBlue - Blue value of color (0-1) - * @param[out] pAlpha - Alpha value of color (0-1) + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFColorToFloatRGBAFunc = function(const pTheColor: PLib3MFColor; out pRed: Single; out pGreen: Single; out pBlue: Single; out pAlpha: Single): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddUnsignedMeshNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Creates an identity transform + * Add a FunctionCallNode * - * @param[out] pTransform - Transformation matrix. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pIdentifier - the identifier of the node + * @param[in] pDisplayName - the display name of the node + * @param[in] pTag - the tag of the node + * @param[out] pNode - the added node * @return error code or 0 (success) *) - TLib3MFGetIdentityTransformFunc = function(pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddFunctionCallNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pIdentifier: PAnsiChar; const pDisplayName: PAnsiChar; const pTag: PAnsiChar; out pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Creates a uniform scale transform + * Retrieves the nodes * - * @param[in] fFactor - Factor in X, Y and Z - * @param[out] pTransform - Transformation matrix. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[out] pIterator - iterator for the list of nodes * @return error code or 0 (success) *) - TLib3MFGetUniformScaleTransformFunc = function(const fFactor: Single; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_GetNodesFunc = function(pImplicitFunction: TLib3MFHandle; out pIterator: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Creates a scale transform + * Removes a node * - * @param[in] fFactorX - Factor in X - * @param[in] fFactorY - Factor in Y - * @param[in] fFactorZ - Factor in Z - * @param[out] pTransform - Transformation matrix. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pNode - The node to be removed * @return error code or 0 (success) *) - TLib3MFGetScaleTransformFunc = function(const fFactorX: Single; const fFactorY: Single; const fFactorZ: Single; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_RemoveNodeFunc = function(pImplicitFunction: TLib3MFHandle; const pNode: TLib3MFHandle): TLib3MFResult; cdecl; (** - * Creates an translation transform + * Add a link * - * @param[in] fVectorX - Translation in X - * @param[in] fVectorY - Translation in Y - * @param[in] fVectorZ - Translation in Z - * @param[out] pTransform - Transformation matrix. + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pSource - the source port + * @param[in] pTarget - the target port * @return error code or 0 (success) *) - TLib3MFGetTranslationTransformFunc = function(const fVectorX: Single; const fVectorY: Single; const fVectorZ: Single; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + TLib3MFImplicitFunction_AddLinkFunc = function(pImplicitFunction: TLib3MFHandle; const pSource: TLib3MFHandle; const pTarget: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Add a link + * + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @param[in] pSource - name of the source port in the format nodename.portname + * @param[in] pTarget - name of the target port in the format nodename.portname + * @return error code or 0 (success) + *) + TLib3MFImplicitFunction_AddLinkByNamesFunc = function(pImplicitFunction: TLib3MFHandle; const pSource: PAnsiChar; const pTarget: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Clears the function + * + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @return error code or 0 (success) + *) + TLib3MFImplicitFunction_ClearFunc = function(pImplicitFunction: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sorts the nodes topologically + * + * @param[in] pImplicitFunction - ImplicitFunction instance. + * @return error code or 0 (success) + *) + TLib3MFImplicitFunction_SortNodesTopologicallyFunc = function(pImplicitFunction: TLib3MFHandle): TLib3MFResult; cdecl; (************************************************************************************************************************* - Helper function pointer definitions -**************************************************************************************************************************) -TLib3MFSymbolLookupMethod = function(const pSymbolName: PAnsiChar; out pValue: Pointer): TLib3MFResult; cdecl; - -(************************************************************************************************************************* - Exception definition -**************************************************************************************************************************) - - ELib3MFException = class(Exception) - private - FErrorCode: TLib3MFResult; - FCustomMessage: String; - public - property ErrorCode: TLib3MFResult read FErrorCode; - property CustomMessage: String read FCustomMessage; - constructor Create(AErrorCode: TLib3MFResult; AMessage: String); - constructor CreateCustomMessage(AErrorCode: TLib3MFResult; AMessage: String); - end; - - -(************************************************************************************************************************* - Class definition for Base -**************************************************************************************************************************) - - TLib3MFBase = class(TObject) - private - FWrapper: TLib3MFWrapper; - FHandle: TLib3MFHandle; - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - property TheHandle: TLib3MFHandle read FHandle; - function ClassTypeId(): QWord; - end; - - -(************************************************************************************************************************* - Class definition for Writer -**************************************************************************************************************************) - - TLib3MFWriter = class(TLib3MFBase) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - procedure WriteToFile(const AFilename: String); - function GetStreamSize(): QWord; - procedure WriteToBuffer(out ABuffer: TByteDynArray); - procedure WriteToCallback(const ATheWriteCallback: PLib3MF_WriteCallback; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); - procedure SetProgressCallback(const AProgressCallback: PLib3MF_ProgressCallback; const AUserData: Pointer); - function GetDecimalPrecision(): Cardinal; - procedure SetDecimalPrecision(const ADecimalPrecision: Cardinal); - procedure SetStrictModeActive(const AStrictModeActive: Boolean); - function GetStrictModeActive(): Boolean; - function GetWarning(const AIndex: Cardinal; out AErrorCode: Cardinal): String; - function GetWarningCount(): Cardinal; - procedure AddKeyWrappingCallback(const AConsumerID: String; const ATheCallback: PLib3MF_KeyWrappingCallback; const AUserData: Pointer); - procedure SetContentEncryptionCallback(const ATheCallback: PLib3MF_ContentEncryptionCallback; const AUserData: Pointer); - end; - - -(************************************************************************************************************************* - Class definition for Reader -**************************************************************************************************************************) - - TLib3MFReader = class(TLib3MFBase) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - procedure ReadFromFile(const AFilename: String); - procedure ReadFromBuffer(const ABuffer: TByteDynArray); - procedure ReadFromCallback(const ATheReadCallback: PLib3MF_ReadCallback; const AStreamSize: QWord; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); - procedure SetProgressCallback(const AProgressCallback: PLib3MF_ProgressCallback; const AUserData: Pointer); - procedure AddRelationToRead(const ARelationShipType: String); - procedure RemoveRelationToRead(const ARelationShipType: String); - procedure SetStrictModeActive(const AStrictModeActive: Boolean); - function GetStrictModeActive(): Boolean; - function GetWarning(const AIndex: Cardinal; out AErrorCode: Cardinal): String; - function GetWarningCount(): Cardinal; - procedure AddKeyWrappingCallback(const AConsumerID: String; const ATheCallback: PLib3MF_KeyWrappingCallback; const AUserData: Pointer); - procedure SetContentEncryptionCallback(const ATheCallback: PLib3MF_ContentEncryptionCallback; const AUserData: Pointer); - end; - - -(************************************************************************************************************************* - Class definition for PackagePart -**************************************************************************************************************************) - - TLib3MFPackagePart = class(TLib3MFBase) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetPath(): String; - procedure SetPath(const APath: String); - end; - - -(************************************************************************************************************************* - Class definition for Resource + Function type definitions for FunctionFromImage3D **************************************************************************************************************************) - TLib3MFResource = class(TLib3MFBase) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetResourceID(): Cardinal; - function GetUniqueResourceID(): Cardinal; - function PackagePart(): TLib3MFPackagePart; - procedure SetPackagePart(const APackagePart: TLib3MFPackagePart); - function GetModelResourceID(): Cardinal; - end; - + (** + * Returns the selected 3D image. + * + * @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. + * @param[out] pImage3D - image instance + * @return error code or 0 (success) + *) + TLib3MFFunctionFromImage3D_GetImage3DFunc = function(pFunctionFromImage3D: TLib3MFHandle; out pImage3D: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sets the 3D image of the selector. + * + * @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. + * @param[in] pImage3D - image instance + * @return error code or 0 (success) + *) + TLib3MFFunctionFromImage3D_SetImage3DFunc = function(pFunctionFromImage3D: TLib3MFHandle; const pImage3D: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sets the texture filter of the selector. + * + * @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. + * @param[in] eFilter - texture filter + * @return error code or 0 (success) + *) + TLib3MFFunctionFromImage3D_SetFilterFunc = function(pFunctionFromImage3D: TLib3MFHandle; const eFilter: Integer): TLib3MFResult; cdecl; + + (** + * Returns the texture filter of the selector. + * + * @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. + * @param[out] pFilter - texture filter + * @return error code or 0 (success) + *) + TLib3MFFunctionFromImage3D_GetFilterFunc = function(pFunctionFromImage3D: TLib3MFHandle; out pFilter: Integer): TLib3MFResult; cdecl; + + (** + * Sets the tile styles of the selector. + * + * @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. + * @param[in] eTileStyleU - tile style in U + * @param[in] eTileStyleV - tile style in V + * @param[in] eTileStyleW - tile style in W + * @return error code or 0 (success) + *) + TLib3MFFunctionFromImage3D_SetTileStylesFunc = function(pFunctionFromImage3D: TLib3MFHandle; const eTileStyleU: Integer; const eTileStyleV: Integer; const eTileStyleW: Integer): TLib3MFResult; cdecl; + + (** + * Retrieves the tile styles of the selector. + * + * @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. + * @param[out] pTileStyleU - tile style in U + * @param[out] pTileStyleV - tile style in V + * @param[out] pTileStyleW - tile style in W + * @return error code or 0 (success) + *) + TLib3MFFunctionFromImage3D_GetTileStylesFunc = function(pFunctionFromImage3D: TLib3MFHandle; out pTileStyleU: Integer; out pTileStyleV: Integer; out pTileStyleW: Integer): TLib3MFResult; cdecl; + + (** + * returns the offset value for the pixel values in the Image3D + * + * @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. + * @param[out] pOffset - the offset value for the pixel values in the Image3D + * @return error code or 0 (success) + *) + TLib3MFFunctionFromImage3D_GetOffsetFunc = function(pFunctionFromImage3D: TLib3MFHandle; out pOffset: Double): TLib3MFResult; cdecl; + + (** + * Sets the offset value for the pixel values in the Image3D + * + * @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. + * @param[in] dOffset - the offset value for the pixel values in the Image3D + * @return error code or 0 (success) + *) + TLib3MFFunctionFromImage3D_SetOffsetFunc = function(pFunctionFromImage3D: TLib3MFHandle; const dOffset: Double): TLib3MFResult; cdecl; + + (** + * returns the scale value for the pixel values in the Image3D + * + * @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. + * @param[out] pScale - the scale value for the pixel values in the Image3D + * @return error code or 0 (success) + *) + TLib3MFFunctionFromImage3D_GetScaleFunc = function(pFunctionFromImage3D: TLib3MFHandle; out pScale: Double): TLib3MFResult; cdecl; + + (** + * Sets the scale value for the pixel values in the Image3D + * + * @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. + * @param[in] dScale - the scale value for the pixel values in the Image3D + * @return error code or 0 (success) + *) + TLib3MFFunctionFromImage3D_SetScaleFunc = function(pFunctionFromImage3D: TLib3MFHandle; const dScale: Double): TLib3MFResult; cdecl; + (************************************************************************************************************************* - Class definition for ResourceIterator + Function type definitions for BuildItem **************************************************************************************************************************) - TLib3MFResourceIterator = class(TLib3MFBase) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function MoveNext(): Boolean; - function MovePrevious(): Boolean; - function GetCurrent(): TLib3MFResource; - function Clone(): TLib3MFResourceIterator; - function Count(): QWord; - end; - - -(************************************************************************************************************************* - Class definition for SliceStackIterator -**************************************************************************************************************************) - - TLib3MFSliceStackIterator = class(TLib3MFResourceIterator) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetCurrentSliceStack(): TLib3MFSliceStack; - end; - - -(************************************************************************************************************************* - Class definition for ObjectIterator -**************************************************************************************************************************) - - TLib3MFObjectIterator = class(TLib3MFResourceIterator) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetCurrentObject(): TLib3MFObject; - end; - - -(************************************************************************************************************************* - Class definition for MeshObjectIterator -**************************************************************************************************************************) - - TLib3MFMeshObjectIterator = class(TLib3MFResourceIterator) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetCurrentMeshObject(): TLib3MFMeshObject; - end; - - -(************************************************************************************************************************* - Class definition for ComponentsObjectIterator -**************************************************************************************************************************) - - TLib3MFComponentsObjectIterator = class(TLib3MFResourceIterator) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetCurrentComponentsObject(): TLib3MFComponentsObject; - end; - - -(************************************************************************************************************************* - Class definition for Texture2DIterator -**************************************************************************************************************************) - - TLib3MFTexture2DIterator = class(TLib3MFResourceIterator) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetCurrentTexture2D(): TLib3MFTexture2D; - end; - - -(************************************************************************************************************************* - Class definition for BaseMaterialGroupIterator -**************************************************************************************************************************) - - TLib3MFBaseMaterialGroupIterator = class(TLib3MFResourceIterator) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetCurrentBaseMaterialGroup(): TLib3MFBaseMaterialGroup; - end; - - -(************************************************************************************************************************* - Class definition for ColorGroupIterator -**************************************************************************************************************************) - - TLib3MFColorGroupIterator = class(TLib3MFResourceIterator) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetCurrentColorGroup(): TLib3MFColorGroup; - end; - + (** + * Retrieves the object resource associated to a build item + * + * @param[in] pBuildItem - BuildItem instance. + * @param[out] pObjectResource - returns the associated resource instance + * @return error code or 0 (success) + *) + TLib3MFBuildItem_GetObjectResourceFunc = function(pBuildItem: TLib3MFHandle; out pObjectResource: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * returns, whether a build item has a UUID and, if true, the build item's UUID + * + * @param[in] pBuildItem - BuildItem instance. + * @param[out] pHasUUID - flag whether the build item has a UUID + * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) + * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL + * @return error code or 0 (success) + *) + TLib3MFBuildItem_GetUUIDFunc = function(pBuildItem: TLib3MFHandle; out pHasUUID: Byte; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * sets the build item's UUID + * + * @param[in] pBuildItem - BuildItem instance. + * @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @return error code or 0 (success) + *) + TLib3MFBuildItem_SetUUIDFunc = function(pBuildItem: TLib3MFHandle; const pUUID: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves the object UniqueResourceID associated to a build item + * + * @param[in] pBuildItem - BuildItem instance. + * @param[out] pUniqueResourceID - returns the UniqueResourceID of the object + * @return error code or 0 (success) + *) + TLib3MFBuildItem_GetObjectResourceIDFunc = function(pBuildItem: TLib3MFHandle; out pUniqueResourceID: Cardinal): TLib3MFResult; cdecl; + + (** + * Checks, if a build item has a non-identity transformation matrix + * + * @param[in] pBuildItem - BuildItem instance. + * @param[out] pHasTransform - returns true, if the transformation matrix is not the identity + * @return error code or 0 (success) + *) + TLib3MFBuildItem_HasObjectTransformFunc = function(pBuildItem: TLib3MFHandle; out pHasTransform: Byte): TLib3MFResult; cdecl; + + (** + * Retrieves a build item's transformation matrix. + * + * @param[in] pBuildItem - BuildItem instance. + * @param[out] pTransform - returns the transformation matrix + * @return error code or 0 (success) + *) + TLib3MFBuildItem_GetObjectTransformFunc = function(pBuildItem: TLib3MFHandle; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + + (** + * Sets a build item's transformation matrix. + * + * @param[in] pBuildItem - BuildItem instance. + * @param[in] pTransform - new transformation matrix + * @return error code or 0 (success) + *) + TLib3MFBuildItem_SetObjectTransformFunc = function(pBuildItem: TLib3MFHandle; const pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + + (** + * Retrieves a build item's part number string + * + * @param[in] pBuildItem - BuildItem instance. + * @param[in] nPartNumberBufferSize - size of the buffer (including trailing 0) + * @param[out] pPartNumberNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pPartNumberBuffer - buffer of Returns a build item's part number string, may be NULL + * @return error code or 0 (success) + *) + TLib3MFBuildItem_GetPartNumberFunc = function(pBuildItem: TLib3MFHandle; const nPartNumberBufferSize: Cardinal; out pPartNumberNeededChars: Cardinal; pPartNumberBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Sets a build item's part number string + * + * @param[in] pBuildItem - BuildItem instance. + * @param[in] pSetPartnumber - new part number string for referencing parts from the outside world + * @return error code or 0 (success) + *) + TLib3MFBuildItem_SetPartNumberFunc = function(pBuildItem: TLib3MFHandle; const pSetPartnumber: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Returns the metadatagroup of this build item + * + * @param[in] pBuildItem - BuildItem instance. + * @param[out] pMetaDataGroup - returns an Instance of the metadatagroup of this build item + * @return error code or 0 (success) + *) + TLib3MFBuildItem_GetMetaDataGroupFunc = function(pBuildItem: TLib3MFHandle; out pMetaDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns the outbox of a build item + * + * @param[in] pBuildItem - BuildItem instance. + * @param[out] pOutbox - Outbox of this build item + * @return error code or 0 (success) + *) + TLib3MFBuildItem_GetOutboxFunc = function(pBuildItem: TLib3MFHandle; pOutbox: PLib3MFBox): TLib3MFResult; cdecl; + (************************************************************************************************************************* - Class definition for Texture2DGroupIterator + Function type definitions for BuildItemIterator **************************************************************************************************************************) - TLib3MFTexture2DGroupIterator = class(TLib3MFResourceIterator) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetCurrentTexture2DGroup(): TLib3MFTexture2DGroup; - end; - + (** + * Iterates to the next build item in the list. + * + * @param[in] pBuildItemIterator - BuildItemIterator instance. + * @param[out] pHasNext - Iterates to the next build item in the list. + * @return error code or 0 (success) + *) + TLib3MFBuildItemIterator_MoveNextFunc = function(pBuildItemIterator: TLib3MFHandle; out pHasNext: Byte): TLib3MFResult; cdecl; + + (** + * Iterates to the previous build item in the list. + * + * @param[in] pBuildItemIterator - BuildItemIterator instance. + * @param[out] pHasPrevious - Iterates to the previous build item in the list. + * @return error code or 0 (success) + *) + TLib3MFBuildItemIterator_MovePreviousFunc = function(pBuildItemIterator: TLib3MFHandle; out pHasPrevious: Byte): TLib3MFResult; cdecl; + + (** + * Returns the build item the iterator points at. + * + * @param[in] pBuildItemIterator - BuildItemIterator instance. + * @param[out] pBuildItem - returns the build item instance. + * @return error code or 0 (success) + *) + TLib3MFBuildItemIterator_GetCurrentFunc = function(pBuildItemIterator: TLib3MFHandle; out pBuildItem: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Creates a new build item iterator with the same build item list. + * + * @param[in] pBuildItemIterator - BuildItemIterator instance. + * @param[out] pOutBuildItemIterator - returns the cloned Iterator instance + * @return error code or 0 (success) + *) + TLib3MFBuildItemIterator_CloneFunc = function(pBuildItemIterator: TLib3MFHandle; out pOutBuildItemIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns the number of build items the iterator captures. + * + * @param[in] pBuildItemIterator - BuildItemIterator instance. + * @param[out] pCount - returns the number of build items the iterator captures. + * @return error code or 0 (success) + *) + TLib3MFBuildItemIterator_CountFunc = function(pBuildItemIterator: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + (************************************************************************************************************************* - Class definition for CompositeMaterialsIterator + Function type definitions for Slice **************************************************************************************************************************) - TLib3MFCompositeMaterialsIterator = class(TLib3MFResourceIterator) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetCurrentCompositeMaterials(): TLib3MFCompositeMaterials; - end; - + (** + * Set all vertices of a slice. All polygons will be cleared. + * + * @param[in] pSlice - Slice instance. + * @param[in] nVerticesCount - Number of elements in buffer + * @param[in] pVerticesBuffer - Position2D buffer of contains the positions. + * @return error code or 0 (success) + *) + TLib3MFSlice_SetVerticesFunc = function(pSlice: TLib3MFHandle; const nVerticesCount: QWord; const pVerticesBuffer: PLib3MFPosition2D): TLib3MFResult; cdecl; + + (** + * Get all vertices of a slice + * + * @param[in] pSlice - Slice instance. + * @param[in] nVerticesCount - Number of elements in buffer + * @param[out] pVerticesNeededCount - will be filled with the count of the written elements, or needed buffer size. + * @param[out] pVerticesBuffer - Position2D buffer of contains the positions. + * @return error code or 0 (success) + *) + TLib3MFSlice_GetVerticesFunc = function(pSlice: TLib3MFHandle; const nVerticesCount: QWord; out pVerticesNeededCount: QWord; pVerticesBuffer: PLib3MFPosition2D): TLib3MFResult; cdecl; + + (** + * Get the number of vertices in a slice + * + * @param[in] pSlice - Slice instance. + * @param[out] pCount - the number of vertices in the slice + * @return error code or 0 (success) + *) + TLib3MFSlice_GetVertexCountFunc = function(pSlice: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + + (** + * Add a new polygon to this slice + * + * @param[in] pSlice - Slice instance. + * @param[in] nIndicesCount - Number of elements in buffer + * @param[in] pIndicesBuffer - uint32 buffer of the new indices of the new polygon + * @param[out] pIndex - the index of the new polygon + * @return error code or 0 (success) + *) + TLib3MFSlice_AddPolygonFunc = function(pSlice: TLib3MFHandle; const nIndicesCount: QWord; const pIndicesBuffer: PCardinal; out pIndex: QWord): TLib3MFResult; cdecl; + + (** + * Get the number of polygons in the slice + * + * @param[in] pSlice - Slice instance. + * @param[out] pCount - the number of polygons in the slice + * @return error code or 0 (success) + *) + TLib3MFSlice_GetPolygonCountFunc = function(pSlice: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + + (** + * Set all indices of a polygon + * + * @param[in] pSlice - Slice instance. + * @param[in] nIndex - the index of the polygon to manipulate + * @param[in] nIndicesCount - Number of elements in buffer + * @param[in] pIndicesBuffer - uint32 buffer of the new indices of the index-th polygon + * @return error code or 0 (success) + *) + TLib3MFSlice_SetPolygonIndicesFunc = function(pSlice: TLib3MFHandle; const nIndex: QWord; const nIndicesCount: QWord; const pIndicesBuffer: PCardinal): TLib3MFResult; cdecl; + + (** + * Get all vertices of a slice + * + * @param[in] pSlice - Slice instance. + * @param[in] nIndex - the index of the polygon to manipulate + * @param[in] nIndicesCount - Number of elements in buffer + * @param[out] pIndicesNeededCount - will be filled with the count of the written elements, or needed buffer size. + * @param[out] pIndicesBuffer - uint32 buffer of the indices of the index-th polygon + * @return error code or 0 (success) + *) + TLib3MFSlice_GetPolygonIndicesFunc = function(pSlice: TLib3MFHandle; const nIndex: QWord; const nIndicesCount: QWord; out pIndicesNeededCount: QWord; pIndicesBuffer: PCardinal): TLib3MFResult; cdecl; + + (** + * Get the number of vertices in a slice + * + * @param[in] pSlice - Slice instance. + * @param[in] nIndex - the index of the polygon to manipulate + * @param[out] pCount - the number of indices of the index-th polygon + * @return error code or 0 (success) + *) + TLib3MFSlice_GetPolygonIndexCountFunc = function(pSlice: TLib3MFHandle; const nIndex: QWord; out pCount: QWord): TLib3MFResult; cdecl; + + (** + * Get the upper Z-Coordinate of this slice. + * + * @param[in] pSlice - Slice instance. + * @param[out] pZTop - the upper Z-Coordinate of this slice + * @return error code or 0 (success) + *) + TLib3MFSlice_GetZTopFunc = function(pSlice: TLib3MFHandle; out pZTop: Double): TLib3MFResult; cdecl; + (************************************************************************************************************************* - Class definition for MultiPropertyGroupIterator + Function type definitions for SliceStack **************************************************************************************************************************) - TLib3MFMultiPropertyGroupIterator = class(TLib3MFResourceIterator) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetCurrentMultiPropertyGroup(): TLib3MFMultiPropertyGroup; - end; - + (** + * Get the lower Z-Coordinate of the slice stack. + * + * @param[in] pSliceStack - SliceStack instance. + * @param[out] pZBottom - the lower Z-Coordinate the slice stack + * @return error code or 0 (success) + *) + TLib3MFSliceStack_GetBottomZFunc = function(pSliceStack: TLib3MFHandle; out pZBottom: Double): TLib3MFResult; cdecl; + + (** + * Returns the number of slices + * + * @param[in] pSliceStack - SliceStack instance. + * @param[out] pCount - the number of slices + * @return error code or 0 (success) + *) + TLib3MFSliceStack_GetSliceCountFunc = function(pSliceStack: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + + (** + * Query a slice from the slice stack + * + * @param[in] pSliceStack - SliceStack instance. + * @param[in] nSliceIndex - the index of the slice + * @param[out] pTheSlice - the Slice instance + * @return error code or 0 (success) + *) + TLib3MFSliceStack_GetSliceFunc = function(pSliceStack: TLib3MFHandle; const nSliceIndex: QWord; out pTheSlice: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns the number of slices + * + * @param[in] pSliceStack - SliceStack instance. + * @param[in] dZTop - upper Z coordinate of the slice + * @param[out] pTheSlice - a new Slice instance + * @return error code or 0 (success) + *) + TLib3MFSliceStack_AddSliceFunc = function(pSliceStack: TLib3MFHandle; const dZTop: Double; out pTheSlice: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns the number of slice refs + * + * @param[in] pSliceStack - SliceStack instance. + * @param[out] pCount - the number of slicereferences + * @return error code or 0 (success) + *) + TLib3MFSliceStack_GetSliceRefCountFunc = function(pSliceStack: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + + (** + * Adds another existing slicestack as sliceref in this slicestack + * + * @param[in] pSliceStack - SliceStack instance. + * @param[in] pTheSliceStack - the slicestack to use as sliceref + * @return error code or 0 (success) + *) + TLib3MFSliceStack_AddSliceStackReferenceFunc = function(pSliceStack: TLib3MFHandle; const pTheSliceStack: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Adds another existing slicestack as sliceref in this slicestack + * + * @param[in] pSliceStack - SliceStack instance. + * @param[in] nSliceRefIndex - the index of the slice ref + * @param[out] pTheSliceStack - the slicestack that is used as sliceref + * @return error code or 0 (success) + *) + TLib3MFSliceStack_GetSliceStackReferenceFunc = function(pSliceStack: TLib3MFHandle; const nSliceRefIndex: QWord; out pTheSliceStack: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Removes the indirection of slices via slice-refs, i.e. creates the slices of all slice refs of this SliceStack as actual slices of this SliceStack. All previously existing slices or slicerefs will be removed. + * + * @param[in] pSliceStack - SliceStack instance. + * @return error code or 0 (success) + *) + TLib3MFSliceStack_CollapseSliceReferencesFunc = function(pSliceStack: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sets the package path where this Slice should be stored. Input an empty string to reset the path + * + * @param[in] pSliceStack - SliceStack instance. + * @param[in] pPath - the package path where this Slice should be stored + * @return error code or 0 (success) + *) + TLib3MFSliceStack_SetOwnPathFunc = function(pSliceStack: TLib3MFHandle; const pPath: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Obtains the package path where this Slice should be stored. Returns an empty string if the slicestack is stored within the root model. + * + * @param[in] pSliceStack - SliceStack instance. + * @param[in] nPathBufferSize - size of the buffer (including trailing 0) + * @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pPathBuffer - buffer of the package path where this Slice will be stored, may be NULL + * @return error code or 0 (success) + *) + TLib3MFSliceStack_GetOwnPathFunc = function(pSliceStack: TLib3MFHandle; const nPathBufferSize: Cardinal; out pPathNeededChars: Cardinal; pPathBuffer: PAnsiChar): TLib3MFResult; cdecl; + (************************************************************************************************************************* - Class definition for MetaData + Function type definitions for Consumer **************************************************************************************************************************) - TLib3MFMetaData = class(TLib3MFBase) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetNameSpace(): String; - procedure SetNameSpace(const ANameSpace: String); - function GetName(): String; - procedure SetName(const AName: String); - function GetKey(): String; - function GetMustPreserve(): Boolean; - procedure SetMustPreserve(const AMustPreserve: Boolean); - function GetType(): String; - procedure SetType(const AType: String); - function GetValue(): String; - procedure SetValue(const AValue: String); - end; - + (** + * Gets the consumerid + * + * @param[in] pConsumer - Consumer instance. + * @param[in] nConsumerIDBufferSize - size of the buffer (including trailing 0) + * @param[out] pConsumerIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pConsumerIDBuffer - buffer of A unique identifier for the consumers, may be NULL + * @return error code or 0 (success) + *) + TLib3MFConsumer_GetConsumerIDFunc = function(pConsumer: TLib3MFHandle; const nConsumerIDBufferSize: Cardinal; out pConsumerIDNeededChars: Cardinal; pConsumerIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Getts the keyid + * + * @param[in] pConsumer - Consumer instance. + * @param[in] nKeyIDBufferSize - size of the buffer (including trailing 0) + * @param[out] pKeyIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pKeyIDBuffer - buffer of The identifier for the key of this consumer, may be NULL + * @return error code or 0 (success) + *) + TLib3MFConsumer_GetKeyIDFunc = function(pConsumer: TLib3MFHandle; const nKeyIDBufferSize: Cardinal; out pKeyIDNeededChars: Cardinal; pKeyIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Gets the keyvalue associated with this consumer + * + * @param[in] pConsumer - Consumer instance. + * @param[in] nKeyValueBufferSize - size of the buffer (including trailing 0) + * @param[out] pKeyValueNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pKeyValueBuffer - buffer of The public key, when available, of this consumer, may be NULL + * @return error code or 0 (success) + *) + TLib3MFConsumer_GetKeyValueFunc = function(pConsumer: TLib3MFHandle; const nKeyValueBufferSize: Cardinal; out pKeyValueNeededChars: Cardinal; pKeyValueBuffer: PAnsiChar): TLib3MFResult; cdecl; + (************************************************************************************************************************* - Class definition for MetaDataGroup + Function type definitions for AccessRight **************************************************************************************************************************) - TLib3MFMetaDataGroup = class(TLib3MFBase) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetMetaDataCount(): Cardinal; - function GetMetaData(const AIndex: Cardinal): TLib3MFMetaData; - function GetMetaDataByKey(const ANameSpace: String; const AName: String): TLib3MFMetaData; - procedure RemoveMetaDataByIndex(const AIndex: Cardinal); - procedure RemoveMetaData(const ATheMetaData: TLib3MFMetaData); - function AddMetaData(const ANameSpace: String; const AName: String; const AValue: String; const AType: String; const AMustPreserve: Boolean): TLib3MFMetaData; - end; - + (** + * Gets the consumer associated with this access right + * + * @param[in] pAccessRight - AccessRight instance. + * @param[out] pConsumer - The consumer instance + * @return error code or 0 (success) + *) + TLib3MFAccessRight_GetConsumerFunc = function(pAccessRight: TLib3MFHandle; out pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Gets the associated encryption algorithm + * + * @param[in] pAccessRight - AccessRight instance. + * @param[out] pAlgorithm - The algorithm used for the key in this accessright + * @return error code or 0 (success) + *) + TLib3MFAccessRight_GetWrappingAlgorithmFunc = function(pAccessRight: TLib3MFHandle; out pAlgorithm: Integer): TLib3MFResult; cdecl; + + (** + * Gets the associated mask generation function algorithm + * + * @param[in] pAccessRight - AccessRight instance. + * @param[out] pAlgorithm - The MFG1 algorithm + * @return error code or 0 (success) + *) + TLib3MFAccessRight_GetMgfAlgorithmFunc = function(pAccessRight: TLib3MFHandle; out pAlgorithm: Integer): TLib3MFResult; cdecl; + + (** + * Gets the digest method assoicated + * + * @param[in] pAccessRight - AccessRight instance. + * @param[out] pAlgorithm - The digest method for this accessright + * @return error code or 0 (success) + *) + TLib3MFAccessRight_GetDigestMethodFunc = function(pAccessRight: TLib3MFHandle; out pAlgorithm: Integer): TLib3MFResult; cdecl; + (************************************************************************************************************************* - Class definition for Object + Function type definitions for ContentEncryptionParams **************************************************************************************************************************) - TLib3MFObject = class(TLib3MFResource) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetType(): TLib3MFObjectType; - procedure SetType(const AObjectType: TLib3MFObjectType); - function GetName(): String; - procedure SetName(const AName: String); - function GetPartNumber(): String; - procedure SetPartNumber(const APartNumber: String); - function IsMeshObject(): Boolean; - function IsComponentsObject(): Boolean; - function IsValid(): Boolean; - procedure SetAttachmentAsThumbnail(const AAttachment: TLib3MFAttachment); - function GetThumbnailAttachment(): TLib3MFAttachment; - procedure ClearThumbnailAttachment(); - function GetOutbox(): TLib3MFBox; - function GetUUID(out AHasUUID: Boolean): String; - procedure SetUUID(const AUUID: String); - function GetMetaDataGroup(): TLib3MFMetaDataGroup; - procedure SetSlicesMeshResolution(const AMeshResolution: TLib3MFSlicesMeshResolution); - function GetSlicesMeshResolution(): TLib3MFSlicesMeshResolution; - function HasSlices(const ARecursive: Boolean): Boolean; - procedure ClearSliceStack(); - function GetSliceStack(): TLib3MFSliceStack; - procedure AssignSliceStack(const ASliceStackInstance: TLib3MFSliceStack); - end; - + (** + * Returns the encryption method to be used in this encryption process + * + * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. + * @param[out] pAlgorithm - + * @return error code or 0 (success) + *) + TLib3MFContentEncryptionParams_GetEncryptionAlgorithmFunc = function(pContentEncryptionParams: TLib3MFHandle; out pAlgorithm: Integer): TLib3MFResult; cdecl; + + (** + * Gets the key for the resource associated + * + * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. + * @param[in] nByteDataCount - Number of elements in buffer + * @param[out] pByteDataNeededCount - will be filled with the count of the written elements, or needed buffer size. + * @param[out] pByteDataBuffer - uint8 buffer of Pointer to a buffer where to place the key. + * @return error code or 0 (success) + *) + TLib3MFContentEncryptionParams_GetKeyFunc = function(pContentEncryptionParams: TLib3MFHandle; const nByteDataCount: QWord; out pByteDataNeededCount: QWord; pByteDataBuffer: PByte): TLib3MFResult; cdecl; + + (** + * Gets the IV data + * + * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. + * @param[in] nByteDataCount - Number of elements in buffer + * @param[out] pByteDataNeededCount - will be filled with the count of the written elements, or needed buffer size. + * @param[out] pByteDataBuffer - uint8 buffer of Pointer to a buffer where to place the data. + * @return error code or 0 (success) + *) + TLib3MFContentEncryptionParams_GetInitializationVectorFunc = function(pContentEncryptionParams: TLib3MFHandle; const nByteDataCount: QWord; out pByteDataNeededCount: QWord; pByteDataBuffer: PByte): TLib3MFResult; cdecl; + + (** + * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * + * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. + * @param[in] nByteDataCount - Number of elements in buffer + * @param[out] pByteDataNeededCount - will be filled with the count of the written elements, or needed buffer size. + * @param[out] pByteDataBuffer - uint8 buffer of Pointer to a buffer where to place the data. + * @return error code or 0 (success) + *) + TLib3MFContentEncryptionParams_GetAuthenticationTagFunc = function(pContentEncryptionParams: TLib3MFHandle; const nByteDataCount: QWord; out pByteDataNeededCount: QWord; pByteDataBuffer: PByte): TLib3MFResult; cdecl; + + (** + * Sets the authentication tag + * + * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. + * @param[in] nByteDataCount - Number of elements in buffer + * @param[in] pByteDataBuffer - uint8 buffer of The authentication tag size + * @return error code or 0 (success) + *) + TLib3MFContentEncryptionParams_SetAuthenticationTagFunc = function(pContentEncryptionParams: TLib3MFHandle; const nByteDataCount: QWord; const pByteDataBuffer: PByte): TLib3MFResult; cdecl; + + (** + * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * + * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. + * @param[in] nByteDataCount - Number of elements in buffer + * @param[out] pByteDataNeededCount - will be filled with the count of the written elements, or needed buffer size. + * @param[out] pByteDataBuffer - uint8 buffer of Buffer where the data will be placed + * @return error code or 0 (success) + *) + TLib3MFContentEncryptionParams_GetAdditionalAuthenticationDataFunc = function(pContentEncryptionParams: TLib3MFHandle; const nByteDataCount: QWord; out pByteDataNeededCount: QWord; pByteDataBuffer: PByte): TLib3MFResult; cdecl; + + (** + * A handler descriptor that uniquely identifies the context of the resource. Each resource will be assigned a different value + * + * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. + * @param[out] pDescriptor - + * @return error code or 0 (success) + *) + TLib3MFContentEncryptionParams_GetDescriptorFunc = function(pContentEncryptionParams: TLib3MFHandle; out pDescriptor: QWord): TLib3MFResult; cdecl; + + (** + * Gets the resourcedatagroup keyuuid + * + * @param[in] pContentEncryptionParams - ContentEncryptionParams instance. + * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) + * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pUUIDBuffer - buffer of The resourcedatagroup keyuuid that may be use to reference an external key, may be NULL + * @return error code or 0 (success) + *) + TLib3MFContentEncryptionParams_GetKeyUUIDFunc = function(pContentEncryptionParams: TLib3MFHandle; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + (************************************************************************************************************************* - Class definition for MeshObject + Function type definitions for ResourceData **************************************************************************************************************************) - TLib3MFMeshObject = class(TLib3MFObject) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetVertexCount(): Cardinal; - function GetTriangleCount(): Cardinal; - function GetVertex(const AIndex: Cardinal): TLib3MFPosition; - procedure SetVertex(const AIndex: Cardinal; const ACoordinates: TLib3MFPosition); - function AddVertex(const ACoordinates: TLib3MFPosition): Cardinal; - procedure GetVertices(out AVertices: ArrayOfLib3MFPosition); - function GetTriangle(const AIndex: Cardinal): TLib3MFTriangle; - procedure SetTriangle(const AIndex: Cardinal; const AIndices: TLib3MFTriangle); - function AddTriangle(const AIndices: TLib3MFTriangle): Cardinal; - procedure GetTriangleIndices(out AIndices: ArrayOfLib3MFTriangle); - procedure SetObjectLevelProperty(const AUniqueResourceID: Cardinal; const APropertyID: Cardinal); - function GetObjectLevelProperty(out AUniqueResourceID: Cardinal; out APropertyID: Cardinal): Boolean; - procedure SetTriangleProperties(const AIndex: Cardinal; const AProperties: TLib3MFTriangleProperties); - procedure GetTriangleProperties(const AIndex: Cardinal; out AProperty: TLib3MFTriangleProperties); - procedure SetAllTriangleProperties(const APropertiesArray: ArrayOfLib3MFTriangleProperties); - procedure GetAllTriangleProperties(out APropertiesArray: ArrayOfLib3MFTriangleProperties); - procedure ClearAllProperties(); - procedure SetGeometry(const AVertices: ArrayOfLib3MFPosition; const AIndices: ArrayOfLib3MFTriangle); - function IsManifoldAndOriented(): Boolean; - function BeamLattice(): TLib3MFBeamLattice; - end; - + (** + * Gets the encrypted part path + * + * @param[in] pResourceData - ResourceData instance. + * @param[out] pPath - The part path + * @return error code or 0 (success) + *) + TLib3MFResourceData_GetPathFunc = function(pResourceData: TLib3MFHandle; out pPath: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Gets the encryption algorithm used to encrypt this ResourceData + * + * @param[in] pResourceData - ResourceData instance. + * @param[out] pEncryptionAlgorithm - The encryption algorithm + * @return error code or 0 (success) + *) + TLib3MFResourceData_GetEncryptionAlgorithmFunc = function(pResourceData: TLib3MFHandle; out pEncryptionAlgorithm: Integer): TLib3MFResult; cdecl; + + (** + * Tells whether this ResourceData is compressed or not + * + * @param[in] pResourceData - ResourceData instance. + * @param[out] pCompression - The compression method + * @return error code or 0 (success) + *) + TLib3MFResourceData_GetCompressionFunc = function(pResourceData: TLib3MFHandle; out pCompression: Integer): TLib3MFResult; cdecl; + + (** + * Tells whether this ResourceData is compressed or not + * + * @param[in] pResourceData - ResourceData instance. + * @param[in] nByteDataCount - Number of elements in buffer + * @param[out] pByteDataNeededCount - will be filled with the count of the written elements, or needed buffer size. + * @param[out] pByteDataBuffer - uint8 buffer of The compression method + * @return error code or 0 (success) + *) + TLib3MFResourceData_GetAdditionalAuthenticationDataFunc = function(pResourceData: TLib3MFHandle; const nByteDataCount: QWord; out pByteDataNeededCount: QWord; pByteDataBuffer: PByte): TLib3MFResult; cdecl; + (************************************************************************************************************************* - Class definition for BeamLattice + Function type definitions for ResourceDataGroup **************************************************************************************************************************) - TLib3MFBeamLattice = class(TLib3MFBase) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetMinLength(): Double; - procedure SetMinLength(const AMinLength: Double); - procedure GetClipping(out AClipMode: TLib3MFBeamLatticeClipMode; out AUniqueResourceID: Cardinal); - procedure SetClipping(const AClipMode: TLib3MFBeamLatticeClipMode; const AUniqueResourceID: Cardinal); - function GetRepresentation(out AUniqueResourceID: Cardinal): Boolean; - procedure SetRepresentation(const AUniqueResourceID: Cardinal); - procedure GetBallOptions(out ABallMode: TLib3MFBeamLatticeBallMode; out ABallRadius: Double); - procedure SetBallOptions(const ABallMode: TLib3MFBeamLatticeBallMode; const ABallRadius: Double); - function GetBeamCount(): Cardinal; - function GetBeam(const AIndex: Cardinal): TLib3MFBeam; - function AddBeam(const ABeamInfo: TLib3MFBeam): Cardinal; - procedure SetBeam(const AIndex: Cardinal; const ABeamInfo: TLib3MFBeam); - procedure SetBeams(const ABeamInfo: ArrayOfLib3MFBeam); - procedure GetBeams(out ABeamInfo: ArrayOfLib3MFBeam); - function GetBallCount(): Cardinal; - function GetBall(const AIndex: Cardinal): TLib3MFBall; - function AddBall(const ABallInfo: TLib3MFBall): Cardinal; - procedure SetBall(const AIndex: Cardinal; const ABallInfo: TLib3MFBall); - procedure SetBalls(const ABallInfo: ArrayOfLib3MFBall); - procedure GetBalls(out ABallInfo: ArrayOfLib3MFBall); - function GetBeamSetCount(): Cardinal; - function AddBeamSet(): TLib3MFBeamSet; - function GetBeamSet(const AIndex: Cardinal): TLib3MFBeamSet; - end; - - -(************************************************************************************************************************* - Class definition for Component -**************************************************************************************************************************) - - TLib3MFComponent = class(TLib3MFBase) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function GetObjectResource(): TLib3MFObject; - function GetObjectResourceID(): Cardinal; - function GetUUID(out AHasUUID: Boolean): String; - procedure SetUUID(const AUUID: String); - function HasTransform(): Boolean; - function GetTransform(): TLib3MFTransform; - procedure SetTransform(const ATransform: TLib3MFTransform); - end; - + (** + * Sets the resourcedatagroup keyuuid + * + * @param[in] pResourceDataGroup - ResourceDataGroup instance. + * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) + * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pUUIDBuffer - buffer of The new resourcedatagroup keyuuid., may be NULL + * @return error code or 0 (success) + *) + TLib3MFResourceDataGroup_GetKeyUUIDFunc = function(pResourceDataGroup: TLib3MFHandle; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Add accessright to resourcedatagroup element + * + * @param[in] pResourceDataGroup - ResourceDataGroup instance. + * @param[in] pConsumer - The Consumer reference + * @param[in] eWrappingAlgorithm - The key wrapping algorithm to be used + * @param[in] eMgfAlgorithm - The mask generation function to be used + * @param[in] eDigestMethod - The digest mechanism to be used + * @param[out] pTheAccessRight - The acess right instance + * @return error code or 0 (success) + *) + TLib3MFResourceDataGroup_AddAccessRightFunc = function(pResourceDataGroup: TLib3MFHandle; const pConsumer: TLib3MFHandle; const eWrappingAlgorithm: Integer; const eMgfAlgorithm: Integer; const eDigestMethod: Integer; out pTheAccessRight: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Finds the AccessRight associated with a Consumer + * + * @param[in] pResourceDataGroup - ResourceDataGroup instance. + * @param[in] pConsumer - The Consumer instance + * @param[out] pTheAccessRight - The AcessRight instance + * @return error code or 0 (success) + *) + TLib3MFResourceDataGroup_FindAccessRightByConsumerFunc = function(pResourceDataGroup: TLib3MFHandle; const pConsumer: TLib3MFHandle; out pTheAccessRight: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Removes access from a Consumer on this resource data group + * + * @param[in] pResourceDataGroup - ResourceDataGroup instance. + * @param[in] pConsumer - The Consumer instance + * @return error code or 0 (success) + *) + TLib3MFResourceDataGroup_RemoveAccessRightFunc = function(pResourceDataGroup: TLib3MFHandle; const pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + (************************************************************************************************************************* - Class definition for ComponentsObject + Function type definitions for KeyStore **************************************************************************************************************************) - TLib3MFComponentsObject = class(TLib3MFObject) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - function AddComponent(const AObjectResource: TLib3MFObject; const ATransform: TLib3MFTransform): TLib3MFComponent; - function GetComponent(const AIndex: Cardinal): TLib3MFComponent; - function GetComponentCount(): Cardinal; - end; - + (** + * Adds a consumer to the keystore + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] pConsumerID - A unique identifier for the consumer + * @param[in] pKeyID - The id of the key of the consumer + * @param[in] pKeyValue - The public key for this consumer in PEM format + * @param[out] pConsumer - The consumer instance + * @return error code or 0 (success) + *) + TLib3MFKeyStore_AddConsumerFunc = function(pKeyStore: TLib3MFHandle; const pConsumerID: PAnsiChar; const pKeyID: PAnsiChar; const pKeyValue: PAnsiChar; out pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Gets the number of consumers in the keystore + * + * @param[in] pKeyStore - KeyStore instance. + * @param[out] pCount - The consumer count + * @return error code or 0 (success) + *) + TLib3MFKeyStore_GetConsumerCountFunc = function(pKeyStore: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + + (** + * Get a consumer from the keystore + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] nConsumerIndex - The index of the consumer + * @param[out] pConsumer - The consumer instance + * @return error code or 0 (success) + *) + TLib3MFKeyStore_GetConsumerFunc = function(pKeyStore: TLib3MFHandle; const nConsumerIndex: QWord; out pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Removes a consumer from the keystore + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] pConsumer - The consumer instance to remove + * @return error code or 0 (success) + *) + TLib3MFKeyStore_RemoveConsumerFunc = function(pKeyStore: TLib3MFHandle; const pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Finds a consumer by ID + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] pConsumerID - The ID of the consumer + * @param[out] pConsumer - The consumer instance + * @return error code or 0 (success) + *) + TLib3MFKeyStore_FindConsumerFunc = function(pKeyStore: TLib3MFHandle; const pConsumerID: PAnsiChar; out pConsumer: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Gets the number of resource data group in the keysore + * + * @param[in] pKeyStore - KeyStore instance. + * @param[out] pCount - The number of resource data available + * @return error code or 0 (success) + *) + TLib3MFKeyStore_GetResourceDataGroupCountFunc = function(pKeyStore: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + + (** + * Adds a resource data group into the keystore. + * + * @param[in] pKeyStore - KeyStore instance. + * @param[out] pResourceDataGroup - The resource data group instance + * @return error code or 0 (success) + *) + TLib3MFKeyStore_AddResourceDataGroupFunc = function(pKeyStore: TLib3MFHandle; out pResourceDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Gets a resource data group + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] nResourceDataIndex - The index of the resource data + * @param[out] pResourceDataGroup - The resource data group instance + * @return error code or 0 (success) + *) + TLib3MFKeyStore_GetResourceDataGroupFunc = function(pKeyStore: TLib3MFHandle; const nResourceDataIndex: QWord; out pResourceDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Removes a resource data group + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] pResourceDataGroup - The resource data group instance + * @return error code or 0 (success) + *) + TLib3MFKeyStore_RemoveResourceDataGroupFunc = function(pKeyStore: TLib3MFHandle; const pResourceDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Finds a resource data group that contains a particular resourcedata + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] pPartPath - The target path for the resourcedata hold by the resource data group + * @param[out] pResourceDataGroup - The data resource instance + * @return error code or 0 (success) + *) + TLib3MFKeyStore_FindResourceDataGroupFunc = function(pKeyStore: TLib3MFHandle; const pPartPath: TLib3MFHandle; out pResourceDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Add resourcedata to resourcedatagroup element + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] pResourceDataGroup - The resource data group where to add this resource data + * @param[in] pPartPath - The path of the part to be encrypted + * @param[in] eAlgorithm - The encryption algorithm to be used to encrypt this resource + * @param[in] eCompression - Whether compression should be used prior to encryption + * @param[in] nAdditionalAuthenticationDataCount - Number of elements in buffer + * @param[in] pAdditionalAuthenticationDataBuffer - uint8 buffer of Additional data to be encrypted along the contents for better security + * @param[out] pResourceData - The data resource instance + * @return error code or 0 (success) + *) + TLib3MFKeyStore_AddResourceDataFunc = function(pKeyStore: TLib3MFHandle; const pResourceDataGroup: TLib3MFHandle; const pPartPath: TLib3MFHandle; const eAlgorithm: Integer; const eCompression: Integer; const nAdditionalAuthenticationDataCount: QWord; const pAdditionalAuthenticationDataBuffer: PByte; out pResourceData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Removes a resource data + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] pResourceData - The resource data to be removed + * @return error code or 0 (success) + *) + TLib3MFKeyStore_RemoveResourceDataFunc = function(pKeyStore: TLib3MFHandle; const pResourceData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Finds a resource data on this resource group + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] pResourcePath - The target path for the resourcedata + * @param[out] pResourceData - The resource data instance + * @return error code or 0 (success) + *) + TLib3MFKeyStore_FindResourceDataFunc = function(pKeyStore: TLib3MFHandle; const pResourcePath: TLib3MFHandle; out pResourceData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Gets the number of resource data in the keysore + * + * @param[in] pKeyStore - KeyStore instance. + * @param[out] pCount - The number of resource data available + * @return error code or 0 (success) + *) + TLib3MFKeyStore_GetResourceDataCountFunc = function(pKeyStore: TLib3MFHandle; out pCount: QWord): TLib3MFResult; cdecl; + + (** + * Gets a resource data + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] nResourceDataIndex - The index of the resource data + * @param[out] pResourceData - The data resource instance + * @return error code or 0 (success) + *) + TLib3MFKeyStore_GetResourceDataFunc = function(pKeyStore: TLib3MFHandle; const nResourceDataIndex: QWord; out pResourceData: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Gets the keystore UUID + * + * @param[in] pKeyStore - KeyStore instance. + * @param[out] pHasUUID - flag whether the keystore has a UUID + * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) + * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pUUIDBuffer - buffer of returns the keystore uuid., may be NULL + * @return error code or 0 (success) + *) + TLib3MFKeyStore_GetUUIDFunc = function(pKeyStore: TLib3MFHandle; out pHasUUID: Byte; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Sets the keystore UUID + * + * @param[in] pKeyStore - KeyStore instance. + * @param[in] pUUID - The new keystore uuid. + * @return error code or 0 (success) + *) + TLib3MFKeyStore_SetUUIDFunc = function(pKeyStore: TLib3MFHandle; const pUUID: PAnsiChar): TLib3MFResult; cdecl; + (************************************************************************************************************************* - Class definition for BeamSet + Function type definitions for Model **************************************************************************************************************************) - TLib3MFBeamSet = class(TLib3MFBase) - public - constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); - destructor Destroy; override; - procedure SetName(const AName: String); - function GetName(): String; - procedure SetIdentifier(const AIdentifier: String); - function GetIdentifier(): String; - function GetReferenceCount(): Cardinal; - procedure SetReferences(const AReferences: TCardinalDynArray); - procedure GetReferences(out AReferences: TCardinalDynArray); - function GetBallReferenceCount(): Cardinal; + (** + * Returns the PackagePart within the OPC package that holds the root model. + * + * @param[in] pModel - Model instance. + * @param[out] pRootModelPart - the PackagePart within the OPC package that holds the model-file + * @return error code or 0 (success) + *) + TLib3MFModel_RootModelPartFunc = function(pModel: TLib3MFHandle; out pRootModelPart: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns a new PackagePart for use within the OPC package. + * + * @param[in] pModel - Model instance. + * @param[in] pAbsolutePath - the absolute Path (physical location) within the OPC package + * @param[out] pModelPart - the new PackagePart within the OPC package + * @return error code or 0 (success) + *) + TLib3MFModel_FindOrCreatePackagePartFunc = function(pModel: TLib3MFHandle; const pAbsolutePath: PAnsiChar; out pModelPart: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * sets the units of a model. + * + * @param[in] pModel - Model instance. + * @param[in] eUnit - Unit enum value for the model unit + * @return error code or 0 (success) + *) + TLib3MFModel_SetUnitFunc = function(pModel: TLib3MFHandle; const eUnit: Integer): TLib3MFResult; cdecl; + + (** + * returns the units of a model. + * + * @param[in] pModel - Model instance. + * @param[out] pUnit - Unit enum value for the model unit + * @return error code or 0 (success) + *) + TLib3MFModel_GetUnitFunc = function(pModel: TLib3MFHandle; out pUnit: Integer): TLib3MFResult; cdecl; + + (** + * retrieves the language of a model + * + * @param[in] pModel - Model instance. + * @param[in] nLanguageBufferSize - size of the buffer (including trailing 0) + * @param[out] pLanguageNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pLanguageBuffer - buffer of language identifier, may be NULL + * @return error code or 0 (success) + *) + TLib3MFModel_GetLanguageFunc = function(pModel: TLib3MFHandle; const nLanguageBufferSize: Cardinal; out pLanguageNeededChars: Cardinal; pLanguageBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * sets the language of a model + * + * @param[in] pModel - Model instance. + * @param[in] pLanguage - language identifier + * @return error code or 0 (success) + *) + TLib3MFModel_SetLanguageFunc = function(pModel: TLib3MFHandle; const pLanguage: PAnsiChar): TLib3MFResult; cdecl; + + (** + * creates a model writer instance for a specific file type + * + * @param[in] pModel - Model instance. + * @param[in] pWriterClass - string identifier for the file type + * @param[out] pWriterInstance - string identifier for the file type + * @return error code or 0 (success) + *) + TLib3MFModel_QueryWriterFunc = function(pModel: TLib3MFHandle; const pWriterClass: PAnsiChar; out pWriterInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a model reader instance for a specific file type + * + * @param[in] pModel - Model instance. + * @param[in] pReaderClass - string identifier for the file type + * @param[out] pReaderInstance - string identifier for the file type + * @return error code or 0 (success) + *) + TLib3MFModel_QueryReaderFunc = function(pModel: TLib3MFHandle; const pReaderClass: PAnsiChar; out pReaderInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * finds a model resource by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pResource - returns the resource instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetResourceByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pResource: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * finds a model texture by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pTextureInstance - returns the texture2d instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetTexture2DByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pTextureInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * returns a Property's type + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - Resource ID of the Property to Query + * @param[out] pThePropertyType - returns a Property's type + * @return error code or 0 (success) + *) + TLib3MFModel_GetPropertyTypeByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pThePropertyType: Integer): TLib3MFResult; cdecl; + + (** + * finds a model base material group by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetBaseMaterialGroupByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pBaseMaterialGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * finds a model texture2d group by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pTexture2DGroupInstance - returns the Texture2DGroup instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetTexture2DGroupByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pTexture2DGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * finds a model CompositeMaterials by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pCompositeMaterialsInstance - returns the CompositeMaterials instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetCompositeMaterialsByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pCompositeMaterialsInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * finds a model MultiPropertyGroup by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pMultiPropertyGroupInstance - returns the MultiPropertyGroup instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetMultiPropertyGroupByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pMultiPropertyGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * finds a mesh object by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pMeshObjectInstance - returns the mesh object instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetMeshObjectByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pMeshObjectInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * finds a components object by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pComponentsObjectInstance - returns the components object instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetComponentsObjectByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pComponentsObjectInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * finds a model color group by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pColorGroupInstance - returns the ColorGroup instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetColorGroupByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pColorGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * finds a model slicestack by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pSliceStacInstance - returns the slicestack instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetSliceStackByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pSliceStacInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * finds a level set object by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pLevelSetObjectInstance - returns the level set object instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetLevelSetByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pLevelSetObjectInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * returns, whether a build has a UUID and, if true, the build's UUID + * + * @param[in] pModel - Model instance. + * @param[out] pHasUUID - flag whether the build has a UUID + * @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) + * @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL + * @return error code or 0 (success) + *) + TLib3MFModel_GetBuildUUIDFunc = function(pModel: TLib3MFHandle; out pHasUUID: Byte; const nUUIDBufferSize: Cardinal; out pUUIDNeededChars: Cardinal; pUUIDBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * sets the build's UUID + * + * @param[in] pModel - Model instance. + * @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * @return error code or 0 (success) + *) + TLib3MFModel_SetBuildUUIDFunc = function(pModel: TLib3MFHandle; const pUUID: PAnsiChar): TLib3MFResult; cdecl; + + (** + * creates a build item iterator instance with all build items. + * + * @param[in] pModel - Model instance. + * @param[out] pBuildItemIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetBuildItemsFunc = function(pModel: TLib3MFHandle; out pBuildItemIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns the outbox of a Model + * + * @param[in] pModel - Model instance. + * @param[out] pOutbox - Outbox of this Model + * @return error code or 0 (success) + *) + TLib3MFModel_GetOutboxFunc = function(pModel: TLib3MFHandle; pOutbox: PLib3MFBox): TLib3MFResult; cdecl; + + (** + * creates a resource iterator instance with all resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetResourcesFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a resource iterator instance with all object resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetObjectsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a resource iterator instance with all mesh object resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetMeshObjectsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a resource iterator instance with all components object resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetComponentsObjectsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a Texture2DIterator instance with all texture2d resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetTexture2DsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a BaseMaterialGroupIterator instance with all base material resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetBaseMaterialGroupsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a ColorGroupIterator instance with all ColorGroup resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetColorGroupsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a Texture2DGroupIterator instance with all base material resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetTexture2DGroupsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a CompositeMaterialsIterator instance with all CompositeMaterials resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetCompositeMaterialsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a MultiPropertyGroupsIterator instance with all MultiPropertyGroup resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetMultiPropertyGroupsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a resource iterator instance with all slice stack resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetSliceStacksFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a resource iterator instance with all image3d resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetImage3DsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. + * + * @param[in] pModel - Model instance. + * @param[out] pMergedModelInstance - returns the merged model instance + * @return error code or 0 (success) + *) + TLib3MFModel_MergeToModelFunc = function(pModel: TLib3MFHandle; out pMergedModelInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Merges the given model into this model. + * + * @param[in] pModel - Model instance. + * @param[in] pModelInstance - model to be merged + * @return error code or 0 (success) + *) + TLib3MFModel_MergeFromModelFunc = function(pModel: TLib3MFHandle; const pModelInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds an empty mesh object to the model. + * + * @param[in] pModel - Model instance. + * @param[out] pMeshObjectInstance - returns the mesh object instance + * @return error code or 0 (success) + *) + TLib3MFModel_AddMeshObjectFunc = function(pModel: TLib3MFHandle; out pMeshObjectInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds an empty component object to the model. + * + * @param[in] pModel - Model instance. + * @param[out] pComponentsObjectInstance - returns the components object instance + * @return error code or 0 (success) + *) + TLib3MFModel_AddComponentsObjectFunc = function(pModel: TLib3MFHandle; out pComponentsObjectInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a new model slicestack by its id + * + * @param[in] pModel - Model instance. + * @param[in] dZBottom - Bottom Z value of the slicestack + * @param[out] pSliceStackInstance - returns the new slicestack instance + * @return error code or 0 (success) + *) + TLib3MFModel_AddSliceStackFunc = function(pModel: TLib3MFHandle; const dZBottom: Double; out pSliceStackInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds a texture2d resource to the model. Its path is given by that of an existing attachment. + * + * @param[in] pModel - Model instance. + * @param[in] pTextureAttachment - attachment containing the image data. + * @param[out] pTexture2DInstance - returns the new texture instance. + * @return error code or 0 (success) + *) + TLib3MFModel_AddTexture2DFromAttachmentFunc = function(pModel: TLib3MFHandle; const pTextureAttachment: TLib3MFHandle; out pTexture2DInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds an empty BaseMaterialGroup resource to the model. + * + * @param[in] pModel - Model instance. + * @param[out] pBaseMaterialGroupInstance - returns the new base material instance. + * @return error code or 0 (success) + *) + TLib3MFModel_AddBaseMaterialGroupFunc = function(pModel: TLib3MFHandle; out pBaseMaterialGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds an empty ColorGroup resource to the model. + * + * @param[in] pModel - Model instance. + * @param[out] pColorGroupInstance - returns the new ColorGroup instance. + * @return error code or 0 (success) + *) + TLib3MFModel_AddColorGroupFunc = function(pModel: TLib3MFHandle; out pColorGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds an empty Texture2DGroup resource to the model. + * + * @param[in] pModel - Model instance. + * @param[in] pTexture2DInstance - The texture2D instance of the created Texture2DGroup. + * @param[out] pTexture2DGroupInstance - returns the new Texture2DGroup instance. + * @return error code or 0 (success) + *) + TLib3MFModel_AddTexture2DGroupFunc = function(pModel: TLib3MFHandle; const pTexture2DInstance: TLib3MFHandle; out pTexture2DGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds an empty CompositeMaterials resource to the model. + * + * @param[in] pModel - Model instance. + * @param[in] pBaseMaterialGroupInstance - The BaseMaterialGroup instance of the created CompositeMaterials. + * @param[out] pCompositeMaterialsInstance - returns the new CompositeMaterials instance. + * @return error code or 0 (success) + *) + TLib3MFModel_AddCompositeMaterialsFunc = function(pModel: TLib3MFHandle; const pBaseMaterialGroupInstance: TLib3MFHandle; out pCompositeMaterialsInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds an empty MultiPropertyGroup resource to the model. + * + * @param[in] pModel - Model instance. + * @param[out] pMultiPropertyGroupInstance - returns the new MultiPropertyGroup instance. + * @return error code or 0 (success) + *) + TLib3MFModel_AddMultiPropertyGroupFunc = function(pModel: TLib3MFHandle; out pMultiPropertyGroupInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a new 3D Image Resource + * + * @param[in] pModel - Model instance. + * @param[in] nColumnCount - the number of columns in each sheet. + * @param[in] nRowCount - the number of rows in each sheet. + * @param[in] nSheetCount - the number of sheets in the image stack. + * @param[out] pInstance - returns the new ImageStack instance + * @return error code or 0 (success) + *) + TLib3MFModel_AddImageStackFunc = function(pModel: TLib3MFHandle; const nColumnCount: Cardinal; const nRowCount: Cardinal; const nSheetCount: Cardinal; out pInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * finds an ImageStack object by its UniqueResourceID + * + * @param[in] pModel - Model instance. + * @param[in] nUniqueResourceID - UniqueResourceID + * @param[out] pImageStackInstance - returns the image stack instance + * @return error code or 0 (success) + *) + TLib3MFModel_GetImageStackByIDFunc = function(pModel: TLib3MFHandle; const nUniqueResourceID: Cardinal; out pImageStackInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds a build item to the model. + * + * @param[in] pModel - Model instance. + * @param[in] pObject - Object instance. + * @param[in] pTransform - Transformation matrix. + * @param[out] pBuildItemInstance - returns the build item instance. + * @return error code or 0 (success) + *) + TLib3MFModel_AddBuildItemFunc = function(pModel: TLib3MFHandle; const pObject: TLib3MFHandle; const pTransform: PLib3MFTransform; out pBuildItemInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * removes a build item from the model + * + * @param[in] pModel - Model instance. + * @param[in] pBuildItemInstance - Build item to remove. + * @return error code or 0 (success) + *) + TLib3MFModel_RemoveBuildItemFunc = function(pModel: TLib3MFHandle; const pBuildItemInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Returns the metadata of the model as MetaDataGroup + * + * @param[in] pModel - Model instance. + * @param[out] pTheMetaDataGroup - returns an Instance of the metadatagroup of the model + * @return error code or 0 (success) + *) + TLib3MFModel_GetMetaDataGroupFunc = function(pModel: TLib3MFHandle; out pTheMetaDataGroup: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds an attachment stream to the model. The OPC part will be related to the model stream with a certain relationship type. + * + * @param[in] pModel - Model instance. + * @param[in] pURI - Path of the attachment + * @param[in] pRelationShipType - Relationship type of the attachment + * @param[out] pAttachmentInstance - Instance of the attachment object + * @return error code or 0 (success) + *) + TLib3MFModel_AddAttachmentFunc = function(pModel: TLib3MFHandle; const pURI: PAnsiChar; const pRelationShipType: PAnsiChar; out pAttachmentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Removes attachment from the model. + * + * @param[in] pModel - Model instance. + * @param[in] pAttachmentInstance - Attachment instance to remove + * @return error code or 0 (success) + *) + TLib3MFModel_RemoveAttachmentFunc = function(pModel: TLib3MFHandle; const pAttachmentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * retrieves an attachment stream object from the model.. + * + * @param[in] pModel - Model instance. + * @param[in] nIndex - Index of the attachment stream + * @param[out] pAttachmentInstance - Instance of the attachment object + * @return error code or 0 (success) + *) + TLib3MFModel_GetAttachmentFunc = function(pModel: TLib3MFHandle; const nIndex: Cardinal; out pAttachmentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * retrieves an attachment stream object from the model. + * + * @param[in] pModel - Model instance. + * @param[in] pURI - Path URI in the package + * @param[out] pAttachmentInstance - Instance of the attachment object + * @return error code or 0 (success) + *) + TLib3MFModel_FindAttachmentFunc = function(pModel: TLib3MFHandle; const pURI: PAnsiChar; out pAttachmentInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * retrieves the number of attachments of the model. + * + * @param[in] pModel - Model instance. + * @param[out] pAttachmentCount - Returns the number of attachments. + * @return error code or 0 (success) + *) + TLib3MFModel_GetAttachmentCountFunc = function(pModel: TLib3MFHandle; out pAttachmentCount: Cardinal): TLib3MFResult; cdecl; + + (** + * Retrieve whether the OPC package contains a package thumbnail. + * + * @param[in] pModel - Model instance. + * @param[out] pHasThumbnail - returns whether the OPC package contains a package thumbnail + * @return error code or 0 (success) + *) + TLib3MFModel_HasPackageThumbnailAttachmentFunc = function(pModel: TLib3MFHandle; out pHasThumbnail: Byte): TLib3MFResult; cdecl; + + (** + * Create a new or the existing package thumbnail for the OPC package. + * + * @param[in] pModel - Model instance. + * @param[out] pAttachment - Instance of a new or the existing thumbnailattachment object. + * @return error code or 0 (success) + *) + TLib3MFModel_CreatePackageThumbnailAttachmentFunc = function(pModel: TLib3MFHandle; out pAttachment: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Get the attachment to the OPC package containing the package thumbnail. + * + * @param[in] pModel - Model instance. + * @param[out] pAttachment - Instance of the thumbnailattachment object or NULL. + * @return error code or 0 (success) + *) + TLib3MFModel_GetPackageThumbnailAttachmentFunc = function(pModel: TLib3MFHandle; out pAttachment: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Remove the attachment to the OPC package containing the package thumbnail. + * + * @param[in] pModel - Model instance. + * @return error code or 0 (success) + *) + TLib3MFModel_RemovePackageThumbnailAttachmentFunc = function(pModel: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Adds a new Content Type to the model. + * + * @param[in] pModel - Model instance. + * @param[in] pExtension - File Extension + * @param[in] pContentType - Content Type Identifier + * @return error code or 0 (success) + *) + TLib3MFModel_AddCustomContentTypeFunc = function(pModel: TLib3MFHandle; const pExtension: PAnsiChar; const pContentType: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Removes a custom Content Type from the model (UTF8 version). + * + * @param[in] pModel - Model instance. + * @param[in] pExtension - File Extension + * @return error code or 0 (success) + *) + TLib3MFModel_RemoveCustomContentTypeFunc = function(pModel: TLib3MFHandle; const pExtension: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Sets the random number generator callback for use in the library + * + * @param[in] pModel - Model instance. + * @param[in] pTheCallback - The callback used to generate random numbers + * @param[in] pUserData - Userdata to be passed to the callback function + * @return error code or 0 (success) + *) + TLib3MFModel_SetRandomNumberCallbackFunc = function(pModel: TLib3MFHandle; const pTheCallback: PLib3MF_RandomNumberCallback; const pUserData: Pointer): TLib3MFResult; cdecl; + + (** + * Gets the keystore associated with this model + * + * @param[in] pModel - Model instance. + * @param[out] pKeyStore - The package keystore + * @return error code or 0 (success) + *) + TLib3MFModel_GetKeyStoreFunc = function(pModel: TLib3MFHandle; out pKeyStore: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a resource iterator for all functions + * + * @param[in] pModel - Model instance. + * @param[out] pTheResourceIterator - returns the resource iterator + * @return error code or 0 (success) + *) + TLib3MFModel_GetFunctionsFunc = function(pModel: TLib3MFHandle; out pTheResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds a function described by nodes to the model + * + * @param[in] pModel - Model instance. + * @param[out] pFunctionInstance - returns the function instance + * @return error code or 0 (success) + *) + TLib3MFModel_AddImplicitFunctionFunc = function(pModel: TLib3MFHandle; out pFunctionInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds a function defined by an image3d to the model + * + * @param[in] pModel - Model instance. + * @param[in] pImage3DInstance - the Image3D-instance used for this function + * @param[out] pFunctionInstance - returns the function instance + * @return error code or 0 (success) + *) + TLib3MFModel_AddFunctionFromImage3DFunc = function(pModel: TLib3MFHandle; const pImage3DInstance: TLib3MFHandle; out pFunctionInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds a volume data resource to the model. + * + * @param[in] pModel - Model instance. + * @param[out] pVolumeDataInstance - returns the new volume data instance. + * @return error code or 0 (success) + *) + TLib3MFModel_AddVolumeDataFunc = function(pModel: TLib3MFHandle; out pVolumeDataInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * adds an empty boundary shape object to the model. + * + * @param[in] pModel - Model instance. + * @param[out] pLevelSetInstance - returns the mesh object instance + * @return error code or 0 (success) + *) + TLib3MFModel_AddLevelSetFunc = function(pModel: TLib3MFHandle; out pLevelSetInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * creates a resource iterator instance with all boundary shape resources. + * + * @param[in] pModel - Model instance. + * @param[out] pResourceIterator - returns the iterator instance. + * @return error code or 0 (success) + *) + TLib3MFModel_GetLevelSetsFunc = function(pModel: TLib3MFHandle; out pResourceIterator: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Removes a resource from the model + * + * @param[in] pModel - Model instance. + * @param[in] pResource - The resource to remove + * @return error code or 0 (success) + *) + TLib3MFModel_RemoveResourceFunc = function(pModel: TLib3MFHandle; const pResource: TLib3MFHandle): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Global function definitions +**************************************************************************************************************************) + + (** + * retrieves the binary version of this library. + * + * @param[out] pMajor - returns the major version of this library + * @param[out] pMinor - returns the minor version of this library + * @param[out] pMicro - returns the micro version of this library + * @return error code or 0 (success) + *) + TLib3MFGetLibraryVersionFunc = function(out pMajor: Cardinal; out pMinor: Cardinal; out pMicro: Cardinal): TLib3MFResult; cdecl; + + (** + * retrieves prerelease information of this library. + * + * @param[out] pHasPrereleaseInfo - Does the library provide prerelease version? + * @param[in] nPrereleaseInfoBufferSize - size of the buffer (including trailing 0) + * @param[out] pPrereleaseInfoNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pPrereleaseInfoBuffer - buffer of retrieves prerelease information of this library., may be NULL + * @return error code or 0 (success) + *) + TLib3MFGetPrereleaseInformationFunc = function(out pHasPrereleaseInfo: Byte; const nPrereleaseInfoBufferSize: Cardinal; out pPrereleaseInfoNeededChars: Cardinal; pPrereleaseInfoBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * retrieves build information of this library. + * + * @param[out] pHasBuildInfo - Does the library provide build version? + * @param[in] nBuildInformationBufferSize - size of the buffer (including trailing 0) + * @param[out] pBuildInformationNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pBuildInformationBuffer - buffer of retrieves build information of this library., may be NULL + * @return error code or 0 (success) + *) + TLib3MFGetBuildInformationFunc = function(out pHasBuildInfo: Byte; const nBuildInformationBufferSize: Cardinal; out pBuildInformationNeededChars: Cardinal; pBuildInformationBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * retrieves whether a specification is supported, and if so, which version. + * + * @param[in] pSpecificationURL - URL of extension to check + * @param[out] pIsSupported - returns whether this specification is supported + * @param[out] pMajor - returns the major version of the extension (if IsSupported) + * @param[out] pMinor - returns the minor version of the extension (if IsSupported) + * @param[out] pMicro - returns the micro version of the extension (if IsSupported) + * @return error code or 0 (success) + *) + TLib3MFGetSpecificationVersionFunc = function(const pSpecificationURL: PAnsiChar; out pIsSupported: Byte; out pMajor: Cardinal; out pMinor: Cardinal; out pMicro: Cardinal): TLib3MFResult; cdecl; + + (** + * creates an empty model instance. + * + * @param[out] pModel - returns an empty model instance + * @return error code or 0 (success) + *) + TLib3MFCreateModelFunc = function(out pModel: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * releases shared ownership of an object instance + * + * @param[in] pInstance - the object instance to release + * @return error code or 0 (success) + *) + TLib3MFReleaseFunc = function(const pInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * acquires shared ownership of an object instance + * + * @param[in] pInstance - the object instance to acquire + * @return error code or 0 (success) + *) + TLib3MFAcquireFunc = function(const pInstance: TLib3MFHandle): TLib3MFResult; cdecl; + + (** + * Sets the journal file path + * + * @param[in] pJournalPath - File name of the journal file + * @return error code or 0 (success) + *) + TLib3MFSetJournalFunc = function(const pJournalPath: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Retrieves the last error string of an instance + * + * @param[in] pInstance - Object where the error occured. + * @param[in] nLastErrorStringBufferSize - size of the buffer (including trailing 0) + * @param[out] pLastErrorStringNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pLastErrorStringBuffer - buffer of Last Error String, may be NULL + * @param[out] pHasLastError - Returns if the instance has a last error. + * @return error code or 0 (success) + *) + TLib3MFGetLastErrorFunc = function(const pInstance: TLib3MFHandle; const nLastErrorStringBufferSize: Cardinal; out pLastErrorStringNeededChars: Cardinal; pLastErrorStringBuffer: PAnsiChar; out pHasLastError: Byte): TLib3MFResult; cdecl; + + (** + * Returns the address of the SymbolLookupMethod + * + * @param[out] pSymbolLookupMethod - Address of the SymbolAddressMethod + * @return error code or 0 (success) + *) + TLib3MFGetSymbolLookupMethodFunc = function(out pSymbolLookupMethod: Pointer): TLib3MFResult; cdecl; + + (** + * Return an English text for a progress identifier.|Note: this is the only function you can call from your callback function. + * + * @param[in] eTheProgressIdentifier - the progress identifier that is passed to the callback function + * @param[in] nProgressMessageBufferSize - size of the buffer (including trailing 0) + * @param[out] pProgressMessageNeededChars - will be filled with the count of the written bytes, or needed buffer size. + * @param[out] pProgressMessageBuffer - buffer of English text for the progress identifier, may be NULL + * @return error code or 0 (success) + *) + TLib3MFRetrieveProgressMessageFunc = function(const eTheProgressIdentifier: Integer; const nProgressMessageBufferSize: Cardinal; out pProgressMessageNeededChars: Cardinal; pProgressMessageBuffer: PAnsiChar): TLib3MFResult; cdecl; + + (** + * Creates a Color from uint8 RGBA values + * + * @param[in] nRed - Red value of color (0-255) + * @param[in] nGreen - Green value of color (0-255) + * @param[in] nBlue - Blue value of color (0-255) + * @param[in] nAlpha - Alpha value of color (0-255) + * @param[out] pTheColor - Assembled color + * @return error code or 0 (success) + *) + TLib3MFRGBAToColorFunc = function(const nRed: Byte; const nGreen: Byte; const nBlue: Byte; const nAlpha: Byte; pTheColor: PLib3MFColor): TLib3MFResult; cdecl; + + (** + * Creates a Color from uint8 RGBA values + * + * @param[in] fRed - Red value of color (0-1) + * @param[in] fGreen - Green value of color (0-1) + * @param[in] fBlue - Blue value of color (0-1) + * @param[in] fAlpha - Alpha value of color (0-1) + * @param[out] pTheColor - Assembled color + * @return error code or 0 (success) + *) + TLib3MFFloatRGBAToColorFunc = function(const fRed: Single; const fGreen: Single; const fBlue: Single; const fAlpha: Single; pTheColor: PLib3MFColor): TLib3MFResult; cdecl; + + (** + * Calculates uint8-RGBA-values from a Color + * + * @param[in] pTheColor - Color to handle + * @param[out] pRed - Red value of color (0-255) + * @param[out] pGreen - Green value of color (0-255) + * @param[out] pBlue - Blue value of color (0-255) + * @param[out] pAlpha - Alpha value of color (0-255) + * @return error code or 0 (success) + *) + TLib3MFColorToRGBAFunc = function(const pTheColor: PLib3MFColor; out pRed: Byte; out pGreen: Byte; out pBlue: Byte; out pAlpha: Byte): TLib3MFResult; cdecl; + + (** + * Calculates float-RGBA-values from a Color + * + * @param[in] pTheColor - Color to handle + * @param[out] pRed - Red value of color (0-1) + * @param[out] pGreen - Green value of color (0-1) + * @param[out] pBlue - Blue value of color (0-1) + * @param[out] pAlpha - Alpha value of color (0-1) + * @return error code or 0 (success) + *) + TLib3MFColorToFloatRGBAFunc = function(const pTheColor: PLib3MFColor; out pRed: Single; out pGreen: Single; out pBlue: Single; out pAlpha: Single): TLib3MFResult; cdecl; + + (** + * Creates an identity transform + * + * @param[out] pTransform - Transformation matrix. + * @return error code or 0 (success) + *) + TLib3MFGetIdentityTransformFunc = function(pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + + (** + * Creates a uniform scale transform + * + * @param[in] fFactor - Factor in X, Y and Z + * @param[out] pTransform - Transformation matrix. + * @return error code or 0 (success) + *) + TLib3MFGetUniformScaleTransformFunc = function(const fFactor: Single; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + + (** + * Creates a scale transform + * + * @param[in] fFactorX - Factor in X + * @param[in] fFactorY - Factor in Y + * @param[in] fFactorZ - Factor in Z + * @param[out] pTransform - Transformation matrix. + * @return error code or 0 (success) + *) + TLib3MFGetScaleTransformFunc = function(const fFactorX: Single; const fFactorY: Single; const fFactorZ: Single; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + + (** + * Creates an translation transform + * + * @param[in] fVectorX - Translation in X + * @param[in] fVectorY - Translation in Y + * @param[in] fVectorZ - Translation in Z + * @param[out] pTransform - Transformation matrix. + * @return error code or 0 (success) + *) + TLib3MFGetTranslationTransformFunc = function(const fVectorX: Single; const fVectorY: Single; const fVectorZ: Single; pTransform: PLib3MFTransform): TLib3MFResult; cdecl; + + +(************************************************************************************************************************* + Helper function pointer definitions +**************************************************************************************************************************) +TLib3MFSymbolLookupMethod = function(const pSymbolName: PAnsiChar; out pValue: Pointer): TLib3MFResult; cdecl; + +(************************************************************************************************************************* + Exception definition +**************************************************************************************************************************) + + ELib3MFException = class(Exception) + private + FErrorCode: TLib3MFResult; + FCustomMessage: String; + public + property ErrorCode: TLib3MFResult read FErrorCode; + property CustomMessage: String read FCustomMessage; + constructor Create(AErrorCode: TLib3MFResult; AMessage: String); + constructor CreateCustomMessage(AErrorCode: TLib3MFResult; AMessage: String); + end; + + +(************************************************************************************************************************* + Class definition for Base +**************************************************************************************************************************) + + TLib3MFBase = class(TObject) + private + FWrapper: TLib3MFWrapper; + FHandle: TLib3MFHandle; + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + property TheHandle: TLib3MFHandle read FHandle; + function ClassTypeId(): QWord; + end; + + +(************************************************************************************************************************* + Class definition for Writer +**************************************************************************************************************************) + + TLib3MFWriter = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + procedure WriteToFile(const AFilename: String); + function GetStreamSize(): QWord; + procedure WriteToBuffer(out ABuffer: TByteDynArray); + procedure WriteToCallback(const ATheWriteCallback: PLib3MF_WriteCallback; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); + procedure SetProgressCallback(const AProgressCallback: PLib3MF_ProgressCallback; const AUserData: Pointer); + function GetDecimalPrecision(): Cardinal; + procedure SetDecimalPrecision(const ADecimalPrecision: Cardinal); + procedure SetStrictModeActive(const AStrictModeActive: Boolean); + function GetStrictModeActive(): Boolean; + function GetWarning(const AIndex: Cardinal; out AErrorCode: Cardinal): String; + function GetWarningCount(): Cardinal; + procedure AddKeyWrappingCallback(const AConsumerID: String; const ATheCallback: PLib3MF_KeyWrappingCallback; const AUserData: Pointer); + procedure SetContentEncryptionCallback(const ATheCallback: PLib3MF_ContentEncryptionCallback; const AUserData: Pointer); + end; + + +(************************************************************************************************************************* + Class definition for Reader +**************************************************************************************************************************) + + TLib3MFReader = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + procedure ReadFromFile(const AFilename: String); + procedure ReadFromBuffer(const ABuffer: TByteDynArray); + procedure ReadFromCallback(const ATheReadCallback: PLib3MF_ReadCallback; const AStreamSize: QWord; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); + procedure SetProgressCallback(const AProgressCallback: PLib3MF_ProgressCallback; const AUserData: Pointer); + procedure AddRelationToRead(const ARelationShipType: String); + procedure RemoveRelationToRead(const ARelationShipType: String); + procedure SetStrictModeActive(const AStrictModeActive: Boolean); + function GetStrictModeActive(): Boolean; + function GetWarning(const AIndex: Cardinal; out AErrorCode: Cardinal): String; + function GetWarningCount(): Cardinal; + procedure AddKeyWrappingCallback(const AConsumerID: String; const ATheCallback: PLib3MF_KeyWrappingCallback; const AUserData: Pointer); + procedure SetContentEncryptionCallback(const ATheCallback: PLib3MF_ContentEncryptionCallback; const AUserData: Pointer); + end; + + +(************************************************************************************************************************* + Class definition for PackagePart +**************************************************************************************************************************) + + TLib3MFPackagePart = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetPath(): String; + procedure SetPath(const APath: String); + end; + + +(************************************************************************************************************************* + Class definition for Resource +**************************************************************************************************************************) + + TLib3MFResource = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetResourceID(): Cardinal; + function GetUniqueResourceID(): Cardinal; + function PackagePart(): TLib3MFPackagePart; + procedure SetPackagePart(const APackagePart: TLib3MFPackagePart); + function GetModelResourceID(): Cardinal; + end; + + +(************************************************************************************************************************* + Class definition for ResourceIterator +**************************************************************************************************************************) + + TLib3MFResourceIterator = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function MoveNext(): Boolean; + function MovePrevious(): Boolean; + function GetCurrent(): TLib3MFResource; + function Clone(): TLib3MFResourceIterator; + function Count(): QWord; + end; + + +(************************************************************************************************************************* + Class definition for SliceStackIterator +**************************************************************************************************************************) + + TLib3MFSliceStackIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentSliceStack(): TLib3MFSliceStack; + end; + + +(************************************************************************************************************************* + Class definition for ObjectIterator +**************************************************************************************************************************) + + TLib3MFObjectIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentObject(): TLib3MFObject; + end; + + +(************************************************************************************************************************* + Class definition for MeshObjectIterator +**************************************************************************************************************************) + + TLib3MFMeshObjectIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentMeshObject(): TLib3MFMeshObject; + end; + + +(************************************************************************************************************************* + Class definition for ComponentsObjectIterator +**************************************************************************************************************************) + + TLib3MFComponentsObjectIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentComponentsObject(): TLib3MFComponentsObject; + end; + + +(************************************************************************************************************************* + Class definition for Texture2DIterator +**************************************************************************************************************************) + + TLib3MFTexture2DIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentTexture2D(): TLib3MFTexture2D; + end; + + +(************************************************************************************************************************* + Class definition for BaseMaterialGroupIterator +**************************************************************************************************************************) + + TLib3MFBaseMaterialGroupIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentBaseMaterialGroup(): TLib3MFBaseMaterialGroup; + end; + + +(************************************************************************************************************************* + Class definition for ColorGroupIterator +**************************************************************************************************************************) + + TLib3MFColorGroupIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentColorGroup(): TLib3MFColorGroup; + end; + + +(************************************************************************************************************************* + Class definition for Texture2DGroupIterator +**************************************************************************************************************************) + + TLib3MFTexture2DGroupIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentTexture2DGroup(): TLib3MFTexture2DGroup; + end; + + +(************************************************************************************************************************* + Class definition for CompositeMaterialsIterator +**************************************************************************************************************************) + + TLib3MFCompositeMaterialsIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentCompositeMaterials(): TLib3MFCompositeMaterials; + end; + + +(************************************************************************************************************************* + Class definition for MultiPropertyGroupIterator +**************************************************************************************************************************) + + TLib3MFMultiPropertyGroupIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentMultiPropertyGroup(): TLib3MFMultiPropertyGroup; + end; + + +(************************************************************************************************************************* + Class definition for Image3DIterator +**************************************************************************************************************************) + + TLib3MFImage3DIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentImage3D(): TLib3MFImage3D; + end; + + +(************************************************************************************************************************* + Class definition for FunctionIterator +**************************************************************************************************************************) + + TLib3MFFunctionIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentFunction(): TLib3MFFunction; + end; + + +(************************************************************************************************************************* + Class definition for LevelSetIterator +**************************************************************************************************************************) + + TLib3MFLevelSetIterator = class(TLib3MFResourceIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrentLevelSet(): TLib3MFLevelSet; + end; + + +(************************************************************************************************************************* + Class definition for MetaData +**************************************************************************************************************************) + + TLib3MFMetaData = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetNameSpace(): String; + procedure SetNameSpace(const ANameSpace: String); + function GetName(): String; + procedure SetName(const AName: String); + function GetKey(): String; + function GetMustPreserve(): Boolean; + procedure SetMustPreserve(const AMustPreserve: Boolean); + function GetType(): String; + procedure SetType(const AType: String); + function GetValue(): String; + procedure SetValue(const AValue: String); + end; + + +(************************************************************************************************************************* + Class definition for MetaDataGroup +**************************************************************************************************************************) + + TLib3MFMetaDataGroup = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetMetaDataCount(): Cardinal; + function GetMetaData(const AIndex: Cardinal): TLib3MFMetaData; + function GetMetaDataByKey(const ANameSpace: String; const AName: String): TLib3MFMetaData; + procedure RemoveMetaDataByIndex(const AIndex: Cardinal); + procedure RemoveMetaData(const ATheMetaData: TLib3MFMetaData); + function AddMetaData(const ANameSpace: String; const AName: String; const AValue: String; const AType: String; const AMustPreserve: Boolean): TLib3MFMetaData; + end; + + +(************************************************************************************************************************* + Class definition for Object +**************************************************************************************************************************) + + TLib3MFObject = class(TLib3MFResource) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetType(): TLib3MFObjectType; + procedure SetType(const AObjectType: TLib3MFObjectType); + function GetName(): String; + procedure SetName(const AName: String); + function GetPartNumber(): String; + procedure SetPartNumber(const APartNumber: String); + function IsMeshObject(): Boolean; + function IsComponentsObject(): Boolean; + function IsLevelSetObject(): Boolean; + function IsValid(): Boolean; + procedure SetAttachmentAsThumbnail(const AAttachment: TLib3MFAttachment); + function GetThumbnailAttachment(): TLib3MFAttachment; + procedure ClearThumbnailAttachment(); + function GetOutbox(): TLib3MFBox; + function GetUUID(out AHasUUID: Boolean): String; + procedure SetUUID(const AUUID: String); + function GetMetaDataGroup(): TLib3MFMetaDataGroup; + procedure SetSlicesMeshResolution(const AMeshResolution: TLib3MFSlicesMeshResolution); + function GetSlicesMeshResolution(): TLib3MFSlicesMeshResolution; + function HasSlices(const ARecursive: Boolean): Boolean; + procedure ClearSliceStack(); + function GetSliceStack(): TLib3MFSliceStack; + procedure AssignSliceStack(const ASliceStackInstance: TLib3MFSliceStack); + end; + + +(************************************************************************************************************************* + Class definition for MeshObject +**************************************************************************************************************************) + + TLib3MFMeshObject = class(TLib3MFObject) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetVertexCount(): Cardinal; + function GetTriangleCount(): Cardinal; + function GetVertex(const AIndex: Cardinal): TLib3MFPosition; + procedure SetVertex(const AIndex: Cardinal; const ACoordinates: TLib3MFPosition); + function AddVertex(const ACoordinates: TLib3MFPosition): Cardinal; + procedure GetVertices(out AVertices: ArrayOfLib3MFPosition); + function GetTriangle(const AIndex: Cardinal): TLib3MFTriangle; + procedure SetTriangle(const AIndex: Cardinal; const AIndices: TLib3MFTriangle); + function AddTriangle(const AIndices: TLib3MFTriangle): Cardinal; + procedure GetTriangleIndices(out AIndices: ArrayOfLib3MFTriangle); + procedure SetObjectLevelProperty(const AUniqueResourceID: Cardinal; const APropertyID: Cardinal); + function GetObjectLevelProperty(out AUniqueResourceID: Cardinal; out APropertyID: Cardinal): Boolean; + procedure SetTriangleProperties(const AIndex: Cardinal; const AProperties: TLib3MFTriangleProperties); + procedure GetTriangleProperties(const AIndex: Cardinal; out AProperty: TLib3MFTriangleProperties); + procedure SetAllTriangleProperties(const APropertiesArray: ArrayOfLib3MFTriangleProperties); + procedure GetAllTriangleProperties(out APropertiesArray: ArrayOfLib3MFTriangleProperties); + procedure ClearAllProperties(); + procedure SetGeometry(const AVertices: ArrayOfLib3MFPosition; const AIndices: ArrayOfLib3MFTriangle); + function IsManifoldAndOriented(): Boolean; + function BeamLattice(): TLib3MFBeamLattice; + function GetVolumeData(): TLib3MFVolumeData; + procedure SetVolumeData(const ATheVolumeData: TLib3MFVolumeData); + end; + + +(************************************************************************************************************************* + Class definition for LevelSet +**************************************************************************************************************************) + + TLib3MFLevelSet = class(TLib3MFObject) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetFunction(): TLib3MFFunction; + procedure SetFunction(const ATheFunction: TLib3MFFunction); + function GetTransform(): TLib3MFTransform; + procedure SetTransform(const ATransform: TLib3MFTransform); + function GetChannelName(): String; + procedure SetChannelName(const AChannelName: String); + procedure SetMinFeatureSize(const AMinFeatureSize: Double); + function GetMinFeatureSize(): Double; + procedure SetFallBackValue(const AFallBackValue: Double); + function GetFallBackValue(): Double; + procedure SetMeshBBoxOnly(const AMeshBBoxOnly: Boolean); + function GetMeshBBoxOnly(): Boolean; + procedure SetMesh(const ATheMesh: TLib3MFMeshObject); + function GetMesh(): TLib3MFMeshObject; + function GetVolumeData(): TLib3MFVolumeData; + procedure SetVolumeData(const ATheVolumeData: TLib3MFVolumeData); + end; + + +(************************************************************************************************************************* + Class definition for BeamLattice +**************************************************************************************************************************) + + TLib3MFBeamLattice = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetMinLength(): Double; + procedure SetMinLength(const AMinLength: Double); + procedure GetClipping(out AClipMode: TLib3MFBeamLatticeClipMode; out AUniqueResourceID: Cardinal); + procedure SetClipping(const AClipMode: TLib3MFBeamLatticeClipMode; const AUniqueResourceID: Cardinal); + function GetRepresentation(out AUniqueResourceID: Cardinal): Boolean; + procedure SetRepresentation(const AUniqueResourceID: Cardinal); + procedure GetBallOptions(out ABallMode: TLib3MFBeamLatticeBallMode; out ABallRadius: Double); + procedure SetBallOptions(const ABallMode: TLib3MFBeamLatticeBallMode; const ABallRadius: Double); + function GetBeamCount(): Cardinal; + function GetBeam(const AIndex: Cardinal): TLib3MFBeam; + function AddBeam(const ABeamInfo: TLib3MFBeam): Cardinal; + procedure SetBeam(const AIndex: Cardinal; const ABeamInfo: TLib3MFBeam); + procedure SetBeams(const ABeamInfo: ArrayOfLib3MFBeam); + procedure GetBeams(out ABeamInfo: ArrayOfLib3MFBeam); + function GetBallCount(): Cardinal; + function GetBall(const AIndex: Cardinal): TLib3MFBall; + function AddBall(const ABallInfo: TLib3MFBall): Cardinal; + procedure SetBall(const AIndex: Cardinal; const ABallInfo: TLib3MFBall); + procedure SetBalls(const ABallInfo: ArrayOfLib3MFBall); + procedure GetBalls(out ABallInfo: ArrayOfLib3MFBall); + function GetBeamSetCount(): Cardinal; + function AddBeamSet(): TLib3MFBeamSet; + function GetBeamSet(const AIndex: Cardinal): TLib3MFBeamSet; + end; + + +(************************************************************************************************************************* + Class definition for FunctionReference +**************************************************************************************************************************) + + TLib3MFFunctionReference = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetFunctionResourceID(): Cardinal; + procedure SetFunctionResourceID(const AUniqueResourceID: Cardinal); + function GetTransform(): TLib3MFTransform; + procedure SetTransform(const ATransform: TLib3MFTransform); + function GetChannelName(): String; + procedure SetChannelName(const AChannelName: String); + procedure SetMinFeatureSize(const AMinFeatureSize: Double); + function GetMinFeatureSize(): Double; + procedure SetFallBackValue(const AFallBackValue: Double); + function GetFallBackValue(): Double; + end; + + +(************************************************************************************************************************* + Class definition for VolumeDataColor +**************************************************************************************************************************) + + TLib3MFVolumeDataColor = class(TLib3MFFunctionReference) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for MaterialMapping +**************************************************************************************************************************) + + TLib3MFMaterialMapping = class(TLib3MFFunctionReference) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for VolumeDataComposite +**************************************************************************************************************************) + + TLib3MFVolumeDataComposite = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetBaseMaterialGroup(): TLib3MFBaseMaterialGroup; + procedure SetBaseMaterialGroup(const ABaseMaterialGroupInstance: TLib3MFBaseMaterialGroup); + function GetMaterialMappingCount(): Cardinal; + function GetMaterialMapping(const AIndex: Cardinal): TLib3MFMaterialMapping; + function AddMaterialMapping(const ATransform: TLib3MFTransform): TLib3MFMaterialMapping; + procedure RemoveMaterialMapping(const AIndex: Cardinal); + end; + + +(************************************************************************************************************************* + Class definition for VolumeDataProperty +**************************************************************************************************************************) + + TLib3MFVolumeDataProperty = class(TLib3MFFunctionReference) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetName(): String; + procedure SetIsRequired(const AIsRequired: Boolean); + function IsRequired(): Boolean; + end; + + +(************************************************************************************************************************* + Class definition for VolumeData +**************************************************************************************************************************) + + TLib3MFVolumeData = class(TLib3MFResource) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetComposite(): TLib3MFVolumeDataComposite; + function CreateNewComposite(): TLib3MFVolumeDataComposite; + procedure RemoveComposite(); + function GetColor(): TLib3MFVolumeDataColor; + function CreateNewColor(const ATheFunction: TLib3MFFunction): TLib3MFVolumeDataColor; + procedure RemoveColor(); + function GetPropertyCount(): Cardinal; + function GetProperty(const AIndex: Cardinal): TLib3MFVolumeDataProperty; + function AddPropertyFromFunction(const AName: String; const ATheFunction: TLib3MFFunction): TLib3MFVolumeDataProperty; + procedure RemoveProperty(const AIndex: Cardinal); + end; + + +(************************************************************************************************************************* + Class definition for Component +**************************************************************************************************************************) + + TLib3MFComponent = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetObjectResource(): TLib3MFObject; + function GetObjectResourceID(): Cardinal; + function GetUUID(out AHasUUID: Boolean): String; + procedure SetUUID(const AUUID: String); + function HasTransform(): Boolean; + function GetTransform(): TLib3MFTransform; + procedure SetTransform(const ATransform: TLib3MFTransform); + end; + + +(************************************************************************************************************************* + Class definition for ComponentsObject +**************************************************************************************************************************) + + TLib3MFComponentsObject = class(TLib3MFObject) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function AddComponent(const AObjectResource: TLib3MFObject; const ATransform: TLib3MFTransform): TLib3MFComponent; + function GetComponent(const AIndex: Cardinal): TLib3MFComponent; + function GetComponentCount(): Cardinal; + end; + + +(************************************************************************************************************************* + Class definition for BeamSet +**************************************************************************************************************************) + + TLib3MFBeamSet = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + procedure SetName(const AName: String); + function GetName(): String; + procedure SetIdentifier(const AIdentifier: String); + function GetIdentifier(): String; + function GetReferenceCount(): Cardinal; + procedure SetReferences(const AReferences: TCardinalDynArray); + procedure GetReferences(out AReferences: TCardinalDynArray); + function GetBallReferenceCount(): Cardinal; procedure SetBallReferences(const ABallReferences: TCardinalDynArray); procedure GetBallReferences(out ABallReferences: TCardinalDynArray); end; (************************************************************************************************************************* - Class definition for BaseMaterialGroup + Class definition for BaseMaterialGroup +**************************************************************************************************************************) + + TLib3MFBaseMaterialGroup = class(TLib3MFResource) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCount(): Cardinal; + procedure GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + function AddMaterial(const AName: String; const ADisplayColor: TLib3MFColor): Cardinal; + procedure RemoveMaterial(const APropertyID: Cardinal); + function GetName(const APropertyID: Cardinal): String; + procedure SetName(const APropertyID: Cardinal; const AName: String); + procedure SetDisplayColor(const APropertyID: Cardinal; const ATheColor: TLib3MFColor); + function GetDisplayColor(const APropertyID: Cardinal): TLib3MFColor; + end; + + +(************************************************************************************************************************* + Class definition for ColorGroup +**************************************************************************************************************************) + + TLib3MFColorGroup = class(TLib3MFResource) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCount(): Cardinal; + procedure GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + function AddColor(const ATheColor: TLib3MFColor): Cardinal; + procedure RemoveColor(const APropertyID: Cardinal); + procedure SetColor(const APropertyID: Cardinal; const ATheColor: TLib3MFColor); + function GetColor(const APropertyID: Cardinal): TLib3MFColor; + end; + + +(************************************************************************************************************************* + Class definition for Texture2DGroup +**************************************************************************************************************************) + + TLib3MFTexture2DGroup = class(TLib3MFResource) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCount(): Cardinal; + procedure GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + function AddTex2Coord(const AUVCoordinate: TLib3MFTex2Coord): Cardinal; + function GetTex2Coord(const APropertyID: Cardinal): TLib3MFTex2Coord; + procedure RemoveTex2Coord(const APropertyID: Cardinal); + function GetTexture2D(): TLib3MFTexture2D; + end; + + +(************************************************************************************************************************* + Class definition for CompositeMaterials +**************************************************************************************************************************) + + TLib3MFCompositeMaterials = class(TLib3MFResource) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCount(): Cardinal; + procedure GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + function GetBaseMaterialGroup(): TLib3MFBaseMaterialGroup; + function AddComposite(const AComposite: ArrayOfLib3MFCompositeConstituent): Cardinal; + procedure RemoveComposite(const APropertyID: Cardinal); + procedure GetComposite(const APropertyID: Cardinal; out AComposite: ArrayOfLib3MFCompositeConstituent); + end; + + +(************************************************************************************************************************* + Class definition for MultiPropertyGroup +**************************************************************************************************************************) + + TLib3MFMultiPropertyGroup = class(TLib3MFResource) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCount(): Cardinal; + procedure GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + function AddMultiProperty(const APropertyIDs: TCardinalDynArray): Cardinal; + procedure SetMultiProperty(const APropertyID: Cardinal; const APropertyIDs: TCardinalDynArray); + procedure GetMultiProperty(const APropertyID: Cardinal; out APropertyIDs: TCardinalDynArray); + procedure RemoveMultiProperty(const APropertyID: Cardinal); + function GetLayerCount(): Cardinal; + function AddLayer(const ATheLayer: TLib3MFMultiPropertyLayer): Cardinal; + function GetLayer(const ALayerIndex: Cardinal): TLib3MFMultiPropertyLayer; + procedure RemoveLayer(const ALayerIndex: Cardinal); + end; + + +(************************************************************************************************************************* + Class definition for Image3D +**************************************************************************************************************************) + + TLib3MFImage3D = class(TLib3MFResource) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetName(): String; + procedure SetName(const AName: String); + function IsImageStack(): Boolean; + end; + + +(************************************************************************************************************************* + Class definition for ImageStack +**************************************************************************************************************************) + + TLib3MFImageStack = class(TLib3MFImage3D) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetRowCount(): Cardinal; + procedure SetRowCount(const ARowCount: Cardinal); + function GetColumnCount(): Cardinal; + procedure SetColumnCount(const AColumnCount: Cardinal); + function GetSheetCount(): Cardinal; + function GetSheet(const AIndex: Cardinal): TLib3MFAttachment; + procedure SetSheet(const AIndex: Cardinal; const ASheet: TLib3MFAttachment); + function CreateEmptySheet(const AIndex: Cardinal; const APath: String): TLib3MFAttachment; + function CreateSheetFromBuffer(const AIndex: Cardinal; const APath: String; const AData: TByteDynArray): TLib3MFAttachment; + function CreateSheetFromFile(const AIndex: Cardinal; const APath: String; const AFileName: String): TLib3MFAttachment; + end; + + +(************************************************************************************************************************* + Class definition for Attachment +**************************************************************************************************************************) + + TLib3MFAttachment = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetPath(): String; + procedure SetPath(const APath: String); + function PackagePart(): TLib3MFPackagePart; + function GetRelationShipType(): String; + procedure SetRelationShipType(const APath: String); + procedure WriteToFile(const AFileName: String); + procedure ReadFromFile(const AFileName: String); + procedure ReadFromCallback(const ATheReadCallback: PLib3MF_ReadCallback; const AStreamSize: QWord; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); + function GetStreamSize(): QWord; + procedure WriteToBuffer(out ABuffer: TByteDynArray); + procedure ReadFromBuffer(const ABuffer: TByteDynArray); + end; + + +(************************************************************************************************************************* + Class definition for Texture2D +**************************************************************************************************************************) + + TLib3MFTexture2D = class(TLib3MFResource) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetAttachment(): TLib3MFAttachment; + procedure SetAttachment(const AAttachment: TLib3MFAttachment); + function GetContentType(): TLib3MFTextureType; + procedure SetContentType(const AContentType: TLib3MFTextureType); + procedure GetTileStyleUV(out ATileStyleU: TLib3MFTextureTileStyle; out ATileStyleV: TLib3MFTextureTileStyle); + procedure SetTileStyleUV(const ATileStyleU: TLib3MFTextureTileStyle; const ATileStyleV: TLib3MFTextureTileStyle); + function GetFilter(): TLib3MFTextureFilter; + procedure SetFilter(const AFilter: TLib3MFTextureFilter); + end; + + +(************************************************************************************************************************* + Class definition for ImplicitPort +**************************************************************************************************************************) + + TLib3MFImplicitPort = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetIdentifier(): String; + procedure SetIdentifier(const AIdentifier: String); + function GetDisplayName(): String; + procedure SetDisplayName(const ADisplayName: String); + procedure SetType(const AImplicitPortType: TLib3MFImplicitPortType); + function GetType(): TLib3MFImplicitPortType; + function GetReference(): String; + procedure SetReference(const AReference: String); + end; + + +(************************************************************************************************************************* + Class definition for Iterator +**************************************************************************************************************************) + + TLib3MFIterator = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function MoveNext(): Boolean; + function MovePrevious(): Boolean; + function Count(): QWord; + end; + + +(************************************************************************************************************************* + Class definition for ImplicitPortIterator +**************************************************************************************************************************) + + TLib3MFImplicitPortIterator = class(TLib3MFIterator) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetCurrent(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for ImplicitNode +**************************************************************************************************************************) + + TLib3MFImplicitNode = class(TLib3MFBase) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetIdentifier(): String; + procedure SetIdentifier(const AIdentifier: String); + function GetDisplayName(): String; + procedure SetDisplayName(const ADisplayName: String); + function GetTag(): String; + procedure SetTag(const ATag: String); + function GetNodeType(): TLib3MFImplicitNodeType; + function AddInput(const AIdentifier: String; const ADisplayName: String): TLib3MFImplicitPort; + function GetInputs(): TLib3MFImplicitPortIterator; + function AddOutput(const AIdentifier: String; const ADisplayName: String): TLib3MFImplicitPort; + function GetOutputs(): TLib3MFImplicitPortIterator; + function FindInput(const AIdentifier: String): TLib3MFImplicitPort; + function FindOutput(const AIdentifier: String): TLib3MFImplicitPort; + function AreTypesValid(): Boolean; + end; + + +(************************************************************************************************************************* + Class definition for OneInputNode +**************************************************************************************************************************) + + TLib3MFOneInputNode = class(TLib3MFImplicitNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputA(): TLib3MFImplicitPort; + function GetOutputResult(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for SinNode +**************************************************************************************************************************) + + TLib3MFSinNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for CosNode +**************************************************************************************************************************) + + TLib3MFCosNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for TanNode +**************************************************************************************************************************) + + TLib3MFTanNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for ArcSinNode +**************************************************************************************************************************) + + TLib3MFArcSinNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for ArcCosNode +**************************************************************************************************************************) + + TLib3MFArcCosNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for ArcTanNode +**************************************************************************************************************************) + + TLib3MFArcTanNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for SinhNode +**************************************************************************************************************************) + + TLib3MFSinhNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for CoshNode +**************************************************************************************************************************) + + TLib3MFCoshNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for TanhNode +**************************************************************************************************************************) + + TLib3MFTanhNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for RoundNode +**************************************************************************************************************************) + + TLib3MFRoundNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for CeilNode +**************************************************************************************************************************) + + TLib3MFCeilNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for FloorNode +**************************************************************************************************************************) + + TLib3MFFloorNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for SignNode +**************************************************************************************************************************) + + TLib3MFSignNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for FractNode +**************************************************************************************************************************) + + TLib3MFFractNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for AbsNode +**************************************************************************************************************************) + + TLib3MFAbsNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for ExpNode +**************************************************************************************************************************) + + TLib3MFExpNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for LogNode +**************************************************************************************************************************) + + TLib3MFLogNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for Log2Node +**************************************************************************************************************************) + + TLib3MFLog2Node = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for Log10Node +**************************************************************************************************************************) + + TLib3MFLog10Node = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for LengthNode +**************************************************************************************************************************) + + TLib3MFLengthNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for TransposeNode +**************************************************************************************************************************) + + TLib3MFTransposeNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for InverseNode +**************************************************************************************************************************) + + TLib3MFInverseNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for SqrtNode +**************************************************************************************************************************) + + TLib3MFSqrtNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for ResourceIdNode +**************************************************************************************************************************) + + TLib3MFResourceIdNode = class(TLib3MFImplicitNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + procedure SetResource(const AResource: TLib3MFResource); + function GetResource(): TLib3MFResource; + function GetOutputValue(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for TwoInputNode +**************************************************************************************************************************) + + TLib3MFTwoInputNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputB(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for AdditionNode +**************************************************************************************************************************) + + TLib3MFAdditionNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for SubtractionNode +**************************************************************************************************************************) + + TLib3MFSubtractionNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for MultiplicationNode +**************************************************************************************************************************) + + TLib3MFMultiplicationNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for DivisionNode +**************************************************************************************************************************) + + TLib3MFDivisionNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for DotNode +**************************************************************************************************************************) + + TLib3MFDotNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for CrossNode +**************************************************************************************************************************) + + TLib3MFCrossNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for ArcTan2Node +**************************************************************************************************************************) + + TLib3MFArcTan2Node = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for MatVecMultiplicationNode +**************************************************************************************************************************) + + TLib3MFMatVecMultiplicationNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for MinNode +**************************************************************************************************************************) + + TLib3MFMinNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for MaxNode +**************************************************************************************************************************) + + TLib3MFMaxNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for FmodNode +**************************************************************************************************************************) + + TLib3MFFmodNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for ModNode +**************************************************************************************************************************) + + TLib3MFModNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for PowNode +**************************************************************************************************************************) + + TLib3MFPowNode = class(TLib3MFTwoInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for SelectNode +**************************************************************************************************************************) + + TLib3MFSelectNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputB(): TLib3MFImplicitPort; + function GetInputC(): TLib3MFImplicitPort; + function GetInputD(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for ClampNode +**************************************************************************************************************************) + + TLib3MFClampNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputMin(): TLib3MFImplicitPort; + function GetInputMax(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for ComposeVectorNode +**************************************************************************************************************************) + + TLib3MFComposeVectorNode = class(TLib3MFImplicitNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputX(): TLib3MFImplicitPort; + function GetInputY(): TLib3MFImplicitPort; + function GetInputZ(): TLib3MFImplicitPort; + function GetOutputResult(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for VectorFromScalarNode +**************************************************************************************************************************) + + TLib3MFVectorFromScalarNode = class(TLib3MFOneInputNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + end; + + +(************************************************************************************************************************* + Class definition for DecomposeVectorNode +**************************************************************************************************************************) + + TLib3MFDecomposeVectorNode = class(TLib3MFImplicitNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputA(): TLib3MFImplicitPort; + function GetOutputX(): TLib3MFImplicitPort; + function GetOutputY(): TLib3MFImplicitPort; + function GetOutputZ(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for ComposeMatrixNode +**************************************************************************************************************************) + + TLib3MFComposeMatrixNode = class(TLib3MFImplicitNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputM00(): TLib3MFImplicitPort; + function GetInputM01(): TLib3MFImplicitPort; + function GetInputM02(): TLib3MFImplicitPort; + function GetInputM03(): TLib3MFImplicitPort; + function GetInputM10(): TLib3MFImplicitPort; + function GetInputM11(): TLib3MFImplicitPort; + function GetInputM12(): TLib3MFImplicitPort; + function GetInputM13(): TLib3MFImplicitPort; + function GetInputM20(): TLib3MFImplicitPort; + function GetInputM21(): TLib3MFImplicitPort; + function GetInputM22(): TLib3MFImplicitPort; + function GetInputM23(): TLib3MFImplicitPort; + function GetInputM30(): TLib3MFImplicitPort; + function GetInputM31(): TLib3MFImplicitPort; + function GetInputM32(): TLib3MFImplicitPort; + function GetInputM33(): TLib3MFImplicitPort; + function GetOutputResult(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for MatrixFromRowsNode +**************************************************************************************************************************) + + TLib3MFMatrixFromRowsNode = class(TLib3MFImplicitNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputA(): TLib3MFImplicitPort; + function GetInputB(): TLib3MFImplicitPort; + function GetInputC(): TLib3MFImplicitPort; + function GetInputD(): TLib3MFImplicitPort; + function GetOutputResult(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for MatrixFromColumnsNode +**************************************************************************************************************************) + + TLib3MFMatrixFromColumnsNode = class(TLib3MFImplicitNode) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetInputA(): TLib3MFImplicitPort; + function GetInputB(): TLib3MFImplicitPort; + function GetInputC(): TLib3MFImplicitPort; + function GetInputD(): TLib3MFImplicitPort; + function GetOutputResult(): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for ConstantNode **************************************************************************************************************************) - TLib3MFBaseMaterialGroup = class(TLib3MFResource) + TLib3MFConstantNode = class(TLib3MFImplicitNode) public constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); destructor Destroy; override; - function GetCount(): Cardinal; - procedure GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); - function AddMaterial(const AName: String; const ADisplayColor: TLib3MFColor): Cardinal; - procedure RemoveMaterial(const APropertyID: Cardinal); - function GetName(const APropertyID: Cardinal): String; - procedure SetName(const APropertyID: Cardinal; const AName: String); - procedure SetDisplayColor(const APropertyID: Cardinal; const ATheColor: TLib3MFColor); - function GetDisplayColor(const APropertyID: Cardinal): TLib3MFColor; + procedure SetConstant(const AValue: Double); + function GetConstant(): Double; + function GetOutputValue(): TLib3MFImplicitPort; end; (************************************************************************************************************************* - Class definition for ColorGroup + Class definition for ConstVecNode **************************************************************************************************************************) - TLib3MFColorGroup = class(TLib3MFResource) + TLib3MFConstVecNode = class(TLib3MFImplicitNode) public constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); destructor Destroy; override; - function GetCount(): Cardinal; - procedure GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); - function AddColor(const ATheColor: TLib3MFColor): Cardinal; - procedure RemoveColor(const APropertyID: Cardinal); - procedure SetColor(const APropertyID: Cardinal; const ATheColor: TLib3MFColor); - function GetColor(const APropertyID: Cardinal): TLib3MFColor; + procedure SetVector(const AValue: TLib3MFVector); + function GetVector(): TLib3MFVector; + function GetOutputVector(): TLib3MFImplicitPort; end; (************************************************************************************************************************* - Class definition for Texture2DGroup + Class definition for ConstMatNode **************************************************************************************************************************) - TLib3MFTexture2DGroup = class(TLib3MFResource) + TLib3MFConstMatNode = class(TLib3MFImplicitNode) public constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); destructor Destroy; override; - function GetCount(): Cardinal; - procedure GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); - function AddTex2Coord(const AUVCoordinate: TLib3MFTex2Coord): Cardinal; - function GetTex2Coord(const APropertyID: Cardinal): TLib3MFTex2Coord; - procedure RemoveTex2Coord(const APropertyID: Cardinal); - function GetTexture2D(): TLib3MFTexture2D; + procedure SetMatrix(const AValue: TLib3MFMatrix4x4); + function GetMatrix(): TLib3MFMatrix4x4; + function GetOutputMatrix(): TLib3MFImplicitPort; end; (************************************************************************************************************************* - Class definition for CompositeMaterials + Class definition for MeshNode **************************************************************************************************************************) - TLib3MFCompositeMaterials = class(TLib3MFResource) + TLib3MFMeshNode = class(TLib3MFImplicitNode) public constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); destructor Destroy; override; - function GetCount(): Cardinal; - procedure GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); - function GetBaseMaterialGroup(): TLib3MFBaseMaterialGroup; - function AddComposite(const AComposite: ArrayOfLib3MFCompositeConstituent): Cardinal; - procedure RemoveComposite(const APropertyID: Cardinal); - procedure GetComposite(const APropertyID: Cardinal; out AComposite: ArrayOfLib3MFCompositeConstituent); + function GetInputMesh(): TLib3MFImplicitPort; + function GetInputPos(): TLib3MFImplicitPort; + function GetOutputDistance(): TLib3MFImplicitPort; end; (************************************************************************************************************************* - Class definition for MultiPropertyGroup + Class definition for UnsignedMeshNode **************************************************************************************************************************) - TLib3MFMultiPropertyGroup = class(TLib3MFResource) + TLib3MFUnsignedMeshNode = class(TLib3MFImplicitNode) public constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); destructor Destroy; override; - function GetCount(): Cardinal; - procedure GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); - function AddMultiProperty(const APropertyIDs: TCardinalDynArray): Cardinal; - procedure SetMultiProperty(const APropertyID: Cardinal; const APropertyIDs: TCardinalDynArray); - procedure GetMultiProperty(const APropertyID: Cardinal; out APropertyIDs: TCardinalDynArray); - procedure RemoveMultiProperty(const APropertyID: Cardinal); - function GetLayerCount(): Cardinal; - function AddLayer(const ATheLayer: TLib3MFMultiPropertyLayer): Cardinal; - function GetLayer(const ALayerIndex: Cardinal): TLib3MFMultiPropertyLayer; - procedure RemoveLayer(const ALayerIndex: Cardinal); + function GetInputMesh(): TLib3MFImplicitPort; + function GetInputPos(): TLib3MFImplicitPort; + function GetOutputDistance(): TLib3MFImplicitPort; end; (************************************************************************************************************************* - Class definition for Attachment + Class definition for FunctionCallNode **************************************************************************************************************************) - TLib3MFAttachment = class(TLib3MFBase) + TLib3MFFunctionCallNode = class(TLib3MFImplicitNode) public constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); destructor Destroy; override; - function GetPath(): String; - procedure SetPath(const APath: String); - function PackagePart(): TLib3MFPackagePart; - function GetRelationShipType(): String; - procedure SetRelationShipType(const APath: String); - procedure WriteToFile(const AFileName: String); - procedure ReadFromFile(const AFileName: String); - procedure ReadFromCallback(const ATheReadCallback: PLib3MF_ReadCallback; const AStreamSize: QWord; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); - function GetStreamSize(): QWord; - procedure WriteToBuffer(out ABuffer: TByteDynArray); - procedure ReadFromBuffer(const ABuffer: TByteDynArray); + function GetInputFunctionID(): TLib3MFImplicitPort; end; (************************************************************************************************************************* - Class definition for Texture2D + Class definition for NodeIterator **************************************************************************************************************************) - TLib3MFTexture2D = class(TLib3MFResource) + TLib3MFNodeIterator = class(TLib3MFIterator) public constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); destructor Destroy; override; - function GetAttachment(): TLib3MFAttachment; - procedure SetAttachment(const AAttachment: TLib3MFAttachment); - function GetContentType(): TLib3MFTextureType; - procedure SetContentType(const AContentType: TLib3MFTextureType); - procedure GetTileStyleUV(out ATileStyleU: TLib3MFTextureTileStyle; out ATileStyleV: TLib3MFTextureTileStyle); - procedure SetTileStyleUV(const ATileStyleU: TLib3MFTextureTileStyle; const ATileStyleV: TLib3MFTextureTileStyle); - function GetFilter(): TLib3MFTextureFilter; + function GetCurrent(): TLib3MFImplicitNode; + end; + + +(************************************************************************************************************************* + Class definition for Function +**************************************************************************************************************************) + + TLib3MFFunction = class(TLib3MFResource) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetDisplayName(): String; + procedure SetDisplayName(const ADisplayName: String); + function AddInput(const AIdentifier: String; const ADisplayName: String; const AType: TLib3MFImplicitPortType): TLib3MFImplicitPort; + function GetInputs(): TLib3MFImplicitPortIterator; + procedure RemoveInput(const AInput: TLib3MFImplicitPort); + function AddOutput(const AIdentifier: String; const ADisplayName: String; const AType: TLib3MFImplicitPortType): TLib3MFImplicitPort; + function GetOutputs(): TLib3MFImplicitPortIterator; + procedure RemoveOutput(const AOutput: TLib3MFImplicitPort); + function FindInput(const AIdentifier: String): TLib3MFImplicitPort; + function FindOutput(const AIdentifier: String): TLib3MFImplicitPort; + end; + + +(************************************************************************************************************************* + Class definition for ImplicitFunction +**************************************************************************************************************************) + + TLib3MFImplicitFunction = class(TLib3MFFunction) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetIdentifier(): String; + procedure SetIdentifier(const AIdentifier: String); + function AddNode(const ANodeType: TLib3MFImplicitNodeType; const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFImplicitNode; + function AddSinNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSinNode; + function AddCosNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFCosNode; + function AddTanNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFTanNode; + function AddArcSinNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFArcSinNode; + function AddArcCosNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFArcCosNode; + function AddArcTan2Node(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFArcTan2Node; + function AddSinhNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSinhNode; + function AddCoshNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFCoshNode; + function AddTanhNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFTanhNode; + function AddRoundNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFRoundNode; + function AddCeilNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFCeilNode; + function AddFloorNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFFloorNode; + function AddSignNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSignNode; + function AddFractNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFFractNode; + function AddAbsNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFAbsNode; + function AddExpNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFExpNode; + function AddLogNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFLogNode; + function AddLog2Node(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFLog2Node; + function AddLog10Node(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFLog10Node; + function AddLengthNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFLengthNode; + function AddTransposeNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFTransposeNode; + function InverseNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFInverseNode; + function AddSqrtNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSqrtNode; + function AddResourceIdNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFResourceIdNode; + function AddAdditionNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFAdditionNode; + function AddSubtractionNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSubtractionNode; + function AddMultiplicationNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFMultiplicationNode; + function AddDivisionNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFDivisionNode; + function AddDotNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFDotNode; + function AddCrossNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFCrossNode; + function AddMatVecMultiplicationNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFMatVecMultiplicationNode; + function AddMinNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFMinNode; + function AddMaxNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFMaxNode; + function AddFmodNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFFmodNode; + function AddPowNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFPowNode; + function AddSelectNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSelectNode; + function AddClampNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFClampNode; + function AddComposeVectorNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFComposeVectorNode; + function AddVectorFromScalarNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFVectorFromScalarNode; + function AddDecomposeVectorNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFDecomposeVectorNode; + function AddComposeMatrixNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFComposeMatrixNode; + function AddMatrixFromRowsNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFMatrixFromRowsNode; + function AddMatrixFromColumnsNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFMatrixFromColumnsNode; + function AddConstantNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFConstantNode; + function AddConstVecNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFConstVecNode; + function AddConstMatNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFConstMatNode; + function AddMeshNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFMeshNode; + function AddUnsignedMeshNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFUnsignedMeshNode; + function AddFunctionCallNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFFunctionCallNode; + function GetNodes(): TLib3MFNodeIterator; + procedure RemoveNode(const ANode: TLib3MFImplicitNode); + procedure AddLink(const ASource: TLib3MFImplicitPort; const ATarget: TLib3MFImplicitPort); + procedure AddLinkByNames(const ASource: String; const ATarget: String); + procedure Clear(); + procedure SortNodesTopologically(); + end; + + +(************************************************************************************************************************* + Class definition for FunctionFromImage3D +**************************************************************************************************************************) + + TLib3MFFunctionFromImage3D = class(TLib3MFFunction) + public + constructor Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + destructor Destroy; override; + function GetImage3D(): TLib3MFImage3D; + procedure SetImage3D(const AImage3D: TLib3MFImage3D); procedure SetFilter(const AFilter: TLib3MFTextureFilter); + function GetFilter(): TLib3MFTextureFilter; + procedure SetTileStyles(const ATileStyleU: TLib3MFTextureTileStyle; const ATileStyleV: TLib3MFTextureTileStyle; const ATileStyleW: TLib3MFTextureTileStyle); + procedure GetTileStyles(out ATileStyleU: TLib3MFTextureTileStyle; out ATileStyleV: TLib3MFTextureTileStyle; out ATileStyleW: TLib3MFTextureTileStyle); + function GetOffset(): Double; + procedure SetOffset(const AOffset: Double); + function GetScale(): Double; + procedure SetScale(const AScale: Double); end; @@ -4910,6 +8920,7 @@ TLib3MFModel = class(TLib3MFBase) function GetComponentsObjectByID(const AUniqueResourceID: Cardinal): TLib3MFComponentsObject; function GetColorGroupByID(const AUniqueResourceID: Cardinal): TLib3MFColorGroup; function GetSliceStackByID(const AUniqueResourceID: Cardinal): TLib3MFSliceStack; + function GetLevelSetByID(const AUniqueResourceID: Cardinal): TLib3MFLevelSet; function GetBuildUUID(out AHasUUID: Boolean): String; procedure SetBuildUUID(const AUUID: String); function GetBuildItems(): TLib3MFBuildItemIterator; @@ -4925,7 +8936,9 @@ TLib3MFModel = class(TLib3MFBase) function GetCompositeMaterials(): TLib3MFCompositeMaterialsIterator; function GetMultiPropertyGroups(): TLib3MFMultiPropertyGroupIterator; function GetSliceStacks(): TLib3MFSliceStackIterator; + function GetImage3Ds(): TLib3MFImage3DIterator; function MergeToModel(): TLib3MFModel; + procedure MergeFromModel(const AModelInstance: TLib3MFModel); function AddMeshObject(): TLib3MFMeshObject; function AddComponentsObject(): TLib3MFComponentsObject; function AddSliceStack(const AZBottom: Double): TLib3MFSliceStack; @@ -4935,6 +8948,8 @@ TLib3MFModel = class(TLib3MFBase) function AddTexture2DGroup(const ATexture2DInstance: TLib3MFTexture2D): TLib3MFTexture2DGroup; function AddCompositeMaterials(const ABaseMaterialGroupInstance: TLib3MFBaseMaterialGroup): TLib3MFCompositeMaterials; function AddMultiPropertyGroup(): TLib3MFMultiPropertyGroup; + function AddImageStack(const AColumnCount: Cardinal; const ARowCount: Cardinal; const ASheetCount: Cardinal): TLib3MFImageStack; + function GetImageStackByID(const AUniqueResourceID: Cardinal): TLib3MFImageStack; function AddBuildItem(const AObject: TLib3MFObject; const ATransform: TLib3MFTransform): TLib3MFBuildItem; procedure RemoveBuildItem(const ABuildItemInstance: TLib3MFBuildItem); function GetMetaDataGroup(): TLib3MFMetaDataGroup; @@ -4951,6 +8966,13 @@ TLib3MFModel = class(TLib3MFBase) procedure RemoveCustomContentType(const AExtension: String); procedure SetRandomNumberCallback(const ATheCallback: PLib3MF_RandomNumberCallback; const AUserData: Pointer); function GetKeyStore(): TLib3MFKeyStore; + function GetFunctions(): TLib3MFFunctionIterator; + function AddImplicitFunction(): TLib3MFImplicitFunction; + function AddFunctionFromImage3D(const AImage3DInstance: TLib3MFImage3D): TLib3MFFunctionFromImage3D; + function AddVolumeData(): TLib3MFVolumeData; + function AddLevelSet(): TLib3MFLevelSet; + function GetLevelSets(): TLib3MFLevelSetIterator; + procedure RemoveResource(const AResource: TLib3MFResource); end; (************************************************************************************************************************* @@ -5008,6 +9030,9 @@ TLib3MFWrapper = class(TObject) FLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupFunc: TLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupFunc; FLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsFunc: TLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsFunc; FLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupFunc: TLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupFunc; + FLib3MFImage3DIterator_GetCurrentImage3DFunc: TLib3MFImage3DIterator_GetCurrentImage3DFunc; + FLib3MFFunctionIterator_GetCurrentFunctionFunc: TLib3MFFunctionIterator_GetCurrentFunctionFunc; + FLib3MFLevelSetIterator_GetCurrentLevelSetFunc: TLib3MFLevelSetIterator_GetCurrentLevelSetFunc; FLib3MFMetaData_GetNameSpaceFunc: TLib3MFMetaData_GetNameSpaceFunc; FLib3MFMetaData_SetNameSpaceFunc: TLib3MFMetaData_SetNameSpaceFunc; FLib3MFMetaData_GetNameFunc: TLib3MFMetaData_GetNameFunc; @@ -5033,6 +9058,7 @@ TLib3MFWrapper = class(TObject) FLib3MFObject_SetPartNumberFunc: TLib3MFObject_SetPartNumberFunc; FLib3MFObject_IsMeshObjectFunc: TLib3MFObject_IsMeshObjectFunc; FLib3MFObject_IsComponentsObjectFunc: TLib3MFObject_IsComponentsObjectFunc; + FLib3MFObject_IsLevelSetObjectFunc: TLib3MFObject_IsLevelSetObjectFunc; FLib3MFObject_IsValidFunc: TLib3MFObject_IsValidFunc; FLib3MFObject_SetAttachmentAsThumbnailFunc: TLib3MFObject_SetAttachmentAsThumbnailFunc; FLib3MFObject_GetThumbnailAttachmentFunc: TLib3MFObject_GetThumbnailAttachmentFunc; @@ -5067,6 +9093,24 @@ TLib3MFWrapper = class(TObject) FLib3MFMeshObject_SetGeometryFunc: TLib3MFMeshObject_SetGeometryFunc; FLib3MFMeshObject_IsManifoldAndOrientedFunc: TLib3MFMeshObject_IsManifoldAndOrientedFunc; FLib3MFMeshObject_BeamLatticeFunc: TLib3MFMeshObject_BeamLatticeFunc; + FLib3MFMeshObject_GetVolumeDataFunc: TLib3MFMeshObject_GetVolumeDataFunc; + FLib3MFMeshObject_SetVolumeDataFunc: TLib3MFMeshObject_SetVolumeDataFunc; + FLib3MFLevelSet_GetFunctionFunc: TLib3MFLevelSet_GetFunctionFunc; + FLib3MFLevelSet_SetFunctionFunc: TLib3MFLevelSet_SetFunctionFunc; + FLib3MFLevelSet_GetTransformFunc: TLib3MFLevelSet_GetTransformFunc; + FLib3MFLevelSet_SetTransformFunc: TLib3MFLevelSet_SetTransformFunc; + FLib3MFLevelSet_GetChannelNameFunc: TLib3MFLevelSet_GetChannelNameFunc; + FLib3MFLevelSet_SetChannelNameFunc: TLib3MFLevelSet_SetChannelNameFunc; + FLib3MFLevelSet_SetMinFeatureSizeFunc: TLib3MFLevelSet_SetMinFeatureSizeFunc; + FLib3MFLevelSet_GetMinFeatureSizeFunc: TLib3MFLevelSet_GetMinFeatureSizeFunc; + FLib3MFLevelSet_SetFallBackValueFunc: TLib3MFLevelSet_SetFallBackValueFunc; + FLib3MFLevelSet_GetFallBackValueFunc: TLib3MFLevelSet_GetFallBackValueFunc; + FLib3MFLevelSet_SetMeshBBoxOnlyFunc: TLib3MFLevelSet_SetMeshBBoxOnlyFunc; + FLib3MFLevelSet_GetMeshBBoxOnlyFunc: TLib3MFLevelSet_GetMeshBBoxOnlyFunc; + FLib3MFLevelSet_SetMeshFunc: TLib3MFLevelSet_SetMeshFunc; + FLib3MFLevelSet_GetMeshFunc: TLib3MFLevelSet_GetMeshFunc; + FLib3MFLevelSet_GetVolumeDataFunc: TLib3MFLevelSet_GetVolumeDataFunc; + FLib3MFLevelSet_SetVolumeDataFunc: TLib3MFLevelSet_SetVolumeDataFunc; FLib3MFBeamLattice_GetMinLengthFunc: TLib3MFBeamLattice_GetMinLengthFunc; FLib3MFBeamLattice_SetMinLengthFunc: TLib3MFBeamLattice_SetMinLengthFunc; FLib3MFBeamLattice_GetClippingFunc: TLib3MFBeamLattice_GetClippingFunc; @@ -5090,6 +9134,35 @@ TLib3MFWrapper = class(TObject) FLib3MFBeamLattice_GetBeamSetCountFunc: TLib3MFBeamLattice_GetBeamSetCountFunc; FLib3MFBeamLattice_AddBeamSetFunc: TLib3MFBeamLattice_AddBeamSetFunc; FLib3MFBeamLattice_GetBeamSetFunc: TLib3MFBeamLattice_GetBeamSetFunc; + FLib3MFFunctionReference_GetFunctionResourceIDFunc: TLib3MFFunctionReference_GetFunctionResourceIDFunc; + FLib3MFFunctionReference_SetFunctionResourceIDFunc: TLib3MFFunctionReference_SetFunctionResourceIDFunc; + FLib3MFFunctionReference_GetTransformFunc: TLib3MFFunctionReference_GetTransformFunc; + FLib3MFFunctionReference_SetTransformFunc: TLib3MFFunctionReference_SetTransformFunc; + FLib3MFFunctionReference_GetChannelNameFunc: TLib3MFFunctionReference_GetChannelNameFunc; + FLib3MFFunctionReference_SetChannelNameFunc: TLib3MFFunctionReference_SetChannelNameFunc; + FLib3MFFunctionReference_SetMinFeatureSizeFunc: TLib3MFFunctionReference_SetMinFeatureSizeFunc; + FLib3MFFunctionReference_GetMinFeatureSizeFunc: TLib3MFFunctionReference_GetMinFeatureSizeFunc; + FLib3MFFunctionReference_SetFallBackValueFunc: TLib3MFFunctionReference_SetFallBackValueFunc; + FLib3MFFunctionReference_GetFallBackValueFunc: TLib3MFFunctionReference_GetFallBackValueFunc; + FLib3MFVolumeDataComposite_GetBaseMaterialGroupFunc: TLib3MFVolumeDataComposite_GetBaseMaterialGroupFunc; + FLib3MFVolumeDataComposite_SetBaseMaterialGroupFunc: TLib3MFVolumeDataComposite_SetBaseMaterialGroupFunc; + FLib3MFVolumeDataComposite_GetMaterialMappingCountFunc: TLib3MFVolumeDataComposite_GetMaterialMappingCountFunc; + FLib3MFVolumeDataComposite_GetMaterialMappingFunc: TLib3MFVolumeDataComposite_GetMaterialMappingFunc; + FLib3MFVolumeDataComposite_AddMaterialMappingFunc: TLib3MFVolumeDataComposite_AddMaterialMappingFunc; + FLib3MFVolumeDataComposite_RemoveMaterialMappingFunc: TLib3MFVolumeDataComposite_RemoveMaterialMappingFunc; + FLib3MFVolumeDataProperty_GetNameFunc: TLib3MFVolumeDataProperty_GetNameFunc; + FLib3MFVolumeDataProperty_SetIsRequiredFunc: TLib3MFVolumeDataProperty_SetIsRequiredFunc; + FLib3MFVolumeDataProperty_IsRequiredFunc: TLib3MFVolumeDataProperty_IsRequiredFunc; + FLib3MFVolumeData_GetCompositeFunc: TLib3MFVolumeData_GetCompositeFunc; + FLib3MFVolumeData_CreateNewCompositeFunc: TLib3MFVolumeData_CreateNewCompositeFunc; + FLib3MFVolumeData_RemoveCompositeFunc: TLib3MFVolumeData_RemoveCompositeFunc; + FLib3MFVolumeData_GetColorFunc: TLib3MFVolumeData_GetColorFunc; + FLib3MFVolumeData_CreateNewColorFunc: TLib3MFVolumeData_CreateNewColorFunc; + FLib3MFVolumeData_RemoveColorFunc: TLib3MFVolumeData_RemoveColorFunc; + FLib3MFVolumeData_GetPropertyCountFunc: TLib3MFVolumeData_GetPropertyCountFunc; + FLib3MFVolumeData_GetPropertyFunc: TLib3MFVolumeData_GetPropertyFunc; + FLib3MFVolumeData_AddPropertyFromFunctionFunc: TLib3MFVolumeData_AddPropertyFromFunctionFunc; + FLib3MFVolumeData_RemovePropertyFunc: TLib3MFVolumeData_RemovePropertyFunc; FLib3MFComponent_GetObjectResourceFunc: TLib3MFComponent_GetObjectResourceFunc; FLib3MFComponent_GetObjectResourceIDFunc: TLib3MFComponent_GetObjectResourceIDFunc; FLib3MFComponent_GetUUIDFunc: TLib3MFComponent_GetUUIDFunc; @@ -5146,6 +9219,19 @@ TLib3MFWrapper = class(TObject) FLib3MFMultiPropertyGroup_AddLayerFunc: TLib3MFMultiPropertyGroup_AddLayerFunc; FLib3MFMultiPropertyGroup_GetLayerFunc: TLib3MFMultiPropertyGroup_GetLayerFunc; FLib3MFMultiPropertyGroup_RemoveLayerFunc: TLib3MFMultiPropertyGroup_RemoveLayerFunc; + FLib3MFImage3D_GetNameFunc: TLib3MFImage3D_GetNameFunc; + FLib3MFImage3D_SetNameFunc: TLib3MFImage3D_SetNameFunc; + FLib3MFImage3D_IsImageStackFunc: TLib3MFImage3D_IsImageStackFunc; + FLib3MFImageStack_GetRowCountFunc: TLib3MFImageStack_GetRowCountFunc; + FLib3MFImageStack_SetRowCountFunc: TLib3MFImageStack_SetRowCountFunc; + FLib3MFImageStack_GetColumnCountFunc: TLib3MFImageStack_GetColumnCountFunc; + FLib3MFImageStack_SetColumnCountFunc: TLib3MFImageStack_SetColumnCountFunc; + FLib3MFImageStack_GetSheetCountFunc: TLib3MFImageStack_GetSheetCountFunc; + FLib3MFImageStack_GetSheetFunc: TLib3MFImageStack_GetSheetFunc; + FLib3MFImageStack_SetSheetFunc: TLib3MFImageStack_SetSheetFunc; + FLib3MFImageStack_CreateEmptySheetFunc: TLib3MFImageStack_CreateEmptySheetFunc; + FLib3MFImageStack_CreateSheetFromBufferFunc: TLib3MFImageStack_CreateSheetFromBufferFunc; + FLib3MFImageStack_CreateSheetFromFileFunc: TLib3MFImageStack_CreateSheetFromFileFunc; FLib3MFAttachment_GetPathFunc: TLib3MFAttachment_GetPathFunc; FLib3MFAttachment_SetPathFunc: TLib3MFAttachment_SetPathFunc; FLib3MFAttachment_PackagePartFunc: TLib3MFAttachment_PackagePartFunc; @@ -5165,6 +9251,173 @@ TLib3MFWrapper = class(TObject) FLib3MFTexture2D_SetTileStyleUVFunc: TLib3MFTexture2D_SetTileStyleUVFunc; FLib3MFTexture2D_GetFilterFunc: TLib3MFTexture2D_GetFilterFunc; FLib3MFTexture2D_SetFilterFunc: TLib3MFTexture2D_SetFilterFunc; + FLib3MFImplicitPort_GetIdentifierFunc: TLib3MFImplicitPort_GetIdentifierFunc; + FLib3MFImplicitPort_SetIdentifierFunc: TLib3MFImplicitPort_SetIdentifierFunc; + FLib3MFImplicitPort_GetDisplayNameFunc: TLib3MFImplicitPort_GetDisplayNameFunc; + FLib3MFImplicitPort_SetDisplayNameFunc: TLib3MFImplicitPort_SetDisplayNameFunc; + FLib3MFImplicitPort_SetTypeFunc: TLib3MFImplicitPort_SetTypeFunc; + FLib3MFImplicitPort_GetTypeFunc: TLib3MFImplicitPort_GetTypeFunc; + FLib3MFImplicitPort_GetReferenceFunc: TLib3MFImplicitPort_GetReferenceFunc; + FLib3MFImplicitPort_SetReferenceFunc: TLib3MFImplicitPort_SetReferenceFunc; + FLib3MFIterator_MoveNextFunc: TLib3MFIterator_MoveNextFunc; + FLib3MFIterator_MovePreviousFunc: TLib3MFIterator_MovePreviousFunc; + FLib3MFIterator_CountFunc: TLib3MFIterator_CountFunc; + FLib3MFImplicitPortIterator_GetCurrentFunc: TLib3MFImplicitPortIterator_GetCurrentFunc; + FLib3MFImplicitNode_GetIdentifierFunc: TLib3MFImplicitNode_GetIdentifierFunc; + FLib3MFImplicitNode_SetIdentifierFunc: TLib3MFImplicitNode_SetIdentifierFunc; + FLib3MFImplicitNode_GetDisplayNameFunc: TLib3MFImplicitNode_GetDisplayNameFunc; + FLib3MFImplicitNode_SetDisplayNameFunc: TLib3MFImplicitNode_SetDisplayNameFunc; + FLib3MFImplicitNode_GetTagFunc: TLib3MFImplicitNode_GetTagFunc; + FLib3MFImplicitNode_SetTagFunc: TLib3MFImplicitNode_SetTagFunc; + FLib3MFImplicitNode_GetNodeTypeFunc: TLib3MFImplicitNode_GetNodeTypeFunc; + FLib3MFImplicitNode_AddInputFunc: TLib3MFImplicitNode_AddInputFunc; + FLib3MFImplicitNode_GetInputsFunc: TLib3MFImplicitNode_GetInputsFunc; + FLib3MFImplicitNode_AddOutputFunc: TLib3MFImplicitNode_AddOutputFunc; + FLib3MFImplicitNode_GetOutputsFunc: TLib3MFImplicitNode_GetOutputsFunc; + FLib3MFImplicitNode_FindInputFunc: TLib3MFImplicitNode_FindInputFunc; + FLib3MFImplicitNode_FindOutputFunc: TLib3MFImplicitNode_FindOutputFunc; + FLib3MFImplicitNode_AreTypesValidFunc: TLib3MFImplicitNode_AreTypesValidFunc; + FLib3MFOneInputNode_GetInputAFunc: TLib3MFOneInputNode_GetInputAFunc; + FLib3MFOneInputNode_GetOutputResultFunc: TLib3MFOneInputNode_GetOutputResultFunc; + FLib3MFResourceIdNode_SetResourceFunc: TLib3MFResourceIdNode_SetResourceFunc; + FLib3MFResourceIdNode_GetResourceFunc: TLib3MFResourceIdNode_GetResourceFunc; + FLib3MFResourceIdNode_GetOutputValueFunc: TLib3MFResourceIdNode_GetOutputValueFunc; + FLib3MFTwoInputNode_GetInputBFunc: TLib3MFTwoInputNode_GetInputBFunc; + FLib3MFSelectNode_GetInputBFunc: TLib3MFSelectNode_GetInputBFunc; + FLib3MFSelectNode_GetInputCFunc: TLib3MFSelectNode_GetInputCFunc; + FLib3MFSelectNode_GetInputDFunc: TLib3MFSelectNode_GetInputDFunc; + FLib3MFClampNode_GetInputMinFunc: TLib3MFClampNode_GetInputMinFunc; + FLib3MFClampNode_GetInputMaxFunc: TLib3MFClampNode_GetInputMaxFunc; + FLib3MFComposeVectorNode_GetInputXFunc: TLib3MFComposeVectorNode_GetInputXFunc; + FLib3MFComposeVectorNode_GetInputYFunc: TLib3MFComposeVectorNode_GetInputYFunc; + FLib3MFComposeVectorNode_GetInputZFunc: TLib3MFComposeVectorNode_GetInputZFunc; + FLib3MFComposeVectorNode_GetOutputResultFunc: TLib3MFComposeVectorNode_GetOutputResultFunc; + FLib3MFDecomposeVectorNode_GetInputAFunc: TLib3MFDecomposeVectorNode_GetInputAFunc; + FLib3MFDecomposeVectorNode_GetOutputXFunc: TLib3MFDecomposeVectorNode_GetOutputXFunc; + FLib3MFDecomposeVectorNode_GetOutputYFunc: TLib3MFDecomposeVectorNode_GetOutputYFunc; + FLib3MFDecomposeVectorNode_GetOutputZFunc: TLib3MFDecomposeVectorNode_GetOutputZFunc; + FLib3MFComposeMatrixNode_GetInputM00Func: TLib3MFComposeMatrixNode_GetInputM00Func; + FLib3MFComposeMatrixNode_GetInputM01Func: TLib3MFComposeMatrixNode_GetInputM01Func; + FLib3MFComposeMatrixNode_GetInputM02Func: TLib3MFComposeMatrixNode_GetInputM02Func; + FLib3MFComposeMatrixNode_GetInputM03Func: TLib3MFComposeMatrixNode_GetInputM03Func; + FLib3MFComposeMatrixNode_GetInputM10Func: TLib3MFComposeMatrixNode_GetInputM10Func; + FLib3MFComposeMatrixNode_GetInputM11Func: TLib3MFComposeMatrixNode_GetInputM11Func; + FLib3MFComposeMatrixNode_GetInputM12Func: TLib3MFComposeMatrixNode_GetInputM12Func; + FLib3MFComposeMatrixNode_GetInputM13Func: TLib3MFComposeMatrixNode_GetInputM13Func; + FLib3MFComposeMatrixNode_GetInputM20Func: TLib3MFComposeMatrixNode_GetInputM20Func; + FLib3MFComposeMatrixNode_GetInputM21Func: TLib3MFComposeMatrixNode_GetInputM21Func; + FLib3MFComposeMatrixNode_GetInputM22Func: TLib3MFComposeMatrixNode_GetInputM22Func; + FLib3MFComposeMatrixNode_GetInputM23Func: TLib3MFComposeMatrixNode_GetInputM23Func; + FLib3MFComposeMatrixNode_GetInputM30Func: TLib3MFComposeMatrixNode_GetInputM30Func; + FLib3MFComposeMatrixNode_GetInputM31Func: TLib3MFComposeMatrixNode_GetInputM31Func; + FLib3MFComposeMatrixNode_GetInputM32Func: TLib3MFComposeMatrixNode_GetInputM32Func; + FLib3MFComposeMatrixNode_GetInputM33Func: TLib3MFComposeMatrixNode_GetInputM33Func; + FLib3MFComposeMatrixNode_GetOutputResultFunc: TLib3MFComposeMatrixNode_GetOutputResultFunc; + FLib3MFMatrixFromRowsNode_GetInputAFunc: TLib3MFMatrixFromRowsNode_GetInputAFunc; + FLib3MFMatrixFromRowsNode_GetInputBFunc: TLib3MFMatrixFromRowsNode_GetInputBFunc; + FLib3MFMatrixFromRowsNode_GetInputCFunc: TLib3MFMatrixFromRowsNode_GetInputCFunc; + FLib3MFMatrixFromRowsNode_GetInputDFunc: TLib3MFMatrixFromRowsNode_GetInputDFunc; + FLib3MFMatrixFromRowsNode_GetOutputResultFunc: TLib3MFMatrixFromRowsNode_GetOutputResultFunc; + FLib3MFMatrixFromColumnsNode_GetInputAFunc: TLib3MFMatrixFromColumnsNode_GetInputAFunc; + FLib3MFMatrixFromColumnsNode_GetInputBFunc: TLib3MFMatrixFromColumnsNode_GetInputBFunc; + FLib3MFMatrixFromColumnsNode_GetInputCFunc: TLib3MFMatrixFromColumnsNode_GetInputCFunc; + FLib3MFMatrixFromColumnsNode_GetInputDFunc: TLib3MFMatrixFromColumnsNode_GetInputDFunc; + FLib3MFMatrixFromColumnsNode_GetOutputResultFunc: TLib3MFMatrixFromColumnsNode_GetOutputResultFunc; + FLib3MFConstantNode_SetConstantFunc: TLib3MFConstantNode_SetConstantFunc; + FLib3MFConstantNode_GetConstantFunc: TLib3MFConstantNode_GetConstantFunc; + FLib3MFConstantNode_GetOutputValueFunc: TLib3MFConstantNode_GetOutputValueFunc; + FLib3MFConstVecNode_SetVectorFunc: TLib3MFConstVecNode_SetVectorFunc; + FLib3MFConstVecNode_GetVectorFunc: TLib3MFConstVecNode_GetVectorFunc; + FLib3MFConstVecNode_GetOutputVectorFunc: TLib3MFConstVecNode_GetOutputVectorFunc; + FLib3MFConstMatNode_SetMatrixFunc: TLib3MFConstMatNode_SetMatrixFunc; + FLib3MFConstMatNode_GetMatrixFunc: TLib3MFConstMatNode_GetMatrixFunc; + FLib3MFConstMatNode_GetOutputMatrixFunc: TLib3MFConstMatNode_GetOutputMatrixFunc; + FLib3MFMeshNode_GetInputMeshFunc: TLib3MFMeshNode_GetInputMeshFunc; + FLib3MFMeshNode_GetInputPosFunc: TLib3MFMeshNode_GetInputPosFunc; + FLib3MFMeshNode_GetOutputDistanceFunc: TLib3MFMeshNode_GetOutputDistanceFunc; + FLib3MFUnsignedMeshNode_GetInputMeshFunc: TLib3MFUnsignedMeshNode_GetInputMeshFunc; + FLib3MFUnsignedMeshNode_GetInputPosFunc: TLib3MFUnsignedMeshNode_GetInputPosFunc; + FLib3MFUnsignedMeshNode_GetOutputDistanceFunc: TLib3MFUnsignedMeshNode_GetOutputDistanceFunc; + FLib3MFFunctionCallNode_GetInputFunctionIDFunc: TLib3MFFunctionCallNode_GetInputFunctionIDFunc; + FLib3MFNodeIterator_GetCurrentFunc: TLib3MFNodeIterator_GetCurrentFunc; + FLib3MFFunction_GetDisplayNameFunc: TLib3MFFunction_GetDisplayNameFunc; + FLib3MFFunction_SetDisplayNameFunc: TLib3MFFunction_SetDisplayNameFunc; + FLib3MFFunction_AddInputFunc: TLib3MFFunction_AddInputFunc; + FLib3MFFunction_GetInputsFunc: TLib3MFFunction_GetInputsFunc; + FLib3MFFunction_RemoveInputFunc: TLib3MFFunction_RemoveInputFunc; + FLib3MFFunction_AddOutputFunc: TLib3MFFunction_AddOutputFunc; + FLib3MFFunction_GetOutputsFunc: TLib3MFFunction_GetOutputsFunc; + FLib3MFFunction_RemoveOutputFunc: TLib3MFFunction_RemoveOutputFunc; + FLib3MFFunction_FindInputFunc: TLib3MFFunction_FindInputFunc; + FLib3MFFunction_FindOutputFunc: TLib3MFFunction_FindOutputFunc; + FLib3MFImplicitFunction_GetIdentifierFunc: TLib3MFImplicitFunction_GetIdentifierFunc; + FLib3MFImplicitFunction_SetIdentifierFunc: TLib3MFImplicitFunction_SetIdentifierFunc; + FLib3MFImplicitFunction_AddNodeFunc: TLib3MFImplicitFunction_AddNodeFunc; + FLib3MFImplicitFunction_AddSinNodeFunc: TLib3MFImplicitFunction_AddSinNodeFunc; + FLib3MFImplicitFunction_AddCosNodeFunc: TLib3MFImplicitFunction_AddCosNodeFunc; + FLib3MFImplicitFunction_AddTanNodeFunc: TLib3MFImplicitFunction_AddTanNodeFunc; + FLib3MFImplicitFunction_AddArcSinNodeFunc: TLib3MFImplicitFunction_AddArcSinNodeFunc; + FLib3MFImplicitFunction_AddArcCosNodeFunc: TLib3MFImplicitFunction_AddArcCosNodeFunc; + FLib3MFImplicitFunction_AddArcTan2NodeFunc: TLib3MFImplicitFunction_AddArcTan2NodeFunc; + FLib3MFImplicitFunction_AddSinhNodeFunc: TLib3MFImplicitFunction_AddSinhNodeFunc; + FLib3MFImplicitFunction_AddCoshNodeFunc: TLib3MFImplicitFunction_AddCoshNodeFunc; + FLib3MFImplicitFunction_AddTanhNodeFunc: TLib3MFImplicitFunction_AddTanhNodeFunc; + FLib3MFImplicitFunction_AddRoundNodeFunc: TLib3MFImplicitFunction_AddRoundNodeFunc; + FLib3MFImplicitFunction_AddCeilNodeFunc: TLib3MFImplicitFunction_AddCeilNodeFunc; + FLib3MFImplicitFunction_AddFloorNodeFunc: TLib3MFImplicitFunction_AddFloorNodeFunc; + FLib3MFImplicitFunction_AddSignNodeFunc: TLib3MFImplicitFunction_AddSignNodeFunc; + FLib3MFImplicitFunction_AddFractNodeFunc: TLib3MFImplicitFunction_AddFractNodeFunc; + FLib3MFImplicitFunction_AddAbsNodeFunc: TLib3MFImplicitFunction_AddAbsNodeFunc; + FLib3MFImplicitFunction_AddExpNodeFunc: TLib3MFImplicitFunction_AddExpNodeFunc; + FLib3MFImplicitFunction_AddLogNodeFunc: TLib3MFImplicitFunction_AddLogNodeFunc; + FLib3MFImplicitFunction_AddLog2NodeFunc: TLib3MFImplicitFunction_AddLog2NodeFunc; + FLib3MFImplicitFunction_AddLog10NodeFunc: TLib3MFImplicitFunction_AddLog10NodeFunc; + FLib3MFImplicitFunction_AddLengthNodeFunc: TLib3MFImplicitFunction_AddLengthNodeFunc; + FLib3MFImplicitFunction_AddTransposeNodeFunc: TLib3MFImplicitFunction_AddTransposeNodeFunc; + FLib3MFImplicitFunction_InverseNodeFunc: TLib3MFImplicitFunction_InverseNodeFunc; + FLib3MFImplicitFunction_AddSqrtNodeFunc: TLib3MFImplicitFunction_AddSqrtNodeFunc; + FLib3MFImplicitFunction_AddResourceIdNodeFunc: TLib3MFImplicitFunction_AddResourceIdNodeFunc; + FLib3MFImplicitFunction_AddAdditionNodeFunc: TLib3MFImplicitFunction_AddAdditionNodeFunc; + FLib3MFImplicitFunction_AddSubtractionNodeFunc: TLib3MFImplicitFunction_AddSubtractionNodeFunc; + FLib3MFImplicitFunction_AddMultiplicationNodeFunc: TLib3MFImplicitFunction_AddMultiplicationNodeFunc; + FLib3MFImplicitFunction_AddDivisionNodeFunc: TLib3MFImplicitFunction_AddDivisionNodeFunc; + FLib3MFImplicitFunction_AddDotNodeFunc: TLib3MFImplicitFunction_AddDotNodeFunc; + FLib3MFImplicitFunction_AddCrossNodeFunc: TLib3MFImplicitFunction_AddCrossNodeFunc; + FLib3MFImplicitFunction_AddMatVecMultiplicationNodeFunc: TLib3MFImplicitFunction_AddMatVecMultiplicationNodeFunc; + FLib3MFImplicitFunction_AddMinNodeFunc: TLib3MFImplicitFunction_AddMinNodeFunc; + FLib3MFImplicitFunction_AddMaxNodeFunc: TLib3MFImplicitFunction_AddMaxNodeFunc; + FLib3MFImplicitFunction_AddFmodNodeFunc: TLib3MFImplicitFunction_AddFmodNodeFunc; + FLib3MFImplicitFunction_AddPowNodeFunc: TLib3MFImplicitFunction_AddPowNodeFunc; + FLib3MFImplicitFunction_AddSelectNodeFunc: TLib3MFImplicitFunction_AddSelectNodeFunc; + FLib3MFImplicitFunction_AddClampNodeFunc: TLib3MFImplicitFunction_AddClampNodeFunc; + FLib3MFImplicitFunction_AddComposeVectorNodeFunc: TLib3MFImplicitFunction_AddComposeVectorNodeFunc; + FLib3MFImplicitFunction_AddVectorFromScalarNodeFunc: TLib3MFImplicitFunction_AddVectorFromScalarNodeFunc; + FLib3MFImplicitFunction_AddDecomposeVectorNodeFunc: TLib3MFImplicitFunction_AddDecomposeVectorNodeFunc; + FLib3MFImplicitFunction_AddComposeMatrixNodeFunc: TLib3MFImplicitFunction_AddComposeMatrixNodeFunc; + FLib3MFImplicitFunction_AddMatrixFromRowsNodeFunc: TLib3MFImplicitFunction_AddMatrixFromRowsNodeFunc; + FLib3MFImplicitFunction_AddMatrixFromColumnsNodeFunc: TLib3MFImplicitFunction_AddMatrixFromColumnsNodeFunc; + FLib3MFImplicitFunction_AddConstantNodeFunc: TLib3MFImplicitFunction_AddConstantNodeFunc; + FLib3MFImplicitFunction_AddConstVecNodeFunc: TLib3MFImplicitFunction_AddConstVecNodeFunc; + FLib3MFImplicitFunction_AddConstMatNodeFunc: TLib3MFImplicitFunction_AddConstMatNodeFunc; + FLib3MFImplicitFunction_AddMeshNodeFunc: TLib3MFImplicitFunction_AddMeshNodeFunc; + FLib3MFImplicitFunction_AddUnsignedMeshNodeFunc: TLib3MFImplicitFunction_AddUnsignedMeshNodeFunc; + FLib3MFImplicitFunction_AddFunctionCallNodeFunc: TLib3MFImplicitFunction_AddFunctionCallNodeFunc; + FLib3MFImplicitFunction_GetNodesFunc: TLib3MFImplicitFunction_GetNodesFunc; + FLib3MFImplicitFunction_RemoveNodeFunc: TLib3MFImplicitFunction_RemoveNodeFunc; + FLib3MFImplicitFunction_AddLinkFunc: TLib3MFImplicitFunction_AddLinkFunc; + FLib3MFImplicitFunction_AddLinkByNamesFunc: TLib3MFImplicitFunction_AddLinkByNamesFunc; + FLib3MFImplicitFunction_ClearFunc: TLib3MFImplicitFunction_ClearFunc; + FLib3MFImplicitFunction_SortNodesTopologicallyFunc: TLib3MFImplicitFunction_SortNodesTopologicallyFunc; + FLib3MFFunctionFromImage3D_GetImage3DFunc: TLib3MFFunctionFromImage3D_GetImage3DFunc; + FLib3MFFunctionFromImage3D_SetImage3DFunc: TLib3MFFunctionFromImage3D_SetImage3DFunc; + FLib3MFFunctionFromImage3D_SetFilterFunc: TLib3MFFunctionFromImage3D_SetFilterFunc; + FLib3MFFunctionFromImage3D_GetFilterFunc: TLib3MFFunctionFromImage3D_GetFilterFunc; + FLib3MFFunctionFromImage3D_SetTileStylesFunc: TLib3MFFunctionFromImage3D_SetTileStylesFunc; + FLib3MFFunctionFromImage3D_GetTileStylesFunc: TLib3MFFunctionFromImage3D_GetTileStylesFunc; + FLib3MFFunctionFromImage3D_GetOffsetFunc: TLib3MFFunctionFromImage3D_GetOffsetFunc; + FLib3MFFunctionFromImage3D_SetOffsetFunc: TLib3MFFunctionFromImage3D_SetOffsetFunc; + FLib3MFFunctionFromImage3D_GetScaleFunc: TLib3MFFunctionFromImage3D_GetScaleFunc; + FLib3MFFunctionFromImage3D_SetScaleFunc: TLib3MFFunctionFromImage3D_SetScaleFunc; FLib3MFBuildItem_GetObjectResourceFunc: TLib3MFBuildItem_GetObjectResourceFunc; FLib3MFBuildItem_GetUUIDFunc: TLib3MFBuildItem_GetUUIDFunc; FLib3MFBuildItem_SetUUIDFunc: TLib3MFBuildItem_SetUUIDFunc; @@ -5259,6 +9512,7 @@ TLib3MFWrapper = class(TObject) FLib3MFModel_GetComponentsObjectByIDFunc: TLib3MFModel_GetComponentsObjectByIDFunc; FLib3MFModel_GetColorGroupByIDFunc: TLib3MFModel_GetColorGroupByIDFunc; FLib3MFModel_GetSliceStackByIDFunc: TLib3MFModel_GetSliceStackByIDFunc; + FLib3MFModel_GetLevelSetByIDFunc: TLib3MFModel_GetLevelSetByIDFunc; FLib3MFModel_GetBuildUUIDFunc: TLib3MFModel_GetBuildUUIDFunc; FLib3MFModel_SetBuildUUIDFunc: TLib3MFModel_SetBuildUUIDFunc; FLib3MFModel_GetBuildItemsFunc: TLib3MFModel_GetBuildItemsFunc; @@ -5274,7 +9528,9 @@ TLib3MFWrapper = class(TObject) FLib3MFModel_GetCompositeMaterialsFunc: TLib3MFModel_GetCompositeMaterialsFunc; FLib3MFModel_GetMultiPropertyGroupsFunc: TLib3MFModel_GetMultiPropertyGroupsFunc; FLib3MFModel_GetSliceStacksFunc: TLib3MFModel_GetSliceStacksFunc; + FLib3MFModel_GetImage3DsFunc: TLib3MFModel_GetImage3DsFunc; FLib3MFModel_MergeToModelFunc: TLib3MFModel_MergeToModelFunc; + FLib3MFModel_MergeFromModelFunc: TLib3MFModel_MergeFromModelFunc; FLib3MFModel_AddMeshObjectFunc: TLib3MFModel_AddMeshObjectFunc; FLib3MFModel_AddComponentsObjectFunc: TLib3MFModel_AddComponentsObjectFunc; FLib3MFModel_AddSliceStackFunc: TLib3MFModel_AddSliceStackFunc; @@ -5284,6 +9540,8 @@ TLib3MFWrapper = class(TObject) FLib3MFModel_AddTexture2DGroupFunc: TLib3MFModel_AddTexture2DGroupFunc; FLib3MFModel_AddCompositeMaterialsFunc: TLib3MFModel_AddCompositeMaterialsFunc; FLib3MFModel_AddMultiPropertyGroupFunc: TLib3MFModel_AddMultiPropertyGroupFunc; + FLib3MFModel_AddImageStackFunc: TLib3MFModel_AddImageStackFunc; + FLib3MFModel_GetImageStackByIDFunc: TLib3MFModel_GetImageStackByIDFunc; FLib3MFModel_AddBuildItemFunc: TLib3MFModel_AddBuildItemFunc; FLib3MFModel_RemoveBuildItemFunc: TLib3MFModel_RemoveBuildItemFunc; FLib3MFModel_GetMetaDataGroupFunc: TLib3MFModel_GetMetaDataGroupFunc; @@ -5300,6 +9558,13 @@ TLib3MFWrapper = class(TObject) FLib3MFModel_RemoveCustomContentTypeFunc: TLib3MFModel_RemoveCustomContentTypeFunc; FLib3MFModel_SetRandomNumberCallbackFunc: TLib3MFModel_SetRandomNumberCallbackFunc; FLib3MFModel_GetKeyStoreFunc: TLib3MFModel_GetKeyStoreFunc; + FLib3MFModel_GetFunctionsFunc: TLib3MFModel_GetFunctionsFunc; + FLib3MFModel_AddImplicitFunctionFunc: TLib3MFModel_AddImplicitFunctionFunc; + FLib3MFModel_AddFunctionFromImage3DFunc: TLib3MFModel_AddFunctionFromImage3DFunc; + FLib3MFModel_AddVolumeDataFunc: TLib3MFModel_AddVolumeDataFunc; + FLib3MFModel_AddLevelSetFunc: TLib3MFModel_AddLevelSetFunc; + FLib3MFModel_GetLevelSetsFunc: TLib3MFModel_GetLevelSetsFunc; + FLib3MFModel_RemoveResourceFunc: TLib3MFModel_RemoveResourceFunc; FLib3MFGetLibraryVersionFunc: TLib3MFGetLibraryVersionFunc; FLib3MFGetPrereleaseInformationFunc: TLib3MFGetPrereleaseInformationFunc; FLib3MFGetBuildInformationFunc: TLib3MFGetBuildInformationFunc; @@ -5377,6 +9642,9 @@ TLib3MFWrapper = class(TObject) property Lib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupFunc: TLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupFunc read FLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupFunc; property Lib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsFunc: TLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsFunc read FLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsFunc; property Lib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupFunc: TLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupFunc read FLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupFunc; + property Lib3MFImage3DIterator_GetCurrentImage3DFunc: TLib3MFImage3DIterator_GetCurrentImage3DFunc read FLib3MFImage3DIterator_GetCurrentImage3DFunc; + property Lib3MFFunctionIterator_GetCurrentFunctionFunc: TLib3MFFunctionIterator_GetCurrentFunctionFunc read FLib3MFFunctionIterator_GetCurrentFunctionFunc; + property Lib3MFLevelSetIterator_GetCurrentLevelSetFunc: TLib3MFLevelSetIterator_GetCurrentLevelSetFunc read FLib3MFLevelSetIterator_GetCurrentLevelSetFunc; property Lib3MFMetaData_GetNameSpaceFunc: TLib3MFMetaData_GetNameSpaceFunc read FLib3MFMetaData_GetNameSpaceFunc; property Lib3MFMetaData_SetNameSpaceFunc: TLib3MFMetaData_SetNameSpaceFunc read FLib3MFMetaData_SetNameSpaceFunc; property Lib3MFMetaData_GetNameFunc: TLib3MFMetaData_GetNameFunc read FLib3MFMetaData_GetNameFunc; @@ -5402,6 +9670,7 @@ TLib3MFWrapper = class(TObject) property Lib3MFObject_SetPartNumberFunc: TLib3MFObject_SetPartNumberFunc read FLib3MFObject_SetPartNumberFunc; property Lib3MFObject_IsMeshObjectFunc: TLib3MFObject_IsMeshObjectFunc read FLib3MFObject_IsMeshObjectFunc; property Lib3MFObject_IsComponentsObjectFunc: TLib3MFObject_IsComponentsObjectFunc read FLib3MFObject_IsComponentsObjectFunc; + property Lib3MFObject_IsLevelSetObjectFunc: TLib3MFObject_IsLevelSetObjectFunc read FLib3MFObject_IsLevelSetObjectFunc; property Lib3MFObject_IsValidFunc: TLib3MFObject_IsValidFunc read FLib3MFObject_IsValidFunc; property Lib3MFObject_SetAttachmentAsThumbnailFunc: TLib3MFObject_SetAttachmentAsThumbnailFunc read FLib3MFObject_SetAttachmentAsThumbnailFunc; property Lib3MFObject_GetThumbnailAttachmentFunc: TLib3MFObject_GetThumbnailAttachmentFunc read FLib3MFObject_GetThumbnailAttachmentFunc; @@ -5436,6 +9705,24 @@ TLib3MFWrapper = class(TObject) property Lib3MFMeshObject_SetGeometryFunc: TLib3MFMeshObject_SetGeometryFunc read FLib3MFMeshObject_SetGeometryFunc; property Lib3MFMeshObject_IsManifoldAndOrientedFunc: TLib3MFMeshObject_IsManifoldAndOrientedFunc read FLib3MFMeshObject_IsManifoldAndOrientedFunc; property Lib3MFMeshObject_BeamLatticeFunc: TLib3MFMeshObject_BeamLatticeFunc read FLib3MFMeshObject_BeamLatticeFunc; + property Lib3MFMeshObject_GetVolumeDataFunc: TLib3MFMeshObject_GetVolumeDataFunc read FLib3MFMeshObject_GetVolumeDataFunc; + property Lib3MFMeshObject_SetVolumeDataFunc: TLib3MFMeshObject_SetVolumeDataFunc read FLib3MFMeshObject_SetVolumeDataFunc; + property Lib3MFLevelSet_GetFunctionFunc: TLib3MFLevelSet_GetFunctionFunc read FLib3MFLevelSet_GetFunctionFunc; + property Lib3MFLevelSet_SetFunctionFunc: TLib3MFLevelSet_SetFunctionFunc read FLib3MFLevelSet_SetFunctionFunc; + property Lib3MFLevelSet_GetTransformFunc: TLib3MFLevelSet_GetTransformFunc read FLib3MFLevelSet_GetTransformFunc; + property Lib3MFLevelSet_SetTransformFunc: TLib3MFLevelSet_SetTransformFunc read FLib3MFLevelSet_SetTransformFunc; + property Lib3MFLevelSet_GetChannelNameFunc: TLib3MFLevelSet_GetChannelNameFunc read FLib3MFLevelSet_GetChannelNameFunc; + property Lib3MFLevelSet_SetChannelNameFunc: TLib3MFLevelSet_SetChannelNameFunc read FLib3MFLevelSet_SetChannelNameFunc; + property Lib3MFLevelSet_SetMinFeatureSizeFunc: TLib3MFLevelSet_SetMinFeatureSizeFunc read FLib3MFLevelSet_SetMinFeatureSizeFunc; + property Lib3MFLevelSet_GetMinFeatureSizeFunc: TLib3MFLevelSet_GetMinFeatureSizeFunc read FLib3MFLevelSet_GetMinFeatureSizeFunc; + property Lib3MFLevelSet_SetFallBackValueFunc: TLib3MFLevelSet_SetFallBackValueFunc read FLib3MFLevelSet_SetFallBackValueFunc; + property Lib3MFLevelSet_GetFallBackValueFunc: TLib3MFLevelSet_GetFallBackValueFunc read FLib3MFLevelSet_GetFallBackValueFunc; + property Lib3MFLevelSet_SetMeshBBoxOnlyFunc: TLib3MFLevelSet_SetMeshBBoxOnlyFunc read FLib3MFLevelSet_SetMeshBBoxOnlyFunc; + property Lib3MFLevelSet_GetMeshBBoxOnlyFunc: TLib3MFLevelSet_GetMeshBBoxOnlyFunc read FLib3MFLevelSet_GetMeshBBoxOnlyFunc; + property Lib3MFLevelSet_SetMeshFunc: TLib3MFLevelSet_SetMeshFunc read FLib3MFLevelSet_SetMeshFunc; + property Lib3MFLevelSet_GetMeshFunc: TLib3MFLevelSet_GetMeshFunc read FLib3MFLevelSet_GetMeshFunc; + property Lib3MFLevelSet_GetVolumeDataFunc: TLib3MFLevelSet_GetVolumeDataFunc read FLib3MFLevelSet_GetVolumeDataFunc; + property Lib3MFLevelSet_SetVolumeDataFunc: TLib3MFLevelSet_SetVolumeDataFunc read FLib3MFLevelSet_SetVolumeDataFunc; property Lib3MFBeamLattice_GetMinLengthFunc: TLib3MFBeamLattice_GetMinLengthFunc read FLib3MFBeamLattice_GetMinLengthFunc; property Lib3MFBeamLattice_SetMinLengthFunc: TLib3MFBeamLattice_SetMinLengthFunc read FLib3MFBeamLattice_SetMinLengthFunc; property Lib3MFBeamLattice_GetClippingFunc: TLib3MFBeamLattice_GetClippingFunc read FLib3MFBeamLattice_GetClippingFunc; @@ -5459,6 +9746,35 @@ TLib3MFWrapper = class(TObject) property Lib3MFBeamLattice_GetBeamSetCountFunc: TLib3MFBeamLattice_GetBeamSetCountFunc read FLib3MFBeamLattice_GetBeamSetCountFunc; property Lib3MFBeamLattice_AddBeamSetFunc: TLib3MFBeamLattice_AddBeamSetFunc read FLib3MFBeamLattice_AddBeamSetFunc; property Lib3MFBeamLattice_GetBeamSetFunc: TLib3MFBeamLattice_GetBeamSetFunc read FLib3MFBeamLattice_GetBeamSetFunc; + property Lib3MFFunctionReference_GetFunctionResourceIDFunc: TLib3MFFunctionReference_GetFunctionResourceIDFunc read FLib3MFFunctionReference_GetFunctionResourceIDFunc; + property Lib3MFFunctionReference_SetFunctionResourceIDFunc: TLib3MFFunctionReference_SetFunctionResourceIDFunc read FLib3MFFunctionReference_SetFunctionResourceIDFunc; + property Lib3MFFunctionReference_GetTransformFunc: TLib3MFFunctionReference_GetTransformFunc read FLib3MFFunctionReference_GetTransformFunc; + property Lib3MFFunctionReference_SetTransformFunc: TLib3MFFunctionReference_SetTransformFunc read FLib3MFFunctionReference_SetTransformFunc; + property Lib3MFFunctionReference_GetChannelNameFunc: TLib3MFFunctionReference_GetChannelNameFunc read FLib3MFFunctionReference_GetChannelNameFunc; + property Lib3MFFunctionReference_SetChannelNameFunc: TLib3MFFunctionReference_SetChannelNameFunc read FLib3MFFunctionReference_SetChannelNameFunc; + property Lib3MFFunctionReference_SetMinFeatureSizeFunc: TLib3MFFunctionReference_SetMinFeatureSizeFunc read FLib3MFFunctionReference_SetMinFeatureSizeFunc; + property Lib3MFFunctionReference_GetMinFeatureSizeFunc: TLib3MFFunctionReference_GetMinFeatureSizeFunc read FLib3MFFunctionReference_GetMinFeatureSizeFunc; + property Lib3MFFunctionReference_SetFallBackValueFunc: TLib3MFFunctionReference_SetFallBackValueFunc read FLib3MFFunctionReference_SetFallBackValueFunc; + property Lib3MFFunctionReference_GetFallBackValueFunc: TLib3MFFunctionReference_GetFallBackValueFunc read FLib3MFFunctionReference_GetFallBackValueFunc; + property Lib3MFVolumeDataComposite_GetBaseMaterialGroupFunc: TLib3MFVolumeDataComposite_GetBaseMaterialGroupFunc read FLib3MFVolumeDataComposite_GetBaseMaterialGroupFunc; + property Lib3MFVolumeDataComposite_SetBaseMaterialGroupFunc: TLib3MFVolumeDataComposite_SetBaseMaterialGroupFunc read FLib3MFVolumeDataComposite_SetBaseMaterialGroupFunc; + property Lib3MFVolumeDataComposite_GetMaterialMappingCountFunc: TLib3MFVolumeDataComposite_GetMaterialMappingCountFunc read FLib3MFVolumeDataComposite_GetMaterialMappingCountFunc; + property Lib3MFVolumeDataComposite_GetMaterialMappingFunc: TLib3MFVolumeDataComposite_GetMaterialMappingFunc read FLib3MFVolumeDataComposite_GetMaterialMappingFunc; + property Lib3MFVolumeDataComposite_AddMaterialMappingFunc: TLib3MFVolumeDataComposite_AddMaterialMappingFunc read FLib3MFVolumeDataComposite_AddMaterialMappingFunc; + property Lib3MFVolumeDataComposite_RemoveMaterialMappingFunc: TLib3MFVolumeDataComposite_RemoveMaterialMappingFunc read FLib3MFVolumeDataComposite_RemoveMaterialMappingFunc; + property Lib3MFVolumeDataProperty_GetNameFunc: TLib3MFVolumeDataProperty_GetNameFunc read FLib3MFVolumeDataProperty_GetNameFunc; + property Lib3MFVolumeDataProperty_SetIsRequiredFunc: TLib3MFVolumeDataProperty_SetIsRequiredFunc read FLib3MFVolumeDataProperty_SetIsRequiredFunc; + property Lib3MFVolumeDataProperty_IsRequiredFunc: TLib3MFVolumeDataProperty_IsRequiredFunc read FLib3MFVolumeDataProperty_IsRequiredFunc; + property Lib3MFVolumeData_GetCompositeFunc: TLib3MFVolumeData_GetCompositeFunc read FLib3MFVolumeData_GetCompositeFunc; + property Lib3MFVolumeData_CreateNewCompositeFunc: TLib3MFVolumeData_CreateNewCompositeFunc read FLib3MFVolumeData_CreateNewCompositeFunc; + property Lib3MFVolumeData_RemoveCompositeFunc: TLib3MFVolumeData_RemoveCompositeFunc read FLib3MFVolumeData_RemoveCompositeFunc; + property Lib3MFVolumeData_GetColorFunc: TLib3MFVolumeData_GetColorFunc read FLib3MFVolumeData_GetColorFunc; + property Lib3MFVolumeData_CreateNewColorFunc: TLib3MFVolumeData_CreateNewColorFunc read FLib3MFVolumeData_CreateNewColorFunc; + property Lib3MFVolumeData_RemoveColorFunc: TLib3MFVolumeData_RemoveColorFunc read FLib3MFVolumeData_RemoveColorFunc; + property Lib3MFVolumeData_GetPropertyCountFunc: TLib3MFVolumeData_GetPropertyCountFunc read FLib3MFVolumeData_GetPropertyCountFunc; + property Lib3MFVolumeData_GetPropertyFunc: TLib3MFVolumeData_GetPropertyFunc read FLib3MFVolumeData_GetPropertyFunc; + property Lib3MFVolumeData_AddPropertyFromFunctionFunc: TLib3MFVolumeData_AddPropertyFromFunctionFunc read FLib3MFVolumeData_AddPropertyFromFunctionFunc; + property Lib3MFVolumeData_RemovePropertyFunc: TLib3MFVolumeData_RemovePropertyFunc read FLib3MFVolumeData_RemovePropertyFunc; property Lib3MFComponent_GetObjectResourceFunc: TLib3MFComponent_GetObjectResourceFunc read FLib3MFComponent_GetObjectResourceFunc; property Lib3MFComponent_GetObjectResourceIDFunc: TLib3MFComponent_GetObjectResourceIDFunc read FLib3MFComponent_GetObjectResourceIDFunc; property Lib3MFComponent_GetUUIDFunc: TLib3MFComponent_GetUUIDFunc read FLib3MFComponent_GetUUIDFunc; @@ -5515,6 +9831,19 @@ TLib3MFWrapper = class(TObject) property Lib3MFMultiPropertyGroup_AddLayerFunc: TLib3MFMultiPropertyGroup_AddLayerFunc read FLib3MFMultiPropertyGroup_AddLayerFunc; property Lib3MFMultiPropertyGroup_GetLayerFunc: TLib3MFMultiPropertyGroup_GetLayerFunc read FLib3MFMultiPropertyGroup_GetLayerFunc; property Lib3MFMultiPropertyGroup_RemoveLayerFunc: TLib3MFMultiPropertyGroup_RemoveLayerFunc read FLib3MFMultiPropertyGroup_RemoveLayerFunc; + property Lib3MFImage3D_GetNameFunc: TLib3MFImage3D_GetNameFunc read FLib3MFImage3D_GetNameFunc; + property Lib3MFImage3D_SetNameFunc: TLib3MFImage3D_SetNameFunc read FLib3MFImage3D_SetNameFunc; + property Lib3MFImage3D_IsImageStackFunc: TLib3MFImage3D_IsImageStackFunc read FLib3MFImage3D_IsImageStackFunc; + property Lib3MFImageStack_GetRowCountFunc: TLib3MFImageStack_GetRowCountFunc read FLib3MFImageStack_GetRowCountFunc; + property Lib3MFImageStack_SetRowCountFunc: TLib3MFImageStack_SetRowCountFunc read FLib3MFImageStack_SetRowCountFunc; + property Lib3MFImageStack_GetColumnCountFunc: TLib3MFImageStack_GetColumnCountFunc read FLib3MFImageStack_GetColumnCountFunc; + property Lib3MFImageStack_SetColumnCountFunc: TLib3MFImageStack_SetColumnCountFunc read FLib3MFImageStack_SetColumnCountFunc; + property Lib3MFImageStack_GetSheetCountFunc: TLib3MFImageStack_GetSheetCountFunc read FLib3MFImageStack_GetSheetCountFunc; + property Lib3MFImageStack_GetSheetFunc: TLib3MFImageStack_GetSheetFunc read FLib3MFImageStack_GetSheetFunc; + property Lib3MFImageStack_SetSheetFunc: TLib3MFImageStack_SetSheetFunc read FLib3MFImageStack_SetSheetFunc; + property Lib3MFImageStack_CreateEmptySheetFunc: TLib3MFImageStack_CreateEmptySheetFunc read FLib3MFImageStack_CreateEmptySheetFunc; + property Lib3MFImageStack_CreateSheetFromBufferFunc: TLib3MFImageStack_CreateSheetFromBufferFunc read FLib3MFImageStack_CreateSheetFromBufferFunc; + property Lib3MFImageStack_CreateSheetFromFileFunc: TLib3MFImageStack_CreateSheetFromFileFunc read FLib3MFImageStack_CreateSheetFromFileFunc; property Lib3MFAttachment_GetPathFunc: TLib3MFAttachment_GetPathFunc read FLib3MFAttachment_GetPathFunc; property Lib3MFAttachment_SetPathFunc: TLib3MFAttachment_SetPathFunc read FLib3MFAttachment_SetPathFunc; property Lib3MFAttachment_PackagePartFunc: TLib3MFAttachment_PackagePartFunc read FLib3MFAttachment_PackagePartFunc; @@ -5534,6 +9863,173 @@ TLib3MFWrapper = class(TObject) property Lib3MFTexture2D_SetTileStyleUVFunc: TLib3MFTexture2D_SetTileStyleUVFunc read FLib3MFTexture2D_SetTileStyleUVFunc; property Lib3MFTexture2D_GetFilterFunc: TLib3MFTexture2D_GetFilterFunc read FLib3MFTexture2D_GetFilterFunc; property Lib3MFTexture2D_SetFilterFunc: TLib3MFTexture2D_SetFilterFunc read FLib3MFTexture2D_SetFilterFunc; + property Lib3MFImplicitPort_GetIdentifierFunc: TLib3MFImplicitPort_GetIdentifierFunc read FLib3MFImplicitPort_GetIdentifierFunc; + property Lib3MFImplicitPort_SetIdentifierFunc: TLib3MFImplicitPort_SetIdentifierFunc read FLib3MFImplicitPort_SetIdentifierFunc; + property Lib3MFImplicitPort_GetDisplayNameFunc: TLib3MFImplicitPort_GetDisplayNameFunc read FLib3MFImplicitPort_GetDisplayNameFunc; + property Lib3MFImplicitPort_SetDisplayNameFunc: TLib3MFImplicitPort_SetDisplayNameFunc read FLib3MFImplicitPort_SetDisplayNameFunc; + property Lib3MFImplicitPort_SetTypeFunc: TLib3MFImplicitPort_SetTypeFunc read FLib3MFImplicitPort_SetTypeFunc; + property Lib3MFImplicitPort_GetTypeFunc: TLib3MFImplicitPort_GetTypeFunc read FLib3MFImplicitPort_GetTypeFunc; + property Lib3MFImplicitPort_GetReferenceFunc: TLib3MFImplicitPort_GetReferenceFunc read FLib3MFImplicitPort_GetReferenceFunc; + property Lib3MFImplicitPort_SetReferenceFunc: TLib3MFImplicitPort_SetReferenceFunc read FLib3MFImplicitPort_SetReferenceFunc; + property Lib3MFIterator_MoveNextFunc: TLib3MFIterator_MoveNextFunc read FLib3MFIterator_MoveNextFunc; + property Lib3MFIterator_MovePreviousFunc: TLib3MFIterator_MovePreviousFunc read FLib3MFIterator_MovePreviousFunc; + property Lib3MFIterator_CountFunc: TLib3MFIterator_CountFunc read FLib3MFIterator_CountFunc; + property Lib3MFImplicitPortIterator_GetCurrentFunc: TLib3MFImplicitPortIterator_GetCurrentFunc read FLib3MFImplicitPortIterator_GetCurrentFunc; + property Lib3MFImplicitNode_GetIdentifierFunc: TLib3MFImplicitNode_GetIdentifierFunc read FLib3MFImplicitNode_GetIdentifierFunc; + property Lib3MFImplicitNode_SetIdentifierFunc: TLib3MFImplicitNode_SetIdentifierFunc read FLib3MFImplicitNode_SetIdentifierFunc; + property Lib3MFImplicitNode_GetDisplayNameFunc: TLib3MFImplicitNode_GetDisplayNameFunc read FLib3MFImplicitNode_GetDisplayNameFunc; + property Lib3MFImplicitNode_SetDisplayNameFunc: TLib3MFImplicitNode_SetDisplayNameFunc read FLib3MFImplicitNode_SetDisplayNameFunc; + property Lib3MFImplicitNode_GetTagFunc: TLib3MFImplicitNode_GetTagFunc read FLib3MFImplicitNode_GetTagFunc; + property Lib3MFImplicitNode_SetTagFunc: TLib3MFImplicitNode_SetTagFunc read FLib3MFImplicitNode_SetTagFunc; + property Lib3MFImplicitNode_GetNodeTypeFunc: TLib3MFImplicitNode_GetNodeTypeFunc read FLib3MFImplicitNode_GetNodeTypeFunc; + property Lib3MFImplicitNode_AddInputFunc: TLib3MFImplicitNode_AddInputFunc read FLib3MFImplicitNode_AddInputFunc; + property Lib3MFImplicitNode_GetInputsFunc: TLib3MFImplicitNode_GetInputsFunc read FLib3MFImplicitNode_GetInputsFunc; + property Lib3MFImplicitNode_AddOutputFunc: TLib3MFImplicitNode_AddOutputFunc read FLib3MFImplicitNode_AddOutputFunc; + property Lib3MFImplicitNode_GetOutputsFunc: TLib3MFImplicitNode_GetOutputsFunc read FLib3MFImplicitNode_GetOutputsFunc; + property Lib3MFImplicitNode_FindInputFunc: TLib3MFImplicitNode_FindInputFunc read FLib3MFImplicitNode_FindInputFunc; + property Lib3MFImplicitNode_FindOutputFunc: TLib3MFImplicitNode_FindOutputFunc read FLib3MFImplicitNode_FindOutputFunc; + property Lib3MFImplicitNode_AreTypesValidFunc: TLib3MFImplicitNode_AreTypesValidFunc read FLib3MFImplicitNode_AreTypesValidFunc; + property Lib3MFOneInputNode_GetInputAFunc: TLib3MFOneInputNode_GetInputAFunc read FLib3MFOneInputNode_GetInputAFunc; + property Lib3MFOneInputNode_GetOutputResultFunc: TLib3MFOneInputNode_GetOutputResultFunc read FLib3MFOneInputNode_GetOutputResultFunc; + property Lib3MFResourceIdNode_SetResourceFunc: TLib3MFResourceIdNode_SetResourceFunc read FLib3MFResourceIdNode_SetResourceFunc; + property Lib3MFResourceIdNode_GetResourceFunc: TLib3MFResourceIdNode_GetResourceFunc read FLib3MFResourceIdNode_GetResourceFunc; + property Lib3MFResourceIdNode_GetOutputValueFunc: TLib3MFResourceIdNode_GetOutputValueFunc read FLib3MFResourceIdNode_GetOutputValueFunc; + property Lib3MFTwoInputNode_GetInputBFunc: TLib3MFTwoInputNode_GetInputBFunc read FLib3MFTwoInputNode_GetInputBFunc; + property Lib3MFSelectNode_GetInputBFunc: TLib3MFSelectNode_GetInputBFunc read FLib3MFSelectNode_GetInputBFunc; + property Lib3MFSelectNode_GetInputCFunc: TLib3MFSelectNode_GetInputCFunc read FLib3MFSelectNode_GetInputCFunc; + property Lib3MFSelectNode_GetInputDFunc: TLib3MFSelectNode_GetInputDFunc read FLib3MFSelectNode_GetInputDFunc; + property Lib3MFClampNode_GetInputMinFunc: TLib3MFClampNode_GetInputMinFunc read FLib3MFClampNode_GetInputMinFunc; + property Lib3MFClampNode_GetInputMaxFunc: TLib3MFClampNode_GetInputMaxFunc read FLib3MFClampNode_GetInputMaxFunc; + property Lib3MFComposeVectorNode_GetInputXFunc: TLib3MFComposeVectorNode_GetInputXFunc read FLib3MFComposeVectorNode_GetInputXFunc; + property Lib3MFComposeVectorNode_GetInputYFunc: TLib3MFComposeVectorNode_GetInputYFunc read FLib3MFComposeVectorNode_GetInputYFunc; + property Lib3MFComposeVectorNode_GetInputZFunc: TLib3MFComposeVectorNode_GetInputZFunc read FLib3MFComposeVectorNode_GetInputZFunc; + property Lib3MFComposeVectorNode_GetOutputResultFunc: TLib3MFComposeVectorNode_GetOutputResultFunc read FLib3MFComposeVectorNode_GetOutputResultFunc; + property Lib3MFDecomposeVectorNode_GetInputAFunc: TLib3MFDecomposeVectorNode_GetInputAFunc read FLib3MFDecomposeVectorNode_GetInputAFunc; + property Lib3MFDecomposeVectorNode_GetOutputXFunc: TLib3MFDecomposeVectorNode_GetOutputXFunc read FLib3MFDecomposeVectorNode_GetOutputXFunc; + property Lib3MFDecomposeVectorNode_GetOutputYFunc: TLib3MFDecomposeVectorNode_GetOutputYFunc read FLib3MFDecomposeVectorNode_GetOutputYFunc; + property Lib3MFDecomposeVectorNode_GetOutputZFunc: TLib3MFDecomposeVectorNode_GetOutputZFunc read FLib3MFDecomposeVectorNode_GetOutputZFunc; + property Lib3MFComposeMatrixNode_GetInputM00Func: TLib3MFComposeMatrixNode_GetInputM00Func read FLib3MFComposeMatrixNode_GetInputM00Func; + property Lib3MFComposeMatrixNode_GetInputM01Func: TLib3MFComposeMatrixNode_GetInputM01Func read FLib3MFComposeMatrixNode_GetInputM01Func; + property Lib3MFComposeMatrixNode_GetInputM02Func: TLib3MFComposeMatrixNode_GetInputM02Func read FLib3MFComposeMatrixNode_GetInputM02Func; + property Lib3MFComposeMatrixNode_GetInputM03Func: TLib3MFComposeMatrixNode_GetInputM03Func read FLib3MFComposeMatrixNode_GetInputM03Func; + property Lib3MFComposeMatrixNode_GetInputM10Func: TLib3MFComposeMatrixNode_GetInputM10Func read FLib3MFComposeMatrixNode_GetInputM10Func; + property Lib3MFComposeMatrixNode_GetInputM11Func: TLib3MFComposeMatrixNode_GetInputM11Func read FLib3MFComposeMatrixNode_GetInputM11Func; + property Lib3MFComposeMatrixNode_GetInputM12Func: TLib3MFComposeMatrixNode_GetInputM12Func read FLib3MFComposeMatrixNode_GetInputM12Func; + property Lib3MFComposeMatrixNode_GetInputM13Func: TLib3MFComposeMatrixNode_GetInputM13Func read FLib3MFComposeMatrixNode_GetInputM13Func; + property Lib3MFComposeMatrixNode_GetInputM20Func: TLib3MFComposeMatrixNode_GetInputM20Func read FLib3MFComposeMatrixNode_GetInputM20Func; + property Lib3MFComposeMatrixNode_GetInputM21Func: TLib3MFComposeMatrixNode_GetInputM21Func read FLib3MFComposeMatrixNode_GetInputM21Func; + property Lib3MFComposeMatrixNode_GetInputM22Func: TLib3MFComposeMatrixNode_GetInputM22Func read FLib3MFComposeMatrixNode_GetInputM22Func; + property Lib3MFComposeMatrixNode_GetInputM23Func: TLib3MFComposeMatrixNode_GetInputM23Func read FLib3MFComposeMatrixNode_GetInputM23Func; + property Lib3MFComposeMatrixNode_GetInputM30Func: TLib3MFComposeMatrixNode_GetInputM30Func read FLib3MFComposeMatrixNode_GetInputM30Func; + property Lib3MFComposeMatrixNode_GetInputM31Func: TLib3MFComposeMatrixNode_GetInputM31Func read FLib3MFComposeMatrixNode_GetInputM31Func; + property Lib3MFComposeMatrixNode_GetInputM32Func: TLib3MFComposeMatrixNode_GetInputM32Func read FLib3MFComposeMatrixNode_GetInputM32Func; + property Lib3MFComposeMatrixNode_GetInputM33Func: TLib3MFComposeMatrixNode_GetInputM33Func read FLib3MFComposeMatrixNode_GetInputM33Func; + property Lib3MFComposeMatrixNode_GetOutputResultFunc: TLib3MFComposeMatrixNode_GetOutputResultFunc read FLib3MFComposeMatrixNode_GetOutputResultFunc; + property Lib3MFMatrixFromRowsNode_GetInputAFunc: TLib3MFMatrixFromRowsNode_GetInputAFunc read FLib3MFMatrixFromRowsNode_GetInputAFunc; + property Lib3MFMatrixFromRowsNode_GetInputBFunc: TLib3MFMatrixFromRowsNode_GetInputBFunc read FLib3MFMatrixFromRowsNode_GetInputBFunc; + property Lib3MFMatrixFromRowsNode_GetInputCFunc: TLib3MFMatrixFromRowsNode_GetInputCFunc read FLib3MFMatrixFromRowsNode_GetInputCFunc; + property Lib3MFMatrixFromRowsNode_GetInputDFunc: TLib3MFMatrixFromRowsNode_GetInputDFunc read FLib3MFMatrixFromRowsNode_GetInputDFunc; + property Lib3MFMatrixFromRowsNode_GetOutputResultFunc: TLib3MFMatrixFromRowsNode_GetOutputResultFunc read FLib3MFMatrixFromRowsNode_GetOutputResultFunc; + property Lib3MFMatrixFromColumnsNode_GetInputAFunc: TLib3MFMatrixFromColumnsNode_GetInputAFunc read FLib3MFMatrixFromColumnsNode_GetInputAFunc; + property Lib3MFMatrixFromColumnsNode_GetInputBFunc: TLib3MFMatrixFromColumnsNode_GetInputBFunc read FLib3MFMatrixFromColumnsNode_GetInputBFunc; + property Lib3MFMatrixFromColumnsNode_GetInputCFunc: TLib3MFMatrixFromColumnsNode_GetInputCFunc read FLib3MFMatrixFromColumnsNode_GetInputCFunc; + property Lib3MFMatrixFromColumnsNode_GetInputDFunc: TLib3MFMatrixFromColumnsNode_GetInputDFunc read FLib3MFMatrixFromColumnsNode_GetInputDFunc; + property Lib3MFMatrixFromColumnsNode_GetOutputResultFunc: TLib3MFMatrixFromColumnsNode_GetOutputResultFunc read FLib3MFMatrixFromColumnsNode_GetOutputResultFunc; + property Lib3MFConstantNode_SetConstantFunc: TLib3MFConstantNode_SetConstantFunc read FLib3MFConstantNode_SetConstantFunc; + property Lib3MFConstantNode_GetConstantFunc: TLib3MFConstantNode_GetConstantFunc read FLib3MFConstantNode_GetConstantFunc; + property Lib3MFConstantNode_GetOutputValueFunc: TLib3MFConstantNode_GetOutputValueFunc read FLib3MFConstantNode_GetOutputValueFunc; + property Lib3MFConstVecNode_SetVectorFunc: TLib3MFConstVecNode_SetVectorFunc read FLib3MFConstVecNode_SetVectorFunc; + property Lib3MFConstVecNode_GetVectorFunc: TLib3MFConstVecNode_GetVectorFunc read FLib3MFConstVecNode_GetVectorFunc; + property Lib3MFConstVecNode_GetOutputVectorFunc: TLib3MFConstVecNode_GetOutputVectorFunc read FLib3MFConstVecNode_GetOutputVectorFunc; + property Lib3MFConstMatNode_SetMatrixFunc: TLib3MFConstMatNode_SetMatrixFunc read FLib3MFConstMatNode_SetMatrixFunc; + property Lib3MFConstMatNode_GetMatrixFunc: TLib3MFConstMatNode_GetMatrixFunc read FLib3MFConstMatNode_GetMatrixFunc; + property Lib3MFConstMatNode_GetOutputMatrixFunc: TLib3MFConstMatNode_GetOutputMatrixFunc read FLib3MFConstMatNode_GetOutputMatrixFunc; + property Lib3MFMeshNode_GetInputMeshFunc: TLib3MFMeshNode_GetInputMeshFunc read FLib3MFMeshNode_GetInputMeshFunc; + property Lib3MFMeshNode_GetInputPosFunc: TLib3MFMeshNode_GetInputPosFunc read FLib3MFMeshNode_GetInputPosFunc; + property Lib3MFMeshNode_GetOutputDistanceFunc: TLib3MFMeshNode_GetOutputDistanceFunc read FLib3MFMeshNode_GetOutputDistanceFunc; + property Lib3MFUnsignedMeshNode_GetInputMeshFunc: TLib3MFUnsignedMeshNode_GetInputMeshFunc read FLib3MFUnsignedMeshNode_GetInputMeshFunc; + property Lib3MFUnsignedMeshNode_GetInputPosFunc: TLib3MFUnsignedMeshNode_GetInputPosFunc read FLib3MFUnsignedMeshNode_GetInputPosFunc; + property Lib3MFUnsignedMeshNode_GetOutputDistanceFunc: TLib3MFUnsignedMeshNode_GetOutputDistanceFunc read FLib3MFUnsignedMeshNode_GetOutputDistanceFunc; + property Lib3MFFunctionCallNode_GetInputFunctionIDFunc: TLib3MFFunctionCallNode_GetInputFunctionIDFunc read FLib3MFFunctionCallNode_GetInputFunctionIDFunc; + property Lib3MFNodeIterator_GetCurrentFunc: TLib3MFNodeIterator_GetCurrentFunc read FLib3MFNodeIterator_GetCurrentFunc; + property Lib3MFFunction_GetDisplayNameFunc: TLib3MFFunction_GetDisplayNameFunc read FLib3MFFunction_GetDisplayNameFunc; + property Lib3MFFunction_SetDisplayNameFunc: TLib3MFFunction_SetDisplayNameFunc read FLib3MFFunction_SetDisplayNameFunc; + property Lib3MFFunction_AddInputFunc: TLib3MFFunction_AddInputFunc read FLib3MFFunction_AddInputFunc; + property Lib3MFFunction_GetInputsFunc: TLib3MFFunction_GetInputsFunc read FLib3MFFunction_GetInputsFunc; + property Lib3MFFunction_RemoveInputFunc: TLib3MFFunction_RemoveInputFunc read FLib3MFFunction_RemoveInputFunc; + property Lib3MFFunction_AddOutputFunc: TLib3MFFunction_AddOutputFunc read FLib3MFFunction_AddOutputFunc; + property Lib3MFFunction_GetOutputsFunc: TLib3MFFunction_GetOutputsFunc read FLib3MFFunction_GetOutputsFunc; + property Lib3MFFunction_RemoveOutputFunc: TLib3MFFunction_RemoveOutputFunc read FLib3MFFunction_RemoveOutputFunc; + property Lib3MFFunction_FindInputFunc: TLib3MFFunction_FindInputFunc read FLib3MFFunction_FindInputFunc; + property Lib3MFFunction_FindOutputFunc: TLib3MFFunction_FindOutputFunc read FLib3MFFunction_FindOutputFunc; + property Lib3MFImplicitFunction_GetIdentifierFunc: TLib3MFImplicitFunction_GetIdentifierFunc read FLib3MFImplicitFunction_GetIdentifierFunc; + property Lib3MFImplicitFunction_SetIdentifierFunc: TLib3MFImplicitFunction_SetIdentifierFunc read FLib3MFImplicitFunction_SetIdentifierFunc; + property Lib3MFImplicitFunction_AddNodeFunc: TLib3MFImplicitFunction_AddNodeFunc read FLib3MFImplicitFunction_AddNodeFunc; + property Lib3MFImplicitFunction_AddSinNodeFunc: TLib3MFImplicitFunction_AddSinNodeFunc read FLib3MFImplicitFunction_AddSinNodeFunc; + property Lib3MFImplicitFunction_AddCosNodeFunc: TLib3MFImplicitFunction_AddCosNodeFunc read FLib3MFImplicitFunction_AddCosNodeFunc; + property Lib3MFImplicitFunction_AddTanNodeFunc: TLib3MFImplicitFunction_AddTanNodeFunc read FLib3MFImplicitFunction_AddTanNodeFunc; + property Lib3MFImplicitFunction_AddArcSinNodeFunc: TLib3MFImplicitFunction_AddArcSinNodeFunc read FLib3MFImplicitFunction_AddArcSinNodeFunc; + property Lib3MFImplicitFunction_AddArcCosNodeFunc: TLib3MFImplicitFunction_AddArcCosNodeFunc read FLib3MFImplicitFunction_AddArcCosNodeFunc; + property Lib3MFImplicitFunction_AddArcTan2NodeFunc: TLib3MFImplicitFunction_AddArcTan2NodeFunc read FLib3MFImplicitFunction_AddArcTan2NodeFunc; + property Lib3MFImplicitFunction_AddSinhNodeFunc: TLib3MFImplicitFunction_AddSinhNodeFunc read FLib3MFImplicitFunction_AddSinhNodeFunc; + property Lib3MFImplicitFunction_AddCoshNodeFunc: TLib3MFImplicitFunction_AddCoshNodeFunc read FLib3MFImplicitFunction_AddCoshNodeFunc; + property Lib3MFImplicitFunction_AddTanhNodeFunc: TLib3MFImplicitFunction_AddTanhNodeFunc read FLib3MFImplicitFunction_AddTanhNodeFunc; + property Lib3MFImplicitFunction_AddRoundNodeFunc: TLib3MFImplicitFunction_AddRoundNodeFunc read FLib3MFImplicitFunction_AddRoundNodeFunc; + property Lib3MFImplicitFunction_AddCeilNodeFunc: TLib3MFImplicitFunction_AddCeilNodeFunc read FLib3MFImplicitFunction_AddCeilNodeFunc; + property Lib3MFImplicitFunction_AddFloorNodeFunc: TLib3MFImplicitFunction_AddFloorNodeFunc read FLib3MFImplicitFunction_AddFloorNodeFunc; + property Lib3MFImplicitFunction_AddSignNodeFunc: TLib3MFImplicitFunction_AddSignNodeFunc read FLib3MFImplicitFunction_AddSignNodeFunc; + property Lib3MFImplicitFunction_AddFractNodeFunc: TLib3MFImplicitFunction_AddFractNodeFunc read FLib3MFImplicitFunction_AddFractNodeFunc; + property Lib3MFImplicitFunction_AddAbsNodeFunc: TLib3MFImplicitFunction_AddAbsNodeFunc read FLib3MFImplicitFunction_AddAbsNodeFunc; + property Lib3MFImplicitFunction_AddExpNodeFunc: TLib3MFImplicitFunction_AddExpNodeFunc read FLib3MFImplicitFunction_AddExpNodeFunc; + property Lib3MFImplicitFunction_AddLogNodeFunc: TLib3MFImplicitFunction_AddLogNodeFunc read FLib3MFImplicitFunction_AddLogNodeFunc; + property Lib3MFImplicitFunction_AddLog2NodeFunc: TLib3MFImplicitFunction_AddLog2NodeFunc read FLib3MFImplicitFunction_AddLog2NodeFunc; + property Lib3MFImplicitFunction_AddLog10NodeFunc: TLib3MFImplicitFunction_AddLog10NodeFunc read FLib3MFImplicitFunction_AddLog10NodeFunc; + property Lib3MFImplicitFunction_AddLengthNodeFunc: TLib3MFImplicitFunction_AddLengthNodeFunc read FLib3MFImplicitFunction_AddLengthNodeFunc; + property Lib3MFImplicitFunction_AddTransposeNodeFunc: TLib3MFImplicitFunction_AddTransposeNodeFunc read FLib3MFImplicitFunction_AddTransposeNodeFunc; + property Lib3MFImplicitFunction_InverseNodeFunc: TLib3MFImplicitFunction_InverseNodeFunc read FLib3MFImplicitFunction_InverseNodeFunc; + property Lib3MFImplicitFunction_AddSqrtNodeFunc: TLib3MFImplicitFunction_AddSqrtNodeFunc read FLib3MFImplicitFunction_AddSqrtNodeFunc; + property Lib3MFImplicitFunction_AddResourceIdNodeFunc: TLib3MFImplicitFunction_AddResourceIdNodeFunc read FLib3MFImplicitFunction_AddResourceIdNodeFunc; + property Lib3MFImplicitFunction_AddAdditionNodeFunc: TLib3MFImplicitFunction_AddAdditionNodeFunc read FLib3MFImplicitFunction_AddAdditionNodeFunc; + property Lib3MFImplicitFunction_AddSubtractionNodeFunc: TLib3MFImplicitFunction_AddSubtractionNodeFunc read FLib3MFImplicitFunction_AddSubtractionNodeFunc; + property Lib3MFImplicitFunction_AddMultiplicationNodeFunc: TLib3MFImplicitFunction_AddMultiplicationNodeFunc read FLib3MFImplicitFunction_AddMultiplicationNodeFunc; + property Lib3MFImplicitFunction_AddDivisionNodeFunc: TLib3MFImplicitFunction_AddDivisionNodeFunc read FLib3MFImplicitFunction_AddDivisionNodeFunc; + property Lib3MFImplicitFunction_AddDotNodeFunc: TLib3MFImplicitFunction_AddDotNodeFunc read FLib3MFImplicitFunction_AddDotNodeFunc; + property Lib3MFImplicitFunction_AddCrossNodeFunc: TLib3MFImplicitFunction_AddCrossNodeFunc read FLib3MFImplicitFunction_AddCrossNodeFunc; + property Lib3MFImplicitFunction_AddMatVecMultiplicationNodeFunc: TLib3MFImplicitFunction_AddMatVecMultiplicationNodeFunc read FLib3MFImplicitFunction_AddMatVecMultiplicationNodeFunc; + property Lib3MFImplicitFunction_AddMinNodeFunc: TLib3MFImplicitFunction_AddMinNodeFunc read FLib3MFImplicitFunction_AddMinNodeFunc; + property Lib3MFImplicitFunction_AddMaxNodeFunc: TLib3MFImplicitFunction_AddMaxNodeFunc read FLib3MFImplicitFunction_AddMaxNodeFunc; + property Lib3MFImplicitFunction_AddFmodNodeFunc: TLib3MFImplicitFunction_AddFmodNodeFunc read FLib3MFImplicitFunction_AddFmodNodeFunc; + property Lib3MFImplicitFunction_AddPowNodeFunc: TLib3MFImplicitFunction_AddPowNodeFunc read FLib3MFImplicitFunction_AddPowNodeFunc; + property Lib3MFImplicitFunction_AddSelectNodeFunc: TLib3MFImplicitFunction_AddSelectNodeFunc read FLib3MFImplicitFunction_AddSelectNodeFunc; + property Lib3MFImplicitFunction_AddClampNodeFunc: TLib3MFImplicitFunction_AddClampNodeFunc read FLib3MFImplicitFunction_AddClampNodeFunc; + property Lib3MFImplicitFunction_AddComposeVectorNodeFunc: TLib3MFImplicitFunction_AddComposeVectorNodeFunc read FLib3MFImplicitFunction_AddComposeVectorNodeFunc; + property Lib3MFImplicitFunction_AddVectorFromScalarNodeFunc: TLib3MFImplicitFunction_AddVectorFromScalarNodeFunc read FLib3MFImplicitFunction_AddVectorFromScalarNodeFunc; + property Lib3MFImplicitFunction_AddDecomposeVectorNodeFunc: TLib3MFImplicitFunction_AddDecomposeVectorNodeFunc read FLib3MFImplicitFunction_AddDecomposeVectorNodeFunc; + property Lib3MFImplicitFunction_AddComposeMatrixNodeFunc: TLib3MFImplicitFunction_AddComposeMatrixNodeFunc read FLib3MFImplicitFunction_AddComposeMatrixNodeFunc; + property Lib3MFImplicitFunction_AddMatrixFromRowsNodeFunc: TLib3MFImplicitFunction_AddMatrixFromRowsNodeFunc read FLib3MFImplicitFunction_AddMatrixFromRowsNodeFunc; + property Lib3MFImplicitFunction_AddMatrixFromColumnsNodeFunc: TLib3MFImplicitFunction_AddMatrixFromColumnsNodeFunc read FLib3MFImplicitFunction_AddMatrixFromColumnsNodeFunc; + property Lib3MFImplicitFunction_AddConstantNodeFunc: TLib3MFImplicitFunction_AddConstantNodeFunc read FLib3MFImplicitFunction_AddConstantNodeFunc; + property Lib3MFImplicitFunction_AddConstVecNodeFunc: TLib3MFImplicitFunction_AddConstVecNodeFunc read FLib3MFImplicitFunction_AddConstVecNodeFunc; + property Lib3MFImplicitFunction_AddConstMatNodeFunc: TLib3MFImplicitFunction_AddConstMatNodeFunc read FLib3MFImplicitFunction_AddConstMatNodeFunc; + property Lib3MFImplicitFunction_AddMeshNodeFunc: TLib3MFImplicitFunction_AddMeshNodeFunc read FLib3MFImplicitFunction_AddMeshNodeFunc; + property Lib3MFImplicitFunction_AddUnsignedMeshNodeFunc: TLib3MFImplicitFunction_AddUnsignedMeshNodeFunc read FLib3MFImplicitFunction_AddUnsignedMeshNodeFunc; + property Lib3MFImplicitFunction_AddFunctionCallNodeFunc: TLib3MFImplicitFunction_AddFunctionCallNodeFunc read FLib3MFImplicitFunction_AddFunctionCallNodeFunc; + property Lib3MFImplicitFunction_GetNodesFunc: TLib3MFImplicitFunction_GetNodesFunc read FLib3MFImplicitFunction_GetNodesFunc; + property Lib3MFImplicitFunction_RemoveNodeFunc: TLib3MFImplicitFunction_RemoveNodeFunc read FLib3MFImplicitFunction_RemoveNodeFunc; + property Lib3MFImplicitFunction_AddLinkFunc: TLib3MFImplicitFunction_AddLinkFunc read FLib3MFImplicitFunction_AddLinkFunc; + property Lib3MFImplicitFunction_AddLinkByNamesFunc: TLib3MFImplicitFunction_AddLinkByNamesFunc read FLib3MFImplicitFunction_AddLinkByNamesFunc; + property Lib3MFImplicitFunction_ClearFunc: TLib3MFImplicitFunction_ClearFunc read FLib3MFImplicitFunction_ClearFunc; + property Lib3MFImplicitFunction_SortNodesTopologicallyFunc: TLib3MFImplicitFunction_SortNodesTopologicallyFunc read FLib3MFImplicitFunction_SortNodesTopologicallyFunc; + property Lib3MFFunctionFromImage3D_GetImage3DFunc: TLib3MFFunctionFromImage3D_GetImage3DFunc read FLib3MFFunctionFromImage3D_GetImage3DFunc; + property Lib3MFFunctionFromImage3D_SetImage3DFunc: TLib3MFFunctionFromImage3D_SetImage3DFunc read FLib3MFFunctionFromImage3D_SetImage3DFunc; + property Lib3MFFunctionFromImage3D_SetFilterFunc: TLib3MFFunctionFromImage3D_SetFilterFunc read FLib3MFFunctionFromImage3D_SetFilterFunc; + property Lib3MFFunctionFromImage3D_GetFilterFunc: TLib3MFFunctionFromImage3D_GetFilterFunc read FLib3MFFunctionFromImage3D_GetFilterFunc; + property Lib3MFFunctionFromImage3D_SetTileStylesFunc: TLib3MFFunctionFromImage3D_SetTileStylesFunc read FLib3MFFunctionFromImage3D_SetTileStylesFunc; + property Lib3MFFunctionFromImage3D_GetTileStylesFunc: TLib3MFFunctionFromImage3D_GetTileStylesFunc read FLib3MFFunctionFromImage3D_GetTileStylesFunc; + property Lib3MFFunctionFromImage3D_GetOffsetFunc: TLib3MFFunctionFromImage3D_GetOffsetFunc read FLib3MFFunctionFromImage3D_GetOffsetFunc; + property Lib3MFFunctionFromImage3D_SetOffsetFunc: TLib3MFFunctionFromImage3D_SetOffsetFunc read FLib3MFFunctionFromImage3D_SetOffsetFunc; + property Lib3MFFunctionFromImage3D_GetScaleFunc: TLib3MFFunctionFromImage3D_GetScaleFunc read FLib3MFFunctionFromImage3D_GetScaleFunc; + property Lib3MFFunctionFromImage3D_SetScaleFunc: TLib3MFFunctionFromImage3D_SetScaleFunc read FLib3MFFunctionFromImage3D_SetScaleFunc; property Lib3MFBuildItem_GetObjectResourceFunc: TLib3MFBuildItem_GetObjectResourceFunc read FLib3MFBuildItem_GetObjectResourceFunc; property Lib3MFBuildItem_GetUUIDFunc: TLib3MFBuildItem_GetUUIDFunc read FLib3MFBuildItem_GetUUIDFunc; property Lib3MFBuildItem_SetUUIDFunc: TLib3MFBuildItem_SetUUIDFunc read FLib3MFBuildItem_SetUUIDFunc; @@ -5628,6 +10124,7 @@ TLib3MFWrapper = class(TObject) property Lib3MFModel_GetComponentsObjectByIDFunc: TLib3MFModel_GetComponentsObjectByIDFunc read FLib3MFModel_GetComponentsObjectByIDFunc; property Lib3MFModel_GetColorGroupByIDFunc: TLib3MFModel_GetColorGroupByIDFunc read FLib3MFModel_GetColorGroupByIDFunc; property Lib3MFModel_GetSliceStackByIDFunc: TLib3MFModel_GetSliceStackByIDFunc read FLib3MFModel_GetSliceStackByIDFunc; + property Lib3MFModel_GetLevelSetByIDFunc: TLib3MFModel_GetLevelSetByIDFunc read FLib3MFModel_GetLevelSetByIDFunc; property Lib3MFModel_GetBuildUUIDFunc: TLib3MFModel_GetBuildUUIDFunc read FLib3MFModel_GetBuildUUIDFunc; property Lib3MFModel_SetBuildUUIDFunc: TLib3MFModel_SetBuildUUIDFunc read FLib3MFModel_SetBuildUUIDFunc; property Lib3MFModel_GetBuildItemsFunc: TLib3MFModel_GetBuildItemsFunc read FLib3MFModel_GetBuildItemsFunc; @@ -5643,7 +10140,9 @@ TLib3MFWrapper = class(TObject) property Lib3MFModel_GetCompositeMaterialsFunc: TLib3MFModel_GetCompositeMaterialsFunc read FLib3MFModel_GetCompositeMaterialsFunc; property Lib3MFModel_GetMultiPropertyGroupsFunc: TLib3MFModel_GetMultiPropertyGroupsFunc read FLib3MFModel_GetMultiPropertyGroupsFunc; property Lib3MFModel_GetSliceStacksFunc: TLib3MFModel_GetSliceStacksFunc read FLib3MFModel_GetSliceStacksFunc; + property Lib3MFModel_GetImage3DsFunc: TLib3MFModel_GetImage3DsFunc read FLib3MFModel_GetImage3DsFunc; property Lib3MFModel_MergeToModelFunc: TLib3MFModel_MergeToModelFunc read FLib3MFModel_MergeToModelFunc; + property Lib3MFModel_MergeFromModelFunc: TLib3MFModel_MergeFromModelFunc read FLib3MFModel_MergeFromModelFunc; property Lib3MFModel_AddMeshObjectFunc: TLib3MFModel_AddMeshObjectFunc read FLib3MFModel_AddMeshObjectFunc; property Lib3MFModel_AddComponentsObjectFunc: TLib3MFModel_AddComponentsObjectFunc read FLib3MFModel_AddComponentsObjectFunc; property Lib3MFModel_AddSliceStackFunc: TLib3MFModel_AddSliceStackFunc read FLib3MFModel_AddSliceStackFunc; @@ -5653,6 +10152,8 @@ TLib3MFWrapper = class(TObject) property Lib3MFModel_AddTexture2DGroupFunc: TLib3MFModel_AddTexture2DGroupFunc read FLib3MFModel_AddTexture2DGroupFunc; property Lib3MFModel_AddCompositeMaterialsFunc: TLib3MFModel_AddCompositeMaterialsFunc read FLib3MFModel_AddCompositeMaterialsFunc; property Lib3MFModel_AddMultiPropertyGroupFunc: TLib3MFModel_AddMultiPropertyGroupFunc read FLib3MFModel_AddMultiPropertyGroupFunc; + property Lib3MFModel_AddImageStackFunc: TLib3MFModel_AddImageStackFunc read FLib3MFModel_AddImageStackFunc; + property Lib3MFModel_GetImageStackByIDFunc: TLib3MFModel_GetImageStackByIDFunc read FLib3MFModel_GetImageStackByIDFunc; property Lib3MFModel_AddBuildItemFunc: TLib3MFModel_AddBuildItemFunc read FLib3MFModel_AddBuildItemFunc; property Lib3MFModel_RemoveBuildItemFunc: TLib3MFModel_RemoveBuildItemFunc read FLib3MFModel_RemoveBuildItemFunc; property Lib3MFModel_GetMetaDataGroupFunc: TLib3MFModel_GetMetaDataGroupFunc read FLib3MFModel_GetMetaDataGroupFunc; @@ -5669,6 +10170,13 @@ TLib3MFWrapper = class(TObject) property Lib3MFModel_RemoveCustomContentTypeFunc: TLib3MFModel_RemoveCustomContentTypeFunc read FLib3MFModel_RemoveCustomContentTypeFunc; property Lib3MFModel_SetRandomNumberCallbackFunc: TLib3MFModel_SetRandomNumberCallbackFunc read FLib3MFModel_SetRandomNumberCallbackFunc; property Lib3MFModel_GetKeyStoreFunc: TLib3MFModel_GetKeyStoreFunc read FLib3MFModel_GetKeyStoreFunc; + property Lib3MFModel_GetFunctionsFunc: TLib3MFModel_GetFunctionsFunc read FLib3MFModel_GetFunctionsFunc; + property Lib3MFModel_AddImplicitFunctionFunc: TLib3MFModel_AddImplicitFunctionFunc read FLib3MFModel_AddImplicitFunctionFunc; + property Lib3MFModel_AddFunctionFromImage3DFunc: TLib3MFModel_AddFunctionFromImage3DFunc read FLib3MFModel_AddFunctionFromImage3DFunc; + property Lib3MFModel_AddVolumeDataFunc: TLib3MFModel_AddVolumeDataFunc read FLib3MFModel_AddVolumeDataFunc; + property Lib3MFModel_AddLevelSetFunc: TLib3MFModel_AddLevelSetFunc read FLib3MFModel_AddLevelSetFunc; + property Lib3MFModel_GetLevelSetsFunc: TLib3MFModel_GetLevelSetsFunc read FLib3MFModel_GetLevelSetsFunc; + property Lib3MFModel_RemoveResourceFunc: TLib3MFModel_RemoveResourceFunc read FLib3MFModel_RemoveResourceFunc; property Lib3MFGetLibraryVersionFunc: TLib3MFGetLibraryVersionFunc read FLib3MFGetLibraryVersionFunc; property Lib3MFGetPrereleaseInformationFunc: TLib3MFGetPrereleaseInformationFunc read FLib3MFGetPrereleaseInformationFunc; property Lib3MFGetBuildInformationFunc: TLib3MFGetBuildInformationFunc read FLib3MFGetBuildInformationFunc; @@ -5715,3020 +10223,6995 @@ TLib3MFWrapper = class(TObject) end; (************************************************************************************************************************* - Enum conversion + Enum conversion +**************************************************************************************************************************) + + function convertPropertyTypeToConst(const AValue: TLib3MFPropertyType): Integer; + function convertConstToPropertyType(const AValue: Integer): TLib3MFPropertyType; + function convertSlicesMeshResolutionToConst(const AValue: TLib3MFSlicesMeshResolution): Integer; + function convertConstToSlicesMeshResolution(const AValue: Integer): TLib3MFSlicesMeshResolution; + function convertModelUnitToConst(const AValue: TLib3MFModelUnit): Integer; + function convertConstToModelUnit(const AValue: Integer): TLib3MFModelUnit; + function convertObjectTypeToConst(const AValue: TLib3MFObjectType): Integer; + function convertConstToObjectType(const AValue: Integer): TLib3MFObjectType; + function convertTextureTypeToConst(const AValue: TLib3MFTextureType): Integer; + function convertConstToTextureType(const AValue: Integer): TLib3MFTextureType; + function convertTextureTileStyleToConst(const AValue: TLib3MFTextureTileStyle): Integer; + function convertConstToTextureTileStyle(const AValue: Integer): TLib3MFTextureTileStyle; + function convertTextureFilterToConst(const AValue: TLib3MFTextureFilter): Integer; + function convertConstToTextureFilter(const AValue: Integer): TLib3MFTextureFilter; + function convertBeamLatticeCapModeToConst(const AValue: TLib3MFBeamLatticeCapMode): Integer; + function convertConstToBeamLatticeCapMode(const AValue: Integer): TLib3MFBeamLatticeCapMode; + function convertBeamLatticeClipModeToConst(const AValue: TLib3MFBeamLatticeClipMode): Integer; + function convertConstToBeamLatticeClipMode(const AValue: Integer): TLib3MFBeamLatticeClipMode; + function convertBeamLatticeBallModeToConst(const AValue: TLib3MFBeamLatticeBallMode): Integer; + function convertConstToBeamLatticeBallMode(const AValue: Integer): TLib3MFBeamLatticeBallMode; + function convertProgressIdentifierToConst(const AValue: TLib3MFProgressIdentifier): Integer; + function convertConstToProgressIdentifier(const AValue: Integer): TLib3MFProgressIdentifier; + function convertBlendMethodToConst(const AValue: TLib3MFBlendMethod): Integer; + function convertConstToBlendMethod(const AValue: Integer): TLib3MFBlendMethod; + function convertChannelNameToConst(const AValue: TLib3MFChannelName): Integer; + function convertConstToChannelName(const AValue: Integer): TLib3MFChannelName; + function convertCompositionMethodToConst(const AValue: TLib3MFCompositionMethod): Integer; + function convertConstToCompositionMethod(const AValue: Integer): TLib3MFCompositionMethod; + function convertCompositionSpaceToConst(const AValue: TLib3MFCompositionSpace): Integer; + function convertConstToCompositionSpace(const AValue: Integer): TLib3MFCompositionSpace; + function convertImplicitNodeTypeToConst(const AValue: TLib3MFImplicitNodeType): Integer; + function convertConstToImplicitNodeType(const AValue: Integer): TLib3MFImplicitNodeType; + function convertImplicitPortTypeToConst(const AValue: TLib3MFImplicitPortType): Integer; + function convertConstToImplicitPortType(const AValue: Integer): TLib3MFImplicitPortType; + function convertImplicitNodeConfigurationToConst(const AValue: TLib3MFImplicitNodeConfiguration): Integer; + function convertConstToImplicitNodeConfiguration(const AValue: Integer): TLib3MFImplicitNodeConfiguration; + function convertEncryptionAlgorithmToConst(const AValue: TLib3MFEncryptionAlgorithm): Integer; + function convertConstToEncryptionAlgorithm(const AValue: Integer): TLib3MFEncryptionAlgorithm; + function convertWrappingAlgorithmToConst(const AValue: TLib3MFWrappingAlgorithm): Integer; + function convertConstToWrappingAlgorithm(const AValue: Integer): TLib3MFWrappingAlgorithm; + function convertMgfAlgorithmToConst(const AValue: TLib3MFMgfAlgorithm): Integer; + function convertConstToMgfAlgorithm(const AValue: Integer): TLib3MFMgfAlgorithm; + function convertDigestMethodToConst(const AValue: TLib3MFDigestMethod): Integer; + function convertConstToDigestMethod(const AValue: Integer): TLib3MFDigestMethod; + function convertCompressionToConst(const AValue: TLib3MFCompression): Integer; + function convertConstToCompression(const AValue: Integer): TLib3MFCompression; + + TLib3MFPolymorphicFactory<_T:class; _B> = record + class function Make(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): _T; static; + end; + function TLib3MFPolymorphicFactoryMakeBase(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBase; + function TLib3MFPolymorphicFactoryMakeWriter(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFWriter; + function TLib3MFPolymorphicFactoryMakeReader(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFReader; + function TLib3MFPolymorphicFactoryMakePackagePart(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFPackagePart; + function TLib3MFPolymorphicFactoryMakeResource(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResource; + function TLib3MFPolymorphicFactoryMakeResourceIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceIterator; + function TLib3MFPolymorphicFactoryMakeSliceStackIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSliceStackIterator; + function TLib3MFPolymorphicFactoryMakeObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFObjectIterator; + function TLib3MFPolymorphicFactoryMakeMeshObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMeshObjectIterator; + function TLib3MFPolymorphicFactoryMakeComponentsObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponentsObjectIterator; + function TLib3MFPolymorphicFactoryMakeTexture2DIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DIterator; + function TLib3MFPolymorphicFactoryMakeBaseMaterialGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBaseMaterialGroupIterator; + function TLib3MFPolymorphicFactoryMakeColorGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFColorGroupIterator; + function TLib3MFPolymorphicFactoryMakeTexture2DGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DGroupIterator; + function TLib3MFPolymorphicFactoryMakeCompositeMaterialsIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCompositeMaterialsIterator; + function TLib3MFPolymorphicFactoryMakeMultiPropertyGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMultiPropertyGroupIterator; + function TLib3MFPolymorphicFactoryMakeImage3DIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImage3DIterator; + function TLib3MFPolymorphicFactoryMakeFunctionIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionIterator; + function TLib3MFPolymorphicFactoryMakeLevelSetIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLevelSetIterator; + function TLib3MFPolymorphicFactoryMakeMetaData(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMetaData; + function TLib3MFPolymorphicFactoryMakeMetaDataGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMetaDataGroup; + function TLib3MFPolymorphicFactoryMakeObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFObject; + function TLib3MFPolymorphicFactoryMakeMeshObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMeshObject; + function TLib3MFPolymorphicFactoryMakeLevelSet(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLevelSet; + function TLib3MFPolymorphicFactoryMakeBeamLattice(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBeamLattice; + function TLib3MFPolymorphicFactoryMakeFunctionReference(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionReference; + function TLib3MFPolymorphicFactoryMakeVolumeDataColor(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFVolumeDataColor; + function TLib3MFPolymorphicFactoryMakeMaterialMapping(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMaterialMapping; + function TLib3MFPolymorphicFactoryMakeVolumeDataComposite(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFVolumeDataComposite; + function TLib3MFPolymorphicFactoryMakeVolumeDataProperty(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFVolumeDataProperty; + function TLib3MFPolymorphicFactoryMakeVolumeData(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFVolumeData; + function TLib3MFPolymorphicFactoryMakeComponent(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponent; + function TLib3MFPolymorphicFactoryMakeComponentsObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponentsObject; + function TLib3MFPolymorphicFactoryMakeBeamSet(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBeamSet; + function TLib3MFPolymorphicFactoryMakeBaseMaterialGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBaseMaterialGroup; + function TLib3MFPolymorphicFactoryMakeColorGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFColorGroup; + function TLib3MFPolymorphicFactoryMakeTexture2DGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DGroup; + function TLib3MFPolymorphicFactoryMakeCompositeMaterials(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCompositeMaterials; + function TLib3MFPolymorphicFactoryMakeMultiPropertyGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMultiPropertyGroup; + function TLib3MFPolymorphicFactoryMakeImage3D(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImage3D; + function TLib3MFPolymorphicFactoryMakeImageStack(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImageStack; + function TLib3MFPolymorphicFactoryMakeAttachment(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAttachment; + function TLib3MFPolymorphicFactoryMakeTexture2D(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2D; + function TLib3MFPolymorphicFactoryMakeImplicitPort(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImplicitPort; + function TLib3MFPolymorphicFactoryMakeIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFIterator; + function TLib3MFPolymorphicFactoryMakeImplicitPortIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImplicitPortIterator; + function TLib3MFPolymorphicFactoryMakeImplicitNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImplicitNode; + function TLib3MFPolymorphicFactoryMakeOneInputNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFOneInputNode; + function TLib3MFPolymorphicFactoryMakeSinNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSinNode; + function TLib3MFPolymorphicFactoryMakeCosNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCosNode; + function TLib3MFPolymorphicFactoryMakeTanNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTanNode; + function TLib3MFPolymorphicFactoryMakeArcSinNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFArcSinNode; + function TLib3MFPolymorphicFactoryMakeArcCosNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFArcCosNode; + function TLib3MFPolymorphicFactoryMakeArcTanNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFArcTanNode; + function TLib3MFPolymorphicFactoryMakeSinhNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSinhNode; + function TLib3MFPolymorphicFactoryMakeCoshNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCoshNode; + function TLib3MFPolymorphicFactoryMakeTanhNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTanhNode; + function TLib3MFPolymorphicFactoryMakeRoundNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFRoundNode; + function TLib3MFPolymorphicFactoryMakeCeilNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCeilNode; + function TLib3MFPolymorphicFactoryMakeFloorNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFloorNode; + function TLib3MFPolymorphicFactoryMakeSignNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSignNode; + function TLib3MFPolymorphicFactoryMakeFractNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFractNode; + function TLib3MFPolymorphicFactoryMakeAbsNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAbsNode; + function TLib3MFPolymorphicFactoryMakeExpNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFExpNode; + function TLib3MFPolymorphicFactoryMakeLogNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLogNode; + function TLib3MFPolymorphicFactoryMakeLog2Node(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLog2Node; + function TLib3MFPolymorphicFactoryMakeLog10Node(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLog10Node; + function TLib3MFPolymorphicFactoryMakeLengthNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLengthNode; + function TLib3MFPolymorphicFactoryMakeTransposeNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTransposeNode; + function TLib3MFPolymorphicFactoryMakeInverseNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFInverseNode; + function TLib3MFPolymorphicFactoryMakeSqrtNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSqrtNode; + function TLib3MFPolymorphicFactoryMakeResourceIdNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceIdNode; + function TLib3MFPolymorphicFactoryMakeTwoInputNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTwoInputNode; + function TLib3MFPolymorphicFactoryMakeAdditionNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAdditionNode; + function TLib3MFPolymorphicFactoryMakeSubtractionNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSubtractionNode; + function TLib3MFPolymorphicFactoryMakeMultiplicationNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMultiplicationNode; + function TLib3MFPolymorphicFactoryMakeDivisionNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFDivisionNode; + function TLib3MFPolymorphicFactoryMakeDotNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFDotNode; + function TLib3MFPolymorphicFactoryMakeCrossNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCrossNode; + function TLib3MFPolymorphicFactoryMakeArcTan2Node(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFArcTan2Node; + function TLib3MFPolymorphicFactoryMakeMatVecMultiplicationNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMatVecMultiplicationNode; + function TLib3MFPolymorphicFactoryMakeMinNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMinNode; + function TLib3MFPolymorphicFactoryMakeMaxNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMaxNode; + function TLib3MFPolymorphicFactoryMakeFmodNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFmodNode; + function TLib3MFPolymorphicFactoryMakeModNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFModNode; + function TLib3MFPolymorphicFactoryMakePowNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFPowNode; + function TLib3MFPolymorphicFactoryMakeSelectNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSelectNode; + function TLib3MFPolymorphicFactoryMakeClampNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFClampNode; + function TLib3MFPolymorphicFactoryMakeComposeVectorNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComposeVectorNode; + function TLib3MFPolymorphicFactoryMakeVectorFromScalarNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFVectorFromScalarNode; + function TLib3MFPolymorphicFactoryMakeDecomposeVectorNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFDecomposeVectorNode; + function TLib3MFPolymorphicFactoryMakeComposeMatrixNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComposeMatrixNode; + function TLib3MFPolymorphicFactoryMakeMatrixFromRowsNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMatrixFromRowsNode; + function TLib3MFPolymorphicFactoryMakeMatrixFromColumnsNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMatrixFromColumnsNode; + function TLib3MFPolymorphicFactoryMakeConstantNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFConstantNode; + function TLib3MFPolymorphicFactoryMakeConstVecNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFConstVecNode; + function TLib3MFPolymorphicFactoryMakeConstMatNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFConstMatNode; + function TLib3MFPolymorphicFactoryMakeMeshNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMeshNode; + function TLib3MFPolymorphicFactoryMakeUnsignedMeshNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFUnsignedMeshNode; + function TLib3MFPolymorphicFactoryMakeFunctionCallNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionCallNode; + function TLib3MFPolymorphicFactoryMakeNodeIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFNodeIterator; + function TLib3MFPolymorphicFactoryMakeFunction(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunction; + function TLib3MFPolymorphicFactoryMakeImplicitFunction(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImplicitFunction; + function TLib3MFPolymorphicFactoryMakeFunctionFromImage3D(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionFromImage3D; + function TLib3MFPolymorphicFactoryMakeBuildItem(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBuildItem; + function TLib3MFPolymorphicFactoryMakeBuildItemIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBuildItemIterator; + function TLib3MFPolymorphicFactoryMakeSlice(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSlice; + function TLib3MFPolymorphicFactoryMakeSliceStack(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSliceStack; + function TLib3MFPolymorphicFactoryMakeConsumer(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFConsumer; + function TLib3MFPolymorphicFactoryMakeAccessRight(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAccessRight; + function TLib3MFPolymorphicFactoryMakeContentEncryptionParams(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFContentEncryptionParams; + function TLib3MFPolymorphicFactoryMakeResourceData(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceData; + function TLib3MFPolymorphicFactoryMakeResourceDataGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceDataGroup; + function TLib3MFPolymorphicFactoryMakeKeyStore(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFKeyStore; + function TLib3MFPolymorphicFactoryMakeModel(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFModel; + +implementation + +(************************************************************************************************************************* + Enum conversion +**************************************************************************************************************************) + + function convertPropertyTypeToConst(const AValue: TLib3MFPropertyType): Integer; + begin + case AValue of + ePropertyTypeNoPropertyType: Result := 0; + ePropertyTypeBaseMaterial: Result := 1; + ePropertyTypeTexCoord: Result := 2; + ePropertyTypeColors: Result := 3; + ePropertyTypeComposite: Result := 4; + ePropertyTypeMulti: Result := 5; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToPropertyType(const AValue: Integer): TLib3MFPropertyType; + begin + case AValue of + 0: Result := ePropertyTypeNoPropertyType; + 1: Result := ePropertyTypeBaseMaterial; + 2: Result := ePropertyTypeTexCoord; + 3: Result := ePropertyTypeColors; + 4: Result := ePropertyTypeComposite; + 5: Result := ePropertyTypeMulti; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertSlicesMeshResolutionToConst(const AValue: TLib3MFSlicesMeshResolution): Integer; + begin + case AValue of + eSlicesMeshResolutionFullres: Result := 0; + eSlicesMeshResolutionLowres: Result := 1; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToSlicesMeshResolution(const AValue: Integer): TLib3MFSlicesMeshResolution; + begin + case AValue of + 0: Result := eSlicesMeshResolutionFullres; + 1: Result := eSlicesMeshResolutionLowres; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertModelUnitToConst(const AValue: TLib3MFModelUnit): Integer; + begin + case AValue of + eModelUnitMicroMeter: Result := 0; + eModelUnitMilliMeter: Result := 1; + eModelUnitCentiMeter: Result := 2; + eModelUnitInch: Result := 3; + eModelUnitFoot: Result := 4; + eModelUnitMeter: Result := 5; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToModelUnit(const AValue: Integer): TLib3MFModelUnit; + begin + case AValue of + 0: Result := eModelUnitMicroMeter; + 1: Result := eModelUnitMilliMeter; + 2: Result := eModelUnitCentiMeter; + 3: Result := eModelUnitInch; + 4: Result := eModelUnitFoot; + 5: Result := eModelUnitMeter; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertObjectTypeToConst(const AValue: TLib3MFObjectType): Integer; + begin + case AValue of + eObjectTypeOther: Result := 0; + eObjectTypeModel: Result := 1; + eObjectTypeSupport: Result := 2; + eObjectTypeSolidSupport: Result := 3; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToObjectType(const AValue: Integer): TLib3MFObjectType; + begin + case AValue of + 0: Result := eObjectTypeOther; + 1: Result := eObjectTypeModel; + 2: Result := eObjectTypeSupport; + 3: Result := eObjectTypeSolidSupport; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertTextureTypeToConst(const AValue: TLib3MFTextureType): Integer; + begin + case AValue of + eTextureTypeUnknown: Result := 0; + eTextureTypePNG: Result := 1; + eTextureTypeJPEG: Result := 2; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToTextureType(const AValue: Integer): TLib3MFTextureType; + begin + case AValue of + 0: Result := eTextureTypeUnknown; + 1: Result := eTextureTypePNG; + 2: Result := eTextureTypeJPEG; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertTextureTileStyleToConst(const AValue: TLib3MFTextureTileStyle): Integer; + begin + case AValue of + eTextureTileStyleWrap: Result := 0; + eTextureTileStyleMirror: Result := 1; + eTextureTileStyleClamp: Result := 2; + eTextureTileStyleNoTileStyle: Result := 3; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToTextureTileStyle(const AValue: Integer): TLib3MFTextureTileStyle; + begin + case AValue of + 0: Result := eTextureTileStyleWrap; + 1: Result := eTextureTileStyleMirror; + 2: Result := eTextureTileStyleClamp; + 3: Result := eTextureTileStyleNoTileStyle; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertTextureFilterToConst(const AValue: TLib3MFTextureFilter): Integer; + begin + case AValue of + eTextureFilterAuto: Result := 0; + eTextureFilterLinear: Result := 1; + eTextureFilterNearest: Result := 2; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToTextureFilter(const AValue: Integer): TLib3MFTextureFilter; + begin + case AValue of + 0: Result := eTextureFilterAuto; + 1: Result := eTextureFilterLinear; + 2: Result := eTextureFilterNearest; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertBeamLatticeCapModeToConst(const AValue: TLib3MFBeamLatticeCapMode): Integer; + begin + case AValue of + eBeamLatticeCapModeSphere: Result := 0; + eBeamLatticeCapModeHemiSphere: Result := 1; + eBeamLatticeCapModeButt: Result := 2; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToBeamLatticeCapMode(const AValue: Integer): TLib3MFBeamLatticeCapMode; + begin + case AValue of + 0: Result := eBeamLatticeCapModeSphere; + 1: Result := eBeamLatticeCapModeHemiSphere; + 2: Result := eBeamLatticeCapModeButt; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertBeamLatticeClipModeToConst(const AValue: TLib3MFBeamLatticeClipMode): Integer; + begin + case AValue of + eBeamLatticeClipModeNoClipMode: Result := 0; + eBeamLatticeClipModeInside: Result := 1; + eBeamLatticeClipModeOutside: Result := 2; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToBeamLatticeClipMode(const AValue: Integer): TLib3MFBeamLatticeClipMode; + begin + case AValue of + 0: Result := eBeamLatticeClipModeNoClipMode; + 1: Result := eBeamLatticeClipModeInside; + 2: Result := eBeamLatticeClipModeOutside; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertBeamLatticeBallModeToConst(const AValue: TLib3MFBeamLatticeBallMode): Integer; + begin + case AValue of + eBeamLatticeBallModeBeamLatticeBallModeNone: Result := 0; + eBeamLatticeBallModeMixed: Result := 1; + eBeamLatticeBallModeAll: Result := 2; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToBeamLatticeBallMode(const AValue: Integer): TLib3MFBeamLatticeBallMode; + begin + case AValue of + 0: Result := eBeamLatticeBallModeBeamLatticeBallModeNone; + 1: Result := eBeamLatticeBallModeMixed; + 2: Result := eBeamLatticeBallModeAll; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertProgressIdentifierToConst(const AValue: TLib3MFProgressIdentifier): Integer; + begin + case AValue of + eProgressIdentifierQUERYCANCELED: Result := 0; + eProgressIdentifierDONE: Result := 1; + eProgressIdentifierCLEANUP: Result := 2; + eProgressIdentifierREADSTREAM: Result := 3; + eProgressIdentifierEXTRACTOPCPACKAGE: Result := 4; + eProgressIdentifierREADNONROOTMODELS: Result := 5; + eProgressIdentifierREADROOTMODEL: Result := 6; + eProgressIdentifierREADRESOURCES: Result := 7; + eProgressIdentifierREADMESH: Result := 8; + eProgressIdentifierREADSLICES: Result := 9; + eProgressIdentifierREADBUILD: Result := 10; + eProgressIdentifierREADCUSTOMATTACHMENT: Result := 11; + eProgressIdentifierREADTEXTURETACHMENTS: Result := 12; + eProgressIdentifierCREATEOPCPACKAGE: Result := 13; + eProgressIdentifierWRITEMODELSTOSTREAM: Result := 14; + eProgressIdentifierWRITEROOTMODEL: Result := 15; + eProgressIdentifierWRITENONROOTMODELS: Result := 16; + eProgressIdentifierWRITEATTACHMENTS: Result := 17; + eProgressIdentifierWRITECONTENTTYPES: Result := 18; + eProgressIdentifierWRITENOBJECTS: Result := 19; + eProgressIdentifierWRITENODES: Result := 20; + eProgressIdentifierWRITETRIANGLES: Result := 21; + eProgressIdentifierWRITESLICES: Result := 22; + eProgressIdentifierWRITEKEYSTORE: Result := 23; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToProgressIdentifier(const AValue: Integer): TLib3MFProgressIdentifier; + begin + case AValue of + 0: Result := eProgressIdentifierQUERYCANCELED; + 1: Result := eProgressIdentifierDONE; + 2: Result := eProgressIdentifierCLEANUP; + 3: Result := eProgressIdentifierREADSTREAM; + 4: Result := eProgressIdentifierEXTRACTOPCPACKAGE; + 5: Result := eProgressIdentifierREADNONROOTMODELS; + 6: Result := eProgressIdentifierREADROOTMODEL; + 7: Result := eProgressIdentifierREADRESOURCES; + 8: Result := eProgressIdentifierREADMESH; + 9: Result := eProgressIdentifierREADSLICES; + 10: Result := eProgressIdentifierREADBUILD; + 11: Result := eProgressIdentifierREADCUSTOMATTACHMENT; + 12: Result := eProgressIdentifierREADTEXTURETACHMENTS; + 13: Result := eProgressIdentifierCREATEOPCPACKAGE; + 14: Result := eProgressIdentifierWRITEMODELSTOSTREAM; + 15: Result := eProgressIdentifierWRITEROOTMODEL; + 16: Result := eProgressIdentifierWRITENONROOTMODELS; + 17: Result := eProgressIdentifierWRITEATTACHMENTS; + 18: Result := eProgressIdentifierWRITECONTENTTYPES; + 19: Result := eProgressIdentifierWRITENOBJECTS; + 20: Result := eProgressIdentifierWRITENODES; + 21: Result := eProgressIdentifierWRITETRIANGLES; + 22: Result := eProgressIdentifierWRITESLICES; + 23: Result := eProgressIdentifierWRITEKEYSTORE; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertBlendMethodToConst(const AValue: TLib3MFBlendMethod): Integer; + begin + case AValue of + eBlendMethodNoBlendMethod: Result := 0; + eBlendMethodMix: Result := 1; + eBlendMethodMultiply: Result := 2; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToBlendMethod(const AValue: Integer): TLib3MFBlendMethod; + begin + case AValue of + 0: Result := eBlendMethodNoBlendMethod; + 1: Result := eBlendMethodMix; + 2: Result := eBlendMethodMultiply; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertChannelNameToConst(const AValue: TLib3MFChannelName): Integer; + begin + case AValue of + eChannelNameRed: Result := 0; + eChannelNameGreen: Result := 1; + eChannelNameBlue: Result := 2; + eChannelNameAlpha: Result := 3; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToChannelName(const AValue: Integer): TLib3MFChannelName; + begin + case AValue of + 0: Result := eChannelNameRed; + 1: Result := eChannelNameGreen; + 2: Result := eChannelNameBlue; + 3: Result := eChannelNameAlpha; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertCompositionMethodToConst(const AValue: TLib3MFCompositionMethod): Integer; + begin + case AValue of + eCompositionMethodWeightedSum: Result := 0; + eCompositionMethodMultiply: Result := 1; + eCompositionMethodMin: Result := 2; + eCompositionMethodMax: Result := 3; + eCompositionMethodMask: Result := 4; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToCompositionMethod(const AValue: Integer): TLib3MFCompositionMethod; + begin + case AValue of + 0: Result := eCompositionMethodWeightedSum; + 1: Result := eCompositionMethodMultiply; + 2: Result := eCompositionMethodMin; + 3: Result := eCompositionMethodMax; + 4: Result := eCompositionMethodMask; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertCompositionSpaceToConst(const AValue: TLib3MFCompositionSpace): Integer; + begin + case AValue of + eCompositionSpaceRaw: Result := 0; + eCompositionSpaceLinearColor: Result := 1; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToCompositionSpace(const AValue: Integer): TLib3MFCompositionSpace; + begin + case AValue of + 0: Result := eCompositionSpaceRaw; + 1: Result := eCompositionSpaceLinearColor; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertImplicitNodeTypeToConst(const AValue: TLib3MFImplicitNodeType): Integer; + begin + case AValue of + eImplicitNodeTypeAddition: Result := 1; + eImplicitNodeTypeSubtraction: Result := 2; + eImplicitNodeTypeMultiplication: Result := 3; + eImplicitNodeTypeDivision: Result := 4; + eImplicitNodeTypeConstant: Result := 5; + eImplicitNodeTypeConstVec: Result := 6; + eImplicitNodeTypeConstMat: Result := 7; + eImplicitNodeTypeComposeVector: Result := 8; + eImplicitNodeTypeDecomposeVector: Result := 9; + eImplicitNodeTypeComposeMatrix: Result := 10; + eImplicitNodeTypeMatrixFromColumns: Result := 11; + eImplicitNodeTypeMatrixFromRows: Result := 12; + eImplicitNodeTypeDot: Result := 13; + eImplicitNodeTypeCross: Result := 14; + eImplicitNodeTypeMatVecMultiplication: Result := 15; + eImplicitNodeTypeTranspose: Result := 16; + eImplicitNodeTypeInverse: Result := 17; + eImplicitNodeTypeSinus: Result := 18; + eImplicitNodeTypeCosinus: Result := 19; + eImplicitNodeTypeTan: Result := 20; + eImplicitNodeTypeArcSin: Result := 21; + eImplicitNodeTypeArcCos: Result := 22; + eImplicitNodeTypeArcTan: Result := 23; + eImplicitNodeTypeArcTan2: Result := 24; + eImplicitNodeTypeMin: Result := 25; + eImplicitNodeTypeMax: Result := 26; + eImplicitNodeTypeAbs: Result := 27; + eImplicitNodeTypeFmod: Result := 28; + eImplicitNodeTypePow: Result := 29; + eImplicitNodeTypeSqrt: Result := 30; + eImplicitNodeTypeExp: Result := 31; + eImplicitNodeTypeLog: Result := 32; + eImplicitNodeTypeLog2: Result := 33; + eImplicitNodeTypeLog10: Result := 34; + eImplicitNodeTypeSelect: Result := 35; + eImplicitNodeTypeClamp: Result := 36; + eImplicitNodeTypeSinh: Result := 37; + eImplicitNodeTypeCosh: Result := 38; + eImplicitNodeTypeTanh: Result := 39; + eImplicitNodeTypeRound: Result := 40; + eImplicitNodeTypeCeil: Result := 41; + eImplicitNodeTypeFloor: Result := 42; + eImplicitNodeTypeSign: Result := 43; + eImplicitNodeTypeFract: Result := 44; + eImplicitNodeTypeFunctionCall: Result := 45; + eImplicitNodeTypeMesh: Result := 46; + eImplicitNodeTypeLength: Result := 47; + eImplicitNodeTypeConstResourceID: Result := 48; + eImplicitNodeTypeVectorFromScalar: Result := 49; + eImplicitNodeTypeUnsignedMesh: Result := 50; + eImplicitNodeTypeMod: Result := 51; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToImplicitNodeType(const AValue: Integer): TLib3MFImplicitNodeType; + begin + case AValue of + 1: Result := eImplicitNodeTypeAddition; + 2: Result := eImplicitNodeTypeSubtraction; + 3: Result := eImplicitNodeTypeMultiplication; + 4: Result := eImplicitNodeTypeDivision; + 5: Result := eImplicitNodeTypeConstant; + 6: Result := eImplicitNodeTypeConstVec; + 7: Result := eImplicitNodeTypeConstMat; + 8: Result := eImplicitNodeTypeComposeVector; + 9: Result := eImplicitNodeTypeDecomposeVector; + 10: Result := eImplicitNodeTypeComposeMatrix; + 11: Result := eImplicitNodeTypeMatrixFromColumns; + 12: Result := eImplicitNodeTypeMatrixFromRows; + 13: Result := eImplicitNodeTypeDot; + 14: Result := eImplicitNodeTypeCross; + 15: Result := eImplicitNodeTypeMatVecMultiplication; + 16: Result := eImplicitNodeTypeTranspose; + 17: Result := eImplicitNodeTypeInverse; + 18: Result := eImplicitNodeTypeSinus; + 19: Result := eImplicitNodeTypeCosinus; + 20: Result := eImplicitNodeTypeTan; + 21: Result := eImplicitNodeTypeArcSin; + 22: Result := eImplicitNodeTypeArcCos; + 23: Result := eImplicitNodeTypeArcTan; + 24: Result := eImplicitNodeTypeArcTan2; + 25: Result := eImplicitNodeTypeMin; + 26: Result := eImplicitNodeTypeMax; + 27: Result := eImplicitNodeTypeAbs; + 28: Result := eImplicitNodeTypeFmod; + 29: Result := eImplicitNodeTypePow; + 30: Result := eImplicitNodeTypeSqrt; + 31: Result := eImplicitNodeTypeExp; + 32: Result := eImplicitNodeTypeLog; + 33: Result := eImplicitNodeTypeLog2; + 34: Result := eImplicitNodeTypeLog10; + 35: Result := eImplicitNodeTypeSelect; + 36: Result := eImplicitNodeTypeClamp; + 37: Result := eImplicitNodeTypeSinh; + 38: Result := eImplicitNodeTypeCosh; + 39: Result := eImplicitNodeTypeTanh; + 40: Result := eImplicitNodeTypeRound; + 41: Result := eImplicitNodeTypeCeil; + 42: Result := eImplicitNodeTypeFloor; + 43: Result := eImplicitNodeTypeSign; + 44: Result := eImplicitNodeTypeFract; + 45: Result := eImplicitNodeTypeFunctionCall; + 46: Result := eImplicitNodeTypeMesh; + 47: Result := eImplicitNodeTypeLength; + 48: Result := eImplicitNodeTypeConstResourceID; + 49: Result := eImplicitNodeTypeVectorFromScalar; + 50: Result := eImplicitNodeTypeUnsignedMesh; + 51: Result := eImplicitNodeTypeMod; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertImplicitPortTypeToConst(const AValue: TLib3MFImplicitPortType): Integer; + begin + case AValue of + eImplicitPortTypeScalar: Result := 1; + eImplicitPortTypeVector: Result := 2; + eImplicitPortTypeMatrix: Result := 3; + eImplicitPortTypeResourceID: Result := 4; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToImplicitPortType(const AValue: Integer): TLib3MFImplicitPortType; + begin + case AValue of + 1: Result := eImplicitPortTypeScalar; + 2: Result := eImplicitPortTypeVector; + 3: Result := eImplicitPortTypeMatrix; + 4: Result := eImplicitPortTypeResourceID; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertImplicitNodeConfigurationToConst(const AValue: TLib3MFImplicitNodeConfiguration): Integer; + begin + case AValue of + eImplicitNodeConfigurationDefault: Result := 1; + eImplicitNodeConfigurationScalarToScalar: Result := 2; + eImplicitNodeConfigurationVectorToVector: Result := 3; + eImplicitNodeConfigurationMatrixToMatrix: Result := 4; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToImplicitNodeConfiguration(const AValue: Integer): TLib3MFImplicitNodeConfiguration; + begin + case AValue of + 1: Result := eImplicitNodeConfigurationDefault; + 2: Result := eImplicitNodeConfigurationScalarToScalar; + 3: Result := eImplicitNodeConfigurationVectorToVector; + 4: Result := eImplicitNodeConfigurationMatrixToMatrix; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertEncryptionAlgorithmToConst(const AValue: TLib3MFEncryptionAlgorithm): Integer; + begin + case AValue of + eEncryptionAlgorithmAES256_GCM: Result := 1; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToEncryptionAlgorithm(const AValue: Integer): TLib3MFEncryptionAlgorithm; + begin + case AValue of + 1: Result := eEncryptionAlgorithmAES256_GCM; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertWrappingAlgorithmToConst(const AValue: TLib3MFWrappingAlgorithm): Integer; + begin + case AValue of + eWrappingAlgorithmRSA_OAEP: Result := 0; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToWrappingAlgorithm(const AValue: Integer): TLib3MFWrappingAlgorithm; + begin + case AValue of + 0: Result := eWrappingAlgorithmRSA_OAEP; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertMgfAlgorithmToConst(const AValue: TLib3MFMgfAlgorithm): Integer; + begin + case AValue of + eMgfAlgorithmMGF1_SHA1: Result := 160; + eMgfAlgorithmMGF1_SHA224: Result := 224; + eMgfAlgorithmMGF1_SHA256: Result := 256; + eMgfAlgorithmMGF1_SHA384: Result := 384; + eMgfAlgorithmMGF1_SHA512: Result := 512; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToMgfAlgorithm(const AValue: Integer): TLib3MFMgfAlgorithm; + begin + case AValue of + 160: Result := eMgfAlgorithmMGF1_SHA1; + 224: Result := eMgfAlgorithmMGF1_SHA224; + 256: Result := eMgfAlgorithmMGF1_SHA256; + 384: Result := eMgfAlgorithmMGF1_SHA384; + 512: Result := eMgfAlgorithmMGF1_SHA512; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertDigestMethodToConst(const AValue: TLib3MFDigestMethod): Integer; + begin + case AValue of + eDigestMethodSHA1: Result := 160; + eDigestMethodSHA256: Result := 256; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToDigestMethod(const AValue: Integer): TLib3MFDigestMethod; + begin + case AValue of + 160: Result := eDigestMethodSHA1; + 256: Result := eDigestMethodSHA256; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + function convertCompressionToConst(const AValue: TLib3MFCompression): Integer; + begin + case AValue of + eCompressionNoCompression: Result := 0; + eCompressionDeflate: Result := 1; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); + end; + end; + + function convertConstToCompression(const AValue: Integer): TLib3MFCompression; + begin + case AValue of + 0: Result := eCompressionNoCompression; + 1: Result := eCompressionDeflate; + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); + end; + end; + + + + +(************************************************************************************************************************* + PolymorficFactory implementation +**************************************************************************************************************************) + + (** + * IMPORTANT: PolymorphicFactory method should not be used by application directly. + * It's designed to be used on Lib3MFHandle object only once. + * If it's used on any existing object as a form of dynamic cast then + * TLIB3MFWrapper::AcquireInstance(object: TLIB3MFBase) must be called after instantiating new object. + * This is important to keep reference count matching between application and library sides. + *) + class function TLib3MFPolymorphicFactory<_T, _B>.Make(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): _T; + var + ClassTypeId: QWord; + Obj: TLIB3MFBase; + begin + Result := nil; + Wrapper.CheckError(nil, Wrapper.Lib3MFBase_ClassTypeIdFunc(handle, ClassTypeId)); + case (ClassTypeId) of + QWord($856632D0BAF1D8B7): begin Obj := TLIB3MFBase.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Base" + QWord($E76F642F363FD7E9): begin Obj := TLIB3MFWriter.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Writer" + QWord($2D86831DA59FBE72): begin Obj := TLIB3MFReader.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Reader" + QWord($0E55A826D377483E): begin Obj := TLIB3MFPackagePart.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::PackagePart" + QWord($DFE3889D1B269CBB): begin Obj := TLIB3MFResource.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Resource" + QWord($460F3515E2621DBE): begin Obj := TLIB3MFResourceIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIterator" + QWord($69684DB99FA813F6): begin Obj := TLIB3MFSliceStackIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStackIterator" + QWord($DE92510BD2112288): begin Obj := TLIB3MFObjectIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ObjectIterator" + QWord($F4196034E2B9FDE6): begin Obj := TLIB3MFMeshObjectIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObjectIterator" + QWord($564DE4217ED7614A): begin Obj := TLIB3MFComponentsObjectIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObjectIterator" + QWord($4BD32B4870FFC03B): begin Obj := TLIB3MFTexture2DIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DIterator" + QWord($65E6EDD9362C79CB): begin Obj := TLIB3MFBaseMaterialGroupIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroupIterator" + QWord($10274A1757C729C0): begin Obj := TLIB3MFColorGroupIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroupIterator" + QWord($30D55F4DB88FE0CA): begin Obj := TLIB3MFTexture2DGroupIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroupIterator" + QWord($A99CC6C3F70FB6F9): begin Obj := TLIB3MFCompositeMaterialsIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterialsIterator" + QWord($C2BDF5D8CBBDB1F0): begin Obj := TLIB3MFMultiPropertyGroupIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" + QWord($C4B8EC00A82BF336): begin Obj := TLIB3MFImage3DIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" + QWord($40E9035363ACE65E): begin Obj := TLIB3MFFunctionIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" + QWord($A0C005C035D5371D): begin Obj := TLIB3MFLevelSetIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + QWord($D17716D063DE2C22): begin Obj := TLIB3MFMetaData.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" + QWord($0C3B85369E9B25D3): begin Obj := TLIB3MFMetaDataGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" + QWord($2DA2136F577A779C): begin Obj := TLIB3MFObject.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Object" + QWord($3B3A6DC6EC610497): begin Obj := TLIB3MFMeshObject.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" + QWord($E8A7D9C192EFD0E2): begin Obj := TLIB3MFLevelSet.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + QWord($63B3B461B30B4BA5): begin Obj := TLIB3MFBeamLattice.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" + QWord($4DF17E76926221C2): begin Obj := TLIB3MFFunctionReference.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" + QWord($D85B5B6143E787E3): begin Obj := TLIB3MFVolumeDataColor.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" + QWord($241FE6B4817C3FE4): begin Obj := TLIB3MFMaterialMapping.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MaterialMapping" + QWord($46F1DAC40581B304): begin Obj := TLIB3MFVolumeDataComposite.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataComposite" + QWord($FC368AA44ACE42DA): begin Obj := TLIB3MFVolumeDataProperty.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataProperty" + QWord($9200586FB91587A7): begin Obj := TLIB3MFVolumeData.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeData" + QWord($4ECDB6A6F69F2BEB): begin Obj := TLIB3MFComponent.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Component" + QWord($6522CF04EB283FED): begin Obj := TLIB3MFComponentsObject.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" + QWord($30CCDBE90E00B55B): begin Obj := TLIB3MFBeamSet.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" + QWord($B27D4656E16609FA): begin Obj := TLIB3MFBaseMaterialGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroup" + QWord($D085FB2E49CDB5B1): begin Obj := TLIB3MFColorGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroup" + QWord($BC1208397E37055D): begin Obj := TLIB3MFTexture2DGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroup" + QWord($CE16224D688B86F2): begin Obj := TLIB3MFCompositeMaterials.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" + QWord($B989E02E43158FE6): begin Obj := TLIB3MFMultiPropertyGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" + QWord($BD938FF2D2663D61): begin Obj := TLIB3MFImage3D.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Image3D" + QWord($13A2561F0CFB712A): begin Obj := TLIB3MFImageStack.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ImageStack" + QWord($8CE7A1191A63A35D): begin Obj := TLIB3MFAttachment.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Attachment" + QWord($E0441CF976B36319): begin Obj := TLIB3MFTexture2D.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" + QWord($D5C49B04AF1963CD): begin Obj := TLIB3MFImplicitPort.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPort" + QWord($52F06268CD098EFE): begin Obj := TLIB3MFIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Iterator" + QWord($C62268F2D7C7012C): begin Obj := TLIB3MFImplicitPortIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPortIterator" + QWord($E72592A7725AB29B): begin Obj := TLIB3MFImplicitNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitNode" + QWord($B19B9FDA94B0A5E7): begin Obj := TLIB3MFOneInputNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::OneInputNode" + QWord($D5AEA50A56306722): begin Obj := TLIB3MFSinNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::SinNode" + QWord($59BC328F6FB5C5FF): begin Obj := TLIB3MFCosNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::CosNode" + QWord($2614CC572AF350B7): begin Obj := TLIB3MFTanNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::TanNode" + QWord($E554C8A7E72AAF4D): begin Obj := TLIB3MFArcSinNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ArcSinNode" + QWord($943AF6AE0EFD2B8A): begin Obj := TLIB3MFArcCosNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ArcCosNode" + QWord($E47D547615816BAD): begin Obj := TLIB3MFArcTanNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTanNode" + QWord($3C7756A456F2D089): begin Obj := TLIB3MFSinhNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::SinhNode" + QWord($4A993F91E1DE256D): begin Obj := TLIB3MFCoshNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::CoshNode" + QWord($CF077B19B0B78E9D): begin Obj := TLIB3MFTanhNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::TanhNode" + QWord($D9F5A53C657765AE): begin Obj := TLIB3MFRoundNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::RoundNode" + QWord($627E211653E11D93): begin Obj := TLIB3MFCeilNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::CeilNode" + QWord($392A0F4C041D249C): begin Obj := TLIB3MFFloorNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::FloorNode" + QWord($8A45165E6C9646D7): begin Obj := TLIB3MFSignNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::SignNode" + QWord($53E62FD67F4D9A65): begin Obj := TLIB3MFFractNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::FractNode" + QWord($6B641C7060040BE3): begin Obj := TLIB3MFAbsNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::AbsNode" + QWord($3390243A8E2410F3): begin Obj := TLIB3MFExpNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ExpNode" + QWord($0070021D73AA89FD): begin Obj := TLIB3MFLogNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::LogNode" + QWord($E8C0ABF7C5DC7068): begin Obj := TLIB3MFLog2Node.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Log2Node" + QWord($87740AD53454E0DF): begin Obj := TLIB3MFLog10Node.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Log10Node" + QWord($D85889E2739A74B1): begin Obj := TLIB3MFLengthNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::LengthNode" + QWord($A808B7599C158CE6): begin Obj := TLIB3MFTransposeNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::TransposeNode" + QWord($E8601F66A23A0540): begin Obj := TLIB3MFInverseNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::InverseNode" + QWord($9F831944A3DE31DA): begin Obj := TLIB3MFSqrtNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::SqrtNode" + QWord($CA86A77C71CD3FAE): begin Obj := TLIB3MFResourceIdNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIdNode" + QWord($7DE3951BA4C1064C): begin Obj := TLIB3MFTwoInputNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::TwoInputNode" + QWord($57A2236998DF5248): begin Obj := TLIB3MFAdditionNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::AdditionNode" + QWord($6079B12FFF345D02): begin Obj := TLIB3MFSubtractionNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::SubtractionNode" + QWord($A3C27CF54C2AA76C): begin Obj := TLIB3MFMultiplicationNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MultiplicationNode" + QWord($B896B6413C08CF39): begin Obj := TLIB3MFDivisionNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::DivisionNode" + QWord($FE60932A66375FAD): begin Obj := TLIB3MFDotNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::DotNode" + QWord($106182D38CA5CFE3): begin Obj := TLIB3MFCrossNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::CrossNode" + QWord($B6153EF5DE7E5E11): begin Obj := TLIB3MFArcTan2Node.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTan2Node" + QWord($7570C43B9721D0C0): begin Obj := TLIB3MFMatVecMultiplicationNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MatVecMultiplicationNode" + QWord($846AFDE9A091E997): begin Obj := TLIB3MFMinNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MinNode" + QWord($073F910381BF250D): begin Obj := TLIB3MFMaxNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MaxNode" + QWord($1EF703D298223F2A): begin Obj := TLIB3MFFmodNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::FmodNode" + QWord($EA57335849379F22): begin Obj := TLIB3MFModNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ModNode" + QWord($7700AA17CA1AC0F8): begin Obj := TLIB3MFPowNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::PowNode" + QWord($1127ED71E05A9BD4): begin Obj := TLIB3MFSelectNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::SelectNode" + QWord($77AF68C971B1485F): begin Obj := TLIB3MFClampNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ClampNode" + QWord($49C24B8840C01F7E): begin Obj := TLIB3MFComposeVectorNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeVectorNode" + QWord($2E417B93351375E2): begin Obj := TLIB3MFVectorFromScalarNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::VectorFromScalarNode" + QWord($CC4F8D561CCE35D4): begin Obj := TLIB3MFDecomposeVectorNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::DecomposeVectorNode" + QWord($9EF9EB54A53AA40D): begin Obj := TLIB3MFComposeMatrixNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeMatrixNode" + QWord($D6DFD0A7EB64AC33): begin Obj := TLIB3MFMatrixFromRowsNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromRowsNode" + QWord($0DCBEAFCF83F3AAC): begin Obj := TLIB3MFMatrixFromColumnsNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromColumnsNode" + QWord($3F8E5D082F966B1B): begin Obj := TLIB3MFConstantNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ConstantNode" + QWord($9C9363B3F708D556): begin Obj := TLIB3MFConstVecNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ConstVecNode" + QWord($F85C90EDCE6F90A4): begin Obj := TLIB3MFConstMatNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" + QWord($53601FD432E3DEF4): begin Obj := TLIB3MFMeshNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" + QWord($29985A628251A9CD): begin Obj := TLIB3MFUnsignedMeshNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + QWord($0765C17C952F24E3): begin Obj := TLIB3MFFunctionCallNode.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" + QWord($FC006BC888CAB4D0): begin Obj := TLIB3MFNodeIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" + QWord($9EFB2757CA1A5231): begin Obj := TLIB3MFFunction.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Function" + QWord($6CE54469EEA83BC1): begin Obj := TLIB3MFImplicitFunction.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitFunction" + QWord($9BD7D3C2026B8CE8): begin Obj := TLIB3MFFunctionFromImage3D.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionFromImage3D" + QWord($68FB2D5FFC4BA12A): begin Obj := TLIB3MFBuildItem.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItem" + QWord($A7D21BD364910860): begin Obj := TLIB3MFBuildItemIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItemIterator" + QWord($2198BCF4D8DF9C40): begin Obj := TLIB3MFSlice.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Slice" + QWord($6594B031B6096238): begin Obj := TLIB3MFSliceStack.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStack" + QWord($D9E46D5E6D8118EE): begin Obj := TLIB3MFConsumer.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Consumer" + QWord($385C42FC5609498A): begin Obj := TLIB3MFAccessRight.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::AccessRight" + QWord($7FB36B91D4CE4671): begin Obj := TLIB3MFContentEncryptionParams.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ContentEncryptionParams" + QWord($1A47A5E258E22EF9): begin Obj := TLIB3MFResourceData.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceData" + QWord($D59067227E428AA4): begin Obj := TLIB3MFResourceDataGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceDataGroup" + QWord($1CC9E0CC082253C6): begin Obj := TLIB3MFKeyStore.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::KeyStore" + QWord($5A8164ECEDB03F09): begin Obj := TLIB3MFModel.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Model" + end; + if Result = nil then Result := _B.Create(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeBase(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBase; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeWriter(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFWriter; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeReader(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFReader; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakePackagePart(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFPackagePart; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeResource(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResource; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeResourceIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeSliceStackIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSliceStackIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFObjectIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMeshObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMeshObjectIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeComponentsObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponentsObjectIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeTexture2DIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeBaseMaterialGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBaseMaterialGroupIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeColorGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFColorGroupIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeTexture2DGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DGroupIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeCompositeMaterialsIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCompositeMaterialsIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMultiPropertyGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMultiPropertyGroupIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeImage3DIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImage3DIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeFunctionIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeLevelSetIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLevelSetIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMetaData(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMetaData; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMetaDataGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMetaDataGroup; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFObject; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMeshObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMeshObject; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeLevelSet(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLevelSet; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeBeamLattice(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBeamLattice; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeFunctionReference(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionReference; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeVolumeDataColor(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFVolumeDataColor; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMaterialMapping(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMaterialMapping; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeVolumeDataComposite(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFVolumeDataComposite; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeVolumeDataProperty(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFVolumeDataProperty; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeVolumeData(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFVolumeData; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeComponent(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponent; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeComponentsObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponentsObject; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeBeamSet(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBeamSet; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeBaseMaterialGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBaseMaterialGroup; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeColorGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFColorGroup; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeTexture2DGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DGroup; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeCompositeMaterials(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCompositeMaterials; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMultiPropertyGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMultiPropertyGroup; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeImage3D(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImage3D; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeImageStack(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImageStack; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeAttachment(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAttachment; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeTexture2D(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2D; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeImplicitPort(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImplicitPort; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeImplicitPortIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImplicitPortIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeImplicitNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImplicitNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeOneInputNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFOneInputNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeSinNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSinNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeCosNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCosNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeTanNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTanNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeArcSinNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFArcSinNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeArcCosNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFArcCosNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeArcTanNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFArcTanNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeSinhNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSinhNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeCoshNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCoshNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeTanhNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTanhNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeRoundNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFRoundNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeCeilNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCeilNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeFloorNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFloorNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeSignNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSignNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeFractNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFractNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeAbsNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAbsNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeExpNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFExpNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeLogNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLogNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeLog2Node(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLog2Node; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeLog10Node(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLog10Node; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeLengthNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFLengthNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeTransposeNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTransposeNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeInverseNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFInverseNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeSqrtNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSqrtNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeResourceIdNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceIdNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeTwoInputNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTwoInputNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeAdditionNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAdditionNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeSubtractionNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSubtractionNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMultiplicationNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMultiplicationNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeDivisionNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFDivisionNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeDotNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFDotNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeCrossNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCrossNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeArcTan2Node(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFArcTan2Node; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMatVecMultiplicationNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMatVecMultiplicationNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMinNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMinNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMaxNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMaxNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeFmodNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFmodNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeModNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFModNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakePowNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFPowNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeSelectNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSelectNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeClampNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFClampNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeComposeVectorNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComposeVectorNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeVectorFromScalarNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFVectorFromScalarNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeDecomposeVectorNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFDecomposeVectorNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeComposeMatrixNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComposeMatrixNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMatrixFromRowsNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMatrixFromRowsNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMatrixFromColumnsNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMatrixFromColumnsNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeConstantNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFConstantNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeConstVecNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFConstVecNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeConstMatNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFConstMatNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeMeshNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMeshNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeUnsignedMeshNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFUnsignedMeshNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeFunctionCallNode(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionCallNode; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeNodeIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFNodeIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeFunction(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunction; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeImplicitFunction(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFImplicitFunction; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeFunctionFromImage3D(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFFunctionFromImage3D; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeBuildItem(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBuildItem; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeBuildItemIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBuildItemIterator; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeSlice(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSlice; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeSliceStack(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSliceStack; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeConsumer(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFConsumer; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeAccessRight(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAccessRight; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeContentEncryptionParams(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFContentEncryptionParams; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeResourceData(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceData; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeResourceDataGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceDataGroup; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeKeyStore(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFKeyStore; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + function TLib3MFPolymorphicFactoryMakeModel(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFModel; + begin + Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + end; + +(************************************************************************************************************************* + Exception implementation +**************************************************************************************************************************) + + constructor ELib3MFException.Create(AErrorCode: TLib3MFResult; AMessage: String); + var + ADescription: String; + begin + FErrorCode := AErrorCode; + case FErrorCode of + LIB3MF_ERROR_NOTIMPLEMENTED: ADescription := 'functionality not implemented'; + LIB3MF_ERROR_INVALIDPARAM: ADescription := 'an invalid parameter was passed'; + LIB3MF_ERROR_INVALIDCAST: ADescription := 'a type cast failed'; + LIB3MF_ERROR_BUFFERTOOSMALL: ADescription := 'a provided buffer is too small'; + LIB3MF_ERROR_GENERICEXCEPTION: ADescription := 'a generic exception occurred'; + LIB3MF_ERROR_COULDNOTLOADLIBRARY: ADescription := 'the library could not be loaded'; + LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT: ADescription := 'a required exported symbol could not be found in the library'; + LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION: ADescription := 'the version of the binary interface does not match the bindings interface'; + LIB3MF_ERROR_CALCULATIONABORTED: ADescription := 'a calculation has been aborted'; + LIB3MF_ERROR_SHOULDNOTBECALLED: ADescription := 'functionality should not be called'; + LIB3MF_ERROR_READERCLASSUNKNOWN: ADescription := 'the queried reader class is unknown'; + LIB3MF_ERROR_WRITERCLASSUNKNOWN: ADescription := 'the queried writer class is unknown'; + LIB3MF_ERROR_ITERATORINVALIDINDEX: ADescription := 'the current index of an iterator is invalid'; + LIB3MF_ERROR_INVALIDMODELRESOURCE: ADescription := 'no Model Resource has been given'; + LIB3MF_ERROR_RESOURCENOTFOUND: ADescription := 'Resource not found'; + LIB3MF_ERROR_INVALIDMODEL: ADescription := 'A model is invalid'; + LIB3MF_ERROR_INVALIDOBJECT: ADescription := 'An object is invalid'; + LIB3MF_ERROR_INVALIDMESHOBJECT: ADescription := 'A mesh object is invalid'; + LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT: ADescription := 'A components object is invalid'; + LIB3MF_ERROR_INVALIDCOMPONENT: ADescription := 'A component is invalid'; + LIB3MF_ERROR_INVALIDBUILDITEM: ADescription := 'A build item is invalid'; + LIB3MF_ERROR_INVALIDBASEMATERIALGROUP: ADescription := 'A basematerialgroup is invalid'; + LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE: ADescription := 'A slicestack resource is invalid'; + LIB3MF_ERROR_INVALIDTEXTURERESOURCE: ADescription := 'A texture resource is invalid'; + LIB3MF_ERROR_INVALIDCOLORGROUP: ADescription := 'A color group resource is invalid'; + LIB3MF_ERROR_INVALIDTEXTURE2DGROUP: ADescription := 'A texture2d group resource is invalid'; + LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS: ADescription := 'A composite materials resource is invalid'; + LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP: ADescription := 'A MultiPropertyGroup resource is invalid'; + LIB3MF_ERROR_INVALIDRESOURCEINDEX: ADescription := 'A resource index is invalid'; + LIB3MF_ERROR_ATTACHMENTNOTFOUND: ADescription := 'Attachment not found'; + LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE: ADescription := 'A component references one of its ancestors'; + LIB3MF_ERROR_INVALIDATTACHMENTSTREAM: ADescription := 'An attachment stream is invalid'; + LIB3MF_ERROR_INVALIDPROPERTYCOUNT: ADescription := 'Invalid property count.'; + LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: ADescription := 'A progress identifier is unknown'; + LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: ADescription := 'An element buffer exceeds its spec limit'; + LIB3MF_ERROR_INVALIDRESOURCE: ADescription := 'A resource is invalid'; + LIB3MF_ERROR_INVALIDLEVELSET: ADescription := 'A level set is invalid'; + LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: ADescription := 'This object type is not valid for beamlattices'; + LIB3MF_ERROR_INVALIDKEYSTORE: ADescription := 'The keystore object is invalid'; + LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: ADescription := 'The consumer keystore object is invalid'; + LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: ADescription := 'A consumer has not been found'; + LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: ADescription := 'A resource data has not been found'; + LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: ADescription := 'A Key or Conentent encryption callback has not been registered'; + LIB3MF_ERROR_INVALIDKEYSIZE: ADescription := 'The key size is invalid'; + LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: ADescription := 'Link could not be added, the port types are incompatible'; + LIB3MF_ERROR_GRAPHISCYCLIC: ADescription := 'The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted.'; + LIB3MF_ERROR_INPUTNOTSET: ADescription := 'The input of a node is not set.'; + LIB3MF_ERROR_INVALIDNODECONFIGURATION: ADescription := 'The selected node configuration is not supported'; + else + ADescription := 'unknown'; + end; + + inherited Create(Format('the 3MF Library Error - %s (#%d, %s)', [ ADescription, AErrorCode, AMessage ])); + end; + + constructor ELib3MFException.CreateCustomMessage(AErrorCode: TLib3MFResult; AMessage: String); + begin + FCustomMessage := AMessage; + FErrorCode := AErrorCode; + inherited Create(Format('%s (%d)', [FCustomMessage, AErrorCode])); + end; + +(************************************************************************************************************************* + Class implementation for Base +**************************************************************************************************************************) + + constructor TLib3MFBase.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + if not Assigned(AWrapper) then + raise ELib3MFException.Create(LIB3MF_ERROR_INVALIDPARAM, ''); + if not Assigned(AHandle) then + raise ELib3MFException.Create(LIB3MF_ERROR_INVALIDPARAM, ''); + + inherited Create(); + FWrapper := AWrapper; + FHandle := AHandle; + end; + + destructor TLib3MFBase.Destroy; + begin + FWrapper.Release(self); + inherited; + end; + + function TLib3MFBase.ClassTypeId(): QWord; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBase_ClassTypeIdFunc(FHandle, Result)); + end; + +(************************************************************************************************************************* + Class implementation for Writer +**************************************************************************************************************************) + + constructor TLib3MFWriter.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFWriter.Destroy; + begin + inherited; + end; + + procedure TLib3MFWriter.WriteToFile(const AFilename: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_WriteToFileFunc(FHandle, PAnsiChar(AFilename))); + end; + + function TLib3MFWriter.GetStreamSize(): QWord; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetStreamSizeFunc(FHandle, Result)); + end; + + procedure TLib3MFWriter.WriteToBuffer(out ABuffer: TByteDynArray); + var + countNeededBuffer: QWord; + countWrittenBuffer: QWord; + begin + countNeededBuffer:= 0; + countWrittenBuffer:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_WriteToBufferFunc(FHandle, 0, countNeededBuffer, nil)); + SetLength(ABuffer, countNeededBuffer); + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_WriteToBufferFunc(FHandle, countNeededBuffer, countWrittenBuffer, @ABuffer[0])); + end; + + procedure TLib3MFWriter.WriteToCallback(const ATheWriteCallback: PLib3MF_WriteCallback; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); + begin + if not Assigned(ATheWriteCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheWriteCallback is a nil value.'); + if not Assigned(ATheSeekCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheSeekCallback is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_WriteToCallbackFunc(FHandle, ATheWriteCallback, ATheSeekCallback, AUserData)); + end; + + procedure TLib3MFWriter.SetProgressCallback(const AProgressCallback: PLib3MF_ProgressCallback; const AUserData: Pointer); + begin + if not Assigned(AProgressCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AProgressCallback is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_SetProgressCallbackFunc(FHandle, AProgressCallback, AUserData)); + end; + + function TLib3MFWriter.GetDecimalPrecision(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetDecimalPrecisionFunc(FHandle, Result)); + end; + + procedure TLib3MFWriter.SetDecimalPrecision(const ADecimalPrecision: Cardinal); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_SetDecimalPrecisionFunc(FHandle, ADecimalPrecision)); + end; + + procedure TLib3MFWriter.SetStrictModeActive(const AStrictModeActive: Boolean); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_SetStrictModeActiveFunc(FHandle, Ord(AStrictModeActive))); + end; + + function TLib3MFWriter.GetStrictModeActive(): Boolean; + var + ResultStrictModeActive: Byte; + begin + ResultStrictModeActive := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetStrictModeActiveFunc(FHandle, ResultStrictModeActive)); + Result := (ResultStrictModeActive <> 0); + end; + + function TLib3MFWriter.GetWarning(const AIndex: Cardinal; out AErrorCode: Cardinal): String; + var + bytesNeededWarning: Cardinal; + bytesWrittenWarning: Cardinal; + bufferWarning: array of Char; + begin + bytesNeededWarning:= 0; + bytesWrittenWarning:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetWarningFunc(FHandle, AIndex, AErrorCode, 0, bytesNeededWarning, nil)); + SetLength(bufferWarning, bytesNeededWarning); + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetWarningFunc(FHandle, AIndex, AErrorCode, bytesNeededWarning, bytesWrittenWarning, @bufferWarning[0])); + Result := StrPas(@bufferWarning[0]); + end; + + function TLib3MFWriter.GetWarningCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetWarningCountFunc(FHandle, Result)); + end; + + procedure TLib3MFWriter.AddKeyWrappingCallback(const AConsumerID: String; const ATheCallback: PLib3MF_KeyWrappingCallback; const AUserData: Pointer); + begin + if not Assigned(ATheCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheCallback is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_AddKeyWrappingCallbackFunc(FHandle, PAnsiChar(AConsumerID), ATheCallback, AUserData)); + end; + + procedure TLib3MFWriter.SetContentEncryptionCallback(const ATheCallback: PLib3MF_ContentEncryptionCallback; const AUserData: Pointer); + begin + if not Assigned(ATheCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheCallback is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_SetContentEncryptionCallbackFunc(FHandle, ATheCallback, AUserData)); + end; + +(************************************************************************************************************************* + Class implementation for Reader +**************************************************************************************************************************) + + constructor TLib3MFReader.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFReader.Destroy; + begin + inherited; + end; + + procedure TLib3MFReader.ReadFromFile(const AFilename: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_ReadFromFileFunc(FHandle, PAnsiChar(AFilename))); + end; + + procedure TLib3MFReader.ReadFromBuffer(const ABuffer: TByteDynArray); + var + PtrBuffer: PByte; + LenBuffer: QWord; + begin + LenBuffer := Length(ABuffer); + if LenBuffer > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenBuffer > 0 then + PtrBuffer := @ABuffer[0] + else + PtrBuffer := nil; + + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_ReadFromBufferFunc(FHandle, QWord(LenBuffer), PtrBuffer)); + end; + + procedure TLib3MFReader.ReadFromCallback(const ATheReadCallback: PLib3MF_ReadCallback; const AStreamSize: QWord; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); + begin + if not Assigned(ATheReadCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheReadCallback is a nil value.'); + if not Assigned(ATheSeekCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheSeekCallback is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_ReadFromCallbackFunc(FHandle, ATheReadCallback, AStreamSize, ATheSeekCallback, AUserData)); + end; + + procedure TLib3MFReader.SetProgressCallback(const AProgressCallback: PLib3MF_ProgressCallback; const AUserData: Pointer); + begin + if not Assigned(AProgressCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AProgressCallback is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_SetProgressCallbackFunc(FHandle, AProgressCallback, AUserData)); + end; + + procedure TLib3MFReader.AddRelationToRead(const ARelationShipType: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_AddRelationToReadFunc(FHandle, PAnsiChar(ARelationShipType))); + end; + + procedure TLib3MFReader.RemoveRelationToRead(const ARelationShipType: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_RemoveRelationToReadFunc(FHandle, PAnsiChar(ARelationShipType))); + end; + + procedure TLib3MFReader.SetStrictModeActive(const AStrictModeActive: Boolean); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_SetStrictModeActiveFunc(FHandle, Ord(AStrictModeActive))); + end; + + function TLib3MFReader.GetStrictModeActive(): Boolean; + var + ResultStrictModeActive: Byte; + begin + ResultStrictModeActive := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_GetStrictModeActiveFunc(FHandle, ResultStrictModeActive)); + Result := (ResultStrictModeActive <> 0); + end; + + function TLib3MFReader.GetWarning(const AIndex: Cardinal; out AErrorCode: Cardinal): String; + var + bytesNeededWarning: Cardinal; + bytesWrittenWarning: Cardinal; + bufferWarning: array of Char; + begin + bytesNeededWarning:= 0; + bytesWrittenWarning:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_GetWarningFunc(FHandle, AIndex, AErrorCode, 0, bytesNeededWarning, nil)); + SetLength(bufferWarning, bytesNeededWarning); + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_GetWarningFunc(FHandle, AIndex, AErrorCode, bytesNeededWarning, bytesWrittenWarning, @bufferWarning[0])); + Result := StrPas(@bufferWarning[0]); + end; + + function TLib3MFReader.GetWarningCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_GetWarningCountFunc(FHandle, Result)); + end; + + procedure TLib3MFReader.AddKeyWrappingCallback(const AConsumerID: String; const ATheCallback: PLib3MF_KeyWrappingCallback; const AUserData: Pointer); + begin + if not Assigned(ATheCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheCallback is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_AddKeyWrappingCallbackFunc(FHandle, PAnsiChar(AConsumerID), ATheCallback, AUserData)); + end; + + procedure TLib3MFReader.SetContentEncryptionCallback(const ATheCallback: PLib3MF_ContentEncryptionCallback; const AUserData: Pointer); + begin + if not Assigned(ATheCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheCallback is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFReader_SetContentEncryptionCallbackFunc(FHandle, ATheCallback, AUserData)); + end; + +(************************************************************************************************************************* + Class implementation for PackagePart +**************************************************************************************************************************) + + constructor TLib3MFPackagePart.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFPackagePart.Destroy; + begin + inherited; + end; + + function TLib3MFPackagePart.GetPath(): String; + var + bytesNeededPath: Cardinal; + bytesWrittenPath: Cardinal; + bufferPath: array of Char; + begin + bytesNeededPath:= 0; + bytesWrittenPath:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFPackagePart_GetPathFunc(FHandle, 0, bytesNeededPath, nil)); + SetLength(bufferPath, bytesNeededPath); + FWrapper.CheckError(Self, FWrapper.Lib3MFPackagePart_GetPathFunc(FHandle, bytesNeededPath, bytesWrittenPath, @bufferPath[0])); + Result := StrPas(@bufferPath[0]); + end; + + procedure TLib3MFPackagePart.SetPath(const APath: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFPackagePart_SetPathFunc(FHandle, PAnsiChar(APath))); + end; + +(************************************************************************************************************************* + Class implementation for Resource +**************************************************************************************************************************) + + constructor TLib3MFResource.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFResource.Destroy; + begin + inherited; + end; + + function TLib3MFResource.GetResourceID(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFResource_GetResourceIDFunc(FHandle, Result)); + end; + + function TLib3MFResource.GetUniqueResourceID(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFResource_GetUniqueResourceIDFunc(FHandle, Result)); + end; + + function TLib3MFResource.PackagePart(): TLib3MFPackagePart; + var + HPackagePart: TLib3MFHandle; + begin + Result := nil; + HPackagePart := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFResource_PackagePartFunc(FHandle, HPackagePart)); + if Assigned(HPackagePart) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPackagePart); + end; + + procedure TLib3MFResource.SetPackagePart(const APackagePart: TLib3MFPackagePart); + var + APackagePartHandle: TLib3MFHandle; + begin + if Assigned(APackagePart) then + APackagePartHandle := APackagePart.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'APackagePart is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFResource_SetPackagePartFunc(FHandle, APackagePartHandle)); + end; + + function TLib3MFResource.GetModelResourceID(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFResource_GetModelResourceIDFunc(FHandle, Result)); + end; + +(************************************************************************************************************************* + Class implementation for ResourceIterator +**************************************************************************************************************************) + + constructor TLib3MFResourceIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFResourceIterator.Destroy; + begin + inherited; + end; + + function TLib3MFResourceIterator.MoveNext(): Boolean; + var + ResultHasNext: Byte; + begin + ResultHasNext := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIterator_MoveNextFunc(FHandle, ResultHasNext)); + Result := (ResultHasNext <> 0); + end; + + function TLib3MFResourceIterator.MovePrevious(): Boolean; + var + ResultHasPrevious: Byte; + begin + ResultHasPrevious := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIterator_MovePreviousFunc(FHandle, ResultHasPrevious)); + Result := (ResultHasPrevious <> 0); + end; + + function TLib3MFResourceIterator.GetCurrent(): TLib3MFResource; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIterator_GetCurrentFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + + function TLib3MFResourceIterator.Clone(): TLib3MFResourceIterator; + var + HOutResourceIterator: TLib3MFHandle; + begin + Result := nil; + HOutResourceIterator := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIterator_CloneFunc(FHandle, HOutResourceIterator)); + if Assigned(HOutResourceIterator) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HOutResourceIterator); + end; + + function TLib3MFResourceIterator.Count(): QWord; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIterator_CountFunc(FHandle, Result)); + end; + +(************************************************************************************************************************* + Class implementation for SliceStackIterator +**************************************************************************************************************************) + + constructor TLib3MFSliceStackIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFSliceStackIterator.Destroy; + begin + inherited; + end; + + function TLib3MFSliceStackIterator.GetCurrentSliceStack(): TLib3MFSliceStack; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFSliceStackIterator_GetCurrentSliceStackFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for ObjectIterator +**************************************************************************************************************************) + + constructor TLib3MFObjectIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFObjectIterator.Destroy; + begin + inherited; + end; + + function TLib3MFObjectIterator.GetCurrentObject(): TLib3MFObject; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFObjectIterator_GetCurrentObjectFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for MeshObjectIterator +**************************************************************************************************************************) + + constructor TLib3MFMeshObjectIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFMeshObjectIterator.Destroy; + begin + inherited; + end; + + function TLib3MFMeshObjectIterator.GetCurrentMeshObject(): TLib3MFMeshObject; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObjectIterator_GetCurrentMeshObjectFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for ComponentsObjectIterator +**************************************************************************************************************************) + + constructor TLib3MFComponentsObjectIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFComponentsObjectIterator.Destroy; + begin + inherited; + end; + + function TLib3MFComponentsObjectIterator.GetCurrentComponentsObject(): TLib3MFComponentsObject; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComponentsObjectIterator_GetCurrentComponentsObjectFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for Texture2DIterator +**************************************************************************************************************************) + + constructor TLib3MFTexture2DIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFTexture2DIterator.Destroy; + begin + inherited; + end; + + function TLib3MFTexture2DIterator.GetCurrentTexture2D(): TLib3MFTexture2D; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DIterator_GetCurrentTexture2DFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for BaseMaterialGroupIterator +**************************************************************************************************************************) + + constructor TLib3MFBaseMaterialGroupIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFBaseMaterialGroupIterator.Destroy; + begin + inherited; + end; + + function TLib3MFBaseMaterialGroupIterator.GetCurrentBaseMaterialGroup(): TLib3MFBaseMaterialGroup; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroupIterator_GetCurrentBaseMaterialGroupFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for ColorGroupIterator +**************************************************************************************************************************) + + constructor TLib3MFColorGroupIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFColorGroupIterator.Destroy; + begin + inherited; + end; + + function TLib3MFColorGroupIterator.GetCurrentColorGroup(): TLib3MFColorGroup; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroupIterator_GetCurrentColorGroupFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for Texture2DGroupIterator +**************************************************************************************************************************) + + constructor TLib3MFTexture2DGroupIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFTexture2DGroupIterator.Destroy; + begin + inherited; + end; + + function TLib3MFTexture2DGroupIterator.GetCurrentTexture2DGroup(): TLib3MFTexture2DGroup; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for CompositeMaterialsIterator +**************************************************************************************************************************) + + constructor TLib3MFCompositeMaterialsIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFCompositeMaterialsIterator.Destroy; + begin + inherited; + end; + + function TLib3MFCompositeMaterialsIterator.GetCurrentCompositeMaterials(): TLib3MFCompositeMaterials; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for MultiPropertyGroupIterator +**************************************************************************************************************************) + + constructor TLib3MFMultiPropertyGroupIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFMultiPropertyGroupIterator.Destroy; + begin + inherited; + end; + + function TLib3MFMultiPropertyGroupIterator.GetCurrentMultiPropertyGroup(): TLib3MFMultiPropertyGroup; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for Image3DIterator +**************************************************************************************************************************) + + constructor TLib3MFImage3DIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFImage3DIterator.Destroy; + begin + inherited; + end; + + function TLib3MFImage3DIterator.GetCurrentImage3D(): TLib3MFImage3D; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImage3DIterator_GetCurrentImage3DFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for FunctionIterator +**************************************************************************************************************************) + + constructor TLib3MFFunctionIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFFunctionIterator.Destroy; + begin + inherited; + end; + + function TLib3MFFunctionIterator.GetCurrentFunction(): TLib3MFFunction; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionIterator_GetCurrentFunctionFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for LevelSetIterator +**************************************************************************************************************************) + + constructor TLib3MFLevelSetIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFLevelSetIterator.Destroy; + begin + inherited; + end; + + function TLib3MFLevelSetIterator.GetCurrentLevelSet(): TLib3MFLevelSet; + var + HResource: TLib3MFHandle; + begin + Result := nil; + HResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSetIterator_GetCurrentLevelSetFunc(FHandle, HResource)); + if Assigned(HResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + +(************************************************************************************************************************* + Class implementation for MetaData +**************************************************************************************************************************) + + constructor TLib3MFMetaData.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFMetaData.Destroy; + begin + inherited; + end; + + function TLib3MFMetaData.GetNameSpace(): String; + var + bytesNeededNameSpace: Cardinal; + bytesWrittenNameSpace: Cardinal; + bufferNameSpace: array of Char; + begin + bytesNeededNameSpace:= 0; + bytesWrittenNameSpace:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetNameSpaceFunc(FHandle, 0, bytesNeededNameSpace, nil)); + SetLength(bufferNameSpace, bytesNeededNameSpace); + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetNameSpaceFunc(FHandle, bytesNeededNameSpace, bytesWrittenNameSpace, @bufferNameSpace[0])); + Result := StrPas(@bufferNameSpace[0]); + end; + + procedure TLib3MFMetaData.SetNameSpace(const ANameSpace: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_SetNameSpaceFunc(FHandle, PAnsiChar(ANameSpace))); + end; + + function TLib3MFMetaData.GetName(): String; + var + bytesNeededName: Cardinal; + bytesWrittenName: Cardinal; + bufferName: array of Char; + begin + bytesNeededName:= 0; + bytesWrittenName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetNameFunc(FHandle, 0, bytesNeededName, nil)); + SetLength(bufferName, bytesNeededName); + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetNameFunc(FHandle, bytesNeededName, bytesWrittenName, @bufferName[0])); + Result := StrPas(@bufferName[0]); + end; + + procedure TLib3MFMetaData.SetName(const AName: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_SetNameFunc(FHandle, PAnsiChar(AName))); + end; + + function TLib3MFMetaData.GetKey(): String; + var + bytesNeededKey: Cardinal; + bytesWrittenKey: Cardinal; + bufferKey: array of Char; + begin + bytesNeededKey:= 0; + bytesWrittenKey:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetKeyFunc(FHandle, 0, bytesNeededKey, nil)); + SetLength(bufferKey, bytesNeededKey); + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetKeyFunc(FHandle, bytesNeededKey, bytesWrittenKey, @bufferKey[0])); + Result := StrPas(@bufferKey[0]); + end; + + function TLib3MFMetaData.GetMustPreserve(): Boolean; + var + ResultMustPreserve: Byte; + begin + ResultMustPreserve := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetMustPreserveFunc(FHandle, ResultMustPreserve)); + Result := (ResultMustPreserve <> 0); + end; + + procedure TLib3MFMetaData.SetMustPreserve(const AMustPreserve: Boolean); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_SetMustPreserveFunc(FHandle, Ord(AMustPreserve))); + end; + + function TLib3MFMetaData.GetType(): String; + var + bytesNeededType: Cardinal; + bytesWrittenType: Cardinal; + bufferType: array of Char; + begin + bytesNeededType:= 0; + bytesWrittenType:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetTypeFunc(FHandle, 0, bytesNeededType, nil)); + SetLength(bufferType, bytesNeededType); + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetTypeFunc(FHandle, bytesNeededType, bytesWrittenType, @bufferType[0])); + Result := StrPas(@bufferType[0]); + end; + + procedure TLib3MFMetaData.SetType(const AType: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_SetTypeFunc(FHandle, PAnsiChar(AType))); + end; + + function TLib3MFMetaData.GetValue(): String; + var + bytesNeededValue: Cardinal; + bytesWrittenValue: Cardinal; + bufferValue: array of Char; + begin + bytesNeededValue:= 0; + bytesWrittenValue:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetValueFunc(FHandle, 0, bytesNeededValue, nil)); + SetLength(bufferValue, bytesNeededValue); + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetValueFunc(FHandle, bytesNeededValue, bytesWrittenValue, @bufferValue[0])); + Result := StrPas(@bufferValue[0]); + end; + + procedure TLib3MFMetaData.SetValue(const AValue: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_SetValueFunc(FHandle, PAnsiChar(AValue))); + end; + +(************************************************************************************************************************* + Class implementation for MetaDataGroup +**************************************************************************************************************************) + + constructor TLib3MFMetaDataGroup.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFMetaDataGroup.Destroy; + begin + inherited; + end; + + function TLib3MFMetaDataGroup.GetMetaDataCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_GetMetaDataCountFunc(FHandle, Result)); + end; + + function TLib3MFMetaDataGroup.GetMetaData(const AIndex: Cardinal): TLib3MFMetaData; + var + HMetaData: TLib3MFHandle; + begin + Result := nil; + HMetaData := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_GetMetaDataFunc(FHandle, AIndex, HMetaData)); + if Assigned(HMetaData) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMetaData); + end; + + function TLib3MFMetaDataGroup.GetMetaDataByKey(const ANameSpace: String; const AName: String): TLib3MFMetaData; + var + HMetaData: TLib3MFHandle; + begin + Result := nil; + HMetaData := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_GetMetaDataByKeyFunc(FHandle, PAnsiChar(ANameSpace), PAnsiChar(AName), HMetaData)); + if Assigned(HMetaData) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMetaData); + end; + + procedure TLib3MFMetaDataGroup.RemoveMetaDataByIndex(const AIndex: Cardinal); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_RemoveMetaDataByIndexFunc(FHandle, AIndex)); + end; + + procedure TLib3MFMetaDataGroup.RemoveMetaData(const ATheMetaData: TLib3MFMetaData); + var + ATheMetaDataHandle: TLib3MFHandle; + begin + if Assigned(ATheMetaData) then + ATheMetaDataHandle := ATheMetaData.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheMetaData is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_RemoveMetaDataFunc(FHandle, ATheMetaDataHandle)); + end; + + function TLib3MFMetaDataGroup.AddMetaData(const ANameSpace: String; const AName: String; const AValue: String; const AType: String; const AMustPreserve: Boolean): TLib3MFMetaData; + var + HMetaData: TLib3MFHandle; + begin + Result := nil; + HMetaData := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_AddMetaDataFunc(FHandle, PAnsiChar(ANameSpace), PAnsiChar(AName), PAnsiChar(AValue), PAnsiChar(AType), Ord(AMustPreserve), HMetaData)); + if Assigned(HMetaData) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMetaData); + end; + +(************************************************************************************************************************* + Class implementation for Object +**************************************************************************************************************************) + + constructor TLib3MFObject.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFObject.Destroy; + begin + inherited; + end; + + function TLib3MFObject.GetType(): TLib3MFObjectType; + var + ResultObjectType: Integer; + begin + ResultObjectType := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetTypeFunc(FHandle, ResultObjectType)); + Result := convertConstToObjectType(ResultObjectType); + end; + + procedure TLib3MFObject.SetType(const AObjectType: TLib3MFObjectType); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetTypeFunc(FHandle, convertObjectTypeToConst(AObjectType))); + end; + + function TLib3MFObject.GetName(): String; + var + bytesNeededName: Cardinal; + bytesWrittenName: Cardinal; + bufferName: array of Char; + begin + bytesNeededName:= 0; + bytesWrittenName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetNameFunc(FHandle, 0, bytesNeededName, nil)); + SetLength(bufferName, bytesNeededName); + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetNameFunc(FHandle, bytesNeededName, bytesWrittenName, @bufferName[0])); + Result := StrPas(@bufferName[0]); + end; + + procedure TLib3MFObject.SetName(const AName: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetNameFunc(FHandle, PAnsiChar(AName))); + end; + + function TLib3MFObject.GetPartNumber(): String; + var + bytesNeededPartNumber: Cardinal; + bytesWrittenPartNumber: Cardinal; + bufferPartNumber: array of Char; + begin + bytesNeededPartNumber:= 0; + bytesWrittenPartNumber:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetPartNumberFunc(FHandle, 0, bytesNeededPartNumber, nil)); + SetLength(bufferPartNumber, bytesNeededPartNumber); + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetPartNumberFunc(FHandle, bytesNeededPartNumber, bytesWrittenPartNumber, @bufferPartNumber[0])); + Result := StrPas(@bufferPartNumber[0]); + end; + + procedure TLib3MFObject.SetPartNumber(const APartNumber: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetPartNumberFunc(FHandle, PAnsiChar(APartNumber))); + end; + + function TLib3MFObject.IsMeshObject(): Boolean; + var + ResultIsMeshObject: Byte; + begin + ResultIsMeshObject := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_IsMeshObjectFunc(FHandle, ResultIsMeshObject)); + Result := (ResultIsMeshObject <> 0); + end; + + function TLib3MFObject.IsComponentsObject(): Boolean; + var + ResultIsComponentsObject: Byte; + begin + ResultIsComponentsObject := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_IsComponentsObjectFunc(FHandle, ResultIsComponentsObject)); + Result := (ResultIsComponentsObject <> 0); + end; + + function TLib3MFObject.IsLevelSetObject(): Boolean; + var + ResultIsLevelSetObject: Byte; + begin + ResultIsLevelSetObject := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_IsLevelSetObjectFunc(FHandle, ResultIsLevelSetObject)); + Result := (ResultIsLevelSetObject <> 0); + end; + + function TLib3MFObject.IsValid(): Boolean; + var + ResultIsValid: Byte; + begin + ResultIsValid := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_IsValidFunc(FHandle, ResultIsValid)); + Result := (ResultIsValid <> 0); + end; + + procedure TLib3MFObject.SetAttachmentAsThumbnail(const AAttachment: TLib3MFAttachment); + var + AAttachmentHandle: TLib3MFHandle; + begin + if Assigned(AAttachment) then + AAttachmentHandle := AAttachment.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AAttachment is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetAttachmentAsThumbnailFunc(FHandle, AAttachmentHandle)); + end; + + function TLib3MFObject.GetThumbnailAttachment(): TLib3MFAttachment; + var + HAttachment: TLib3MFHandle; + begin + Result := nil; + HAttachment := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetThumbnailAttachmentFunc(FHandle, HAttachment)); + if Assigned(HAttachment) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HAttachment); + end; + + procedure TLib3MFObject.ClearThumbnailAttachment(); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_ClearThumbnailAttachmentFunc(FHandle)); + end; + + function TLib3MFObject.GetOutbox(): TLib3MFBox; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetOutboxFunc(FHandle, @Result)); + end; + + function TLib3MFObject.GetUUID(out AHasUUID: Boolean): String; + var + ResultHasUUID: Byte; + bytesNeededUUID: Cardinal; + bytesWrittenUUID: Cardinal; + bufferUUID: array of Char; + begin + ResultHasUUID := 0; + bytesNeededUUID:= 0; + bytesWrittenUUID:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetUUIDFunc(FHandle, ResultHasUUID, 0, bytesNeededUUID, nil)); + SetLength(bufferUUID, bytesNeededUUID); + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetUUIDFunc(FHandle, ResultHasUUID, bytesNeededUUID, bytesWrittenUUID, @bufferUUID[0])); + AHasUUID := ResultHasUUID <> 0; + Result := StrPas(@bufferUUID[0]); + end; + + procedure TLib3MFObject.SetUUID(const AUUID: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetUUIDFunc(FHandle, PAnsiChar(AUUID))); + end; + + function TLib3MFObject.GetMetaDataGroup(): TLib3MFMetaDataGroup; + var + HMetaDataGroup: TLib3MFHandle; + begin + Result := nil; + HMetaDataGroup := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetMetaDataGroupFunc(FHandle, HMetaDataGroup)); + if Assigned(HMetaDataGroup) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMetaDataGroup); + end; + + procedure TLib3MFObject.SetSlicesMeshResolution(const AMeshResolution: TLib3MFSlicesMeshResolution); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetSlicesMeshResolutionFunc(FHandle, convertSlicesMeshResolutionToConst(AMeshResolution))); + end; + + function TLib3MFObject.GetSlicesMeshResolution(): TLib3MFSlicesMeshResolution; + var + ResultMeshResolution: Integer; + begin + ResultMeshResolution := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetSlicesMeshResolutionFunc(FHandle, ResultMeshResolution)); + Result := convertConstToSlicesMeshResolution(ResultMeshResolution); + end; + + function TLib3MFObject.HasSlices(const ARecursive: Boolean): Boolean; + var + ResultHasSlices: Byte; + begin + ResultHasSlices := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_HasSlicesFunc(FHandle, Ord(ARecursive), ResultHasSlices)); + Result := (ResultHasSlices <> 0); + end; + + procedure TLib3MFObject.ClearSliceStack(); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_ClearSliceStackFunc(FHandle)); + end; + + function TLib3MFObject.GetSliceStack(): TLib3MFSliceStack; + var + HSliceStackInstance: TLib3MFHandle; + begin + Result := nil; + HSliceStackInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetSliceStackFunc(FHandle, HSliceStackInstance)); + if Assigned(HSliceStackInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HSliceStackInstance); + end; + + procedure TLib3MFObject.AssignSliceStack(const ASliceStackInstance: TLib3MFSliceStack); + var + ASliceStackInstanceHandle: TLib3MFHandle; + begin + if Assigned(ASliceStackInstance) then + ASliceStackInstanceHandle := ASliceStackInstance.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ASliceStackInstance is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFObject_AssignSliceStackFunc(FHandle, ASliceStackInstanceHandle)); + end; + +(************************************************************************************************************************* + Class implementation for MeshObject +**************************************************************************************************************************) + + constructor TLib3MFMeshObject.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFMeshObject.Destroy; + begin + inherited; + end; + + function TLib3MFMeshObject.GetVertexCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetVertexCountFunc(FHandle, Result)); + end; + + function TLib3MFMeshObject.GetTriangleCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetTriangleCountFunc(FHandle, Result)); + end; + + function TLib3MFMeshObject.GetVertex(const AIndex: Cardinal): TLib3MFPosition; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetVertexFunc(FHandle, AIndex, @Result)); + end; + + procedure TLib3MFMeshObject.SetVertex(const AIndex: Cardinal; const ACoordinates: TLib3MFPosition); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetVertexFunc(FHandle, AIndex, @ACoordinates)); + end; + + function TLib3MFMeshObject.AddVertex(const ACoordinates: TLib3MFPosition): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_AddVertexFunc(FHandle, @ACoordinates, Result)); + end; + + procedure TLib3MFMeshObject.GetVertices(out AVertices: ArrayOfLib3MFPosition); + var + countNeededVertices: QWord; + countWrittenVertices: QWord; + begin + countNeededVertices:= 0; + countWrittenVertices:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetVerticesFunc(FHandle, 0, countNeededVertices, nil)); + SetLength(AVertices, countNeededVertices); + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetVerticesFunc(FHandle, countNeededVertices, countWrittenVertices, @AVertices[0])); + end; + + function TLib3MFMeshObject.GetTriangle(const AIndex: Cardinal): TLib3MFTriangle; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetTriangleFunc(FHandle, AIndex, @Result)); + end; + + procedure TLib3MFMeshObject.SetTriangle(const AIndex: Cardinal; const AIndices: TLib3MFTriangle); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetTriangleFunc(FHandle, AIndex, @AIndices)); + end; + + function TLib3MFMeshObject.AddTriangle(const AIndices: TLib3MFTriangle): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_AddTriangleFunc(FHandle, @AIndices, Result)); + end; + + procedure TLib3MFMeshObject.GetTriangleIndices(out AIndices: ArrayOfLib3MFTriangle); + var + countNeededIndices: QWord; + countWrittenIndices: QWord; + begin + countNeededIndices:= 0; + countWrittenIndices:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetTriangleIndicesFunc(FHandle, 0, countNeededIndices, nil)); + SetLength(AIndices, countNeededIndices); + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetTriangleIndicesFunc(FHandle, countNeededIndices, countWrittenIndices, @AIndices[0])); + end; + + procedure TLib3MFMeshObject.SetObjectLevelProperty(const AUniqueResourceID: Cardinal; const APropertyID: Cardinal); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetObjectLevelPropertyFunc(FHandle, AUniqueResourceID, APropertyID)); + end; + + function TLib3MFMeshObject.GetObjectLevelProperty(out AUniqueResourceID: Cardinal; out APropertyID: Cardinal): Boolean; + var + ResultHasObjectLevelProperty: Byte; + begin + ResultHasObjectLevelProperty := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetObjectLevelPropertyFunc(FHandle, AUniqueResourceID, APropertyID, ResultHasObjectLevelProperty)); + Result := (ResultHasObjectLevelProperty <> 0); + end; + + procedure TLib3MFMeshObject.SetTriangleProperties(const AIndex: Cardinal; const AProperties: TLib3MFTriangleProperties); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetTrianglePropertiesFunc(FHandle, AIndex, @AProperties)); + end; + + procedure TLib3MFMeshObject.GetTriangleProperties(const AIndex: Cardinal; out AProperty: TLib3MFTriangleProperties); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetTrianglePropertiesFunc(FHandle, AIndex, @AProperty)); + end; + + procedure TLib3MFMeshObject.SetAllTriangleProperties(const APropertiesArray: ArrayOfLib3MFTriangleProperties); + var + PtrPropertiesArray: PLib3MFTriangleProperties; + LenPropertiesArray: QWord; + begin + LenPropertiesArray := Length(APropertiesArray); + if LenPropertiesArray > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenPropertiesArray > 0 then + PtrPropertiesArray := @APropertiesArray[0] + else + PtrPropertiesArray := nil; + + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetAllTrianglePropertiesFunc(FHandle, QWord(LenPropertiesArray), PtrPropertiesArray)); + end; + + procedure TLib3MFMeshObject.GetAllTriangleProperties(out APropertiesArray: ArrayOfLib3MFTriangleProperties); + var + countNeededPropertiesArray: QWord; + countWrittenPropertiesArray: QWord; + begin + countNeededPropertiesArray:= 0; + countWrittenPropertiesArray:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetAllTrianglePropertiesFunc(FHandle, 0, countNeededPropertiesArray, nil)); + SetLength(APropertiesArray, countNeededPropertiesArray); + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetAllTrianglePropertiesFunc(FHandle, countNeededPropertiesArray, countWrittenPropertiesArray, @APropertiesArray[0])); + end; + + procedure TLib3MFMeshObject.ClearAllProperties(); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_ClearAllPropertiesFunc(FHandle)); + end; + + procedure TLib3MFMeshObject.SetGeometry(const AVertices: ArrayOfLib3MFPosition; const AIndices: ArrayOfLib3MFTriangle); + var + PtrVertices: PLib3MFPosition; + LenVertices: QWord; + PtrIndices: PLib3MFTriangle; + LenIndices: QWord; + begin + LenVertices := Length(AVertices); + if LenVertices > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenVertices > 0 then + PtrVertices := @AVertices[0] + else + PtrVertices := nil; + + LenIndices := Length(AIndices); + if LenIndices > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenIndices > 0 then + PtrIndices := @AIndices[0] + else + PtrIndices := nil; + + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetGeometryFunc(FHandle, QWord(LenVertices), PtrVertices, QWord(LenIndices), PtrIndices)); + end; + + function TLib3MFMeshObject.IsManifoldAndOriented(): Boolean; + var + ResultIsManifoldAndOriented: Byte; + begin + ResultIsManifoldAndOriented := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_IsManifoldAndOrientedFunc(FHandle, ResultIsManifoldAndOriented)); + Result := (ResultIsManifoldAndOriented <> 0); + end; + + function TLib3MFMeshObject.BeamLattice(): TLib3MFBeamLattice; + var + HTheBeamLattice: TLib3MFHandle; + begin + Result := nil; + HTheBeamLattice := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_BeamLatticeFunc(FHandle, HTheBeamLattice)); + if Assigned(HTheBeamLattice) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheBeamLattice); + end; + + function TLib3MFMeshObject.GetVolumeData(): TLib3MFVolumeData; + var + HTheVolumeData: TLib3MFHandle; + begin + Result := nil; + HTheVolumeData := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetVolumeDataFunc(FHandle, HTheVolumeData)); + if Assigned(HTheVolumeData) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheVolumeData); + end; + + procedure TLib3MFMeshObject.SetVolumeData(const ATheVolumeData: TLib3MFVolumeData); + var + ATheVolumeDataHandle: TLib3MFHandle; + begin + if Assigned(ATheVolumeData) then + ATheVolumeDataHandle := ATheVolumeData.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheVolumeData is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetVolumeDataFunc(FHandle, ATheVolumeDataHandle)); + end; + +(************************************************************************************************************************* + Class implementation for LevelSet +**************************************************************************************************************************) + + constructor TLib3MFLevelSet.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFLevelSet.Destroy; + begin + inherited; + end; + + function TLib3MFLevelSet.GetFunction(): TLib3MFFunction; + var + HTheFunction: TLib3MFHandle; + begin + Result := nil; + HTheFunction := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_GetFunctionFunc(FHandle, HTheFunction)); + if Assigned(HTheFunction) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheFunction); + end; + + procedure TLib3MFLevelSet.SetFunction(const ATheFunction: TLib3MFFunction); + var + ATheFunctionHandle: TLib3MFHandle; + begin + if Assigned(ATheFunction) then + ATheFunctionHandle := ATheFunction.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheFunction is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_SetFunctionFunc(FHandle, ATheFunctionHandle)); + end; + + function TLib3MFLevelSet.GetTransform(): TLib3MFTransform; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_GetTransformFunc(FHandle, @Result)); + end; + + procedure TLib3MFLevelSet.SetTransform(const ATransform: TLib3MFTransform); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_SetTransformFunc(FHandle, @ATransform)); + end; + + function TLib3MFLevelSet.GetChannelName(): String; + var + bytesNeededChannelName: Cardinal; + bytesWrittenChannelName: Cardinal; + bufferChannelName: array of Char; + begin + bytesNeededChannelName:= 0; + bytesWrittenChannelName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_GetChannelNameFunc(FHandle, 0, bytesNeededChannelName, nil)); + SetLength(bufferChannelName, bytesNeededChannelName); + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_GetChannelNameFunc(FHandle, bytesNeededChannelName, bytesWrittenChannelName, @bufferChannelName[0])); + Result := StrPas(@bufferChannelName[0]); + end; + + procedure TLib3MFLevelSet.SetChannelName(const AChannelName: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_SetChannelNameFunc(FHandle, PAnsiChar(AChannelName))); + end; + + procedure TLib3MFLevelSet.SetMinFeatureSize(const AMinFeatureSize: Double); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_SetMinFeatureSizeFunc(FHandle, AMinFeatureSize)); + end; + + function TLib3MFLevelSet.GetMinFeatureSize(): Double; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_GetMinFeatureSizeFunc(FHandle, Result)); + end; + + procedure TLib3MFLevelSet.SetFallBackValue(const AFallBackValue: Double); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_SetFallBackValueFunc(FHandle, AFallBackValue)); + end; + + function TLib3MFLevelSet.GetFallBackValue(): Double; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_GetFallBackValueFunc(FHandle, Result)); + end; + + procedure TLib3MFLevelSet.SetMeshBBoxOnly(const AMeshBBoxOnly: Boolean); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_SetMeshBBoxOnlyFunc(FHandle, Ord(AMeshBBoxOnly))); + end; + + function TLib3MFLevelSet.GetMeshBBoxOnly(): Boolean; + var + ResultMeshBBoxOnly: Byte; + begin + ResultMeshBBoxOnly := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_GetMeshBBoxOnlyFunc(FHandle, ResultMeshBBoxOnly)); + Result := (ResultMeshBBoxOnly <> 0); + end; + + procedure TLib3MFLevelSet.SetMesh(const ATheMesh: TLib3MFMeshObject); + var + ATheMeshHandle: TLib3MFHandle; + begin + if Assigned(ATheMesh) then + ATheMeshHandle := ATheMesh.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheMesh is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_SetMeshFunc(FHandle, ATheMeshHandle)); + end; + + function TLib3MFLevelSet.GetMesh(): TLib3MFMeshObject; + var + HTheMesh: TLib3MFHandle; + begin + Result := nil; + HTheMesh := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_GetMeshFunc(FHandle, HTheMesh)); + if Assigned(HTheMesh) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheMesh); + end; + + function TLib3MFLevelSet.GetVolumeData(): TLib3MFVolumeData; + var + HTheVolumeData: TLib3MFHandle; + begin + Result := nil; + HTheVolumeData := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_GetVolumeDataFunc(FHandle, HTheVolumeData)); + if Assigned(HTheVolumeData) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheVolumeData); + end; + + procedure TLib3MFLevelSet.SetVolumeData(const ATheVolumeData: TLib3MFVolumeData); + var + ATheVolumeDataHandle: TLib3MFHandle; + begin + if Assigned(ATheVolumeData) then + ATheVolumeDataHandle := ATheVolumeData.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheVolumeData is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFLevelSet_SetVolumeDataFunc(FHandle, ATheVolumeDataHandle)); + end; + +(************************************************************************************************************************* + Class implementation for BeamLattice +**************************************************************************************************************************) + + constructor TLib3MFBeamLattice.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFBeamLattice.Destroy; + begin + inherited; + end; + + function TLib3MFBeamLattice.GetMinLength(): Double; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetMinLengthFunc(FHandle, Result)); + end; + + procedure TLib3MFBeamLattice.SetMinLength(const AMinLength: Double); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetMinLengthFunc(FHandle, AMinLength)); + end; + + procedure TLib3MFBeamLattice.GetClipping(out AClipMode: TLib3MFBeamLatticeClipMode; out AUniqueResourceID: Cardinal); + var + ResultClipMode: Integer; + begin + ResultClipMode := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetClippingFunc(FHandle, ResultClipMode, AUniqueResourceID)); + AClipMode := convertConstToBeamLatticeClipMode(ResultClipMode); + end; + + procedure TLib3MFBeamLattice.SetClipping(const AClipMode: TLib3MFBeamLatticeClipMode; const AUniqueResourceID: Cardinal); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetClippingFunc(FHandle, convertBeamLatticeClipModeToConst(AClipMode), AUniqueResourceID)); + end; + + function TLib3MFBeamLattice.GetRepresentation(out AUniqueResourceID: Cardinal): Boolean; + var + ResultHasRepresentation: Byte; + begin + ResultHasRepresentation := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetRepresentationFunc(FHandle, ResultHasRepresentation, AUniqueResourceID)); + Result := (ResultHasRepresentation <> 0); + end; + + procedure TLib3MFBeamLattice.SetRepresentation(const AUniqueResourceID: Cardinal); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetRepresentationFunc(FHandle, AUniqueResourceID)); + end; + + procedure TLib3MFBeamLattice.GetBallOptions(out ABallMode: TLib3MFBeamLatticeBallMode; out ABallRadius: Double); + var + ResultBallMode: Integer; + begin + ResultBallMode := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBallOptionsFunc(FHandle, ResultBallMode, ABallRadius)); + ABallMode := convertConstToBeamLatticeBallMode(ResultBallMode); + end; + + procedure TLib3MFBeamLattice.SetBallOptions(const ABallMode: TLib3MFBeamLatticeBallMode; const ABallRadius: Double); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetBallOptionsFunc(FHandle, convertBeamLatticeBallModeToConst(ABallMode), ABallRadius)); + end; + + function TLib3MFBeamLattice.GetBeamCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamCountFunc(FHandle, Result)); + end; + + function TLib3MFBeamLattice.GetBeam(const AIndex: Cardinal): TLib3MFBeam; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamFunc(FHandle, AIndex, @Result)); + end; + + function TLib3MFBeamLattice.AddBeam(const ABeamInfo: TLib3MFBeam): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_AddBeamFunc(FHandle, @ABeamInfo, Result)); + end; + + procedure TLib3MFBeamLattice.SetBeam(const AIndex: Cardinal; const ABeamInfo: TLib3MFBeam); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetBeamFunc(FHandle, AIndex, @ABeamInfo)); + end; + + procedure TLib3MFBeamLattice.SetBeams(const ABeamInfo: ArrayOfLib3MFBeam); + var + PtrBeamInfo: PLib3MFBeam; + LenBeamInfo: QWord; + begin + LenBeamInfo := Length(ABeamInfo); + if LenBeamInfo > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenBeamInfo > 0 then + PtrBeamInfo := @ABeamInfo[0] + else + PtrBeamInfo := nil; + + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetBeamsFunc(FHandle, QWord(LenBeamInfo), PtrBeamInfo)); + end; + + procedure TLib3MFBeamLattice.GetBeams(out ABeamInfo: ArrayOfLib3MFBeam); + var + countNeededBeamInfo: QWord; + countWrittenBeamInfo: QWord; + begin + countNeededBeamInfo:= 0; + countWrittenBeamInfo:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamsFunc(FHandle, 0, countNeededBeamInfo, nil)); + SetLength(ABeamInfo, countNeededBeamInfo); + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamsFunc(FHandle, countNeededBeamInfo, countWrittenBeamInfo, @ABeamInfo[0])); + end; + + function TLib3MFBeamLattice.GetBallCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBallCountFunc(FHandle, Result)); + end; + + function TLib3MFBeamLattice.GetBall(const AIndex: Cardinal): TLib3MFBall; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBallFunc(FHandle, AIndex, @Result)); + end; + + function TLib3MFBeamLattice.AddBall(const ABallInfo: TLib3MFBall): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_AddBallFunc(FHandle, @ABallInfo, Result)); + end; + + procedure TLib3MFBeamLattice.SetBall(const AIndex: Cardinal; const ABallInfo: TLib3MFBall); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetBallFunc(FHandle, AIndex, @ABallInfo)); + end; + + procedure TLib3MFBeamLattice.SetBalls(const ABallInfo: ArrayOfLib3MFBall); + var + PtrBallInfo: PLib3MFBall; + LenBallInfo: QWord; + begin + LenBallInfo := Length(ABallInfo); + if LenBallInfo > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenBallInfo > 0 then + PtrBallInfo := @ABallInfo[0] + else + PtrBallInfo := nil; + + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetBallsFunc(FHandle, QWord(LenBallInfo), PtrBallInfo)); + end; + + procedure TLib3MFBeamLattice.GetBalls(out ABallInfo: ArrayOfLib3MFBall); + var + countNeededBallInfo: QWord; + countWrittenBallInfo: QWord; + begin + countNeededBallInfo:= 0; + countWrittenBallInfo:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBallsFunc(FHandle, 0, countNeededBallInfo, nil)); + SetLength(ABallInfo, countNeededBallInfo); + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBallsFunc(FHandle, countNeededBallInfo, countWrittenBallInfo, @ABallInfo[0])); + end; + + function TLib3MFBeamLattice.GetBeamSetCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamSetCountFunc(FHandle, Result)); + end; + + function TLib3MFBeamLattice.AddBeamSet(): TLib3MFBeamSet; + var + HBeamSet: TLib3MFHandle; + begin + Result := nil; + HBeamSet := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_AddBeamSetFunc(FHandle, HBeamSet)); + if Assigned(HBeamSet) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HBeamSet); + end; + + function TLib3MFBeamLattice.GetBeamSet(const AIndex: Cardinal): TLib3MFBeamSet; + var + HBeamSet: TLib3MFHandle; + begin + Result := nil; + HBeamSet := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamSetFunc(FHandle, AIndex, HBeamSet)); + if Assigned(HBeamSet) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HBeamSet); + end; + +(************************************************************************************************************************* + Class implementation for FunctionReference +**************************************************************************************************************************) + + constructor TLib3MFFunctionReference.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFFunctionReference.Destroy; + begin + inherited; + end; + + function TLib3MFFunctionReference.GetFunctionResourceID(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionReference_GetFunctionResourceIDFunc(FHandle, Result)); + end; + + procedure TLib3MFFunctionReference.SetFunctionResourceID(const AUniqueResourceID: Cardinal); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionReference_SetFunctionResourceIDFunc(FHandle, AUniqueResourceID)); + end; + + function TLib3MFFunctionReference.GetTransform(): TLib3MFTransform; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionReference_GetTransformFunc(FHandle, @Result)); + end; + + procedure TLib3MFFunctionReference.SetTransform(const ATransform: TLib3MFTransform); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionReference_SetTransformFunc(FHandle, @ATransform)); + end; + + function TLib3MFFunctionReference.GetChannelName(): String; + var + bytesNeededChannelName: Cardinal; + bytesWrittenChannelName: Cardinal; + bufferChannelName: array of Char; + begin + bytesNeededChannelName:= 0; + bytesWrittenChannelName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionReference_GetChannelNameFunc(FHandle, 0, bytesNeededChannelName, nil)); + SetLength(bufferChannelName, bytesNeededChannelName); + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionReference_GetChannelNameFunc(FHandle, bytesNeededChannelName, bytesWrittenChannelName, @bufferChannelName[0])); + Result := StrPas(@bufferChannelName[0]); + end; + + procedure TLib3MFFunctionReference.SetChannelName(const AChannelName: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionReference_SetChannelNameFunc(FHandle, PAnsiChar(AChannelName))); + end; + + procedure TLib3MFFunctionReference.SetMinFeatureSize(const AMinFeatureSize: Double); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionReference_SetMinFeatureSizeFunc(FHandle, AMinFeatureSize)); + end; + + function TLib3MFFunctionReference.GetMinFeatureSize(): Double; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionReference_GetMinFeatureSizeFunc(FHandle, Result)); + end; + + procedure TLib3MFFunctionReference.SetFallBackValue(const AFallBackValue: Double); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionReference_SetFallBackValueFunc(FHandle, AFallBackValue)); + end; + + function TLib3MFFunctionReference.GetFallBackValue(): Double; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionReference_GetFallBackValueFunc(FHandle, Result)); + end; + +(************************************************************************************************************************* + Class implementation for VolumeDataColor +**************************************************************************************************************************) + + constructor TLib3MFVolumeDataColor.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFVolumeDataColor.Destroy; + begin + inherited; + end; + +(************************************************************************************************************************* + Class implementation for MaterialMapping +**************************************************************************************************************************) + + constructor TLib3MFMaterialMapping.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFMaterialMapping.Destroy; + begin + inherited; + end; + +(************************************************************************************************************************* + Class implementation for VolumeDataComposite +**************************************************************************************************************************) + + constructor TLib3MFVolumeDataComposite.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFVolumeDataComposite.Destroy; + begin + inherited; + end; + + function TLib3MFVolumeDataComposite.GetBaseMaterialGroup(): TLib3MFBaseMaterialGroup; + var + HBaseMaterialGroupInstance: TLib3MFHandle; + begin + Result := nil; + HBaseMaterialGroupInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeDataComposite_GetBaseMaterialGroupFunc(FHandle, HBaseMaterialGroupInstance)); + if Assigned(HBaseMaterialGroupInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HBaseMaterialGroupInstance); + end; + + procedure TLib3MFVolumeDataComposite.SetBaseMaterialGroup(const ABaseMaterialGroupInstance: TLib3MFBaseMaterialGroup); + var + ABaseMaterialGroupInstanceHandle: TLib3MFHandle; + begin + if Assigned(ABaseMaterialGroupInstance) then + ABaseMaterialGroupInstanceHandle := ABaseMaterialGroupInstance.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ABaseMaterialGroupInstance is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeDataComposite_SetBaseMaterialGroupFunc(FHandle, ABaseMaterialGroupInstanceHandle)); + end; + + function TLib3MFVolumeDataComposite.GetMaterialMappingCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeDataComposite_GetMaterialMappingCountFunc(FHandle, Result)); + end; + + function TLib3MFVolumeDataComposite.GetMaterialMapping(const AIndex: Cardinal): TLib3MFMaterialMapping; + var + HTheMaterialMapping: TLib3MFHandle; + begin + Result := nil; + HTheMaterialMapping := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeDataComposite_GetMaterialMappingFunc(FHandle, AIndex, HTheMaterialMapping)); + if Assigned(HTheMaterialMapping) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheMaterialMapping); + end; + + function TLib3MFVolumeDataComposite.AddMaterialMapping(const ATransform: TLib3MFTransform): TLib3MFMaterialMapping; + var + HTheMaterialMapping: TLib3MFHandle; + begin + Result := nil; + HTheMaterialMapping := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeDataComposite_AddMaterialMappingFunc(FHandle, @ATransform, HTheMaterialMapping)); + if Assigned(HTheMaterialMapping) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheMaterialMapping); + end; + + procedure TLib3MFVolumeDataComposite.RemoveMaterialMapping(const AIndex: Cardinal); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeDataComposite_RemoveMaterialMappingFunc(FHandle, AIndex)); + end; + +(************************************************************************************************************************* + Class implementation for VolumeDataProperty +**************************************************************************************************************************) + + constructor TLib3MFVolumeDataProperty.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFVolumeDataProperty.Destroy; + begin + inherited; + end; + + function TLib3MFVolumeDataProperty.GetName(): String; + var + bytesNeededPropertyName: Cardinal; + bytesWrittenPropertyName: Cardinal; + bufferPropertyName: array of Char; + begin + bytesNeededPropertyName:= 0; + bytesWrittenPropertyName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeDataProperty_GetNameFunc(FHandle, 0, bytesNeededPropertyName, nil)); + SetLength(bufferPropertyName, bytesNeededPropertyName); + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeDataProperty_GetNameFunc(FHandle, bytesNeededPropertyName, bytesWrittenPropertyName, @bufferPropertyName[0])); + Result := StrPas(@bufferPropertyName[0]); + end; + + procedure TLib3MFVolumeDataProperty.SetIsRequired(const AIsRequired: Boolean); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeDataProperty_SetIsRequiredFunc(FHandle, Ord(AIsRequired))); + end; + + function TLib3MFVolumeDataProperty.IsRequired(): Boolean; + var + ResultIsRequired: Byte; + begin + ResultIsRequired := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeDataProperty_IsRequiredFunc(FHandle, ResultIsRequired)); + Result := (ResultIsRequired <> 0); + end; + +(************************************************************************************************************************* + Class implementation for VolumeData +**************************************************************************************************************************) + + constructor TLib3MFVolumeData.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFVolumeData.Destroy; + begin + inherited; + end; + + function TLib3MFVolumeData.GetComposite(): TLib3MFVolumeDataComposite; + var + HTheCompositeData: TLib3MFHandle; + begin + Result := nil; + HTheCompositeData := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeData_GetCompositeFunc(FHandle, HTheCompositeData)); + if Assigned(HTheCompositeData) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheCompositeData); + end; + + function TLib3MFVolumeData.CreateNewComposite(): TLib3MFVolumeDataComposite; + var + HTheCompositeData: TLib3MFHandle; + begin + Result := nil; + HTheCompositeData := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeData_CreateNewCompositeFunc(FHandle, HTheCompositeData)); + if Assigned(HTheCompositeData) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheCompositeData); + end; + + procedure TLib3MFVolumeData.RemoveComposite(); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeData_RemoveCompositeFunc(FHandle)); + end; + + function TLib3MFVolumeData.GetColor(): TLib3MFVolumeDataColor; + var + HTheColorData: TLib3MFHandle; + begin + Result := nil; + HTheColorData := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeData_GetColorFunc(FHandle, HTheColorData)); + if Assigned(HTheColorData) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheColorData); + end; + + function TLib3MFVolumeData.CreateNewColor(const ATheFunction: TLib3MFFunction): TLib3MFVolumeDataColor; + var + ATheFunctionHandle: TLib3MFHandle; + HTheColorData: TLib3MFHandle; + begin + if Assigned(ATheFunction) then + ATheFunctionHandle := ATheFunction.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheFunction is a nil value.'); + Result := nil; + HTheColorData := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeData_CreateNewColorFunc(FHandle, ATheFunctionHandle, HTheColorData)); + if Assigned(HTheColorData) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheColorData); + end; + + procedure TLib3MFVolumeData.RemoveColor(); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeData_RemoveColorFunc(FHandle)); + end; + + function TLib3MFVolumeData.GetPropertyCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeData_GetPropertyCountFunc(FHandle, Result)); + end; + + function TLib3MFVolumeData.GetProperty(const AIndex: Cardinal): TLib3MFVolumeDataProperty; + var + HTheVolumeDataProperty: TLib3MFHandle; + begin + Result := nil; + HTheVolumeDataProperty := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeData_GetPropertyFunc(FHandle, AIndex, HTheVolumeDataProperty)); + if Assigned(HTheVolumeDataProperty) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheVolumeDataProperty); + end; + + function TLib3MFVolumeData.AddPropertyFromFunction(const AName: String; const ATheFunction: TLib3MFFunction): TLib3MFVolumeDataProperty; + var + ATheFunctionHandle: TLib3MFHandle; + HTheVolumeDataProperty: TLib3MFHandle; + begin + if Assigned(ATheFunction) then + ATheFunctionHandle := ATheFunction.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheFunction is a nil value.'); + Result := nil; + HTheVolumeDataProperty := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeData_AddPropertyFromFunctionFunc(FHandle, PAnsiChar(AName), ATheFunctionHandle, HTheVolumeDataProperty)); + if Assigned(HTheVolumeDataProperty) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheVolumeDataProperty); + end; + + procedure TLib3MFVolumeData.RemoveProperty(const AIndex: Cardinal); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFVolumeData_RemovePropertyFunc(FHandle, AIndex)); + end; + +(************************************************************************************************************************* + Class implementation for Component +**************************************************************************************************************************) + + constructor TLib3MFComponent.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFComponent.Destroy; + begin + inherited; + end; + + function TLib3MFComponent.GetObjectResource(): TLib3MFObject; + var + HObjectResource: TLib3MFHandle; + begin + Result := nil; + HObjectResource := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_GetObjectResourceFunc(FHandle, HObjectResource)); + if Assigned(HObjectResource) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HObjectResource); + end; + + function TLib3MFComponent.GetObjectResourceID(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_GetObjectResourceIDFunc(FHandle, Result)); + end; + + function TLib3MFComponent.GetUUID(out AHasUUID: Boolean): String; + var + ResultHasUUID: Byte; + bytesNeededUUID: Cardinal; + bytesWrittenUUID: Cardinal; + bufferUUID: array of Char; + begin + ResultHasUUID := 0; + bytesNeededUUID:= 0; + bytesWrittenUUID:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_GetUUIDFunc(FHandle, ResultHasUUID, 0, bytesNeededUUID, nil)); + SetLength(bufferUUID, bytesNeededUUID); + FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_GetUUIDFunc(FHandle, ResultHasUUID, bytesNeededUUID, bytesWrittenUUID, @bufferUUID[0])); + AHasUUID := ResultHasUUID <> 0; + Result := StrPas(@bufferUUID[0]); + end; + + procedure TLib3MFComponent.SetUUID(const AUUID: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_SetUUIDFunc(FHandle, PAnsiChar(AUUID))); + end; + + function TLib3MFComponent.HasTransform(): Boolean; + var + ResultHasTransform: Byte; + begin + ResultHasTransform := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_HasTransformFunc(FHandle, ResultHasTransform)); + Result := (ResultHasTransform <> 0); + end; + + function TLib3MFComponent.GetTransform(): TLib3MFTransform; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_GetTransformFunc(FHandle, @Result)); + end; + + procedure TLib3MFComponent.SetTransform(const ATransform: TLib3MFTransform); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_SetTransformFunc(FHandle, @ATransform)); + end; + +(************************************************************************************************************************* + Class implementation for ComponentsObject +**************************************************************************************************************************) + + constructor TLib3MFComponentsObject.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFComponentsObject.Destroy; + begin + inherited; + end; + + function TLib3MFComponentsObject.AddComponent(const AObjectResource: TLib3MFObject; const ATransform: TLib3MFTransform): TLib3MFComponent; + var + AObjectResourceHandle: TLib3MFHandle; + HComponentInstance: TLib3MFHandle; + begin + if Assigned(AObjectResource) then + AObjectResourceHandle := AObjectResource.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AObjectResource is a nil value.'); + Result := nil; + HComponentInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComponentsObject_AddComponentFunc(FHandle, AObjectResourceHandle, @ATransform, HComponentInstance)); + if Assigned(HComponentInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HComponentInstance); + end; + + function TLib3MFComponentsObject.GetComponent(const AIndex: Cardinal): TLib3MFComponent; + var + HComponentInstance: TLib3MFHandle; + begin + Result := nil; + HComponentInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComponentsObject_GetComponentFunc(FHandle, AIndex, HComponentInstance)); + if Assigned(HComponentInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HComponentInstance); + end; + + function TLib3MFComponentsObject.GetComponentCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFComponentsObject_GetComponentCountFunc(FHandle, Result)); + end; + +(************************************************************************************************************************* + Class implementation for BeamSet +**************************************************************************************************************************) + + constructor TLib3MFBeamSet.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFBeamSet.Destroy; + begin + inherited; + end; + + procedure TLib3MFBeamSet.SetName(const AName: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_SetNameFunc(FHandle, PAnsiChar(AName))); + end; + + function TLib3MFBeamSet.GetName(): String; + var + bytesNeededName: Cardinal; + bytesWrittenName: Cardinal; + bufferName: array of Char; + begin + bytesNeededName:= 0; + bytesWrittenName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetNameFunc(FHandle, 0, bytesNeededName, nil)); + SetLength(bufferName, bytesNeededName); + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetNameFunc(FHandle, bytesNeededName, bytesWrittenName, @bufferName[0])); + Result := StrPas(@bufferName[0]); + end; + + procedure TLib3MFBeamSet.SetIdentifier(const AIdentifier: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_SetIdentifierFunc(FHandle, PAnsiChar(AIdentifier))); + end; + + function TLib3MFBeamSet.GetIdentifier(): String; + var + bytesNeededIdentifier: Cardinal; + bytesWrittenIdentifier: Cardinal; + bufferIdentifier: array of Char; + begin + bytesNeededIdentifier:= 0; + bytesWrittenIdentifier:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetIdentifierFunc(FHandle, 0, bytesNeededIdentifier, nil)); + SetLength(bufferIdentifier, bytesNeededIdentifier); + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetIdentifierFunc(FHandle, bytesNeededIdentifier, bytesWrittenIdentifier, @bufferIdentifier[0])); + Result := StrPas(@bufferIdentifier[0]); + end; + + function TLib3MFBeamSet.GetReferenceCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetReferenceCountFunc(FHandle, Result)); + end; + + procedure TLib3MFBeamSet.SetReferences(const AReferences: TCardinalDynArray); + var + PtrReferences: PCardinal; + LenReferences: QWord; + begin + LenReferences := Length(AReferences); + if LenReferences > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenReferences > 0 then + PtrReferences := @AReferences[0] + else + PtrReferences := nil; + + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_SetReferencesFunc(FHandle, QWord(LenReferences), PtrReferences)); + end; + + procedure TLib3MFBeamSet.GetReferences(out AReferences: TCardinalDynArray); + var + countNeededReferences: QWord; + countWrittenReferences: QWord; + begin + countNeededReferences:= 0; + countWrittenReferences:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetReferencesFunc(FHandle, 0, countNeededReferences, nil)); + SetLength(AReferences, countNeededReferences); + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetReferencesFunc(FHandle, countNeededReferences, countWrittenReferences, @AReferences[0])); + end; + + function TLib3MFBeamSet.GetBallReferenceCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetBallReferenceCountFunc(FHandle, Result)); + end; + + procedure TLib3MFBeamSet.SetBallReferences(const ABallReferences: TCardinalDynArray); + var + PtrBallReferences: PCardinal; + LenBallReferences: QWord; + begin + LenBallReferences := Length(ABallReferences); + if LenBallReferences > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenBallReferences > 0 then + PtrBallReferences := @ABallReferences[0] + else + PtrBallReferences := nil; + + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_SetBallReferencesFunc(FHandle, QWord(LenBallReferences), PtrBallReferences)); + end; + + procedure TLib3MFBeamSet.GetBallReferences(out ABallReferences: TCardinalDynArray); + var + countNeededBallReferences: QWord; + countWrittenBallReferences: QWord; + begin + countNeededBallReferences:= 0; + countWrittenBallReferences:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetBallReferencesFunc(FHandle, 0, countNeededBallReferences, nil)); + SetLength(ABallReferences, countNeededBallReferences); + FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetBallReferencesFunc(FHandle, countNeededBallReferences, countWrittenBallReferences, @ABallReferences[0])); + end; + +(************************************************************************************************************************* + Class implementation for BaseMaterialGroup **************************************************************************************************************************) - function convertPropertyTypeToConst(const AValue: TLib3MFPropertyType): Integer; - function convertConstToPropertyType(const AValue: Integer): TLib3MFPropertyType; - function convertSlicesMeshResolutionToConst(const AValue: TLib3MFSlicesMeshResolution): Integer; - function convertConstToSlicesMeshResolution(const AValue: Integer): TLib3MFSlicesMeshResolution; - function convertModelUnitToConst(const AValue: TLib3MFModelUnit): Integer; - function convertConstToModelUnit(const AValue: Integer): TLib3MFModelUnit; - function convertObjectTypeToConst(const AValue: TLib3MFObjectType): Integer; - function convertConstToObjectType(const AValue: Integer): TLib3MFObjectType; - function convertTextureTypeToConst(const AValue: TLib3MFTextureType): Integer; - function convertConstToTextureType(const AValue: Integer): TLib3MFTextureType; - function convertTextureTileStyleToConst(const AValue: TLib3MFTextureTileStyle): Integer; - function convertConstToTextureTileStyle(const AValue: Integer): TLib3MFTextureTileStyle; - function convertTextureFilterToConst(const AValue: TLib3MFTextureFilter): Integer; - function convertConstToTextureFilter(const AValue: Integer): TLib3MFTextureFilter; - function convertBeamLatticeCapModeToConst(const AValue: TLib3MFBeamLatticeCapMode): Integer; - function convertConstToBeamLatticeCapMode(const AValue: Integer): TLib3MFBeamLatticeCapMode; - function convertBeamLatticeClipModeToConst(const AValue: TLib3MFBeamLatticeClipMode): Integer; - function convertConstToBeamLatticeClipMode(const AValue: Integer): TLib3MFBeamLatticeClipMode; - function convertBeamLatticeBallModeToConst(const AValue: TLib3MFBeamLatticeBallMode): Integer; - function convertConstToBeamLatticeBallMode(const AValue: Integer): TLib3MFBeamLatticeBallMode; - function convertProgressIdentifierToConst(const AValue: TLib3MFProgressIdentifier): Integer; - function convertConstToProgressIdentifier(const AValue: Integer): TLib3MFProgressIdentifier; - function convertBlendMethodToConst(const AValue: TLib3MFBlendMethod): Integer; - function convertConstToBlendMethod(const AValue: Integer): TLib3MFBlendMethod; - function convertEncryptionAlgorithmToConst(const AValue: TLib3MFEncryptionAlgorithm): Integer; - function convertConstToEncryptionAlgorithm(const AValue: Integer): TLib3MFEncryptionAlgorithm; - function convertWrappingAlgorithmToConst(const AValue: TLib3MFWrappingAlgorithm): Integer; - function convertConstToWrappingAlgorithm(const AValue: Integer): TLib3MFWrappingAlgorithm; - function convertMgfAlgorithmToConst(const AValue: TLib3MFMgfAlgorithm): Integer; - function convertConstToMgfAlgorithm(const AValue: Integer): TLib3MFMgfAlgorithm; - function convertDigestMethodToConst(const AValue: TLib3MFDigestMethod): Integer; - function convertConstToDigestMethod(const AValue: Integer): TLib3MFDigestMethod; - function convertCompressionToConst(const AValue: TLib3MFCompression): Integer; - function convertConstToCompression(const AValue: Integer): TLib3MFCompression; + constructor TLib3MFBaseMaterialGroup.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; - TLib3MFPolymorphicFactory<_T:class; _B> = record - class function Make(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): _T; static; + destructor TLib3MFBaseMaterialGroup.Destroy; + begin + inherited; end; - function TLib3MFPolymorphicFactoryMakeBase(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBase; - function TLib3MFPolymorphicFactoryMakeWriter(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFWriter; - function TLib3MFPolymorphicFactoryMakeReader(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFReader; - function TLib3MFPolymorphicFactoryMakePackagePart(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFPackagePart; - function TLib3MFPolymorphicFactoryMakeResource(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResource; - function TLib3MFPolymorphicFactoryMakeResourceIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceIterator; - function TLib3MFPolymorphicFactoryMakeSliceStackIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSliceStackIterator; - function TLib3MFPolymorphicFactoryMakeObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFObjectIterator; - function TLib3MFPolymorphicFactoryMakeMeshObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMeshObjectIterator; - function TLib3MFPolymorphicFactoryMakeComponentsObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponentsObjectIterator; - function TLib3MFPolymorphicFactoryMakeTexture2DIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DIterator; - function TLib3MFPolymorphicFactoryMakeBaseMaterialGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBaseMaterialGroupIterator; - function TLib3MFPolymorphicFactoryMakeColorGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFColorGroupIterator; - function TLib3MFPolymorphicFactoryMakeTexture2DGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DGroupIterator; - function TLib3MFPolymorphicFactoryMakeCompositeMaterialsIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCompositeMaterialsIterator; - function TLib3MFPolymorphicFactoryMakeMultiPropertyGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMultiPropertyGroupIterator; - function TLib3MFPolymorphicFactoryMakeMetaData(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMetaData; - function TLib3MFPolymorphicFactoryMakeMetaDataGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMetaDataGroup; - function TLib3MFPolymorphicFactoryMakeObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFObject; - function TLib3MFPolymorphicFactoryMakeMeshObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMeshObject; - function TLib3MFPolymorphicFactoryMakeBeamLattice(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBeamLattice; - function TLib3MFPolymorphicFactoryMakeComponent(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponent; - function TLib3MFPolymorphicFactoryMakeComponentsObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponentsObject; - function TLib3MFPolymorphicFactoryMakeBeamSet(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBeamSet; - function TLib3MFPolymorphicFactoryMakeBaseMaterialGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBaseMaterialGroup; - function TLib3MFPolymorphicFactoryMakeColorGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFColorGroup; - function TLib3MFPolymorphicFactoryMakeTexture2DGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DGroup; - function TLib3MFPolymorphicFactoryMakeCompositeMaterials(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCompositeMaterials; - function TLib3MFPolymorphicFactoryMakeMultiPropertyGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMultiPropertyGroup; - function TLib3MFPolymorphicFactoryMakeAttachment(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAttachment; - function TLib3MFPolymorphicFactoryMakeTexture2D(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2D; - function TLib3MFPolymorphicFactoryMakeBuildItem(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBuildItem; - function TLib3MFPolymorphicFactoryMakeBuildItemIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBuildItemIterator; - function TLib3MFPolymorphicFactoryMakeSlice(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSlice; - function TLib3MFPolymorphicFactoryMakeSliceStack(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSliceStack; - function TLib3MFPolymorphicFactoryMakeConsumer(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFConsumer; - function TLib3MFPolymorphicFactoryMakeAccessRight(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAccessRight; - function TLib3MFPolymorphicFactoryMakeContentEncryptionParams(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFContentEncryptionParams; - function TLib3MFPolymorphicFactoryMakeResourceData(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceData; - function TLib3MFPolymorphicFactoryMakeResourceDataGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceDataGroup; - function TLib3MFPolymorphicFactoryMakeKeyStore(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFKeyStore; - function TLib3MFPolymorphicFactoryMakeModel(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFModel; -implementation + function TLib3MFBaseMaterialGroup.GetCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetCountFunc(FHandle, Result)); + end; + + procedure TLib3MFBaseMaterialGroup.GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + var + countNeededPropertyIDs: QWord; + countWrittenPropertyIDs: QWord; + begin + countNeededPropertyIDs:= 0; + countWrittenPropertyIDs:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetAllPropertyIDsFunc(FHandle, 0, countNeededPropertyIDs, nil)); + SetLength(APropertyIDs, countNeededPropertyIDs); + FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetAllPropertyIDsFunc(FHandle, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); + end; + + function TLib3MFBaseMaterialGroup.AddMaterial(const AName: String; const ADisplayColor: TLib3MFColor): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_AddMaterialFunc(FHandle, PAnsiChar(AName), @ADisplayColor, Result)); + end; + + procedure TLib3MFBaseMaterialGroup.RemoveMaterial(const APropertyID: Cardinal); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_RemoveMaterialFunc(FHandle, APropertyID)); + end; + + function TLib3MFBaseMaterialGroup.GetName(const APropertyID: Cardinal): String; + var + bytesNeededName: Cardinal; + bytesWrittenName: Cardinal; + bufferName: array of Char; + begin + bytesNeededName:= 0; + bytesWrittenName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetNameFunc(FHandle, APropertyID, 0, bytesNeededName, nil)); + SetLength(bufferName, bytesNeededName); + FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetNameFunc(FHandle, APropertyID, bytesNeededName, bytesWrittenName, @bufferName[0])); + Result := StrPas(@bufferName[0]); + end; + + procedure TLib3MFBaseMaterialGroup.SetName(const APropertyID: Cardinal; const AName: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_SetNameFunc(FHandle, APropertyID, PAnsiChar(AName))); + end; + + procedure TLib3MFBaseMaterialGroup.SetDisplayColor(const APropertyID: Cardinal; const ATheColor: TLib3MFColor); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_SetDisplayColorFunc(FHandle, APropertyID, @ATheColor)); + end; + + function TLib3MFBaseMaterialGroup.GetDisplayColor(const APropertyID: Cardinal): TLib3MFColor; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetDisplayColorFunc(FHandle, APropertyID, @Result)); + end; (************************************************************************************************************************* - Enum conversion + Class implementation for ColorGroup +**************************************************************************************************************************) + + constructor TLib3MFColorGroup.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFColorGroup.Destroy; + begin + inherited; + end; + + function TLib3MFColorGroup.GetCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_GetCountFunc(FHandle, Result)); + end; + + procedure TLib3MFColorGroup.GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + var + countNeededPropertyIDs: QWord; + countWrittenPropertyIDs: QWord; + begin + countNeededPropertyIDs:= 0; + countWrittenPropertyIDs:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_GetAllPropertyIDsFunc(FHandle, 0, countNeededPropertyIDs, nil)); + SetLength(APropertyIDs, countNeededPropertyIDs); + FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_GetAllPropertyIDsFunc(FHandle, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); + end; + + function TLib3MFColorGroup.AddColor(const ATheColor: TLib3MFColor): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_AddColorFunc(FHandle, @ATheColor, Result)); + end; + + procedure TLib3MFColorGroup.RemoveColor(const APropertyID: Cardinal); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_RemoveColorFunc(FHandle, APropertyID)); + end; + + procedure TLib3MFColorGroup.SetColor(const APropertyID: Cardinal; const ATheColor: TLib3MFColor); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_SetColorFunc(FHandle, APropertyID, @ATheColor)); + end; + + function TLib3MFColorGroup.GetColor(const APropertyID: Cardinal): TLib3MFColor; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_GetColorFunc(FHandle, APropertyID, @Result)); + end; + +(************************************************************************************************************************* + Class implementation for Texture2DGroup **************************************************************************************************************************) - function convertPropertyTypeToConst(const AValue: TLib3MFPropertyType): Integer; + constructor TLib3MFTexture2DGroup.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFTexture2DGroup.Destroy; begin - case AValue of - ePropertyTypeNoPropertyType: Result := 0; - ePropertyTypeBaseMaterial: Result := 1; - ePropertyTypeTexCoord: Result := 2; - ePropertyTypeColors: Result := 3; - ePropertyTypeComposite: Result := 4; - ePropertyTypeMulti: Result := 5; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + inherited; end; - - function convertConstToPropertyType(const AValue: Integer): TLib3MFPropertyType; + + function TLib3MFTexture2DGroup.GetCount(): Cardinal; begin - case AValue of - 0: Result := ePropertyTypeNoPropertyType; - 1: Result := ePropertyTypeBaseMaterial; - 2: Result := ePropertyTypeTexCoord; - 3: Result := ePropertyTypeColors; - 4: Result := ePropertyTypeComposite; - 5: Result := ePropertyTypeMulti; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_GetCountFunc(FHandle, Result)); end; - - - function convertSlicesMeshResolutionToConst(const AValue: TLib3MFSlicesMeshResolution): Integer; + + procedure TLib3MFTexture2DGroup.GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + var + countNeededPropertyIDs: QWord; + countWrittenPropertyIDs: QWord; begin - case AValue of - eSlicesMeshResolutionFullres: Result := 0; - eSlicesMeshResolutionLowres: Result := 1; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + countNeededPropertyIDs:= 0; + countWrittenPropertyIDs:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_GetAllPropertyIDsFunc(FHandle, 0, countNeededPropertyIDs, nil)); + SetLength(APropertyIDs, countNeededPropertyIDs); + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_GetAllPropertyIDsFunc(FHandle, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); end; - - function convertConstToSlicesMeshResolution(const AValue: Integer): TLib3MFSlicesMeshResolution; + + function TLib3MFTexture2DGroup.AddTex2Coord(const AUVCoordinate: TLib3MFTex2Coord): Cardinal; begin - case AValue of - 0: Result := eSlicesMeshResolutionFullres; - 1: Result := eSlicesMeshResolutionLowres; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_AddTex2CoordFunc(FHandle, @AUVCoordinate, Result)); end; - - - function convertModelUnitToConst(const AValue: TLib3MFModelUnit): Integer; + + function TLib3MFTexture2DGroup.GetTex2Coord(const APropertyID: Cardinal): TLib3MFTex2Coord; begin - case AValue of - eModelUnitMicroMeter: Result := 0; - eModelUnitMilliMeter: Result := 1; - eModelUnitCentiMeter: Result := 2; - eModelUnitInch: Result := 3; - eModelUnitFoot: Result := 4; - eModelUnitMeter: Result := 5; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_GetTex2CoordFunc(FHandle, APropertyID, @Result)); end; - - function convertConstToModelUnit(const AValue: Integer): TLib3MFModelUnit; + + procedure TLib3MFTexture2DGroup.RemoveTex2Coord(const APropertyID: Cardinal); begin - case AValue of - 0: Result := eModelUnitMicroMeter; - 1: Result := eModelUnitMilliMeter; - 2: Result := eModelUnitCentiMeter; - 3: Result := eModelUnitInch; - 4: Result := eModelUnitFoot; - 5: Result := eModelUnitMeter; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_RemoveTex2CoordFunc(FHandle, APropertyID)); end; - - - function convertObjectTypeToConst(const AValue: TLib3MFObjectType): Integer; + + function TLib3MFTexture2DGroup.GetTexture2D(): TLib3MFTexture2D; + var + HTexture2DInstance: TLib3MFHandle; begin - case AValue of - eObjectTypeOther: Result := 0; - eObjectTypeModel: Result := 1; - eObjectTypeSupport: Result := 2; - eObjectTypeSolidSupport: Result := 3; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + Result := nil; + HTexture2DInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_GetTexture2DFunc(FHandle, HTexture2DInstance)); + if Assigned(HTexture2DInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTexture2DInstance); end; - - function convertConstToObjectType(const AValue: Integer): TLib3MFObjectType; + +(************************************************************************************************************************* + Class implementation for CompositeMaterials +**************************************************************************************************************************) + + constructor TLib3MFCompositeMaterials.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - case AValue of - 0: Result := eObjectTypeOther; - 1: Result := eObjectTypeModel; - 2: Result := eObjectTypeSupport; - 3: Result := eObjectTypeSolidSupport; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + inherited Create(AWrapper, AHandle); end; - - - function convertTextureTypeToConst(const AValue: TLib3MFTextureType): Integer; + + destructor TLib3MFCompositeMaterials.Destroy; begin - case AValue of - eTextureTypeUnknown: Result := 0; - eTextureTypePNG: Result := 1; - eTextureTypeJPEG: Result := 2; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + inherited; end; - - function convertConstToTextureType(const AValue: Integer): TLib3MFTextureType; + + function TLib3MFCompositeMaterials.GetCount(): Cardinal; begin - case AValue of - 0: Result := eTextureTypeUnknown; - 1: Result := eTextureTypePNG; - 2: Result := eTextureTypeJPEG; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetCountFunc(FHandle, Result)); end; - - - function convertTextureTileStyleToConst(const AValue: TLib3MFTextureTileStyle): Integer; + + procedure TLib3MFCompositeMaterials.GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + var + countNeededPropertyIDs: QWord; + countWrittenPropertyIDs: QWord; begin - case AValue of - eTextureTileStyleWrap: Result := 0; - eTextureTileStyleMirror: Result := 1; - eTextureTileStyleClamp: Result := 2; - eTextureTileStyleNoTileStyle: Result := 3; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + countNeededPropertyIDs:= 0; + countWrittenPropertyIDs:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetAllPropertyIDsFunc(FHandle, 0, countNeededPropertyIDs, nil)); + SetLength(APropertyIDs, countNeededPropertyIDs); + FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetAllPropertyIDsFunc(FHandle, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); end; - - function convertConstToTextureTileStyle(const AValue: Integer): TLib3MFTextureTileStyle; + + function TLib3MFCompositeMaterials.GetBaseMaterialGroup(): TLib3MFBaseMaterialGroup; + var + HBaseMaterialGroupInstance: TLib3MFHandle; begin - case AValue of - 0: Result := eTextureTileStyleWrap; - 1: Result := eTextureTileStyleMirror; - 2: Result := eTextureTileStyleClamp; - 3: Result := eTextureTileStyleNoTileStyle; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + Result := nil; + HBaseMaterialGroupInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetBaseMaterialGroupFunc(FHandle, HBaseMaterialGroupInstance)); + if Assigned(HBaseMaterialGroupInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HBaseMaterialGroupInstance); end; - - - function convertTextureFilterToConst(const AValue: TLib3MFTextureFilter): Integer; + + function TLib3MFCompositeMaterials.AddComposite(const AComposite: ArrayOfLib3MFCompositeConstituent): Cardinal; + var + PtrComposite: PLib3MFCompositeConstituent; + LenComposite: QWord; begin - case AValue of - eTextureFilterAuto: Result := 0; - eTextureFilterLinear: Result := 1; - eTextureFilterNearest: Result := 2; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + LenComposite := Length(AComposite); + if LenComposite > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenComposite > 0 then + PtrComposite := @AComposite[0] + else + PtrComposite := nil; + + FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_AddCompositeFunc(FHandle, QWord(LenComposite), PtrComposite, Result)); end; - - function convertConstToTextureFilter(const AValue: Integer): TLib3MFTextureFilter; + + procedure TLib3MFCompositeMaterials.RemoveComposite(const APropertyID: Cardinal); begin - case AValue of - 0: Result := eTextureFilterAuto; - 1: Result := eTextureFilterLinear; - 2: Result := eTextureFilterNearest; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_RemoveCompositeFunc(FHandle, APropertyID)); end; - - - function convertBeamLatticeCapModeToConst(const AValue: TLib3MFBeamLatticeCapMode): Integer; + + procedure TLib3MFCompositeMaterials.GetComposite(const APropertyID: Cardinal; out AComposite: ArrayOfLib3MFCompositeConstituent); + var + countNeededComposite: QWord; + countWrittenComposite: QWord; begin - case AValue of - eBeamLatticeCapModeSphere: Result := 0; - eBeamLatticeCapModeHemiSphere: Result := 1; - eBeamLatticeCapModeButt: Result := 2; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + countNeededComposite:= 0; + countWrittenComposite:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetCompositeFunc(FHandle, APropertyID, 0, countNeededComposite, nil)); + SetLength(AComposite, countNeededComposite); + FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetCompositeFunc(FHandle, APropertyID, countNeededComposite, countWrittenComposite, @AComposite[0])); + end; + +(************************************************************************************************************************* + Class implementation for MultiPropertyGroup +**************************************************************************************************************************) + + constructor TLib3MFMultiPropertyGroup.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + begin + inherited Create(AWrapper, AHandle); end; - - function convertConstToBeamLatticeCapMode(const AValue: Integer): TLib3MFBeamLatticeCapMode; + + destructor TLib3MFMultiPropertyGroup.Destroy; begin - case AValue of - 0: Result := eBeamLatticeCapModeSphere; - 1: Result := eBeamLatticeCapModeHemiSphere; - 2: Result := eBeamLatticeCapModeButt; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + inherited; end; - - - function convertBeamLatticeClipModeToConst(const AValue: TLib3MFBeamLatticeClipMode): Integer; + + function TLib3MFMultiPropertyGroup.GetCount(): Cardinal; begin - case AValue of - eBeamLatticeClipModeNoClipMode: Result := 0; - eBeamLatticeClipModeInside: Result := 1; - eBeamLatticeClipModeOutside: Result := 2; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetCountFunc(FHandle, Result)); end; - - function convertConstToBeamLatticeClipMode(const AValue: Integer): TLib3MFBeamLatticeClipMode; + + procedure TLib3MFMultiPropertyGroup.GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + var + countNeededPropertyIDs: QWord; + countWrittenPropertyIDs: QWord; begin - case AValue of - 0: Result := eBeamLatticeClipModeNoClipMode; - 1: Result := eBeamLatticeClipModeInside; - 2: Result := eBeamLatticeClipModeOutside; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + countNeededPropertyIDs:= 0; + countWrittenPropertyIDs:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetAllPropertyIDsFunc(FHandle, 0, countNeededPropertyIDs, nil)); + SetLength(APropertyIDs, countNeededPropertyIDs); + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetAllPropertyIDsFunc(FHandle, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); end; - - - function convertBeamLatticeBallModeToConst(const AValue: TLib3MFBeamLatticeBallMode): Integer; + + function TLib3MFMultiPropertyGroup.AddMultiProperty(const APropertyIDs: TCardinalDynArray): Cardinal; + var + PtrPropertyIDs: PCardinal; + LenPropertyIDs: QWord; begin - case AValue of - eBeamLatticeBallModeNone: Result := 0; - eBeamLatticeBallModeMixed: Result := 1; - eBeamLatticeBallModeAll: Result := 2; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + LenPropertyIDs := Length(APropertyIDs); + if LenPropertyIDs > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenPropertyIDs > 0 then + PtrPropertyIDs := @APropertyIDs[0] + else + PtrPropertyIDs := nil; + + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_AddMultiPropertyFunc(FHandle, QWord(LenPropertyIDs), PtrPropertyIDs, Result)); end; - - function convertConstToBeamLatticeBallMode(const AValue: Integer): TLib3MFBeamLatticeBallMode; + + procedure TLib3MFMultiPropertyGroup.SetMultiProperty(const APropertyID: Cardinal; const APropertyIDs: TCardinalDynArray); + var + PtrPropertyIDs: PCardinal; + LenPropertyIDs: QWord; begin - case AValue of - 0: Result := eBeamLatticeBallModeNone; - 1: Result := eBeamLatticeBallModeMixed; - 2: Result := eBeamLatticeBallModeAll; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + LenPropertyIDs := Length(APropertyIDs); + if LenPropertyIDs > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenPropertyIDs > 0 then + PtrPropertyIDs := @APropertyIDs[0] + else + PtrPropertyIDs := nil; + + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_SetMultiPropertyFunc(FHandle, APropertyID, QWord(LenPropertyIDs), PtrPropertyIDs)); end; - - - function convertProgressIdentifierToConst(const AValue: TLib3MFProgressIdentifier): Integer; + + procedure TLib3MFMultiPropertyGroup.GetMultiProperty(const APropertyID: Cardinal; out APropertyIDs: TCardinalDynArray); + var + countNeededPropertyIDs: QWord; + countWrittenPropertyIDs: QWord; begin - case AValue of - eProgressIdentifierQUERYCANCELED: Result := 0; - eProgressIdentifierDONE: Result := 1; - eProgressIdentifierCLEANUP: Result := 2; - eProgressIdentifierREADSTREAM: Result := 3; - eProgressIdentifierEXTRACTOPCPACKAGE: Result := 4; - eProgressIdentifierREADNONROOTMODELS: Result := 5; - eProgressIdentifierREADROOTMODEL: Result := 6; - eProgressIdentifierREADRESOURCES: Result := 7; - eProgressIdentifierREADMESH: Result := 8; - eProgressIdentifierREADSLICES: Result := 9; - eProgressIdentifierREADBUILD: Result := 10; - eProgressIdentifierREADCUSTOMATTACHMENT: Result := 11; - eProgressIdentifierREADTEXTURETACHMENTS: Result := 12; - eProgressIdentifierCREATEOPCPACKAGE: Result := 13; - eProgressIdentifierWRITEMODELSTOSTREAM: Result := 14; - eProgressIdentifierWRITEROOTMODEL: Result := 15; - eProgressIdentifierWRITENONROOTMODELS: Result := 16; - eProgressIdentifierWRITEATTACHMENTS: Result := 17; - eProgressIdentifierWRITECONTENTTYPES: Result := 18; - eProgressIdentifierWRITENOBJECTS: Result := 19; - eProgressIdentifierWRITENODES: Result := 20; - eProgressIdentifierWRITETRIANGLES: Result := 21; - eProgressIdentifierWRITESLICES: Result := 22; - eProgressIdentifierWRITEKEYSTORE: Result := 23; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + countNeededPropertyIDs:= 0; + countWrittenPropertyIDs:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetMultiPropertyFunc(FHandle, APropertyID, 0, countNeededPropertyIDs, nil)); + SetLength(APropertyIDs, countNeededPropertyIDs); + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetMultiPropertyFunc(FHandle, APropertyID, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); end; - - function convertConstToProgressIdentifier(const AValue: Integer): TLib3MFProgressIdentifier; + + procedure TLib3MFMultiPropertyGroup.RemoveMultiProperty(const APropertyID: Cardinal); begin - case AValue of - 0: Result := eProgressIdentifierQUERYCANCELED; - 1: Result := eProgressIdentifierDONE; - 2: Result := eProgressIdentifierCLEANUP; - 3: Result := eProgressIdentifierREADSTREAM; - 4: Result := eProgressIdentifierEXTRACTOPCPACKAGE; - 5: Result := eProgressIdentifierREADNONROOTMODELS; - 6: Result := eProgressIdentifierREADROOTMODEL; - 7: Result := eProgressIdentifierREADRESOURCES; - 8: Result := eProgressIdentifierREADMESH; - 9: Result := eProgressIdentifierREADSLICES; - 10: Result := eProgressIdentifierREADBUILD; - 11: Result := eProgressIdentifierREADCUSTOMATTACHMENT; - 12: Result := eProgressIdentifierREADTEXTURETACHMENTS; - 13: Result := eProgressIdentifierCREATEOPCPACKAGE; - 14: Result := eProgressIdentifierWRITEMODELSTOSTREAM; - 15: Result := eProgressIdentifierWRITEROOTMODEL; - 16: Result := eProgressIdentifierWRITENONROOTMODELS; - 17: Result := eProgressIdentifierWRITEATTACHMENTS; - 18: Result := eProgressIdentifierWRITECONTENTTYPES; - 19: Result := eProgressIdentifierWRITENOBJECTS; - 20: Result := eProgressIdentifierWRITENODES; - 21: Result := eProgressIdentifierWRITETRIANGLES; - 22: Result := eProgressIdentifierWRITESLICES; - 23: Result := eProgressIdentifierWRITEKEYSTORE; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_RemoveMultiPropertyFunc(FHandle, APropertyID)); end; - - - function convertBlendMethodToConst(const AValue: TLib3MFBlendMethod): Integer; + + function TLib3MFMultiPropertyGroup.GetLayerCount(): Cardinal; begin - case AValue of - eBlendMethodNoBlendMethod: Result := 0; - eBlendMethodMix: Result := 1; - eBlendMethodMultiply: Result := 2; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetLayerCountFunc(FHandle, Result)); end; - - function convertConstToBlendMethod(const AValue: Integer): TLib3MFBlendMethod; + + function TLib3MFMultiPropertyGroup.AddLayer(const ATheLayer: TLib3MFMultiPropertyLayer): Cardinal; begin - case AValue of - 0: Result := eBlendMethodNoBlendMethod; - 1: Result := eBlendMethodMix; - 2: Result := eBlendMethodMultiply; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_AddLayerFunc(FHandle, @ATheLayer, Result)); end; - - - function convertEncryptionAlgorithmToConst(const AValue: TLib3MFEncryptionAlgorithm): Integer; + + function TLib3MFMultiPropertyGroup.GetLayer(const ALayerIndex: Cardinal): TLib3MFMultiPropertyLayer; begin - case AValue of - eEncryptionAlgorithmAES256_GCM: Result := 1; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetLayerFunc(FHandle, ALayerIndex, @Result)); end; - - function convertConstToEncryptionAlgorithm(const AValue: Integer): TLib3MFEncryptionAlgorithm; + + procedure TLib3MFMultiPropertyGroup.RemoveLayer(const ALayerIndex: Cardinal); begin - case AValue of - 1: Result := eEncryptionAlgorithmAES256_GCM; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_RemoveLayerFunc(FHandle, ALayerIndex)); end; - - - function convertWrappingAlgorithmToConst(const AValue: TLib3MFWrappingAlgorithm): Integer; + +(************************************************************************************************************************* + Class implementation for Image3D +**************************************************************************************************************************) + + constructor TLib3MFImage3D.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - case AValue of - eWrappingAlgorithmRSA_OAEP: Result := 0; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + inherited Create(AWrapper, AHandle); end; - - function convertConstToWrappingAlgorithm(const AValue: Integer): TLib3MFWrappingAlgorithm; + + destructor TLib3MFImage3D.Destroy; begin - case AValue of - 0: Result := eWrappingAlgorithmRSA_OAEP; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + inherited; end; - - - function convertMgfAlgorithmToConst(const AValue: TLib3MFMgfAlgorithm): Integer; + + function TLib3MFImage3D.GetName(): String; + var + bytesNeededName: Cardinal; + bytesWrittenName: Cardinal; + bufferName: array of Char; begin - case AValue of - eMgfAlgorithmMGF1_SHA1: Result := 160; - eMgfAlgorithmMGF1_SHA224: Result := 224; - eMgfAlgorithmMGF1_SHA256: Result := 256; - eMgfAlgorithmMGF1_SHA384: Result := 384; - eMgfAlgorithmMGF1_SHA512: Result := 512; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + bytesNeededName:= 0; + bytesWrittenName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImage3D_GetNameFunc(FHandle, 0, bytesNeededName, nil)); + SetLength(bufferName, bytesNeededName); + FWrapper.CheckError(Self, FWrapper.Lib3MFImage3D_GetNameFunc(FHandle, bytesNeededName, bytesWrittenName, @bufferName[0])); + Result := StrPas(@bufferName[0]); end; - - function convertConstToMgfAlgorithm(const AValue: Integer): TLib3MFMgfAlgorithm; + + procedure TLib3MFImage3D.SetName(const AName: String); begin - case AValue of - 160: Result := eMgfAlgorithmMGF1_SHA1; - 224: Result := eMgfAlgorithmMGF1_SHA224; - 256: Result := eMgfAlgorithmMGF1_SHA256; - 384: Result := eMgfAlgorithmMGF1_SHA384; - 512: Result := eMgfAlgorithmMGF1_SHA512; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFImage3D_SetNameFunc(FHandle, PAnsiChar(AName))); end; - - - function convertDigestMethodToConst(const AValue: TLib3MFDigestMethod): Integer; + + function TLib3MFImage3D.IsImageStack(): Boolean; + var + ResultIsImageStack: Byte; begin - case AValue of - eDigestMethodSHA1: Result := 160; - eDigestMethodSHA256: Result := 256; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + ResultIsImageStack := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImage3D_IsImageStackFunc(FHandle, ResultIsImageStack)); + Result := (ResultIsImageStack <> 0); end; - - function convertConstToDigestMethod(const AValue: Integer): TLib3MFDigestMethod; + +(************************************************************************************************************************* + Class implementation for ImageStack +**************************************************************************************************************************) + + constructor TLib3MFImageStack.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - case AValue of - 160: Result := eDigestMethodSHA1; - 256: Result := eDigestMethodSHA256; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + inherited Create(AWrapper, AHandle); end; - - - function convertCompressionToConst(const AValue: TLib3MFCompression): Integer; + + destructor TLib3MFImageStack.Destroy; begin - case AValue of - eCompressionNoCompression: Result := 0; - eCompressionDeflate: Result := 1; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum value'); - end; + inherited; end; - - function convertConstToCompression(const AValue: Integer): TLib3MFCompression; + + function TLib3MFImageStack.GetRowCount(): Cardinal; begin - case AValue of - 0: Result := eCompressionNoCompression; - 1: Result := eCompressionDeflate; - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'invalid enum constant'); - end; + FWrapper.CheckError(Self, FWrapper.Lib3MFImageStack_GetRowCountFunc(FHandle, Result)); end; - - + procedure TLib3MFImageStack.SetRowCount(const ARowCount: Cardinal); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFImageStack_SetRowCountFunc(FHandle, ARowCount)); + end; -(************************************************************************************************************************* - PolymorficFactory implementation -**************************************************************************************************************************) + function TLib3MFImageStack.GetColumnCount(): Cardinal; + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFImageStack_GetColumnCountFunc(FHandle, Result)); + end; - (** - * IMPORTANT: PolymorphicFactory method should not be used by application directly. - * It's designed to be used on Lib3MFHandle object only once. - * If it's used on any existing object as a form of dynamic cast then - * TLIB3MFWrapper::AcquireInstance(object: TLIB3MFBase) must be called after instantiating new object. - * This is important to keep reference count matching between application and library sides. - *) - class function TLib3MFPolymorphicFactory<_T, _B>.Make(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): _T; - var - ClassTypeId: QWord; - Obj: TLIB3MFBase; + procedure TLib3MFImageStack.SetColumnCount(const AColumnCount: Cardinal); begin - Result := nil; - Wrapper.CheckError(nil, Wrapper.Lib3MFBase_ClassTypeIdFunc(handle, ClassTypeId)); - case (ClassTypeId) of - QWord($856632D0BAF1D8B7): begin Obj := TLIB3MFBase.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Base" - QWord($E76F642F363FD7E9): begin Obj := TLIB3MFWriter.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Writer" - QWord($2D86831DA59FBE72): begin Obj := TLIB3MFReader.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Reader" - QWord($0E55A826D377483E): begin Obj := TLIB3MFPackagePart.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::PackagePart" - QWord($DFE3889D1B269CBB): begin Obj := TLIB3MFResource.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Resource" - QWord($460F3515E2621DBE): begin Obj := TLIB3MFResourceIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIterator" - QWord($69684DB99FA813F6): begin Obj := TLIB3MFSliceStackIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStackIterator" - QWord($DE92510BD2112288): begin Obj := TLIB3MFObjectIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ObjectIterator" - QWord($F4196034E2B9FDE6): begin Obj := TLIB3MFMeshObjectIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObjectIterator" - QWord($564DE4217ED7614A): begin Obj := TLIB3MFComponentsObjectIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObjectIterator" - QWord($4BD32B4870FFC03B): begin Obj := TLIB3MFTexture2DIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DIterator" - QWord($65E6EDD9362C79CB): begin Obj := TLIB3MFBaseMaterialGroupIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroupIterator" - QWord($10274A1757C729C0): begin Obj := TLIB3MFColorGroupIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroupIterator" - QWord($30D55F4DB88FE0CA): begin Obj := TLIB3MFTexture2DGroupIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroupIterator" - QWord($A99CC6C3F70FB6F9): begin Obj := TLIB3MFCompositeMaterialsIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterialsIterator" - QWord($C2BDF5D8CBBDB1F0): begin Obj := TLIB3MFMultiPropertyGroupIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" - QWord($D17716D063DE2C22): begin Obj := TLIB3MFMetaData.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MetaData" - QWord($0C3B85369E9B25D3): begin Obj := TLIB3MFMetaDataGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" - QWord($2DA2136F577A779C): begin Obj := TLIB3MFObject.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Object" - QWord($3B3A6DC6EC610497): begin Obj := TLIB3MFMeshObject.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" - QWord($63B3B461B30B4BA5): begin Obj := TLIB3MFBeamLattice.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" - QWord($4ECDB6A6F69F2BEB): begin Obj := TLIB3MFComponent.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Component" - QWord($6522CF04EB283FED): begin Obj := TLIB3MFComponentsObject.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" - QWord($30CCDBE90E00B55B): begin Obj := TLIB3MFBeamSet.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" - QWord($B27D4656E16609FA): begin Obj := TLIB3MFBaseMaterialGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroup" - QWord($D085FB2E49CDB5B1): begin Obj := TLIB3MFColorGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ColorGroup" - QWord($BC1208397E37055D): begin Obj := TLIB3MFTexture2DGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroup" - QWord($CE16224D688B86F2): begin Obj := TLIB3MFCompositeMaterials.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" - QWord($B989E02E43158FE6): begin Obj := TLIB3MFMultiPropertyGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" - QWord($8CE7A1191A63A35D): begin Obj := TLIB3MFAttachment.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Attachment" - QWord($E0441CF976B36319): begin Obj := TLIB3MFTexture2D.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" - QWord($68FB2D5FFC4BA12A): begin Obj := TLIB3MFBuildItem.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItem" - QWord($A7D21BD364910860): begin Obj := TLIB3MFBuildItemIterator.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::BuildItemIterator" - QWord($2198BCF4D8DF9C40): begin Obj := TLIB3MFSlice.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Slice" - QWord($6594B031B6096238): begin Obj := TLIB3MFSliceStack.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::SliceStack" - QWord($D9E46D5E6D8118EE): begin Obj := TLIB3MFConsumer.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Consumer" - QWord($385C42FC5609498A): begin Obj := TLIB3MFAccessRight.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::AccessRight" - QWord($7FB36B91D4CE4671): begin Obj := TLIB3MFContentEncryptionParams.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ContentEncryptionParams" - QWord($1A47A5E258E22EF9): begin Obj := TLIB3MFResourceData.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceData" - QWord($D59067227E428AA4): begin Obj := TLIB3MFResourceDataGroup.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceDataGroup" - QWord($1CC9E0CC082253C6): begin Obj := TLIB3MFKeyStore.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::KeyStore" - QWord($5A8164ECEDB03F09): begin Obj := TLIB3MFModel.Create(Wrapper, Handle); if Obj.inheritsFrom(_T) then Result := Obj as _T; end; // First 64 bits of SHA1 of a string: "Lib3MF::Model" - end; - if Result = nil then Result := _B.Create(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFImageStack_SetColumnCountFunc(FHandle, AColumnCount)); end; - function TLib3MFPolymorphicFactoryMakeBase(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBase; + + function TLib3MFImageStack.GetSheetCount(): Cardinal; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFImageStack_GetSheetCountFunc(FHandle, Result)); end; - function TLib3MFPolymorphicFactoryMakeWriter(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFWriter; + + function TLib3MFImageStack.GetSheet(const AIndex: Cardinal): TLib3MFAttachment; + var + HSheet: TLib3MFHandle; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + Result := nil; + HSheet := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImageStack_GetSheetFunc(FHandle, AIndex, HSheet)); + if Assigned(HSheet) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HSheet); end; - function TLib3MFPolymorphicFactoryMakeReader(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFReader; + + procedure TLib3MFImageStack.SetSheet(const AIndex: Cardinal; const ASheet: TLib3MFAttachment); + var + ASheetHandle: TLib3MFHandle; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + if Assigned(ASheet) then + ASheetHandle := ASheet.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ASheet is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFImageStack_SetSheetFunc(FHandle, AIndex, ASheetHandle)); end; - function TLib3MFPolymorphicFactoryMakePackagePart(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFPackagePart; + + function TLib3MFImageStack.CreateEmptySheet(const AIndex: Cardinal; const APath: String): TLib3MFAttachment; + var + HSheet: TLib3MFHandle; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + Result := nil; + HSheet := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImageStack_CreateEmptySheetFunc(FHandle, AIndex, PAnsiChar(APath), HSheet)); + if Assigned(HSheet) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HSheet); end; - function TLib3MFPolymorphicFactoryMakeResource(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResource; + + function TLib3MFImageStack.CreateSheetFromBuffer(const AIndex: Cardinal; const APath: String; const AData: TByteDynArray): TLib3MFAttachment; + var + PtrData: PByte; + LenData: QWord; + HSheet: TLib3MFHandle; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + LenData := Length(AData); + if LenData > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenData > 0 then + PtrData := @AData[0] + else + PtrData := nil; + + Result := nil; + HSheet := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImageStack_CreateSheetFromBufferFunc(FHandle, AIndex, PAnsiChar(APath), QWord(LenData), PtrData, HSheet)); + if Assigned(HSheet) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HSheet); end; - function TLib3MFPolymorphicFactoryMakeResourceIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceIterator; + + function TLib3MFImageStack.CreateSheetFromFile(const AIndex: Cardinal; const APath: String; const AFileName: String): TLib3MFAttachment; + var + HSheet: TLib3MFHandle; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + Result := nil; + HSheet := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImageStack_CreateSheetFromFileFunc(FHandle, AIndex, PAnsiChar(APath), PAnsiChar(AFileName), HSheet)); + if Assigned(HSheet) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HSheet); end; - function TLib3MFPolymorphicFactoryMakeSliceStackIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSliceStackIterator; + +(************************************************************************************************************************* + Class implementation for Attachment +**************************************************************************************************************************) + + constructor TLib3MFAttachment.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + inherited Create(AWrapper, AHandle); end; - function TLib3MFPolymorphicFactoryMakeObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFObjectIterator; + + destructor TLib3MFAttachment.Destroy; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + inherited; end; - function TLib3MFPolymorphicFactoryMakeMeshObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMeshObjectIterator; + + function TLib3MFAttachment.GetPath(): String; + var + bytesNeededPath: Cardinal; + bytesWrittenPath: Cardinal; + bufferPath: array of Char; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + bytesNeededPath:= 0; + bytesWrittenPath:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_GetPathFunc(FHandle, 0, bytesNeededPath, nil)); + SetLength(bufferPath, bytesNeededPath); + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_GetPathFunc(FHandle, bytesNeededPath, bytesWrittenPath, @bufferPath[0])); + Result := StrPas(@bufferPath[0]); end; - function TLib3MFPolymorphicFactoryMakeComponentsObjectIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponentsObjectIterator; + + procedure TLib3MFAttachment.SetPath(const APath: String); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_SetPathFunc(FHandle, PAnsiChar(APath))); end; - function TLib3MFPolymorphicFactoryMakeTexture2DIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DIterator; + + function TLib3MFAttachment.PackagePart(): TLib3MFPackagePart; + var + HPackagePart: TLib3MFHandle; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + Result := nil; + HPackagePart := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_PackagePartFunc(FHandle, HPackagePart)); + if Assigned(HPackagePart) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPackagePart); end; - function TLib3MFPolymorphicFactoryMakeBaseMaterialGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBaseMaterialGroupIterator; + + function TLib3MFAttachment.GetRelationShipType(): String; + var + bytesNeededPath: Cardinal; + bytesWrittenPath: Cardinal; + bufferPath: array of Char; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + bytesNeededPath:= 0; + bytesWrittenPath:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_GetRelationShipTypeFunc(FHandle, 0, bytesNeededPath, nil)); + SetLength(bufferPath, bytesNeededPath); + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_GetRelationShipTypeFunc(FHandle, bytesNeededPath, bytesWrittenPath, @bufferPath[0])); + Result := StrPas(@bufferPath[0]); end; - function TLib3MFPolymorphicFactoryMakeColorGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFColorGroupIterator; + + procedure TLib3MFAttachment.SetRelationShipType(const APath: String); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_SetRelationShipTypeFunc(FHandle, PAnsiChar(APath))); end; - function TLib3MFPolymorphicFactoryMakeTexture2DGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DGroupIterator; + + procedure TLib3MFAttachment.WriteToFile(const AFileName: String); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_WriteToFileFunc(FHandle, PAnsiChar(AFileName))); end; - function TLib3MFPolymorphicFactoryMakeCompositeMaterialsIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCompositeMaterialsIterator; + + procedure TLib3MFAttachment.ReadFromFile(const AFileName: String); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_ReadFromFileFunc(FHandle, PAnsiChar(AFileName))); end; - function TLib3MFPolymorphicFactoryMakeMultiPropertyGroupIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMultiPropertyGroupIterator; + + procedure TLib3MFAttachment.ReadFromCallback(const ATheReadCallback: PLib3MF_ReadCallback; const AStreamSize: QWord; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + if not Assigned(ATheReadCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheReadCallback is a nil value.'); + if not Assigned(ATheSeekCallback) then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheSeekCallback is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_ReadFromCallbackFunc(FHandle, ATheReadCallback, AStreamSize, ATheSeekCallback, AUserData)); end; - function TLib3MFPolymorphicFactoryMakeMetaData(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMetaData; + + function TLib3MFAttachment.GetStreamSize(): QWord; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_GetStreamSizeFunc(FHandle, Result)); end; - function TLib3MFPolymorphicFactoryMakeMetaDataGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMetaDataGroup; + + procedure TLib3MFAttachment.WriteToBuffer(out ABuffer: TByteDynArray); + var + countNeededBuffer: QWord; + countWrittenBuffer: QWord; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + countNeededBuffer:= 0; + countWrittenBuffer:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_WriteToBufferFunc(FHandle, 0, countNeededBuffer, nil)); + SetLength(ABuffer, countNeededBuffer); + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_WriteToBufferFunc(FHandle, countNeededBuffer, countWrittenBuffer, @ABuffer[0])); end; - function TLib3MFPolymorphicFactoryMakeObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFObject; + + procedure TLib3MFAttachment.ReadFromBuffer(const ABuffer: TByteDynArray); + var + PtrBuffer: PByte; + LenBuffer: QWord; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + LenBuffer := Length(ABuffer); + if LenBuffer > $FFFFFFFF then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); + if LenBuffer > 0 then + PtrBuffer := @ABuffer[0] + else + PtrBuffer := nil; + + FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_ReadFromBufferFunc(FHandle, QWord(LenBuffer), PtrBuffer)); end; - function TLib3MFPolymorphicFactoryMakeMeshObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMeshObject; + +(************************************************************************************************************************* + Class implementation for Texture2D +**************************************************************************************************************************) + + constructor TLib3MFTexture2D.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + inherited Create(AWrapper, AHandle); end; - function TLib3MFPolymorphicFactoryMakeBeamLattice(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBeamLattice; + + destructor TLib3MFTexture2D.Destroy; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + inherited; end; - function TLib3MFPolymorphicFactoryMakeComponent(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponent; + + function TLib3MFTexture2D.GetAttachment(): TLib3MFAttachment; + var + HAttachment: TLib3MFHandle; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + Result := nil; + HAttachment := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_GetAttachmentFunc(FHandle, HAttachment)); + if Assigned(HAttachment) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HAttachment); end; - function TLib3MFPolymorphicFactoryMakeComponentsObject(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFComponentsObject; + + procedure TLib3MFTexture2D.SetAttachment(const AAttachment: TLib3MFAttachment); + var + AAttachmentHandle: TLib3MFHandle; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + if Assigned(AAttachment) then + AAttachmentHandle := AAttachment.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AAttachment is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_SetAttachmentFunc(FHandle, AAttachmentHandle)); end; - function TLib3MFPolymorphicFactoryMakeBeamSet(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBeamSet; + + function TLib3MFTexture2D.GetContentType(): TLib3MFTextureType; + var + ResultContentType: Integer; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + ResultContentType := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_GetContentTypeFunc(FHandle, ResultContentType)); + Result := convertConstToTextureType(ResultContentType); end; - function TLib3MFPolymorphicFactoryMakeBaseMaterialGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBaseMaterialGroup; + + procedure TLib3MFTexture2D.SetContentType(const AContentType: TLib3MFTextureType); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_SetContentTypeFunc(FHandle, convertTextureTypeToConst(AContentType))); end; - function TLib3MFPolymorphicFactoryMakeColorGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFColorGroup; + + procedure TLib3MFTexture2D.GetTileStyleUV(out ATileStyleU: TLib3MFTextureTileStyle; out ATileStyleV: TLib3MFTextureTileStyle); + var + ResultTileStyleU: Integer; + ResultTileStyleV: Integer; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + ResultTileStyleU := 0; + ResultTileStyleV := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_GetTileStyleUVFunc(FHandle, ResultTileStyleU, ResultTileStyleV)); + ATileStyleU := convertConstToTextureTileStyle(ResultTileStyleU); + ATileStyleV := convertConstToTextureTileStyle(ResultTileStyleV); end; - function TLib3MFPolymorphicFactoryMakeTexture2DGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2DGroup; + + procedure TLib3MFTexture2D.SetTileStyleUV(const ATileStyleU: TLib3MFTextureTileStyle; const ATileStyleV: TLib3MFTextureTileStyle); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_SetTileStyleUVFunc(FHandle, convertTextureTileStyleToConst(ATileStyleU), convertTextureTileStyleToConst(ATileStyleV))); end; - function TLib3MFPolymorphicFactoryMakeCompositeMaterials(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFCompositeMaterials; + + function TLib3MFTexture2D.GetFilter(): TLib3MFTextureFilter; + var + ResultFilter: Integer; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + ResultFilter := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_GetFilterFunc(FHandle, ResultFilter)); + Result := convertConstToTextureFilter(ResultFilter); end; - function TLib3MFPolymorphicFactoryMakeMultiPropertyGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFMultiPropertyGroup; + + procedure TLib3MFTexture2D.SetFilter(const AFilter: TLib3MFTextureFilter); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_SetFilterFunc(FHandle, convertTextureFilterToConst(AFilter))); end; - function TLib3MFPolymorphicFactoryMakeAttachment(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAttachment; + +(************************************************************************************************************************* + Class implementation for ImplicitPort +**************************************************************************************************************************) + + constructor TLib3MFImplicitPort.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + inherited Create(AWrapper, AHandle); end; - function TLib3MFPolymorphicFactoryMakeTexture2D(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFTexture2D; + + destructor TLib3MFImplicitPort.Destroy; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + inherited; end; - function TLib3MFPolymorphicFactoryMakeBuildItem(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBuildItem; + + function TLib3MFImplicitPort.GetIdentifier(): String; + var + bytesNeededIdentifier: Cardinal; + bytesWrittenIdentifier: Cardinal; + bufferIdentifier: array of Char; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + bytesNeededIdentifier:= 0; + bytesWrittenIdentifier:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPort_GetIdentifierFunc(FHandle, 0, bytesNeededIdentifier, nil)); + SetLength(bufferIdentifier, bytesNeededIdentifier); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPort_GetIdentifierFunc(FHandle, bytesNeededIdentifier, bytesWrittenIdentifier, @bufferIdentifier[0])); + Result := StrPas(@bufferIdentifier[0]); end; - function TLib3MFPolymorphicFactoryMakeBuildItemIterator(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFBuildItemIterator; + + procedure TLib3MFImplicitPort.SetIdentifier(const AIdentifier: String); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPort_SetIdentifierFunc(FHandle, PAnsiChar(AIdentifier))); end; - function TLib3MFPolymorphicFactoryMakeSlice(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSlice; + + function TLib3MFImplicitPort.GetDisplayName(): String; + var + bytesNeededDisplayName: Cardinal; + bytesWrittenDisplayName: Cardinal; + bufferDisplayName: array of Char; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + bytesNeededDisplayName:= 0; + bytesWrittenDisplayName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPort_GetDisplayNameFunc(FHandle, 0, bytesNeededDisplayName, nil)); + SetLength(bufferDisplayName, bytesNeededDisplayName); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPort_GetDisplayNameFunc(FHandle, bytesNeededDisplayName, bytesWrittenDisplayName, @bufferDisplayName[0])); + Result := StrPas(@bufferDisplayName[0]); end; - function TLib3MFPolymorphicFactoryMakeSliceStack(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFSliceStack; + + procedure TLib3MFImplicitPort.SetDisplayName(const ADisplayName: String); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPort_SetDisplayNameFunc(FHandle, PAnsiChar(ADisplayName))); end; - function TLib3MFPolymorphicFactoryMakeConsumer(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFConsumer; + + procedure TLib3MFImplicitPort.SetType(const AImplicitPortType: TLib3MFImplicitPortType); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPort_SetTypeFunc(FHandle, convertImplicitPortTypeToConst(AImplicitPortType))); end; - function TLib3MFPolymorphicFactoryMakeAccessRight(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFAccessRight; + + function TLib3MFImplicitPort.GetType(): TLib3MFImplicitPortType; + var + ResultImplicitPortType: Integer; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + ResultImplicitPortType := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPort_GetTypeFunc(FHandle, ResultImplicitPortType)); + Result := convertConstToImplicitPortType(ResultImplicitPortType); end; - function TLib3MFPolymorphicFactoryMakeContentEncryptionParams(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFContentEncryptionParams; + + function TLib3MFImplicitPort.GetReference(): String; + var + bytesNeededReference: Cardinal; + bytesWrittenReference: Cardinal; + bufferReference: array of Char; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + bytesNeededReference:= 0; + bytesWrittenReference:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPort_GetReferenceFunc(FHandle, 0, bytesNeededReference, nil)); + SetLength(bufferReference, bytesNeededReference); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPort_GetReferenceFunc(FHandle, bytesNeededReference, bytesWrittenReference, @bufferReference[0])); + Result := StrPas(@bufferReference[0]); end; - function TLib3MFPolymorphicFactoryMakeResourceData(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceData; + + procedure TLib3MFImplicitPort.SetReference(const AReference: String); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPort_SetReferenceFunc(FHandle, PAnsiChar(AReference))); end; - function TLib3MFPolymorphicFactoryMakeResourceDataGroup(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFResourceDataGroup; + +(************************************************************************************************************************* + Class implementation for Iterator +**************************************************************************************************************************) + + constructor TLib3MFIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + inherited Create(AWrapper, AHandle); end; - function TLib3MFPolymorphicFactoryMakeKeyStore(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFKeyStore; + + destructor TLib3MFIterator.Destroy; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + inherited; end; - function TLib3MFPolymorphicFactoryMakeModel(Wrapper: TLib3MFWrapper; Handle: TLib3MFHandle): TLIB3MFModel; + + function TLib3MFIterator.MoveNext(): Boolean; + var + ResultHasNext: Byte; begin - Result := TLib3MFPolymorphicFactory.Make(Wrapper, Handle); + ResultHasNext := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFIterator_MoveNextFunc(FHandle, ResultHasNext)); + Result := (ResultHasNext <> 0); end; -(************************************************************************************************************************* - Exception implementation -**************************************************************************************************************************) - - constructor ELib3MFException.Create(AErrorCode: TLib3MFResult; AMessage: String); + function TLib3MFIterator.MovePrevious(): Boolean; var - ADescription: String; + ResultHasPrevious: Byte; begin - FErrorCode := AErrorCode; - case FErrorCode of - LIB3MF_ERROR_NOTIMPLEMENTED: ADescription := 'functionality not implemented'; - LIB3MF_ERROR_INVALIDPARAM: ADescription := 'an invalid parameter was passed'; - LIB3MF_ERROR_INVALIDCAST: ADescription := 'a type cast failed'; - LIB3MF_ERROR_BUFFERTOOSMALL: ADescription := 'a provided buffer is too small'; - LIB3MF_ERROR_GENERICEXCEPTION: ADescription := 'a generic exception occurred'; - LIB3MF_ERROR_COULDNOTLOADLIBRARY: ADescription := 'the library could not be loaded'; - LIB3MF_ERROR_COULDNOTFINDLIBRARYEXPORT: ADescription := 'a required exported symbol could not be found in the library'; - LIB3MF_ERROR_INCOMPATIBLEBINARYVERSION: ADescription := 'the version of the binary interface does not match the bindings interface'; - LIB3MF_ERROR_CALCULATIONABORTED: ADescription := 'a calculation has been aborted'; - LIB3MF_ERROR_SHOULDNOTBECALLED: ADescription := 'functionality should not be called'; - LIB3MF_ERROR_READERCLASSUNKNOWN: ADescription := 'the queried reader class is unknown'; - LIB3MF_ERROR_WRITERCLASSUNKNOWN: ADescription := 'the queried writer class is unknown'; - LIB3MF_ERROR_ITERATORINVALIDINDEX: ADescription := 'the current index of an iterator is invalid'; - LIB3MF_ERROR_INVALIDMODELRESOURCE: ADescription := 'no Model Resource has been given'; - LIB3MF_ERROR_RESOURCENOTFOUND: ADescription := 'Resource not found'; - LIB3MF_ERROR_INVALIDMODEL: ADescription := 'A model is invalid'; - LIB3MF_ERROR_INVALIDOBJECT: ADescription := 'An object is invalid'; - LIB3MF_ERROR_INVALIDMESHOBJECT: ADescription := 'A mesh object is invalid'; - LIB3MF_ERROR_INVALIDCOMPONENTSOBJECT: ADescription := 'A components object is invalid'; - LIB3MF_ERROR_INVALIDCOMPONENT: ADescription := 'A component is invalid'; - LIB3MF_ERROR_INVALIDBUILDITEM: ADescription := 'A build item is invalid'; - LIB3MF_ERROR_INVALIDBASEMATERIALGROUP: ADescription := 'A basematerialgroup is invalid'; - LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE: ADescription := 'A slicestack resource is invalid'; - LIB3MF_ERROR_INVALIDTEXTURERESOURCE: ADescription := 'A texture resource is invalid'; - LIB3MF_ERROR_INVALIDCOLORGROUP: ADescription := 'A color group resource is invalid'; - LIB3MF_ERROR_INVALIDTEXTURE2DGROUP: ADescription := 'A texture2d group resource is invalid'; - LIB3MF_ERROR_INVALIDCOMPOSITEMATERIALS: ADescription := 'A composite materials resource is invalid'; - LIB3MF_ERROR_INVALIDMULTIPROPERTYGROUP: ADescription := 'A MultiPropertyGroup resource is invalid'; - LIB3MF_ERROR_INVALIDRESOURCEINDEX: ADescription := 'A resource index is invalid'; - LIB3MF_ERROR_ATTACHMENTNOTFOUND: ADescription := 'Attachment not found'; - LIB3MF_ERROR_FORBIDDENCYCLICREFERENCE: ADescription := 'A component references one of its ancestors'; - LIB3MF_ERROR_INVALIDATTACHMENTSTREAM: ADescription := 'An attachment stream is invalid'; - LIB3MF_ERROR_INVALIDPROPERTYCOUNT: ADescription := 'Invalid property count.'; - LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: ADescription := 'A progress identifier is unknown'; - LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: ADescription := 'An element buffer exceeds its spec limit'; - LIB3MF_ERROR_INVALIDRESOURCE: ADescription := 'A resource is invalid'; - LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: ADescription := 'This object type is not valid for beamlattices'; - LIB3MF_ERROR_INVALIDKEYSTORE: ADescription := 'The keystore object is invalid'; - LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: ADescription := 'The consumer keystore object is invalid'; - LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: ADescription := 'A consumer has not been found'; - LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: ADescription := 'A resource data has not been found'; - LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: ADescription := 'A Key or Conentent encryption callback has not been registered'; - LIB3MF_ERROR_INVALIDKEYSIZE: ADescription := 'The key siue is invalid'; - else - ADescription := 'unknown'; - end; - - inherited Create(Format('the 3MF Library Error - %s (#%d, %s)', [ ADescription, AErrorCode, AMessage ])); + ResultHasPrevious := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFIterator_MovePreviousFunc(FHandle, ResultHasPrevious)); + Result := (ResultHasPrevious <> 0); end; - constructor ELib3MFException.CreateCustomMessage(AErrorCode: TLib3MFResult; AMessage: String); + function TLib3MFIterator.Count(): QWord; begin - FCustomMessage := AMessage; - FErrorCode := AErrorCode; - inherited Create(Format('%s (%d)', [FCustomMessage, AErrorCode])); + FWrapper.CheckError(Self, FWrapper.Lib3MFIterator_CountFunc(FHandle, Result)); end; (************************************************************************************************************************* - Class implementation for Base + Class implementation for ImplicitPortIterator **************************************************************************************************************************) - constructor TLib3MFBase.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFImplicitPortIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - if not Assigned(AWrapper) then - raise ELib3MFException.Create(LIB3MF_ERROR_INVALIDPARAM, ''); - if not Assigned(AHandle) then - raise ELib3MFException.Create(LIB3MF_ERROR_INVALIDPARAM, ''); - - inherited Create(); - FWrapper := AWrapper; - FHandle := AHandle; + inherited Create(AWrapper, AHandle); end; - destructor TLib3MFBase.Destroy; + destructor TLib3MFImplicitPortIterator.Destroy; begin - FWrapper.Release(self); inherited; end; - function TLib3MFBase.ClassTypeId(): QWord; + function TLib3MFImplicitPortIterator.GetCurrent(): TLib3MFImplicitPort; + var + HPort: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBase_ClassTypeIdFunc(FHandle, Result)); + Result := nil; + HPort := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitPortIterator_GetCurrentFunc(FHandle, HPort)); + if Assigned(HPort) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPort); end; (************************************************************************************************************************* - Class implementation for Writer + Class implementation for ImplicitNode **************************************************************************************************************************) - constructor TLib3MFWriter.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFImplicitNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFWriter.Destroy; + destructor TLib3MFImplicitNode.Destroy; begin inherited; end; - procedure TLib3MFWriter.WriteToFile(const AFilename: String); + function TLib3MFImplicitNode.GetIdentifier(): String; + var + bytesNeededIdentifier: Cardinal; + bytesWrittenIdentifier: Cardinal; + bufferIdentifier: array of Char; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_WriteToFileFunc(FHandle, PAnsiChar(AFilename))); + bytesNeededIdentifier:= 0; + bytesWrittenIdentifier:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_GetIdentifierFunc(FHandle, 0, bytesNeededIdentifier, nil)); + SetLength(bufferIdentifier, bytesNeededIdentifier); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_GetIdentifierFunc(FHandle, bytesNeededIdentifier, bytesWrittenIdentifier, @bufferIdentifier[0])); + Result := StrPas(@bufferIdentifier[0]); end; - function TLib3MFWriter.GetStreamSize(): QWord; + procedure TLib3MFImplicitNode.SetIdentifier(const AIdentifier: String); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetStreamSizeFunc(FHandle, Result)); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_SetIdentifierFunc(FHandle, PAnsiChar(AIdentifier))); end; - procedure TLib3MFWriter.WriteToBuffer(out ABuffer: TByteDynArray); + function TLib3MFImplicitNode.GetDisplayName(): String; var - countNeededBuffer: QWord; - countWrittenBuffer: QWord; + bytesNeededDisplayName: Cardinal; + bytesWrittenDisplayName: Cardinal; + bufferDisplayName: array of Char; + begin + bytesNeededDisplayName:= 0; + bytesWrittenDisplayName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_GetDisplayNameFunc(FHandle, 0, bytesNeededDisplayName, nil)); + SetLength(bufferDisplayName, bytesNeededDisplayName); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_GetDisplayNameFunc(FHandle, bytesNeededDisplayName, bytesWrittenDisplayName, @bufferDisplayName[0])); + Result := StrPas(@bufferDisplayName[0]); + end; + + procedure TLib3MFImplicitNode.SetDisplayName(const ADisplayName: String); begin - countNeededBuffer:= 0; - countWrittenBuffer:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_WriteToBufferFunc(FHandle, 0, countNeededBuffer, nil)); - SetLength(ABuffer, countNeededBuffer); - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_WriteToBufferFunc(FHandle, countNeededBuffer, countWrittenBuffer, @ABuffer[0])); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_SetDisplayNameFunc(FHandle, PAnsiChar(ADisplayName))); end; - procedure TLib3MFWriter.WriteToCallback(const ATheWriteCallback: PLib3MF_WriteCallback; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); + function TLib3MFImplicitNode.GetTag(): String; + var + bytesNeededTag: Cardinal; + bytesWrittenTag: Cardinal; + bufferTag: array of Char; begin - if not Assigned(ATheWriteCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheWriteCallback is a nil value.'); - if not Assigned(ATheSeekCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheSeekCallback is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_WriteToCallbackFunc(FHandle, ATheWriteCallback, ATheSeekCallback, AUserData)); + bytesNeededTag:= 0; + bytesWrittenTag:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_GetTagFunc(FHandle, 0, bytesNeededTag, nil)); + SetLength(bufferTag, bytesNeededTag); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_GetTagFunc(FHandle, bytesNeededTag, bytesWrittenTag, @bufferTag[0])); + Result := StrPas(@bufferTag[0]); end; - procedure TLib3MFWriter.SetProgressCallback(const AProgressCallback: PLib3MF_ProgressCallback; const AUserData: Pointer); + procedure TLib3MFImplicitNode.SetTag(const ATag: String); begin - if not Assigned(AProgressCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AProgressCallback is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_SetProgressCallbackFunc(FHandle, AProgressCallback, AUserData)); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_SetTagFunc(FHandle, PAnsiChar(ATag))); end; - function TLib3MFWriter.GetDecimalPrecision(): Cardinal; + function TLib3MFImplicitNode.GetNodeType(): TLib3MFImplicitNodeType; + var + ResultType: Integer; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetDecimalPrecisionFunc(FHandle, Result)); + ResultType := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_GetNodeTypeFunc(FHandle, ResultType)); + Result := convertConstToImplicitNodeType(ResultType); end; - procedure TLib3MFWriter.SetDecimalPrecision(const ADecimalPrecision: Cardinal); + function TLib3MFImplicitNode.AddInput(const AIdentifier: String; const ADisplayName: String): TLib3MFImplicitPort; + var + HPort: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_SetDecimalPrecisionFunc(FHandle, ADecimalPrecision)); + Result := nil; + HPort := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_AddInputFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), HPort)); + if Assigned(HPort) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPort); end; - procedure TLib3MFWriter.SetStrictModeActive(const AStrictModeActive: Boolean); + function TLib3MFImplicitNode.GetInputs(): TLib3MFImplicitPortIterator; + var + HIterator: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_SetStrictModeActiveFunc(FHandle, Ord(AStrictModeActive))); + Result := nil; + HIterator := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_GetInputsFunc(FHandle, HIterator)); + if Assigned(HIterator) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HIterator); end; - function TLib3MFWriter.GetStrictModeActive(): Boolean; + function TLib3MFImplicitNode.AddOutput(const AIdentifier: String; const ADisplayName: String): TLib3MFImplicitPort; var - ResultStrictModeActive: Byte; + HPort: TLib3MFHandle; begin - ResultStrictModeActive := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetStrictModeActiveFunc(FHandle, ResultStrictModeActive)); - Result := (ResultStrictModeActive <> 0); + Result := nil; + HPort := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_AddOutputFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), HPort)); + if Assigned(HPort) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPort); end; - function TLib3MFWriter.GetWarning(const AIndex: Cardinal; out AErrorCode: Cardinal): String; + function TLib3MFImplicitNode.GetOutputs(): TLib3MFImplicitPortIterator; var - bytesNeededWarning: Cardinal; - bytesWrittenWarning: Cardinal; - bufferWarning: array of Char; + HIterator: TLib3MFHandle; begin - bytesNeededWarning:= 0; - bytesWrittenWarning:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetWarningFunc(FHandle, AIndex, AErrorCode, 0, bytesNeededWarning, nil)); - SetLength(bufferWarning, bytesNeededWarning); - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetWarningFunc(FHandle, AIndex, AErrorCode, bytesNeededWarning, bytesWrittenWarning, @bufferWarning[0])); - Result := StrPas(@bufferWarning[0]); + Result := nil; + HIterator := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_GetOutputsFunc(FHandle, HIterator)); + if Assigned(HIterator) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HIterator); end; - function TLib3MFWriter.GetWarningCount(): Cardinal; + function TLib3MFImplicitNode.FindInput(const AIdentifier: String): TLib3MFImplicitPort; + var + HInput: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_GetWarningCountFunc(FHandle, Result)); + Result := nil; + HInput := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_FindInputFunc(FHandle, PAnsiChar(AIdentifier), HInput)); + if Assigned(HInput) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HInput); end; - procedure TLib3MFWriter.AddKeyWrappingCallback(const AConsumerID: String; const ATheCallback: PLib3MF_KeyWrappingCallback; const AUserData: Pointer); + function TLib3MFImplicitNode.FindOutput(const AIdentifier: String): TLib3MFImplicitPort; + var + HOutput: TLib3MFHandle; begin - if not Assigned(ATheCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheCallback is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_AddKeyWrappingCallbackFunc(FHandle, PAnsiChar(AConsumerID), ATheCallback, AUserData)); + Result := nil; + HOutput := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_FindOutputFunc(FHandle, PAnsiChar(AIdentifier), HOutput)); + if Assigned(HOutput) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HOutput); end; - procedure TLib3MFWriter.SetContentEncryptionCallback(const ATheCallback: PLib3MF_ContentEncryptionCallback; const AUserData: Pointer); + function TLib3MFImplicitNode.AreTypesValid(): Boolean; + var + ResultValid: Byte; begin - if not Assigned(ATheCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheCallback is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFWriter_SetContentEncryptionCallbackFunc(FHandle, ATheCallback, AUserData)); + ResultValid := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitNode_AreTypesValidFunc(FHandle, ResultValid)); + Result := (ResultValid <> 0); end; (************************************************************************************************************************* - Class implementation for Reader + Class implementation for OneInputNode **************************************************************************************************************************) - constructor TLib3MFReader.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFOneInputNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFReader.Destroy; + destructor TLib3MFOneInputNode.Destroy; begin inherited; end; - procedure TLib3MFReader.ReadFromFile(const AFilename: String); + function TLib3MFOneInputNode.GetInputA(): TLib3MFImplicitPort; + var + HInput: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_ReadFromFileFunc(FHandle, PAnsiChar(AFilename))); + Result := nil; + HInput := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFOneInputNode_GetInputAFunc(FHandle, HInput)); + if Assigned(HInput) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HInput); end; - procedure TLib3MFReader.ReadFromBuffer(const ABuffer: TByteDynArray); + function TLib3MFOneInputNode.GetOutputResult(): TLib3MFImplicitPort; var - PtrBuffer: PByte; - LenBuffer: QWord; + HResult: TLib3MFHandle; begin - LenBuffer := Length(ABuffer); - if LenBuffer > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenBuffer > 0 then - PtrBuffer := @ABuffer[0] - else - PtrBuffer := nil; - - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_ReadFromBufferFunc(FHandle, QWord(LenBuffer), PtrBuffer)); + Result := nil; + HResult := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFOneInputNode_GetOutputResultFunc(FHandle, HResult)); + if Assigned(HResult) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResult); end; - procedure TLib3MFReader.ReadFromCallback(const ATheReadCallback: PLib3MF_ReadCallback; const AStreamSize: QWord; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); +(************************************************************************************************************************* + Class implementation for SinNode +**************************************************************************************************************************) + + constructor TLib3MFSinNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - if not Assigned(ATheReadCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheReadCallback is a nil value.'); - if not Assigned(ATheSeekCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheSeekCallback is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_ReadFromCallbackFunc(FHandle, ATheReadCallback, AStreamSize, ATheSeekCallback, AUserData)); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFReader.SetProgressCallback(const AProgressCallback: PLib3MF_ProgressCallback; const AUserData: Pointer); + destructor TLib3MFSinNode.Destroy; begin - if not Assigned(AProgressCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AProgressCallback is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_SetProgressCallbackFunc(FHandle, AProgressCallback, AUserData)); + inherited; end; - procedure TLib3MFReader.AddRelationToRead(const ARelationShipType: String); +(************************************************************************************************************************* + Class implementation for CosNode +**************************************************************************************************************************) + + constructor TLib3MFCosNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_AddRelationToReadFunc(FHandle, PAnsiChar(ARelationShipType))); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFReader.RemoveRelationToRead(const ARelationShipType: String); + destructor TLib3MFCosNode.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_RemoveRelationToReadFunc(FHandle, PAnsiChar(ARelationShipType))); + inherited; end; - procedure TLib3MFReader.SetStrictModeActive(const AStrictModeActive: Boolean); +(************************************************************************************************************************* + Class implementation for TanNode +**************************************************************************************************************************) + + constructor TLib3MFTanNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_SetStrictModeActiveFunc(FHandle, Ord(AStrictModeActive))); + inherited Create(AWrapper, AHandle); end; - function TLib3MFReader.GetStrictModeActive(): Boolean; - var - ResultStrictModeActive: Byte; + destructor TLib3MFTanNode.Destroy; begin - ResultStrictModeActive := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_GetStrictModeActiveFunc(FHandle, ResultStrictModeActive)); - Result := (ResultStrictModeActive <> 0); + inherited; end; - function TLib3MFReader.GetWarning(const AIndex: Cardinal; out AErrorCode: Cardinal): String; - var - bytesNeededWarning: Cardinal; - bytesWrittenWarning: Cardinal; - bufferWarning: array of Char; +(************************************************************************************************************************* + Class implementation for ArcSinNode +**************************************************************************************************************************) + + constructor TLib3MFArcSinNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - bytesNeededWarning:= 0; - bytesWrittenWarning:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_GetWarningFunc(FHandle, AIndex, AErrorCode, 0, bytesNeededWarning, nil)); - SetLength(bufferWarning, bytesNeededWarning); - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_GetWarningFunc(FHandle, AIndex, AErrorCode, bytesNeededWarning, bytesWrittenWarning, @bufferWarning[0])); - Result := StrPas(@bufferWarning[0]); + inherited Create(AWrapper, AHandle); end; - function TLib3MFReader.GetWarningCount(): Cardinal; + destructor TLib3MFArcSinNode.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_GetWarningCountFunc(FHandle, Result)); + inherited; end; - procedure TLib3MFReader.AddKeyWrappingCallback(const AConsumerID: String; const ATheCallback: PLib3MF_KeyWrappingCallback; const AUserData: Pointer); +(************************************************************************************************************************* + Class implementation for ArcCosNode +**************************************************************************************************************************) + + constructor TLib3MFArcCosNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - if not Assigned(ATheCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheCallback is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_AddKeyWrappingCallbackFunc(FHandle, PAnsiChar(AConsumerID), ATheCallback, AUserData)); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFReader.SetContentEncryptionCallback(const ATheCallback: PLib3MF_ContentEncryptionCallback; const AUserData: Pointer); + destructor TLib3MFArcCosNode.Destroy; begin - if not Assigned(ATheCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheCallback is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFReader_SetContentEncryptionCallbackFunc(FHandle, ATheCallback, AUserData)); + inherited; end; (************************************************************************************************************************* - Class implementation for PackagePart + Class implementation for ArcTanNode **************************************************************************************************************************) - constructor TLib3MFPackagePart.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFArcTanNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFPackagePart.Destroy; + destructor TLib3MFArcTanNode.Destroy; begin inherited; end; - function TLib3MFPackagePart.GetPath(): String; - var - bytesNeededPath: Cardinal; - bytesWrittenPath: Cardinal; - bufferPath: array of Char; +(************************************************************************************************************************* + Class implementation for SinhNode +**************************************************************************************************************************) + + constructor TLib3MFSinhNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - bytesNeededPath:= 0; - bytesWrittenPath:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFPackagePart_GetPathFunc(FHandle, 0, bytesNeededPath, nil)); - SetLength(bufferPath, bytesNeededPath); - FWrapper.CheckError(Self, FWrapper.Lib3MFPackagePart_GetPathFunc(FHandle, bytesNeededPath, bytesWrittenPath, @bufferPath[0])); - Result := StrPas(@bufferPath[0]); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFPackagePart.SetPath(const APath: String); + destructor TLib3MFSinhNode.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFPackagePart_SetPathFunc(FHandle, PAnsiChar(APath))); + inherited; end; (************************************************************************************************************************* - Class implementation for Resource + Class implementation for CoshNode **************************************************************************************************************************) - constructor TLib3MFResource.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFCoshNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFResource.Destroy; + destructor TLib3MFCoshNode.Destroy; begin inherited; end; - function TLib3MFResource.GetResourceID(): Cardinal; - begin - FWrapper.CheckError(Self, FWrapper.Lib3MFResource_GetResourceIDFunc(FHandle, Result)); - end; +(************************************************************************************************************************* + Class implementation for TanhNode +**************************************************************************************************************************) - function TLib3MFResource.GetUniqueResourceID(): Cardinal; + constructor TLib3MFTanhNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFResource_GetUniqueResourceIDFunc(FHandle, Result)); + inherited Create(AWrapper, AHandle); end; - function TLib3MFResource.PackagePart(): TLib3MFPackagePart; - var - HPackagePart: TLib3MFHandle; + destructor TLib3MFTanhNode.Destroy; begin - Result := nil; - HPackagePart := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFResource_PackagePartFunc(FHandle, HPackagePart)); - if Assigned(HPackagePart) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPackagePart); + inherited; end; - procedure TLib3MFResource.SetPackagePart(const APackagePart: TLib3MFPackagePart); - var - APackagePartHandle: TLib3MFHandle; +(************************************************************************************************************************* + Class implementation for RoundNode +**************************************************************************************************************************) + + constructor TLib3MFRoundNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - if Assigned(APackagePart) then - APackagePartHandle := APackagePart.TheHandle - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'APackagePart is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFResource_SetPackagePartFunc(FHandle, APackagePartHandle)); + inherited Create(AWrapper, AHandle); end; - function TLib3MFResource.GetModelResourceID(): Cardinal; + destructor TLib3MFRoundNode.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFResource_GetModelResourceIDFunc(FHandle, Result)); + inherited; end; (************************************************************************************************************************* - Class implementation for ResourceIterator + Class implementation for CeilNode **************************************************************************************************************************) - constructor TLib3MFResourceIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFCeilNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFResourceIterator.Destroy; + destructor TLib3MFCeilNode.Destroy; begin inherited; end; - function TLib3MFResourceIterator.MoveNext(): Boolean; - var - ResultHasNext: Byte; +(************************************************************************************************************************* + Class implementation for FloorNode +**************************************************************************************************************************) + + constructor TLib3MFFloorNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - ResultHasNext := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIterator_MoveNextFunc(FHandle, ResultHasNext)); - Result := (ResultHasNext <> 0); + inherited Create(AWrapper, AHandle); end; - function TLib3MFResourceIterator.MovePrevious(): Boolean; - var - ResultHasPrevious: Byte; + destructor TLib3MFFloorNode.Destroy; begin - ResultHasPrevious := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIterator_MovePreviousFunc(FHandle, ResultHasPrevious)); - Result := (ResultHasPrevious <> 0); + inherited; end; - function TLib3MFResourceIterator.GetCurrent(): TLib3MFResource; - var - HResource: TLib3MFHandle; +(************************************************************************************************************************* + Class implementation for SignNode +**************************************************************************************************************************) + + constructor TLib3MFSignNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - Result := nil; - HResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIterator_GetCurrentFunc(FHandle, HResource)); - if Assigned(HResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + inherited Create(AWrapper, AHandle); end; - function TLib3MFResourceIterator.Clone(): TLib3MFResourceIterator; - var - HOutResourceIterator: TLib3MFHandle; + destructor TLib3MFSignNode.Destroy; begin - Result := nil; - HOutResourceIterator := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIterator_CloneFunc(FHandle, HOutResourceIterator)); - if Assigned(HOutResourceIterator) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HOutResourceIterator); + inherited; end; - function TLib3MFResourceIterator.Count(): QWord; +(************************************************************************************************************************* + Class implementation for FractNode +**************************************************************************************************************************) + + constructor TLib3MFFractNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIterator_CountFunc(FHandle, Result)); + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFFractNode.Destroy; + begin + inherited; end; (************************************************************************************************************************* - Class implementation for SliceStackIterator + Class implementation for AbsNode **************************************************************************************************************************) - constructor TLib3MFSliceStackIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFAbsNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFSliceStackIterator.Destroy; + destructor TLib3MFAbsNode.Destroy; begin inherited; end; - function TLib3MFSliceStackIterator.GetCurrentSliceStack(): TLib3MFSliceStack; - var - HResource: TLib3MFHandle; - begin - Result := nil; - HResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFSliceStackIterator_GetCurrentSliceStackFunc(FHandle, HResource)); - if Assigned(HResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); - end; - (************************************************************************************************************************* - Class implementation for ObjectIterator + Class implementation for ExpNode **************************************************************************************************************************) - constructor TLib3MFObjectIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFExpNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFObjectIterator.Destroy; + destructor TLib3MFExpNode.Destroy; begin inherited; end; - function TLib3MFObjectIterator.GetCurrentObject(): TLib3MFObject; - var - HResource: TLib3MFHandle; - begin - Result := nil; - HResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFObjectIterator_GetCurrentObjectFunc(FHandle, HResource)); - if Assigned(HResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); - end; - (************************************************************************************************************************* - Class implementation for MeshObjectIterator + Class implementation for LogNode **************************************************************************************************************************) - constructor TLib3MFMeshObjectIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFLogNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFMeshObjectIterator.Destroy; + destructor TLib3MFLogNode.Destroy; begin inherited; end; - function TLib3MFMeshObjectIterator.GetCurrentMeshObject(): TLib3MFMeshObject; - var - HResource: TLib3MFHandle; - begin - Result := nil; - HResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObjectIterator_GetCurrentMeshObjectFunc(FHandle, HResource)); - if Assigned(HResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); - end; - (************************************************************************************************************************* - Class implementation for ComponentsObjectIterator + Class implementation for Log2Node **************************************************************************************************************************) - constructor TLib3MFComponentsObjectIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFLog2Node.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFComponentsObjectIterator.Destroy; + destructor TLib3MFLog2Node.Destroy; begin inherited; end; - function TLib3MFComponentsObjectIterator.GetCurrentComponentsObject(): TLib3MFComponentsObject; - var - HResource: TLib3MFHandle; +(************************************************************************************************************************* + Class implementation for Log10Node +**************************************************************************************************************************) + + constructor TLib3MFLog10Node.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - Result := nil; - HResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFComponentsObjectIterator_GetCurrentComponentsObjectFunc(FHandle, HResource)); - if Assigned(HResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFLog10Node.Destroy; + begin + inherited; end; (************************************************************************************************************************* - Class implementation for Texture2DIterator + Class implementation for LengthNode **************************************************************************************************************************) - constructor TLib3MFTexture2DIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFLengthNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFTexture2DIterator.Destroy; + destructor TLib3MFLengthNode.Destroy; begin inherited; end; - function TLib3MFTexture2DIterator.GetCurrentTexture2D(): TLib3MFTexture2D; - var - HResource: TLib3MFHandle; +(************************************************************************************************************************* + Class implementation for TransposeNode +**************************************************************************************************************************) + + constructor TLib3MFTransposeNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - Result := nil; - HResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DIterator_GetCurrentTexture2DFunc(FHandle, HResource)); - if Assigned(HResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFTransposeNode.Destroy; + begin + inherited; end; (************************************************************************************************************************* - Class implementation for BaseMaterialGroupIterator + Class implementation for InverseNode **************************************************************************************************************************) - constructor TLib3MFBaseMaterialGroupIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFInverseNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFBaseMaterialGroupIterator.Destroy; + destructor TLib3MFInverseNode.Destroy; begin inherited; end; - function TLib3MFBaseMaterialGroupIterator.GetCurrentBaseMaterialGroup(): TLib3MFBaseMaterialGroup; - var - HResource: TLib3MFHandle; +(************************************************************************************************************************* + Class implementation for SqrtNode +**************************************************************************************************************************) + + constructor TLib3MFSqrtNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - Result := nil; - HResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroupIterator_GetCurrentBaseMaterialGroupFunc(FHandle, HResource)); - if Assigned(HResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFSqrtNode.Destroy; + begin + inherited; end; (************************************************************************************************************************* - Class implementation for ColorGroupIterator + Class implementation for ResourceIdNode **************************************************************************************************************************) - constructor TLib3MFColorGroupIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFResourceIdNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFColorGroupIterator.Destroy; + destructor TLib3MFResourceIdNode.Destroy; begin inherited; end; - function TLib3MFColorGroupIterator.GetCurrentColorGroup(): TLib3MFColorGroup; + procedure TLib3MFResourceIdNode.SetResource(const AResource: TLib3MFResource); + var + AResourceHandle: TLib3MFHandle; + begin + if Assigned(AResource) then + AResourceHandle := AResource.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AResource is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIdNode_SetResourceFunc(FHandle, AResourceHandle)); + end; + + function TLib3MFResourceIdNode.GetResource(): TLib3MFResource; var HResource: TLib3MFHandle; begin Result := nil; HResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroupIterator_GetCurrentColorGroupFunc(FHandle, HResource)); + FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIdNode_GetResourceFunc(FHandle, HResource)); if Assigned(HResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + end; + + function TLib3MFResourceIdNode.GetOutputValue(): TLib3MFImplicitPort; + var + HValue: TLib3MFHandle; + begin + Result := nil; + HValue := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFResourceIdNode_GetOutputValueFunc(FHandle, HValue)); + if Assigned(HValue) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HValue); end; (************************************************************************************************************************* - Class implementation for Texture2DGroupIterator + Class implementation for TwoInputNode **************************************************************************************************************************) - constructor TLib3MFTexture2DGroupIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFTwoInputNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFTexture2DGroupIterator.Destroy; + destructor TLib3MFTwoInputNode.Destroy; begin inherited; end; - function TLib3MFTexture2DGroupIterator.GetCurrentTexture2DGroup(): TLib3MFTexture2DGroup; + function TLib3MFTwoInputNode.GetInputB(): TLib3MFImplicitPort; var - HResource: TLib3MFHandle; + HB: TLib3MFHandle; begin Result := nil; - HResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupFunc(FHandle, HResource)); - if Assigned(HResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + HB := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFTwoInputNode_GetInputBFunc(FHandle, HB)); + if Assigned(HB) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HB); end; (************************************************************************************************************************* - Class implementation for CompositeMaterialsIterator + Class implementation for AdditionNode **************************************************************************************************************************) - constructor TLib3MFCompositeMaterialsIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFAdditionNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFCompositeMaterialsIterator.Destroy; + destructor TLib3MFAdditionNode.Destroy; begin inherited; end; - function TLib3MFCompositeMaterialsIterator.GetCurrentCompositeMaterials(): TLib3MFCompositeMaterials; - var - HResource: TLib3MFHandle; - begin - Result := nil; - HResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsFunc(FHandle, HResource)); - if Assigned(HResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); - end; - (************************************************************************************************************************* - Class implementation for MultiPropertyGroupIterator + Class implementation for SubtractionNode **************************************************************************************************************************) - constructor TLib3MFMultiPropertyGroupIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFSubtractionNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFMultiPropertyGroupIterator.Destroy; + destructor TLib3MFSubtractionNode.Destroy; begin inherited; end; - function TLib3MFMultiPropertyGroupIterator.GetCurrentMultiPropertyGroup(): TLib3MFMultiPropertyGroup; - var - HResource: TLib3MFHandle; +(************************************************************************************************************************* + Class implementation for MultiplicationNode +**************************************************************************************************************************) + + constructor TLib3MFMultiplicationNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - Result := nil; - HResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupFunc(FHandle, HResource)); - if Assigned(HResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResource); + inherited Create(AWrapper, AHandle); + end; + + destructor TLib3MFMultiplicationNode.Destroy; + begin + inherited; end; (************************************************************************************************************************* - Class implementation for MetaData + Class implementation for DivisionNode **************************************************************************************************************************) - constructor TLib3MFMetaData.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFDivisionNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFMetaData.Destroy; + destructor TLib3MFDivisionNode.Destroy; begin inherited; end; - function TLib3MFMetaData.GetNameSpace(): String; - var - bytesNeededNameSpace: Cardinal; - bytesWrittenNameSpace: Cardinal; - bufferNameSpace: array of Char; - begin - bytesNeededNameSpace:= 0; - bytesWrittenNameSpace:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetNameSpaceFunc(FHandle, 0, bytesNeededNameSpace, nil)); - SetLength(bufferNameSpace, bytesNeededNameSpace); - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetNameSpaceFunc(FHandle, bytesNeededNameSpace, bytesWrittenNameSpace, @bufferNameSpace[0])); - Result := StrPas(@bufferNameSpace[0]); - end; +(************************************************************************************************************************* + Class implementation for DotNode +**************************************************************************************************************************) - procedure TLib3MFMetaData.SetNameSpace(const ANameSpace: String); + constructor TLib3MFDotNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_SetNameSpaceFunc(FHandle, PAnsiChar(ANameSpace))); + inherited Create(AWrapper, AHandle); end; - function TLib3MFMetaData.GetName(): String; - var - bytesNeededName: Cardinal; - bytesWrittenName: Cardinal; - bufferName: array of Char; + destructor TLib3MFDotNode.Destroy; begin - bytesNeededName:= 0; - bytesWrittenName:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetNameFunc(FHandle, 0, bytesNeededName, nil)); - SetLength(bufferName, bytesNeededName); - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetNameFunc(FHandle, bytesNeededName, bytesWrittenName, @bufferName[0])); - Result := StrPas(@bufferName[0]); + inherited; end; - procedure TLib3MFMetaData.SetName(const AName: String); +(************************************************************************************************************************* + Class implementation for CrossNode +**************************************************************************************************************************) + + constructor TLib3MFCrossNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_SetNameFunc(FHandle, PAnsiChar(AName))); + inherited Create(AWrapper, AHandle); end; - function TLib3MFMetaData.GetKey(): String; - var - bytesNeededKey: Cardinal; - bytesWrittenKey: Cardinal; - bufferKey: array of Char; + destructor TLib3MFCrossNode.Destroy; begin - bytesNeededKey:= 0; - bytesWrittenKey:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetKeyFunc(FHandle, 0, bytesNeededKey, nil)); - SetLength(bufferKey, bytesNeededKey); - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetKeyFunc(FHandle, bytesNeededKey, bytesWrittenKey, @bufferKey[0])); - Result := StrPas(@bufferKey[0]); + inherited; end; - function TLib3MFMetaData.GetMustPreserve(): Boolean; - var - ResultMustPreserve: Byte; +(************************************************************************************************************************* + Class implementation for ArcTan2Node +**************************************************************************************************************************) + + constructor TLib3MFArcTan2Node.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - ResultMustPreserve := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetMustPreserveFunc(FHandle, ResultMustPreserve)); - Result := (ResultMustPreserve <> 0); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFMetaData.SetMustPreserve(const AMustPreserve: Boolean); + destructor TLib3MFArcTan2Node.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_SetMustPreserveFunc(FHandle, Ord(AMustPreserve))); + inherited; end; - function TLib3MFMetaData.GetType(): String; - var - bytesNeededType: Cardinal; - bytesWrittenType: Cardinal; - bufferType: array of Char; +(************************************************************************************************************************* + Class implementation for MatVecMultiplicationNode +**************************************************************************************************************************) + + constructor TLib3MFMatVecMultiplicationNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - bytesNeededType:= 0; - bytesWrittenType:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetTypeFunc(FHandle, 0, bytesNeededType, nil)); - SetLength(bufferType, bytesNeededType); - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetTypeFunc(FHandle, bytesNeededType, bytesWrittenType, @bufferType[0])); - Result := StrPas(@bufferType[0]); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFMetaData.SetType(const AType: String); + destructor TLib3MFMatVecMultiplicationNode.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_SetTypeFunc(FHandle, PAnsiChar(AType))); + inherited; end; - function TLib3MFMetaData.GetValue(): String; - var - bytesNeededValue: Cardinal; - bytesWrittenValue: Cardinal; - bufferValue: array of Char; +(************************************************************************************************************************* + Class implementation for MinNode +**************************************************************************************************************************) + + constructor TLib3MFMinNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - bytesNeededValue:= 0; - bytesWrittenValue:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetValueFunc(FHandle, 0, bytesNeededValue, nil)); - SetLength(bufferValue, bytesNeededValue); - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_GetValueFunc(FHandle, bytesNeededValue, bytesWrittenValue, @bufferValue[0])); - Result := StrPas(@bufferValue[0]); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFMetaData.SetValue(const AValue: String); + destructor TLib3MFMinNode.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaData_SetValueFunc(FHandle, PAnsiChar(AValue))); + inherited; end; (************************************************************************************************************************* - Class implementation for MetaDataGroup + Class implementation for MaxNode **************************************************************************************************************************) - constructor TLib3MFMetaDataGroup.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFMaxNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFMetaDataGroup.Destroy; + destructor TLib3MFMaxNode.Destroy; begin inherited; end; - function TLib3MFMetaDataGroup.GetMetaDataCount(): Cardinal; +(************************************************************************************************************************* + Class implementation for FmodNode +**************************************************************************************************************************) + + constructor TLib3MFFmodNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_GetMetaDataCountFunc(FHandle, Result)); + inherited Create(AWrapper, AHandle); end; - function TLib3MFMetaDataGroup.GetMetaData(const AIndex: Cardinal): TLib3MFMetaData; - var - HMetaData: TLib3MFHandle; + destructor TLib3MFFmodNode.Destroy; begin - Result := nil; - HMetaData := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_GetMetaDataFunc(FHandle, AIndex, HMetaData)); - if Assigned(HMetaData) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMetaData); + inherited; end; - function TLib3MFMetaDataGroup.GetMetaDataByKey(const ANameSpace: String; const AName: String): TLib3MFMetaData; - var - HMetaData: TLib3MFHandle; +(************************************************************************************************************************* + Class implementation for ModNode +**************************************************************************************************************************) + + constructor TLib3MFModNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - Result := nil; - HMetaData := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_GetMetaDataByKeyFunc(FHandle, PAnsiChar(ANameSpace), PAnsiChar(AName), HMetaData)); - if Assigned(HMetaData) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMetaData); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFMetaDataGroup.RemoveMetaDataByIndex(const AIndex: Cardinal); + destructor TLib3MFModNode.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_RemoveMetaDataByIndexFunc(FHandle, AIndex)); + inherited; end; - procedure TLib3MFMetaDataGroup.RemoveMetaData(const ATheMetaData: TLib3MFMetaData); - var - ATheMetaDataHandle: TLib3MFHandle; +(************************************************************************************************************************* + Class implementation for PowNode +**************************************************************************************************************************) + + constructor TLib3MFPowNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - if Assigned(ATheMetaData) then - ATheMetaDataHandle := ATheMetaData.TheHandle - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheMetaData is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_RemoveMetaDataFunc(FHandle, ATheMetaDataHandle)); + inherited Create(AWrapper, AHandle); end; - function TLib3MFMetaDataGroup.AddMetaData(const ANameSpace: String; const AName: String; const AValue: String; const AType: String; const AMustPreserve: Boolean): TLib3MFMetaData; - var - HMetaData: TLib3MFHandle; + destructor TLib3MFPowNode.Destroy; begin - Result := nil; - HMetaData := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFMetaDataGroup_AddMetaDataFunc(FHandle, PAnsiChar(ANameSpace), PAnsiChar(AName), PAnsiChar(AValue), PAnsiChar(AType), Ord(AMustPreserve), HMetaData)); - if Assigned(HMetaData) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMetaData); + inherited; end; (************************************************************************************************************************* - Class implementation for Object + Class implementation for SelectNode **************************************************************************************************************************) - constructor TLib3MFObject.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFSelectNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFObject.Destroy; + destructor TLib3MFSelectNode.Destroy; begin inherited; end; - function TLib3MFObject.GetType(): TLib3MFObjectType; + function TLib3MFSelectNode.GetInputB(): TLib3MFImplicitPort; var - ResultObjectType: Integer; + HB: TLib3MFHandle; begin - ResultObjectType := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetTypeFunc(FHandle, ResultObjectType)); - Result := convertConstToObjectType(ResultObjectType); + Result := nil; + HB := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFSelectNode_GetInputBFunc(FHandle, HB)); + if Assigned(HB) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HB); end; - procedure TLib3MFObject.SetType(const AObjectType: TLib3MFObjectType); + function TLib3MFSelectNode.GetInputC(): TLib3MFImplicitPort; + var + HC: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetTypeFunc(FHandle, convertObjectTypeToConst(AObjectType))); + Result := nil; + HC := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFSelectNode_GetInputCFunc(FHandle, HC)); + if Assigned(HC) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HC); end; - function TLib3MFObject.GetName(): String; + function TLib3MFSelectNode.GetInputD(): TLib3MFImplicitPort; var - bytesNeededName: Cardinal; - bytesWrittenName: Cardinal; - bufferName: array of Char; + HD: TLib3MFHandle; begin - bytesNeededName:= 0; - bytesWrittenName:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetNameFunc(FHandle, 0, bytesNeededName, nil)); - SetLength(bufferName, bytesNeededName); - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetNameFunc(FHandle, bytesNeededName, bytesWrittenName, @bufferName[0])); - Result := StrPas(@bufferName[0]); + Result := nil; + HD := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFSelectNode_GetInputDFunc(FHandle, HD)); + if Assigned(HD) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HD); end; - procedure TLib3MFObject.SetName(const AName: String); - begin - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetNameFunc(FHandle, PAnsiChar(AName))); - end; +(************************************************************************************************************************* + Class implementation for ClampNode +**************************************************************************************************************************) - function TLib3MFObject.GetPartNumber(): String; - var - bytesNeededPartNumber: Cardinal; - bytesWrittenPartNumber: Cardinal; - bufferPartNumber: array of Char; + constructor TLib3MFClampNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - bytesNeededPartNumber:= 0; - bytesWrittenPartNumber:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetPartNumberFunc(FHandle, 0, bytesNeededPartNumber, nil)); - SetLength(bufferPartNumber, bytesNeededPartNumber); - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetPartNumberFunc(FHandle, bytesNeededPartNumber, bytesWrittenPartNumber, @bufferPartNumber[0])); - Result := StrPas(@bufferPartNumber[0]); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFObject.SetPartNumber(const APartNumber: String); + destructor TLib3MFClampNode.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetPartNumberFunc(FHandle, PAnsiChar(APartNumber))); + inherited; end; - function TLib3MFObject.IsMeshObject(): Boolean; + function TLib3MFClampNode.GetInputMin(): TLib3MFImplicitPort; var - ResultIsMeshObject: Byte; + HMin: TLib3MFHandle; begin - ResultIsMeshObject := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_IsMeshObjectFunc(FHandle, ResultIsMeshObject)); - Result := (ResultIsMeshObject <> 0); + Result := nil; + HMin := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFClampNode_GetInputMinFunc(FHandle, HMin)); + if Assigned(HMin) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMin); end; - function TLib3MFObject.IsComponentsObject(): Boolean; + function TLib3MFClampNode.GetInputMax(): TLib3MFImplicitPort; var - ResultIsComponentsObject: Byte; + HMax: TLib3MFHandle; begin - ResultIsComponentsObject := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_IsComponentsObjectFunc(FHandle, ResultIsComponentsObject)); - Result := (ResultIsComponentsObject <> 0); + Result := nil; + HMax := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFClampNode_GetInputMaxFunc(FHandle, HMax)); + if Assigned(HMax) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMax); end; - function TLib3MFObject.IsValid(): Boolean; - var - ResultIsValid: Byte; +(************************************************************************************************************************* + Class implementation for ComposeVectorNode +**************************************************************************************************************************) + + constructor TLib3MFComposeVectorNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - ResultIsValid := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_IsValidFunc(FHandle, ResultIsValid)); - Result := (ResultIsValid <> 0); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFObject.SetAttachmentAsThumbnail(const AAttachment: TLib3MFAttachment); - var - AAttachmentHandle: TLib3MFHandle; + destructor TLib3MFComposeVectorNode.Destroy; begin - if Assigned(AAttachment) then - AAttachmentHandle := AAttachment.TheHandle - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AAttachment is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetAttachmentAsThumbnailFunc(FHandle, AAttachmentHandle)); + inherited; end; - function TLib3MFObject.GetThumbnailAttachment(): TLib3MFAttachment; + function TLib3MFComposeVectorNode.GetInputX(): TLib3MFImplicitPort; var - HAttachment: TLib3MFHandle; + HX: TLib3MFHandle; begin Result := nil; - HAttachment := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetThumbnailAttachmentFunc(FHandle, HAttachment)); - if Assigned(HAttachment) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HAttachment); + HX := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeVectorNode_GetInputXFunc(FHandle, HX)); + if Assigned(HX) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HX); end; - procedure TLib3MFObject.ClearThumbnailAttachment(); + function TLib3MFComposeVectorNode.GetInputY(): TLib3MFImplicitPort; + var + HY: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_ClearThumbnailAttachmentFunc(FHandle)); + Result := nil; + HY := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeVectorNode_GetInputYFunc(FHandle, HY)); + if Assigned(HY) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HY); end; - function TLib3MFObject.GetOutbox(): TLib3MFBox; + function TLib3MFComposeVectorNode.GetInputZ(): TLib3MFImplicitPort; + var + HZ: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetOutboxFunc(FHandle, @Result)); + Result := nil; + HZ := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeVectorNode_GetInputZFunc(FHandle, HZ)); + if Assigned(HZ) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HZ); end; - function TLib3MFObject.GetUUID(out AHasUUID: Boolean): String; + function TLib3MFComposeVectorNode.GetOutputResult(): TLib3MFImplicitPort; var - ResultHasUUID: Byte; - bytesNeededUUID: Cardinal; - bytesWrittenUUID: Cardinal; - bufferUUID: array of Char; + HResult: TLib3MFHandle; begin - ResultHasUUID := 0; - bytesNeededUUID:= 0; - bytesWrittenUUID:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetUUIDFunc(FHandle, ResultHasUUID, 0, bytesNeededUUID, nil)); - SetLength(bufferUUID, bytesNeededUUID); - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetUUIDFunc(FHandle, ResultHasUUID, bytesNeededUUID, bytesWrittenUUID, @bufferUUID[0])); - AHasUUID := ResultHasUUID <> 0; - Result := StrPas(@bufferUUID[0]); + Result := nil; + HResult := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeVectorNode_GetOutputResultFunc(FHandle, HResult)); + if Assigned(HResult) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResult); end; - procedure TLib3MFObject.SetUUID(const AUUID: String); +(************************************************************************************************************************* + Class implementation for VectorFromScalarNode +**************************************************************************************************************************) + + constructor TLib3MFVectorFromScalarNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetUUIDFunc(FHandle, PAnsiChar(AUUID))); + inherited Create(AWrapper, AHandle); end; - function TLib3MFObject.GetMetaDataGroup(): TLib3MFMetaDataGroup; - var - HMetaDataGroup: TLib3MFHandle; + destructor TLib3MFVectorFromScalarNode.Destroy; begin - Result := nil; - HMetaDataGroup := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetMetaDataGroupFunc(FHandle, HMetaDataGroup)); - if Assigned(HMetaDataGroup) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMetaDataGroup); + inherited; end; - procedure TLib3MFObject.SetSlicesMeshResolution(const AMeshResolution: TLib3MFSlicesMeshResolution); +(************************************************************************************************************************* + Class implementation for DecomposeVectorNode +**************************************************************************************************************************) + + constructor TLib3MFDecomposeVectorNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_SetSlicesMeshResolutionFunc(FHandle, convertSlicesMeshResolutionToConst(AMeshResolution))); + inherited Create(AWrapper, AHandle); end; - function TLib3MFObject.GetSlicesMeshResolution(): TLib3MFSlicesMeshResolution; - var - ResultMeshResolution: Integer; + destructor TLib3MFDecomposeVectorNode.Destroy; begin - ResultMeshResolution := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetSlicesMeshResolutionFunc(FHandle, ResultMeshResolution)); - Result := convertConstToSlicesMeshResolution(ResultMeshResolution); + inherited; end; - function TLib3MFObject.HasSlices(const ARecursive: Boolean): Boolean; + function TLib3MFDecomposeVectorNode.GetInputA(): TLib3MFImplicitPort; var - ResultHasSlices: Byte; + HA: TLib3MFHandle; begin - ResultHasSlices := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_HasSlicesFunc(FHandle, Ord(ARecursive), ResultHasSlices)); - Result := (ResultHasSlices <> 0); + Result := nil; + HA := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFDecomposeVectorNode_GetInputAFunc(FHandle, HA)); + if Assigned(HA) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HA); end; - procedure TLib3MFObject.ClearSliceStack(); + function TLib3MFDecomposeVectorNode.GetOutputX(): TLib3MFImplicitPort; + var + HX: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_ClearSliceStackFunc(FHandle)); + Result := nil; + HX := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFDecomposeVectorNode_GetOutputXFunc(FHandle, HX)); + if Assigned(HX) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HX); end; - function TLib3MFObject.GetSliceStack(): TLib3MFSliceStack; + function TLib3MFDecomposeVectorNode.GetOutputY(): TLib3MFImplicitPort; var - HSliceStackInstance: TLib3MFHandle; + HY: TLib3MFHandle; begin Result := nil; - HSliceStackInstance := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_GetSliceStackFunc(FHandle, HSliceStackInstance)); - if Assigned(HSliceStackInstance) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HSliceStackInstance); + HY := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFDecomposeVectorNode_GetOutputYFunc(FHandle, HY)); + if Assigned(HY) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HY); end; - procedure TLib3MFObject.AssignSliceStack(const ASliceStackInstance: TLib3MFSliceStack); + function TLib3MFDecomposeVectorNode.GetOutputZ(): TLib3MFImplicitPort; var - ASliceStackInstanceHandle: TLib3MFHandle; + HZ: TLib3MFHandle; begin - if Assigned(ASliceStackInstance) then - ASliceStackInstanceHandle := ASliceStackInstance.TheHandle - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ASliceStackInstance is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFObject_AssignSliceStackFunc(FHandle, ASliceStackInstanceHandle)); + Result := nil; + HZ := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFDecomposeVectorNode_GetOutputZFunc(FHandle, HZ)); + if Assigned(HZ) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HZ); end; (************************************************************************************************************************* - Class implementation for MeshObject + Class implementation for ComposeMatrixNode **************************************************************************************************************************) - constructor TLib3MFMeshObject.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFComposeMatrixNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFMeshObject.Destroy; + destructor TLib3MFComposeMatrixNode.Destroy; begin inherited; end; - function TLib3MFMeshObject.GetVertexCount(): Cardinal; - begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetVertexCountFunc(FHandle, Result)); - end; - - function TLib3MFMeshObject.GetTriangleCount(): Cardinal; - begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetTriangleCountFunc(FHandle, Result)); - end; - - function TLib3MFMeshObject.GetVertex(const AIndex: Cardinal): TLib3MFPosition; - begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetVertexFunc(FHandle, AIndex, @Result)); - end; - - procedure TLib3MFMeshObject.SetVertex(const AIndex: Cardinal; const ACoordinates: TLib3MFPosition); + function TLib3MFComposeMatrixNode.GetInputM00(): TLib3MFImplicitPort; + var + HM00: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetVertexFunc(FHandle, AIndex, @ACoordinates)); + Result := nil; + HM00 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM00Func(FHandle, HM00)); + if Assigned(HM00) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM00); end; - function TLib3MFMeshObject.AddVertex(const ACoordinates: TLib3MFPosition): Cardinal; + function TLib3MFComposeMatrixNode.GetInputM01(): TLib3MFImplicitPort; + var + HM01: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_AddVertexFunc(FHandle, @ACoordinates, Result)); + Result := nil; + HM01 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM01Func(FHandle, HM01)); + if Assigned(HM01) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM01); end; - procedure TLib3MFMeshObject.GetVertices(out AVertices: ArrayOfLib3MFPosition); + function TLib3MFComposeMatrixNode.GetInputM02(): TLib3MFImplicitPort; var - countNeededVertices: QWord; - countWrittenVertices: QWord; + HM02: TLib3MFHandle; begin - countNeededVertices:= 0; - countWrittenVertices:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetVerticesFunc(FHandle, 0, countNeededVertices, nil)); - SetLength(AVertices, countNeededVertices); - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetVerticesFunc(FHandle, countNeededVertices, countWrittenVertices, @AVertices[0])); + Result := nil; + HM02 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM02Func(FHandle, HM02)); + if Assigned(HM02) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM02); end; - function TLib3MFMeshObject.GetTriangle(const AIndex: Cardinal): TLib3MFTriangle; + function TLib3MFComposeMatrixNode.GetInputM03(): TLib3MFImplicitPort; + var + HM03: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetTriangleFunc(FHandle, AIndex, @Result)); + Result := nil; + HM03 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM03Func(FHandle, HM03)); + if Assigned(HM03) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM03); end; - procedure TLib3MFMeshObject.SetTriangle(const AIndex: Cardinal; const AIndices: TLib3MFTriangle); + function TLib3MFComposeMatrixNode.GetInputM10(): TLib3MFImplicitPort; + var + HM10: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetTriangleFunc(FHandle, AIndex, @AIndices)); + Result := nil; + HM10 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM10Func(FHandle, HM10)); + if Assigned(HM10) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM10); end; - function TLib3MFMeshObject.AddTriangle(const AIndices: TLib3MFTriangle): Cardinal; + function TLib3MFComposeMatrixNode.GetInputM11(): TLib3MFImplicitPort; + var + HM11: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_AddTriangleFunc(FHandle, @AIndices, Result)); + Result := nil; + HM11 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM11Func(FHandle, HM11)); + if Assigned(HM11) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM11); end; - procedure TLib3MFMeshObject.GetTriangleIndices(out AIndices: ArrayOfLib3MFTriangle); + function TLib3MFComposeMatrixNode.GetInputM12(): TLib3MFImplicitPort; var - countNeededIndices: QWord; - countWrittenIndices: QWord; + HM12: TLib3MFHandle; begin - countNeededIndices:= 0; - countWrittenIndices:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetTriangleIndicesFunc(FHandle, 0, countNeededIndices, nil)); - SetLength(AIndices, countNeededIndices); - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetTriangleIndicesFunc(FHandle, countNeededIndices, countWrittenIndices, @AIndices[0])); + Result := nil; + HM12 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM12Func(FHandle, HM12)); + if Assigned(HM12) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM12); end; - procedure TLib3MFMeshObject.SetObjectLevelProperty(const AUniqueResourceID: Cardinal; const APropertyID: Cardinal); + function TLib3MFComposeMatrixNode.GetInputM13(): TLib3MFImplicitPort; + var + HM13: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetObjectLevelPropertyFunc(FHandle, AUniqueResourceID, APropertyID)); + Result := nil; + HM13 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM13Func(FHandle, HM13)); + if Assigned(HM13) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM13); end; - function TLib3MFMeshObject.GetObjectLevelProperty(out AUniqueResourceID: Cardinal; out APropertyID: Cardinal): Boolean; + function TLib3MFComposeMatrixNode.GetInputM20(): TLib3MFImplicitPort; var - ResultHasObjectLevelProperty: Byte; + HM20: TLib3MFHandle; begin - ResultHasObjectLevelProperty := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetObjectLevelPropertyFunc(FHandle, AUniqueResourceID, APropertyID, ResultHasObjectLevelProperty)); - Result := (ResultHasObjectLevelProperty <> 0); + Result := nil; + HM20 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM20Func(FHandle, HM20)); + if Assigned(HM20) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM20); end; - procedure TLib3MFMeshObject.SetTriangleProperties(const AIndex: Cardinal; const AProperties: TLib3MFTriangleProperties); + function TLib3MFComposeMatrixNode.GetInputM21(): TLib3MFImplicitPort; + var + HM21: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetTrianglePropertiesFunc(FHandle, AIndex, @AProperties)); + Result := nil; + HM21 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM21Func(FHandle, HM21)); + if Assigned(HM21) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM21); end; - procedure TLib3MFMeshObject.GetTriangleProperties(const AIndex: Cardinal; out AProperty: TLib3MFTriangleProperties); + function TLib3MFComposeMatrixNode.GetInputM22(): TLib3MFImplicitPort; + var + HM22: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetTrianglePropertiesFunc(FHandle, AIndex, @AProperty)); + Result := nil; + HM22 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM22Func(FHandle, HM22)); + if Assigned(HM22) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM22); end; - procedure TLib3MFMeshObject.SetAllTriangleProperties(const APropertiesArray: ArrayOfLib3MFTriangleProperties); + function TLib3MFComposeMatrixNode.GetInputM23(): TLib3MFImplicitPort; var - PtrPropertiesArray: PLib3MFTriangleProperties; - LenPropertiesArray: QWord; + HM23: TLib3MFHandle; begin - LenPropertiesArray := Length(APropertiesArray); - if LenPropertiesArray > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenPropertiesArray > 0 then - PtrPropertiesArray := @APropertiesArray[0] - else - PtrPropertiesArray := nil; - - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetAllTrianglePropertiesFunc(FHandle, QWord(LenPropertiesArray), PtrPropertiesArray)); + Result := nil; + HM23 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM23Func(FHandle, HM23)); + if Assigned(HM23) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM23); end; - procedure TLib3MFMeshObject.GetAllTriangleProperties(out APropertiesArray: ArrayOfLib3MFTriangleProperties); + function TLib3MFComposeMatrixNode.GetInputM30(): TLib3MFImplicitPort; var - countNeededPropertiesArray: QWord; - countWrittenPropertiesArray: QWord; + HM30: TLib3MFHandle; begin - countNeededPropertiesArray:= 0; - countWrittenPropertiesArray:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetAllTrianglePropertiesFunc(FHandle, 0, countNeededPropertiesArray, nil)); - SetLength(APropertiesArray, countNeededPropertiesArray); - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_GetAllTrianglePropertiesFunc(FHandle, countNeededPropertiesArray, countWrittenPropertiesArray, @APropertiesArray[0])); + Result := nil; + HM30 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM30Func(FHandle, HM30)); + if Assigned(HM30) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM30); end; - procedure TLib3MFMeshObject.ClearAllProperties(); + function TLib3MFComposeMatrixNode.GetInputM31(): TLib3MFImplicitPort; + var + HM31: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_ClearAllPropertiesFunc(FHandle)); + Result := nil; + HM31 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM31Func(FHandle, HM31)); + if Assigned(HM31) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM31); end; - procedure TLib3MFMeshObject.SetGeometry(const AVertices: ArrayOfLib3MFPosition; const AIndices: ArrayOfLib3MFTriangle); + function TLib3MFComposeMatrixNode.GetInputM32(): TLib3MFImplicitPort; var - PtrVertices: PLib3MFPosition; - LenVertices: QWord; - PtrIndices: PLib3MFTriangle; - LenIndices: QWord; + HM32: TLib3MFHandle; begin - LenVertices := Length(AVertices); - if LenVertices > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenVertices > 0 then - PtrVertices := @AVertices[0] - else - PtrVertices := nil; - - LenIndices := Length(AIndices); - if LenIndices > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenIndices > 0 then - PtrIndices := @AIndices[0] - else - PtrIndices := nil; - - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_SetGeometryFunc(FHandle, QWord(LenVertices), PtrVertices, QWord(LenIndices), PtrIndices)); + Result := nil; + HM32 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM32Func(FHandle, HM32)); + if Assigned(HM32) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM32); end; - function TLib3MFMeshObject.IsManifoldAndOriented(): Boolean; + function TLib3MFComposeMatrixNode.GetInputM33(): TLib3MFImplicitPort; var - ResultIsManifoldAndOriented: Byte; + HM33: TLib3MFHandle; begin - ResultIsManifoldAndOriented := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_IsManifoldAndOrientedFunc(FHandle, ResultIsManifoldAndOriented)); - Result := (ResultIsManifoldAndOriented <> 0); + Result := nil; + HM33 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetInputM33Func(FHandle, HM33)); + if Assigned(HM33) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HM33); end; - function TLib3MFMeshObject.BeamLattice(): TLib3MFBeamLattice; + function TLib3MFComposeMatrixNode.GetOutputResult(): TLib3MFImplicitPort; var - HTheBeamLattice: TLib3MFHandle; + HResult: TLib3MFHandle; begin Result := nil; - HTheBeamLattice := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFMeshObject_BeamLatticeFunc(FHandle, HTheBeamLattice)); - if Assigned(HTheBeamLattice) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheBeamLattice); + HResult := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFComposeMatrixNode_GetOutputResultFunc(FHandle, HResult)); + if Assigned(HResult) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResult); end; (************************************************************************************************************************* - Class implementation for BeamLattice + Class implementation for MatrixFromRowsNode **************************************************************************************************************************) - constructor TLib3MFBeamLattice.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFMatrixFromRowsNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFBeamLattice.Destroy; + destructor TLib3MFMatrixFromRowsNode.Destroy; begin inherited; end; - function TLib3MFBeamLattice.GetMinLength(): Double; + function TLib3MFMatrixFromRowsNode.GetInputA(): TLib3MFImplicitPort; + var + HRow0: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetMinLengthFunc(FHandle, Result)); + Result := nil; + HRow0 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMatrixFromRowsNode_GetInputAFunc(FHandle, HRow0)); + if Assigned(HRow0) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HRow0); end; - procedure TLib3MFBeamLattice.SetMinLength(const AMinLength: Double); + function TLib3MFMatrixFromRowsNode.GetInputB(): TLib3MFImplicitPort; + var + HRow1: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetMinLengthFunc(FHandle, AMinLength)); + Result := nil; + HRow1 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMatrixFromRowsNode_GetInputBFunc(FHandle, HRow1)); + if Assigned(HRow1) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HRow1); end; - procedure TLib3MFBeamLattice.GetClipping(out AClipMode: TLib3MFBeamLatticeClipMode; out AUniqueResourceID: Cardinal); + function TLib3MFMatrixFromRowsNode.GetInputC(): TLib3MFImplicitPort; var - ResultClipMode: Integer; + HRow2: TLib3MFHandle; begin - ResultClipMode := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetClippingFunc(FHandle, ResultClipMode, AUniqueResourceID)); - AClipMode := convertConstToBeamLatticeClipMode(ResultClipMode); + Result := nil; + HRow2 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMatrixFromRowsNode_GetInputCFunc(FHandle, HRow2)); + if Assigned(HRow2) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HRow2); end; - procedure TLib3MFBeamLattice.SetClipping(const AClipMode: TLib3MFBeamLatticeClipMode; const AUniqueResourceID: Cardinal); + function TLib3MFMatrixFromRowsNode.GetInputD(): TLib3MFImplicitPort; + var + HRow3: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetClippingFunc(FHandle, convertBeamLatticeClipModeToConst(AClipMode), AUniqueResourceID)); + Result := nil; + HRow3 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMatrixFromRowsNode_GetInputDFunc(FHandle, HRow3)); + if Assigned(HRow3) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HRow3); end; - function TLib3MFBeamLattice.GetRepresentation(out AUniqueResourceID: Cardinal): Boolean; + function TLib3MFMatrixFromRowsNode.GetOutputResult(): TLib3MFImplicitPort; var - ResultHasRepresentation: Byte; + HResult: TLib3MFHandle; begin - ResultHasRepresentation := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetRepresentationFunc(FHandle, ResultHasRepresentation, AUniqueResourceID)); - Result := (ResultHasRepresentation <> 0); + Result := nil; + HResult := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMatrixFromRowsNode_GetOutputResultFunc(FHandle, HResult)); + if Assigned(HResult) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResult); end; - procedure TLib3MFBeamLattice.SetRepresentation(const AUniqueResourceID: Cardinal); - begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetRepresentationFunc(FHandle, AUniqueResourceID)); - end; +(************************************************************************************************************************* + Class implementation for MatrixFromColumnsNode +**************************************************************************************************************************) - procedure TLib3MFBeamLattice.GetBallOptions(out ABallMode: TLib3MFBeamLatticeBallMode; out ABallRadius: Double); - var - ResultBallMode: Integer; + constructor TLib3MFMatrixFromColumnsNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - ResultBallMode := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBallOptionsFunc(FHandle, ResultBallMode, ABallRadius)); - ABallMode := convertConstToBeamLatticeBallMode(ResultBallMode); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFBeamLattice.SetBallOptions(const ABallMode: TLib3MFBeamLatticeBallMode; const ABallRadius: Double); + destructor TLib3MFMatrixFromColumnsNode.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetBallOptionsFunc(FHandle, convertBeamLatticeBallModeToConst(ABallMode), ABallRadius)); + inherited; end; - function TLib3MFBeamLattice.GetBeamCount(): Cardinal; + function TLib3MFMatrixFromColumnsNode.GetInputA(): TLib3MFImplicitPort; + var + HColumn0: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamCountFunc(FHandle, Result)); + Result := nil; + HColumn0 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMatrixFromColumnsNode_GetInputAFunc(FHandle, HColumn0)); + if Assigned(HColumn0) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HColumn0); end; - function TLib3MFBeamLattice.GetBeam(const AIndex: Cardinal): TLib3MFBeam; + function TLib3MFMatrixFromColumnsNode.GetInputB(): TLib3MFImplicitPort; + var + HColumn1: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamFunc(FHandle, AIndex, @Result)); + Result := nil; + HColumn1 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMatrixFromColumnsNode_GetInputBFunc(FHandle, HColumn1)); + if Assigned(HColumn1) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HColumn1); end; - function TLib3MFBeamLattice.AddBeam(const ABeamInfo: TLib3MFBeam): Cardinal; + function TLib3MFMatrixFromColumnsNode.GetInputC(): TLib3MFImplicitPort; + var + HColumn2: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_AddBeamFunc(FHandle, @ABeamInfo, Result)); + Result := nil; + HColumn2 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMatrixFromColumnsNode_GetInputCFunc(FHandle, HColumn2)); + if Assigned(HColumn2) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HColumn2); end; - procedure TLib3MFBeamLattice.SetBeam(const AIndex: Cardinal; const ABeamInfo: TLib3MFBeam); + function TLib3MFMatrixFromColumnsNode.GetInputD(): TLib3MFImplicitPort; + var + HColumn3: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetBeamFunc(FHandle, AIndex, @ABeamInfo)); + Result := nil; + HColumn3 := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMatrixFromColumnsNode_GetInputDFunc(FHandle, HColumn3)); + if Assigned(HColumn3) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HColumn3); end; - procedure TLib3MFBeamLattice.SetBeams(const ABeamInfo: ArrayOfLib3MFBeam); + function TLib3MFMatrixFromColumnsNode.GetOutputResult(): TLib3MFImplicitPort; var - PtrBeamInfo: PLib3MFBeam; - LenBeamInfo: QWord; + HResult: TLib3MFHandle; begin - LenBeamInfo := Length(ABeamInfo); - if LenBeamInfo > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenBeamInfo > 0 then - PtrBeamInfo := @ABeamInfo[0] - else - PtrBeamInfo := nil; - - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetBeamsFunc(FHandle, QWord(LenBeamInfo), PtrBeamInfo)); + Result := nil; + HResult := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMatrixFromColumnsNode_GetOutputResultFunc(FHandle, HResult)); + if Assigned(HResult) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResult); end; - procedure TLib3MFBeamLattice.GetBeams(out ABeamInfo: ArrayOfLib3MFBeam); - var - countNeededBeamInfo: QWord; - countWrittenBeamInfo: QWord; +(************************************************************************************************************************* + Class implementation for ConstantNode +**************************************************************************************************************************) + + constructor TLib3MFConstantNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - countNeededBeamInfo:= 0; - countWrittenBeamInfo:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamsFunc(FHandle, 0, countNeededBeamInfo, nil)); - SetLength(ABeamInfo, countNeededBeamInfo); - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamsFunc(FHandle, countNeededBeamInfo, countWrittenBeamInfo, @ABeamInfo[0])); + inherited Create(AWrapper, AHandle); end; - function TLib3MFBeamLattice.GetBallCount(): Cardinal; + destructor TLib3MFConstantNode.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBallCountFunc(FHandle, Result)); + inherited; end; - function TLib3MFBeamLattice.GetBall(const AIndex: Cardinal): TLib3MFBall; + procedure TLib3MFConstantNode.SetConstant(const AValue: Double); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBallFunc(FHandle, AIndex, @Result)); + FWrapper.CheckError(Self, FWrapper.Lib3MFConstantNode_SetConstantFunc(FHandle, AValue)); end; - function TLib3MFBeamLattice.AddBall(const ABallInfo: TLib3MFBall): Cardinal; + function TLib3MFConstantNode.GetConstant(): Double; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_AddBallFunc(FHandle, @ABallInfo, Result)); + FWrapper.CheckError(Self, FWrapper.Lib3MFConstantNode_GetConstantFunc(FHandle, Result)); end; - procedure TLib3MFBeamLattice.SetBall(const AIndex: Cardinal; const ABallInfo: TLib3MFBall); + function TLib3MFConstantNode.GetOutputValue(): TLib3MFImplicitPort; + var + HValue: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetBallFunc(FHandle, AIndex, @ABallInfo)); + Result := nil; + HValue := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFConstantNode_GetOutputValueFunc(FHandle, HValue)); + if Assigned(HValue) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HValue); end; - procedure TLib3MFBeamLattice.SetBalls(const ABallInfo: ArrayOfLib3MFBall); - var - PtrBallInfo: PLib3MFBall; - LenBallInfo: QWord; +(************************************************************************************************************************* + Class implementation for ConstVecNode +**************************************************************************************************************************) + + constructor TLib3MFConstVecNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - LenBallInfo := Length(ABallInfo); - if LenBallInfo > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenBallInfo > 0 then - PtrBallInfo := @ABallInfo[0] - else - PtrBallInfo := nil; - - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_SetBallsFunc(FHandle, QWord(LenBallInfo), PtrBallInfo)); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFBeamLattice.GetBalls(out ABallInfo: ArrayOfLib3MFBall); - var - countNeededBallInfo: QWord; - countWrittenBallInfo: QWord; + destructor TLib3MFConstVecNode.Destroy; begin - countNeededBallInfo:= 0; - countWrittenBallInfo:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBallsFunc(FHandle, 0, countNeededBallInfo, nil)); - SetLength(ABallInfo, countNeededBallInfo); - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBallsFunc(FHandle, countNeededBallInfo, countWrittenBallInfo, @ABallInfo[0])); + inherited; end; - function TLib3MFBeamLattice.GetBeamSetCount(): Cardinal; + procedure TLib3MFConstVecNode.SetVector(const AValue: TLib3MFVector); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamSetCountFunc(FHandle, Result)); + FWrapper.CheckError(Self, FWrapper.Lib3MFConstVecNode_SetVectorFunc(FHandle, @AValue)); end; - function TLib3MFBeamLattice.AddBeamSet(): TLib3MFBeamSet; - var - HBeamSet: TLib3MFHandle; + function TLib3MFConstVecNode.GetVector(): TLib3MFVector; begin - Result := nil; - HBeamSet := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_AddBeamSetFunc(FHandle, HBeamSet)); - if Assigned(HBeamSet) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HBeamSet); + FWrapper.CheckError(Self, FWrapper.Lib3MFConstVecNode_GetVectorFunc(FHandle, @Result)); end; - function TLib3MFBeamLattice.GetBeamSet(const AIndex: Cardinal): TLib3MFBeamSet; + function TLib3MFConstVecNode.GetOutputVector(): TLib3MFImplicitPort; var - HBeamSet: TLib3MFHandle; + HVector: TLib3MFHandle; begin Result := nil; - HBeamSet := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamLattice_GetBeamSetFunc(FHandle, AIndex, HBeamSet)); - if Assigned(HBeamSet) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HBeamSet); + HVector := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFConstVecNode_GetOutputVectorFunc(FHandle, HVector)); + if Assigned(HVector) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HVector); end; (************************************************************************************************************************* - Class implementation for Component + Class implementation for ConstMatNode **************************************************************************************************************************) - constructor TLib3MFComponent.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFConstMatNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFComponent.Destroy; + destructor TLib3MFConstMatNode.Destroy; begin inherited; end; - function TLib3MFComponent.GetObjectResource(): TLib3MFObject; - var - HObjectResource: TLib3MFHandle; + procedure TLib3MFConstMatNode.SetMatrix(const AValue: TLib3MFMatrix4x4); begin - Result := nil; - HObjectResource := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_GetObjectResourceFunc(FHandle, HObjectResource)); - if Assigned(HObjectResource) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HObjectResource); + FWrapper.CheckError(Self, FWrapper.Lib3MFConstMatNode_SetMatrixFunc(FHandle, @AValue)); end; - function TLib3MFComponent.GetObjectResourceID(): Cardinal; + function TLib3MFConstMatNode.GetMatrix(): TLib3MFMatrix4x4; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_GetObjectResourceIDFunc(FHandle, Result)); + FWrapper.CheckError(Self, FWrapper.Lib3MFConstMatNode_GetMatrixFunc(FHandle, @Result)); end; - function TLib3MFComponent.GetUUID(out AHasUUID: Boolean): String; + function TLib3MFConstMatNode.GetOutputMatrix(): TLib3MFImplicitPort; var - ResultHasUUID: Byte; - bytesNeededUUID: Cardinal; - bytesWrittenUUID: Cardinal; - bufferUUID: array of Char; + HMatrix: TLib3MFHandle; + begin + Result := nil; + HMatrix := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFConstMatNode_GetOutputMatrixFunc(FHandle, HMatrix)); + if Assigned(HMatrix) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMatrix); + end; + +(************************************************************************************************************************* + Class implementation for MeshNode +**************************************************************************************************************************) + + constructor TLib3MFMeshNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - ResultHasUUID := 0; - bytesNeededUUID:= 0; - bytesWrittenUUID:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_GetUUIDFunc(FHandle, ResultHasUUID, 0, bytesNeededUUID, nil)); - SetLength(bufferUUID, bytesNeededUUID); - FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_GetUUIDFunc(FHandle, ResultHasUUID, bytesNeededUUID, bytesWrittenUUID, @bufferUUID[0])); - AHasUUID := ResultHasUUID <> 0; - Result := StrPas(@bufferUUID[0]); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFComponent.SetUUID(const AUUID: String); + destructor TLib3MFMeshNode.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_SetUUIDFunc(FHandle, PAnsiChar(AUUID))); + inherited; end; - function TLib3MFComponent.HasTransform(): Boolean; + function TLib3MFMeshNode.GetInputMesh(): TLib3MFImplicitPort; var - ResultHasTransform: Byte; + HMesh: TLib3MFHandle; begin - ResultHasTransform := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_HasTransformFunc(FHandle, ResultHasTransform)); - Result := (ResultHasTransform <> 0); + Result := nil; + HMesh := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshNode_GetInputMeshFunc(FHandle, HMesh)); + if Assigned(HMesh) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMesh); end; - function TLib3MFComponent.GetTransform(): TLib3MFTransform; + function TLib3MFMeshNode.GetInputPos(): TLib3MFImplicitPort; + var + HPos: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_GetTransformFunc(FHandle, @Result)); + Result := nil; + HPos := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshNode_GetInputPosFunc(FHandle, HPos)); + if Assigned(HPos) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPos); end; - procedure TLib3MFComponent.SetTransform(const ATransform: TLib3MFTransform); + function TLib3MFMeshNode.GetOutputDistance(): TLib3MFImplicitPort; + var + HDistance: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFComponent_SetTransformFunc(FHandle, @ATransform)); + Result := nil; + HDistance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFMeshNode_GetOutputDistanceFunc(FHandle, HDistance)); + if Assigned(HDistance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HDistance); end; (************************************************************************************************************************* - Class implementation for ComponentsObject + Class implementation for UnsignedMeshNode **************************************************************************************************************************) - constructor TLib3MFComponentsObject.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFUnsignedMeshNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFComponentsObject.Destroy; + destructor TLib3MFUnsignedMeshNode.Destroy; begin inherited; end; - function TLib3MFComponentsObject.AddComponent(const AObjectResource: TLib3MFObject; const ATransform: TLib3MFTransform): TLib3MFComponent; + function TLib3MFUnsignedMeshNode.GetInputMesh(): TLib3MFImplicitPort; var - AObjectResourceHandle: TLib3MFHandle; - HComponentInstance: TLib3MFHandle; + HMesh: TLib3MFHandle; begin - if Assigned(AObjectResource) then - AObjectResourceHandle := AObjectResource.TheHandle - else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AObjectResource is a nil value.'); Result := nil; - HComponentInstance := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFComponentsObject_AddComponentFunc(FHandle, AObjectResourceHandle, @ATransform, HComponentInstance)); - if Assigned(HComponentInstance) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HComponentInstance); + HMesh := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFUnsignedMeshNode_GetInputMeshFunc(FHandle, HMesh)); + if Assigned(HMesh) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMesh); end; - function TLib3MFComponentsObject.GetComponent(const AIndex: Cardinal): TLib3MFComponent; + function TLib3MFUnsignedMeshNode.GetInputPos(): TLib3MFImplicitPort; var - HComponentInstance: TLib3MFHandle; + HPos: TLib3MFHandle; begin Result := nil; - HComponentInstance := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFComponentsObject_GetComponentFunc(FHandle, AIndex, HComponentInstance)); - if Assigned(HComponentInstance) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HComponentInstance); + HPos := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFUnsignedMeshNode_GetInputPosFunc(FHandle, HPos)); + if Assigned(HPos) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPos); end; - function TLib3MFComponentsObject.GetComponentCount(): Cardinal; + function TLib3MFUnsignedMeshNode.GetOutputDistance(): TLib3MFImplicitPort; + var + HDistance: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFComponentsObject_GetComponentCountFunc(FHandle, Result)); + Result := nil; + HDistance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFUnsignedMeshNode_GetOutputDistanceFunc(FHandle, HDistance)); + if Assigned(HDistance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HDistance); end; (************************************************************************************************************************* - Class implementation for BeamSet + Class implementation for FunctionCallNode **************************************************************************************************************************) - constructor TLib3MFBeamSet.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFFunctionCallNode.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFBeamSet.Destroy; + destructor TLib3MFFunctionCallNode.Destroy; begin inherited; end; - procedure TLib3MFBeamSet.SetName(const AName: String); + function TLib3MFFunctionCallNode.GetInputFunctionID(): TLib3MFImplicitPort; + var + HFunction: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_SetNameFunc(FHandle, PAnsiChar(AName))); + Result := nil; + HFunction := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionCallNode_GetInputFunctionIDFunc(FHandle, HFunction)); + if Assigned(HFunction) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HFunction); end; - function TLib3MFBeamSet.GetName(): String; - var - bytesNeededName: Cardinal; - bytesWrittenName: Cardinal; - bufferName: array of Char; +(************************************************************************************************************************* + Class implementation for NodeIterator +**************************************************************************************************************************) + + constructor TLib3MFNodeIterator.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - bytesNeededName:= 0; - bytesWrittenName:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetNameFunc(FHandle, 0, bytesNeededName, nil)); - SetLength(bufferName, bytesNeededName); - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetNameFunc(FHandle, bytesNeededName, bytesWrittenName, @bufferName[0])); - Result := StrPas(@bufferName[0]); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFBeamSet.SetIdentifier(const AIdentifier: String); + destructor TLib3MFNodeIterator.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_SetIdentifierFunc(FHandle, PAnsiChar(AIdentifier))); + inherited; end; - function TLib3MFBeamSet.GetIdentifier(): String; + function TLib3MFNodeIterator.GetCurrent(): TLib3MFImplicitNode; var - bytesNeededIdentifier: Cardinal; - bytesWrittenIdentifier: Cardinal; - bufferIdentifier: array of Char; + HNode: TLib3MFHandle; begin - bytesNeededIdentifier:= 0; - bytesWrittenIdentifier:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetIdentifierFunc(FHandle, 0, bytesNeededIdentifier, nil)); - SetLength(bufferIdentifier, bytesNeededIdentifier); - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetIdentifierFunc(FHandle, bytesNeededIdentifier, bytesWrittenIdentifier, @bufferIdentifier[0])); - Result := StrPas(@bufferIdentifier[0]); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFNodeIterator_GetCurrentFunc(FHandle, HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFBeamSet.GetReferenceCount(): Cardinal; +(************************************************************************************************************************* + Class implementation for Function +**************************************************************************************************************************) + + constructor TLib3MFFunction.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetReferenceCountFunc(FHandle, Result)); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFBeamSet.SetReferences(const AReferences: TCardinalDynArray); + destructor TLib3MFFunction.Destroy; + begin + inherited; + end; + + function TLib3MFFunction.GetDisplayName(): String; var - PtrReferences: PCardinal; - LenReferences: QWord; + bytesNeededDisplayName: Cardinal; + bytesWrittenDisplayName: Cardinal; + bufferDisplayName: array of Char; begin - LenReferences := Length(AReferences); - if LenReferences > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenReferences > 0 then - PtrReferences := @AReferences[0] - else - PtrReferences := nil; - - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_SetReferencesFunc(FHandle, QWord(LenReferences), PtrReferences)); + bytesNeededDisplayName:= 0; + bytesWrittenDisplayName:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunction_GetDisplayNameFunc(FHandle, 0, bytesNeededDisplayName, nil)); + SetLength(bufferDisplayName, bytesNeededDisplayName); + FWrapper.CheckError(Self, FWrapper.Lib3MFFunction_GetDisplayNameFunc(FHandle, bytesNeededDisplayName, bytesWrittenDisplayName, @bufferDisplayName[0])); + Result := StrPas(@bufferDisplayName[0]); end; - procedure TLib3MFBeamSet.GetReferences(out AReferences: TCardinalDynArray); + procedure TLib3MFFunction.SetDisplayName(const ADisplayName: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunction_SetDisplayNameFunc(FHandle, PAnsiChar(ADisplayName))); + end; + + function TLib3MFFunction.AddInput(const AIdentifier: String; const ADisplayName: String; const AType: TLib3MFImplicitPortType): TLib3MFImplicitPort; var - countNeededReferences: QWord; - countWrittenReferences: QWord; + HPort: TLib3MFHandle; begin - countNeededReferences:= 0; - countWrittenReferences:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetReferencesFunc(FHandle, 0, countNeededReferences, nil)); - SetLength(AReferences, countNeededReferences); - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetReferencesFunc(FHandle, countNeededReferences, countWrittenReferences, @AReferences[0])); + Result := nil; + HPort := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunction_AddInputFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), convertImplicitPortTypeToConst(AType), HPort)); + if Assigned(HPort) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPort); end; - function TLib3MFBeamSet.GetBallReferenceCount(): Cardinal; + function TLib3MFFunction.GetInputs(): TLib3MFImplicitPortIterator; + var + HIterator: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetBallReferenceCountFunc(FHandle, Result)); + Result := nil; + HIterator := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunction_GetInputsFunc(FHandle, HIterator)); + if Assigned(HIterator) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HIterator); end; - procedure TLib3MFBeamSet.SetBallReferences(const ABallReferences: TCardinalDynArray); + procedure TLib3MFFunction.RemoveInput(const AInput: TLib3MFImplicitPort); var - PtrBallReferences: PCardinal; - LenBallReferences: QWord; + AInputHandle: TLib3MFHandle; begin - LenBallReferences := Length(ABallReferences); - if LenBallReferences > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenBallReferences > 0 then - PtrBallReferences := @ABallReferences[0] + if Assigned(AInput) then + AInputHandle := AInput.TheHandle else - PtrBallReferences := nil; - - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_SetBallReferencesFunc(FHandle, QWord(LenBallReferences), PtrBallReferences)); + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AInput is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFFunction_RemoveInputFunc(FHandle, AInputHandle)); end; - procedure TLib3MFBeamSet.GetBallReferences(out ABallReferences: TCardinalDynArray); + function TLib3MFFunction.AddOutput(const AIdentifier: String; const ADisplayName: String; const AType: TLib3MFImplicitPortType): TLib3MFImplicitPort; var - countNeededBallReferences: QWord; - countWrittenBallReferences: QWord; + HPort: TLib3MFHandle; begin - countNeededBallReferences:= 0; - countWrittenBallReferences:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetBallReferencesFunc(FHandle, 0, countNeededBallReferences, nil)); - SetLength(ABallReferences, countNeededBallReferences); - FWrapper.CheckError(Self, FWrapper.Lib3MFBeamSet_GetBallReferencesFunc(FHandle, countNeededBallReferences, countWrittenBallReferences, @ABallReferences[0])); + Result := nil; + HPort := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunction_AddOutputFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), convertImplicitPortTypeToConst(AType), HPort)); + if Assigned(HPort) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPort); end; -(************************************************************************************************************************* - Class implementation for BaseMaterialGroup -**************************************************************************************************************************) - - constructor TLib3MFBaseMaterialGroup.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + function TLib3MFFunction.GetOutputs(): TLib3MFImplicitPortIterator; + var + HIterator: TLib3MFHandle; begin - inherited Create(AWrapper, AHandle); + Result := nil; + HIterator := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunction_GetOutputsFunc(FHandle, HIterator)); + if Assigned(HIterator) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HIterator); end; - destructor TLib3MFBaseMaterialGroup.Destroy; + procedure TLib3MFFunction.RemoveOutput(const AOutput: TLib3MFImplicitPort); + var + AOutputHandle: TLib3MFHandle; begin - inherited; + if Assigned(AOutput) then + AOutputHandle := AOutput.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AOutput is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFFunction_RemoveOutputFunc(FHandle, AOutputHandle)); end; - function TLib3MFBaseMaterialGroup.GetCount(): Cardinal; + function TLib3MFFunction.FindInput(const AIdentifier: String): TLib3MFImplicitPort; + var + HInput: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetCountFunc(FHandle, Result)); + Result := nil; + HInput := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunction_FindInputFunc(FHandle, PAnsiChar(AIdentifier), HInput)); + if Assigned(HInput) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HInput); end; - procedure TLib3MFBaseMaterialGroup.GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + function TLib3MFFunction.FindOutput(const AIdentifier: String): TLib3MFImplicitPort; var - countNeededPropertyIDs: QWord; - countWrittenPropertyIDs: QWord; + HOutput: TLib3MFHandle; begin - countNeededPropertyIDs:= 0; - countWrittenPropertyIDs:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetAllPropertyIDsFunc(FHandle, 0, countNeededPropertyIDs, nil)); - SetLength(APropertyIDs, countNeededPropertyIDs); - FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetAllPropertyIDsFunc(FHandle, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); + Result := nil; + HOutput := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunction_FindOutputFunc(FHandle, PAnsiChar(AIdentifier), HOutput)); + if Assigned(HOutput) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HOutput); end; - function TLib3MFBaseMaterialGroup.AddMaterial(const AName: String; const ADisplayColor: TLib3MFColor): Cardinal; +(************************************************************************************************************************* + Class implementation for ImplicitFunction +**************************************************************************************************************************) + + constructor TLib3MFImplicitFunction.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_AddMaterialFunc(FHandle, PAnsiChar(AName), @ADisplayColor, Result)); + inherited Create(AWrapper, AHandle); end; - procedure TLib3MFBaseMaterialGroup.RemoveMaterial(const APropertyID: Cardinal); + destructor TLib3MFImplicitFunction.Destroy; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_RemoveMaterialFunc(FHandle, APropertyID)); + inherited; end; - function TLib3MFBaseMaterialGroup.GetName(const APropertyID: Cardinal): String; + function TLib3MFImplicitFunction.GetIdentifier(): String; var - bytesNeededName: Cardinal; - bytesWrittenName: Cardinal; - bufferName: array of Char; + bytesNeededIdentifier: Cardinal; + bytesWrittenIdentifier: Cardinal; + bufferIdentifier: array of Char; begin - bytesNeededName:= 0; - bytesWrittenName:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetNameFunc(FHandle, APropertyID, 0, bytesNeededName, nil)); - SetLength(bufferName, bytesNeededName); - FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetNameFunc(FHandle, APropertyID, bytesNeededName, bytesWrittenName, @bufferName[0])); - Result := StrPas(@bufferName[0]); + bytesNeededIdentifier:= 0; + bytesWrittenIdentifier:= 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_GetIdentifierFunc(FHandle, 0, bytesNeededIdentifier, nil)); + SetLength(bufferIdentifier, bytesNeededIdentifier); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_GetIdentifierFunc(FHandle, bytesNeededIdentifier, bytesWrittenIdentifier, @bufferIdentifier[0])); + Result := StrPas(@bufferIdentifier[0]); end; - procedure TLib3MFBaseMaterialGroup.SetName(const APropertyID: Cardinal; const AName: String); + procedure TLib3MFImplicitFunction.SetIdentifier(const AIdentifier: String); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_SetNameFunc(FHandle, APropertyID, PAnsiChar(AName))); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_SetIdentifierFunc(FHandle, PAnsiChar(AIdentifier))); end; - procedure TLib3MFBaseMaterialGroup.SetDisplayColor(const APropertyID: Cardinal; const ATheColor: TLib3MFColor); + function TLib3MFImplicitFunction.AddNode(const ANodeType: TLib3MFImplicitNodeType; const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFImplicitNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_SetDisplayColorFunc(FHandle, APropertyID, @ATheColor)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddNodeFunc(FHandle, convertImplicitNodeTypeToConst(ANodeType), PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFBaseMaterialGroup.GetDisplayColor(const APropertyID: Cardinal): TLib3MFColor; + function TLib3MFImplicitFunction.AddSinNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSinNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFBaseMaterialGroup_GetDisplayColorFunc(FHandle, APropertyID, @Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddSinNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; -(************************************************************************************************************************* - Class implementation for ColorGroup -**************************************************************************************************************************) + function TLib3MFImplicitFunction.AddCosNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFCosNode; + var + HNode: TLib3MFHandle; + begin + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddCosNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); + end; - constructor TLib3MFColorGroup.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + function TLib3MFImplicitFunction.AddTanNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFTanNode; + var + HNode: TLib3MFHandle; begin - inherited Create(AWrapper, AHandle); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddTanNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - destructor TLib3MFColorGroup.Destroy; + function TLib3MFImplicitFunction.AddArcSinNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFArcSinNode; + var + HNode: TLib3MFHandle; begin - inherited; + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddArcSinNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFColorGroup.GetCount(): Cardinal; + function TLib3MFImplicitFunction.AddArcCosNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFArcCosNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_GetCountFunc(FHandle, Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddArcCosNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFColorGroup.GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + function TLib3MFImplicitFunction.AddArcTan2Node(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFArcTan2Node; var - countNeededPropertyIDs: QWord; - countWrittenPropertyIDs: QWord; + HNode: TLib3MFHandle; begin - countNeededPropertyIDs:= 0; - countWrittenPropertyIDs:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_GetAllPropertyIDsFunc(FHandle, 0, countNeededPropertyIDs, nil)); - SetLength(APropertyIDs, countNeededPropertyIDs); - FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_GetAllPropertyIDsFunc(FHandle, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddArcTan2NodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFColorGroup.AddColor(const ATheColor: TLib3MFColor): Cardinal; + function TLib3MFImplicitFunction.AddSinhNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSinhNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_AddColorFunc(FHandle, @ATheColor, Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddSinhNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFColorGroup.RemoveColor(const APropertyID: Cardinal); + function TLib3MFImplicitFunction.AddCoshNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFCoshNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_RemoveColorFunc(FHandle, APropertyID)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddCoshNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFColorGroup.SetColor(const APropertyID: Cardinal; const ATheColor: TLib3MFColor); + function TLib3MFImplicitFunction.AddTanhNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFTanhNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_SetColorFunc(FHandle, APropertyID, @ATheColor)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddTanhNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFColorGroup.GetColor(const APropertyID: Cardinal): TLib3MFColor; + function TLib3MFImplicitFunction.AddRoundNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFRoundNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFColorGroup_GetColorFunc(FHandle, APropertyID, @Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddRoundNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; -(************************************************************************************************************************* - Class implementation for Texture2DGroup -**************************************************************************************************************************) + function TLib3MFImplicitFunction.AddCeilNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFCeilNode; + var + HNode: TLib3MFHandle; + begin + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddCeilNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); + end; - constructor TLib3MFTexture2DGroup.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + function TLib3MFImplicitFunction.AddFloorNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFFloorNode; + var + HNode: TLib3MFHandle; begin - inherited Create(AWrapper, AHandle); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddFloorNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - destructor TLib3MFTexture2DGroup.Destroy; + function TLib3MFImplicitFunction.AddSignNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSignNode; + var + HNode: TLib3MFHandle; begin - inherited; + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddSignNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFTexture2DGroup.GetCount(): Cardinal; + function TLib3MFImplicitFunction.AddFractNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFFractNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_GetCountFunc(FHandle, Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddFractNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFTexture2DGroup.GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + function TLib3MFImplicitFunction.AddAbsNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFAbsNode; var - countNeededPropertyIDs: QWord; - countWrittenPropertyIDs: QWord; + HNode: TLib3MFHandle; begin - countNeededPropertyIDs:= 0; - countWrittenPropertyIDs:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_GetAllPropertyIDsFunc(FHandle, 0, countNeededPropertyIDs, nil)); - SetLength(APropertyIDs, countNeededPropertyIDs); - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_GetAllPropertyIDsFunc(FHandle, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddAbsNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFTexture2DGroup.AddTex2Coord(const AUVCoordinate: TLib3MFTex2Coord): Cardinal; + function TLib3MFImplicitFunction.AddExpNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFExpNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_AddTex2CoordFunc(FHandle, @AUVCoordinate, Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddExpNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFTexture2DGroup.GetTex2Coord(const APropertyID: Cardinal): TLib3MFTex2Coord; + function TLib3MFImplicitFunction.AddLogNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFLogNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_GetTex2CoordFunc(FHandle, APropertyID, @Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddLogNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFTexture2DGroup.RemoveTex2Coord(const APropertyID: Cardinal); + function TLib3MFImplicitFunction.AddLog2Node(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFLog2Node; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_RemoveTex2CoordFunc(FHandle, APropertyID)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddLog2NodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFTexture2DGroup.GetTexture2D(): TLib3MFTexture2D; + function TLib3MFImplicitFunction.AddLog10Node(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFLog10Node; var - HTexture2DInstance: TLib3MFHandle; + HNode: TLib3MFHandle; begin Result := nil; - HTexture2DInstance := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2DGroup_GetTexture2DFunc(FHandle, HTexture2DInstance)); - if Assigned(HTexture2DInstance) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTexture2DInstance); + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddLog10NodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; -(************************************************************************************************************************* - Class implementation for CompositeMaterials -**************************************************************************************************************************) - - constructor TLib3MFCompositeMaterials.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + function TLib3MFImplicitFunction.AddLengthNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFLengthNode; + var + HNode: TLib3MFHandle; begin - inherited Create(AWrapper, AHandle); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddLengthNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - destructor TLib3MFCompositeMaterials.Destroy; + function TLib3MFImplicitFunction.AddTransposeNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFTransposeNode; + var + HNode: TLib3MFHandle; begin - inherited; + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddTransposeNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFCompositeMaterials.GetCount(): Cardinal; + function TLib3MFImplicitFunction.InverseNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFInverseNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetCountFunc(FHandle, Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_InverseNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFCompositeMaterials.GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + function TLib3MFImplicitFunction.AddSqrtNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSqrtNode; var - countNeededPropertyIDs: QWord; - countWrittenPropertyIDs: QWord; + HNode: TLib3MFHandle; begin - countNeededPropertyIDs:= 0; - countWrittenPropertyIDs:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetAllPropertyIDsFunc(FHandle, 0, countNeededPropertyIDs, nil)); - SetLength(APropertyIDs, countNeededPropertyIDs); - FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetAllPropertyIDsFunc(FHandle, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddSqrtNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFCompositeMaterials.GetBaseMaterialGroup(): TLib3MFBaseMaterialGroup; + function TLib3MFImplicitFunction.AddResourceIdNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFResourceIdNode; var - HBaseMaterialGroupInstance: TLib3MFHandle; + HNode: TLib3MFHandle; begin Result := nil; - HBaseMaterialGroupInstance := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetBaseMaterialGroupFunc(FHandle, HBaseMaterialGroupInstance)); - if Assigned(HBaseMaterialGroupInstance) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HBaseMaterialGroupInstance); + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddResourceIdNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFCompositeMaterials.AddComposite(const AComposite: ArrayOfLib3MFCompositeConstituent): Cardinal; + function TLib3MFImplicitFunction.AddAdditionNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFAdditionNode; var - PtrComposite: PLib3MFCompositeConstituent; - LenComposite: QWord; + HNode: TLib3MFHandle; begin - LenComposite := Length(AComposite); - if LenComposite > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenComposite > 0 then - PtrComposite := @AComposite[0] - else - PtrComposite := nil; - - FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_AddCompositeFunc(FHandle, QWord(LenComposite), PtrComposite, Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddAdditionNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFCompositeMaterials.RemoveComposite(const APropertyID: Cardinal); + function TLib3MFImplicitFunction.AddSubtractionNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSubtractionNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_RemoveCompositeFunc(FHandle, APropertyID)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddSubtractionNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFCompositeMaterials.GetComposite(const APropertyID: Cardinal; out AComposite: ArrayOfLib3MFCompositeConstituent); + function TLib3MFImplicitFunction.AddMultiplicationNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFMultiplicationNode; var - countNeededComposite: QWord; - countWrittenComposite: QWord; + HNode: TLib3MFHandle; begin - countNeededComposite:= 0; - countWrittenComposite:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetCompositeFunc(FHandle, APropertyID, 0, countNeededComposite, nil)); - SetLength(AComposite, countNeededComposite); - FWrapper.CheckError(Self, FWrapper.Lib3MFCompositeMaterials_GetCompositeFunc(FHandle, APropertyID, countNeededComposite, countWrittenComposite, @AComposite[0])); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddMultiplicationNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; -(************************************************************************************************************************* - Class implementation for MultiPropertyGroup -**************************************************************************************************************************) - - constructor TLib3MFMultiPropertyGroup.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + function TLib3MFImplicitFunction.AddDivisionNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFDivisionNode; + var + HNode: TLib3MFHandle; begin - inherited Create(AWrapper, AHandle); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddDivisionNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - destructor TLib3MFMultiPropertyGroup.Destroy; + function TLib3MFImplicitFunction.AddDotNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFDotNode; + var + HNode: TLib3MFHandle; begin - inherited; + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddDotNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFMultiPropertyGroup.GetCount(): Cardinal; + function TLib3MFImplicitFunction.AddCrossNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFCrossNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetCountFunc(FHandle, Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddCrossNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFMultiPropertyGroup.GetAllPropertyIDs(out APropertyIDs: TCardinalDynArray); + function TLib3MFImplicitFunction.AddMatVecMultiplicationNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFMatVecMultiplicationNode; var - countNeededPropertyIDs: QWord; - countWrittenPropertyIDs: QWord; + HNode: TLib3MFHandle; begin - countNeededPropertyIDs:= 0; - countWrittenPropertyIDs:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetAllPropertyIDsFunc(FHandle, 0, countNeededPropertyIDs, nil)); - SetLength(APropertyIDs, countNeededPropertyIDs); - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetAllPropertyIDsFunc(FHandle, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddMatVecMultiplicationNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFMultiPropertyGroup.AddMultiProperty(const APropertyIDs: TCardinalDynArray): Cardinal; + function TLib3MFImplicitFunction.AddMinNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFMinNode; var - PtrPropertyIDs: PCardinal; - LenPropertyIDs: QWord; + HNode: TLib3MFHandle; begin - LenPropertyIDs := Length(APropertyIDs); - if LenPropertyIDs > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenPropertyIDs > 0 then - PtrPropertyIDs := @APropertyIDs[0] - else - PtrPropertyIDs := nil; - - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_AddMultiPropertyFunc(FHandle, QWord(LenPropertyIDs), PtrPropertyIDs, Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddMinNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFMultiPropertyGroup.SetMultiProperty(const APropertyID: Cardinal; const APropertyIDs: TCardinalDynArray); + function TLib3MFImplicitFunction.AddMaxNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFMaxNode; var - PtrPropertyIDs: PCardinal; - LenPropertyIDs: QWord; + HNode: TLib3MFHandle; begin - LenPropertyIDs := Length(APropertyIDs); - if LenPropertyIDs > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenPropertyIDs > 0 then - PtrPropertyIDs := @APropertyIDs[0] - else - PtrPropertyIDs := nil; - - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_SetMultiPropertyFunc(FHandle, APropertyID, QWord(LenPropertyIDs), PtrPropertyIDs)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddMaxNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFMultiPropertyGroup.GetMultiProperty(const APropertyID: Cardinal; out APropertyIDs: TCardinalDynArray); + function TLib3MFImplicitFunction.AddFmodNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFFmodNode; var - countNeededPropertyIDs: QWord; - countWrittenPropertyIDs: QWord; + HNode: TLib3MFHandle; begin - countNeededPropertyIDs:= 0; - countWrittenPropertyIDs:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetMultiPropertyFunc(FHandle, APropertyID, 0, countNeededPropertyIDs, nil)); - SetLength(APropertyIDs, countNeededPropertyIDs); - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetMultiPropertyFunc(FHandle, APropertyID, countNeededPropertyIDs, countWrittenPropertyIDs, @APropertyIDs[0])); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddFmodNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFMultiPropertyGroup.RemoveMultiProperty(const APropertyID: Cardinal); + function TLib3MFImplicitFunction.AddPowNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFPowNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_RemoveMultiPropertyFunc(FHandle, APropertyID)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddPowNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFMultiPropertyGroup.GetLayerCount(): Cardinal; + function TLib3MFImplicitFunction.AddSelectNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFSelectNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetLayerCountFunc(FHandle, Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddSelectNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFMultiPropertyGroup.AddLayer(const ATheLayer: TLib3MFMultiPropertyLayer): Cardinal; + function TLib3MFImplicitFunction.AddClampNode(const AIdentifier: String; const AConfiguration: TLib3MFImplicitNodeConfiguration; const ADisplayName: String; const ATag: String): TLib3MFClampNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_AddLayerFunc(FHandle, @ATheLayer, Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddClampNodeFunc(FHandle, PAnsiChar(AIdentifier), convertImplicitNodeConfigurationToConst(AConfiguration), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFMultiPropertyGroup.GetLayer(const ALayerIndex: Cardinal): TLib3MFMultiPropertyLayer; + function TLib3MFImplicitFunction.AddComposeVectorNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFComposeVectorNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_GetLayerFunc(FHandle, ALayerIndex, @Result)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddComposeVectorNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFMultiPropertyGroup.RemoveLayer(const ALayerIndex: Cardinal); + function TLib3MFImplicitFunction.AddVectorFromScalarNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFVectorFromScalarNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFMultiPropertyGroup_RemoveLayerFunc(FHandle, ALayerIndex)); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddVectorFromScalarNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; -(************************************************************************************************************************* - Class implementation for Attachment -**************************************************************************************************************************) + function TLib3MFImplicitFunction.AddDecomposeVectorNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFDecomposeVectorNode; + var + HNode: TLib3MFHandle; + begin + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddDecomposeVectorNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); + end; - constructor TLib3MFAttachment.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + function TLib3MFImplicitFunction.AddComposeMatrixNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFComposeMatrixNode; + var + HNode: TLib3MFHandle; begin - inherited Create(AWrapper, AHandle); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddComposeMatrixNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - destructor TLib3MFAttachment.Destroy; + function TLib3MFImplicitFunction.AddMatrixFromRowsNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFMatrixFromRowsNode; + var + HNode: TLib3MFHandle; begin - inherited; + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddMatrixFromRowsNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFAttachment.GetPath(): String; + function TLib3MFImplicitFunction.AddMatrixFromColumnsNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFMatrixFromColumnsNode; var - bytesNeededPath: Cardinal; - bytesWrittenPath: Cardinal; - bufferPath: array of Char; + HNode: TLib3MFHandle; begin - bytesNeededPath:= 0; - bytesWrittenPath:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_GetPathFunc(FHandle, 0, bytesNeededPath, nil)); - SetLength(bufferPath, bytesNeededPath); - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_GetPathFunc(FHandle, bytesNeededPath, bytesWrittenPath, @bufferPath[0])); - Result := StrPas(@bufferPath[0]); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddMatrixFromColumnsNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFAttachment.SetPath(const APath: String); + function TLib3MFImplicitFunction.AddConstantNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFConstantNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_SetPathFunc(FHandle, PAnsiChar(APath))); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddConstantNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFAttachment.PackagePart(): TLib3MFPackagePart; + function TLib3MFImplicitFunction.AddConstVecNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFConstVecNode; var - HPackagePart: TLib3MFHandle; + HNode: TLib3MFHandle; begin Result := nil; - HPackagePart := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_PackagePartFunc(FHandle, HPackagePart)); - if Assigned(HPackagePart) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HPackagePart); + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddConstVecNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - function TLib3MFAttachment.GetRelationShipType(): String; + function TLib3MFImplicitFunction.AddConstMatNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFConstMatNode; var - bytesNeededPath: Cardinal; - bytesWrittenPath: Cardinal; - bufferPath: array of Char; + HNode: TLib3MFHandle; begin - bytesNeededPath:= 0; - bytesWrittenPath:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_GetRelationShipTypeFunc(FHandle, 0, bytesNeededPath, nil)); - SetLength(bufferPath, bytesNeededPath); - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_GetRelationShipTypeFunc(FHandle, bytesNeededPath, bytesWrittenPath, @bufferPath[0])); - Result := StrPas(@bufferPath[0]); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddConstMatNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFAttachment.SetRelationShipType(const APath: String); + function TLib3MFImplicitFunction.AddMeshNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFMeshNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_SetRelationShipTypeFunc(FHandle, PAnsiChar(APath))); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddMeshNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFAttachment.WriteToFile(const AFileName: String); + function TLib3MFImplicitFunction.AddUnsignedMeshNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFUnsignedMeshNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_WriteToFileFunc(FHandle, PAnsiChar(AFileName))); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddUnsignedMeshNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFAttachment.ReadFromFile(const AFileName: String); + function TLib3MFImplicitFunction.AddFunctionCallNode(const AIdentifier: String; const ADisplayName: String; const ATag: String): TLib3MFFunctionCallNode; + var + HNode: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_ReadFromFileFunc(FHandle, PAnsiChar(AFileName))); + Result := nil; + HNode := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddFunctionCallNodeFunc(FHandle, PAnsiChar(AIdentifier), PAnsiChar(ADisplayName), PAnsiChar(ATag), HNode)); + if Assigned(HNode) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HNode); end; - procedure TLib3MFAttachment.ReadFromCallback(const ATheReadCallback: PLib3MF_ReadCallback; const AStreamSize: QWord; const ATheSeekCallback: PLib3MF_SeekCallback; const AUserData: Pointer); + function TLib3MFImplicitFunction.GetNodes(): TLib3MFNodeIterator; + var + HIterator: TLib3MFHandle; begin - if not Assigned(ATheReadCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheReadCallback is a nil value.'); - if not Assigned(ATheSeekCallback) then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATheSeekCallback is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_ReadFromCallbackFunc(FHandle, ATheReadCallback, AStreamSize, ATheSeekCallback, AUserData)); + Result := nil; + HIterator := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_GetNodesFunc(FHandle, HIterator)); + if Assigned(HIterator) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HIterator); end; - function TLib3MFAttachment.GetStreamSize(): QWord; + procedure TLib3MFImplicitFunction.RemoveNode(const ANode: TLib3MFImplicitNode); + var + ANodeHandle: TLib3MFHandle; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_GetStreamSizeFunc(FHandle, Result)); + if Assigned(ANode) then + ANodeHandle := ANode.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ANode is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_RemoveNodeFunc(FHandle, ANodeHandle)); end; - procedure TLib3MFAttachment.WriteToBuffer(out ABuffer: TByteDynArray); + procedure TLib3MFImplicitFunction.AddLink(const ASource: TLib3MFImplicitPort; const ATarget: TLib3MFImplicitPort); var - countNeededBuffer: QWord; - countWrittenBuffer: QWord; + ASourceHandle: TLib3MFHandle; + ATargetHandle: TLib3MFHandle; + begin + if Assigned(ASource) then + ASourceHandle := ASource.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ASource is a nil value.'); + if Assigned(ATarget) then + ATargetHandle := ATarget.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'ATarget is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddLinkFunc(FHandle, ASourceHandle, ATargetHandle)); + end; + + procedure TLib3MFImplicitFunction.AddLinkByNames(const ASource: String; const ATarget: String); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_AddLinkByNamesFunc(FHandle, PAnsiChar(ASource), PAnsiChar(ATarget))); + end; + + procedure TLib3MFImplicitFunction.Clear(); begin - countNeededBuffer:= 0; - countWrittenBuffer:= 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_WriteToBufferFunc(FHandle, 0, countNeededBuffer, nil)); - SetLength(ABuffer, countNeededBuffer); - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_WriteToBufferFunc(FHandle, countNeededBuffer, countWrittenBuffer, @ABuffer[0])); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_ClearFunc(FHandle)); end; - procedure TLib3MFAttachment.ReadFromBuffer(const ABuffer: TByteDynArray); - var - PtrBuffer: PByte; - LenBuffer: QWord; + procedure TLib3MFImplicitFunction.SortNodesTopologically(); begin - LenBuffer := Length(ABuffer); - if LenBuffer > $FFFFFFFF then - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'array has too many entries.'); - if LenBuffer > 0 then - PtrBuffer := @ABuffer[0] - else - PtrBuffer := nil; - - FWrapper.CheckError(Self, FWrapper.Lib3MFAttachment_ReadFromBufferFunc(FHandle, QWord(LenBuffer), PtrBuffer)); + FWrapper.CheckError(Self, FWrapper.Lib3MFImplicitFunction_SortNodesTopologicallyFunc(FHandle)); end; (************************************************************************************************************************* - Class implementation for Texture2D + Class implementation for FunctionFromImage3D **************************************************************************************************************************) - constructor TLib3MFTexture2D.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); + constructor TLib3MFFunctionFromImage3D.Create(AWrapper: TLib3MFWrapper; AHandle: TLib3MFHandle); begin inherited Create(AWrapper, AHandle); end; - destructor TLib3MFTexture2D.Destroy; + destructor TLib3MFFunctionFromImage3D.Destroy; begin inherited; end; - function TLib3MFTexture2D.GetAttachment(): TLib3MFAttachment; + function TLib3MFFunctionFromImage3D.GetImage3D(): TLib3MFImage3D; var - HAttachment: TLib3MFHandle; + HImage3D: TLib3MFHandle; begin Result := nil; - HAttachment := nil; - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_GetAttachmentFunc(FHandle, HAttachment)); - if Assigned(HAttachment) then - Result := TLib3MFPolymorphicFactory.Make(FWrapper, HAttachment); + HImage3D := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionFromImage3D_GetImage3DFunc(FHandle, HImage3D)); + if Assigned(HImage3D) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HImage3D); end; - procedure TLib3MFTexture2D.SetAttachment(const AAttachment: TLib3MFAttachment); + procedure TLib3MFFunctionFromImage3D.SetImage3D(const AImage3D: TLib3MFImage3D); var - AAttachmentHandle: TLib3MFHandle; + AImage3DHandle: TLib3MFHandle; begin - if Assigned(AAttachment) then - AAttachmentHandle := AAttachment.TheHandle + if Assigned(AImage3D) then + AImage3DHandle := AImage3D.TheHandle else - raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AAttachment is a nil value.'); - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_SetAttachmentFunc(FHandle, AAttachmentHandle)); + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AImage3D is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionFromImage3D_SetImage3DFunc(FHandle, AImage3DHandle)); end; - function TLib3MFTexture2D.GetContentType(): TLib3MFTextureType; + procedure TLib3MFFunctionFromImage3D.SetFilter(const AFilter: TLib3MFTextureFilter); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionFromImage3D_SetFilterFunc(FHandle, convertTextureFilterToConst(AFilter))); + end; + + function TLib3MFFunctionFromImage3D.GetFilter(): TLib3MFTextureFilter; var - ResultContentType: Integer; + ResultFilter: Integer; begin - ResultContentType := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_GetContentTypeFunc(FHandle, ResultContentType)); - Result := convertConstToTextureType(ResultContentType); + ResultFilter := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionFromImage3D_GetFilterFunc(FHandle, ResultFilter)); + Result := convertConstToTextureFilter(ResultFilter); end; - procedure TLib3MFTexture2D.SetContentType(const AContentType: TLib3MFTextureType); + procedure TLib3MFFunctionFromImage3D.SetTileStyles(const ATileStyleU: TLib3MFTextureTileStyle; const ATileStyleV: TLib3MFTextureTileStyle; const ATileStyleW: TLib3MFTextureTileStyle); begin - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_SetContentTypeFunc(FHandle, convertTextureTypeToConst(AContentType))); + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionFromImage3D_SetTileStylesFunc(FHandle, convertTextureTileStyleToConst(ATileStyleU), convertTextureTileStyleToConst(ATileStyleV), convertTextureTileStyleToConst(ATileStyleW))); end; - procedure TLib3MFTexture2D.GetTileStyleUV(out ATileStyleU: TLib3MFTextureTileStyle; out ATileStyleV: TLib3MFTextureTileStyle); + procedure TLib3MFFunctionFromImage3D.GetTileStyles(out ATileStyleU: TLib3MFTextureTileStyle; out ATileStyleV: TLib3MFTextureTileStyle; out ATileStyleW: TLib3MFTextureTileStyle); var ResultTileStyleU: Integer; ResultTileStyleV: Integer; + ResultTileStyleW: Integer; begin ResultTileStyleU := 0; ResultTileStyleV := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_GetTileStyleUVFunc(FHandle, ResultTileStyleU, ResultTileStyleV)); + ResultTileStyleW := 0; + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionFromImage3D_GetTileStylesFunc(FHandle, ResultTileStyleU, ResultTileStyleV, ResultTileStyleW)); ATileStyleU := convertConstToTextureTileStyle(ResultTileStyleU); ATileStyleV := convertConstToTextureTileStyle(ResultTileStyleV); + ATileStyleW := convertConstToTextureTileStyle(ResultTileStyleW); end; - procedure TLib3MFTexture2D.SetTileStyleUV(const ATileStyleU: TLib3MFTextureTileStyle; const ATileStyleV: TLib3MFTextureTileStyle); + function TLib3MFFunctionFromImage3D.GetOffset(): Double; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_SetTileStyleUVFunc(FHandle, convertTextureTileStyleToConst(ATileStyleU), convertTextureTileStyleToConst(ATileStyleV))); + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionFromImage3D_GetOffsetFunc(FHandle, Result)); end; - function TLib3MFTexture2D.GetFilter(): TLib3MFTextureFilter; - var - ResultFilter: Integer; + procedure TLib3MFFunctionFromImage3D.SetOffset(const AOffset: Double); begin - ResultFilter := 0; - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_GetFilterFunc(FHandle, ResultFilter)); - Result := convertConstToTextureFilter(ResultFilter); + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionFromImage3D_SetOffsetFunc(FHandle, AOffset)); end; - procedure TLib3MFTexture2D.SetFilter(const AFilter: TLib3MFTextureFilter); + function TLib3MFFunctionFromImage3D.GetScale(): Double; begin - FWrapper.CheckError(Self, FWrapper.Lib3MFTexture2D_SetFilterFunc(FHandle, convertTextureFilterToConst(AFilter))); + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionFromImage3D_GetScaleFunc(FHandle, Result)); + end; + + procedure TLib3MFFunctionFromImage3D.SetScale(const AScale: Double); + begin + FWrapper.CheckError(Self, FWrapper.Lib3MFFunctionFromImage3D_SetScaleFunc(FHandle, AScale)); end; (************************************************************************************************************************* @@ -9862,6 +18345,17 @@ implementation Result := TLib3MFPolymorphicFactory.Make(FWrapper, HSliceStacInstance); end; + function TLib3MFModel.GetLevelSetByID(const AUniqueResourceID: Cardinal): TLib3MFLevelSet; + var + HLevelSetObjectInstance: TLib3MFHandle; + begin + Result := nil; + HLevelSetObjectInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_GetLevelSetByIDFunc(FHandle, AUniqueResourceID, HLevelSetObjectInstance)); + if Assigned(HLevelSetObjectInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HLevelSetObjectInstance); + end; + function TLib3MFModel.GetBuildUUID(out AHasUUID: Boolean): String; var ResultHasUUID: Byte; @@ -10021,6 +18515,17 @@ implementation Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResourceIterator); end; + function TLib3MFModel.GetImage3Ds(): TLib3MFImage3DIterator; + var + HResourceIterator: TLib3MFHandle; + begin + Result := nil; + HResourceIterator := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_GetImage3DsFunc(FHandle, HResourceIterator)); + if Assigned(HResourceIterator) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResourceIterator); + end; + function TLib3MFModel.MergeToModel(): TLib3MFModel; var HMergedModelInstance: TLib3MFHandle; @@ -10032,6 +18537,17 @@ implementation Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMergedModelInstance); end; + procedure TLib3MFModel.MergeFromModel(const AModelInstance: TLib3MFModel); + var + AModelInstanceHandle: TLib3MFHandle; + begin + if Assigned(AModelInstance) then + AModelInstanceHandle := AModelInstance.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AModelInstance is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_MergeFromModelFunc(FHandle, AModelInstanceHandle)); + end; + function TLib3MFModel.AddMeshObject(): TLib3MFMeshObject; var HMeshObjectInstance: TLib3MFHandle; @@ -10146,6 +18662,28 @@ implementation Result := TLib3MFPolymorphicFactory.Make(FWrapper, HMultiPropertyGroupInstance); end; + function TLib3MFModel.AddImageStack(const AColumnCount: Cardinal; const ARowCount: Cardinal; const ASheetCount: Cardinal): TLib3MFImageStack; + var + HInstance: TLib3MFHandle; + begin + Result := nil; + HInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_AddImageStackFunc(FHandle, AColumnCount, ARowCount, ASheetCount, HInstance)); + if Assigned(HInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HInstance); + end; + + function TLib3MFModel.GetImageStackByID(const AUniqueResourceID: Cardinal): TLib3MFImageStack; + var + HImageStackInstance: TLib3MFHandle; + begin + Result := nil; + HImageStackInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_GetImageStackByIDFunc(FHandle, AUniqueResourceID, HImageStackInstance)); + if Assigned(HImageStackInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HImageStackInstance); + end; + function TLib3MFModel.AddBuildItem(const AObject: TLib3MFObject; const ATransform: TLib3MFTransform): TLib3MFBuildItem; var AObjectHandle: TLib3MFHandle; @@ -10297,6 +18835,88 @@ implementation Result := TLib3MFPolymorphicFactory.Make(FWrapper, HKeyStore); end; + function TLib3MFModel.GetFunctions(): TLib3MFFunctionIterator; + var + HTheResourceIterator: TLib3MFHandle; + begin + Result := nil; + HTheResourceIterator := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_GetFunctionsFunc(FHandle, HTheResourceIterator)); + if Assigned(HTheResourceIterator) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HTheResourceIterator); + end; + + function TLib3MFModel.AddImplicitFunction(): TLib3MFImplicitFunction; + var + HFunctionInstance: TLib3MFHandle; + begin + Result := nil; + HFunctionInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_AddImplicitFunctionFunc(FHandle, HFunctionInstance)); + if Assigned(HFunctionInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HFunctionInstance); + end; + + function TLib3MFModel.AddFunctionFromImage3D(const AImage3DInstance: TLib3MFImage3D): TLib3MFFunctionFromImage3D; + var + AImage3DInstanceHandle: TLib3MFHandle; + HFunctionInstance: TLib3MFHandle; + begin + if Assigned(AImage3DInstance) then + AImage3DInstanceHandle := AImage3DInstance.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AImage3DInstance is a nil value.'); + Result := nil; + HFunctionInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_AddFunctionFromImage3DFunc(FHandle, AImage3DInstanceHandle, HFunctionInstance)); + if Assigned(HFunctionInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HFunctionInstance); + end; + + function TLib3MFModel.AddVolumeData(): TLib3MFVolumeData; + var + HVolumeDataInstance: TLib3MFHandle; + begin + Result := nil; + HVolumeDataInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_AddVolumeDataFunc(FHandle, HVolumeDataInstance)); + if Assigned(HVolumeDataInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HVolumeDataInstance); + end; + + function TLib3MFModel.AddLevelSet(): TLib3MFLevelSet; + var + HLevelSetInstance: TLib3MFHandle; + begin + Result := nil; + HLevelSetInstance := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_AddLevelSetFunc(FHandle, HLevelSetInstance)); + if Assigned(HLevelSetInstance) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HLevelSetInstance); + end; + + function TLib3MFModel.GetLevelSets(): TLib3MFLevelSetIterator; + var + HResourceIterator: TLib3MFHandle; + begin + Result := nil; + HResourceIterator := nil; + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_GetLevelSetsFunc(FHandle, HResourceIterator)); + if Assigned(HResourceIterator) then + Result := TLib3MFPolymorphicFactory.Make(FWrapper, HResourceIterator); + end; + + procedure TLib3MFModel.RemoveResource(const AResource: TLib3MFResource); + var + AResourceHandle: TLib3MFHandle; + begin + if Assigned(AResource) then + AResourceHandle := AResource.TheHandle + else + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_INVALIDPARAM, 'AResource is a nil value.'); + FWrapper.CheckError(Self, FWrapper.Lib3MFModel_RemoveResourceFunc(FHandle, AResourceHandle)); + end; + (************************************************************************************************************************* Wrapper class implementation **************************************************************************************************************************) @@ -10367,6 +18987,9 @@ implementation FLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupFunc := LoadFunction('lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup'); FLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsFunc := LoadFunction('lib3mf_compositematerialsiterator_getcurrentcompositematerials'); FLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupFunc := LoadFunction('lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup'); + FLib3MFImage3DIterator_GetCurrentImage3DFunc := LoadFunction('lib3mf_image3diterator_getcurrentimage3d'); + FLib3MFFunctionIterator_GetCurrentFunctionFunc := LoadFunction('lib3mf_functioniterator_getcurrentfunction'); + FLib3MFLevelSetIterator_GetCurrentLevelSetFunc := LoadFunction('lib3mf_levelsetiterator_getcurrentlevelset'); FLib3MFMetaData_GetNameSpaceFunc := LoadFunction('lib3mf_metadata_getnamespace'); FLib3MFMetaData_SetNameSpaceFunc := LoadFunction('lib3mf_metadata_setnamespace'); FLib3MFMetaData_GetNameFunc := LoadFunction('lib3mf_metadata_getname'); @@ -10392,6 +19015,7 @@ implementation FLib3MFObject_SetPartNumberFunc := LoadFunction('lib3mf_object_setpartnumber'); FLib3MFObject_IsMeshObjectFunc := LoadFunction('lib3mf_object_ismeshobject'); FLib3MFObject_IsComponentsObjectFunc := LoadFunction('lib3mf_object_iscomponentsobject'); + FLib3MFObject_IsLevelSetObjectFunc := LoadFunction('lib3mf_object_islevelsetobject'); FLib3MFObject_IsValidFunc := LoadFunction('lib3mf_object_isvalid'); FLib3MFObject_SetAttachmentAsThumbnailFunc := LoadFunction('lib3mf_object_setattachmentasthumbnail'); FLib3MFObject_GetThumbnailAttachmentFunc := LoadFunction('lib3mf_object_getthumbnailattachment'); @@ -10426,6 +19050,24 @@ implementation FLib3MFMeshObject_SetGeometryFunc := LoadFunction('lib3mf_meshobject_setgeometry'); FLib3MFMeshObject_IsManifoldAndOrientedFunc := LoadFunction('lib3mf_meshobject_ismanifoldandoriented'); FLib3MFMeshObject_BeamLatticeFunc := LoadFunction('lib3mf_meshobject_beamlattice'); + FLib3MFMeshObject_GetVolumeDataFunc := LoadFunction('lib3mf_meshobject_getvolumedata'); + FLib3MFMeshObject_SetVolumeDataFunc := LoadFunction('lib3mf_meshobject_setvolumedata'); + FLib3MFLevelSet_GetFunctionFunc := LoadFunction('lib3mf_levelset_getfunction'); + FLib3MFLevelSet_SetFunctionFunc := LoadFunction('lib3mf_levelset_setfunction'); + FLib3MFLevelSet_GetTransformFunc := LoadFunction('lib3mf_levelset_gettransform'); + FLib3MFLevelSet_SetTransformFunc := LoadFunction('lib3mf_levelset_settransform'); + FLib3MFLevelSet_GetChannelNameFunc := LoadFunction('lib3mf_levelset_getchannelname'); + FLib3MFLevelSet_SetChannelNameFunc := LoadFunction('lib3mf_levelset_setchannelname'); + FLib3MFLevelSet_SetMinFeatureSizeFunc := LoadFunction('lib3mf_levelset_setminfeaturesize'); + FLib3MFLevelSet_GetMinFeatureSizeFunc := LoadFunction('lib3mf_levelset_getminfeaturesize'); + FLib3MFLevelSet_SetFallBackValueFunc := LoadFunction('lib3mf_levelset_setfallbackvalue'); + FLib3MFLevelSet_GetFallBackValueFunc := LoadFunction('lib3mf_levelset_getfallbackvalue'); + FLib3MFLevelSet_SetMeshBBoxOnlyFunc := LoadFunction('lib3mf_levelset_setmeshbboxonly'); + FLib3MFLevelSet_GetMeshBBoxOnlyFunc := LoadFunction('lib3mf_levelset_getmeshbboxonly'); + FLib3MFLevelSet_SetMeshFunc := LoadFunction('lib3mf_levelset_setmesh'); + FLib3MFLevelSet_GetMeshFunc := LoadFunction('lib3mf_levelset_getmesh'); + FLib3MFLevelSet_GetVolumeDataFunc := LoadFunction('lib3mf_levelset_getvolumedata'); + FLib3MFLevelSet_SetVolumeDataFunc := LoadFunction('lib3mf_levelset_setvolumedata'); FLib3MFBeamLattice_GetMinLengthFunc := LoadFunction('lib3mf_beamlattice_getminlength'); FLib3MFBeamLattice_SetMinLengthFunc := LoadFunction('lib3mf_beamlattice_setminlength'); FLib3MFBeamLattice_GetClippingFunc := LoadFunction('lib3mf_beamlattice_getclipping'); @@ -10449,6 +19091,35 @@ implementation FLib3MFBeamLattice_GetBeamSetCountFunc := LoadFunction('lib3mf_beamlattice_getbeamsetcount'); FLib3MFBeamLattice_AddBeamSetFunc := LoadFunction('lib3mf_beamlattice_addbeamset'); FLib3MFBeamLattice_GetBeamSetFunc := LoadFunction('lib3mf_beamlattice_getbeamset'); + FLib3MFFunctionReference_GetFunctionResourceIDFunc := LoadFunction('lib3mf_functionreference_getfunctionresourceid'); + FLib3MFFunctionReference_SetFunctionResourceIDFunc := LoadFunction('lib3mf_functionreference_setfunctionresourceid'); + FLib3MFFunctionReference_GetTransformFunc := LoadFunction('lib3mf_functionreference_gettransform'); + FLib3MFFunctionReference_SetTransformFunc := LoadFunction('lib3mf_functionreference_settransform'); + FLib3MFFunctionReference_GetChannelNameFunc := LoadFunction('lib3mf_functionreference_getchannelname'); + FLib3MFFunctionReference_SetChannelNameFunc := LoadFunction('lib3mf_functionreference_setchannelname'); + FLib3MFFunctionReference_SetMinFeatureSizeFunc := LoadFunction('lib3mf_functionreference_setminfeaturesize'); + FLib3MFFunctionReference_GetMinFeatureSizeFunc := LoadFunction('lib3mf_functionreference_getminfeaturesize'); + FLib3MFFunctionReference_SetFallBackValueFunc := LoadFunction('lib3mf_functionreference_setfallbackvalue'); + FLib3MFFunctionReference_GetFallBackValueFunc := LoadFunction('lib3mf_functionreference_getfallbackvalue'); + FLib3MFVolumeDataComposite_GetBaseMaterialGroupFunc := LoadFunction('lib3mf_volumedatacomposite_getbasematerialgroup'); + FLib3MFVolumeDataComposite_SetBaseMaterialGroupFunc := LoadFunction('lib3mf_volumedatacomposite_setbasematerialgroup'); + FLib3MFVolumeDataComposite_GetMaterialMappingCountFunc := LoadFunction('lib3mf_volumedatacomposite_getmaterialmappingcount'); + FLib3MFVolumeDataComposite_GetMaterialMappingFunc := LoadFunction('lib3mf_volumedatacomposite_getmaterialmapping'); + FLib3MFVolumeDataComposite_AddMaterialMappingFunc := LoadFunction('lib3mf_volumedatacomposite_addmaterialmapping'); + FLib3MFVolumeDataComposite_RemoveMaterialMappingFunc := LoadFunction('lib3mf_volumedatacomposite_removematerialmapping'); + FLib3MFVolumeDataProperty_GetNameFunc := LoadFunction('lib3mf_volumedataproperty_getname'); + FLib3MFVolumeDataProperty_SetIsRequiredFunc := LoadFunction('lib3mf_volumedataproperty_setisrequired'); + FLib3MFVolumeDataProperty_IsRequiredFunc := LoadFunction('lib3mf_volumedataproperty_isrequired'); + FLib3MFVolumeData_GetCompositeFunc := LoadFunction('lib3mf_volumedata_getcomposite'); + FLib3MFVolumeData_CreateNewCompositeFunc := LoadFunction('lib3mf_volumedata_createnewcomposite'); + FLib3MFVolumeData_RemoveCompositeFunc := LoadFunction('lib3mf_volumedata_removecomposite'); + FLib3MFVolumeData_GetColorFunc := LoadFunction('lib3mf_volumedata_getcolor'); + FLib3MFVolumeData_CreateNewColorFunc := LoadFunction('lib3mf_volumedata_createnewcolor'); + FLib3MFVolumeData_RemoveColorFunc := LoadFunction('lib3mf_volumedata_removecolor'); + FLib3MFVolumeData_GetPropertyCountFunc := LoadFunction('lib3mf_volumedata_getpropertycount'); + FLib3MFVolumeData_GetPropertyFunc := LoadFunction('lib3mf_volumedata_getproperty'); + FLib3MFVolumeData_AddPropertyFromFunctionFunc := LoadFunction('lib3mf_volumedata_addpropertyfromfunction'); + FLib3MFVolumeData_RemovePropertyFunc := LoadFunction('lib3mf_volumedata_removeproperty'); FLib3MFComponent_GetObjectResourceFunc := LoadFunction('lib3mf_component_getobjectresource'); FLib3MFComponent_GetObjectResourceIDFunc := LoadFunction('lib3mf_component_getobjectresourceid'); FLib3MFComponent_GetUUIDFunc := LoadFunction('lib3mf_component_getuuid'); @@ -10505,6 +19176,19 @@ implementation FLib3MFMultiPropertyGroup_AddLayerFunc := LoadFunction('lib3mf_multipropertygroup_addlayer'); FLib3MFMultiPropertyGroup_GetLayerFunc := LoadFunction('lib3mf_multipropertygroup_getlayer'); FLib3MFMultiPropertyGroup_RemoveLayerFunc := LoadFunction('lib3mf_multipropertygroup_removelayer'); + FLib3MFImage3D_GetNameFunc := LoadFunction('lib3mf_image3d_getname'); + FLib3MFImage3D_SetNameFunc := LoadFunction('lib3mf_image3d_setname'); + FLib3MFImage3D_IsImageStackFunc := LoadFunction('lib3mf_image3d_isimagestack'); + FLib3MFImageStack_GetRowCountFunc := LoadFunction('lib3mf_imagestack_getrowcount'); + FLib3MFImageStack_SetRowCountFunc := LoadFunction('lib3mf_imagestack_setrowcount'); + FLib3MFImageStack_GetColumnCountFunc := LoadFunction('lib3mf_imagestack_getcolumncount'); + FLib3MFImageStack_SetColumnCountFunc := LoadFunction('lib3mf_imagestack_setcolumncount'); + FLib3MFImageStack_GetSheetCountFunc := LoadFunction('lib3mf_imagestack_getsheetcount'); + FLib3MFImageStack_GetSheetFunc := LoadFunction('lib3mf_imagestack_getsheet'); + FLib3MFImageStack_SetSheetFunc := LoadFunction('lib3mf_imagestack_setsheet'); + FLib3MFImageStack_CreateEmptySheetFunc := LoadFunction('lib3mf_imagestack_createemptysheet'); + FLib3MFImageStack_CreateSheetFromBufferFunc := LoadFunction('lib3mf_imagestack_createsheetfrombuffer'); + FLib3MFImageStack_CreateSheetFromFileFunc := LoadFunction('lib3mf_imagestack_createsheetfromfile'); FLib3MFAttachment_GetPathFunc := LoadFunction('lib3mf_attachment_getpath'); FLib3MFAttachment_SetPathFunc := LoadFunction('lib3mf_attachment_setpath'); FLib3MFAttachment_PackagePartFunc := LoadFunction('lib3mf_attachment_packagepart'); @@ -10524,6 +19208,173 @@ implementation FLib3MFTexture2D_SetTileStyleUVFunc := LoadFunction('lib3mf_texture2d_settilestyleuv'); FLib3MFTexture2D_GetFilterFunc := LoadFunction('lib3mf_texture2d_getfilter'); FLib3MFTexture2D_SetFilterFunc := LoadFunction('lib3mf_texture2d_setfilter'); + FLib3MFImplicitPort_GetIdentifierFunc := LoadFunction('lib3mf_implicitport_getidentifier'); + FLib3MFImplicitPort_SetIdentifierFunc := LoadFunction('lib3mf_implicitport_setidentifier'); + FLib3MFImplicitPort_GetDisplayNameFunc := LoadFunction('lib3mf_implicitport_getdisplayname'); + FLib3MFImplicitPort_SetDisplayNameFunc := LoadFunction('lib3mf_implicitport_setdisplayname'); + FLib3MFImplicitPort_SetTypeFunc := LoadFunction('lib3mf_implicitport_settype'); + FLib3MFImplicitPort_GetTypeFunc := LoadFunction('lib3mf_implicitport_gettype'); + FLib3MFImplicitPort_GetReferenceFunc := LoadFunction('lib3mf_implicitport_getreference'); + FLib3MFImplicitPort_SetReferenceFunc := LoadFunction('lib3mf_implicitport_setreference'); + FLib3MFIterator_MoveNextFunc := LoadFunction('lib3mf_iterator_movenext'); + FLib3MFIterator_MovePreviousFunc := LoadFunction('lib3mf_iterator_moveprevious'); + FLib3MFIterator_CountFunc := LoadFunction('lib3mf_iterator_count'); + FLib3MFImplicitPortIterator_GetCurrentFunc := LoadFunction('lib3mf_implicitportiterator_getcurrent'); + FLib3MFImplicitNode_GetIdentifierFunc := LoadFunction('lib3mf_implicitnode_getidentifier'); + FLib3MFImplicitNode_SetIdentifierFunc := LoadFunction('lib3mf_implicitnode_setidentifier'); + FLib3MFImplicitNode_GetDisplayNameFunc := LoadFunction('lib3mf_implicitnode_getdisplayname'); + FLib3MFImplicitNode_SetDisplayNameFunc := LoadFunction('lib3mf_implicitnode_setdisplayname'); + FLib3MFImplicitNode_GetTagFunc := LoadFunction('lib3mf_implicitnode_gettag'); + FLib3MFImplicitNode_SetTagFunc := LoadFunction('lib3mf_implicitnode_settag'); + FLib3MFImplicitNode_GetNodeTypeFunc := LoadFunction('lib3mf_implicitnode_getnodetype'); + FLib3MFImplicitNode_AddInputFunc := LoadFunction('lib3mf_implicitnode_addinput'); + FLib3MFImplicitNode_GetInputsFunc := LoadFunction('lib3mf_implicitnode_getinputs'); + FLib3MFImplicitNode_AddOutputFunc := LoadFunction('lib3mf_implicitnode_addoutput'); + FLib3MFImplicitNode_GetOutputsFunc := LoadFunction('lib3mf_implicitnode_getoutputs'); + FLib3MFImplicitNode_FindInputFunc := LoadFunction('lib3mf_implicitnode_findinput'); + FLib3MFImplicitNode_FindOutputFunc := LoadFunction('lib3mf_implicitnode_findoutput'); + FLib3MFImplicitNode_AreTypesValidFunc := LoadFunction('lib3mf_implicitnode_aretypesvalid'); + FLib3MFOneInputNode_GetInputAFunc := LoadFunction('lib3mf_oneinputnode_getinputa'); + FLib3MFOneInputNode_GetOutputResultFunc := LoadFunction('lib3mf_oneinputnode_getoutputresult'); + FLib3MFResourceIdNode_SetResourceFunc := LoadFunction('lib3mf_resourceidnode_setresource'); + FLib3MFResourceIdNode_GetResourceFunc := LoadFunction('lib3mf_resourceidnode_getresource'); + FLib3MFResourceIdNode_GetOutputValueFunc := LoadFunction('lib3mf_resourceidnode_getoutputvalue'); + FLib3MFTwoInputNode_GetInputBFunc := LoadFunction('lib3mf_twoinputnode_getinputb'); + FLib3MFSelectNode_GetInputBFunc := LoadFunction('lib3mf_selectnode_getinputb'); + FLib3MFSelectNode_GetInputCFunc := LoadFunction('lib3mf_selectnode_getinputc'); + FLib3MFSelectNode_GetInputDFunc := LoadFunction('lib3mf_selectnode_getinputd'); + FLib3MFClampNode_GetInputMinFunc := LoadFunction('lib3mf_clampnode_getinputmin'); + FLib3MFClampNode_GetInputMaxFunc := LoadFunction('lib3mf_clampnode_getinputmax'); + FLib3MFComposeVectorNode_GetInputXFunc := LoadFunction('lib3mf_composevectornode_getinputx'); + FLib3MFComposeVectorNode_GetInputYFunc := LoadFunction('lib3mf_composevectornode_getinputy'); + FLib3MFComposeVectorNode_GetInputZFunc := LoadFunction('lib3mf_composevectornode_getinputz'); + FLib3MFComposeVectorNode_GetOutputResultFunc := LoadFunction('lib3mf_composevectornode_getoutputresult'); + FLib3MFDecomposeVectorNode_GetInputAFunc := LoadFunction('lib3mf_decomposevectornode_getinputa'); + FLib3MFDecomposeVectorNode_GetOutputXFunc := LoadFunction('lib3mf_decomposevectornode_getoutputx'); + FLib3MFDecomposeVectorNode_GetOutputYFunc := LoadFunction('lib3mf_decomposevectornode_getoutputy'); + FLib3MFDecomposeVectorNode_GetOutputZFunc := LoadFunction('lib3mf_decomposevectornode_getoutputz'); + FLib3MFComposeMatrixNode_GetInputM00Func := LoadFunction('lib3mf_composematrixnode_getinputm00'); + FLib3MFComposeMatrixNode_GetInputM01Func := LoadFunction('lib3mf_composematrixnode_getinputm01'); + FLib3MFComposeMatrixNode_GetInputM02Func := LoadFunction('lib3mf_composematrixnode_getinputm02'); + FLib3MFComposeMatrixNode_GetInputM03Func := LoadFunction('lib3mf_composematrixnode_getinputm03'); + FLib3MFComposeMatrixNode_GetInputM10Func := LoadFunction('lib3mf_composematrixnode_getinputm10'); + FLib3MFComposeMatrixNode_GetInputM11Func := LoadFunction('lib3mf_composematrixnode_getinputm11'); + FLib3MFComposeMatrixNode_GetInputM12Func := LoadFunction('lib3mf_composematrixnode_getinputm12'); + FLib3MFComposeMatrixNode_GetInputM13Func := LoadFunction('lib3mf_composematrixnode_getinputm13'); + FLib3MFComposeMatrixNode_GetInputM20Func := LoadFunction('lib3mf_composematrixnode_getinputm20'); + FLib3MFComposeMatrixNode_GetInputM21Func := LoadFunction('lib3mf_composematrixnode_getinputm21'); + FLib3MFComposeMatrixNode_GetInputM22Func := LoadFunction('lib3mf_composematrixnode_getinputm22'); + FLib3MFComposeMatrixNode_GetInputM23Func := LoadFunction('lib3mf_composematrixnode_getinputm23'); + FLib3MFComposeMatrixNode_GetInputM30Func := LoadFunction('lib3mf_composematrixnode_getinputm30'); + FLib3MFComposeMatrixNode_GetInputM31Func := LoadFunction('lib3mf_composematrixnode_getinputm31'); + FLib3MFComposeMatrixNode_GetInputM32Func := LoadFunction('lib3mf_composematrixnode_getinputm32'); + FLib3MFComposeMatrixNode_GetInputM33Func := LoadFunction('lib3mf_composematrixnode_getinputm33'); + FLib3MFComposeMatrixNode_GetOutputResultFunc := LoadFunction('lib3mf_composematrixnode_getoutputresult'); + FLib3MFMatrixFromRowsNode_GetInputAFunc := LoadFunction('lib3mf_matrixfromrowsnode_getinputa'); + FLib3MFMatrixFromRowsNode_GetInputBFunc := LoadFunction('lib3mf_matrixfromrowsnode_getinputb'); + FLib3MFMatrixFromRowsNode_GetInputCFunc := LoadFunction('lib3mf_matrixfromrowsnode_getinputc'); + FLib3MFMatrixFromRowsNode_GetInputDFunc := LoadFunction('lib3mf_matrixfromrowsnode_getinputd'); + FLib3MFMatrixFromRowsNode_GetOutputResultFunc := LoadFunction('lib3mf_matrixfromrowsnode_getoutputresult'); + FLib3MFMatrixFromColumnsNode_GetInputAFunc := LoadFunction('lib3mf_matrixfromcolumnsnode_getinputa'); + FLib3MFMatrixFromColumnsNode_GetInputBFunc := LoadFunction('lib3mf_matrixfromcolumnsnode_getinputb'); + FLib3MFMatrixFromColumnsNode_GetInputCFunc := LoadFunction('lib3mf_matrixfromcolumnsnode_getinputc'); + FLib3MFMatrixFromColumnsNode_GetInputDFunc := LoadFunction('lib3mf_matrixfromcolumnsnode_getinputd'); + FLib3MFMatrixFromColumnsNode_GetOutputResultFunc := LoadFunction('lib3mf_matrixfromcolumnsnode_getoutputresult'); + FLib3MFConstantNode_SetConstantFunc := LoadFunction('lib3mf_constantnode_setconstant'); + FLib3MFConstantNode_GetConstantFunc := LoadFunction('lib3mf_constantnode_getconstant'); + FLib3MFConstantNode_GetOutputValueFunc := LoadFunction('lib3mf_constantnode_getoutputvalue'); + FLib3MFConstVecNode_SetVectorFunc := LoadFunction('lib3mf_constvecnode_setvector'); + FLib3MFConstVecNode_GetVectorFunc := LoadFunction('lib3mf_constvecnode_getvector'); + FLib3MFConstVecNode_GetOutputVectorFunc := LoadFunction('lib3mf_constvecnode_getoutputvector'); + FLib3MFConstMatNode_SetMatrixFunc := LoadFunction('lib3mf_constmatnode_setmatrix'); + FLib3MFConstMatNode_GetMatrixFunc := LoadFunction('lib3mf_constmatnode_getmatrix'); + FLib3MFConstMatNode_GetOutputMatrixFunc := LoadFunction('lib3mf_constmatnode_getoutputmatrix'); + FLib3MFMeshNode_GetInputMeshFunc := LoadFunction('lib3mf_meshnode_getinputmesh'); + FLib3MFMeshNode_GetInputPosFunc := LoadFunction('lib3mf_meshnode_getinputpos'); + FLib3MFMeshNode_GetOutputDistanceFunc := LoadFunction('lib3mf_meshnode_getoutputdistance'); + FLib3MFUnsignedMeshNode_GetInputMeshFunc := LoadFunction('lib3mf_unsignedmeshnode_getinputmesh'); + FLib3MFUnsignedMeshNode_GetInputPosFunc := LoadFunction('lib3mf_unsignedmeshnode_getinputpos'); + FLib3MFUnsignedMeshNode_GetOutputDistanceFunc := LoadFunction('lib3mf_unsignedmeshnode_getoutputdistance'); + FLib3MFFunctionCallNode_GetInputFunctionIDFunc := LoadFunction('lib3mf_functioncallnode_getinputfunctionid'); + FLib3MFNodeIterator_GetCurrentFunc := LoadFunction('lib3mf_nodeiterator_getcurrent'); + FLib3MFFunction_GetDisplayNameFunc := LoadFunction('lib3mf_function_getdisplayname'); + FLib3MFFunction_SetDisplayNameFunc := LoadFunction('lib3mf_function_setdisplayname'); + FLib3MFFunction_AddInputFunc := LoadFunction('lib3mf_function_addinput'); + FLib3MFFunction_GetInputsFunc := LoadFunction('lib3mf_function_getinputs'); + FLib3MFFunction_RemoveInputFunc := LoadFunction('lib3mf_function_removeinput'); + FLib3MFFunction_AddOutputFunc := LoadFunction('lib3mf_function_addoutput'); + FLib3MFFunction_GetOutputsFunc := LoadFunction('lib3mf_function_getoutputs'); + FLib3MFFunction_RemoveOutputFunc := LoadFunction('lib3mf_function_removeoutput'); + FLib3MFFunction_FindInputFunc := LoadFunction('lib3mf_function_findinput'); + FLib3MFFunction_FindOutputFunc := LoadFunction('lib3mf_function_findoutput'); + FLib3MFImplicitFunction_GetIdentifierFunc := LoadFunction('lib3mf_implicitfunction_getidentifier'); + FLib3MFImplicitFunction_SetIdentifierFunc := LoadFunction('lib3mf_implicitfunction_setidentifier'); + FLib3MFImplicitFunction_AddNodeFunc := LoadFunction('lib3mf_implicitfunction_addnode'); + FLib3MFImplicitFunction_AddSinNodeFunc := LoadFunction('lib3mf_implicitfunction_addsinnode'); + FLib3MFImplicitFunction_AddCosNodeFunc := LoadFunction('lib3mf_implicitfunction_addcosnode'); + FLib3MFImplicitFunction_AddTanNodeFunc := LoadFunction('lib3mf_implicitfunction_addtannode'); + FLib3MFImplicitFunction_AddArcSinNodeFunc := LoadFunction('lib3mf_implicitfunction_addarcsinnode'); + FLib3MFImplicitFunction_AddArcCosNodeFunc := LoadFunction('lib3mf_implicitfunction_addarccosnode'); + FLib3MFImplicitFunction_AddArcTan2NodeFunc := LoadFunction('lib3mf_implicitfunction_addarctan2node'); + FLib3MFImplicitFunction_AddSinhNodeFunc := LoadFunction('lib3mf_implicitfunction_addsinhnode'); + FLib3MFImplicitFunction_AddCoshNodeFunc := LoadFunction('lib3mf_implicitfunction_addcoshnode'); + FLib3MFImplicitFunction_AddTanhNodeFunc := LoadFunction('lib3mf_implicitfunction_addtanhnode'); + FLib3MFImplicitFunction_AddRoundNodeFunc := LoadFunction('lib3mf_implicitfunction_addroundnode'); + FLib3MFImplicitFunction_AddCeilNodeFunc := LoadFunction('lib3mf_implicitfunction_addceilnode'); + FLib3MFImplicitFunction_AddFloorNodeFunc := LoadFunction('lib3mf_implicitfunction_addfloornode'); + FLib3MFImplicitFunction_AddSignNodeFunc := LoadFunction('lib3mf_implicitfunction_addsignnode'); + FLib3MFImplicitFunction_AddFractNodeFunc := LoadFunction('lib3mf_implicitfunction_addfractnode'); + FLib3MFImplicitFunction_AddAbsNodeFunc := LoadFunction('lib3mf_implicitfunction_addabsnode'); + FLib3MFImplicitFunction_AddExpNodeFunc := LoadFunction('lib3mf_implicitfunction_addexpnode'); + FLib3MFImplicitFunction_AddLogNodeFunc := LoadFunction('lib3mf_implicitfunction_addlognode'); + FLib3MFImplicitFunction_AddLog2NodeFunc := LoadFunction('lib3mf_implicitfunction_addlog2node'); + FLib3MFImplicitFunction_AddLog10NodeFunc := LoadFunction('lib3mf_implicitfunction_addlog10node'); + FLib3MFImplicitFunction_AddLengthNodeFunc := LoadFunction('lib3mf_implicitfunction_addlengthnode'); + FLib3MFImplicitFunction_AddTransposeNodeFunc := LoadFunction('lib3mf_implicitfunction_addtransposenode'); + FLib3MFImplicitFunction_InverseNodeFunc := LoadFunction('lib3mf_implicitfunction_inversenode'); + FLib3MFImplicitFunction_AddSqrtNodeFunc := LoadFunction('lib3mf_implicitfunction_addsqrtnode'); + FLib3MFImplicitFunction_AddResourceIdNodeFunc := LoadFunction('lib3mf_implicitfunction_addresourceidnode'); + FLib3MFImplicitFunction_AddAdditionNodeFunc := LoadFunction('lib3mf_implicitfunction_addadditionnode'); + FLib3MFImplicitFunction_AddSubtractionNodeFunc := LoadFunction('lib3mf_implicitfunction_addsubtractionnode'); + FLib3MFImplicitFunction_AddMultiplicationNodeFunc := LoadFunction('lib3mf_implicitfunction_addmultiplicationnode'); + FLib3MFImplicitFunction_AddDivisionNodeFunc := LoadFunction('lib3mf_implicitfunction_adddivisionnode'); + FLib3MFImplicitFunction_AddDotNodeFunc := LoadFunction('lib3mf_implicitfunction_adddotnode'); + FLib3MFImplicitFunction_AddCrossNodeFunc := LoadFunction('lib3mf_implicitfunction_addcrossnode'); + FLib3MFImplicitFunction_AddMatVecMultiplicationNodeFunc := LoadFunction('lib3mf_implicitfunction_addmatvecmultiplicationnode'); + FLib3MFImplicitFunction_AddMinNodeFunc := LoadFunction('lib3mf_implicitfunction_addminnode'); + FLib3MFImplicitFunction_AddMaxNodeFunc := LoadFunction('lib3mf_implicitfunction_addmaxnode'); + FLib3MFImplicitFunction_AddFmodNodeFunc := LoadFunction('lib3mf_implicitfunction_addfmodnode'); + FLib3MFImplicitFunction_AddPowNodeFunc := LoadFunction('lib3mf_implicitfunction_addpownode'); + FLib3MFImplicitFunction_AddSelectNodeFunc := LoadFunction('lib3mf_implicitfunction_addselectnode'); + FLib3MFImplicitFunction_AddClampNodeFunc := LoadFunction('lib3mf_implicitfunction_addclampnode'); + FLib3MFImplicitFunction_AddComposeVectorNodeFunc := LoadFunction('lib3mf_implicitfunction_addcomposevectornode'); + FLib3MFImplicitFunction_AddVectorFromScalarNodeFunc := LoadFunction('lib3mf_implicitfunction_addvectorfromscalarnode'); + FLib3MFImplicitFunction_AddDecomposeVectorNodeFunc := LoadFunction('lib3mf_implicitfunction_adddecomposevectornode'); + FLib3MFImplicitFunction_AddComposeMatrixNodeFunc := LoadFunction('lib3mf_implicitfunction_addcomposematrixnode'); + FLib3MFImplicitFunction_AddMatrixFromRowsNodeFunc := LoadFunction('lib3mf_implicitfunction_addmatrixfromrowsnode'); + FLib3MFImplicitFunction_AddMatrixFromColumnsNodeFunc := LoadFunction('lib3mf_implicitfunction_addmatrixfromcolumnsnode'); + FLib3MFImplicitFunction_AddConstantNodeFunc := LoadFunction('lib3mf_implicitfunction_addconstantnode'); + FLib3MFImplicitFunction_AddConstVecNodeFunc := LoadFunction('lib3mf_implicitfunction_addconstvecnode'); + FLib3MFImplicitFunction_AddConstMatNodeFunc := LoadFunction('lib3mf_implicitfunction_addconstmatnode'); + FLib3MFImplicitFunction_AddMeshNodeFunc := LoadFunction('lib3mf_implicitfunction_addmeshnode'); + FLib3MFImplicitFunction_AddUnsignedMeshNodeFunc := LoadFunction('lib3mf_implicitfunction_addunsignedmeshnode'); + FLib3MFImplicitFunction_AddFunctionCallNodeFunc := LoadFunction('lib3mf_implicitfunction_addfunctioncallnode'); + FLib3MFImplicitFunction_GetNodesFunc := LoadFunction('lib3mf_implicitfunction_getnodes'); + FLib3MFImplicitFunction_RemoveNodeFunc := LoadFunction('lib3mf_implicitfunction_removenode'); + FLib3MFImplicitFunction_AddLinkFunc := LoadFunction('lib3mf_implicitfunction_addlink'); + FLib3MFImplicitFunction_AddLinkByNamesFunc := LoadFunction('lib3mf_implicitfunction_addlinkbynames'); + FLib3MFImplicitFunction_ClearFunc := LoadFunction('lib3mf_implicitfunction_clear'); + FLib3MFImplicitFunction_SortNodesTopologicallyFunc := LoadFunction('lib3mf_implicitfunction_sortnodestopologically'); + FLib3MFFunctionFromImage3D_GetImage3DFunc := LoadFunction('lib3mf_functionfromimage3d_getimage3d'); + FLib3MFFunctionFromImage3D_SetImage3DFunc := LoadFunction('lib3mf_functionfromimage3d_setimage3d'); + FLib3MFFunctionFromImage3D_SetFilterFunc := LoadFunction('lib3mf_functionfromimage3d_setfilter'); + FLib3MFFunctionFromImage3D_GetFilterFunc := LoadFunction('lib3mf_functionfromimage3d_getfilter'); + FLib3MFFunctionFromImage3D_SetTileStylesFunc := LoadFunction('lib3mf_functionfromimage3d_settilestyles'); + FLib3MFFunctionFromImage3D_GetTileStylesFunc := LoadFunction('lib3mf_functionfromimage3d_gettilestyles'); + FLib3MFFunctionFromImage3D_GetOffsetFunc := LoadFunction('lib3mf_functionfromimage3d_getoffset'); + FLib3MFFunctionFromImage3D_SetOffsetFunc := LoadFunction('lib3mf_functionfromimage3d_setoffset'); + FLib3MFFunctionFromImage3D_GetScaleFunc := LoadFunction('lib3mf_functionfromimage3d_getscale'); + FLib3MFFunctionFromImage3D_SetScaleFunc := LoadFunction('lib3mf_functionfromimage3d_setscale'); FLib3MFBuildItem_GetObjectResourceFunc := LoadFunction('lib3mf_builditem_getobjectresource'); FLib3MFBuildItem_GetUUIDFunc := LoadFunction('lib3mf_builditem_getuuid'); FLib3MFBuildItem_SetUUIDFunc := LoadFunction('lib3mf_builditem_setuuid'); @@ -10618,6 +19469,7 @@ implementation FLib3MFModel_GetComponentsObjectByIDFunc := LoadFunction('lib3mf_model_getcomponentsobjectbyid'); FLib3MFModel_GetColorGroupByIDFunc := LoadFunction('lib3mf_model_getcolorgroupbyid'); FLib3MFModel_GetSliceStackByIDFunc := LoadFunction('lib3mf_model_getslicestackbyid'); + FLib3MFModel_GetLevelSetByIDFunc := LoadFunction('lib3mf_model_getlevelsetbyid'); FLib3MFModel_GetBuildUUIDFunc := LoadFunction('lib3mf_model_getbuilduuid'); FLib3MFModel_SetBuildUUIDFunc := LoadFunction('lib3mf_model_setbuilduuid'); FLib3MFModel_GetBuildItemsFunc := LoadFunction('lib3mf_model_getbuilditems'); @@ -10633,7 +19485,9 @@ implementation FLib3MFModel_GetCompositeMaterialsFunc := LoadFunction('lib3mf_model_getcompositematerials'); FLib3MFModel_GetMultiPropertyGroupsFunc := LoadFunction('lib3mf_model_getmultipropertygroups'); FLib3MFModel_GetSliceStacksFunc := LoadFunction('lib3mf_model_getslicestacks'); + FLib3MFModel_GetImage3DsFunc := LoadFunction('lib3mf_model_getimage3ds'); FLib3MFModel_MergeToModelFunc := LoadFunction('lib3mf_model_mergetomodel'); + FLib3MFModel_MergeFromModelFunc := LoadFunction('lib3mf_model_mergefrommodel'); FLib3MFModel_AddMeshObjectFunc := LoadFunction('lib3mf_model_addmeshobject'); FLib3MFModel_AddComponentsObjectFunc := LoadFunction('lib3mf_model_addcomponentsobject'); FLib3MFModel_AddSliceStackFunc := LoadFunction('lib3mf_model_addslicestack'); @@ -10643,6 +19497,8 @@ implementation FLib3MFModel_AddTexture2DGroupFunc := LoadFunction('lib3mf_model_addtexture2dgroup'); FLib3MFModel_AddCompositeMaterialsFunc := LoadFunction('lib3mf_model_addcompositematerials'); FLib3MFModel_AddMultiPropertyGroupFunc := LoadFunction('lib3mf_model_addmultipropertygroup'); + FLib3MFModel_AddImageStackFunc := LoadFunction('lib3mf_model_addimagestack'); + FLib3MFModel_GetImageStackByIDFunc := LoadFunction('lib3mf_model_getimagestackbyid'); FLib3MFModel_AddBuildItemFunc := LoadFunction('lib3mf_model_addbuilditem'); FLib3MFModel_RemoveBuildItemFunc := LoadFunction('lib3mf_model_removebuilditem'); FLib3MFModel_GetMetaDataGroupFunc := LoadFunction('lib3mf_model_getmetadatagroup'); @@ -10659,6 +19515,13 @@ implementation FLib3MFModel_RemoveCustomContentTypeFunc := LoadFunction('lib3mf_model_removecustomcontenttype'); FLib3MFModel_SetRandomNumberCallbackFunc := LoadFunction('lib3mf_model_setrandomnumbercallback'); FLib3MFModel_GetKeyStoreFunc := LoadFunction('lib3mf_model_getkeystore'); + FLib3MFModel_GetFunctionsFunc := LoadFunction('lib3mf_model_getfunctions'); + FLib3MFModel_AddImplicitFunctionFunc := LoadFunction('lib3mf_model_addimplicitfunction'); + FLib3MFModel_AddFunctionFromImage3DFunc := LoadFunction('lib3mf_model_addfunctionfromimage3d'); + FLib3MFModel_AddVolumeDataFunc := LoadFunction('lib3mf_model_addvolumedata'); + FLib3MFModel_AddLevelSetFunc := LoadFunction('lib3mf_model_addlevelset'); + FLib3MFModel_GetLevelSetsFunc := LoadFunction('lib3mf_model_getlevelsets'); + FLib3MFModel_RemoveResourceFunc := LoadFunction('lib3mf_model_removeresource'); FLib3MFGetLibraryVersionFunc := LoadFunction('lib3mf_getlibraryversion'); FLib3MFGetPrereleaseInformationFunc := LoadFunction('lib3mf_getprereleaseinformation'); FLib3MFGetBuildInformationFunc := LoadFunction('lib3mf_getbuildinformation'); @@ -10692,616 +19555,1309 @@ implementation AResult := ALookupMethod(PAnsiChar('lib3mf_base_classtypeid'), @FLib3MFBase_ClassTypeIdFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_writetofile'), @FLib3MFWriter_WriteToFileFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_writetofile'), @FLib3MFWriter_WriteToFileFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_getstreamsize'), @FLib3MFWriter_GetStreamSizeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_writetobuffer'), @FLib3MFWriter_WriteToBufferFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_writetocallback'), @FLib3MFWriter_WriteToCallbackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_setprogresscallback'), @FLib3MFWriter_SetProgressCallbackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_getdecimalprecision'), @FLib3MFWriter_GetDecimalPrecisionFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_setdecimalprecision'), @FLib3MFWriter_SetDecimalPrecisionFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_setstrictmodeactive'), @FLib3MFWriter_SetStrictModeActiveFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_getstrictmodeactive'), @FLib3MFWriter_GetStrictModeActiveFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_getwarning'), @FLib3MFWriter_GetWarningFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_getwarningcount'), @FLib3MFWriter_GetWarningCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_addkeywrappingcallback'), @FLib3MFWriter_AddKeyWrappingCallbackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_writer_setcontentencryptioncallback'), @FLib3MFWriter_SetContentEncryptionCallbackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_readfromfile'), @FLib3MFReader_ReadFromFileFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_readfrombuffer'), @FLib3MFReader_ReadFromBufferFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_readfromcallback'), @FLib3MFReader_ReadFromCallbackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_setprogresscallback'), @FLib3MFReader_SetProgressCallbackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_addrelationtoread'), @FLib3MFReader_AddRelationToReadFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_removerelationtoread'), @FLib3MFReader_RemoveRelationToReadFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_setstrictmodeactive'), @FLib3MFReader_SetStrictModeActiveFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_getstrictmodeactive'), @FLib3MFReader_GetStrictModeActiveFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_getwarning'), @FLib3MFReader_GetWarningFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_getwarningcount'), @FLib3MFReader_GetWarningCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_addkeywrappingcallback'), @FLib3MFReader_AddKeyWrappingCallbackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_reader_setcontentencryptioncallback'), @FLib3MFReader_SetContentEncryptionCallbackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_packagepart_getpath'), @FLib3MFPackagePart_GetPathFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_packagepart_setpath'), @FLib3MFPackagePart_SetPathFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_resource_getresourceid'), @FLib3MFResource_GetResourceIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_resource_getuniqueresourceid'), @FLib3MFResource_GetUniqueResourceIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_resource_packagepart'), @FLib3MFResource_PackagePartFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_resource_setpackagepart'), @FLib3MFResource_SetPackagePartFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_resource_getmodelresourceid'), @FLib3MFResource_GetModelResourceIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_resourceiterator_movenext'), @FLib3MFResourceIterator_MoveNextFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_resourceiterator_moveprevious'), @FLib3MFResourceIterator_MovePreviousFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_resourceiterator_getcurrent'), @FLib3MFResourceIterator_GetCurrentFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_resourceiterator_clone'), @FLib3MFResourceIterator_CloneFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_resourceiterator_count'), @FLib3MFResourceIterator_CountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_slicestackiterator_getcurrentslicestack'), @FLib3MFSliceStackIterator_GetCurrentSliceStackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_objectiterator_getcurrentobject'), @FLib3MFObjectIterator_GetCurrentObjectFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobjectiterator_getcurrentmeshobject'), @FLib3MFMeshObjectIterator_GetCurrentMeshObjectFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_componentsobjectiterator_getcurrentcomponentsobject'), @FLib3MFComponentsObjectIterator_GetCurrentComponentsObjectFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2diterator_getcurrenttexture2d'), @FLib3MFTexture2DIterator_GetCurrentTexture2DFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup'), @FLib3MFBaseMaterialGroupIterator_GetCurrentBaseMaterialGroupFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroupiterator_getcurrentcolorgroup'), @FLib3MFColorGroupIterator_GetCurrentColorGroupFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup'), @FLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerialsiterator_getcurrentcompositematerials'), @FLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup'), @FLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_image3diterator_getcurrentimage3d'), @FLib3MFImage3DIterator_GetCurrentImage3DFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functioniterator_getcurrentfunction'), @FLib3MFFunctionIterator_GetCurrentFunctionFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelsetiterator_getcurrentlevelset'), @FLib3MFLevelSetIterator_GetCurrentLevelSetFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_getnamespace'), @FLib3MFMetaData_GetNameSpaceFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_setnamespace'), @FLib3MFMetaData_SetNameSpaceFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_getname'), @FLib3MFMetaData_GetNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_setname'), @FLib3MFMetaData_SetNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_getkey'), @FLib3MFMetaData_GetKeyFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_getmustpreserve'), @FLib3MFMetaData_GetMustPreserveFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_setmustpreserve'), @FLib3MFMetaData_SetMustPreserveFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_gettype'), @FLib3MFMetaData_GetTypeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_settype'), @FLib3MFMetaData_SetTypeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_getvalue'), @FLib3MFMetaData_GetValueFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_setvalue'), @FLib3MFMetaData_SetValueFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_getmetadatacount'), @FLib3MFMetaDataGroup_GetMetaDataCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_getmetadata'), @FLib3MFMetaDataGroup_GetMetaDataFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_getmetadatabykey'), @FLib3MFMetaDataGroup_GetMetaDataByKeyFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_removemetadatabyindex'), @FLib3MFMetaDataGroup_RemoveMetaDataByIndexFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_removemetadata'), @FLib3MFMetaDataGroup_RemoveMetaDataFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_addmetadata'), @FLib3MFMetaDataGroup_AddMetaDataFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_gettype'), @FLib3MFObject_GetTypeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_settype'), @FLib3MFObject_SetTypeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_getname'), @FLib3MFObject_GetNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_setname'), @FLib3MFObject_SetNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_getpartnumber'), @FLib3MFObject_GetPartNumberFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_setpartnumber'), @FLib3MFObject_SetPartNumberFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_ismeshobject'), @FLib3MFObject_IsMeshObjectFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_iscomponentsobject'), @FLib3MFObject_IsComponentsObjectFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_islevelsetobject'), @FLib3MFObject_IsLevelSetObjectFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_isvalid'), @FLib3MFObject_IsValidFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_setattachmentasthumbnail'), @FLib3MFObject_SetAttachmentAsThumbnailFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_getthumbnailattachment'), @FLib3MFObject_GetThumbnailAttachmentFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_clearthumbnailattachment'), @FLib3MFObject_ClearThumbnailAttachmentFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_getoutbox'), @FLib3MFObject_GetOutboxFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_getuuid'), @FLib3MFObject_GetUUIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_setuuid'), @FLib3MFObject_SetUUIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_getmetadatagroup'), @FLib3MFObject_GetMetaDataGroupFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_setslicesmeshresolution'), @FLib3MFObject_SetSlicesMeshResolutionFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_getslicesmeshresolution'), @FLib3MFObject_GetSlicesMeshResolutionFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_hasslices'), @FLib3MFObject_HasSlicesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_clearslicestack'), @FLib3MFObject_ClearSliceStackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_getslicestack'), @FLib3MFObject_GetSliceStackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_object_assignslicestack'), @FLib3MFObject_AssignSliceStackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_getvertexcount'), @FLib3MFMeshObject_GetVertexCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_gettrianglecount'), @FLib3MFMeshObject_GetTriangleCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_getvertex'), @FLib3MFMeshObject_GetVertexFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_setvertex'), @FLib3MFMeshObject_SetVertexFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_addvertex'), @FLib3MFMeshObject_AddVertexFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_getvertices'), @FLib3MFMeshObject_GetVerticesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_gettriangle'), @FLib3MFMeshObject_GetTriangleFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_settriangle'), @FLib3MFMeshObject_SetTriangleFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_addtriangle'), @FLib3MFMeshObject_AddTriangleFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_gettriangleindices'), @FLib3MFMeshObject_GetTriangleIndicesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_setobjectlevelproperty'), @FLib3MFMeshObject_SetObjectLevelPropertyFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_getobjectlevelproperty'), @FLib3MFMeshObject_GetObjectLevelPropertyFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_settriangleproperties'), @FLib3MFMeshObject_SetTrianglePropertiesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_gettriangleproperties'), @FLib3MFMeshObject_GetTrianglePropertiesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_setalltriangleproperties'), @FLib3MFMeshObject_SetAllTrianglePropertiesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_getalltriangleproperties'), @FLib3MFMeshObject_GetAllTrianglePropertiesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_clearallproperties'), @FLib3MFMeshObject_ClearAllPropertiesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_setgeometry'), @FLib3MFMeshObject_SetGeometryFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_ismanifoldandoriented'), @FLib3MFMeshObject_IsManifoldAndOrientedFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_beamlattice'), @FLib3MFMeshObject_BeamLatticeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_getvolumedata'), @FLib3MFMeshObject_GetVolumeDataFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_setvolumedata'), @FLib3MFMeshObject_SetVolumeDataFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_getfunction'), @FLib3MFLevelSet_GetFunctionFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_setfunction'), @FLib3MFLevelSet_SetFunctionFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_gettransform'), @FLib3MFLevelSet_GetTransformFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_settransform'), @FLib3MFLevelSet_SetTransformFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_getchannelname'), @FLib3MFLevelSet_GetChannelNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_setchannelname'), @FLib3MFLevelSet_SetChannelNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_setminfeaturesize'), @FLib3MFLevelSet_SetMinFeatureSizeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_getminfeaturesize'), @FLib3MFLevelSet_GetMinFeatureSizeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_setfallbackvalue'), @FLib3MFLevelSet_SetFallBackValueFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_getfallbackvalue'), @FLib3MFLevelSet_GetFallBackValueFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_setmeshbboxonly'), @FLib3MFLevelSet_SetMeshBBoxOnlyFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_getmeshbboxonly'), @FLib3MFLevelSet_GetMeshBBoxOnlyFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_setmesh'), @FLib3MFLevelSet_SetMeshFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_getmesh'), @FLib3MFLevelSet_GetMeshFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_getvolumedata'), @FLib3MFLevelSet_GetVolumeDataFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_levelset_setvolumedata'), @FLib3MFLevelSet_SetVolumeDataFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getminlength'), @FLib3MFBeamLattice_GetMinLengthFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setminlength'), @FLib3MFBeamLattice_SetMinLengthFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getclipping'), @FLib3MFBeamLattice_GetClippingFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setclipping'), @FLib3MFBeamLattice_SetClippingFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getrepresentation'), @FLib3MFBeamLattice_GetRepresentationFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setrepresentation'), @FLib3MFBeamLattice_SetRepresentationFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getballoptions'), @FLib3MFBeamLattice_GetBallOptionsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setballoptions'), @FLib3MFBeamLattice_SetBallOptionsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getbeamcount'), @FLib3MFBeamLattice_GetBeamCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getbeam'), @FLib3MFBeamLattice_GetBeamFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_addbeam'), @FLib3MFBeamLattice_AddBeamFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setbeam'), @FLib3MFBeamLattice_SetBeamFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setbeams'), @FLib3MFBeamLattice_SetBeamsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getbeams'), @FLib3MFBeamLattice_GetBeamsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getballcount'), @FLib3MFBeamLattice_GetBallCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getball'), @FLib3MFBeamLattice_GetBallFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_addball'), @FLib3MFBeamLattice_AddBallFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setball'), @FLib3MFBeamLattice_SetBallFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setballs'), @FLib3MFBeamLattice_SetBallsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getballs'), @FLib3MFBeamLattice_GetBallsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getbeamsetcount'), @FLib3MFBeamLattice_GetBeamSetCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_addbeamset'), @FLib3MFBeamLattice_AddBeamSetFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getbeamset'), @FLib3MFBeamLattice_GetBeamSetFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionreference_getfunctionresourceid'), @FLib3MFFunctionReference_GetFunctionResourceIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionreference_setfunctionresourceid'), @FLib3MFFunctionReference_SetFunctionResourceIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionreference_gettransform'), @FLib3MFFunctionReference_GetTransformFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionreference_settransform'), @FLib3MFFunctionReference_SetTransformFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionreference_getchannelname'), @FLib3MFFunctionReference_GetChannelNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionreference_setchannelname'), @FLib3MFFunctionReference_SetChannelNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionreference_setminfeaturesize'), @FLib3MFFunctionReference_SetMinFeatureSizeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionreference_getminfeaturesize'), @FLib3MFFunctionReference_GetMinFeatureSizeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionreference_setfallbackvalue'), @FLib3MFFunctionReference_SetFallBackValueFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionreference_getfallbackvalue'), @FLib3MFFunctionReference_GetFallBackValueFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedatacomposite_getbasematerialgroup'), @FLib3MFVolumeDataComposite_GetBaseMaterialGroupFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedatacomposite_setbasematerialgroup'), @FLib3MFVolumeDataComposite_SetBaseMaterialGroupFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedatacomposite_getmaterialmappingcount'), @FLib3MFVolumeDataComposite_GetMaterialMappingCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedatacomposite_getmaterialmapping'), @FLib3MFVolumeDataComposite_GetMaterialMappingFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedatacomposite_addmaterialmapping'), @FLib3MFVolumeDataComposite_AddMaterialMappingFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedatacomposite_removematerialmapping'), @FLib3MFVolumeDataComposite_RemoveMaterialMappingFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedataproperty_getname'), @FLib3MFVolumeDataProperty_GetNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedataproperty_setisrequired'), @FLib3MFVolumeDataProperty_SetIsRequiredFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedataproperty_isrequired'), @FLib3MFVolumeDataProperty_IsRequiredFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedata_getcomposite'), @FLib3MFVolumeData_GetCompositeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedata_createnewcomposite'), @FLib3MFVolumeData_CreateNewCompositeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedata_removecomposite'), @FLib3MFVolumeData_RemoveCompositeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedata_getcolor'), @FLib3MFVolumeData_GetColorFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedata_createnewcolor'), @FLib3MFVolumeData_CreateNewColorFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedata_removecolor'), @FLib3MFVolumeData_RemoveColorFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedata_getpropertycount'), @FLib3MFVolumeData_GetPropertyCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedata_getproperty'), @FLib3MFVolumeData_GetPropertyFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedata_addpropertyfromfunction'), @FLib3MFVolumeData_AddPropertyFromFunctionFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_volumedata_removeproperty'), @FLib3MFVolumeData_RemovePropertyFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_component_getobjectresource'), @FLib3MFComponent_GetObjectResourceFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_component_getobjectresourceid'), @FLib3MFComponent_GetObjectResourceIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_component_getuuid'), @FLib3MFComponent_GetUUIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_component_setuuid'), @FLib3MFComponent_SetUUIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_component_hastransform'), @FLib3MFComponent_HasTransformFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_component_gettransform'), @FLib3MFComponent_GetTransformFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_component_settransform'), @FLib3MFComponent_SetTransformFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_componentsobject_addcomponent'), @FLib3MFComponentsObject_AddComponentFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_componentsobject_getcomponent'), @FLib3MFComponentsObject_GetComponentFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_componentsobject_getcomponentcount'), @FLib3MFComponentsObject_GetComponentCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_setname'), @FLib3MFBeamSet_SetNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getname'), @FLib3MFBeamSet_GetNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_setidentifier'), @FLib3MFBeamSet_SetIdentifierFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getidentifier'), @FLib3MFBeamSet_GetIdentifierFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getreferencecount'), @FLib3MFBeamSet_GetReferenceCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_setreferences'), @FLib3MFBeamSet_SetReferencesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getreferences'), @FLib3MFBeamSet_GetReferencesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getballreferencecount'), @FLib3MFBeamSet_GetBallReferenceCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_setballreferences'), @FLib3MFBeamSet_SetBallReferencesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getballreferences'), @FLib3MFBeamSet_GetBallReferencesFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_getcount'), @FLib3MFBaseMaterialGroup_GetCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_getallpropertyids'), @FLib3MFBaseMaterialGroup_GetAllPropertyIDsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_addmaterial'), @FLib3MFBaseMaterialGroup_AddMaterialFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_removematerial'), @FLib3MFBaseMaterialGroup_RemoveMaterialFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_getname'), @FLib3MFBaseMaterialGroup_GetNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_setname'), @FLib3MFBaseMaterialGroup_SetNameFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_setdisplaycolor'), @FLib3MFBaseMaterialGroup_SetDisplayColorFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_getdisplaycolor'), @FLib3MFBaseMaterialGroup_GetDisplayColorFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_getcount'), @FLib3MFColorGroup_GetCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_getallpropertyids'), @FLib3MFColorGroup_GetAllPropertyIDsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_addcolor'), @FLib3MFColorGroup_AddColorFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_removecolor'), @FLib3MFColorGroup_RemoveColorFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_setcolor'), @FLib3MFColorGroup_SetColorFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_getcolor'), @FLib3MFColorGroup_GetColorFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_getcount'), @FLib3MFTexture2DGroup_GetCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_getallpropertyids'), @FLib3MFTexture2DGroup_GetAllPropertyIDsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_addtex2coord'), @FLib3MFTexture2DGroup_AddTex2CoordFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_gettex2coord'), @FLib3MFTexture2DGroup_GetTex2CoordFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_removetex2coord'), @FLib3MFTexture2DGroup_RemoveTex2CoordFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_gettexture2d'), @FLib3MFTexture2DGroup_GetTexture2DFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_getcount'), @FLib3MFCompositeMaterials_GetCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_getallpropertyids'), @FLib3MFCompositeMaterials_GetAllPropertyIDsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_getbasematerialgroup'), @FLib3MFCompositeMaterials_GetBaseMaterialGroupFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_addcomposite'), @FLib3MFCompositeMaterials_AddCompositeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_removecomposite'), @FLib3MFCompositeMaterials_RemoveCompositeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_getcomposite'), @FLib3MFCompositeMaterials_GetCompositeFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_getcount'), @FLib3MFMultiPropertyGroup_GetCountFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_getallpropertyids'), @FLib3MFMultiPropertyGroup_GetAllPropertyIDsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_addmultiproperty'), @FLib3MFMultiPropertyGroup_AddMultiPropertyFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_setmultiproperty'), @FLib3MFMultiPropertyGroup_SetMultiPropertyFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_getmultiproperty'), @FLib3MFMultiPropertyGroup_GetMultiPropertyFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_getstreamsize'), @FLib3MFWriter_GetStreamSizeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_removemultiproperty'), @FLib3MFMultiPropertyGroup_RemoveMultiPropertyFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_writetobuffer'), @FLib3MFWriter_WriteToBufferFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_getlayercount'), @FLib3MFMultiPropertyGroup_GetLayerCountFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_writetocallback'), @FLib3MFWriter_WriteToCallbackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_addlayer'), @FLib3MFMultiPropertyGroup_AddLayerFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_setprogresscallback'), @FLib3MFWriter_SetProgressCallbackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_getlayer'), @FLib3MFMultiPropertyGroup_GetLayerFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_getdecimalprecision'), @FLib3MFWriter_GetDecimalPrecisionFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_removelayer'), @FLib3MFMultiPropertyGroup_RemoveLayerFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_setdecimalprecision'), @FLib3MFWriter_SetDecimalPrecisionFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_image3d_getname'), @FLib3MFImage3D_GetNameFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_setstrictmodeactive'), @FLib3MFWriter_SetStrictModeActiveFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_image3d_setname'), @FLib3MFImage3D_SetNameFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_getstrictmodeactive'), @FLib3MFWriter_GetStrictModeActiveFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_image3d_isimagestack'), @FLib3MFImage3D_IsImageStackFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_getwarning'), @FLib3MFWriter_GetWarningFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_imagestack_getrowcount'), @FLib3MFImageStack_GetRowCountFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_getwarningcount'), @FLib3MFWriter_GetWarningCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_imagestack_setrowcount'), @FLib3MFImageStack_SetRowCountFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_addkeywrappingcallback'), @FLib3MFWriter_AddKeyWrappingCallbackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_imagestack_getcolumncount'), @FLib3MFImageStack_GetColumnCountFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_writer_setcontentencryptioncallback'), @FLib3MFWriter_SetContentEncryptionCallbackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_imagestack_setcolumncount'), @FLib3MFImageStack_SetColumnCountFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_readfromfile'), @FLib3MFReader_ReadFromFileFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_imagestack_getsheetcount'), @FLib3MFImageStack_GetSheetCountFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_readfrombuffer'), @FLib3MFReader_ReadFromBufferFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_imagestack_getsheet'), @FLib3MFImageStack_GetSheetFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_readfromcallback'), @FLib3MFReader_ReadFromCallbackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_imagestack_setsheet'), @FLib3MFImageStack_SetSheetFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_setprogresscallback'), @FLib3MFReader_SetProgressCallbackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_imagestack_createemptysheet'), @FLib3MFImageStack_CreateEmptySheetFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_addrelationtoread'), @FLib3MFReader_AddRelationToReadFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_imagestack_createsheetfrombuffer'), @FLib3MFImageStack_CreateSheetFromBufferFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_removerelationtoread'), @FLib3MFReader_RemoveRelationToReadFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_imagestack_createsheetfromfile'), @FLib3MFImageStack_CreateSheetFromFileFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_setstrictmodeactive'), @FLib3MFReader_SetStrictModeActiveFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_getpath'), @FLib3MFAttachment_GetPathFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_getstrictmodeactive'), @FLib3MFReader_GetStrictModeActiveFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_setpath'), @FLib3MFAttachment_SetPathFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_getwarning'), @FLib3MFReader_GetWarningFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_packagepart'), @FLib3MFAttachment_PackagePartFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_getwarningcount'), @FLib3MFReader_GetWarningCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_getrelationshiptype'), @FLib3MFAttachment_GetRelationShipTypeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_addkeywrappingcallback'), @FLib3MFReader_AddKeyWrappingCallbackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_setrelationshiptype'), @FLib3MFAttachment_SetRelationShipTypeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_reader_setcontentencryptioncallback'), @FLib3MFReader_SetContentEncryptionCallbackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_writetofile'), @FLib3MFAttachment_WriteToFileFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_packagepart_getpath'), @FLib3MFPackagePart_GetPathFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_readfromfile'), @FLib3MFAttachment_ReadFromFileFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_packagepart_setpath'), @FLib3MFPackagePart_SetPathFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_readfromcallback'), @FLib3MFAttachment_ReadFromCallbackFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_resource_getresourceid'), @FLib3MFResource_GetResourceIDFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_getstreamsize'), @FLib3MFAttachment_GetStreamSizeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_resource_getuniqueresourceid'), @FLib3MFResource_GetUniqueResourceIDFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_writetobuffer'), @FLib3MFAttachment_WriteToBufferFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_resource_packagepart'), @FLib3MFResource_PackagePartFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_readfrombuffer'), @FLib3MFAttachment_ReadFromBufferFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_resource_setpackagepart'), @FLib3MFResource_SetPackagePartFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_getattachment'), @FLib3MFTexture2D_GetAttachmentFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_resource_getmodelresourceid'), @FLib3MFResource_GetModelResourceIDFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_setattachment'), @FLib3MFTexture2D_SetAttachmentFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_resourceiterator_movenext'), @FLib3MFResourceIterator_MoveNextFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_getcontenttype'), @FLib3MFTexture2D_GetContentTypeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_resourceiterator_moveprevious'), @FLib3MFResourceIterator_MovePreviousFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_setcontenttype'), @FLib3MFTexture2D_SetContentTypeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_resourceiterator_getcurrent'), @FLib3MFResourceIterator_GetCurrentFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_gettilestyleuv'), @FLib3MFTexture2D_GetTileStyleUVFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_resourceiterator_clone'), @FLib3MFResourceIterator_CloneFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_settilestyleuv'), @FLib3MFTexture2D_SetTileStyleUVFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_resourceiterator_count'), @FLib3MFResourceIterator_CountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_getfilter'), @FLib3MFTexture2D_GetFilterFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_slicestackiterator_getcurrentslicestack'), @FLib3MFSliceStackIterator_GetCurrentSliceStackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_setfilter'), @FLib3MFTexture2D_SetFilterFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_objectiterator_getcurrentobject'), @FLib3MFObjectIterator_GetCurrentObjectFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitport_getidentifier'), @FLib3MFImplicitPort_GetIdentifierFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobjectiterator_getcurrentmeshobject'), @FLib3MFMeshObjectIterator_GetCurrentMeshObjectFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitport_setidentifier'), @FLib3MFImplicitPort_SetIdentifierFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_componentsobjectiterator_getcurrentcomponentsobject'), @FLib3MFComponentsObjectIterator_GetCurrentComponentsObjectFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitport_getdisplayname'), @FLib3MFImplicitPort_GetDisplayNameFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2diterator_getcurrenttexture2d'), @FLib3MFTexture2DIterator_GetCurrentTexture2DFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitport_setdisplayname'), @FLib3MFImplicitPort_SetDisplayNameFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup'), @FLib3MFBaseMaterialGroupIterator_GetCurrentBaseMaterialGroupFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitport_settype'), @FLib3MFImplicitPort_SetTypeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroupiterator_getcurrentcolorgroup'), @FLib3MFColorGroupIterator_GetCurrentColorGroupFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitport_gettype'), @FLib3MFImplicitPort_GetTypeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup'), @FLib3MFTexture2DGroupIterator_GetCurrentTexture2DGroupFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitport_getreference'), @FLib3MFImplicitPort_GetReferenceFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerialsiterator_getcurrentcompositematerials'), @FLib3MFCompositeMaterialsIterator_GetCurrentCompositeMaterialsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitport_setreference'), @FLib3MFImplicitPort_SetReferenceFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup'), @FLib3MFMultiPropertyGroupIterator_GetCurrentMultiPropertyGroupFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_iterator_movenext'), @FLib3MFIterator_MoveNextFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_getnamespace'), @FLib3MFMetaData_GetNameSpaceFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_iterator_moveprevious'), @FLib3MFIterator_MovePreviousFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_setnamespace'), @FLib3MFMetaData_SetNameSpaceFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_iterator_count'), @FLib3MFIterator_CountFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_getname'), @FLib3MFMetaData_GetNameFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitportiterator_getcurrent'), @FLib3MFImplicitPortIterator_GetCurrentFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_setname'), @FLib3MFMetaData_SetNameFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_getidentifier'), @FLib3MFImplicitNode_GetIdentifierFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_getkey'), @FLib3MFMetaData_GetKeyFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_setidentifier'), @FLib3MFImplicitNode_SetIdentifierFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_getmustpreserve'), @FLib3MFMetaData_GetMustPreserveFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_getdisplayname'), @FLib3MFImplicitNode_GetDisplayNameFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_setmustpreserve'), @FLib3MFMetaData_SetMustPreserveFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_setdisplayname'), @FLib3MFImplicitNode_SetDisplayNameFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_gettype'), @FLib3MFMetaData_GetTypeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_gettag'), @FLib3MFImplicitNode_GetTagFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_settype'), @FLib3MFMetaData_SetTypeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_settag'), @FLib3MFImplicitNode_SetTagFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_getvalue'), @FLib3MFMetaData_GetValueFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_getnodetype'), @FLib3MFImplicitNode_GetNodeTypeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadata_setvalue'), @FLib3MFMetaData_SetValueFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_addinput'), @FLib3MFImplicitNode_AddInputFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_getmetadatacount'), @FLib3MFMetaDataGroup_GetMetaDataCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_getinputs'), @FLib3MFImplicitNode_GetInputsFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_getmetadata'), @FLib3MFMetaDataGroup_GetMetaDataFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_addoutput'), @FLib3MFImplicitNode_AddOutputFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_getmetadatabykey'), @FLib3MFMetaDataGroup_GetMetaDataByKeyFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_getoutputs'), @FLib3MFImplicitNode_GetOutputsFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_removemetadatabyindex'), @FLib3MFMetaDataGroup_RemoveMetaDataByIndexFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_findinput'), @FLib3MFImplicitNode_FindInputFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_removemetadata'), @FLib3MFMetaDataGroup_RemoveMetaDataFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_findoutput'), @FLib3MFImplicitNode_FindOutputFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_metadatagroup_addmetadata'), @FLib3MFMetaDataGroup_AddMetaDataFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitnode_aretypesvalid'), @FLib3MFImplicitNode_AreTypesValidFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_gettype'), @FLib3MFObject_GetTypeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_oneinputnode_getinputa'), @FLib3MFOneInputNode_GetInputAFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_settype'), @FLib3MFObject_SetTypeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_oneinputnode_getoutputresult'), @FLib3MFOneInputNode_GetOutputResultFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_getname'), @FLib3MFObject_GetNameFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_resourceidnode_setresource'), @FLib3MFResourceIdNode_SetResourceFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_setname'), @FLib3MFObject_SetNameFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_resourceidnode_getresource'), @FLib3MFResourceIdNode_GetResourceFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_getpartnumber'), @FLib3MFObject_GetPartNumberFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_resourceidnode_getoutputvalue'), @FLib3MFResourceIdNode_GetOutputValueFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_setpartnumber'), @FLib3MFObject_SetPartNumberFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_twoinputnode_getinputb'), @FLib3MFTwoInputNode_GetInputBFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_ismeshobject'), @FLib3MFObject_IsMeshObjectFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_selectnode_getinputb'), @FLib3MFSelectNode_GetInputBFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_iscomponentsobject'), @FLib3MFObject_IsComponentsObjectFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_selectnode_getinputc'), @FLib3MFSelectNode_GetInputCFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_isvalid'), @FLib3MFObject_IsValidFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_selectnode_getinputd'), @FLib3MFSelectNode_GetInputDFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_setattachmentasthumbnail'), @FLib3MFObject_SetAttachmentAsThumbnailFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_clampnode_getinputmin'), @FLib3MFClampNode_GetInputMinFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_getthumbnailattachment'), @FLib3MFObject_GetThumbnailAttachmentFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_clampnode_getinputmax'), @FLib3MFClampNode_GetInputMaxFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_clearthumbnailattachment'), @FLib3MFObject_ClearThumbnailAttachmentFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composevectornode_getinputx'), @FLib3MFComposeVectorNode_GetInputXFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_getoutbox'), @FLib3MFObject_GetOutboxFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composevectornode_getinputy'), @FLib3MFComposeVectorNode_GetInputYFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_getuuid'), @FLib3MFObject_GetUUIDFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composevectornode_getinputz'), @FLib3MFComposeVectorNode_GetInputZFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_setuuid'), @FLib3MFObject_SetUUIDFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composevectornode_getoutputresult'), @FLib3MFComposeVectorNode_GetOutputResultFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_getmetadatagroup'), @FLib3MFObject_GetMetaDataGroupFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_decomposevectornode_getinputa'), @FLib3MFDecomposeVectorNode_GetInputAFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_setslicesmeshresolution'), @FLib3MFObject_SetSlicesMeshResolutionFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_decomposevectornode_getoutputx'), @FLib3MFDecomposeVectorNode_GetOutputXFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_getslicesmeshresolution'), @FLib3MFObject_GetSlicesMeshResolutionFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_decomposevectornode_getoutputy'), @FLib3MFDecomposeVectorNode_GetOutputYFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_hasslices'), @FLib3MFObject_HasSlicesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_decomposevectornode_getoutputz'), @FLib3MFDecomposeVectorNode_GetOutputZFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_clearslicestack'), @FLib3MFObject_ClearSliceStackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm00'), @FLib3MFComposeMatrixNode_GetInputM00Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_getslicestack'), @FLib3MFObject_GetSliceStackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm01'), @FLib3MFComposeMatrixNode_GetInputM01Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_object_assignslicestack'), @FLib3MFObject_AssignSliceStackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm02'), @FLib3MFComposeMatrixNode_GetInputM02Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_getvertexcount'), @FLib3MFMeshObject_GetVertexCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm03'), @FLib3MFComposeMatrixNode_GetInputM03Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_gettrianglecount'), @FLib3MFMeshObject_GetTriangleCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm10'), @FLib3MFComposeMatrixNode_GetInputM10Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_getvertex'), @FLib3MFMeshObject_GetVertexFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm11'), @FLib3MFComposeMatrixNode_GetInputM11Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_setvertex'), @FLib3MFMeshObject_SetVertexFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm12'), @FLib3MFComposeMatrixNode_GetInputM12Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_addvertex'), @FLib3MFMeshObject_AddVertexFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm13'), @FLib3MFComposeMatrixNode_GetInputM13Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_getvertices'), @FLib3MFMeshObject_GetVerticesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm20'), @FLib3MFComposeMatrixNode_GetInputM20Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_gettriangle'), @FLib3MFMeshObject_GetTriangleFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm21'), @FLib3MFComposeMatrixNode_GetInputM21Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_settriangle'), @FLib3MFMeshObject_SetTriangleFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm22'), @FLib3MFComposeMatrixNode_GetInputM22Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_addtriangle'), @FLib3MFMeshObject_AddTriangleFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm23'), @FLib3MFComposeMatrixNode_GetInputM23Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_gettriangleindices'), @FLib3MFMeshObject_GetTriangleIndicesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm30'), @FLib3MFComposeMatrixNode_GetInputM30Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_setobjectlevelproperty'), @FLib3MFMeshObject_SetObjectLevelPropertyFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm31'), @FLib3MFComposeMatrixNode_GetInputM31Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_getobjectlevelproperty'), @FLib3MFMeshObject_GetObjectLevelPropertyFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm32'), @FLib3MFComposeMatrixNode_GetInputM32Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_settriangleproperties'), @FLib3MFMeshObject_SetTrianglePropertiesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getinputm33'), @FLib3MFComposeMatrixNode_GetInputM33Func); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_gettriangleproperties'), @FLib3MFMeshObject_GetTrianglePropertiesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_composematrixnode_getoutputresult'), @FLib3MFComposeMatrixNode_GetOutputResultFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_setalltriangleproperties'), @FLib3MFMeshObject_SetAllTrianglePropertiesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_matrixfromrowsnode_getinputa'), @FLib3MFMatrixFromRowsNode_GetInputAFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_getalltriangleproperties'), @FLib3MFMeshObject_GetAllTrianglePropertiesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_matrixfromrowsnode_getinputb'), @FLib3MFMatrixFromRowsNode_GetInputBFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_clearallproperties'), @FLib3MFMeshObject_ClearAllPropertiesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_matrixfromrowsnode_getinputc'), @FLib3MFMatrixFromRowsNode_GetInputCFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_setgeometry'), @FLib3MFMeshObject_SetGeometryFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_matrixfromrowsnode_getinputd'), @FLib3MFMatrixFromRowsNode_GetInputDFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_ismanifoldandoriented'), @FLib3MFMeshObject_IsManifoldAndOrientedFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_matrixfromrowsnode_getoutputresult'), @FLib3MFMatrixFromRowsNode_GetOutputResultFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_meshobject_beamlattice'), @FLib3MFMeshObject_BeamLatticeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_matrixfromcolumnsnode_getinputa'), @FLib3MFMatrixFromColumnsNode_GetInputAFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getminlength'), @FLib3MFBeamLattice_GetMinLengthFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_matrixfromcolumnsnode_getinputb'), @FLib3MFMatrixFromColumnsNode_GetInputBFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setminlength'), @FLib3MFBeamLattice_SetMinLengthFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_matrixfromcolumnsnode_getinputc'), @FLib3MFMatrixFromColumnsNode_GetInputCFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getclipping'), @FLib3MFBeamLattice_GetClippingFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_matrixfromcolumnsnode_getinputd'), @FLib3MFMatrixFromColumnsNode_GetInputDFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setclipping'), @FLib3MFBeamLattice_SetClippingFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_matrixfromcolumnsnode_getoutputresult'), @FLib3MFMatrixFromColumnsNode_GetOutputResultFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getrepresentation'), @FLib3MFBeamLattice_GetRepresentationFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_constantnode_setconstant'), @FLib3MFConstantNode_SetConstantFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setrepresentation'), @FLib3MFBeamLattice_SetRepresentationFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_constantnode_getconstant'), @FLib3MFConstantNode_GetConstantFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getballoptions'), @FLib3MFBeamLattice_GetBallOptionsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_constantnode_getoutputvalue'), @FLib3MFConstantNode_GetOutputValueFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setballoptions'), @FLib3MFBeamLattice_SetBallOptionsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_constvecnode_setvector'), @FLib3MFConstVecNode_SetVectorFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getbeamcount'), @FLib3MFBeamLattice_GetBeamCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_constvecnode_getvector'), @FLib3MFConstVecNode_GetVectorFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getbeam'), @FLib3MFBeamLattice_GetBeamFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_constvecnode_getoutputvector'), @FLib3MFConstVecNode_GetOutputVectorFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_addbeam'), @FLib3MFBeamLattice_AddBeamFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_constmatnode_setmatrix'), @FLib3MFConstMatNode_SetMatrixFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setbeam'), @FLib3MFBeamLattice_SetBeamFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_constmatnode_getmatrix'), @FLib3MFConstMatNode_GetMatrixFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setbeams'), @FLib3MFBeamLattice_SetBeamsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_constmatnode_getoutputmatrix'), @FLib3MFConstMatNode_GetOutputMatrixFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getbeams'), @FLib3MFBeamLattice_GetBeamsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshnode_getinputmesh'), @FLib3MFMeshNode_GetInputMeshFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getballcount'), @FLib3MFBeamLattice_GetBallCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshnode_getinputpos'), @FLib3MFMeshNode_GetInputPosFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getball'), @FLib3MFBeamLattice_GetBallFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_meshnode_getoutputdistance'), @FLib3MFMeshNode_GetOutputDistanceFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_addball'), @FLib3MFBeamLattice_AddBallFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_unsignedmeshnode_getinputmesh'), @FLib3MFUnsignedMeshNode_GetInputMeshFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setball'), @FLib3MFBeamLattice_SetBallFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_unsignedmeshnode_getinputpos'), @FLib3MFUnsignedMeshNode_GetInputPosFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_setballs'), @FLib3MFBeamLattice_SetBallsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_unsignedmeshnode_getoutputdistance'), @FLib3MFUnsignedMeshNode_GetOutputDistanceFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getballs'), @FLib3MFBeamLattice_GetBallsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_functioncallnode_getinputfunctionid'), @FLib3MFFunctionCallNode_GetInputFunctionIDFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getbeamsetcount'), @FLib3MFBeamLattice_GetBeamSetCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_nodeiterator_getcurrent'), @FLib3MFNodeIterator_GetCurrentFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_addbeamset'), @FLib3MFBeamLattice_AddBeamSetFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_function_getdisplayname'), @FLib3MFFunction_GetDisplayNameFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamlattice_getbeamset'), @FLib3MFBeamLattice_GetBeamSetFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_function_setdisplayname'), @FLib3MFFunction_SetDisplayNameFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_component_getobjectresource'), @FLib3MFComponent_GetObjectResourceFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_function_addinput'), @FLib3MFFunction_AddInputFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_component_getobjectresourceid'), @FLib3MFComponent_GetObjectResourceIDFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_function_getinputs'), @FLib3MFFunction_GetInputsFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_component_getuuid'), @FLib3MFComponent_GetUUIDFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_function_removeinput'), @FLib3MFFunction_RemoveInputFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_component_setuuid'), @FLib3MFComponent_SetUUIDFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_function_addoutput'), @FLib3MFFunction_AddOutputFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_component_hastransform'), @FLib3MFComponent_HasTransformFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_function_getoutputs'), @FLib3MFFunction_GetOutputsFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_component_gettransform'), @FLib3MFComponent_GetTransformFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_function_removeoutput'), @FLib3MFFunction_RemoveOutputFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_component_settransform'), @FLib3MFComponent_SetTransformFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_function_findinput'), @FLib3MFFunction_FindInputFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_componentsobject_addcomponent'), @FLib3MFComponentsObject_AddComponentFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_function_findoutput'), @FLib3MFFunction_FindOutputFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_componentsobject_getcomponent'), @FLib3MFComponentsObject_GetComponentFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_getidentifier'), @FLib3MFImplicitFunction_GetIdentifierFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_componentsobject_getcomponentcount'), @FLib3MFComponentsObject_GetComponentCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_setidentifier'), @FLib3MFImplicitFunction_SetIdentifierFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_setname'), @FLib3MFBeamSet_SetNameFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addnode'), @FLib3MFImplicitFunction_AddNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getname'), @FLib3MFBeamSet_GetNameFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addsinnode'), @FLib3MFImplicitFunction_AddSinNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_setidentifier'), @FLib3MFBeamSet_SetIdentifierFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addcosnode'), @FLib3MFImplicitFunction_AddCosNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getidentifier'), @FLib3MFBeamSet_GetIdentifierFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addtannode'), @FLib3MFImplicitFunction_AddTanNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getreferencecount'), @FLib3MFBeamSet_GetReferenceCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addarcsinnode'), @FLib3MFImplicitFunction_AddArcSinNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_setreferences'), @FLib3MFBeamSet_SetReferencesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addarccosnode'), @FLib3MFImplicitFunction_AddArcCosNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getreferences'), @FLib3MFBeamSet_GetReferencesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addarctan2node'), @FLib3MFImplicitFunction_AddArcTan2NodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getballreferencecount'), @FLib3MFBeamSet_GetBallReferenceCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addsinhnode'), @FLib3MFImplicitFunction_AddSinhNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_setballreferences'), @FLib3MFBeamSet_SetBallReferencesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addcoshnode'), @FLib3MFImplicitFunction_AddCoshNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_beamset_getballreferences'), @FLib3MFBeamSet_GetBallReferencesFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addtanhnode'), @FLib3MFImplicitFunction_AddTanhNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_getcount'), @FLib3MFBaseMaterialGroup_GetCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addroundnode'), @FLib3MFImplicitFunction_AddRoundNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_getallpropertyids'), @FLib3MFBaseMaterialGroup_GetAllPropertyIDsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addceilnode'), @FLib3MFImplicitFunction_AddCeilNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_addmaterial'), @FLib3MFBaseMaterialGroup_AddMaterialFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addfloornode'), @FLib3MFImplicitFunction_AddFloorNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_removematerial'), @FLib3MFBaseMaterialGroup_RemoveMaterialFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addsignnode'), @FLib3MFImplicitFunction_AddSignNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_getname'), @FLib3MFBaseMaterialGroup_GetNameFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addfractnode'), @FLib3MFImplicitFunction_AddFractNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_setname'), @FLib3MFBaseMaterialGroup_SetNameFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addabsnode'), @FLib3MFImplicitFunction_AddAbsNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_setdisplaycolor'), @FLib3MFBaseMaterialGroup_SetDisplayColorFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addexpnode'), @FLib3MFImplicitFunction_AddExpNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_basematerialgroup_getdisplaycolor'), @FLib3MFBaseMaterialGroup_GetDisplayColorFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addlognode'), @FLib3MFImplicitFunction_AddLogNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_getcount'), @FLib3MFColorGroup_GetCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addlog2node'), @FLib3MFImplicitFunction_AddLog2NodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_getallpropertyids'), @FLib3MFColorGroup_GetAllPropertyIDsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addlog10node'), @FLib3MFImplicitFunction_AddLog10NodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_addcolor'), @FLib3MFColorGroup_AddColorFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addlengthnode'), @FLib3MFImplicitFunction_AddLengthNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_removecolor'), @FLib3MFColorGroup_RemoveColorFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addtransposenode'), @FLib3MFImplicitFunction_AddTransposeNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_setcolor'), @FLib3MFColorGroup_SetColorFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_inversenode'), @FLib3MFImplicitFunction_InverseNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_colorgroup_getcolor'), @FLib3MFColorGroup_GetColorFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addsqrtnode'), @FLib3MFImplicitFunction_AddSqrtNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_getcount'), @FLib3MFTexture2DGroup_GetCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addresourceidnode'), @FLib3MFImplicitFunction_AddResourceIdNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_getallpropertyids'), @FLib3MFTexture2DGroup_GetAllPropertyIDsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addadditionnode'), @FLib3MFImplicitFunction_AddAdditionNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_addtex2coord'), @FLib3MFTexture2DGroup_AddTex2CoordFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addsubtractionnode'), @FLib3MFImplicitFunction_AddSubtractionNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_gettex2coord'), @FLib3MFTexture2DGroup_GetTex2CoordFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addmultiplicationnode'), @FLib3MFImplicitFunction_AddMultiplicationNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_removetex2coord'), @FLib3MFTexture2DGroup_RemoveTex2CoordFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_adddivisionnode'), @FLib3MFImplicitFunction_AddDivisionNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2dgroup_gettexture2d'), @FLib3MFTexture2DGroup_GetTexture2DFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_adddotnode'), @FLib3MFImplicitFunction_AddDotNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_getcount'), @FLib3MFCompositeMaterials_GetCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addcrossnode'), @FLib3MFImplicitFunction_AddCrossNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_getallpropertyids'), @FLib3MFCompositeMaterials_GetAllPropertyIDsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addmatvecmultiplicationnode'), @FLib3MFImplicitFunction_AddMatVecMultiplicationNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_getbasematerialgroup'), @FLib3MFCompositeMaterials_GetBaseMaterialGroupFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addminnode'), @FLib3MFImplicitFunction_AddMinNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_addcomposite'), @FLib3MFCompositeMaterials_AddCompositeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addmaxnode'), @FLib3MFImplicitFunction_AddMaxNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_removecomposite'), @FLib3MFCompositeMaterials_RemoveCompositeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addfmodnode'), @FLib3MFImplicitFunction_AddFmodNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_compositematerials_getcomposite'), @FLib3MFCompositeMaterials_GetCompositeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addpownode'), @FLib3MFImplicitFunction_AddPowNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_getcount'), @FLib3MFMultiPropertyGroup_GetCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addselectnode'), @FLib3MFImplicitFunction_AddSelectNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_getallpropertyids'), @FLib3MFMultiPropertyGroup_GetAllPropertyIDsFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addclampnode'), @FLib3MFImplicitFunction_AddClampNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_addmultiproperty'), @FLib3MFMultiPropertyGroup_AddMultiPropertyFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addcomposevectornode'), @FLib3MFImplicitFunction_AddComposeVectorNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_setmultiproperty'), @FLib3MFMultiPropertyGroup_SetMultiPropertyFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addvectorfromscalarnode'), @FLib3MFImplicitFunction_AddVectorFromScalarNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_getmultiproperty'), @FLib3MFMultiPropertyGroup_GetMultiPropertyFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_adddecomposevectornode'), @FLib3MFImplicitFunction_AddDecomposeVectorNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_removemultiproperty'), @FLib3MFMultiPropertyGroup_RemoveMultiPropertyFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addcomposematrixnode'), @FLib3MFImplicitFunction_AddComposeMatrixNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_getlayercount'), @FLib3MFMultiPropertyGroup_GetLayerCountFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addmatrixfromrowsnode'), @FLib3MFImplicitFunction_AddMatrixFromRowsNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_addlayer'), @FLib3MFMultiPropertyGroup_AddLayerFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addmatrixfromcolumnsnode'), @FLib3MFImplicitFunction_AddMatrixFromColumnsNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_getlayer'), @FLib3MFMultiPropertyGroup_GetLayerFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addconstantnode'), @FLib3MFImplicitFunction_AddConstantNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_multipropertygroup_removelayer'), @FLib3MFMultiPropertyGroup_RemoveLayerFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addconstvecnode'), @FLib3MFImplicitFunction_AddConstVecNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_getpath'), @FLib3MFAttachment_GetPathFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addconstmatnode'), @FLib3MFImplicitFunction_AddConstMatNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_setpath'), @FLib3MFAttachment_SetPathFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addmeshnode'), @FLib3MFImplicitFunction_AddMeshNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_packagepart'), @FLib3MFAttachment_PackagePartFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addunsignedmeshnode'), @FLib3MFImplicitFunction_AddUnsignedMeshNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_getrelationshiptype'), @FLib3MFAttachment_GetRelationShipTypeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addfunctioncallnode'), @FLib3MFImplicitFunction_AddFunctionCallNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_setrelationshiptype'), @FLib3MFAttachment_SetRelationShipTypeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_getnodes'), @FLib3MFImplicitFunction_GetNodesFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_writetofile'), @FLib3MFAttachment_WriteToFileFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_removenode'), @FLib3MFImplicitFunction_RemoveNodeFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_readfromfile'), @FLib3MFAttachment_ReadFromFileFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addlink'), @FLib3MFImplicitFunction_AddLinkFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_readfromcallback'), @FLib3MFAttachment_ReadFromCallbackFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_addlinkbynames'), @FLib3MFImplicitFunction_AddLinkByNamesFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_getstreamsize'), @FLib3MFAttachment_GetStreamSizeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_clear'), @FLib3MFImplicitFunction_ClearFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_writetobuffer'), @FLib3MFAttachment_WriteToBufferFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_implicitfunction_sortnodestopologically'), @FLib3MFImplicitFunction_SortNodesTopologicallyFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_attachment_readfrombuffer'), @FLib3MFAttachment_ReadFromBufferFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionfromimage3d_getimage3d'), @FLib3MFFunctionFromImage3D_GetImage3DFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_getattachment'), @FLib3MFTexture2D_GetAttachmentFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionfromimage3d_setimage3d'), @FLib3MFFunctionFromImage3D_SetImage3DFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_setattachment'), @FLib3MFTexture2D_SetAttachmentFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionfromimage3d_setfilter'), @FLib3MFFunctionFromImage3D_SetFilterFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_getcontenttype'), @FLib3MFTexture2D_GetContentTypeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionfromimage3d_getfilter'), @FLib3MFFunctionFromImage3D_GetFilterFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_setcontenttype'), @FLib3MFTexture2D_SetContentTypeFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionfromimage3d_settilestyles'), @FLib3MFFunctionFromImage3D_SetTileStylesFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_gettilestyleuv'), @FLib3MFTexture2D_GetTileStyleUVFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionfromimage3d_gettilestyles'), @FLib3MFFunctionFromImage3D_GetTileStylesFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_settilestyleuv'), @FLib3MFTexture2D_SetTileStyleUVFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionfromimage3d_getoffset'), @FLib3MFFunctionFromImage3D_GetOffsetFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_getfilter'), @FLib3MFTexture2D_GetFilterFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionfromimage3d_setoffset'), @FLib3MFFunctionFromImage3D_SetOffsetFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); - AResult := ALookupMethod(PAnsiChar('lib3mf_texture2d_setfilter'), @FLib3MFTexture2D_SetFilterFunc); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionfromimage3d_getscale'), @FLib3MFFunctionFromImage3D_GetScaleFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_functionfromimage3d_setscale'), @FLib3MFFunctionFromImage3D_SetScaleFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_builditem_getobjectresource'), @FLib3MFBuildItem_GetObjectResourceFunc); @@ -11584,6 +21140,9 @@ implementation if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_model_getslicestackbyid'), @FLib3MFModel_GetSliceStackByIDFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_getlevelsetbyid'), @FLib3MFModel_GetLevelSetByIDFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_model_getbuilduuid'), @FLib3MFModel_GetBuildUUIDFunc); @@ -11629,9 +21188,15 @@ implementation if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_model_getslicestacks'), @FLib3MFModel_GetSliceStacksFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_getimage3ds'), @FLib3MFModel_GetImage3DsFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_model_mergetomodel'), @FLib3MFModel_MergeToModelFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_mergefrommodel'), @FLib3MFModel_MergeFromModelFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_model_addmeshobject'), @FLib3MFModel_AddMeshObjectFunc); @@ -11659,6 +21224,12 @@ implementation if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_model_addmultipropertygroup'), @FLib3MFModel_AddMultiPropertyGroupFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_addimagestack'), @FLib3MFModel_AddImageStackFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_getimagestackbyid'), @FLib3MFModel_GetImageStackByIDFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_model_addbuilditem'), @FLib3MFModel_AddBuildItemFunc); @@ -11707,6 +21278,27 @@ implementation if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_model_getkeystore'), @FLib3MFModel_GetKeyStoreFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_getfunctions'), @FLib3MFModel_GetFunctionsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_addimplicitfunction'), @FLib3MFModel_AddImplicitFunctionFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_addfunctionfromimage3d'), @FLib3MFModel_AddFunctionFromImage3DFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_addvolumedata'), @FLib3MFModel_AddVolumeDataFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_addlevelset'), @FLib3MFModel_AddLevelSetFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_getlevelsets'), @FLib3MFModel_GetLevelSetsFunc); + if AResult <> LIB3MF_SUCCESS then + raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); + AResult := ALookupMethod(PAnsiChar('lib3mf_model_removeresource'), @FLib3MFModel_RemoveResourceFunc); if AResult <> LIB3MF_SUCCESS then raise ELib3MFException.CreateCustomMessage(LIB3MF_ERROR_COULDNOTLOADLIBRARY, ''); AResult := ALookupMethod(PAnsiChar('lib3mf_getlibraryversion'), @FLib3MFGetLibraryVersionFunc); diff --git a/Autogenerated/Bindings/Python/Lib3MF.py b/Autogenerated/Bindings/Python/Lib3MF.py index 1b5e6d2fd..e3d29b734 100644 --- a/Autogenerated/Bindings/Python/Lib3MF.py +++ b/Autogenerated/Bindings/Python/Lib3MF.py @@ -1,6 +1,6 @@ '''++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ Abstract: This is an autogenerated Python file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 ''' @@ -57,8 +57,8 @@ def __str__(self): ''' class BindingVersion(enum.IntEnum): MAJOR = 2 - MINOR = 3 - MICRO = 2 + MINOR = 4 + MICRO = 0 '''Definition Error Codes ''' @@ -100,6 +100,7 @@ class ErrorCodes(enum.IntEnum): UNKOWNPROGRESSIDENTIFIER = 140 ELEMENTCOUNTEXCEEDSLIMIT = 141 INVALIDRESOURCE = 142 + INVALIDLEVELSET = 143 BEAMLATTICE_INVALID_OBJECTTYPE = 2000 INVALIDKEYSTORE = 3000 INVALIDKEYSTORECONSUMER = 3001 @@ -107,6 +108,10 @@ class ErrorCodes(enum.IntEnum): KEYSTORERESOURCEDATANOTFOUND = 3003 SECURECONTEXTNOTREGISTERED = 3004 INVALIDKEYSIZE = 3005 + INCOMPATIBLEPORTTYPES = 4000 + GRAPHISCYCLIC = 4001 + INPUTNOTSET = 4002 + INVALIDNODECONFIGURATION = 4003 '''Definition of Function Table ''' @@ -178,6 +183,9 @@ class FunctionTable: lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup = None lib3mf_compositematerialsiterator_getcurrentcompositematerials = None lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup = None + lib3mf_image3diterator_getcurrentimage3d = None + lib3mf_functioniterator_getcurrentfunction = None + lib3mf_levelsetiterator_getcurrentlevelset = None lib3mf_metadata_getnamespace = None lib3mf_metadata_setnamespace = None lib3mf_metadata_getname = None @@ -203,6 +211,7 @@ class FunctionTable: lib3mf_object_setpartnumber = None lib3mf_object_ismeshobject = None lib3mf_object_iscomponentsobject = None + lib3mf_object_islevelsetobject = None lib3mf_object_isvalid = None lib3mf_object_setattachmentasthumbnail = None lib3mf_object_getthumbnailattachment = None @@ -237,6 +246,24 @@ class FunctionTable: lib3mf_meshobject_setgeometry = None lib3mf_meshobject_ismanifoldandoriented = None lib3mf_meshobject_beamlattice = None + lib3mf_meshobject_getvolumedata = None + lib3mf_meshobject_setvolumedata = None + lib3mf_levelset_getfunction = None + lib3mf_levelset_setfunction = None + lib3mf_levelset_gettransform = None + lib3mf_levelset_settransform = None + lib3mf_levelset_getchannelname = None + lib3mf_levelset_setchannelname = None + lib3mf_levelset_setminfeaturesize = None + lib3mf_levelset_getminfeaturesize = None + lib3mf_levelset_setfallbackvalue = None + lib3mf_levelset_getfallbackvalue = None + lib3mf_levelset_setmeshbboxonly = None + lib3mf_levelset_getmeshbboxonly = None + lib3mf_levelset_setmesh = None + lib3mf_levelset_getmesh = None + lib3mf_levelset_getvolumedata = None + lib3mf_levelset_setvolumedata = None lib3mf_beamlattice_getminlength = None lib3mf_beamlattice_setminlength = None lib3mf_beamlattice_getclipping = None @@ -260,6 +287,35 @@ class FunctionTable: lib3mf_beamlattice_getbeamsetcount = None lib3mf_beamlattice_addbeamset = None lib3mf_beamlattice_getbeamset = None + lib3mf_functionreference_getfunctionresourceid = None + lib3mf_functionreference_setfunctionresourceid = None + lib3mf_functionreference_gettransform = None + lib3mf_functionreference_settransform = None + lib3mf_functionreference_getchannelname = None + lib3mf_functionreference_setchannelname = None + lib3mf_functionreference_setminfeaturesize = None + lib3mf_functionreference_getminfeaturesize = None + lib3mf_functionreference_setfallbackvalue = None + lib3mf_functionreference_getfallbackvalue = None + lib3mf_volumedatacomposite_getbasematerialgroup = None + lib3mf_volumedatacomposite_setbasematerialgroup = None + lib3mf_volumedatacomposite_getmaterialmappingcount = None + lib3mf_volumedatacomposite_getmaterialmapping = None + lib3mf_volumedatacomposite_addmaterialmapping = None + lib3mf_volumedatacomposite_removematerialmapping = None + lib3mf_volumedataproperty_getname = None + lib3mf_volumedataproperty_setisrequired = None + lib3mf_volumedataproperty_isrequired = None + lib3mf_volumedata_getcomposite = None + lib3mf_volumedata_createnewcomposite = None + lib3mf_volumedata_removecomposite = None + lib3mf_volumedata_getcolor = None + lib3mf_volumedata_createnewcolor = None + lib3mf_volumedata_removecolor = None + lib3mf_volumedata_getpropertycount = None + lib3mf_volumedata_getproperty = None + lib3mf_volumedata_addpropertyfromfunction = None + lib3mf_volumedata_removeproperty = None lib3mf_component_getobjectresource = None lib3mf_component_getobjectresourceid = None lib3mf_component_getuuid = None @@ -316,6 +372,19 @@ class FunctionTable: lib3mf_multipropertygroup_addlayer = None lib3mf_multipropertygroup_getlayer = None lib3mf_multipropertygroup_removelayer = None + lib3mf_image3d_getname = None + lib3mf_image3d_setname = None + lib3mf_image3d_isimagestack = None + lib3mf_imagestack_getrowcount = None + lib3mf_imagestack_setrowcount = None + lib3mf_imagestack_getcolumncount = None + lib3mf_imagestack_setcolumncount = None + lib3mf_imagestack_getsheetcount = None + lib3mf_imagestack_getsheet = None + lib3mf_imagestack_setsheet = None + lib3mf_imagestack_createemptysheet = None + lib3mf_imagestack_createsheetfrombuffer = None + lib3mf_imagestack_createsheetfromfile = None lib3mf_attachment_getpath = None lib3mf_attachment_setpath = None lib3mf_attachment_packagepart = None @@ -335,6 +404,173 @@ class FunctionTable: lib3mf_texture2d_settilestyleuv = None lib3mf_texture2d_getfilter = None lib3mf_texture2d_setfilter = None + lib3mf_implicitport_getidentifier = None + lib3mf_implicitport_setidentifier = None + lib3mf_implicitport_getdisplayname = None + lib3mf_implicitport_setdisplayname = None + lib3mf_implicitport_settype = None + lib3mf_implicitport_gettype = None + lib3mf_implicitport_getreference = None + lib3mf_implicitport_setreference = None + lib3mf_iterator_movenext = None + lib3mf_iterator_moveprevious = None + lib3mf_iterator_count = None + lib3mf_implicitportiterator_getcurrent = None + lib3mf_implicitnode_getidentifier = None + lib3mf_implicitnode_setidentifier = None + lib3mf_implicitnode_getdisplayname = None + lib3mf_implicitnode_setdisplayname = None + lib3mf_implicitnode_gettag = None + lib3mf_implicitnode_settag = None + lib3mf_implicitnode_getnodetype = None + lib3mf_implicitnode_addinput = None + lib3mf_implicitnode_getinputs = None + lib3mf_implicitnode_addoutput = None + lib3mf_implicitnode_getoutputs = None + lib3mf_implicitnode_findinput = None + lib3mf_implicitnode_findoutput = None + lib3mf_implicitnode_aretypesvalid = None + lib3mf_oneinputnode_getinputa = None + lib3mf_oneinputnode_getoutputresult = None + lib3mf_resourceidnode_setresource = None + lib3mf_resourceidnode_getresource = None + lib3mf_resourceidnode_getoutputvalue = None + lib3mf_twoinputnode_getinputb = None + lib3mf_selectnode_getinputb = None + lib3mf_selectnode_getinputc = None + lib3mf_selectnode_getinputd = None + lib3mf_clampnode_getinputmin = None + lib3mf_clampnode_getinputmax = None + lib3mf_composevectornode_getinputx = None + lib3mf_composevectornode_getinputy = None + lib3mf_composevectornode_getinputz = None + lib3mf_composevectornode_getoutputresult = None + lib3mf_decomposevectornode_getinputa = None + lib3mf_decomposevectornode_getoutputx = None + lib3mf_decomposevectornode_getoutputy = None + lib3mf_decomposevectornode_getoutputz = None + lib3mf_composematrixnode_getinputm00 = None + lib3mf_composematrixnode_getinputm01 = None + lib3mf_composematrixnode_getinputm02 = None + lib3mf_composematrixnode_getinputm03 = None + lib3mf_composematrixnode_getinputm10 = None + lib3mf_composematrixnode_getinputm11 = None + lib3mf_composematrixnode_getinputm12 = None + lib3mf_composematrixnode_getinputm13 = None + lib3mf_composematrixnode_getinputm20 = None + lib3mf_composematrixnode_getinputm21 = None + lib3mf_composematrixnode_getinputm22 = None + lib3mf_composematrixnode_getinputm23 = None + lib3mf_composematrixnode_getinputm30 = None + lib3mf_composematrixnode_getinputm31 = None + lib3mf_composematrixnode_getinputm32 = None + lib3mf_composematrixnode_getinputm33 = None + lib3mf_composematrixnode_getoutputresult = None + lib3mf_matrixfromrowsnode_getinputa = None + lib3mf_matrixfromrowsnode_getinputb = None + lib3mf_matrixfromrowsnode_getinputc = None + lib3mf_matrixfromrowsnode_getinputd = None + lib3mf_matrixfromrowsnode_getoutputresult = None + lib3mf_matrixfromcolumnsnode_getinputa = None + lib3mf_matrixfromcolumnsnode_getinputb = None + lib3mf_matrixfromcolumnsnode_getinputc = None + lib3mf_matrixfromcolumnsnode_getinputd = None + lib3mf_matrixfromcolumnsnode_getoutputresult = None + lib3mf_constantnode_setconstant = None + lib3mf_constantnode_getconstant = None + lib3mf_constantnode_getoutputvalue = None + lib3mf_constvecnode_setvector = None + lib3mf_constvecnode_getvector = None + lib3mf_constvecnode_getoutputvector = None + lib3mf_constmatnode_setmatrix = None + lib3mf_constmatnode_getmatrix = None + lib3mf_constmatnode_getoutputmatrix = None + lib3mf_meshnode_getinputmesh = None + lib3mf_meshnode_getinputpos = None + lib3mf_meshnode_getoutputdistance = None + lib3mf_unsignedmeshnode_getinputmesh = None + lib3mf_unsignedmeshnode_getinputpos = None + lib3mf_unsignedmeshnode_getoutputdistance = None + lib3mf_functioncallnode_getinputfunctionid = None + lib3mf_nodeiterator_getcurrent = None + lib3mf_function_getdisplayname = None + lib3mf_function_setdisplayname = None + lib3mf_function_addinput = None + lib3mf_function_getinputs = None + lib3mf_function_removeinput = None + lib3mf_function_addoutput = None + lib3mf_function_getoutputs = None + lib3mf_function_removeoutput = None + lib3mf_function_findinput = None + lib3mf_function_findoutput = None + lib3mf_implicitfunction_getidentifier = None + lib3mf_implicitfunction_setidentifier = None + lib3mf_implicitfunction_addnode = None + lib3mf_implicitfunction_addsinnode = None + lib3mf_implicitfunction_addcosnode = None + lib3mf_implicitfunction_addtannode = None + lib3mf_implicitfunction_addarcsinnode = None + lib3mf_implicitfunction_addarccosnode = None + lib3mf_implicitfunction_addarctan2node = None + lib3mf_implicitfunction_addsinhnode = None + lib3mf_implicitfunction_addcoshnode = None + lib3mf_implicitfunction_addtanhnode = None + lib3mf_implicitfunction_addroundnode = None + lib3mf_implicitfunction_addceilnode = None + lib3mf_implicitfunction_addfloornode = None + lib3mf_implicitfunction_addsignnode = None + lib3mf_implicitfunction_addfractnode = None + lib3mf_implicitfunction_addabsnode = None + lib3mf_implicitfunction_addexpnode = None + lib3mf_implicitfunction_addlognode = None + lib3mf_implicitfunction_addlog2node = None + lib3mf_implicitfunction_addlog10node = None + lib3mf_implicitfunction_addlengthnode = None + lib3mf_implicitfunction_addtransposenode = None + lib3mf_implicitfunction_inversenode = None + lib3mf_implicitfunction_addsqrtnode = None + lib3mf_implicitfunction_addresourceidnode = None + lib3mf_implicitfunction_addadditionnode = None + lib3mf_implicitfunction_addsubtractionnode = None + lib3mf_implicitfunction_addmultiplicationnode = None + lib3mf_implicitfunction_adddivisionnode = None + lib3mf_implicitfunction_adddotnode = None + lib3mf_implicitfunction_addcrossnode = None + lib3mf_implicitfunction_addmatvecmultiplicationnode = None + lib3mf_implicitfunction_addminnode = None + lib3mf_implicitfunction_addmaxnode = None + lib3mf_implicitfunction_addfmodnode = None + lib3mf_implicitfunction_addpownode = None + lib3mf_implicitfunction_addselectnode = None + lib3mf_implicitfunction_addclampnode = None + lib3mf_implicitfunction_addcomposevectornode = None + lib3mf_implicitfunction_addvectorfromscalarnode = None + lib3mf_implicitfunction_adddecomposevectornode = None + lib3mf_implicitfunction_addcomposematrixnode = None + lib3mf_implicitfunction_addmatrixfromrowsnode = None + lib3mf_implicitfunction_addmatrixfromcolumnsnode = None + lib3mf_implicitfunction_addconstantnode = None + lib3mf_implicitfunction_addconstvecnode = None + lib3mf_implicitfunction_addconstmatnode = None + lib3mf_implicitfunction_addmeshnode = None + lib3mf_implicitfunction_addunsignedmeshnode = None + lib3mf_implicitfunction_addfunctioncallnode = None + lib3mf_implicitfunction_getnodes = None + lib3mf_implicitfunction_removenode = None + lib3mf_implicitfunction_addlink = None + lib3mf_implicitfunction_addlinkbynames = None + lib3mf_implicitfunction_clear = None + lib3mf_implicitfunction_sortnodestopologically = None + lib3mf_functionfromimage3d_getimage3d = None + lib3mf_functionfromimage3d_setimage3d = None + lib3mf_functionfromimage3d_setfilter = None + lib3mf_functionfromimage3d_getfilter = None + lib3mf_functionfromimage3d_settilestyles = None + lib3mf_functionfromimage3d_gettilestyles = None + lib3mf_functionfromimage3d_getoffset = None + lib3mf_functionfromimage3d_setoffset = None + lib3mf_functionfromimage3d_getscale = None + lib3mf_functionfromimage3d_setscale = None lib3mf_builditem_getobjectresource = None lib3mf_builditem_getuuid = None lib3mf_builditem_setuuid = None @@ -429,6 +665,7 @@ class FunctionTable: lib3mf_model_getcomponentsobjectbyid = None lib3mf_model_getcolorgroupbyid = None lib3mf_model_getslicestackbyid = None + lib3mf_model_getlevelsetbyid = None lib3mf_model_getbuilduuid = None lib3mf_model_setbuilduuid = None lib3mf_model_getbuilditems = None @@ -444,7 +681,9 @@ class FunctionTable: lib3mf_model_getcompositematerials = None lib3mf_model_getmultipropertygroups = None lib3mf_model_getslicestacks = None + lib3mf_model_getimage3ds = None lib3mf_model_mergetomodel = None + lib3mf_model_mergefrommodel = None lib3mf_model_addmeshobject = None lib3mf_model_addcomponentsobject = None lib3mf_model_addslicestack = None @@ -454,6 +693,8 @@ class FunctionTable: lib3mf_model_addtexture2dgroup = None lib3mf_model_addcompositematerials = None lib3mf_model_addmultipropertygroup = None + lib3mf_model_addimagestack = None + lib3mf_model_getimagestackbyid = None lib3mf_model_addbuilditem = None lib3mf_model_removebuilditem = None lib3mf_model_getmetadatagroup = None @@ -470,6 +711,13 @@ class FunctionTable: lib3mf_model_removecustomcontenttype = None lib3mf_model_setrandomnumbercallback = None lib3mf_model_getkeystore = None + lib3mf_model_getfunctions = None + lib3mf_model_addimplicitfunction = None + lib3mf_model_addfunctionfromimage3d = None + lib3mf_model_addvolumedata = None + lib3mf_model_addlevelset = None + lib3mf_model_getlevelsets = None + lib3mf_model_removeresource = None '''Definition of Enumerations ''' @@ -580,6 +828,94 @@ class BlendMethod(CTypesEnum): NoBlendMethod = 0 Mix = 1 Multiply = 2 +'''Definition of ChannelName +''' +class ChannelName(CTypesEnum): + Red = 0 + Green = 1 + Blue = 2 + Alpha = 3 +'''Definition of CompositionMethod +''' +class CompositionMethod(CTypesEnum): + WeightedSum = 0 + Multiply = 1 + Min = 2 + Max = 3 + Mask = 4 +'''Definition of CompositionSpace +''' +class CompositionSpace(CTypesEnum): + Raw = 0 + LinearColor = 1 +'''Definition of ImplicitNodeType +''' +class ImplicitNodeType(CTypesEnum): + Addition = 1 + Subtraction = 2 + Multiplication = 3 + Division = 4 + Constant = 5 + ConstVec = 6 + ConstMat = 7 + ComposeVector = 8 + DecomposeVector = 9 + ComposeMatrix = 10 + MatrixFromColumns = 11 + MatrixFromRows = 12 + Dot = 13 + Cross = 14 + MatVecMultiplication = 15 + Transpose = 16 + Inverse = 17 + Sinus = 18 + Cosinus = 19 + Tan = 20 + ArcSin = 21 + ArcCos = 22 + ArcTan = 23 + ArcTan2 = 24 + Min = 25 + Max = 26 + Abs = 27 + Fmod = 28 + Pow = 29 + Sqrt = 30 + Exp = 31 + Log = 32 + Log2 = 33 + Log10 = 34 + Select = 35 + Clamp = 36 + Sinh = 37 + Cosh = 38 + Tanh = 39 + Round = 40 + Ceil = 41 + Floor = 42 + Sign = 43 + Fract = 44 + FunctionCall = 45 + Mesh = 46 + Length = 47 + ConstResourceID = 48 + VectorFromScalar = 49 + UnsignedMesh = 50 + Mod = 51 +'''Definition of ImplicitPortType +''' +class ImplicitPortType(CTypesEnum): + Scalar = 1 + Vector = 2 + Matrix = 3 + ResourceID = 4 +'''Definition of ImplicitNodeConfiguration +''' +class ImplicitNodeConfiguration(CTypesEnum): + Default = 1 + ScalarToScalar = 2 + VectorToVector = 3 + MatrixToMatrix = 4 '''Definition of EncryptionAlgorithm ''' class EncryptionAlgorithm(CTypesEnum): @@ -704,6 +1040,20 @@ class Ball(ctypes.Structure): ("Index", ctypes.c_uint32), ("Radius", ctypes.c_double) ] +'''Definition of Vector +''' +class Vector(ctypes.Structure): + _pack_ = 1 + _fields_ = [ + ("Coordinates", ctypes.c_double * 3) + ] +'''Definition of Matrix4x4 +''' +class Matrix4x4(ctypes.Structure): + _pack_ = 1 + _fields_ = [ + ("Field", (ctypes.c_double * 4) * 4) + ] '''Definition of Function Types ''' @@ -1180,6 +1530,24 @@ def _loadFunctionTableFromMethod(self, symbolLookupMethodAddress): methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) self.lib.lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_image3diterator_getcurrentimage3d")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_image3diterator_getcurrentimage3d = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functioniterator_getcurrentfunction")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_functioniterator_getcurrentfunction = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelsetiterator_getcurrentlevelset")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_levelsetiterator_getcurrentlevelset = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_metadata_getnamespace")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) @@ -1330,6 +1698,12 @@ def _loadFunctionTableFromMethod(self, symbolLookupMethodAddress): methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) self.lib.lib3mf_object_iscomponentsobject = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_object_islevelsetobject")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) + self.lib.lib3mf_object_islevelsetobject = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_object_isvalid")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) @@ -1534,6 +1908,114 @@ def _loadFunctionTableFromMethod(self, symbolLookupMethodAddress): methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) self.lib.lib3mf_meshobject_beamlattice = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_meshobject_getvolumedata")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_meshobject_getvolumedata = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_meshobject_setvolumedata")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_meshobject_setvolumedata = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_getfunction")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_levelset_getfunction = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_setfunction")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_levelset_setfunction = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_gettransform")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Transform)) + self.lib.lib3mf_levelset_gettransform = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_settransform")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Transform)) + self.lib.lib3mf_levelset_settransform = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_getchannelname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_levelset_getchannelname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_setchannelname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_levelset_setchannelname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_setminfeaturesize")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double) + self.lib.lib3mf_levelset_setminfeaturesize = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_getminfeaturesize")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) + self.lib.lib3mf_levelset_getminfeaturesize = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_setfallbackvalue")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double) + self.lib.lib3mf_levelset_setfallbackvalue = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_getfallbackvalue")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) + self.lib.lib3mf_levelset_getfallbackvalue = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_setmeshbboxonly")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_bool) + self.lib.lib3mf_levelset_setmeshbboxonly = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_getmeshbboxonly")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) + self.lib.lib3mf_levelset_getmeshbboxonly = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_setmesh")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_levelset_setmesh = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_getmesh")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_levelset_getmesh = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_getvolumedata")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_levelset_getvolumedata = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_levelset_setvolumedata")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_levelset_setvolumedata = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_beamlattice_getminlength")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) @@ -1672,6 +2154,180 @@ def _loadFunctionTableFromMethod(self, symbolLookupMethodAddress): methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) self.lib.lib3mf_beamlattice_getbeamset = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionreference_getfunctionresourceid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)) + self.lib.lib3mf_functionreference_getfunctionresourceid = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionreference_setfunctionresourceid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32) + self.lib.lib3mf_functionreference_setfunctionresourceid = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionreference_gettransform")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Transform)) + self.lib.lib3mf_functionreference_gettransform = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionreference_settransform")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Transform)) + self.lib.lib3mf_functionreference_settransform = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionreference_getchannelname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_functionreference_getchannelname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionreference_setchannelname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_functionreference_setchannelname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionreference_setminfeaturesize")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double) + self.lib.lib3mf_functionreference_setminfeaturesize = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionreference_getminfeaturesize")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) + self.lib.lib3mf_functionreference_getminfeaturesize = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionreference_setfallbackvalue")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double) + self.lib.lib3mf_functionreference_setfallbackvalue = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionreference_getfallbackvalue")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) + self.lib.lib3mf_functionreference_getfallbackvalue = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedatacomposite_getbasematerialgroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_volumedatacomposite_getbasematerialgroup = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedatacomposite_setbasematerialgroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_volumedatacomposite_setbasematerialgroup = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedatacomposite_getmaterialmappingcount")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)) + self.lib.lib3mf_volumedatacomposite_getmaterialmappingcount = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedatacomposite_getmaterialmapping")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_volumedatacomposite_getmaterialmapping = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedatacomposite_addmaterialmapping")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Transform), ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_volumedatacomposite_addmaterialmapping = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedatacomposite_removematerialmapping")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32) + self.lib.lib3mf_volumedatacomposite_removematerialmapping = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedataproperty_getname")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_volumedataproperty_getname = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedataproperty_setisrequired")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_bool) + self.lib.lib3mf_volumedataproperty_setisrequired = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedataproperty_isrequired")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) + self.lib.lib3mf_volumedataproperty_isrequired = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedata_getcomposite")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_volumedata_getcomposite = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedata_createnewcomposite")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_volumedata_createnewcomposite = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedata_removecomposite")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p) + self.lib.lib3mf_volumedata_removecomposite = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedata_getcolor")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_volumedata_getcolor = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedata_createnewcolor")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_volumedata_createnewcolor = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedata_removecolor")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p) + self.lib.lib3mf_volumedata_removecolor = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedata_getpropertycount")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)) + self.lib.lib3mf_volumedata_getpropertycount = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedata_getproperty")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_volumedata_getproperty = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedata_addpropertyfromfunction")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_volumedata_addpropertyfromfunction = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_volumedata_removeproperty")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32) + self.lib.lib3mf_volumedata_removeproperty = methodType(int(methodAddress.value)) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_component_getobjectresource")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) @@ -2008,76 +2664,154 @@ def _loadFunctionTableFromMethod(self, symbolLookupMethodAddress): methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32) self.lib.lib3mf_multipropertygroup_removelayer = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_getpath")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_image3d_getname")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_attachment_getpath = methodType(int(methodAddress.value)) + self.lib.lib3mf_image3d_getname = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_setpath")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_image3d_setname")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) - self.lib.lib3mf_attachment_setpath = methodType(int(methodAddress.value)) + self.lib.lib3mf_image3d_setname = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_packagepart")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_image3d_isimagestack")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_attachment_packagepart = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) + self.lib.lib3mf_image3d_isimagestack = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_getrelationshiptype")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_imagestack_getrowcount")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_attachment_getrelationshiptype = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)) + self.lib.lib3mf_imagestack_getrowcount = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_setrelationshiptype")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_imagestack_setrowcount")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) - self.lib.lib3mf_attachment_setrelationshiptype = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32) + self.lib.lib3mf_imagestack_setrowcount = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_writetofile")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_imagestack_getcolumncount")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) - self.lib.lib3mf_attachment_writetofile = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)) + self.lib.lib3mf_imagestack_getcolumncount = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_readfromfile")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_imagestack_setcolumncount")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) - self.lib.lib3mf_attachment_readfromfile = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32) + self.lib.lib3mf_imagestack_setcolumncount = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_readfromcallback")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_imagestack_getsheetcount")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ReadCallback, ctypes.c_uint64, SeekCallback, ctypes.c_void_p) - self.lib.lib3mf_attachment_readfromcallback = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)) + self.lib.lib3mf_imagestack_getsheetcount = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_getstreamsize")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_imagestack_getsheet")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_attachment_getstreamsize = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_imagestack_getsheet = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_writetobuffer")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_imagestack_setsheet")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) - self.lib.lib3mf_attachment_writetobuffer = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.c_void_p) + self.lib.lib3mf_imagestack_setsheet = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_readfrombuffer")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_imagestack_createemptysheet")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8)) - self.lib.lib3mf_attachment_readfrombuffer = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_imagestack_createemptysheet = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_texture2d_getattachment")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_imagestack_createsheetfrombuffer")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_imagestack_createsheetfrombuffer = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_imagestack_createsheetfromfile")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_imagestack_createsheetfromfile = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_getpath")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_attachment_getpath = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_setpath")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_attachment_setpath = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_packagepart")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_attachment_packagepart = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_getrelationshiptype")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_attachment_getrelationshiptype = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_setrelationshiptype")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_attachment_setrelationshiptype = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_writetofile")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_attachment_writetofile = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_readfromfile")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_attachment_readfromfile = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_readfromcallback")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ReadCallback, ctypes.c_uint64, SeekCallback, ctypes.c_void_p) + self.lib.lib3mf_attachment_readfromcallback = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_getstreamsize")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_attachment_getstreamsize = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_writetobuffer")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) + self.lib.lib3mf_attachment_writetobuffer = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_attachment_readfrombuffer")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8)) + self.lib.lib3mf_attachment_readfrombuffer = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_texture2d_getattachment")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) self.lib.lib3mf_texture2d_getattachment = methodType(int(methodAddress.value)) err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_texture2d_setattachment")), methodAddress) @@ -2122,3927 +2856,8579 @@ def _loadFunctionTableFromMethod(self, symbolLookupMethodAddress): methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, TextureFilter) self.lib.lib3mf_texture2d_setfilter = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getobjectresource")), methodAddress) - if err != 0: - raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_builditem_getobjectresource = methodType(int(methodAddress.value)) - - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getuuid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitport_getidentifier")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_builditem_getuuid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_implicitport_getidentifier = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_setuuid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitport_setidentifier")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) - self.lib.lib3mf_builditem_setuuid = methodType(int(methodAddress.value)) + self.lib.lib3mf_implicitport_setidentifier = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getobjectresourceid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitport_getdisplayname")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)) - self.lib.lib3mf_builditem_getobjectresourceid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_implicitport_getdisplayname = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_hasobjecttransform")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitport_setdisplayname")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) - self.lib.lib3mf_builditem_hasobjecttransform = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_implicitport_setdisplayname = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getobjecttransform")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitport_settype")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Transform)) - self.lib.lib3mf_builditem_getobjecttransform = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ImplicitPortType) + self.lib.lib3mf_implicitport_settype = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_setobjecttransform")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitport_gettype")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Transform)) - self.lib.lib3mf_builditem_setobjecttransform = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_implicitport_gettype = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getpartnumber")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitport_getreference")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_builditem_getpartnumber = methodType(int(methodAddress.value)) + self.lib.lib3mf_implicitport_getreference = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_setpartnumber")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitport_setreference")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) - self.lib.lib3mf_builditem_setpartnumber = methodType(int(methodAddress.value)) - - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getmetadatagroup")), methodAddress) - if err != 0: - raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_builditem_getmetadatagroup = methodType(int(methodAddress.value)) + self.lib.lib3mf_implicitport_setreference = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getoutbox")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_iterator_movenext")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Box)) - self.lib.lib3mf_builditem_getoutbox = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) + self.lib.lib3mf_iterator_movenext = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditemiterator_movenext")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_iterator_moveprevious")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) - self.lib.lib3mf_builditemiterator_movenext = methodType(int(methodAddress.value)) + self.lib.lib3mf_iterator_moveprevious = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditemiterator_moveprevious")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_iterator_count")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) - self.lib.lib3mf_builditemiterator_moveprevious = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_iterator_count = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditemiterator_getcurrent")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitportiterator_getcurrent")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_builditemiterator_getcurrent = methodType(int(methodAddress.value)) + self.lib.lib3mf_implicitportiterator_getcurrent = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditemiterator_clone")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_getidentifier")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_builditemiterator_clone = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_implicitnode_getidentifier = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditemiterator_count")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_setidentifier")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_builditemiterator_count = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_implicitnode_setidentifier = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_setvertices")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_getdisplayname")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(Position2D)) - self.lib.lib3mf_slice_setvertices = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_implicitnode_getdisplayname = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getvertices")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_setdisplayname")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Position2D)) - self.lib.lib3mf_slice_getvertices = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_implicitnode_setdisplayname = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getvertexcount")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_gettag")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_slice_getvertexcount = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_implicitnode_gettag = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_addpolygon")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_settag")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_slice_addpolygon = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_implicitnode_settag = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getpolygoncount")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_getnodetype")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_slice_getpolygoncount = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_implicitnode_getnodetype = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_setpolygonindices")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_addinput")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32)) - self.lib.lib3mf_slice_setpolygonindices = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitnode_addinput = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getpolygonindices")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_getinputs")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)) - self.lib.lib3mf_slice_getpolygonindices = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitnode_getinputs = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getpolygonindexcount")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_addoutput")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_slice_getpolygonindexcount = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitnode_addoutput = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getztop")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_getoutputs")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) - self.lib.lib3mf_slice_getztop = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitnode_getoutputs = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getbottomz")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_findinput")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) - self.lib.lib3mf_slicestack_getbottomz = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitnode_findinput = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getslicecount")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_findoutput")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_slicestack_getslicecount = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitnode_findoutput = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getslice")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitnode_aretypesvalid")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_slicestack_getslice = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) + self.lib.lib3mf_implicitnode_aretypesvalid = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_addslice")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_oneinputnode_getinputa")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_slicestack_addslice = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_oneinputnode_getinputa = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getslicerefcount")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_oneinputnode_getoutputresult")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_slicestack_getslicerefcount = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_oneinputnode_getoutputresult = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_addslicestackreference")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourceidnode_setresource")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) - self.lib.lib3mf_slicestack_addslicestackreference = methodType(int(methodAddress.value)) + self.lib.lib3mf_resourceidnode_setresource = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getslicestackreference")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourceidnode_getresource")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_slicestack_getslicestackreference = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_resourceidnode_getresource = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_collapseslicereferences")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourceidnode_getoutputvalue")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p) - self.lib.lib3mf_slicestack_collapseslicereferences = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_resourceidnode_getoutputvalue = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_setownpath")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_twoinputnode_getinputb")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) - self.lib.lib3mf_slicestack_setownpath = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_twoinputnode_getinputb = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getownpath")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_selectnode_getinputb")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_slicestack_getownpath = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_selectnode_getinputb = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_consumer_getconsumerid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_selectnode_getinputc")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_consumer_getconsumerid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_selectnode_getinputc = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_consumer_getkeyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_selectnode_getinputd")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_consumer_getkeyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_selectnode_getinputd = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_consumer_getkeyvalue")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_clampnode_getinputmin")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_consumer_getkeyvalue = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_clampnode_getinputmin = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_accessright_getconsumer")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_clampnode_getinputmax")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_accessright_getconsumer = methodType(int(methodAddress.value)) + self.lib.lib3mf_clampnode_getinputmax = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_accessright_getwrappingalgorithm")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composevectornode_getinputx")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) - self.lib.lib3mf_accessright_getwrappingalgorithm = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composevectornode_getinputx = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_accessright_getmgfalgorithm")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composevectornode_getinputy")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) - self.lib.lib3mf_accessright_getmgfalgorithm = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composevectornode_getinputy = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_accessright_getdigestmethod")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composevectornode_getinputz")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) - self.lib.lib3mf_accessright_getdigestmethod = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composevectornode_getinputz = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getencryptionalgorithm")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composevectornode_getoutputresult")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) - self.lib.lib3mf_contentencryptionparams_getencryptionalgorithm = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composevectornode_getoutputresult = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getkey")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_decomposevectornode_getinputa")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) - self.lib.lib3mf_contentencryptionparams_getkey = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_decomposevectornode_getinputa = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getinitializationvector")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_decomposevectornode_getoutputx")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) - self.lib.lib3mf_contentencryptionparams_getinitializationvector = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_decomposevectornode_getoutputx = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getauthenticationtag")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_decomposevectornode_getoutputy")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) - self.lib.lib3mf_contentencryptionparams_getauthenticationtag = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_decomposevectornode_getoutputy = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_setauthenticationtag")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_decomposevectornode_getoutputz")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8)) - self.lib.lib3mf_contentencryptionparams_setauthenticationtag = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_decomposevectornode_getoutputz = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getadditionalauthenticationdata")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm00")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) - self.lib.lib3mf_contentencryptionparams_getadditionalauthenticationdata = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm00 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getdescriptor")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm01")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_contentencryptionparams_getdescriptor = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm01 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getkeyuuid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm02")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_contentencryptionparams_getkeyuuid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm02 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedata_getpath")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm03")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_resourcedata_getpath = methodType(int(methodAddress.value)) + self.lib.lib3mf_composematrixnode_getinputm03 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedata_getencryptionalgorithm")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm10")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) - self.lib.lib3mf_resourcedata_getencryptionalgorithm = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm10 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedata_getcompression")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm11")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) - self.lib.lib3mf_resourcedata_getcompression = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm11 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedata_getadditionalauthenticationdata")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm12")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) - self.lib.lib3mf_resourcedata_getadditionalauthenticationdata = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm12 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedatagroup_getkeyuuid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm13")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_resourcedatagroup_getkeyuuid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm13 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedatagroup_addaccessright")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm20")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, WrappingAlgorithm, MgfAlgorithm, DigestMethod, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_resourcedatagroup_addaccessright = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm20 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedatagroup_findaccessrightbyconsumer")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm21")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_resourcedatagroup_findaccessrightbyconsumer = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm21 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedatagroup_removeaccessright")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm22")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) - self.lib.lib3mf_resourcedatagroup_removeaccessright = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm22 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_addconsumer")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm23")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_keystore_addconsumer = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm23 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getconsumercount")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm30")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_keystore_getconsumercount = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm30 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getconsumer")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm31")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_keystore_getconsumer = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm31 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_removeconsumer")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm32")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) - self.lib.lib3mf_keystore_removeconsumer = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm32 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_findconsumer")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getinputm33")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_keystore_findconsumer = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getinputm33 = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getresourcedatagroupcount")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_composematrixnode_getoutputresult")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_keystore_getresourcedatagroupcount = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_composematrixnode_getoutputresult = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_addresourcedatagroup")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_matrixfromrowsnode_getinputa")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_keystore_addresourcedatagroup = methodType(int(methodAddress.value)) + self.lib.lib3mf_matrixfromrowsnode_getinputa = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getresourcedatagroup")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_matrixfromrowsnode_getinputb")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_keystore_getresourcedatagroup = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_matrixfromrowsnode_getinputb = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_removeresourcedatagroup")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_matrixfromrowsnode_getinputc")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) - self.lib.lib3mf_keystore_removeresourcedatagroup = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_matrixfromrowsnode_getinputc = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_findresourcedatagroup")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_matrixfromrowsnode_getinputd")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_keystore_findresourcedatagroup = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_matrixfromrowsnode_getinputd = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_addresourcedata")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_matrixfromrowsnode_getoutputresult")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, EncryptionAlgorithm, Compression, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_keystore_addresourcedata = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_matrixfromrowsnode_getoutputresult = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_removeresourcedata")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_matrixfromcolumnsnode_getinputa")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) - self.lib.lib3mf_keystore_removeresourcedata = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_matrixfromcolumnsnode_getinputa = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_findresourcedata")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_matrixfromcolumnsnode_getinputb")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_keystore_findresourcedata = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_matrixfromcolumnsnode_getinputb = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getresourcedatacount")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_matrixfromcolumnsnode_getinputc")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) - self.lib.lib3mf_keystore_getresourcedatacount = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_matrixfromcolumnsnode_getinputc = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getresourcedata")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_matrixfromcolumnsnode_getinputd")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_keystore_getresourcedata = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_matrixfromcolumnsnode_getinputd = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getuuid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_matrixfromcolumnsnode_getoutputresult")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_keystore_getuuid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_matrixfromcolumnsnode_getoutputresult = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_setuuid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_constantnode_setconstant")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) - self.lib.lib3mf_keystore_setuuid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double) + self.lib.lib3mf_constantnode_setconstant = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_rootmodelpart")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_constantnode_getconstant")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) + self.lib.lib3mf_constantnode_getconstant = methodType(int(methodAddress.value)) + + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_constantnode_getoutputvalue")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_rootmodelpart = methodType(int(methodAddress.value)) + self.lib.lib3mf_constantnode_getoutputvalue = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_findorcreatepackagepart")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_constvecnode_setvector")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_findorcreatepackagepart = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Vector)) + self.lib.lib3mf_constvecnode_setvector = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_setunit")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_constvecnode_getvector")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ModelUnit) - self.lib.lib3mf_model_setunit = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Vector)) + self.lib.lib3mf_constvecnode_getvector = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getunit")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_constvecnode_getoutputvector")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) - self.lib.lib3mf_model_getunit = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_constvecnode_getoutputvector = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getlanguage")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_constmatnode_setmatrix")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_model_getlanguage = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Matrix4x4)) + self.lib.lib3mf_constmatnode_setmatrix = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_setlanguage")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_constmatnode_getmatrix")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) - self.lib.lib3mf_model_setlanguage = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Matrix4x4)) + self.lib.lib3mf_constmatnode_getmatrix = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_querywriter")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_constmatnode_getoutputmatrix")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_querywriter = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_constmatnode_getoutputmatrix = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_queryreader")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_meshnode_getinputmesh")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_queryreader = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_meshnode_getinputmesh = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getresourcebyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_meshnode_getinputpos")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getresourcebyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_meshnode_getinputpos = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_gettexture2dbyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_meshnode_getoutputdistance")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_gettexture2dbyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_meshnode_getoutputdistance = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getpropertytypebyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_unsignedmeshnode_getinputmesh")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_int32)) - self.lib.lib3mf_model_getpropertytypebyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_unsignedmeshnode_getinputmesh = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getbasematerialgroupbyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_unsignedmeshnode_getinputpos")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getbasematerialgroupbyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_unsignedmeshnode_getinputpos = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_gettexture2dgroupbyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_unsignedmeshnode_getoutputdistance")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_gettexture2dgroupbyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_unsignedmeshnode_getoutputdistance = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcompositematerialsbyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functioncallnode_getinputfunctionid")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getcompositematerialsbyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_functioncallnode_getinputfunctionid = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getmultipropertygroupbyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_nodeiterator_getcurrent")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getmultipropertygroupbyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_nodeiterator_getcurrent = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getmeshobjectbyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_function_getdisplayname")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getmeshobjectbyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_function_getdisplayname = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcomponentsobjectbyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_function_setdisplayname")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getcomponentsobjectbyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_function_setdisplayname = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcolorgroupbyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_function_addinput")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getcolorgroupbyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ImplicitPortType, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_function_addinput = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getslicestackbyid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_function_getinputs")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getslicestackbyid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_function_getinputs = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getbuilduuid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_function_removeinput")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) - self.lib.lib3mf_model_getbuilduuid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_function_removeinput = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_setbuilduuid")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_function_addoutput")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) - self.lib.lib3mf_model_setbuilduuid = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ImplicitPortType, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_function_addoutput = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getbuilditems")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_function_getoutputs")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getbuilditems = methodType(int(methodAddress.value)) + self.lib.lib3mf_function_getoutputs = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getoutbox")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_function_removeoutput")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Box)) - self.lib.lib3mf_model_getoutbox = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_function_removeoutput = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getresources")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_function_findinput")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getresources = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_function_findinput = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getobjects")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_function_findoutput")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getobjects = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_function_findoutput = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getmeshobjects")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_getidentifier")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getmeshobjects = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_implicitfunction_getidentifier = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcomponentsobjects")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_setidentifier")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getcomponentsobjects = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_implicitfunction_setidentifier = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_gettexture2ds")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_gettexture2ds = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ImplicitNodeType, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getbasematerialgroups")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addsinnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getbasematerialgroups = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addsinnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcolorgroups")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addcosnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getcolorgroups = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addcosnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_gettexture2dgroups")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addtannode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_gettexture2dgroups = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addtannode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcompositematerials")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addarcsinnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getcompositematerials = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addarcsinnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getmultipropertygroups")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addarccosnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getmultipropertygroups = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addarccosnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getslicestacks")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addarctan2node")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getslicestacks = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addarctan2node = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_mergetomodel")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addsinhnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_mergetomodel = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addsinhnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addmeshobject")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addcoshnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_addmeshobject = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addcoshnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addcomponentsobject")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addtanhnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_addcomponentsobject = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addtanhnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addslicestack")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addroundnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_addslicestack = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addroundnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addtexture2dfromattachment")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addceilnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_addtexture2dfromattachment = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addceilnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addbasematerialgroup")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addfloornode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_addbasematerialgroup = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addfloornode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addcolorgroup")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addsignnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_addcolorgroup = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addsignnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addtexture2dgroup")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addfractnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_addtexture2dgroup = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addfractnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addcompositematerials")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addabsnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_addcompositematerials = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addabsnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addmultipropertygroup")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addexpnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_addmultipropertygroup = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addexpnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addbuilditem")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addlognode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(Transform), ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_addbuilditem = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addlognode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_removebuilditem")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addlog2node")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) - self.lib.lib3mf_model_removebuilditem = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addlog2node = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getmetadatagroup")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addlog10node")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getmetadatagroup = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addlog10node = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addattachment")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addlengthnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_addattachment = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addlengthnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_removeattachment")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addtransposenode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) - self.lib.lib3mf_model_removeattachment = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addtransposenode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getattachment")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_inversenode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getattachment = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_inversenode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_findattachment")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addsqrtnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_findattachment = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addsqrtnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getattachmentcount")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addresourceidnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)) - self.lib.lib3mf_model_getattachmentcount = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addresourceidnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_haspackagethumbnailattachment")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addadditionnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) - self.lib.lib3mf_model_haspackagethumbnailattachment = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addadditionnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_createpackagethumbnailattachment")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addsubtractionnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_createpackagethumbnailattachment = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addsubtractionnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getpackagethumbnailattachment")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addmultiplicationnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getpackagethumbnailattachment = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addmultiplicationnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_removepackagethumbnailattachment")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_adddivisionnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p) - self.lib.lib3mf_model_removepackagethumbnailattachment = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_adddivisionnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addcustomcontenttype")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_adddotnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p) - self.lib.lib3mf_model_addcustomcontenttype = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_adddotnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_removecustomcontenttype")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addcrossnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) - self.lib.lib3mf_model_removecustomcontenttype = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addcrossnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_setrandomnumbercallback")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addmatvecmultiplicationnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, RandomNumberCallback, ctypes.c_void_p) - self.lib.lib3mf_model_setrandomnumbercallback = methodType(int(methodAddress.value)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addmatvecmultiplicationnode = methodType(int(methodAddress.value)) - err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getkeystore")), methodAddress) + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addminnode")), methodAddress) if err != 0: raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) - methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) - self.lib.lib3mf_model_getkeystore = methodType(int(methodAddress.value)) - - except AttributeError as ae: - raise ELib3MFException(ErrorCodes.COULDNOTFINDLIBRARYEXPORT, ae.args[0]) - - def _loadFunctionTable(self): - try: - self.lib.lib3mf_getlibraryversion.restype = ctypes.c_int32 - self.lib.lib3mf_getlibraryversion.argtypes = [ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32)] + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addminnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_getprereleaseinformation.restype = ctypes.c_int32 - self.lib.lib3mf_getprereleaseinformation.argtypes = [ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addmaxnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addmaxnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_getbuildinformation.restype = ctypes.c_int32 - self.lib.lib3mf_getbuildinformation.argtypes = [ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addfmodnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addfmodnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_getspecificationversion.restype = ctypes.c_int32 - self.lib.lib3mf_getspecificationversion.argtypes = [ctypes.c_char_p, ctypes.POINTER(ctypes.c_bool), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addpownode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addpownode = methodType(int(methodAddress.value)) - self.lib.lib3mf_createmodel.restype = ctypes.c_int32 - self.lib.lib3mf_createmodel.argtypes = [ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addselectnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addselectnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_release.restype = ctypes.c_int32 - self.lib.lib3mf_release.argtypes = [ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addclampnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addclampnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_acquire.restype = ctypes.c_int32 - self.lib.lib3mf_acquire.argtypes = [ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addcomposevectornode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addcomposevectornode = methodType(int(methodAddress.value)) - self.lib.lib3mf_setjournal.restype = ctypes.c_int32 - self.lib.lib3mf_setjournal.argtypes = [ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addvectorfromscalarnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addvectorfromscalarnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_getlasterror.restype = ctypes.c_int32 - self.lib.lib3mf_getlasterror.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p, ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_adddecomposevectornode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_adddecomposevectornode = methodType(int(methodAddress.value)) - self.lib.lib3mf_getsymbollookupmethod.restype = ctypes.c_int32 - self.lib.lib3mf_getsymbollookupmethod.argtypes = [ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addcomposematrixnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addcomposematrixnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_retrieveprogressmessage.restype = ctypes.c_int32 - self.lib.lib3mf_retrieveprogressmessage.argtypes = [ProgressIdentifier, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addmatrixfromrowsnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addmatrixfromrowsnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_rgbatocolor.restype = ctypes.c_int32 - self.lib.lib3mf_rgbatocolor.argtypes = [ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.POINTER(Color)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addmatrixfromcolumnsnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addmatrixfromcolumnsnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_floatrgbatocolor.restype = ctypes.c_int32 - self.lib.lib3mf_floatrgbatocolor.argtypes = [ctypes.c_float, ctypes.c_float, ctypes.c_float, ctypes.c_float, ctypes.POINTER(Color)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addconstantnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addconstantnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_colortorgba.restype = ctypes.c_int32 - self.lib.lib3mf_colortorgba.argtypes = [ctypes.POINTER(Color), ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_uint8)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addconstvecnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addconstvecnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_colortofloatrgba.restype = ctypes.c_int32 - self.lib.lib3mf_colortofloatrgba.argtypes = [ctypes.POINTER(Color), ctypes.POINTER(ctypes.c_float), ctypes.POINTER(ctypes.c_float), ctypes.POINTER(ctypes.c_float), ctypes.POINTER(ctypes.c_float)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addconstmatnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addconstmatnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_getidentitytransform.restype = ctypes.c_int32 - self.lib.lib3mf_getidentitytransform.argtypes = [ctypes.POINTER(Transform)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addmeshnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addmeshnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_getuniformscaletransform.restype = ctypes.c_int32 - self.lib.lib3mf_getuniformscaletransform.argtypes = [ctypes.c_float, ctypes.POINTER(Transform)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addunsignedmeshnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addunsignedmeshnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_getscaletransform.restype = ctypes.c_int32 - self.lib.lib3mf_getscaletransform.argtypes = [ctypes.c_float, ctypes.c_float, ctypes.c_float, ctypes.POINTER(Transform)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addfunctioncallnode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_addfunctioncallnode = methodType(int(methodAddress.value)) - self.lib.lib3mf_gettranslationtransform.restype = ctypes.c_int32 - self.lib.lib3mf_gettranslationtransform.argtypes = [ctypes.c_float, ctypes.c_float, ctypes.c_float, ctypes.POINTER(Transform)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_getnodes")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_implicitfunction_getnodes = methodType(int(methodAddress.value)) - self.lib.lib3mf_base_classtypeid.restype = ctypes.c_int32 - self.lib.lib3mf_base_classtypeid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_removenode")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_implicitfunction_removenode = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_writetofile.restype = ctypes.c_int32 - self.lib.lib3mf_writer_writetofile.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addlink")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_implicitfunction_addlink = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_getstreamsize.restype = ctypes.c_int32 - self.lib.lib3mf_writer_getstreamsize.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_addlinkbynames")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p) + self.lib.lib3mf_implicitfunction_addlinkbynames = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_writetobuffer.restype = ctypes.c_int32 - self.lib.lib3mf_writer_writetobuffer.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_clear")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p) + self.lib.lib3mf_implicitfunction_clear = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_writetocallback.restype = ctypes.c_int32 - self.lib.lib3mf_writer_writetocallback.argtypes = [ctypes.c_void_p, WriteCallback, SeekCallback, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_implicitfunction_sortnodestopologically")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p) + self.lib.lib3mf_implicitfunction_sortnodestopologically = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_setprogresscallback.restype = ctypes.c_int32 - self.lib.lib3mf_writer_setprogresscallback.argtypes = [ctypes.c_void_p, ProgressCallback, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionfromimage3d_getimage3d")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_functionfromimage3d_getimage3d = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_getdecimalprecision.restype = ctypes.c_int32 - self.lib.lib3mf_writer_getdecimalprecision.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionfromimage3d_setimage3d")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_functionfromimage3d_setimage3d = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_setdecimalprecision.restype = ctypes.c_int32 - self.lib.lib3mf_writer_setdecimalprecision.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionfromimage3d_setfilter")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, TextureFilter) + self.lib.lib3mf_functionfromimage3d_setfilter = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_setstrictmodeactive.restype = ctypes.c_int32 - self.lib.lib3mf_writer_setstrictmodeactive.argtypes = [ctypes.c_void_p, ctypes.c_bool] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionfromimage3d_getfilter")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_functionfromimage3d_getfilter = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_getstrictmodeactive.restype = ctypes.c_int32 - self.lib.lib3mf_writer_getstrictmodeactive.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionfromimage3d_settilestyles")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, TextureTileStyle, TextureTileStyle, TextureTileStyle) + self.lib.lib3mf_functionfromimage3d_settilestyles = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_getwarning.restype = ctypes.c_int32 - self.lib.lib3mf_writer_getwarning.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_uint32), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionfromimage3d_gettilestyles")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_functionfromimage3d_gettilestyles = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_getwarningcount.restype = ctypes.c_int32 - self.lib.lib3mf_writer_getwarningcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionfromimage3d_getoffset")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) + self.lib.lib3mf_functionfromimage3d_getoffset = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_addkeywrappingcallback.restype = ctypes.c_int32 - self.lib.lib3mf_writer_addkeywrappingcallback.argtypes = [ctypes.c_void_p, ctypes.c_char_p, KeyWrappingCallback, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionfromimage3d_setoffset")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double) + self.lib.lib3mf_functionfromimage3d_setoffset = methodType(int(methodAddress.value)) - self.lib.lib3mf_writer_setcontentencryptioncallback.restype = ctypes.c_int32 - self.lib.lib3mf_writer_setcontentencryptioncallback.argtypes = [ctypes.c_void_p, ContentEncryptionCallback, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionfromimage3d_getscale")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) + self.lib.lib3mf_functionfromimage3d_getscale = methodType(int(methodAddress.value)) - self.lib.lib3mf_reader_readfromfile.restype = ctypes.c_int32 - self.lib.lib3mf_reader_readfromfile.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_functionfromimage3d_setscale")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double) + self.lib.lib3mf_functionfromimage3d_setscale = methodType(int(methodAddress.value)) - self.lib.lib3mf_reader_readfrombuffer.restype = ctypes.c_int32 - self.lib.lib3mf_reader_readfrombuffer.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getobjectresource")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_builditem_getobjectresource = methodType(int(methodAddress.value)) - self.lib.lib3mf_reader_readfromcallback.restype = ctypes.c_int32 - self.lib.lib3mf_reader_readfromcallback.argtypes = [ctypes.c_void_p, ReadCallback, ctypes.c_uint64, SeekCallback, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getuuid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_builditem_getuuid = methodType(int(methodAddress.value)) - self.lib.lib3mf_reader_setprogresscallback.restype = ctypes.c_int32 - self.lib.lib3mf_reader_setprogresscallback.argtypes = [ctypes.c_void_p, ProgressCallback, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_setuuid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_builditem_setuuid = methodType(int(methodAddress.value)) - self.lib.lib3mf_reader_addrelationtoread.restype = ctypes.c_int32 - self.lib.lib3mf_reader_addrelationtoread.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getobjectresourceid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)) + self.lib.lib3mf_builditem_getobjectresourceid = methodType(int(methodAddress.value)) - self.lib.lib3mf_reader_removerelationtoread.restype = ctypes.c_int32 - self.lib.lib3mf_reader_removerelationtoread.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_hasobjecttransform")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) + self.lib.lib3mf_builditem_hasobjecttransform = methodType(int(methodAddress.value)) - self.lib.lib3mf_reader_setstrictmodeactive.restype = ctypes.c_int32 - self.lib.lib3mf_reader_setstrictmodeactive.argtypes = [ctypes.c_void_p, ctypes.c_bool] - - self.lib.lib3mf_reader_getstrictmodeactive.restype = ctypes.c_int32 - self.lib.lib3mf_reader_getstrictmodeactive.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - - self.lib.lib3mf_reader_getwarning.restype = ctypes.c_int32 - self.lib.lib3mf_reader_getwarning.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_uint32), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getobjecttransform")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Transform)) + self.lib.lib3mf_builditem_getobjecttransform = methodType(int(methodAddress.value)) - self.lib.lib3mf_reader_getwarningcount.restype = ctypes.c_int32 - self.lib.lib3mf_reader_getwarningcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_setobjecttransform")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Transform)) + self.lib.lib3mf_builditem_setobjecttransform = methodType(int(methodAddress.value)) - self.lib.lib3mf_reader_addkeywrappingcallback.restype = ctypes.c_int32 - self.lib.lib3mf_reader_addkeywrappingcallback.argtypes = [ctypes.c_void_p, ctypes.c_char_p, KeyWrappingCallback, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getpartnumber")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_builditem_getpartnumber = methodType(int(methodAddress.value)) - self.lib.lib3mf_reader_setcontentencryptioncallback.restype = ctypes.c_int32 - self.lib.lib3mf_reader_setcontentencryptioncallback.argtypes = [ctypes.c_void_p, ContentEncryptionCallback, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_setpartnumber")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_builditem_setpartnumber = methodType(int(methodAddress.value)) - self.lib.lib3mf_packagepart_getpath.restype = ctypes.c_int32 - self.lib.lib3mf_packagepart_getpath.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getmetadatagroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_builditem_getmetadatagroup = methodType(int(methodAddress.value)) - self.lib.lib3mf_packagepart_setpath.restype = ctypes.c_int32 - self.lib.lib3mf_packagepart_setpath.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditem_getoutbox")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Box)) + self.lib.lib3mf_builditem_getoutbox = methodType(int(methodAddress.value)) - self.lib.lib3mf_resource_getresourceid.restype = ctypes.c_int32 - self.lib.lib3mf_resource_getresourceid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditemiterator_movenext")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) + self.lib.lib3mf_builditemiterator_movenext = methodType(int(methodAddress.value)) - self.lib.lib3mf_resource_getuniqueresourceid.restype = ctypes.c_int32 - self.lib.lib3mf_resource_getuniqueresourceid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditemiterator_moveprevious")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) + self.lib.lib3mf_builditemiterator_moveprevious = methodType(int(methodAddress.value)) - self.lib.lib3mf_resource_packagepart.restype = ctypes.c_int32 - self.lib.lib3mf_resource_packagepart.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditemiterator_getcurrent")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_builditemiterator_getcurrent = methodType(int(methodAddress.value)) - self.lib.lib3mf_resource_setpackagepart.restype = ctypes.c_int32 - self.lib.lib3mf_resource_setpackagepart.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditemiterator_clone")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_builditemiterator_clone = methodType(int(methodAddress.value)) - self.lib.lib3mf_resource_getmodelresourceid.restype = ctypes.c_int32 - self.lib.lib3mf_resource_getmodelresourceid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_builditemiterator_count")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_builditemiterator_count = methodType(int(methodAddress.value)) - self.lib.lib3mf_resourceiterator_movenext.restype = ctypes.c_int32 - self.lib.lib3mf_resourceiterator_movenext.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_setvertices")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(Position2D)) + self.lib.lib3mf_slice_setvertices = methodType(int(methodAddress.value)) - self.lib.lib3mf_resourceiterator_moveprevious.restype = ctypes.c_int32 - self.lib.lib3mf_resourceiterator_moveprevious.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getvertices")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Position2D)) + self.lib.lib3mf_slice_getvertices = methodType(int(methodAddress.value)) - self.lib.lib3mf_resourceiterator_getcurrent.restype = ctypes.c_int32 - self.lib.lib3mf_resourceiterator_getcurrent.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getvertexcount")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_slice_getvertexcount = methodType(int(methodAddress.value)) - self.lib.lib3mf_resourceiterator_clone.restype = ctypes.c_int32 - self.lib.lib3mf_resourceiterator_clone.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_addpolygon")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_slice_addpolygon = methodType(int(methodAddress.value)) - self.lib.lib3mf_resourceiterator_count.restype = ctypes.c_int32 - self.lib.lib3mf_resourceiterator_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getpolygoncount")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_slice_getpolygoncount = methodType(int(methodAddress.value)) - self.lib.lib3mf_slicestackiterator_getcurrentslicestack.restype = ctypes.c_int32 - self.lib.lib3mf_slicestackiterator_getcurrentslicestack.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_setpolygonindices")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32)) + self.lib.lib3mf_slice_setpolygonindices = methodType(int(methodAddress.value)) - self.lib.lib3mf_objectiterator_getcurrentobject.restype = ctypes.c_int32 - self.lib.lib3mf_objectiterator_getcurrentobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getpolygonindices")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)) + self.lib.lib3mf_slice_getpolygonindices = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobjectiterator_getcurrentmeshobject.restype = ctypes.c_int32 - self.lib.lib3mf_meshobjectiterator_getcurrentmeshobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getpolygonindexcount")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_slice_getpolygonindexcount = methodType(int(methodAddress.value)) - self.lib.lib3mf_componentsobjectiterator_getcurrentcomponentsobject.restype = ctypes.c_int32 - self.lib.lib3mf_componentsobjectiterator_getcurrentcomponentsobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slice_getztop")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) + self.lib.lib3mf_slice_getztop = methodType(int(methodAddress.value)) - self.lib.lib3mf_texture2diterator_getcurrenttexture2d.restype = ctypes.c_int32 - self.lib.lib3mf_texture2diterator_getcurrenttexture2d.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getbottomz")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)) + self.lib.lib3mf_slicestack_getbottomz = methodType(int(methodAddress.value)) - self.lib.lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup.restype = ctypes.c_int32 - self.lib.lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getslicecount")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_slicestack_getslicecount = methodType(int(methodAddress.value)) - self.lib.lib3mf_colorgroupiterator_getcurrentcolorgroup.restype = ctypes.c_int32 - self.lib.lib3mf_colorgroupiterator_getcurrentcolorgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getslice")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_slicestack_getslice = methodType(int(methodAddress.value)) - self.lib.lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup.restype = ctypes.c_int32 - self.lib.lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_addslice")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_slicestack_addslice = methodType(int(methodAddress.value)) - self.lib.lib3mf_compositematerialsiterator_getcurrentcompositematerials.restype = ctypes.c_int32 - self.lib.lib3mf_compositematerialsiterator_getcurrentcompositematerials.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getslicerefcount")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_slicestack_getslicerefcount = methodType(int(methodAddress.value)) - self.lib.lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup.restype = ctypes.c_int32 - self.lib.lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_addslicestackreference")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_slicestack_addslicestackreference = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadata_getnamespace.restype = ctypes.c_int32 - self.lib.lib3mf_metadata_getnamespace.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getslicestackreference")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_slicestack_getslicestackreference = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadata_setnamespace.restype = ctypes.c_int32 - self.lib.lib3mf_metadata_setnamespace.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_collapseslicereferences")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p) + self.lib.lib3mf_slicestack_collapseslicereferences = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadata_getname.restype = ctypes.c_int32 - self.lib.lib3mf_metadata_getname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_setownpath")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_slicestack_setownpath = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadata_setname.restype = ctypes.c_int32 - self.lib.lib3mf_metadata_setname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_slicestack_getownpath")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_slicestack_getownpath = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadata_getkey.restype = ctypes.c_int32 - self.lib.lib3mf_metadata_getkey.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_consumer_getconsumerid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_consumer_getconsumerid = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadata_getmustpreserve.restype = ctypes.c_int32 - self.lib.lib3mf_metadata_getmustpreserve.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_consumer_getkeyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_consumer_getkeyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadata_setmustpreserve.restype = ctypes.c_int32 - self.lib.lib3mf_metadata_setmustpreserve.argtypes = [ctypes.c_void_p, ctypes.c_bool] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_consumer_getkeyvalue")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_consumer_getkeyvalue = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadata_gettype.restype = ctypes.c_int32 - self.lib.lib3mf_metadata_gettype.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_accessright_getconsumer")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_accessright_getconsumer = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadata_settype.restype = ctypes.c_int32 - self.lib.lib3mf_metadata_settype.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_accessright_getwrappingalgorithm")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_accessright_getwrappingalgorithm = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadata_getvalue.restype = ctypes.c_int32 - self.lib.lib3mf_metadata_getvalue.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_accessright_getmgfalgorithm")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_accessright_getmgfalgorithm = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadata_setvalue.restype = ctypes.c_int32 - self.lib.lib3mf_metadata_setvalue.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - - self.lib.lib3mf_metadatagroup_getmetadatacount.restype = ctypes.c_int32 - self.lib.lib3mf_metadatagroup_getmetadatacount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_accessright_getdigestmethod")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_accessright_getdigestmethod = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadatagroup_getmetadata.restype = ctypes.c_int32 - self.lib.lib3mf_metadatagroup_getmetadata.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getencryptionalgorithm")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_contentencryptionparams_getencryptionalgorithm = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadatagroup_getmetadatabykey.restype = ctypes.c_int32 - self.lib.lib3mf_metadatagroup_getmetadatabykey.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getkey")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) + self.lib.lib3mf_contentencryptionparams_getkey = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadatagroup_removemetadatabyindex.restype = ctypes.c_int32 - self.lib.lib3mf_metadatagroup_removemetadatabyindex.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getinitializationvector")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) + self.lib.lib3mf_contentencryptionparams_getinitializationvector = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadatagroup_removemetadata.restype = ctypes.c_int32 - self.lib.lib3mf_metadatagroup_removemetadata.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getauthenticationtag")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) + self.lib.lib3mf_contentencryptionparams_getauthenticationtag = methodType(int(methodAddress.value)) - self.lib.lib3mf_metadatagroup_addmetadata.restype = ctypes.c_int32 - self.lib.lib3mf_metadatagroup_addmetadata.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_setauthenticationtag")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8)) + self.lib.lib3mf_contentencryptionparams_setauthenticationtag = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_gettype.restype = ctypes.c_int32 - self.lib.lib3mf_object_gettype.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getadditionalauthenticationdata")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) + self.lib.lib3mf_contentencryptionparams_getadditionalauthenticationdata = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_settype.restype = ctypes.c_int32 - self.lib.lib3mf_object_settype.argtypes = [ctypes.c_void_p, ObjectType] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getdescriptor")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_contentencryptionparams_getdescriptor = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_getname.restype = ctypes.c_int32 - self.lib.lib3mf_object_getname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_contentencryptionparams_getkeyuuid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_contentencryptionparams_getkeyuuid = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_setname.restype = ctypes.c_int32 - self.lib.lib3mf_object_setname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedata_getpath")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_resourcedata_getpath = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_getpartnumber.restype = ctypes.c_int32 - self.lib.lib3mf_object_getpartnumber.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedata_getencryptionalgorithm")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_resourcedata_getencryptionalgorithm = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_setpartnumber.restype = ctypes.c_int32 - self.lib.lib3mf_object_setpartnumber.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedata_getcompression")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_resourcedata_getcompression = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_ismeshobject.restype = ctypes.c_int32 - self.lib.lib3mf_object_ismeshobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedata_getadditionalauthenticationdata")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)) + self.lib.lib3mf_resourcedata_getadditionalauthenticationdata = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_iscomponentsobject.restype = ctypes.c_int32 - self.lib.lib3mf_object_iscomponentsobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedatagroup_getkeyuuid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_resourcedatagroup_getkeyuuid = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_isvalid.restype = ctypes.c_int32 - self.lib.lib3mf_object_isvalid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedatagroup_addaccessright")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, WrappingAlgorithm, MgfAlgorithm, DigestMethod, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_resourcedatagroup_addaccessright = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_setattachmentasthumbnail.restype = ctypes.c_int32 - self.lib.lib3mf_object_setattachmentasthumbnail.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedatagroup_findaccessrightbyconsumer")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_resourcedatagroup_findaccessrightbyconsumer = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_getthumbnailattachment.restype = ctypes.c_int32 - self.lib.lib3mf_object_getthumbnailattachment.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_resourcedatagroup_removeaccessright")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_resourcedatagroup_removeaccessright = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_clearthumbnailattachment.restype = ctypes.c_int32 - self.lib.lib3mf_object_clearthumbnailattachment.argtypes = [ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_addconsumer")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_keystore_addconsumer = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_getoutbox.restype = ctypes.c_int32 - self.lib.lib3mf_object_getoutbox.argtypes = [ctypes.c_void_p, ctypes.POINTER(Box)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getconsumercount")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_keystore_getconsumercount = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_getuuid.restype = ctypes.c_int32 - self.lib.lib3mf_object_getuuid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getconsumer")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_keystore_getconsumer = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_setuuid.restype = ctypes.c_int32 - self.lib.lib3mf_object_setuuid.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_removeconsumer")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_keystore_removeconsumer = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_getmetadatagroup.restype = ctypes.c_int32 - self.lib.lib3mf_object_getmetadatagroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_findconsumer")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_keystore_findconsumer = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_setslicesmeshresolution.restype = ctypes.c_int32 - self.lib.lib3mf_object_setslicesmeshresolution.argtypes = [ctypes.c_void_p, SlicesMeshResolution] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getresourcedatagroupcount")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_keystore_getresourcedatagroupcount = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_getslicesmeshresolution.restype = ctypes.c_int32 - self.lib.lib3mf_object_getslicesmeshresolution.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_addresourcedatagroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_keystore_addresourcedatagroup = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_hasslices.restype = ctypes.c_int32 - self.lib.lib3mf_object_hasslices.argtypes = [ctypes.c_void_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getresourcedatagroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_keystore_getresourcedatagroup = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_clearslicestack.restype = ctypes.c_int32 - self.lib.lib3mf_object_clearslicestack.argtypes = [ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_removeresourcedatagroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_keystore_removeresourcedatagroup = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_getslicestack.restype = ctypes.c_int32 - self.lib.lib3mf_object_getslicestack.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_findresourcedatagroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_keystore_findresourcedatagroup = methodType(int(methodAddress.value)) - self.lib.lib3mf_object_assignslicestack.restype = ctypes.c_int32 - self.lib.lib3mf_object_assignslicestack.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_addresourcedata")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, EncryptionAlgorithm, Compression, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_keystore_addresourcedata = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_getvertexcount.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_getvertexcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_removeresourcedata")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_keystore_removeresourcedata = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_gettrianglecount.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_gettrianglecount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_findresourcedata")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_keystore_findresourcedata = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_getvertex.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_getvertex.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Position)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getresourcedatacount")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)) + self.lib.lib3mf_keystore_getresourcedatacount = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_setvertex.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_setvertex.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Position)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getresourcedata")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_keystore_getresourcedata = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_addvertex.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_addvertex.argtypes = [ctypes.c_void_p, ctypes.POINTER(Position), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_getuuid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_keystore_getuuid = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_getvertices.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_getvertices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Position)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_keystore_setuuid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_keystore_setuuid = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_gettriangle.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_gettriangle.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Triangle)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_rootmodelpart")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_rootmodelpart = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_settriangle.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_settriangle.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Triangle)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_findorcreatepackagepart")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_findorcreatepackagepart = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_addtriangle.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_addtriangle.argtypes = [ctypes.c_void_p, ctypes.POINTER(Triangle), ctypes.POINTER(ctypes.c_uint32)] - - self.lib.lib3mf_meshobject_gettriangleindices.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_gettriangleindices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Triangle)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_setunit")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ModelUnit) + self.lib.lib3mf_model_setunit = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_setobjectlevelproperty.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_setobjectlevelproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint32] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getunit")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_model_getunit = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_getobjectlevelproperty.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_getobjectlevelproperty.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getlanguage")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_model_getlanguage = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_settriangleproperties.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_settriangleproperties.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(TriangleProperties)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_setlanguage")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_model_setlanguage = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_gettriangleproperties.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_gettriangleproperties.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(TriangleProperties)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_querywriter")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_querywriter = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_setalltriangleproperties.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_setalltriangleproperties.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(TriangleProperties)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_queryreader")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_queryreader = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_getalltriangleproperties.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_getalltriangleproperties.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(TriangleProperties)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getresourcebyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getresourcebyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_clearallproperties.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_clearallproperties.argtypes = [ctypes.c_void_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_gettexture2dbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_gettexture2dbyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_setgeometry.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_setgeometry.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(Position), ctypes.c_uint64, ctypes.POINTER(Triangle)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getpropertytypebyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_int32)) + self.lib.lib3mf_model_getpropertytypebyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_ismanifoldandoriented.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_ismanifoldandoriented.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getbasematerialgroupbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getbasematerialgroupbyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_meshobject_beamlattice.restype = ctypes.c_int32 - self.lib.lib3mf_meshobject_beamlattice.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_gettexture2dgroupbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_gettexture2dgroupbyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getminlength.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getminlength.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcompositematerialsbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getcompositematerialsbyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_setminlength.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_setminlength.argtypes = [ctypes.c_void_p, ctypes.c_double] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getmultipropertygroupbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getmultipropertygroupbyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getclipping.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getclipping.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getmeshobjectbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getmeshobjectbyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_setclipping.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_setclipping.argtypes = [ctypes.c_void_p, BeamLatticeClipMode, ctypes.c_uint32] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcomponentsobjectbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getcomponentsobjectbyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getrepresentation.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getrepresentation.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcolorgroupbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getcolorgroupbyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_setrepresentation.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_setrepresentation.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getslicestackbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getslicestackbyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getballoptions.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getballoptions.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_double)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getlevelsetbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getlevelsetbyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_setballoptions.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_setballoptions.argtypes = [ctypes.c_void_p, BeamLatticeBallMode, ctypes.c_double] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getbuilduuid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p) + self.lib.lib3mf_model_getbuilduuid = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getbeamcount.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getbeamcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_setbuilduuid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_model_setbuilduuid = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getbeam.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getbeam.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Beam)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getbuilditems")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getbuilditems = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_addbeam.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_addbeam.argtypes = [ctypes.c_void_p, ctypes.POINTER(Beam), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getoutbox")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(Box)) + self.lib.lib3mf_model_getoutbox = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_setbeam.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_setbeam.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Beam)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getresources")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getresources = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_setbeams.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_setbeams.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(Beam)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getobjects")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getobjects = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getbeams.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getbeams.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Beam)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getmeshobjects")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getmeshobjects = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getballcount.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getballcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcomponentsobjects")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getcomponentsobjects = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getball.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getball.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Ball)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_gettexture2ds")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_gettexture2ds = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_addball.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_addball.argtypes = [ctypes.c_void_p, ctypes.POINTER(Ball), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getbasematerialgroups")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getbasematerialgroups = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_setball.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_setball.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Ball)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcolorgroups")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getcolorgroups = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_setballs.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_setballs.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(Ball)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_gettexture2dgroups")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_gettexture2dgroups = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getballs.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getballs.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Ball)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getcompositematerials")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getcompositematerials = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getbeamsetcount.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getbeamsetcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getmultipropertygroups")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getmultipropertygroups = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_addbeamset.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_addbeamset.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getslicestacks")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getslicestacks = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamlattice_getbeamset.restype = ctypes.c_int32 - self.lib.lib3mf_beamlattice_getbeamset.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getimage3ds")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getimage3ds = methodType(int(methodAddress.value)) - self.lib.lib3mf_component_getobjectresource.restype = ctypes.c_int32 - self.lib.lib3mf_component_getobjectresource.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_mergetomodel")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_mergetomodel = methodType(int(methodAddress.value)) - self.lib.lib3mf_component_getobjectresourceid.restype = ctypes.c_int32 - self.lib.lib3mf_component_getobjectresourceid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_mergefrommodel")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_model_mergefrommodel = methodType(int(methodAddress.value)) - self.lib.lib3mf_component_getuuid.restype = ctypes.c_int32 - self.lib.lib3mf_component_getuuid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addmeshobject")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addmeshobject = methodType(int(methodAddress.value)) - self.lib.lib3mf_component_setuuid.restype = ctypes.c_int32 - self.lib.lib3mf_component_setuuid.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addcomponentsobject")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addcomponentsobject = methodType(int(methodAddress.value)) - self.lib.lib3mf_component_hastransform.restype = ctypes.c_int32 - self.lib.lib3mf_component_hastransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addslicestack")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addslicestack = methodType(int(methodAddress.value)) - self.lib.lib3mf_component_gettransform.restype = ctypes.c_int32 - self.lib.lib3mf_component_gettransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addtexture2dfromattachment")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addtexture2dfromattachment = methodType(int(methodAddress.value)) - self.lib.lib3mf_component_settransform.restype = ctypes.c_int32 - self.lib.lib3mf_component_settransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addbasematerialgroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addbasematerialgroup = methodType(int(methodAddress.value)) - self.lib.lib3mf_componentsobject_addcomponent.restype = ctypes.c_int32 - self.lib.lib3mf_componentsobject_addcomponent.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(Transform), ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addcolorgroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addcolorgroup = methodType(int(methodAddress.value)) - self.lib.lib3mf_componentsobject_getcomponent.restype = ctypes.c_int32 - self.lib.lib3mf_componentsobject_getcomponent.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addtexture2dgroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addtexture2dgroup = methodType(int(methodAddress.value)) - self.lib.lib3mf_componentsobject_getcomponentcount.restype = ctypes.c_int32 - self.lib.lib3mf_componentsobject_getcomponentcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addcompositematerials")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addcompositematerials = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamset_setname.restype = ctypes.c_int32 - self.lib.lib3mf_beamset_setname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addmultipropertygroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addmultipropertygroup = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamset_getname.restype = ctypes.c_int32 - self.lib.lib3mf_beamset_getname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addimagestack")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint32, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addimagestack = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamset_setidentifier.restype = ctypes.c_int32 - self.lib.lib3mf_beamset_setidentifier.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getimagestackbyid")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getimagestackbyid = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamset_getidentifier.restype = ctypes.c_int32 - self.lib.lib3mf_beamset_getidentifier.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addbuilditem")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(Transform), ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addbuilditem = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamset_getreferencecount.restype = ctypes.c_int32 - self.lib.lib3mf_beamset_getreferencecount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_removebuilditem")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_model_removebuilditem = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamset_setreferences.restype = ctypes.c_int32 - self.lib.lib3mf_beamset_setreferences.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getmetadatagroup")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getmetadatagroup = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamset_getreferences.restype = ctypes.c_int32 - self.lib.lib3mf_beamset_getreferences.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addattachment")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addattachment = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamset_getballreferencecount.restype = ctypes.c_int32 - self.lib.lib3mf_beamset_getballreferencecount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_removeattachment")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_model_removeattachment = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamset_setballreferences.restype = ctypes.c_int32 - self.lib.lib3mf_beamset_setballreferences.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getattachment")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getattachment = methodType(int(methodAddress.value)) - self.lib.lib3mf_beamset_getballreferences.restype = ctypes.c_int32 - self.lib.lib3mf_beamset_getballreferences.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_findattachment")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_findattachment = methodType(int(methodAddress.value)) - self.lib.lib3mf_basematerialgroup_getcount.restype = ctypes.c_int32 - self.lib.lib3mf_basematerialgroup_getcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getattachmentcount")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)) + self.lib.lib3mf_model_getattachmentcount = methodType(int(methodAddress.value)) - self.lib.lib3mf_basematerialgroup_getallpropertyids.restype = ctypes.c_int32 - self.lib.lib3mf_basematerialgroup_getallpropertyids.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_haspackagethumbnailattachment")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)) + self.lib.lib3mf_model_haspackagethumbnailattachment = methodType(int(methodAddress.value)) - self.lib.lib3mf_basematerialgroup_addmaterial.restype = ctypes.c_int32 - self.lib.lib3mf_basematerialgroup_addmaterial.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(Color), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_createpackagethumbnailattachment")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_createpackagethumbnailattachment = methodType(int(methodAddress.value)) - self.lib.lib3mf_basematerialgroup_removematerial.restype = ctypes.c_int32 - self.lib.lib3mf_basematerialgroup_removematerial.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getpackagethumbnailattachment")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getpackagethumbnailattachment = methodType(int(methodAddress.value)) - self.lib.lib3mf_basematerialgroup_getname.restype = ctypes.c_int32 - self.lib.lib3mf_basematerialgroup_getname.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_removepackagethumbnailattachment")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p) + self.lib.lib3mf_model_removepackagethumbnailattachment = methodType(int(methodAddress.value)) - self.lib.lib3mf_basematerialgroup_setname.restype = ctypes.c_int32 - self.lib.lib3mf_basematerialgroup_setname.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_char_p] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addcustomcontenttype")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p) + self.lib.lib3mf_model_addcustomcontenttype = methodType(int(methodAddress.value)) - self.lib.lib3mf_basematerialgroup_setdisplaycolor.restype = ctypes.c_int32 - self.lib.lib3mf_basematerialgroup_setdisplaycolor.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Color)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_removecustomcontenttype")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_char_p) + self.lib.lib3mf_model_removecustomcontenttype = methodType(int(methodAddress.value)) - self.lib.lib3mf_basematerialgroup_getdisplaycolor.restype = ctypes.c_int32 - self.lib.lib3mf_basematerialgroup_getdisplaycolor.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Color)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_setrandomnumbercallback")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, RandomNumberCallback, ctypes.c_void_p) + self.lib.lib3mf_model_setrandomnumbercallback = methodType(int(methodAddress.value)) - self.lib.lib3mf_colorgroup_getcount.restype = ctypes.c_int32 - self.lib.lib3mf_colorgroup_getcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getkeystore")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getkeystore = methodType(int(methodAddress.value)) - self.lib.lib3mf_colorgroup_getallpropertyids.restype = ctypes.c_int32 - self.lib.lib3mf_colorgroup_getallpropertyids.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getfunctions")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getfunctions = methodType(int(methodAddress.value)) - self.lib.lib3mf_colorgroup_addcolor.restype = ctypes.c_int32 - self.lib.lib3mf_colorgroup_addcolor.argtypes = [ctypes.c_void_p, ctypes.POINTER(Color), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addimplicitfunction")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addimplicitfunction = methodType(int(methodAddress.value)) - self.lib.lib3mf_colorgroup_removecolor.restype = ctypes.c_int32 - self.lib.lib3mf_colorgroup_removecolor.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addfunctionfromimage3d")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addfunctionfromimage3d = methodType(int(methodAddress.value)) - self.lib.lib3mf_colorgroup_setcolor.restype = ctypes.c_int32 - self.lib.lib3mf_colorgroup_setcolor.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Color)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addvolumedata")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addvolumedata = methodType(int(methodAddress.value)) - self.lib.lib3mf_colorgroup_getcolor.restype = ctypes.c_int32 - self.lib.lib3mf_colorgroup_getcolor.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Color)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_addlevelset")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_addlevelset = methodType(int(methodAddress.value)) - self.lib.lib3mf_texture2dgroup_getcount.restype = ctypes.c_int32 - self.lib.lib3mf_texture2dgroup_getcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_getlevelsets")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)) + self.lib.lib3mf_model_getlevelsets = methodType(int(methodAddress.value)) - self.lib.lib3mf_texture2dgroup_getallpropertyids.restype = ctypes.c_int32 - self.lib.lib3mf_texture2dgroup_getallpropertyids.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + err = symbolLookupMethod(ctypes.c_char_p(str.encode("lib3mf_model_removeresource")), methodAddress) + if err != 0: + raise ELib3MFException(ErrorCodes.COULDNOTLOADLIBRARY, str(err)) + methodType = ctypes.CFUNCTYPE(ctypes.c_int32, ctypes.c_void_p, ctypes.c_void_p) + self.lib.lib3mf_model_removeresource = methodType(int(methodAddress.value)) - self.lib.lib3mf_texture2dgroup_addtex2coord.restype = ctypes.c_int32 - self.lib.lib3mf_texture2dgroup_addtex2coord.argtypes = [ctypes.c_void_p, ctypes.POINTER(Tex2Coord), ctypes.POINTER(ctypes.c_uint32)] + except AttributeError as ae: + raise ELib3MFException(ErrorCodes.COULDNOTFINDLIBRARYEXPORT, ae.args[0]) + + def _loadFunctionTable(self): + try: + self.lib.lib3mf_getlibraryversion.restype = ctypes.c_int32 + self.lib.lib3mf_getlibraryversion.argtypes = [ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_texture2dgroup_gettex2coord.restype = ctypes.c_int32 - self.lib.lib3mf_texture2dgroup_gettex2coord.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Tex2Coord)] + self.lib.lib3mf_getprereleaseinformation.restype = ctypes.c_int32 + self.lib.lib3mf_getprereleaseinformation.argtypes = [ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_texture2dgroup_removetex2coord.restype = ctypes.c_int32 - self.lib.lib3mf_texture2dgroup_removetex2coord.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + self.lib.lib3mf_getbuildinformation.restype = ctypes.c_int32 + self.lib.lib3mf_getbuildinformation.argtypes = [ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_texture2dgroup_gettexture2d.restype = ctypes.c_int32 - self.lib.lib3mf_texture2dgroup_gettexture2d.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_getspecificationversion.restype = ctypes.c_int32 + self.lib.lib3mf_getspecificationversion.argtypes = [ctypes.c_char_p, ctypes.POINTER(ctypes.c_bool), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_compositematerials_getcount.restype = ctypes.c_int32 - self.lib.lib3mf_compositematerials_getcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_createmodel.restype = ctypes.c_int32 + self.lib.lib3mf_createmodel.argtypes = [ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_compositematerials_getallpropertyids.restype = ctypes.c_int32 - self.lib.lib3mf_compositematerials_getallpropertyids.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_release.restype = ctypes.c_int32 + self.lib.lib3mf_release.argtypes = [ctypes.c_void_p] - self.lib.lib3mf_compositematerials_getbasematerialgroup.restype = ctypes.c_int32 - self.lib.lib3mf_compositematerials_getbasematerialgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_acquire.restype = ctypes.c_int32 + self.lib.lib3mf_acquire.argtypes = [ctypes.c_void_p] - self.lib.lib3mf_compositematerials_addcomposite.restype = ctypes.c_int32 - self.lib.lib3mf_compositematerials_addcomposite.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(CompositeConstituent), ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_setjournal.restype = ctypes.c_int32 + self.lib.lib3mf_setjournal.argtypes = [ctypes.c_char_p] - self.lib.lib3mf_compositematerials_removecomposite.restype = ctypes.c_int32 - self.lib.lib3mf_compositematerials_removecomposite.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + self.lib.lib3mf_getlasterror.restype = ctypes.c_int32 + self.lib.lib3mf_getlasterror.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_compositematerials_getcomposite.restype = ctypes.c_int32 - self.lib.lib3mf_compositematerials_getcomposite.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(CompositeConstituent)] + self.lib.lib3mf_getsymbollookupmethod.restype = ctypes.c_int32 + self.lib.lib3mf_getsymbollookupmethod.argtypes = [ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_multipropertygroup_getcount.restype = ctypes.c_int32 - self.lib.lib3mf_multipropertygroup_getcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_retrieveprogressmessage.restype = ctypes.c_int32 + self.lib.lib3mf_retrieveprogressmessage.argtypes = [ProgressIdentifier, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_multipropertygroup_getallpropertyids.restype = ctypes.c_int32 - self.lib.lib3mf_multipropertygroup_getallpropertyids.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_rgbatocolor.restype = ctypes.c_int32 + self.lib.lib3mf_rgbatocolor.argtypes = [ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.c_uint8, ctypes.POINTER(Color)] - self.lib.lib3mf_multipropertygroup_addmultiproperty.restype = ctypes.c_int32 - self.lib.lib3mf_multipropertygroup_addmultiproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_floatrgbatocolor.restype = ctypes.c_int32 + self.lib.lib3mf_floatrgbatocolor.argtypes = [ctypes.c_float, ctypes.c_float, ctypes.c_float, ctypes.c_float, ctypes.POINTER(Color)] - self.lib.lib3mf_multipropertygroup_setmultiproperty.restype = ctypes.c_int32 - self.lib.lib3mf_multipropertygroup_setmultiproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_colortorgba.restype = ctypes.c_int32 + self.lib.lib3mf_colortorgba.argtypes = [ctypes.POINTER(Color), ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_uint8)] - self.lib.lib3mf_multipropertygroup_getmultiproperty.restype = ctypes.c_int32 - self.lib.lib3mf_multipropertygroup_getmultiproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_colortofloatrgba.restype = ctypes.c_int32 + self.lib.lib3mf_colortofloatrgba.argtypes = [ctypes.POINTER(Color), ctypes.POINTER(ctypes.c_float), ctypes.POINTER(ctypes.c_float), ctypes.POINTER(ctypes.c_float), ctypes.POINTER(ctypes.c_float)] - self.lib.lib3mf_multipropertygroup_removemultiproperty.restype = ctypes.c_int32 - self.lib.lib3mf_multipropertygroup_removemultiproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + self.lib.lib3mf_getidentitytransform.restype = ctypes.c_int32 + self.lib.lib3mf_getidentitytransform.argtypes = [ctypes.POINTER(Transform)] - self.lib.lib3mf_multipropertygroup_getlayercount.restype = ctypes.c_int32 - self.lib.lib3mf_multipropertygroup_getlayercount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_getuniformscaletransform.restype = ctypes.c_int32 + self.lib.lib3mf_getuniformscaletransform.argtypes = [ctypes.c_float, ctypes.POINTER(Transform)] - self.lib.lib3mf_multipropertygroup_addlayer.restype = ctypes.c_int32 - self.lib.lib3mf_multipropertygroup_addlayer.argtypes = [ctypes.c_void_p, ctypes.POINTER(MultiPropertyLayer), ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_getscaletransform.restype = ctypes.c_int32 + self.lib.lib3mf_getscaletransform.argtypes = [ctypes.c_float, ctypes.c_float, ctypes.c_float, ctypes.POINTER(Transform)] - self.lib.lib3mf_multipropertygroup_getlayer.restype = ctypes.c_int32 - self.lib.lib3mf_multipropertygroup_getlayer.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(MultiPropertyLayer)] + self.lib.lib3mf_gettranslationtransform.restype = ctypes.c_int32 + self.lib.lib3mf_gettranslationtransform.argtypes = [ctypes.c_float, ctypes.c_float, ctypes.c_float, ctypes.POINTER(Transform)] - self.lib.lib3mf_multipropertygroup_removelayer.restype = ctypes.c_int32 - self.lib.lib3mf_multipropertygroup_removelayer.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + self.lib.lib3mf_base_classtypeid.restype = ctypes.c_int32 + self.lib.lib3mf_base_classtypeid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] - self.lib.lib3mf_attachment_getpath.restype = ctypes.c_int32 - self.lib.lib3mf_attachment_getpath.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_writer_writetofile.restype = ctypes.c_int32 + self.lib.lib3mf_writer_writetofile.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_attachment_setpath.restype = ctypes.c_int32 - self.lib.lib3mf_attachment_setpath.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + self.lib.lib3mf_writer_getstreamsize.restype = ctypes.c_int32 + self.lib.lib3mf_writer_getstreamsize.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] - self.lib.lib3mf_attachment_packagepart.restype = ctypes.c_int32 - self.lib.lib3mf_attachment_packagepart.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_writer_writetobuffer.restype = ctypes.c_int32 + self.lib.lib3mf_writer_writetobuffer.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] - self.lib.lib3mf_attachment_getrelationshiptype.restype = ctypes.c_int32 - self.lib.lib3mf_attachment_getrelationshiptype.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_writer_writetocallback.restype = ctypes.c_int32 + self.lib.lib3mf_writer_writetocallback.argtypes = [ctypes.c_void_p, WriteCallback, SeekCallback, ctypes.c_void_p] - self.lib.lib3mf_attachment_setrelationshiptype.restype = ctypes.c_int32 - self.lib.lib3mf_attachment_setrelationshiptype.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + self.lib.lib3mf_writer_setprogresscallback.restype = ctypes.c_int32 + self.lib.lib3mf_writer_setprogresscallback.argtypes = [ctypes.c_void_p, ProgressCallback, ctypes.c_void_p] - self.lib.lib3mf_attachment_writetofile.restype = ctypes.c_int32 - self.lib.lib3mf_attachment_writetofile.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + self.lib.lib3mf_writer_getdecimalprecision.restype = ctypes.c_int32 + self.lib.lib3mf_writer_getdecimalprecision.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_attachment_readfromfile.restype = ctypes.c_int32 - self.lib.lib3mf_attachment_readfromfile.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + self.lib.lib3mf_writer_setdecimalprecision.restype = ctypes.c_int32 + self.lib.lib3mf_writer_setdecimalprecision.argtypes = [ctypes.c_void_p, ctypes.c_uint32] - self.lib.lib3mf_attachment_readfromcallback.restype = ctypes.c_int32 - self.lib.lib3mf_attachment_readfromcallback.argtypes = [ctypes.c_void_p, ReadCallback, ctypes.c_uint64, SeekCallback, ctypes.c_void_p] + self.lib.lib3mf_writer_setstrictmodeactive.restype = ctypes.c_int32 + self.lib.lib3mf_writer_setstrictmodeactive.argtypes = [ctypes.c_void_p, ctypes.c_bool] - self.lib.lib3mf_attachment_getstreamsize.restype = ctypes.c_int32 - self.lib.lib3mf_attachment_getstreamsize.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_writer_getstrictmodeactive.restype = ctypes.c_int32 + self.lib.lib3mf_writer_getstrictmodeactive.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_attachment_writetobuffer.restype = ctypes.c_int32 - self.lib.lib3mf_attachment_writetobuffer.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + self.lib.lib3mf_writer_getwarning.restype = ctypes.c_int32 + self.lib.lib3mf_writer_getwarning.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_uint32), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_attachment_readfrombuffer.restype = ctypes.c_int32 - self.lib.lib3mf_attachment_readfrombuffer.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8)] + self.lib.lib3mf_writer_getwarningcount.restype = ctypes.c_int32 + self.lib.lib3mf_writer_getwarningcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_texture2d_getattachment.restype = ctypes.c_int32 - self.lib.lib3mf_texture2d_getattachment.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_writer_addkeywrappingcallback.restype = ctypes.c_int32 + self.lib.lib3mf_writer_addkeywrappingcallback.argtypes = [ctypes.c_void_p, ctypes.c_char_p, KeyWrappingCallback, ctypes.c_void_p] - self.lib.lib3mf_texture2d_setattachment.restype = ctypes.c_int32 - self.lib.lib3mf_texture2d_setattachment.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + self.lib.lib3mf_writer_setcontentencryptioncallback.restype = ctypes.c_int32 + self.lib.lib3mf_writer_setcontentencryptioncallback.argtypes = [ctypes.c_void_p, ContentEncryptionCallback, ctypes.c_void_p] - self.lib.lib3mf_texture2d_getcontenttype.restype = ctypes.c_int32 - self.lib.lib3mf_texture2d_getcontenttype.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + self.lib.lib3mf_reader_readfromfile.restype = ctypes.c_int32 + self.lib.lib3mf_reader_readfromfile.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_texture2d_setcontenttype.restype = ctypes.c_int32 - self.lib.lib3mf_texture2d_setcontenttype.argtypes = [ctypes.c_void_p, TextureType] + self.lib.lib3mf_reader_readfrombuffer.restype = ctypes.c_int32 + self.lib.lib3mf_reader_readfrombuffer.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8)] - self.lib.lib3mf_texture2d_gettilestyleuv.restype = ctypes.c_int32 - self.lib.lib3mf_texture2d_gettilestyleuv.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32)] + self.lib.lib3mf_reader_readfromcallback.restype = ctypes.c_int32 + self.lib.lib3mf_reader_readfromcallback.argtypes = [ctypes.c_void_p, ReadCallback, ctypes.c_uint64, SeekCallback, ctypes.c_void_p] - self.lib.lib3mf_texture2d_settilestyleuv.restype = ctypes.c_int32 - self.lib.lib3mf_texture2d_settilestyleuv.argtypes = [ctypes.c_void_p, TextureTileStyle, TextureTileStyle] + self.lib.lib3mf_reader_setprogresscallback.restype = ctypes.c_int32 + self.lib.lib3mf_reader_setprogresscallback.argtypes = [ctypes.c_void_p, ProgressCallback, ctypes.c_void_p] - self.lib.lib3mf_texture2d_getfilter.restype = ctypes.c_int32 - self.lib.lib3mf_texture2d_getfilter.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + self.lib.lib3mf_reader_addrelationtoread.restype = ctypes.c_int32 + self.lib.lib3mf_reader_addrelationtoread.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_texture2d_setfilter.restype = ctypes.c_int32 - self.lib.lib3mf_texture2d_setfilter.argtypes = [ctypes.c_void_p, TextureFilter] + self.lib.lib3mf_reader_removerelationtoread.restype = ctypes.c_int32 + self.lib.lib3mf_reader_removerelationtoread.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_builditem_getobjectresource.restype = ctypes.c_int32 - self.lib.lib3mf_builditem_getobjectresource.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_reader_setstrictmodeactive.restype = ctypes.c_int32 + self.lib.lib3mf_reader_setstrictmodeactive.argtypes = [ctypes.c_void_p, ctypes.c_bool] - self.lib.lib3mf_builditem_getuuid.restype = ctypes.c_int32 - self.lib.lib3mf_builditem_getuuid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_reader_getstrictmodeactive.restype = ctypes.c_int32 + self.lib.lib3mf_reader_getstrictmodeactive.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_builditem_setuuid.restype = ctypes.c_int32 - self.lib.lib3mf_builditem_setuuid.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + self.lib.lib3mf_reader_getwarning.restype = ctypes.c_int32 + self.lib.lib3mf_reader_getwarning.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_uint32), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_builditem_getobjectresourceid.restype = ctypes.c_int32 - self.lib.lib3mf_builditem_getobjectresourceid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_reader_getwarningcount.restype = ctypes.c_int32 + self.lib.lib3mf_reader_getwarningcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_builditem_hasobjecttransform.restype = ctypes.c_int32 - self.lib.lib3mf_builditem_hasobjecttransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + self.lib.lib3mf_reader_addkeywrappingcallback.restype = ctypes.c_int32 + self.lib.lib3mf_reader_addkeywrappingcallback.argtypes = [ctypes.c_void_p, ctypes.c_char_p, KeyWrappingCallback, ctypes.c_void_p] - self.lib.lib3mf_builditem_getobjecttransform.restype = ctypes.c_int32 - self.lib.lib3mf_builditem_getobjecttransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] + self.lib.lib3mf_reader_setcontentencryptioncallback.restype = ctypes.c_int32 + self.lib.lib3mf_reader_setcontentencryptioncallback.argtypes = [ctypes.c_void_p, ContentEncryptionCallback, ctypes.c_void_p] - self.lib.lib3mf_builditem_setobjecttransform.restype = ctypes.c_int32 - self.lib.lib3mf_builditem_setobjecttransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] + self.lib.lib3mf_packagepart_getpath.restype = ctypes.c_int32 + self.lib.lib3mf_packagepart_getpath.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_builditem_getpartnumber.restype = ctypes.c_int32 - self.lib.lib3mf_builditem_getpartnumber.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_packagepart_setpath.restype = ctypes.c_int32 + self.lib.lib3mf_packagepart_setpath.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_builditem_setpartnumber.restype = ctypes.c_int32 - self.lib.lib3mf_builditem_setpartnumber.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + self.lib.lib3mf_resource_getresourceid.restype = ctypes.c_int32 + self.lib.lib3mf_resource_getresourceid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_builditem_getmetadatagroup.restype = ctypes.c_int32 - self.lib.lib3mf_builditem_getmetadatagroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_resource_getuniqueresourceid.restype = ctypes.c_int32 + self.lib.lib3mf_resource_getuniqueresourceid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_builditem_getoutbox.restype = ctypes.c_int32 - self.lib.lib3mf_builditem_getoutbox.argtypes = [ctypes.c_void_p, ctypes.POINTER(Box)] + self.lib.lib3mf_resource_packagepart.restype = ctypes.c_int32 + self.lib.lib3mf_resource_packagepart.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_builditemiterator_movenext.restype = ctypes.c_int32 - self.lib.lib3mf_builditemiterator_movenext.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + self.lib.lib3mf_resource_setpackagepart.restype = ctypes.c_int32 + self.lib.lib3mf_resource_setpackagepart.argtypes = [ctypes.c_void_p, ctypes.c_void_p] - self.lib.lib3mf_builditemiterator_moveprevious.restype = ctypes.c_int32 - self.lib.lib3mf_builditemiterator_moveprevious.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + self.lib.lib3mf_resource_getmodelresourceid.restype = ctypes.c_int32 + self.lib.lib3mf_resource_getmodelresourceid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_builditemiterator_getcurrent.restype = ctypes.c_int32 - self.lib.lib3mf_builditemiterator_getcurrent.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_resourceiterator_movenext.restype = ctypes.c_int32 + self.lib.lib3mf_resourceiterator_movenext.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_builditemiterator_clone.restype = ctypes.c_int32 - self.lib.lib3mf_builditemiterator_clone.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_resourceiterator_moveprevious.restype = ctypes.c_int32 + self.lib.lib3mf_resourceiterator_moveprevious.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_builditemiterator_count.restype = ctypes.c_int32 - self.lib.lib3mf_builditemiterator_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_resourceiterator_getcurrent.restype = ctypes.c_int32 + self.lib.lib3mf_resourceiterator_getcurrent.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slice_setvertices.restype = ctypes.c_int32 - self.lib.lib3mf_slice_setvertices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(Position2D)] + self.lib.lib3mf_resourceiterator_clone.restype = ctypes.c_int32 + self.lib.lib3mf_resourceiterator_clone.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slice_getvertices.restype = ctypes.c_int32 - self.lib.lib3mf_slice_getvertices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Position2D)] + self.lib.lib3mf_resourceiterator_count.restype = ctypes.c_int32 + self.lib.lib3mf_resourceiterator_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] - self.lib.lib3mf_slice_getvertexcount.restype = ctypes.c_int32 - self.lib.lib3mf_slice_getvertexcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_slicestackiterator_getcurrentslicestack.restype = ctypes.c_int32 + self.lib.lib3mf_slicestackiterator_getcurrentslicestack.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slice_addpolygon.restype = ctypes.c_int32 - self.lib.lib3mf_slice_addpolygon.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_objectiterator_getcurrentobject.restype = ctypes.c_int32 + self.lib.lib3mf_objectiterator_getcurrentobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slice_getpolygoncount.restype = ctypes.c_int32 - self.lib.lib3mf_slice_getpolygoncount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_meshobjectiterator_getcurrentmeshobject.restype = ctypes.c_int32 + self.lib.lib3mf_meshobjectiterator_getcurrentmeshobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slice_setpolygonindices.restype = ctypes.c_int32 - self.lib.lib3mf_slice_setpolygonindices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_componentsobjectiterator_getcurrentcomponentsobject.restype = ctypes.c_int32 + self.lib.lib3mf_componentsobjectiterator_getcurrentcomponentsobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slice_getpolygonindices.restype = ctypes.c_int32 - self.lib.lib3mf_slice_getpolygonindices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_texture2diterator_getcurrenttexture2d.restype = ctypes.c_int32 + self.lib.lib3mf_texture2diterator_getcurrenttexture2d.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slice_getpolygonindexcount.restype = ctypes.c_int32 - self.lib.lib3mf_slice_getpolygonindexcount.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup.restype = ctypes.c_int32 + self.lib.lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slice_getztop.restype = ctypes.c_int32 - self.lib.lib3mf_slice_getztop.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] + self.lib.lib3mf_colorgroupiterator_getcurrentcolorgroup.restype = ctypes.c_int32 + self.lib.lib3mf_colorgroupiterator_getcurrentcolorgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slicestack_getbottomz.restype = ctypes.c_int32 - self.lib.lib3mf_slicestack_getbottomz.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] + self.lib.lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup.restype = ctypes.c_int32 + self.lib.lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slicestack_getslicecount.restype = ctypes.c_int32 - self.lib.lib3mf_slicestack_getslicecount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_compositematerialsiterator_getcurrentcompositematerials.restype = ctypes.c_int32 + self.lib.lib3mf_compositematerialsiterator_getcurrentcompositematerials.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slicestack_getslice.restype = ctypes.c_int32 - self.lib.lib3mf_slicestack_getslice.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup.restype = ctypes.c_int32 + self.lib.lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slicestack_addslice.restype = ctypes.c_int32 - self.lib.lib3mf_slicestack_addslice.argtypes = [ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_image3diterator_getcurrentimage3d.restype = ctypes.c_int32 + self.lib.lib3mf_image3diterator_getcurrentimage3d.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slicestack_getslicerefcount.restype = ctypes.c_int32 - self.lib.lib3mf_slicestack_getslicerefcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_functioniterator_getcurrentfunction.restype = ctypes.c_int32 + self.lib.lib3mf_functioniterator_getcurrentfunction.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slicestack_addslicestackreference.restype = ctypes.c_int32 - self.lib.lib3mf_slicestack_addslicestackreference.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + self.lib.lib3mf_levelsetiterator_getcurrentlevelset.restype = ctypes.c_int32 + self.lib.lib3mf_levelsetiterator_getcurrentlevelset.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_slicestack_getslicestackreference.restype = ctypes.c_int32 - self.lib.lib3mf_slicestack_getslicestackreference.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_metadata_getnamespace.restype = ctypes.c_int32 + self.lib.lib3mf_metadata_getnamespace.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_slicestack_collapseslicereferences.restype = ctypes.c_int32 - self.lib.lib3mf_slicestack_collapseslicereferences.argtypes = [ctypes.c_void_p] + self.lib.lib3mf_metadata_setnamespace.restype = ctypes.c_int32 + self.lib.lib3mf_metadata_setnamespace.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_slicestack_setownpath.restype = ctypes.c_int32 - self.lib.lib3mf_slicestack_setownpath.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + self.lib.lib3mf_metadata_getname.restype = ctypes.c_int32 + self.lib.lib3mf_metadata_getname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_slicestack_getownpath.restype = ctypes.c_int32 - self.lib.lib3mf_slicestack_getownpath.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_metadata_setname.restype = ctypes.c_int32 + self.lib.lib3mf_metadata_setname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_consumer_getconsumerid.restype = ctypes.c_int32 - self.lib.lib3mf_consumer_getconsumerid.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_metadata_getkey.restype = ctypes.c_int32 + self.lib.lib3mf_metadata_getkey.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_consumer_getkeyid.restype = ctypes.c_int32 - self.lib.lib3mf_consumer_getkeyid.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_metadata_getmustpreserve.restype = ctypes.c_int32 + self.lib.lib3mf_metadata_getmustpreserve.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_consumer_getkeyvalue.restype = ctypes.c_int32 - self.lib.lib3mf_consumer_getkeyvalue.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_metadata_setmustpreserve.restype = ctypes.c_int32 + self.lib.lib3mf_metadata_setmustpreserve.argtypes = [ctypes.c_void_p, ctypes.c_bool] - self.lib.lib3mf_accessright_getconsumer.restype = ctypes.c_int32 - self.lib.lib3mf_accessright_getconsumer.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_metadata_gettype.restype = ctypes.c_int32 + self.lib.lib3mf_metadata_gettype.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_accessright_getwrappingalgorithm.restype = ctypes.c_int32 - self.lib.lib3mf_accessright_getwrappingalgorithm.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + self.lib.lib3mf_metadata_settype.restype = ctypes.c_int32 + self.lib.lib3mf_metadata_settype.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_accessright_getmgfalgorithm.restype = ctypes.c_int32 - self.lib.lib3mf_accessright_getmgfalgorithm.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + self.lib.lib3mf_metadata_getvalue.restype = ctypes.c_int32 + self.lib.lib3mf_metadata_getvalue.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_accessright_getdigestmethod.restype = ctypes.c_int32 - self.lib.lib3mf_accessright_getdigestmethod.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + self.lib.lib3mf_metadata_setvalue.restype = ctypes.c_int32 + self.lib.lib3mf_metadata_setvalue.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_contentencryptionparams_getencryptionalgorithm.restype = ctypes.c_int32 - self.lib.lib3mf_contentencryptionparams_getencryptionalgorithm.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + self.lib.lib3mf_metadatagroup_getmetadatacount.restype = ctypes.c_int32 + self.lib.lib3mf_metadatagroup_getmetadatacount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_contentencryptionparams_getkey.restype = ctypes.c_int32 - self.lib.lib3mf_contentencryptionparams_getkey.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + self.lib.lib3mf_metadatagroup_getmetadata.restype = ctypes.c_int32 + self.lib.lib3mf_metadatagroup_getmetadata.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_contentencryptionparams_getinitializationvector.restype = ctypes.c_int32 - self.lib.lib3mf_contentencryptionparams_getinitializationvector.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + self.lib.lib3mf_metadatagroup_getmetadatabykey.restype = ctypes.c_int32 + self.lib.lib3mf_metadatagroup_getmetadatabykey.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_contentencryptionparams_getauthenticationtag.restype = ctypes.c_int32 - self.lib.lib3mf_contentencryptionparams_getauthenticationtag.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + self.lib.lib3mf_metadatagroup_removemetadatabyindex.restype = ctypes.c_int32 + self.lib.lib3mf_metadatagroup_removemetadatabyindex.argtypes = [ctypes.c_void_p, ctypes.c_uint32] - self.lib.lib3mf_contentencryptionparams_setauthenticationtag.restype = ctypes.c_int32 - self.lib.lib3mf_contentencryptionparams_setauthenticationtag.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8)] + self.lib.lib3mf_metadatagroup_removemetadata.restype = ctypes.c_int32 + self.lib.lib3mf_metadatagroup_removemetadata.argtypes = [ctypes.c_void_p, ctypes.c_void_p] - self.lib.lib3mf_contentencryptionparams_getadditionalauthenticationdata.restype = ctypes.c_int32 - self.lib.lib3mf_contentencryptionparams_getadditionalauthenticationdata.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + self.lib.lib3mf_metadatagroup_addmetadata.restype = ctypes.c_int32 + self.lib.lib3mf_metadatagroup_addmetadata.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_contentencryptionparams_getdescriptor.restype = ctypes.c_int32 - self.lib.lib3mf_contentencryptionparams_getdescriptor.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_object_gettype.restype = ctypes.c_int32 + self.lib.lib3mf_object_gettype.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] - self.lib.lib3mf_contentencryptionparams_getkeyuuid.restype = ctypes.c_int32 - self.lib.lib3mf_contentencryptionparams_getkeyuuid.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_object_settype.restype = ctypes.c_int32 + self.lib.lib3mf_object_settype.argtypes = [ctypes.c_void_p, ObjectType] - self.lib.lib3mf_resourcedata_getpath.restype = ctypes.c_int32 - self.lib.lib3mf_resourcedata_getpath.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_object_getname.restype = ctypes.c_int32 + self.lib.lib3mf_object_getname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_resourcedata_getencryptionalgorithm.restype = ctypes.c_int32 - self.lib.lib3mf_resourcedata_getencryptionalgorithm.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + self.lib.lib3mf_object_setname.restype = ctypes.c_int32 + self.lib.lib3mf_object_setname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_resourcedata_getcompression.restype = ctypes.c_int32 - self.lib.lib3mf_resourcedata_getcompression.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + self.lib.lib3mf_object_getpartnumber.restype = ctypes.c_int32 + self.lib.lib3mf_object_getpartnumber.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_resourcedata_getadditionalauthenticationdata.restype = ctypes.c_int32 - self.lib.lib3mf_resourcedata_getadditionalauthenticationdata.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + self.lib.lib3mf_object_setpartnumber.restype = ctypes.c_int32 + self.lib.lib3mf_object_setpartnumber.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_resourcedatagroup_getkeyuuid.restype = ctypes.c_int32 - self.lib.lib3mf_resourcedatagroup_getkeyuuid.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_object_ismeshobject.restype = ctypes.c_int32 + self.lib.lib3mf_object_ismeshobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_resourcedatagroup_addaccessright.restype = ctypes.c_int32 - self.lib.lib3mf_resourcedatagroup_addaccessright.argtypes = [ctypes.c_void_p, ctypes.c_void_p, WrappingAlgorithm, MgfAlgorithm, DigestMethod, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_object_iscomponentsobject.restype = ctypes.c_int32 + self.lib.lib3mf_object_iscomponentsobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_resourcedatagroup_findaccessrightbyconsumer.restype = ctypes.c_int32 - self.lib.lib3mf_resourcedatagroup_findaccessrightbyconsumer.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_object_islevelsetobject.restype = ctypes.c_int32 + self.lib.lib3mf_object_islevelsetobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_resourcedatagroup_removeaccessright.restype = ctypes.c_int32 - self.lib.lib3mf_resourcedatagroup_removeaccessright.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + self.lib.lib3mf_object_isvalid.restype = ctypes.c_int32 + self.lib.lib3mf_object_isvalid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_keystore_addconsumer.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_addconsumer.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_object_setattachmentasthumbnail.restype = ctypes.c_int32 + self.lib.lib3mf_object_setattachmentasthumbnail.argtypes = [ctypes.c_void_p, ctypes.c_void_p] - self.lib.lib3mf_keystore_getconsumercount.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_getconsumercount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_object_getthumbnailattachment.restype = ctypes.c_int32 + self.lib.lib3mf_object_getthumbnailattachment.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_keystore_getconsumer.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_getconsumer.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_object_clearthumbnailattachment.restype = ctypes.c_int32 + self.lib.lib3mf_object_clearthumbnailattachment.argtypes = [ctypes.c_void_p] - self.lib.lib3mf_keystore_removeconsumer.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_removeconsumer.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + self.lib.lib3mf_object_getoutbox.restype = ctypes.c_int32 + self.lib.lib3mf_object_getoutbox.argtypes = [ctypes.c_void_p, ctypes.POINTER(Box)] - self.lib.lib3mf_keystore_findconsumer.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_findconsumer.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_object_getuuid.restype = ctypes.c_int32 + self.lib.lib3mf_object_getuuid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_keystore_getresourcedatagroupcount.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_getresourcedatagroupcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_object_setuuid.restype = ctypes.c_int32 + self.lib.lib3mf_object_setuuid.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_keystore_addresourcedatagroup.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_addresourcedatagroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_object_getmetadatagroup.restype = ctypes.c_int32 + self.lib.lib3mf_object_getmetadatagroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_keystore_getresourcedatagroup.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_getresourcedatagroup.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_object_setslicesmeshresolution.restype = ctypes.c_int32 + self.lib.lib3mf_object_setslicesmeshresolution.argtypes = [ctypes.c_void_p, SlicesMeshResolution] - self.lib.lib3mf_keystore_removeresourcedatagroup.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_removeresourcedatagroup.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + self.lib.lib3mf_object_getslicesmeshresolution.restype = ctypes.c_int32 + self.lib.lib3mf_object_getslicesmeshresolution.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] - self.lib.lib3mf_keystore_findresourcedatagroup.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_findresourcedatagroup.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_object_hasslices.restype = ctypes.c_int32 + self.lib.lib3mf_object_hasslices.argtypes = [ctypes.c_void_p, ctypes.c_bool, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_keystore_addresourcedata.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_addresourcedata.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, EncryptionAlgorithm, Compression, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_object_clearslicestack.restype = ctypes.c_int32 + self.lib.lib3mf_object_clearslicestack.argtypes = [ctypes.c_void_p] - self.lib.lib3mf_keystore_removeresourcedata.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_removeresourcedata.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + self.lib.lib3mf_object_getslicestack.restype = ctypes.c_int32 + self.lib.lib3mf_object_getslicestack.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_keystore_findresourcedata.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_findresourcedata.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_object_assignslicestack.restype = ctypes.c_int32 + self.lib.lib3mf_object_assignslicestack.argtypes = [ctypes.c_void_p, ctypes.c_void_p] - self.lib.lib3mf_keystore_getresourcedatacount.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_getresourcedatacount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + self.lib.lib3mf_meshobject_getvertexcount.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_getvertexcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_keystore_getresourcedata.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_getresourcedata.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_gettrianglecount.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_gettrianglecount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_keystore_getuuid.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_getuuid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_meshobject_getvertex.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_getvertex.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Position)] - self.lib.lib3mf_keystore_setuuid.restype = ctypes.c_int32 - self.lib.lib3mf_keystore_setuuid.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + self.lib.lib3mf_meshobject_setvertex.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_setvertex.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Position)] - self.lib.lib3mf_model_rootmodelpart.restype = ctypes.c_int32 - self.lib.lib3mf_model_rootmodelpart.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_addvertex.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_addvertex.argtypes = [ctypes.c_void_p, ctypes.POINTER(Position), ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_model_findorcreatepackagepart.restype = ctypes.c_int32 - self.lib.lib3mf_model_findorcreatepackagepart.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_getvertices.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_getvertices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Position)] - self.lib.lib3mf_model_setunit.restype = ctypes.c_int32 - self.lib.lib3mf_model_setunit.argtypes = [ctypes.c_void_p, ModelUnit] + self.lib.lib3mf_meshobject_gettriangle.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_gettriangle.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Triangle)] - self.lib.lib3mf_model_getunit.restype = ctypes.c_int32 - self.lib.lib3mf_model_getunit.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + self.lib.lib3mf_meshobject_settriangle.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_settriangle.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Triangle)] - self.lib.lib3mf_model_getlanguage.restype = ctypes.c_int32 - self.lib.lib3mf_model_getlanguage.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_meshobject_addtriangle.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_addtriangle.argtypes = [ctypes.c_void_p, ctypes.POINTER(Triangle), ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_model_setlanguage.restype = ctypes.c_int32 - self.lib.lib3mf_model_setlanguage.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + self.lib.lib3mf_meshobject_gettriangleindices.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_gettriangleindices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Triangle)] - self.lib.lib3mf_model_querywriter.restype = ctypes.c_int32 - self.lib.lib3mf_model_querywriter.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_setobjectlevelproperty.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_setobjectlevelproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint32] - self.lib.lib3mf_model_queryreader.restype = ctypes.c_int32 - self.lib.lib3mf_model_queryreader.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_getobjectlevelproperty.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_getobjectlevelproperty.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_model_getresourcebyid.restype = ctypes.c_int32 - self.lib.lib3mf_model_getresourcebyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_settriangleproperties.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_settriangleproperties.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(TriangleProperties)] - self.lib.lib3mf_model_gettexture2dbyid.restype = ctypes.c_int32 - self.lib.lib3mf_model_gettexture2dbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_gettriangleproperties.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_gettriangleproperties.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(TriangleProperties)] - self.lib.lib3mf_model_getpropertytypebyid.restype = ctypes.c_int32 - self.lib.lib3mf_model_getpropertytypebyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_int32)] + self.lib.lib3mf_meshobject_setalltriangleproperties.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_setalltriangleproperties.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(TriangleProperties)] - self.lib.lib3mf_model_getbasematerialgroupbyid.restype = ctypes.c_int32 - self.lib.lib3mf_model_getbasematerialgroupbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_getalltriangleproperties.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_getalltriangleproperties.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(TriangleProperties)] - self.lib.lib3mf_model_gettexture2dgroupbyid.restype = ctypes.c_int32 - self.lib.lib3mf_model_gettexture2dgroupbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_clearallproperties.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_clearallproperties.argtypes = [ctypes.c_void_p] - self.lib.lib3mf_model_getcompositematerialsbyid.restype = ctypes.c_int32 - self.lib.lib3mf_model_getcompositematerialsbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_setgeometry.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_setgeometry.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(Position), ctypes.c_uint64, ctypes.POINTER(Triangle)] - self.lib.lib3mf_model_getmultipropertygroupbyid.restype = ctypes.c_int32 - self.lib.lib3mf_model_getmultipropertygroupbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_ismanifoldandoriented.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_ismanifoldandoriented.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_model_getmeshobjectbyid.restype = ctypes.c_int32 - self.lib.lib3mf_model_getmeshobjectbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_beamlattice.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_beamlattice.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_model_getcomponentsobjectbyid.restype = ctypes.c_int32 - self.lib.lib3mf_model_getcomponentsobjectbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_getvolumedata.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_getvolumedata.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_model_getcolorgroupbyid.restype = ctypes.c_int32 - self.lib.lib3mf_model_getcolorgroupbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_meshobject_setvolumedata.restype = ctypes.c_int32 + self.lib.lib3mf_meshobject_setvolumedata.argtypes = [ctypes.c_void_p, ctypes.c_void_p] - self.lib.lib3mf_model_getslicestackbyid.restype = ctypes.c_int32 - self.lib.lib3mf_model_getslicestackbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_getfunction.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_getfunction.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_model_getbuilduuid.restype = ctypes.c_int32 - self.lib.lib3mf_model_getbuilduuid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + self.lib.lib3mf_levelset_setfunction.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_setfunction.argtypes = [ctypes.c_void_p, ctypes.c_void_p] - self.lib.lib3mf_model_setbuilduuid.restype = ctypes.c_int32 - self.lib.lib3mf_model_setbuilduuid.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + self.lib.lib3mf_levelset_gettransform.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_gettransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] - self.lib.lib3mf_model_getbuilditems.restype = ctypes.c_int32 - self.lib.lib3mf_model_getbuilditems.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_settransform.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_settransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] - self.lib.lib3mf_model_getoutbox.restype = ctypes.c_int32 - self.lib.lib3mf_model_getoutbox.argtypes = [ctypes.c_void_p, ctypes.POINTER(Box)] + self.lib.lib3mf_levelset_getchannelname.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_getchannelname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] - self.lib.lib3mf_model_getresources.restype = ctypes.c_int32 - self.lib.lib3mf_model_getresources.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_setchannelname.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_setchannelname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] - self.lib.lib3mf_model_getobjects.restype = ctypes.c_int32 - self.lib.lib3mf_model_getobjects.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_setminfeaturesize.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_setminfeaturesize.argtypes = [ctypes.c_void_p, ctypes.c_double] - self.lib.lib3mf_model_getmeshobjects.restype = ctypes.c_int32 - self.lib.lib3mf_model_getmeshobjects.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_getminfeaturesize.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_getminfeaturesize.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] - self.lib.lib3mf_model_getcomponentsobjects.restype = ctypes.c_int32 - self.lib.lib3mf_model_getcomponentsobjects.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_setfallbackvalue.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_setfallbackvalue.argtypes = [ctypes.c_void_p, ctypes.c_double] - self.lib.lib3mf_model_gettexture2ds.restype = ctypes.c_int32 - self.lib.lib3mf_model_gettexture2ds.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_getfallbackvalue.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_getfallbackvalue.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] - self.lib.lib3mf_model_getbasematerialgroups.restype = ctypes.c_int32 - self.lib.lib3mf_model_getbasematerialgroups.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_setmeshbboxonly.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_setmeshbboxonly.argtypes = [ctypes.c_void_p, ctypes.c_bool] - self.lib.lib3mf_model_getcolorgroups.restype = ctypes.c_int32 - self.lib.lib3mf_model_getcolorgroups.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_getmeshbboxonly.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_getmeshbboxonly.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] - self.lib.lib3mf_model_gettexture2dgroups.restype = ctypes.c_int32 - self.lib.lib3mf_model_gettexture2dgroups.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_setmesh.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_setmesh.argtypes = [ctypes.c_void_p, ctypes.c_void_p] - self.lib.lib3mf_model_getcompositematerials.restype = ctypes.c_int32 - self.lib.lib3mf_model_getcompositematerials.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_getmesh.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_getmesh.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_model_getmultipropertygroups.restype = ctypes.c_int32 - self.lib.lib3mf_model_getmultipropertygroups.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_getvolumedata.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_getvolumedata.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_model_getslicestacks.restype = ctypes.c_int32 - self.lib.lib3mf_model_getslicestacks.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_levelset_setvolumedata.restype = ctypes.c_int32 + self.lib.lib3mf_levelset_setvolumedata.argtypes = [ctypes.c_void_p, ctypes.c_void_p] - self.lib.lib3mf_model_mergetomodel.restype = ctypes.c_int32 - self.lib.lib3mf_model_mergetomodel.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_getminlength.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getminlength.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] - self.lib.lib3mf_model_addmeshobject.restype = ctypes.c_int32 - self.lib.lib3mf_model_addmeshobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_setminlength.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_setminlength.argtypes = [ctypes.c_void_p, ctypes.c_double] - self.lib.lib3mf_model_addcomponentsobject.restype = ctypes.c_int32 - self.lib.lib3mf_model_addcomponentsobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_getclipping.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getclipping.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_model_addslicestack.restype = ctypes.c_int32 - self.lib.lib3mf_model_addslicestack.argtypes = [ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_setclipping.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_setclipping.argtypes = [ctypes.c_void_p, BeamLatticeClipMode, ctypes.c_uint32] - self.lib.lib3mf_model_addtexture2dfromattachment.restype = ctypes.c_int32 - self.lib.lib3mf_model_addtexture2dfromattachment.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_getrepresentation.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getrepresentation.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_model_addbasematerialgroup.restype = ctypes.c_int32 - self.lib.lib3mf_model_addbasematerialgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_setrepresentation.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_setrepresentation.argtypes = [ctypes.c_void_p, ctypes.c_uint32] - self.lib.lib3mf_model_addcolorgroup.restype = ctypes.c_int32 - self.lib.lib3mf_model_addcolorgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_getballoptions.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getballoptions.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_double)] - self.lib.lib3mf_model_addtexture2dgroup.restype = ctypes.c_int32 - self.lib.lib3mf_model_addtexture2dgroup.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_setballoptions.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_setballoptions.argtypes = [ctypes.c_void_p, BeamLatticeBallMode, ctypes.c_double] - self.lib.lib3mf_model_addcompositematerials.restype = ctypes.c_int32 - self.lib.lib3mf_model_addcompositematerials.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_getbeamcount.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getbeamcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_model_addmultipropertygroup.restype = ctypes.c_int32 - self.lib.lib3mf_model_addmultipropertygroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_getbeam.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getbeam.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Beam)] - self.lib.lib3mf_model_addbuilditem.restype = ctypes.c_int32 - self.lib.lib3mf_model_addbuilditem.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(Transform), ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_addbeam.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_addbeam.argtypes = [ctypes.c_void_p, ctypes.POINTER(Beam), ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_model_removebuilditem.restype = ctypes.c_int32 - self.lib.lib3mf_model_removebuilditem.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + self.lib.lib3mf_beamlattice_setbeam.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_setbeam.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Beam)] - self.lib.lib3mf_model_getmetadatagroup.restype = ctypes.c_int32 - self.lib.lib3mf_model_getmetadatagroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_setbeams.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_setbeams.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(Beam)] - self.lib.lib3mf_model_addattachment.restype = ctypes.c_int32 - self.lib.lib3mf_model_addattachment.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_getbeams.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getbeams.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Beam)] - self.lib.lib3mf_model_removeattachment.restype = ctypes.c_int32 - self.lib.lib3mf_model_removeattachment.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + self.lib.lib3mf_beamlattice_getballcount.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getballcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_model_getattachment.restype = ctypes.c_int32 - self.lib.lib3mf_model_getattachment.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_getball.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getball.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Ball)] - self.lib.lib3mf_model_findattachment.restype = ctypes.c_int32 - self.lib.lib3mf_model_findattachment.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_addball.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_addball.argtypes = [ctypes.c_void_p, ctypes.POINTER(Ball), ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_model_getattachmentcount.restype = ctypes.c_int32 - self.lib.lib3mf_model_getattachmentcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + self.lib.lib3mf_beamlattice_setball.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_setball.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Ball)] - self.lib.lib3mf_model_haspackagethumbnailattachment.restype = ctypes.c_int32 - self.lib.lib3mf_model_haspackagethumbnailattachment.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + self.lib.lib3mf_beamlattice_setballs.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_setballs.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(Ball)] - self.lib.lib3mf_model_createpackagethumbnailattachment.restype = ctypes.c_int32 - self.lib.lib3mf_model_createpackagethumbnailattachment.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_getballs.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getballs.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Ball)] - self.lib.lib3mf_model_getpackagethumbnailattachment.restype = ctypes.c_int32 - self.lib.lib3mf_model_getpackagethumbnailattachment.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_beamlattice_getbeamsetcount.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getbeamsetcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_model_removepackagethumbnailattachment.restype = ctypes.c_int32 - self.lib.lib3mf_model_removepackagethumbnailattachment.argtypes = [ctypes.c_void_p] + self.lib.lib3mf_beamlattice_addbeamset.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_addbeamset.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_model_addcustomcontenttype.restype = ctypes.c_int32 - self.lib.lib3mf_model_addcustomcontenttype.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p] + self.lib.lib3mf_beamlattice_getbeamset.restype = ctypes.c_int32 + self.lib.lib3mf_beamlattice_getbeamset.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] - self.lib.lib3mf_model_removecustomcontenttype.restype = ctypes.c_int32 - self.lib.lib3mf_model_removecustomcontenttype.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + self.lib.lib3mf_functionreference_getfunctionresourceid.restype = ctypes.c_int32 + self.lib.lib3mf_functionreference_getfunctionresourceid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] - self.lib.lib3mf_model_setrandomnumbercallback.restype = ctypes.c_int32 - self.lib.lib3mf_model_setrandomnumbercallback.argtypes = [ctypes.c_void_p, RandomNumberCallback, ctypes.c_void_p] + self.lib.lib3mf_functionreference_setfunctionresourceid.restype = ctypes.c_int32 + self.lib.lib3mf_functionreference_setfunctionresourceid.argtypes = [ctypes.c_void_p, ctypes.c_uint32] - self.lib.lib3mf_model_getkeystore.restype = ctypes.c_int32 - self.lib.lib3mf_model_getkeystore.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + self.lib.lib3mf_functionreference_gettransform.restype = ctypes.c_int32 + self.lib.lib3mf_functionreference_gettransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] - except AttributeError as ae: - raise ELib3MFException(ErrorCodes.COULDNOTFINDLIBRARYEXPORT, ae.args[0]) + self.lib.lib3mf_functionreference_settransform.restype = ctypes.c_int32 + self.lib.lib3mf_functionreference_settransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] + + self.lib.lib3mf_functionreference_getchannelname.restype = ctypes.c_int32 + self.lib.lib3mf_functionreference_getchannelname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_functionreference_setchannelname.restype = ctypes.c_int32 + self.lib.lib3mf_functionreference_setchannelname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_functionreference_setminfeaturesize.restype = ctypes.c_int32 + self.lib.lib3mf_functionreference_setminfeaturesize.argtypes = [ctypes.c_void_p, ctypes.c_double] + + self.lib.lib3mf_functionreference_getminfeaturesize.restype = ctypes.c_int32 + self.lib.lib3mf_functionreference_getminfeaturesize.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] + + self.lib.lib3mf_functionreference_setfallbackvalue.restype = ctypes.c_int32 + self.lib.lib3mf_functionreference_setfallbackvalue.argtypes = [ctypes.c_void_p, ctypes.c_double] + + self.lib.lib3mf_functionreference_getfallbackvalue.restype = ctypes.c_int32 + self.lib.lib3mf_functionreference_getfallbackvalue.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] + + self.lib.lib3mf_volumedatacomposite_getbasematerialgroup.restype = ctypes.c_int32 + self.lib.lib3mf_volumedatacomposite_getbasematerialgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_volumedatacomposite_setbasematerialgroup.restype = ctypes.c_int32 + self.lib.lib3mf_volumedatacomposite_setbasematerialgroup.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_volumedatacomposite_getmaterialmappingcount.restype = ctypes.c_int32 + self.lib.lib3mf_volumedatacomposite_getmaterialmappingcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_volumedatacomposite_getmaterialmapping.restype = ctypes.c_int32 + self.lib.lib3mf_volumedatacomposite_getmaterialmapping.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_volumedatacomposite_addmaterialmapping.restype = ctypes.c_int32 + self.lib.lib3mf_volumedatacomposite_addmaterialmapping.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform), ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_volumedatacomposite_removematerialmapping.restype = ctypes.c_int32 + self.lib.lib3mf_volumedatacomposite_removematerialmapping.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + + self.lib.lib3mf_volumedataproperty_getname.restype = ctypes.c_int32 + self.lib.lib3mf_volumedataproperty_getname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_volumedataproperty_setisrequired.restype = ctypes.c_int32 + self.lib.lib3mf_volumedataproperty_setisrequired.argtypes = [ctypes.c_void_p, ctypes.c_bool] + + self.lib.lib3mf_volumedataproperty_isrequired.restype = ctypes.c_int32 + self.lib.lib3mf_volumedataproperty_isrequired.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + + self.lib.lib3mf_volumedata_getcomposite.restype = ctypes.c_int32 + self.lib.lib3mf_volumedata_getcomposite.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_volumedata_createnewcomposite.restype = ctypes.c_int32 + self.lib.lib3mf_volumedata_createnewcomposite.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_volumedata_removecomposite.restype = ctypes.c_int32 + self.lib.lib3mf_volumedata_removecomposite.argtypes = [ctypes.c_void_p] + + self.lib.lib3mf_volumedata_getcolor.restype = ctypes.c_int32 + self.lib.lib3mf_volumedata_getcolor.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_volumedata_createnewcolor.restype = ctypes.c_int32 + self.lib.lib3mf_volumedata_createnewcolor.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_volumedata_removecolor.restype = ctypes.c_int32 + self.lib.lib3mf_volumedata_removecolor.argtypes = [ctypes.c_void_p] + + self.lib.lib3mf_volumedata_getpropertycount.restype = ctypes.c_int32 + self.lib.lib3mf_volumedata_getpropertycount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_volumedata_getproperty.restype = ctypes.c_int32 + self.lib.lib3mf_volumedata_getproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_volumedata_addpropertyfromfunction.restype = ctypes.c_int32 + self.lib.lib3mf_volumedata_addpropertyfromfunction.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_volumedata_removeproperty.restype = ctypes.c_int32 + self.lib.lib3mf_volumedata_removeproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + + self.lib.lib3mf_component_getobjectresource.restype = ctypes.c_int32 + self.lib.lib3mf_component_getobjectresource.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_component_getobjectresourceid.restype = ctypes.c_int32 + self.lib.lib3mf_component_getobjectresourceid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_component_getuuid.restype = ctypes.c_int32 + self.lib.lib3mf_component_getuuid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_component_setuuid.restype = ctypes.c_int32 + self.lib.lib3mf_component_setuuid.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_component_hastransform.restype = ctypes.c_int32 + self.lib.lib3mf_component_hastransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + + self.lib.lib3mf_component_gettransform.restype = ctypes.c_int32 + self.lib.lib3mf_component_gettransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] + + self.lib.lib3mf_component_settransform.restype = ctypes.c_int32 + self.lib.lib3mf_component_settransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] + + self.lib.lib3mf_componentsobject_addcomponent.restype = ctypes.c_int32 + self.lib.lib3mf_componentsobject_addcomponent.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(Transform), ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_componentsobject_getcomponent.restype = ctypes.c_int32 + self.lib.lib3mf_componentsobject_getcomponent.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_componentsobject_getcomponentcount.restype = ctypes.c_int32 + self.lib.lib3mf_componentsobject_getcomponentcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_beamset_setname.restype = ctypes.c_int32 + self.lib.lib3mf_beamset_setname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_beamset_getname.restype = ctypes.c_int32 + self.lib.lib3mf_beamset_getname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_beamset_setidentifier.restype = ctypes.c_int32 + self.lib.lib3mf_beamset_setidentifier.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_beamset_getidentifier.restype = ctypes.c_int32 + self.lib.lib3mf_beamset_getidentifier.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_beamset_getreferencecount.restype = ctypes.c_int32 + self.lib.lib3mf_beamset_getreferencecount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_beamset_setreferences.restype = ctypes.c_int32 + self.lib.lib3mf_beamset_setreferences.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_beamset_getreferences.restype = ctypes.c_int32 + self.lib.lib3mf_beamset_getreferences.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_beamset_getballreferencecount.restype = ctypes.c_int32 + self.lib.lib3mf_beamset_getballreferencecount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_beamset_setballreferences.restype = ctypes.c_int32 + self.lib.lib3mf_beamset_setballreferences.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_beamset_getballreferences.restype = ctypes.c_int32 + self.lib.lib3mf_beamset_getballreferences.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_basematerialgroup_getcount.restype = ctypes.c_int32 + self.lib.lib3mf_basematerialgroup_getcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_basematerialgroup_getallpropertyids.restype = ctypes.c_int32 + self.lib.lib3mf_basematerialgroup_getallpropertyids.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_basematerialgroup_addmaterial.restype = ctypes.c_int32 + self.lib.lib3mf_basematerialgroup_addmaterial.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(Color), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_basematerialgroup_removematerial.restype = ctypes.c_int32 + self.lib.lib3mf_basematerialgroup_removematerial.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + + self.lib.lib3mf_basematerialgroup_getname.restype = ctypes.c_int32 + self.lib.lib3mf_basematerialgroup_getname.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_basematerialgroup_setname.restype = ctypes.c_int32 + self.lib.lib3mf_basematerialgroup_setname.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_char_p] + + self.lib.lib3mf_basematerialgroup_setdisplaycolor.restype = ctypes.c_int32 + self.lib.lib3mf_basematerialgroup_setdisplaycolor.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Color)] + + self.lib.lib3mf_basematerialgroup_getdisplaycolor.restype = ctypes.c_int32 + self.lib.lib3mf_basematerialgroup_getdisplaycolor.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Color)] + + self.lib.lib3mf_colorgroup_getcount.restype = ctypes.c_int32 + self.lib.lib3mf_colorgroup_getcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_colorgroup_getallpropertyids.restype = ctypes.c_int32 + self.lib.lib3mf_colorgroup_getallpropertyids.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_colorgroup_addcolor.restype = ctypes.c_int32 + self.lib.lib3mf_colorgroup_addcolor.argtypes = [ctypes.c_void_p, ctypes.POINTER(Color), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_colorgroup_removecolor.restype = ctypes.c_int32 + self.lib.lib3mf_colorgroup_removecolor.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + + self.lib.lib3mf_colorgroup_setcolor.restype = ctypes.c_int32 + self.lib.lib3mf_colorgroup_setcolor.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Color)] + + self.lib.lib3mf_colorgroup_getcolor.restype = ctypes.c_int32 + self.lib.lib3mf_colorgroup_getcolor.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Color)] + + self.lib.lib3mf_texture2dgroup_getcount.restype = ctypes.c_int32 + self.lib.lib3mf_texture2dgroup_getcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_texture2dgroup_getallpropertyids.restype = ctypes.c_int32 + self.lib.lib3mf_texture2dgroup_getallpropertyids.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_texture2dgroup_addtex2coord.restype = ctypes.c_int32 + self.lib.lib3mf_texture2dgroup_addtex2coord.argtypes = [ctypes.c_void_p, ctypes.POINTER(Tex2Coord), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_texture2dgroup_gettex2coord.restype = ctypes.c_int32 + self.lib.lib3mf_texture2dgroup_gettex2coord.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(Tex2Coord)] + + self.lib.lib3mf_texture2dgroup_removetex2coord.restype = ctypes.c_int32 + self.lib.lib3mf_texture2dgroup_removetex2coord.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + + self.lib.lib3mf_texture2dgroup_gettexture2d.restype = ctypes.c_int32 + self.lib.lib3mf_texture2dgroup_gettexture2d.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_compositematerials_getcount.restype = ctypes.c_int32 + self.lib.lib3mf_compositematerials_getcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_compositematerials_getallpropertyids.restype = ctypes.c_int32 + self.lib.lib3mf_compositematerials_getallpropertyids.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_compositematerials_getbasematerialgroup.restype = ctypes.c_int32 + self.lib.lib3mf_compositematerials_getbasematerialgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_compositematerials_addcomposite.restype = ctypes.c_int32 + self.lib.lib3mf_compositematerials_addcomposite.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(CompositeConstituent), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_compositematerials_removecomposite.restype = ctypes.c_int32 + self.lib.lib3mf_compositematerials_removecomposite.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + + self.lib.lib3mf_compositematerials_getcomposite.restype = ctypes.c_int32 + self.lib.lib3mf_compositematerials_getcomposite.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(CompositeConstituent)] + + self.lib.lib3mf_multipropertygroup_getcount.restype = ctypes.c_int32 + self.lib.lib3mf_multipropertygroup_getcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_multipropertygroup_getallpropertyids.restype = ctypes.c_int32 + self.lib.lib3mf_multipropertygroup_getallpropertyids.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_multipropertygroup_addmultiproperty.restype = ctypes.c_int32 + self.lib.lib3mf_multipropertygroup_addmultiproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_multipropertygroup_setmultiproperty.restype = ctypes.c_int32 + self.lib.lib3mf_multipropertygroup_setmultiproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_multipropertygroup_getmultiproperty.restype = ctypes.c_int32 + self.lib.lib3mf_multipropertygroup_getmultiproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_multipropertygroup_removemultiproperty.restype = ctypes.c_int32 + self.lib.lib3mf_multipropertygroup_removemultiproperty.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + + self.lib.lib3mf_multipropertygroup_getlayercount.restype = ctypes.c_int32 + self.lib.lib3mf_multipropertygroup_getlayercount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_multipropertygroup_addlayer.restype = ctypes.c_int32 + self.lib.lib3mf_multipropertygroup_addlayer.argtypes = [ctypes.c_void_p, ctypes.POINTER(MultiPropertyLayer), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_multipropertygroup_getlayer.restype = ctypes.c_int32 + self.lib.lib3mf_multipropertygroup_getlayer.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(MultiPropertyLayer)] + + self.lib.lib3mf_multipropertygroup_removelayer.restype = ctypes.c_int32 + self.lib.lib3mf_multipropertygroup_removelayer.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + + self.lib.lib3mf_image3d_getname.restype = ctypes.c_int32 + self.lib.lib3mf_image3d_getname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_image3d_setname.restype = ctypes.c_int32 + self.lib.lib3mf_image3d_setname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_image3d_isimagestack.restype = ctypes.c_int32 + self.lib.lib3mf_image3d_isimagestack.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + + self.lib.lib3mf_imagestack_getrowcount.restype = ctypes.c_int32 + self.lib.lib3mf_imagestack_getrowcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_imagestack_setrowcount.restype = ctypes.c_int32 + self.lib.lib3mf_imagestack_setrowcount.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + + self.lib.lib3mf_imagestack_getcolumncount.restype = ctypes.c_int32 + self.lib.lib3mf_imagestack_getcolumncount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_imagestack_setcolumncount.restype = ctypes.c_int32 + self.lib.lib3mf_imagestack_setcolumncount.argtypes = [ctypes.c_void_p, ctypes.c_uint32] + + self.lib.lib3mf_imagestack_getsheetcount.restype = ctypes.c_int32 + self.lib.lib3mf_imagestack_getsheetcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_imagestack_getsheet.restype = ctypes.c_int32 + self.lib.lib3mf_imagestack_getsheet.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_imagestack_setsheet.restype = ctypes.c_int32 + self.lib.lib3mf_imagestack_setsheet.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_void_p] + + self.lib.lib3mf_imagestack_createemptysheet.restype = ctypes.c_int32 + self.lib.lib3mf_imagestack_createemptysheet.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_imagestack_createsheetfrombuffer.restype = ctypes.c_int32 + self.lib.lib3mf_imagestack_createsheetfrombuffer.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_imagestack_createsheetfromfile.restype = ctypes.c_int32 + self.lib.lib3mf_imagestack_createsheetfromfile.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_attachment_getpath.restype = ctypes.c_int32 + self.lib.lib3mf_attachment_getpath.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_attachment_setpath.restype = ctypes.c_int32 + self.lib.lib3mf_attachment_setpath.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_attachment_packagepart.restype = ctypes.c_int32 + self.lib.lib3mf_attachment_packagepart.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_attachment_getrelationshiptype.restype = ctypes.c_int32 + self.lib.lib3mf_attachment_getrelationshiptype.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_attachment_setrelationshiptype.restype = ctypes.c_int32 + self.lib.lib3mf_attachment_setrelationshiptype.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_attachment_writetofile.restype = ctypes.c_int32 + self.lib.lib3mf_attachment_writetofile.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_attachment_readfromfile.restype = ctypes.c_int32 + self.lib.lib3mf_attachment_readfromfile.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_attachment_readfromcallback.restype = ctypes.c_int32 + self.lib.lib3mf_attachment_readfromcallback.argtypes = [ctypes.c_void_p, ReadCallback, ctypes.c_uint64, SeekCallback, ctypes.c_void_p] + + self.lib.lib3mf_attachment_getstreamsize.restype = ctypes.c_int32 + self.lib.lib3mf_attachment_getstreamsize.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_attachment_writetobuffer.restype = ctypes.c_int32 + self.lib.lib3mf_attachment_writetobuffer.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + + self.lib.lib3mf_attachment_readfrombuffer.restype = ctypes.c_int32 + self.lib.lib3mf_attachment_readfrombuffer.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8)] + + self.lib.lib3mf_texture2d_getattachment.restype = ctypes.c_int32 + self.lib.lib3mf_texture2d_getattachment.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_texture2d_setattachment.restype = ctypes.c_int32 + self.lib.lib3mf_texture2d_setattachment.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_texture2d_getcontenttype.restype = ctypes.c_int32 + self.lib.lib3mf_texture2d_getcontenttype.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_texture2d_setcontenttype.restype = ctypes.c_int32 + self.lib.lib3mf_texture2d_setcontenttype.argtypes = [ctypes.c_void_p, TextureType] + + self.lib.lib3mf_texture2d_gettilestyleuv.restype = ctypes.c_int32 + self.lib.lib3mf_texture2d_gettilestyleuv.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_texture2d_settilestyleuv.restype = ctypes.c_int32 + self.lib.lib3mf_texture2d_settilestyleuv.argtypes = [ctypes.c_void_p, TextureTileStyle, TextureTileStyle] + + self.lib.lib3mf_texture2d_getfilter.restype = ctypes.c_int32 + self.lib.lib3mf_texture2d_getfilter.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_texture2d_setfilter.restype = ctypes.c_int32 + self.lib.lib3mf_texture2d_setfilter.argtypes = [ctypes.c_void_p, TextureFilter] + + self.lib.lib3mf_implicitport_getidentifier.restype = ctypes.c_int32 + self.lib.lib3mf_implicitport_getidentifier.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_implicitport_setidentifier.restype = ctypes.c_int32 + self.lib.lib3mf_implicitport_setidentifier.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_implicitport_getdisplayname.restype = ctypes.c_int32 + self.lib.lib3mf_implicitport_getdisplayname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_implicitport_setdisplayname.restype = ctypes.c_int32 + self.lib.lib3mf_implicitport_setdisplayname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_implicitport_settype.restype = ctypes.c_int32 + self.lib.lib3mf_implicitport_settype.argtypes = [ctypes.c_void_p, ImplicitPortType] + + self.lib.lib3mf_implicitport_gettype.restype = ctypes.c_int32 + self.lib.lib3mf_implicitport_gettype.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_implicitport_getreference.restype = ctypes.c_int32 + self.lib.lib3mf_implicitport_getreference.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_implicitport_setreference.restype = ctypes.c_int32 + self.lib.lib3mf_implicitport_setreference.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_iterator_movenext.restype = ctypes.c_int32 + self.lib.lib3mf_iterator_movenext.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + + self.lib.lib3mf_iterator_moveprevious.restype = ctypes.c_int32 + self.lib.lib3mf_iterator_moveprevious.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + + self.lib.lib3mf_iterator_count.restype = ctypes.c_int32 + self.lib.lib3mf_iterator_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_implicitportiterator_getcurrent.restype = ctypes.c_int32 + self.lib.lib3mf_implicitportiterator_getcurrent.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitnode_getidentifier.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_getidentifier.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_implicitnode_setidentifier.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_setidentifier.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_implicitnode_getdisplayname.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_getdisplayname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_implicitnode_setdisplayname.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_setdisplayname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_implicitnode_gettag.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_gettag.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_implicitnode_settag.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_settag.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_implicitnode_getnodetype.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_getnodetype.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_implicitnode_addinput.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_addinput.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitnode_getinputs.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_getinputs.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitnode_addoutput.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_addoutput.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitnode_getoutputs.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_getoutputs.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitnode_findinput.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_findinput.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitnode_findoutput.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_findoutput.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitnode_aretypesvalid.restype = ctypes.c_int32 + self.lib.lib3mf_implicitnode_aretypesvalid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + + self.lib.lib3mf_oneinputnode_getinputa.restype = ctypes.c_int32 + self.lib.lib3mf_oneinputnode_getinputa.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_oneinputnode_getoutputresult.restype = ctypes.c_int32 + self.lib.lib3mf_oneinputnode_getoutputresult.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_resourceidnode_setresource.restype = ctypes.c_int32 + self.lib.lib3mf_resourceidnode_setresource.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_resourceidnode_getresource.restype = ctypes.c_int32 + self.lib.lib3mf_resourceidnode_getresource.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_resourceidnode_getoutputvalue.restype = ctypes.c_int32 + self.lib.lib3mf_resourceidnode_getoutputvalue.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_twoinputnode_getinputb.restype = ctypes.c_int32 + self.lib.lib3mf_twoinputnode_getinputb.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_selectnode_getinputb.restype = ctypes.c_int32 + self.lib.lib3mf_selectnode_getinputb.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_selectnode_getinputc.restype = ctypes.c_int32 + self.lib.lib3mf_selectnode_getinputc.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_selectnode_getinputd.restype = ctypes.c_int32 + self.lib.lib3mf_selectnode_getinputd.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_clampnode_getinputmin.restype = ctypes.c_int32 + self.lib.lib3mf_clampnode_getinputmin.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_clampnode_getinputmax.restype = ctypes.c_int32 + self.lib.lib3mf_clampnode_getinputmax.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composevectornode_getinputx.restype = ctypes.c_int32 + self.lib.lib3mf_composevectornode_getinputx.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composevectornode_getinputy.restype = ctypes.c_int32 + self.lib.lib3mf_composevectornode_getinputy.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composevectornode_getinputz.restype = ctypes.c_int32 + self.lib.lib3mf_composevectornode_getinputz.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composevectornode_getoutputresult.restype = ctypes.c_int32 + self.lib.lib3mf_composevectornode_getoutputresult.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_decomposevectornode_getinputa.restype = ctypes.c_int32 + self.lib.lib3mf_decomposevectornode_getinputa.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_decomposevectornode_getoutputx.restype = ctypes.c_int32 + self.lib.lib3mf_decomposevectornode_getoutputx.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_decomposevectornode_getoutputy.restype = ctypes.c_int32 + self.lib.lib3mf_decomposevectornode_getoutputy.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_decomposevectornode_getoutputz.restype = ctypes.c_int32 + self.lib.lib3mf_decomposevectornode_getoutputz.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm00.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm00.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm01.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm01.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm02.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm02.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm03.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm03.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm10.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm10.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm11.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm11.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm12.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm12.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm13.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm13.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm20.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm20.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm21.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm21.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm22.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm22.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm23.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm23.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm30.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm30.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm31.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm31.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm32.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm32.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getinputm33.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getinputm33.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_composematrixnode_getoutputresult.restype = ctypes.c_int32 + self.lib.lib3mf_composematrixnode_getoutputresult.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_matrixfromrowsnode_getinputa.restype = ctypes.c_int32 + self.lib.lib3mf_matrixfromrowsnode_getinputa.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_matrixfromrowsnode_getinputb.restype = ctypes.c_int32 + self.lib.lib3mf_matrixfromrowsnode_getinputb.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_matrixfromrowsnode_getinputc.restype = ctypes.c_int32 + self.lib.lib3mf_matrixfromrowsnode_getinputc.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_matrixfromrowsnode_getinputd.restype = ctypes.c_int32 + self.lib.lib3mf_matrixfromrowsnode_getinputd.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_matrixfromrowsnode_getoutputresult.restype = ctypes.c_int32 + self.lib.lib3mf_matrixfromrowsnode_getoutputresult.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_matrixfromcolumnsnode_getinputa.restype = ctypes.c_int32 + self.lib.lib3mf_matrixfromcolumnsnode_getinputa.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_matrixfromcolumnsnode_getinputb.restype = ctypes.c_int32 + self.lib.lib3mf_matrixfromcolumnsnode_getinputb.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_matrixfromcolumnsnode_getinputc.restype = ctypes.c_int32 + self.lib.lib3mf_matrixfromcolumnsnode_getinputc.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_matrixfromcolumnsnode_getinputd.restype = ctypes.c_int32 + self.lib.lib3mf_matrixfromcolumnsnode_getinputd.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_matrixfromcolumnsnode_getoutputresult.restype = ctypes.c_int32 + self.lib.lib3mf_matrixfromcolumnsnode_getoutputresult.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_constantnode_setconstant.restype = ctypes.c_int32 + self.lib.lib3mf_constantnode_setconstant.argtypes = [ctypes.c_void_p, ctypes.c_double] + + self.lib.lib3mf_constantnode_getconstant.restype = ctypes.c_int32 + self.lib.lib3mf_constantnode_getconstant.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] + + self.lib.lib3mf_constantnode_getoutputvalue.restype = ctypes.c_int32 + self.lib.lib3mf_constantnode_getoutputvalue.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_constvecnode_setvector.restype = ctypes.c_int32 + self.lib.lib3mf_constvecnode_setvector.argtypes = [ctypes.c_void_p, ctypes.POINTER(Vector)] + + self.lib.lib3mf_constvecnode_getvector.restype = ctypes.c_int32 + self.lib.lib3mf_constvecnode_getvector.argtypes = [ctypes.c_void_p, ctypes.POINTER(Vector)] + + self.lib.lib3mf_constvecnode_getoutputvector.restype = ctypes.c_int32 + self.lib.lib3mf_constvecnode_getoutputvector.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_constmatnode_setmatrix.restype = ctypes.c_int32 + self.lib.lib3mf_constmatnode_setmatrix.argtypes = [ctypes.c_void_p, ctypes.POINTER(Matrix4x4)] + + self.lib.lib3mf_constmatnode_getmatrix.restype = ctypes.c_int32 + self.lib.lib3mf_constmatnode_getmatrix.argtypes = [ctypes.c_void_p, ctypes.POINTER(Matrix4x4)] + + self.lib.lib3mf_constmatnode_getoutputmatrix.restype = ctypes.c_int32 + self.lib.lib3mf_constmatnode_getoutputmatrix.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_meshnode_getinputmesh.restype = ctypes.c_int32 + self.lib.lib3mf_meshnode_getinputmesh.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_meshnode_getinputpos.restype = ctypes.c_int32 + self.lib.lib3mf_meshnode_getinputpos.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_meshnode_getoutputdistance.restype = ctypes.c_int32 + self.lib.lib3mf_meshnode_getoutputdistance.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_unsignedmeshnode_getinputmesh.restype = ctypes.c_int32 + self.lib.lib3mf_unsignedmeshnode_getinputmesh.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_unsignedmeshnode_getinputpos.restype = ctypes.c_int32 + self.lib.lib3mf_unsignedmeshnode_getinputpos.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_unsignedmeshnode_getoutputdistance.restype = ctypes.c_int32 + self.lib.lib3mf_unsignedmeshnode_getoutputdistance.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_functioncallnode_getinputfunctionid.restype = ctypes.c_int32 + self.lib.lib3mf_functioncallnode_getinputfunctionid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_nodeiterator_getcurrent.restype = ctypes.c_int32 + self.lib.lib3mf_nodeiterator_getcurrent.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_function_getdisplayname.restype = ctypes.c_int32 + self.lib.lib3mf_function_getdisplayname.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_function_setdisplayname.restype = ctypes.c_int32 + self.lib.lib3mf_function_setdisplayname.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_function_addinput.restype = ctypes.c_int32 + self.lib.lib3mf_function_addinput.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ImplicitPortType, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_function_getinputs.restype = ctypes.c_int32 + self.lib.lib3mf_function_getinputs.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_function_removeinput.restype = ctypes.c_int32 + self.lib.lib3mf_function_removeinput.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_function_addoutput.restype = ctypes.c_int32 + self.lib.lib3mf_function_addoutput.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ImplicitPortType, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_function_getoutputs.restype = ctypes.c_int32 + self.lib.lib3mf_function_getoutputs.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_function_removeoutput.restype = ctypes.c_int32 + self.lib.lib3mf_function_removeoutput.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_function_findinput.restype = ctypes.c_int32 + self.lib.lib3mf_function_findinput.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_function_findoutput.restype = ctypes.c_int32 + self.lib.lib3mf_function_findoutput.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_getidentifier.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_getidentifier.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_implicitfunction_setidentifier.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_setidentifier.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_implicitfunction_addnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addnode.argtypes = [ctypes.c_void_p, ImplicitNodeType, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addsinnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addsinnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addcosnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addcosnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addtannode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addtannode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addarcsinnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addarcsinnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addarccosnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addarccosnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addarctan2node.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addarctan2node.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addsinhnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addsinhnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addcoshnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addcoshnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addtanhnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addtanhnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addroundnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addroundnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addceilnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addceilnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addfloornode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addfloornode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addsignnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addsignnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addfractnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addfractnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addabsnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addabsnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addexpnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addexpnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addlognode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addlognode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addlog2node.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addlog2node.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addlog10node.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addlog10node.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addlengthnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addlengthnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addtransposenode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addtransposenode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_inversenode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_inversenode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addsqrtnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addsqrtnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addresourceidnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addresourceidnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addadditionnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addadditionnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addsubtractionnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addsubtractionnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addmultiplicationnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addmultiplicationnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_adddivisionnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_adddivisionnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_adddotnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_adddotnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addcrossnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addcrossnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addmatvecmultiplicationnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addmatvecmultiplicationnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addminnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addminnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addmaxnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addmaxnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addfmodnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addfmodnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addpownode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addpownode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addselectnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addselectnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addclampnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addclampnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ImplicitNodeConfiguration, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addcomposevectornode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addcomposevectornode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addvectorfromscalarnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addvectorfromscalarnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_adddecomposevectornode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_adddecomposevectornode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addcomposematrixnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addcomposematrixnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addmatrixfromrowsnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addmatrixfromrowsnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addmatrixfromcolumnsnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addmatrixfromcolumnsnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addconstantnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addconstantnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addconstvecnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addconstvecnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addconstmatnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addconstmatnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addmeshnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addmeshnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addunsignedmeshnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addunsignedmeshnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_addfunctioncallnode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addfunctioncallnode.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_getnodes.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_getnodes.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_implicitfunction_removenode.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_removenode.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_implicitfunction_addlink.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addlink.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_implicitfunction_addlinkbynames.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_addlinkbynames.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p] + + self.lib.lib3mf_implicitfunction_clear.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_clear.argtypes = [ctypes.c_void_p] + + self.lib.lib3mf_implicitfunction_sortnodestopologically.restype = ctypes.c_int32 + self.lib.lib3mf_implicitfunction_sortnodestopologically.argtypes = [ctypes.c_void_p] + + self.lib.lib3mf_functionfromimage3d_getimage3d.restype = ctypes.c_int32 + self.lib.lib3mf_functionfromimage3d_getimage3d.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_functionfromimage3d_setimage3d.restype = ctypes.c_int32 + self.lib.lib3mf_functionfromimage3d_setimage3d.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_functionfromimage3d_setfilter.restype = ctypes.c_int32 + self.lib.lib3mf_functionfromimage3d_setfilter.argtypes = [ctypes.c_void_p, TextureFilter] + + self.lib.lib3mf_functionfromimage3d_getfilter.restype = ctypes.c_int32 + self.lib.lib3mf_functionfromimage3d_getfilter.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_functionfromimage3d_settilestyles.restype = ctypes.c_int32 + self.lib.lib3mf_functionfromimage3d_settilestyles.argtypes = [ctypes.c_void_p, TextureTileStyle, TextureTileStyle, TextureTileStyle] + + self.lib.lib3mf_functionfromimage3d_gettilestyles.restype = ctypes.c_int32 + self.lib.lib3mf_functionfromimage3d_gettilestyles.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_functionfromimage3d_getoffset.restype = ctypes.c_int32 + self.lib.lib3mf_functionfromimage3d_getoffset.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] + + self.lib.lib3mf_functionfromimage3d_setoffset.restype = ctypes.c_int32 + self.lib.lib3mf_functionfromimage3d_setoffset.argtypes = [ctypes.c_void_p, ctypes.c_double] + + self.lib.lib3mf_functionfromimage3d_getscale.restype = ctypes.c_int32 + self.lib.lib3mf_functionfromimage3d_getscale.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] + + self.lib.lib3mf_functionfromimage3d_setscale.restype = ctypes.c_int32 + self.lib.lib3mf_functionfromimage3d_setscale.argtypes = [ctypes.c_void_p, ctypes.c_double] + + self.lib.lib3mf_builditem_getobjectresource.restype = ctypes.c_int32 + self.lib.lib3mf_builditem_getobjectresource.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_builditem_getuuid.restype = ctypes.c_int32 + self.lib.lib3mf_builditem_getuuid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_builditem_setuuid.restype = ctypes.c_int32 + self.lib.lib3mf_builditem_setuuid.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_builditem_getobjectresourceid.restype = ctypes.c_int32 + self.lib.lib3mf_builditem_getobjectresourceid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_builditem_hasobjecttransform.restype = ctypes.c_int32 + self.lib.lib3mf_builditem_hasobjecttransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + + self.lib.lib3mf_builditem_getobjecttransform.restype = ctypes.c_int32 + self.lib.lib3mf_builditem_getobjecttransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] + + self.lib.lib3mf_builditem_setobjecttransform.restype = ctypes.c_int32 + self.lib.lib3mf_builditem_setobjecttransform.argtypes = [ctypes.c_void_p, ctypes.POINTER(Transform)] + + self.lib.lib3mf_builditem_getpartnumber.restype = ctypes.c_int32 + self.lib.lib3mf_builditem_getpartnumber.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_builditem_setpartnumber.restype = ctypes.c_int32 + self.lib.lib3mf_builditem_setpartnumber.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_builditem_getmetadatagroup.restype = ctypes.c_int32 + self.lib.lib3mf_builditem_getmetadatagroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_builditem_getoutbox.restype = ctypes.c_int32 + self.lib.lib3mf_builditem_getoutbox.argtypes = [ctypes.c_void_p, ctypes.POINTER(Box)] + + self.lib.lib3mf_builditemiterator_movenext.restype = ctypes.c_int32 + self.lib.lib3mf_builditemiterator_movenext.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + + self.lib.lib3mf_builditemiterator_moveprevious.restype = ctypes.c_int32 + self.lib.lib3mf_builditemiterator_moveprevious.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + + self.lib.lib3mf_builditemiterator_getcurrent.restype = ctypes.c_int32 + self.lib.lib3mf_builditemiterator_getcurrent.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_builditemiterator_clone.restype = ctypes.c_int32 + self.lib.lib3mf_builditemiterator_clone.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_builditemiterator_count.restype = ctypes.c_int32 + self.lib.lib3mf_builditemiterator_count.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_slice_setvertices.restype = ctypes.c_int32 + self.lib.lib3mf_slice_setvertices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(Position2D)] + + self.lib.lib3mf_slice_getvertices.restype = ctypes.c_int32 + self.lib.lib3mf_slice_getvertices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(Position2D)] + + self.lib.lib3mf_slice_getvertexcount.restype = ctypes.c_int32 + self.lib.lib3mf_slice_getvertexcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_slice_addpolygon.restype = ctypes.c_int32 + self.lib.lib3mf_slice_addpolygon.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_slice_getpolygoncount.restype = ctypes.c_int32 + self.lib.lib3mf_slice_getpolygoncount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_slice_setpolygonindices.restype = ctypes.c_int32 + self.lib.lib3mf_slice_setpolygonindices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_slice_getpolygonindices.restype = ctypes.c_int32 + self.lib.lib3mf_slice_getpolygonindices.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_slice_getpolygonindexcount.restype = ctypes.c_int32 + self.lib.lib3mf_slice_getpolygonindexcount.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_slice_getztop.restype = ctypes.c_int32 + self.lib.lib3mf_slice_getztop.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] + + self.lib.lib3mf_slicestack_getbottomz.restype = ctypes.c_int32 + self.lib.lib3mf_slicestack_getbottomz.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_double)] + + self.lib.lib3mf_slicestack_getslicecount.restype = ctypes.c_int32 + self.lib.lib3mf_slicestack_getslicecount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_slicestack_getslice.restype = ctypes.c_int32 + self.lib.lib3mf_slicestack_getslice.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_slicestack_addslice.restype = ctypes.c_int32 + self.lib.lib3mf_slicestack_addslice.argtypes = [ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_slicestack_getslicerefcount.restype = ctypes.c_int32 + self.lib.lib3mf_slicestack_getslicerefcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_slicestack_addslicestackreference.restype = ctypes.c_int32 + self.lib.lib3mf_slicestack_addslicestackreference.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_slicestack_getslicestackreference.restype = ctypes.c_int32 + self.lib.lib3mf_slicestack_getslicestackreference.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_slicestack_collapseslicereferences.restype = ctypes.c_int32 + self.lib.lib3mf_slicestack_collapseslicereferences.argtypes = [ctypes.c_void_p] + + self.lib.lib3mf_slicestack_setownpath.restype = ctypes.c_int32 + self.lib.lib3mf_slicestack_setownpath.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_slicestack_getownpath.restype = ctypes.c_int32 + self.lib.lib3mf_slicestack_getownpath.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_consumer_getconsumerid.restype = ctypes.c_int32 + self.lib.lib3mf_consumer_getconsumerid.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_consumer_getkeyid.restype = ctypes.c_int32 + self.lib.lib3mf_consumer_getkeyid.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_consumer_getkeyvalue.restype = ctypes.c_int32 + self.lib.lib3mf_consumer_getkeyvalue.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_accessright_getconsumer.restype = ctypes.c_int32 + self.lib.lib3mf_accessright_getconsumer.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_accessright_getwrappingalgorithm.restype = ctypes.c_int32 + self.lib.lib3mf_accessright_getwrappingalgorithm.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_accessright_getmgfalgorithm.restype = ctypes.c_int32 + self.lib.lib3mf_accessright_getmgfalgorithm.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_accessright_getdigestmethod.restype = ctypes.c_int32 + self.lib.lib3mf_accessright_getdigestmethod.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_contentencryptionparams_getencryptionalgorithm.restype = ctypes.c_int32 + self.lib.lib3mf_contentencryptionparams_getencryptionalgorithm.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_contentencryptionparams_getkey.restype = ctypes.c_int32 + self.lib.lib3mf_contentencryptionparams_getkey.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + + self.lib.lib3mf_contentencryptionparams_getinitializationvector.restype = ctypes.c_int32 + self.lib.lib3mf_contentencryptionparams_getinitializationvector.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + + self.lib.lib3mf_contentencryptionparams_getauthenticationtag.restype = ctypes.c_int32 + self.lib.lib3mf_contentencryptionparams_getauthenticationtag.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + + self.lib.lib3mf_contentencryptionparams_setauthenticationtag.restype = ctypes.c_int32 + self.lib.lib3mf_contentencryptionparams_setauthenticationtag.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8)] + + self.lib.lib3mf_contentencryptionparams_getadditionalauthenticationdata.restype = ctypes.c_int32 + self.lib.lib3mf_contentencryptionparams_getadditionalauthenticationdata.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + + self.lib.lib3mf_contentencryptionparams_getdescriptor.restype = ctypes.c_int32 + self.lib.lib3mf_contentencryptionparams_getdescriptor.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_contentencryptionparams_getkeyuuid.restype = ctypes.c_int32 + self.lib.lib3mf_contentencryptionparams_getkeyuuid.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_resourcedata_getpath.restype = ctypes.c_int32 + self.lib.lib3mf_resourcedata_getpath.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_resourcedata_getencryptionalgorithm.restype = ctypes.c_int32 + self.lib.lib3mf_resourcedata_getencryptionalgorithm.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_resourcedata_getcompression.restype = ctypes.c_int32 + self.lib.lib3mf_resourcedata_getcompression.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_resourcedata_getadditionalauthenticationdata.restype = ctypes.c_int32 + self.lib.lib3mf_resourcedata_getadditionalauthenticationdata.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint8)] + + self.lib.lib3mf_resourcedatagroup_getkeyuuid.restype = ctypes.c_int32 + self.lib.lib3mf_resourcedatagroup_getkeyuuid.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_resourcedatagroup_addaccessright.restype = ctypes.c_int32 + self.lib.lib3mf_resourcedatagroup_addaccessright.argtypes = [ctypes.c_void_p, ctypes.c_void_p, WrappingAlgorithm, MgfAlgorithm, DigestMethod, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_resourcedatagroup_findaccessrightbyconsumer.restype = ctypes.c_int32 + self.lib.lib3mf_resourcedatagroup_findaccessrightbyconsumer.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_resourcedatagroup_removeaccessright.restype = ctypes.c_int32 + self.lib.lib3mf_resourcedatagroup_removeaccessright.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_keystore_addconsumer.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_addconsumer.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_keystore_getconsumercount.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_getconsumercount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_keystore_getconsumer.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_getconsumer.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_keystore_removeconsumer.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_removeconsumer.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_keystore_findconsumer.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_findconsumer.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_keystore_getresourcedatagroupcount.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_getresourcedatagroupcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_keystore_addresourcedatagroup.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_addresourcedatagroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_keystore_getresourcedatagroup.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_getresourcedatagroup.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_keystore_removeresourcedatagroup.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_removeresourcedatagroup.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_keystore_findresourcedatagroup.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_findresourcedatagroup.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_keystore_addresourcedata.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_addresourcedata.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, EncryptionAlgorithm, Compression, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint8), ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_keystore_removeresourcedata.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_removeresourcedata.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_keystore_findresourcedata.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_findresourcedata.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_keystore_getresourcedatacount.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_getresourcedatacount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint64)] + + self.lib.lib3mf_keystore_getresourcedata.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_getresourcedata.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_keystore_getuuid.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_getuuid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_keystore_setuuid.restype = ctypes.c_int32 + self.lib.lib3mf_keystore_setuuid.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_model_rootmodelpart.restype = ctypes.c_int32 + self.lib.lib3mf_model_rootmodelpart.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_findorcreatepackagepart.restype = ctypes.c_int32 + self.lib.lib3mf_model_findorcreatepackagepart.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_setunit.restype = ctypes.c_int32 + self.lib.lib3mf_model_setunit.argtypes = [ctypes.c_void_p, ModelUnit] + + self.lib.lib3mf_model_getunit.restype = ctypes.c_int32 + self.lib.lib3mf_model_getunit.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_model_getlanguage.restype = ctypes.c_int32 + self.lib.lib3mf_model_getlanguage.argtypes = [ctypes.c_void_p, ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_model_setlanguage.restype = ctypes.c_int32 + self.lib.lib3mf_model_setlanguage.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_model_querywriter.restype = ctypes.c_int32 + self.lib.lib3mf_model_querywriter.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_queryreader.restype = ctypes.c_int32 + self.lib.lib3mf_model_queryreader.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getresourcebyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getresourcebyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_gettexture2dbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_gettexture2dbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getpropertytypebyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getpropertytypebyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_int32)] + + self.lib.lib3mf_model_getbasematerialgroupbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getbasematerialgroupbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_gettexture2dgroupbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_gettexture2dgroupbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getcompositematerialsbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getcompositematerialsbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getmultipropertygroupbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getmultipropertygroupbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getmeshobjectbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getmeshobjectbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getcomponentsobjectbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getcomponentsobjectbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getcolorgroupbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getcolorgroupbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getslicestackbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getslicestackbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getlevelsetbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getlevelsetbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getbuilduuid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getbuilduuid.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool), ctypes.c_uint64, ctypes.POINTER(ctypes.c_uint64), ctypes.c_char_p] + + self.lib.lib3mf_model_setbuilduuid.restype = ctypes.c_int32 + self.lib.lib3mf_model_setbuilduuid.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_model_getbuilditems.restype = ctypes.c_int32 + self.lib.lib3mf_model_getbuilditems.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getoutbox.restype = ctypes.c_int32 + self.lib.lib3mf_model_getoutbox.argtypes = [ctypes.c_void_p, ctypes.POINTER(Box)] + + self.lib.lib3mf_model_getresources.restype = ctypes.c_int32 + self.lib.lib3mf_model_getresources.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getobjects.restype = ctypes.c_int32 + self.lib.lib3mf_model_getobjects.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getmeshobjects.restype = ctypes.c_int32 + self.lib.lib3mf_model_getmeshobjects.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getcomponentsobjects.restype = ctypes.c_int32 + self.lib.lib3mf_model_getcomponentsobjects.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_gettexture2ds.restype = ctypes.c_int32 + self.lib.lib3mf_model_gettexture2ds.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getbasematerialgroups.restype = ctypes.c_int32 + self.lib.lib3mf_model_getbasematerialgroups.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getcolorgroups.restype = ctypes.c_int32 + self.lib.lib3mf_model_getcolorgroups.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_gettexture2dgroups.restype = ctypes.c_int32 + self.lib.lib3mf_model_gettexture2dgroups.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getcompositematerials.restype = ctypes.c_int32 + self.lib.lib3mf_model_getcompositematerials.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getmultipropertygroups.restype = ctypes.c_int32 + self.lib.lib3mf_model_getmultipropertygroups.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getslicestacks.restype = ctypes.c_int32 + self.lib.lib3mf_model_getslicestacks.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getimage3ds.restype = ctypes.c_int32 + self.lib.lib3mf_model_getimage3ds.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_mergetomodel.restype = ctypes.c_int32 + self.lib.lib3mf_model_mergetomodel.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_mergefrommodel.restype = ctypes.c_int32 + self.lib.lib3mf_model_mergefrommodel.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_model_addmeshobject.restype = ctypes.c_int32 + self.lib.lib3mf_model_addmeshobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addcomponentsobject.restype = ctypes.c_int32 + self.lib.lib3mf_model_addcomponentsobject.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addslicestack.restype = ctypes.c_int32 + self.lib.lib3mf_model_addslicestack.argtypes = [ctypes.c_void_p, ctypes.c_double, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addtexture2dfromattachment.restype = ctypes.c_int32 + self.lib.lib3mf_model_addtexture2dfromattachment.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addbasematerialgroup.restype = ctypes.c_int32 + self.lib.lib3mf_model_addbasematerialgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addcolorgroup.restype = ctypes.c_int32 + self.lib.lib3mf_model_addcolorgroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addtexture2dgroup.restype = ctypes.c_int32 + self.lib.lib3mf_model_addtexture2dgroup.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addcompositematerials.restype = ctypes.c_int32 + self.lib.lib3mf_model_addcompositematerials.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addmultipropertygroup.restype = ctypes.c_int32 + self.lib.lib3mf_model_addmultipropertygroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addimagestack.restype = ctypes.c_int32 + self.lib.lib3mf_model_addimagestack.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint32, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getimagestackbyid.restype = ctypes.c_int32 + self.lib.lib3mf_model_getimagestackbyid.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addbuilditem.restype = ctypes.c_int32 + self.lib.lib3mf_model_addbuilditem.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(Transform), ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_removebuilditem.restype = ctypes.c_int32 + self.lib.lib3mf_model_removebuilditem.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_model_getmetadatagroup.restype = ctypes.c_int32 + self.lib.lib3mf_model_getmetadatagroup.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addattachment.restype = ctypes.c_int32 + self.lib.lib3mf_model_addattachment.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_removeattachment.restype = ctypes.c_int32 + self.lib.lib3mf_model_removeattachment.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + self.lib.lib3mf_model_getattachment.restype = ctypes.c_int32 + self.lib.lib3mf_model_getattachment.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_findattachment.restype = ctypes.c_int32 + self.lib.lib3mf_model_findattachment.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getattachmentcount.restype = ctypes.c_int32 + self.lib.lib3mf_model_getattachmentcount.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_uint32)] + + self.lib.lib3mf_model_haspackagethumbnailattachment.restype = ctypes.c_int32 + self.lib.lib3mf_model_haspackagethumbnailattachment.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_bool)] + + self.lib.lib3mf_model_createpackagethumbnailattachment.restype = ctypes.c_int32 + self.lib.lib3mf_model_createpackagethumbnailattachment.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getpackagethumbnailattachment.restype = ctypes.c_int32 + self.lib.lib3mf_model_getpackagethumbnailattachment.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_removepackagethumbnailattachment.restype = ctypes.c_int32 + self.lib.lib3mf_model_removepackagethumbnailattachment.argtypes = [ctypes.c_void_p] + + self.lib.lib3mf_model_addcustomcontenttype.restype = ctypes.c_int32 + self.lib.lib3mf_model_addcustomcontenttype.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p] + + self.lib.lib3mf_model_removecustomcontenttype.restype = ctypes.c_int32 + self.lib.lib3mf_model_removecustomcontenttype.argtypes = [ctypes.c_void_p, ctypes.c_char_p] + + self.lib.lib3mf_model_setrandomnumbercallback.restype = ctypes.c_int32 + self.lib.lib3mf_model_setrandomnumbercallback.argtypes = [ctypes.c_void_p, RandomNumberCallback, ctypes.c_void_p] + + self.lib.lib3mf_model_getkeystore.restype = ctypes.c_int32 + self.lib.lib3mf_model_getkeystore.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getfunctions.restype = ctypes.c_int32 + self.lib.lib3mf_model_getfunctions.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addimplicitfunction.restype = ctypes.c_int32 + self.lib.lib3mf_model_addimplicitfunction.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addfunctionfromimage3d.restype = ctypes.c_int32 + self.lib.lib3mf_model_addfunctionfromimage3d.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addvolumedata.restype = ctypes.c_int32 + self.lib.lib3mf_model_addvolumedata.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_addlevelset.restype = ctypes.c_int32 + self.lib.lib3mf_model_addlevelset.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_getlevelsets.restype = ctypes.c_int32 + self.lib.lib3mf_model_getlevelsets.argtypes = [ctypes.c_void_p, ctypes.POINTER(ctypes.c_void_p)] + + self.lib.lib3mf_model_removeresource.restype = ctypes.c_int32 + self.lib.lib3mf_model_removeresource.argtypes = [ctypes.c_void_p, ctypes.c_void_p] + + except AttributeError as ae: + raise ELib3MFException(ErrorCodes.COULDNOTFINDLIBRARYEXPORT, ae.args[0]) + + def _checkBinaryVersion(self): + nMajor, nMinor, _ = self.GetLibraryVersion() + if (nMajor != BindingVersion.MAJOR) or (nMinor < BindingVersion.MINOR): + raise ELib3MFException(ErrorCodes.INCOMPATIBLEBINARYVERSION) + + def checkError(self, instance, errorCode): + if errorCode != ErrorCodes.SUCCESS.value: + if instance: + if instance._wrapper != self: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'invalid wrapper call') + message,_ = self.GetLastError(instance) + raise ELib3MFException(errorCode, message) + + def GetLibraryVersion(self): + pMajor = ctypes.c_uint32() + pMinor = ctypes.c_uint32() + pMicro = ctypes.c_uint32() + self.checkError(None, self.lib.lib3mf_getlibraryversion(pMajor, pMinor, pMicro)) + + return pMajor.value, pMinor.value, pMicro.value + + def GetPrereleaseInformation(self): + pHasPrereleaseInfo = ctypes.c_bool() + nPrereleaseInfoBufferSize = ctypes.c_uint64(0) + nPrereleaseInfoNeededChars = ctypes.c_uint64(0) + pPrereleaseInfoBuffer = ctypes.c_char_p(None) + self.checkError(None, self.lib.lib3mf_getprereleaseinformation(pHasPrereleaseInfo, nPrereleaseInfoBufferSize, nPrereleaseInfoNeededChars, pPrereleaseInfoBuffer)) + nPrereleaseInfoBufferSize = ctypes.c_uint64(nPrereleaseInfoNeededChars.value) + pPrereleaseInfoBuffer = (ctypes.c_char * (nPrereleaseInfoNeededChars.value))() + self.checkError(None, self.lib.lib3mf_getprereleaseinformation(pHasPrereleaseInfo, nPrereleaseInfoBufferSize, nPrereleaseInfoNeededChars, pPrereleaseInfoBuffer)) + + return pHasPrereleaseInfo.value, pPrereleaseInfoBuffer.value.decode() + + def GetBuildInformation(self): + pHasBuildInfo = ctypes.c_bool() + nBuildInformationBufferSize = ctypes.c_uint64(0) + nBuildInformationNeededChars = ctypes.c_uint64(0) + pBuildInformationBuffer = ctypes.c_char_p(None) + self.checkError(None, self.lib.lib3mf_getbuildinformation(pHasBuildInfo, nBuildInformationBufferSize, nBuildInformationNeededChars, pBuildInformationBuffer)) + nBuildInformationBufferSize = ctypes.c_uint64(nBuildInformationNeededChars.value) + pBuildInformationBuffer = (ctypes.c_char * (nBuildInformationNeededChars.value))() + self.checkError(None, self.lib.lib3mf_getbuildinformation(pHasBuildInfo, nBuildInformationBufferSize, nBuildInformationNeededChars, pBuildInformationBuffer)) + + return pHasBuildInfo.value, pBuildInformationBuffer.value.decode() + + def GetSpecificationVersion(self, SpecificationURL): + pSpecificationURL = ctypes.c_char_p(str.encode(SpecificationURL)) + pIsSupported = ctypes.c_bool() + pMajor = ctypes.c_uint32() + pMinor = ctypes.c_uint32() + pMicro = ctypes.c_uint32() + self.checkError(None, self.lib.lib3mf_getspecificationversion(pSpecificationURL, pIsSupported, pMajor, pMinor, pMicro)) + + return pIsSupported.value, pMajor.value, pMinor.value, pMicro.value + + def CreateModel(self): + ModelHandle = ctypes.c_void_p() + self.checkError(None, self.lib.lib3mf_createmodel(ModelHandle)) + if ModelHandle: + ModelObject = self._polymorphicFactory(ModelHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ModelObject + + def Release(self, InstanceObject): + InstanceHandle = None + if InstanceObject: + InstanceHandle = InstanceObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self.checkError(None, self.lib.lib3mf_release(InstanceHandle)) + + + def Acquire(self, InstanceObject): + InstanceHandle = None + if InstanceObject: + InstanceHandle = InstanceObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self.checkError(None, self.lib.lib3mf_acquire(InstanceHandle)) + + + def SetJournal(self, JournalPath): + pJournalPath = ctypes.c_char_p(str.encode(JournalPath)) + self.checkError(None, self.lib.lib3mf_setjournal(pJournalPath)) + + + def GetLastError(self, InstanceObject): + InstanceHandle = None + if InstanceObject: + InstanceHandle = InstanceObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + nLastErrorStringBufferSize = ctypes.c_uint64(0) + nLastErrorStringNeededChars = ctypes.c_uint64(0) + pLastErrorStringBuffer = ctypes.c_char_p(None) + pHasLastError = ctypes.c_bool() + self.checkError(None, self.lib.lib3mf_getlasterror(InstanceHandle, nLastErrorStringBufferSize, nLastErrorStringNeededChars, pLastErrorStringBuffer, pHasLastError)) + nLastErrorStringBufferSize = ctypes.c_uint64(nLastErrorStringNeededChars.value) + pLastErrorStringBuffer = (ctypes.c_char * (nLastErrorStringNeededChars.value))() + self.checkError(None, self.lib.lib3mf_getlasterror(InstanceHandle, nLastErrorStringBufferSize, nLastErrorStringNeededChars, pLastErrorStringBuffer, pHasLastError)) + + return pLastErrorStringBuffer.value.decode(), pHasLastError.value + + def GetSymbolLookupMethod(self): + pSymbolLookupMethod = ctypes.c_void_p() + self.checkError(None, self.lib.lib3mf_getsymbollookupmethod(pSymbolLookupMethod)) + + return pSymbolLookupMethod.value + + def RetrieveProgressMessage(self, TheProgressIdentifier): + nProgressMessageBufferSize = ctypes.c_uint64(0) + nProgressMessageNeededChars = ctypes.c_uint64(0) + pProgressMessageBuffer = ctypes.c_char_p(None) + self.checkError(None, self.lib.lib3mf_retrieveprogressmessage(TheProgressIdentifier, nProgressMessageBufferSize, nProgressMessageNeededChars, pProgressMessageBuffer)) + nProgressMessageBufferSize = ctypes.c_uint64(nProgressMessageNeededChars.value) + pProgressMessageBuffer = (ctypes.c_char * (nProgressMessageNeededChars.value))() + self.checkError(None, self.lib.lib3mf_retrieveprogressmessage(TheProgressIdentifier, nProgressMessageBufferSize, nProgressMessageNeededChars, pProgressMessageBuffer)) + + return pProgressMessageBuffer.value.decode() + + def RGBAToColor(self, Red, Green, Blue, Alpha): + nRed = ctypes.c_uint8(Red) + nGreen = ctypes.c_uint8(Green) + nBlue = ctypes.c_uint8(Blue) + nAlpha = ctypes.c_uint8(Alpha) + pTheColor = Color() + self.checkError(None, self.lib.lib3mf_rgbatocolor(nRed, nGreen, nBlue, nAlpha, pTheColor)) + + return pTheColor + + def FloatRGBAToColor(self, Red, Green, Blue, Alpha): + fRed = ctypes.c_float(Red) + fGreen = ctypes.c_float(Green) + fBlue = ctypes.c_float(Blue) + fAlpha = ctypes.c_float(Alpha) + pTheColor = Color() + self.checkError(None, self.lib.lib3mf_floatrgbatocolor(fRed, fGreen, fBlue, fAlpha, pTheColor)) + + return pTheColor + + def ColorToRGBA(self, TheColor): + pRed = ctypes.c_uint8() + pGreen = ctypes.c_uint8() + pBlue = ctypes.c_uint8() + pAlpha = ctypes.c_uint8() + self.checkError(None, self.lib.lib3mf_colortorgba(TheColor, pRed, pGreen, pBlue, pAlpha)) + + return pRed.value, pGreen.value, pBlue.value, pAlpha.value + + def ColorToFloatRGBA(self, TheColor): + pRed = ctypes.c_float() + pGreen = ctypes.c_float() + pBlue = ctypes.c_float() + pAlpha = ctypes.c_float() + self.checkError(None, self.lib.lib3mf_colortofloatrgba(TheColor, pRed, pGreen, pBlue, pAlpha)) + + return pRed.value, pGreen.value, pBlue.value, pAlpha.value + + def GetIdentityTransform(self): + pTransform = Transform() + self.checkError(None, self.lib.lib3mf_getidentitytransform(pTransform)) + + return pTransform + + def GetUniformScaleTransform(self, Factor): + fFactor = ctypes.c_float(Factor) + pTransform = Transform() + self.checkError(None, self.lib.lib3mf_getuniformscaletransform(fFactor, pTransform)) + + return pTransform + + def GetScaleTransform(self, FactorX, FactorY, FactorZ): + fFactorX = ctypes.c_float(FactorX) + fFactorY = ctypes.c_float(FactorY) + fFactorZ = ctypes.c_float(FactorZ) + pTransform = Transform() + self.checkError(None, self.lib.lib3mf_getscaletransform(fFactorX, fFactorY, fFactorZ, pTransform)) + + return pTransform + + def GetTranslationTransform(self, VectorX, VectorY, VectorZ): + fVectorX = ctypes.c_float(VectorX) + fVectorY = ctypes.c_float(VectorY) + fVectorZ = ctypes.c_float(VectorZ) + pTransform = Transform() + self.checkError(None, self.lib.lib3mf_gettranslationtransform(fVectorX, fVectorY, fVectorZ, pTransform)) + + return pTransform + + '''IMPORTANT: PolymorphicFactory method should not be used by application directly. + It's designed to be used on Lib3MFHandle object only once. + If it's used on any existing object as a form of dynamic cast then + Wrapper.AcquireInstance(object) must be called after instantiating new object. + This is important to keep reference count matching between application and library sides. + ''' + def _polymorphicFactory(self, handle): + class PolymorphicFactory(): + def getObjectById(self, classtypeid, handle, wrapper): + methodName = 'getObjectById_' + format(classtypeid.value, '016X') + method = getattr(self, methodName, lambda: 'Invalid class type id') + return method(handle, wrapper) + def getObjectById_856632D0BAF1D8B7(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Base" + return Base(handle, wrapper) + def getObjectById_E76F642F363FD7E9(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Writer" + return Writer(handle, wrapper) + def getObjectById_2D86831DA59FBE72(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Reader" + return Reader(handle, wrapper) + def getObjectById_0E55A826D377483E(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::PackagePart" + return PackagePart(handle, wrapper) + def getObjectById_DFE3889D1B269CBB(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Resource" + return Resource(handle, wrapper) + def getObjectById_460F3515E2621DBE(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ResourceIterator" + return ResourceIterator(handle, wrapper) + def getObjectById_69684DB99FA813F6(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::SliceStackIterator" + return SliceStackIterator(handle, wrapper) + def getObjectById_DE92510BD2112288(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ObjectIterator" + return ObjectIterator(handle, wrapper) + def getObjectById_F4196034E2B9FDE6(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MeshObjectIterator" + return MeshObjectIterator(handle, wrapper) + def getObjectById_564DE4217ED7614A(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObjectIterator" + return ComponentsObjectIterator(handle, wrapper) + def getObjectById_4BD32B4870FFC03B(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Texture2DIterator" + return Texture2DIterator(handle, wrapper) + def getObjectById_65E6EDD9362C79CB(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroupIterator" + return BaseMaterialGroupIterator(handle, wrapper) + def getObjectById_10274A1757C729C0(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ColorGroupIterator" + return ColorGroupIterator(handle, wrapper) + def getObjectById_30D55F4DB88FE0CA(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroupIterator" + return Texture2DGroupIterator(handle, wrapper) + def getObjectById_A99CC6C3F70FB6F9(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterialsIterator" + return CompositeMaterialsIterator(handle, wrapper) + def getObjectById_C2BDF5D8CBBDB1F0(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" + return MultiPropertyGroupIterator(handle, wrapper) + def getObjectById_C4B8EC00A82BF336(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" + return Image3DIterator(handle, wrapper) + def getObjectById_40E9035363ACE65E(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" + return FunctionIterator(handle, wrapper) + def getObjectById_A0C005C035D5371D(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + return LevelSetIterator(handle, wrapper) + def getObjectById_D17716D063DE2C22(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MetaData" + return MetaData(handle, wrapper) + def getObjectById_0C3B85369E9B25D3(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" + return MetaDataGroup(handle, wrapper) + def getObjectById_2DA2136F577A779C(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Object" + return Object(handle, wrapper) + def getObjectById_3B3A6DC6EC610497(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" + return MeshObject(handle, wrapper) + def getObjectById_E8A7D9C192EFD0E2(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + return LevelSet(handle, wrapper) + def getObjectById_63B3B461B30B4BA5(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" + return BeamLattice(handle, wrapper) + def getObjectById_4DF17E76926221C2(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" + return FunctionReference(handle, wrapper) + def getObjectById_D85B5B6143E787E3(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" + return VolumeDataColor(handle, wrapper) + def getObjectById_241FE6B4817C3FE4(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MaterialMapping" + return MaterialMapping(handle, wrapper) + def getObjectById_46F1DAC40581B304(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataComposite" + return VolumeDataComposite(handle, wrapper) + def getObjectById_FC368AA44ACE42DA(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataProperty" + return VolumeDataProperty(handle, wrapper) + def getObjectById_9200586FB91587A7(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::VolumeData" + return VolumeData(handle, wrapper) + def getObjectById_4ECDB6A6F69F2BEB(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Component" + return Component(handle, wrapper) + def getObjectById_6522CF04EB283FED(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" + return ComponentsObject(handle, wrapper) + def getObjectById_30CCDBE90E00B55B(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" + return BeamSet(handle, wrapper) + def getObjectById_B27D4656E16609FA(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroup" + return BaseMaterialGroup(handle, wrapper) + def getObjectById_D085FB2E49CDB5B1(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ColorGroup" + return ColorGroup(handle, wrapper) + def getObjectById_BC1208397E37055D(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroup" + return Texture2DGroup(handle, wrapper) + def getObjectById_CE16224D688B86F2(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" + return CompositeMaterials(handle, wrapper) + def getObjectById_B989E02E43158FE6(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" + return MultiPropertyGroup(handle, wrapper) + def getObjectById_BD938FF2D2663D61(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Image3D" + return Image3D(handle, wrapper) + def getObjectById_13A2561F0CFB712A(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ImageStack" + return ImageStack(handle, wrapper) + def getObjectById_8CE7A1191A63A35D(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Attachment" + return Attachment(handle, wrapper) + def getObjectById_E0441CF976B36319(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" + return Texture2D(handle, wrapper) + def getObjectById_D5C49B04AF1963CD(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPort" + return ImplicitPort(handle, wrapper) + def getObjectById_52F06268CD098EFE(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Iterator" + return Iterator(handle, wrapper) + def getObjectById_C62268F2D7C7012C(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPortIterator" + return ImplicitPortIterator(handle, wrapper) + def getObjectById_E72592A7725AB29B(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ImplicitNode" + return ImplicitNode(handle, wrapper) + def getObjectById_B19B9FDA94B0A5E7(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::OneInputNode" + return OneInputNode(handle, wrapper) + def getObjectById_D5AEA50A56306722(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::SinNode" + return SinNode(handle, wrapper) + def getObjectById_59BC328F6FB5C5FF(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::CosNode" + return CosNode(handle, wrapper) + def getObjectById_2614CC572AF350B7(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::TanNode" + return TanNode(handle, wrapper) + def getObjectById_E554C8A7E72AAF4D(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ArcSinNode" + return ArcSinNode(handle, wrapper) + def getObjectById_943AF6AE0EFD2B8A(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ArcCosNode" + return ArcCosNode(handle, wrapper) + def getObjectById_E47D547615816BAD(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ArcTanNode" + return ArcTanNode(handle, wrapper) + def getObjectById_3C7756A456F2D089(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::SinhNode" + return SinhNode(handle, wrapper) + def getObjectById_4A993F91E1DE256D(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::CoshNode" + return CoshNode(handle, wrapper) + def getObjectById_CF077B19B0B78E9D(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::TanhNode" + return TanhNode(handle, wrapper) + def getObjectById_D9F5A53C657765AE(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::RoundNode" + return RoundNode(handle, wrapper) + def getObjectById_627E211653E11D93(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::CeilNode" + return CeilNode(handle, wrapper) + def getObjectById_392A0F4C041D249C(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::FloorNode" + return FloorNode(handle, wrapper) + def getObjectById_8A45165E6C9646D7(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::SignNode" + return SignNode(handle, wrapper) + def getObjectById_53E62FD67F4D9A65(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::FractNode" + return FractNode(handle, wrapper) + def getObjectById_6B641C7060040BE3(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::AbsNode" + return AbsNode(handle, wrapper) + def getObjectById_3390243A8E2410F3(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ExpNode" + return ExpNode(handle, wrapper) + def getObjectById_0070021D73AA89FD(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::LogNode" + return LogNode(handle, wrapper) + def getObjectById_E8C0ABF7C5DC7068(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Log2Node" + return Log2Node(handle, wrapper) + def getObjectById_87740AD53454E0DF(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Log10Node" + return Log10Node(handle, wrapper) + def getObjectById_D85889E2739A74B1(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::LengthNode" + return LengthNode(handle, wrapper) + def getObjectById_A808B7599C158CE6(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::TransposeNode" + return TransposeNode(handle, wrapper) + def getObjectById_E8601F66A23A0540(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::InverseNode" + return InverseNode(handle, wrapper) + def getObjectById_9F831944A3DE31DA(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::SqrtNode" + return SqrtNode(handle, wrapper) + def getObjectById_CA86A77C71CD3FAE(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ResourceIdNode" + return ResourceIdNode(handle, wrapper) + def getObjectById_7DE3951BA4C1064C(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::TwoInputNode" + return TwoInputNode(handle, wrapper) + def getObjectById_57A2236998DF5248(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::AdditionNode" + return AdditionNode(handle, wrapper) + def getObjectById_6079B12FFF345D02(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::SubtractionNode" + return SubtractionNode(handle, wrapper) + def getObjectById_A3C27CF54C2AA76C(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MultiplicationNode" + return MultiplicationNode(handle, wrapper) + def getObjectById_B896B6413C08CF39(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::DivisionNode" + return DivisionNode(handle, wrapper) + def getObjectById_FE60932A66375FAD(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::DotNode" + return DotNode(handle, wrapper) + def getObjectById_106182D38CA5CFE3(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::CrossNode" + return CrossNode(handle, wrapper) + def getObjectById_B6153EF5DE7E5E11(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ArcTan2Node" + return ArcTan2Node(handle, wrapper) + def getObjectById_7570C43B9721D0C0(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MatVecMultiplicationNode" + return MatVecMultiplicationNode(handle, wrapper) + def getObjectById_846AFDE9A091E997(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MinNode" + return MinNode(handle, wrapper) + def getObjectById_073F910381BF250D(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MaxNode" + return MaxNode(handle, wrapper) + def getObjectById_1EF703D298223F2A(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::FmodNode" + return FmodNode(handle, wrapper) + def getObjectById_EA57335849379F22(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ModNode" + return ModNode(handle, wrapper) + def getObjectById_7700AA17CA1AC0F8(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::PowNode" + return PowNode(handle, wrapper) + def getObjectById_1127ED71E05A9BD4(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::SelectNode" + return SelectNode(handle, wrapper) + def getObjectById_77AF68C971B1485F(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ClampNode" + return ClampNode(handle, wrapper) + def getObjectById_49C24B8840C01F7E(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ComposeVectorNode" + return ComposeVectorNode(handle, wrapper) + def getObjectById_2E417B93351375E2(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::VectorFromScalarNode" + return VectorFromScalarNode(handle, wrapper) + def getObjectById_CC4F8D561CCE35D4(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::DecomposeVectorNode" + return DecomposeVectorNode(handle, wrapper) + def getObjectById_9EF9EB54A53AA40D(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ComposeMatrixNode" + return ComposeMatrixNode(handle, wrapper) + def getObjectById_D6DFD0A7EB64AC33(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromRowsNode" + return MatrixFromRowsNode(handle, wrapper) + def getObjectById_0DCBEAFCF83F3AAC(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromColumnsNode" + return MatrixFromColumnsNode(handle, wrapper) + def getObjectById_3F8E5D082F966B1B(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ConstantNode" + return ConstantNode(handle, wrapper) + def getObjectById_9C9363B3F708D556(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ConstVecNode" + return ConstVecNode(handle, wrapper) + def getObjectById_F85C90EDCE6F90A4(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" + return ConstMatNode(handle, wrapper) + def getObjectById_53601FD432E3DEF4(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" + return MeshNode(handle, wrapper) + def getObjectById_29985A628251A9CD(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + return UnsignedMeshNode(handle, wrapper) + def getObjectById_0765C17C952F24E3(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" + return FunctionCallNode(handle, wrapper) + def getObjectById_FC006BC888CAB4D0(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" + return NodeIterator(handle, wrapper) + def getObjectById_9EFB2757CA1A5231(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Function" + return Function(handle, wrapper) + def getObjectById_6CE54469EEA83BC1(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ImplicitFunction" + return ImplicitFunction(handle, wrapper) + def getObjectById_9BD7D3C2026B8CE8(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::FunctionFromImage3D" + return FunctionFromImage3D(handle, wrapper) + def getObjectById_68FB2D5FFC4BA12A(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BuildItem" + return BuildItem(handle, wrapper) + def getObjectById_A7D21BD364910860(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BuildItemIterator" + return BuildItemIterator(handle, wrapper) + def getObjectById_2198BCF4D8DF9C40(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Slice" + return Slice(handle, wrapper) + def getObjectById_6594B031B6096238(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::SliceStack" + return SliceStack(handle, wrapper) + def getObjectById_D9E46D5E6D8118EE(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Consumer" + return Consumer(handle, wrapper) + def getObjectById_385C42FC5609498A(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::AccessRight" + return AccessRight(handle, wrapper) + def getObjectById_7FB36B91D4CE4671(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ContentEncryptionParams" + return ContentEncryptionParams(handle, wrapper) + def getObjectById_1A47A5E258E22EF9(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ResourceData" + return ResourceData(handle, wrapper) + def getObjectById_D59067227E428AA4(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ResourceDataGroup" + return ResourceDataGroup(handle, wrapper) + def getObjectById_1CC9E0CC082253C6(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::KeyStore" + return KeyStore(handle, wrapper) + def getObjectById_5A8164ECEDB03F09(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Model" + return Model(handle, wrapper) + + if not handle: + return None + pClassTypeId = ctypes.c_uint64() + self.checkError(None, self.lib.lib3mf_base_classtypeid(handle, pClassTypeId)) + factory = PolymorphicFactory() + return factory.getObjectById(pClassTypeId, handle, self) + + + +''' Class Implementation for Base +''' +class Base: + def __init__(self, handle, wrapper): + if not handle or not wrapper: + raise ELib3MFException(ErrorCodes.INVALIDPARAM) + self._handle = handle + self._wrapper = wrapper + + def __del__(self): + self._wrapper.Release(self) + def ClassTypeId(self): + pClassTypeId = ctypes.c_uint64() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_base_classtypeid(self._handle, pClassTypeId)) + + return pClassTypeId.value + + + +''' Class Implementation for Writer +''' +class Writer(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def WriteToFile(self, Filename): + pFilename = ctypes.c_char_p(str.encode(Filename)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_writetofile(self._handle, pFilename)) + + + def GetStreamSize(self): + pStreamSize = ctypes.c_uint64() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getstreamsize(self._handle, pStreamSize)) + + return pStreamSize.value + + def WriteToBuffer(self): + nBufferCount = ctypes.c_uint64(0) + nBufferNeededCount = ctypes.c_uint64(0) + pBufferBuffer = (ctypes.c_uint8*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) + nBufferCount = ctypes.c_uint64(nBufferNeededCount.value) + pBufferBuffer = (ctypes.c_uint8 * nBufferNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) + + return [pBufferBuffer[i] for i in range(nBufferNeededCount.value)] + + def WriteToCallback(self, TheWriteCallbackFunc, TheSeekCallbackFunc, UserData): + pUserData = ctypes.c_void_p(UserData) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_writetocallback(self._handle, TheWriteCallbackFunc, TheSeekCallbackFunc, pUserData)) + + + def SetProgressCallback(self, ProgressCallbackFunc, UserData): + pUserData = ctypes.c_void_p(UserData) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_setprogresscallback(self._handle, ProgressCallbackFunc, pUserData)) + + + def GetDecimalPrecision(self): + pDecimalPrecision = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getdecimalprecision(self._handle, pDecimalPrecision)) + + return pDecimalPrecision.value + + def SetDecimalPrecision(self, DecimalPrecision): + nDecimalPrecision = ctypes.c_uint32(DecimalPrecision) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_setdecimalprecision(self._handle, nDecimalPrecision)) + + + def SetStrictModeActive(self, StrictModeActive): + bStrictModeActive = ctypes.c_bool(StrictModeActive) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_setstrictmodeactive(self._handle, bStrictModeActive)) + + + def GetStrictModeActive(self): + pStrictModeActive = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getstrictmodeactive(self._handle, pStrictModeActive)) + + return pStrictModeActive.value + + def GetWarning(self, Index): + nIndex = ctypes.c_uint32(Index) + pErrorCode = ctypes.c_uint32() + nWarningBufferSize = ctypes.c_uint64(0) + nWarningNeededChars = ctypes.c_uint64(0) + pWarningBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getwarning(self._handle, nIndex, pErrorCode, nWarningBufferSize, nWarningNeededChars, pWarningBuffer)) + nWarningBufferSize = ctypes.c_uint64(nWarningNeededChars.value) + pWarningBuffer = (ctypes.c_char * (nWarningNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getwarning(self._handle, nIndex, pErrorCode, nWarningBufferSize, nWarningNeededChars, pWarningBuffer)) + + return pErrorCode.value, pWarningBuffer.value.decode() + + def GetWarningCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getwarningcount(self._handle, pCount)) + + return pCount.value + + def AddKeyWrappingCallback(self, ConsumerID, TheCallbackFunc, UserData): + pConsumerID = ctypes.c_char_p(str.encode(ConsumerID)) + pUserData = ctypes.c_void_p(UserData) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_addkeywrappingcallback(self._handle, pConsumerID, TheCallbackFunc, pUserData)) + + + def SetContentEncryptionCallback(self, TheCallbackFunc, UserData): + pUserData = ctypes.c_void_p(UserData) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_setcontentencryptioncallback(self._handle, TheCallbackFunc, pUserData)) + + + + +''' Class Implementation for Reader +''' +class Reader(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def ReadFromFile(self, Filename): + pFilename = ctypes.c_char_p(str.encode(Filename)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_readfromfile(self._handle, pFilename)) + + + def ReadFromBuffer(self, Buffer): + nBufferCount = ctypes.c_uint64(len(Buffer)) + pBufferBuffer = (ctypes.c_uint8*len(Buffer))(*Buffer) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_readfrombuffer(self._handle, nBufferCount, pBufferBuffer)) + + + def ReadFromCallback(self, TheReadCallbackFunc, StreamSize, TheSeekCallbackFunc, UserData): + nStreamSize = ctypes.c_uint64(StreamSize) + pUserData = ctypes.c_void_p(UserData) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_readfromcallback(self._handle, TheReadCallbackFunc, nStreamSize, TheSeekCallbackFunc, pUserData)) + + + def SetProgressCallback(self, ProgressCallbackFunc, UserData): + pUserData = ctypes.c_void_p(UserData) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_setprogresscallback(self._handle, ProgressCallbackFunc, pUserData)) + + + def AddRelationToRead(self, RelationShipType): + pRelationShipType = ctypes.c_char_p(str.encode(RelationShipType)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_addrelationtoread(self._handle, pRelationShipType)) + + + def RemoveRelationToRead(self, RelationShipType): + pRelationShipType = ctypes.c_char_p(str.encode(RelationShipType)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_removerelationtoread(self._handle, pRelationShipType)) + + + def SetStrictModeActive(self, StrictModeActive): + bStrictModeActive = ctypes.c_bool(StrictModeActive) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_setstrictmodeactive(self._handle, bStrictModeActive)) + + + def GetStrictModeActive(self): + pStrictModeActive = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_getstrictmodeactive(self._handle, pStrictModeActive)) + + return pStrictModeActive.value + + def GetWarning(self, Index): + nIndex = ctypes.c_uint32(Index) + pErrorCode = ctypes.c_uint32() + nWarningBufferSize = ctypes.c_uint64(0) + nWarningNeededChars = ctypes.c_uint64(0) + pWarningBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_getwarning(self._handle, nIndex, pErrorCode, nWarningBufferSize, nWarningNeededChars, pWarningBuffer)) + nWarningBufferSize = ctypes.c_uint64(nWarningNeededChars.value) + pWarningBuffer = (ctypes.c_char * (nWarningNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_getwarning(self._handle, nIndex, pErrorCode, nWarningBufferSize, nWarningNeededChars, pWarningBuffer)) + + return pErrorCode.value, pWarningBuffer.value.decode() + + def GetWarningCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_getwarningcount(self._handle, pCount)) + + return pCount.value + + def AddKeyWrappingCallback(self, ConsumerID, TheCallbackFunc, UserData): + pConsumerID = ctypes.c_char_p(str.encode(ConsumerID)) + pUserData = ctypes.c_void_p(UserData) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_addkeywrappingcallback(self._handle, pConsumerID, TheCallbackFunc, pUserData)) + + + def SetContentEncryptionCallback(self, TheCallbackFunc, UserData): + pUserData = ctypes.c_void_p(UserData) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_setcontentencryptioncallback(self._handle, TheCallbackFunc, pUserData)) + + + + +''' Class Implementation for PackagePart +''' +class PackagePart(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def GetPath(self): + nPathBufferSize = ctypes.c_uint64(0) + nPathNeededChars = ctypes.c_uint64(0) + pPathBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_packagepart_getpath(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) + nPathBufferSize = ctypes.c_uint64(nPathNeededChars.value) + pPathBuffer = (ctypes.c_char * (nPathNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_packagepart_getpath(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) + + return pPathBuffer.value.decode() + + def SetPath(self, Path): + pPath = ctypes.c_char_p(str.encode(Path)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_packagepart_setpath(self._handle, pPath)) + + + + +''' Class Implementation for Resource +''' +class Resource(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def GetResourceID(self): + pUniqueResourceID = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resource_getresourceid(self._handle, pUniqueResourceID)) + + return pUniqueResourceID.value + + def GetUniqueResourceID(self): + pUniqueResourceID = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resource_getuniqueresourceid(self._handle, pUniqueResourceID)) + + return pUniqueResourceID.value + + def PackagePart(self): + PackagePartHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resource_packagepart(self._handle, PackagePartHandle)) + if PackagePartHandle: + PackagePartObject = self._wrapper._polymorphicFactory(PackagePartHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return PackagePartObject + + def SetPackagePart(self, PackagePartObject): + PackagePartHandle = None + if PackagePartObject: + PackagePartHandle = PackagePartObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resource_setpackagepart(self._handle, PackagePartHandle)) + + + def GetModelResourceID(self): + pModelResourceId = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resource_getmodelresourceid(self._handle, pModelResourceId)) + + return pModelResourceId.value + + + +''' Class Implementation for ResourceIterator +''' +class ResourceIterator(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def MoveNext(self): + pHasNext = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceiterator_movenext(self._handle, pHasNext)) + + return pHasNext.value + + def MovePrevious(self): + pHasPrevious = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceiterator_moveprevious(self._handle, pHasPrevious)) + + return pHasPrevious.value + + def GetCurrent(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceiterator_getcurrent(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + def Clone(self): + OutResourceIteratorHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceiterator_clone(self._handle, OutResourceIteratorHandle)) + if OutResourceIteratorHandle: + OutResourceIteratorObject = self._wrapper._polymorphicFactory(OutResourceIteratorHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return OutResourceIteratorObject + + def Count(self): + pCount = ctypes.c_uint64() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceiterator_count(self._handle, pCount)) + + return pCount.value + + + +''' Class Implementation for SliceStackIterator +''' +class SliceStackIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentSliceStack(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_slicestackiterator_getcurrentslicestack(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for ObjectIterator +''' +class ObjectIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentObject(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_objectiterator_getcurrentobject(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for MeshObjectIterator +''' +class MeshObjectIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentMeshObject(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobjectiterator_getcurrentmeshobject(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for ComponentsObjectIterator +''' +class ComponentsObjectIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentComponentsObject(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_componentsobjectiterator_getcurrentcomponentsobject(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for Texture2DIterator +''' +class Texture2DIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentTexture2D(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2diterator_getcurrenttexture2d(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for BaseMaterialGroupIterator +''' +class BaseMaterialGroupIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentBaseMaterialGroup(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for ColorGroupIterator +''' +class ColorGroupIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentColorGroup(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroupiterator_getcurrentcolorgroup(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for Texture2DGroupIterator +''' +class Texture2DGroupIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentTexture2DGroup(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for CompositeMaterialsIterator +''' +class CompositeMaterialsIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentCompositeMaterials(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerialsiterator_getcurrentcompositematerials(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for MultiPropertyGroupIterator +''' +class MultiPropertyGroupIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentMultiPropertyGroup(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for Image3DIterator +''' +class Image3DIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentImage3D(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_image3diterator_getcurrentimage3d(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for FunctionIterator +''' +class FunctionIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentFunction(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functioniterator_getcurrentfunction(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for LevelSetIterator +''' +class LevelSetIterator(ResourceIterator): + def __init__(self, handle, wrapper): + ResourceIterator.__init__(self, handle, wrapper) + def GetCurrentLevelSet(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelsetiterator_getcurrentlevelset(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceObject + + + +''' Class Implementation for MetaData +''' +class MetaData(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def GetNameSpace(self): + nNameSpaceBufferSize = ctypes.c_uint64(0) + nNameSpaceNeededChars = ctypes.c_uint64(0) + pNameSpaceBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getnamespace(self._handle, nNameSpaceBufferSize, nNameSpaceNeededChars, pNameSpaceBuffer)) + nNameSpaceBufferSize = ctypes.c_uint64(nNameSpaceNeededChars.value) + pNameSpaceBuffer = (ctypes.c_char * (nNameSpaceNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getnamespace(self._handle, nNameSpaceBufferSize, nNameSpaceNeededChars, pNameSpaceBuffer)) + + return pNameSpaceBuffer.value.decode() + + def SetNameSpace(self, NameSpace): + pNameSpace = ctypes.c_char_p(str.encode(NameSpace)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_setnamespace(self._handle, pNameSpace)) + + + def GetName(self): + nNameBufferSize = ctypes.c_uint64(0) + nNameNeededChars = ctypes.c_uint64(0) + pNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) + nNameBufferSize = ctypes.c_uint64(nNameNeededChars.value) + pNameBuffer = (ctypes.c_char * (nNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) + + return pNameBuffer.value.decode() + + def SetName(self, Name): + pName = ctypes.c_char_p(str.encode(Name)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_setname(self._handle, pName)) + + + def GetKey(self): + nKeyBufferSize = ctypes.c_uint64(0) + nKeyNeededChars = ctypes.c_uint64(0) + pKeyBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getkey(self._handle, nKeyBufferSize, nKeyNeededChars, pKeyBuffer)) + nKeyBufferSize = ctypes.c_uint64(nKeyNeededChars.value) + pKeyBuffer = (ctypes.c_char * (nKeyNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getkey(self._handle, nKeyBufferSize, nKeyNeededChars, pKeyBuffer)) + + return pKeyBuffer.value.decode() + + def GetMustPreserve(self): + pMustPreserve = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getmustpreserve(self._handle, pMustPreserve)) + + return pMustPreserve.value + + def SetMustPreserve(self, MustPreserve): + bMustPreserve = ctypes.c_bool(MustPreserve) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_setmustpreserve(self._handle, bMustPreserve)) + + + def GetType(self): + nTypeBufferSize = ctypes.c_uint64(0) + nTypeNeededChars = ctypes.c_uint64(0) + pTypeBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_gettype(self._handle, nTypeBufferSize, nTypeNeededChars, pTypeBuffer)) + nTypeBufferSize = ctypes.c_uint64(nTypeNeededChars.value) + pTypeBuffer = (ctypes.c_char * (nTypeNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_gettype(self._handle, nTypeBufferSize, nTypeNeededChars, pTypeBuffer)) + + return pTypeBuffer.value.decode() + + def SetType(self, Type): + pType = ctypes.c_char_p(str.encode(Type)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_settype(self._handle, pType)) + + + def GetValue(self): + nValueBufferSize = ctypes.c_uint64(0) + nValueNeededChars = ctypes.c_uint64(0) + pValueBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getvalue(self._handle, nValueBufferSize, nValueNeededChars, pValueBuffer)) + nValueBufferSize = ctypes.c_uint64(nValueNeededChars.value) + pValueBuffer = (ctypes.c_char * (nValueNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getvalue(self._handle, nValueBufferSize, nValueNeededChars, pValueBuffer)) + + return pValueBuffer.value.decode() + + def SetValue(self, Value): + pValue = ctypes.c_char_p(str.encode(Value)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_setvalue(self._handle, pValue)) + + + + +''' Class Implementation for MetaDataGroup +''' +class MetaDataGroup(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def GetMetaDataCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_getmetadatacount(self._handle, pCount)) + + return pCount.value + + def GetMetaData(self, Index): + nIndex = ctypes.c_uint32(Index) + MetaDataHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_getmetadata(self._handle, nIndex, MetaDataHandle)) + if MetaDataHandle: + MetaDataObject = self._wrapper._polymorphicFactory(MetaDataHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return MetaDataObject + + def GetMetaDataByKey(self, NameSpace, Name): + pNameSpace = ctypes.c_char_p(str.encode(NameSpace)) + pName = ctypes.c_char_p(str.encode(Name)) + MetaDataHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_getmetadatabykey(self._handle, pNameSpace, pName, MetaDataHandle)) + if MetaDataHandle: + MetaDataObject = self._wrapper._polymorphicFactory(MetaDataHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return MetaDataObject + + def RemoveMetaDataByIndex(self, Index): + nIndex = ctypes.c_uint32(Index) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_removemetadatabyindex(self._handle, nIndex)) + + + def RemoveMetaData(self, TheMetaDataObject): + TheMetaDataHandle = None + if TheMetaDataObject: + TheMetaDataHandle = TheMetaDataObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_removemetadata(self._handle, TheMetaDataHandle)) + + + def AddMetaData(self, NameSpace, Name, Value, Type, MustPreserve): + pNameSpace = ctypes.c_char_p(str.encode(NameSpace)) + pName = ctypes.c_char_p(str.encode(Name)) + pValue = ctypes.c_char_p(str.encode(Value)) + pType = ctypes.c_char_p(str.encode(Type)) + bMustPreserve = ctypes.c_bool(MustPreserve) + MetaDataHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_addmetadata(self._handle, pNameSpace, pName, pValue, pType, bMustPreserve, MetaDataHandle)) + if MetaDataHandle: + MetaDataObject = self._wrapper._polymorphicFactory(MetaDataHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return MetaDataObject + + + +''' Class Implementation for Object +''' +class Object(Resource): + def __init__(self, handle, wrapper): + Resource.__init__(self, handle, wrapper) + def GetType(self): + pObjectType = ctypes.c_int32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_gettype(self._handle, pObjectType)) + + return ObjectType(pObjectType.value) + + def SetType(self, ObjectType): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_settype(self._handle, ObjectType)) + + + def GetName(self): + nNameBufferSize = ctypes.c_uint64(0) + nNameNeededChars = ctypes.c_uint64(0) + pNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) + nNameBufferSize = ctypes.c_uint64(nNameNeededChars.value) + pNameBuffer = (ctypes.c_char * (nNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) + + return pNameBuffer.value.decode() + + def SetName(self, Name): + pName = ctypes.c_char_p(str.encode(Name)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_setname(self._handle, pName)) + + + def GetPartNumber(self): + nPartNumberBufferSize = ctypes.c_uint64(0) + nPartNumberNeededChars = ctypes.c_uint64(0) + pPartNumberBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getpartnumber(self._handle, nPartNumberBufferSize, nPartNumberNeededChars, pPartNumberBuffer)) + nPartNumberBufferSize = ctypes.c_uint64(nPartNumberNeededChars.value) + pPartNumberBuffer = (ctypes.c_char * (nPartNumberNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getpartnumber(self._handle, nPartNumberBufferSize, nPartNumberNeededChars, pPartNumberBuffer)) + + return pPartNumberBuffer.value.decode() + + def SetPartNumber(self, PartNumber): + pPartNumber = ctypes.c_char_p(str.encode(PartNumber)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_setpartnumber(self._handle, pPartNumber)) + + + def IsMeshObject(self): + pIsMeshObject = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_ismeshobject(self._handle, pIsMeshObject)) + + return pIsMeshObject.value + + def IsComponentsObject(self): + pIsComponentsObject = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_iscomponentsobject(self._handle, pIsComponentsObject)) + + return pIsComponentsObject.value + + def IsLevelSetObject(self): + pIsLevelSetObject = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_islevelsetobject(self._handle, pIsLevelSetObject)) + + return pIsLevelSetObject.value + + def IsValid(self): + pIsValid = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_isvalid(self._handle, pIsValid)) + + return pIsValid.value + + def SetAttachmentAsThumbnail(self, AttachmentObject): + AttachmentHandle = None + if AttachmentObject: + AttachmentHandle = AttachmentObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_setattachmentasthumbnail(self._handle, AttachmentHandle)) + + + def GetThumbnailAttachment(self): + AttachmentHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getthumbnailattachment(self._handle, AttachmentHandle)) + if AttachmentHandle: + AttachmentObject = self._wrapper._polymorphicFactory(AttachmentHandle) + else: + AttachmentObject = None + + return AttachmentObject + + def ClearThumbnailAttachment(self): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_clearthumbnailattachment(self._handle)) + + + def GetOutbox(self): + pOutbox = Box() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getoutbox(self._handle, pOutbox)) + + return pOutbox + + def GetUUID(self): + pHasUUID = ctypes.c_bool() + nUUIDBufferSize = ctypes.c_uint64(0) + nUUIDNeededChars = ctypes.c_uint64(0) + pUUIDBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getuuid(self._handle, pHasUUID, nUUIDBufferSize, nUUIDNeededChars, pUUIDBuffer)) + nUUIDBufferSize = ctypes.c_uint64(nUUIDNeededChars.value) + pUUIDBuffer = (ctypes.c_char * (nUUIDNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getuuid(self._handle, pHasUUID, nUUIDBufferSize, nUUIDNeededChars, pUUIDBuffer)) + + return pHasUUID.value, pUUIDBuffer.value.decode() + + def SetUUID(self, UUID): + pUUID = ctypes.c_char_p(str.encode(UUID)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_setuuid(self._handle, pUUID)) + + + def GetMetaDataGroup(self): + MetaDataGroupHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getmetadatagroup(self._handle, MetaDataGroupHandle)) + if MetaDataGroupHandle: + MetaDataGroupObject = self._wrapper._polymorphicFactory(MetaDataGroupHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return MetaDataGroupObject + + def SetSlicesMeshResolution(self, MeshResolution): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_setslicesmeshresolution(self._handle, MeshResolution)) + + + def GetSlicesMeshResolution(self): + pMeshResolution = ctypes.c_int32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getslicesmeshresolution(self._handle, pMeshResolution)) + + return SlicesMeshResolution(pMeshResolution.value) + + def HasSlices(self, Recursive): + bRecursive = ctypes.c_bool(Recursive) + pHasSlices = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_hasslices(self._handle, bRecursive, pHasSlices)) + + return pHasSlices.value + + def ClearSliceStack(self): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_clearslicestack(self._handle)) + + + def GetSliceStack(self): + SliceStackInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getslicestack(self._handle, SliceStackInstanceHandle)) + if SliceStackInstanceHandle: + SliceStackInstanceObject = self._wrapper._polymorphicFactory(SliceStackInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return SliceStackInstanceObject + + def AssignSliceStack(self, SliceStackInstanceObject): + SliceStackInstanceHandle = None + if SliceStackInstanceObject: + SliceStackInstanceHandle = SliceStackInstanceObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_assignslicestack(self._handle, SliceStackInstanceHandle)) + + + + +''' Class Implementation for MeshObject +''' +class MeshObject(Object): + def __init__(self, handle, wrapper): + Object.__init__(self, handle, wrapper) + def GetVertexCount(self): + pVertexCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getvertexcount(self._handle, pVertexCount)) + + return pVertexCount.value + + def GetTriangleCount(self): + pVertexCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettrianglecount(self._handle, pVertexCount)) + + return pVertexCount.value + + def GetVertex(self, Index): + nIndex = ctypes.c_uint32(Index) + pCoordinates = Position() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getvertex(self._handle, nIndex, pCoordinates)) + + return pCoordinates + + def SetVertex(self, Index, Coordinates): + nIndex = ctypes.c_uint32(Index) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_setvertex(self._handle, nIndex, Coordinates)) + + + def AddVertex(self, Coordinates): + pNewIndex = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_addvertex(self._handle, Coordinates, pNewIndex)) + + return pNewIndex.value + + def GetVertices(self): + nVerticesCount = ctypes.c_uint64(0) + nVerticesNeededCount = ctypes.c_uint64(0) + pVerticesBuffer = (Position*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getvertices(self._handle, nVerticesCount, nVerticesNeededCount, pVerticesBuffer)) + nVerticesCount = ctypes.c_uint64(nVerticesNeededCount.value) + pVerticesBuffer = (Position * nVerticesNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getvertices(self._handle, nVerticesCount, nVerticesNeededCount, pVerticesBuffer)) + + return [pVerticesBuffer[i] for i in range(nVerticesNeededCount.value)] + + def GetTriangle(self, Index): + nIndex = ctypes.c_uint32(Index) + pIndices = Triangle() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettriangle(self._handle, nIndex, pIndices)) + + return pIndices + + def SetTriangle(self, Index, Indices): + nIndex = ctypes.c_uint32(Index) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_settriangle(self._handle, nIndex, Indices)) + + + def AddTriangle(self, Indices): + pNewIndex = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_addtriangle(self._handle, Indices, pNewIndex)) + + return pNewIndex.value + + def GetTriangleIndices(self): + nIndicesCount = ctypes.c_uint64(0) + nIndicesNeededCount = ctypes.c_uint64(0) + pIndicesBuffer = (Triangle*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettriangleindices(self._handle, nIndicesCount, nIndicesNeededCount, pIndicesBuffer)) + nIndicesCount = ctypes.c_uint64(nIndicesNeededCount.value) + pIndicesBuffer = (Triangle * nIndicesNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettriangleindices(self._handle, nIndicesCount, nIndicesNeededCount, pIndicesBuffer)) + + return [pIndicesBuffer[i] for i in range(nIndicesNeededCount.value)] + + def SetObjectLevelProperty(self, UniqueResourceID, PropertyID): + nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) + nPropertyID = ctypes.c_uint32(PropertyID) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_setobjectlevelproperty(self._handle, nUniqueResourceID, nPropertyID)) + + + def GetObjectLevelProperty(self): + pUniqueResourceID = ctypes.c_uint32() + pPropertyID = ctypes.c_uint32() + pHasObjectLevelProperty = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getobjectlevelproperty(self._handle, pUniqueResourceID, pPropertyID, pHasObjectLevelProperty)) + + return pUniqueResourceID.value, pPropertyID.value, pHasObjectLevelProperty.value + + def SetTriangleProperties(self, Index, Properties): + nIndex = ctypes.c_uint32(Index) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_settriangleproperties(self._handle, nIndex, Properties)) + + + def GetTriangleProperties(self, Index): + nIndex = ctypes.c_uint32(Index) + pProperty = TriangleProperties() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettriangleproperties(self._handle, nIndex, pProperty)) + + return pProperty + + def SetAllTriangleProperties(self, PropertiesArray): + nPropertiesArrayCount = ctypes.c_uint64(len(PropertiesArray)) + pPropertiesArrayBuffer = (TriangleProperties*len(PropertiesArray))(*PropertiesArray) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_setalltriangleproperties(self._handle, nPropertiesArrayCount, pPropertiesArrayBuffer)) + + + def GetAllTriangleProperties(self): + nPropertiesArrayCount = ctypes.c_uint64(0) + nPropertiesArrayNeededCount = ctypes.c_uint64(0) + pPropertiesArrayBuffer = (TriangleProperties*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getalltriangleproperties(self._handle, nPropertiesArrayCount, nPropertiesArrayNeededCount, pPropertiesArrayBuffer)) + nPropertiesArrayCount = ctypes.c_uint64(nPropertiesArrayNeededCount.value) + pPropertiesArrayBuffer = (TriangleProperties * nPropertiesArrayNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getalltriangleproperties(self._handle, nPropertiesArrayCount, nPropertiesArrayNeededCount, pPropertiesArrayBuffer)) + + return [pPropertiesArrayBuffer[i] for i in range(nPropertiesArrayNeededCount.value)] + + def ClearAllProperties(self): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_clearallproperties(self._handle)) + + + def SetGeometry(self, Vertices, Indices): + nVerticesCount = ctypes.c_uint64(len(Vertices)) + pVerticesBuffer = (Position*len(Vertices))(*Vertices) + nIndicesCount = ctypes.c_uint64(len(Indices)) + pIndicesBuffer = (Triangle*len(Indices))(*Indices) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_setgeometry(self._handle, nVerticesCount, pVerticesBuffer, nIndicesCount, pIndicesBuffer)) + + + def IsManifoldAndOriented(self): + pIsManifoldAndOriented = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_ismanifoldandoriented(self._handle, pIsManifoldAndOriented)) + + return pIsManifoldAndOriented.value + + def BeamLattice(self): + TheBeamLatticeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_beamlattice(self._handle, TheBeamLatticeHandle)) + if TheBeamLatticeHandle: + TheBeamLatticeObject = self._wrapper._polymorphicFactory(TheBeamLatticeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return TheBeamLatticeObject + + def GetVolumeData(self): + TheVolumeDataHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getvolumedata(self._handle, TheVolumeDataHandle)) + if TheVolumeDataHandle: + TheVolumeDataObject = self._wrapper._polymorphicFactory(TheVolumeDataHandle) + else: + TheVolumeDataObject = None + + return TheVolumeDataObject + + def SetVolumeData(self, TheVolumeDataObject): + TheVolumeDataHandle = None + if TheVolumeDataObject: + TheVolumeDataHandle = TheVolumeDataObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_setvolumedata(self._handle, TheVolumeDataHandle)) + + + + +''' Class Implementation for LevelSet +''' +class LevelSet(Object): + def __init__(self, handle, wrapper): + Object.__init__(self, handle, wrapper) + def GetFunction(self): + TheFunctionHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_getfunction(self._handle, TheFunctionHandle)) + if TheFunctionHandle: + TheFunctionObject = self._wrapper._polymorphicFactory(TheFunctionHandle) + else: + TheFunctionObject = None + + return TheFunctionObject + + def SetFunction(self, TheFunctionObject): + TheFunctionHandle = None + if TheFunctionObject: + TheFunctionHandle = TheFunctionObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_setfunction(self._handle, TheFunctionHandle)) + + + def GetTransform(self): + pTransform = Transform() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_gettransform(self._handle, pTransform)) + + return pTransform + + def SetTransform(self, Transform): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_settransform(self._handle, Transform)) + + + def GetChannelName(self): + nChannelNameBufferSize = ctypes.c_uint64(0) + nChannelNameNeededChars = ctypes.c_uint64(0) + pChannelNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_getchannelname(self._handle, nChannelNameBufferSize, nChannelNameNeededChars, pChannelNameBuffer)) + nChannelNameBufferSize = ctypes.c_uint64(nChannelNameNeededChars.value) + pChannelNameBuffer = (ctypes.c_char * (nChannelNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_getchannelname(self._handle, nChannelNameBufferSize, nChannelNameNeededChars, pChannelNameBuffer)) + + return pChannelNameBuffer.value.decode() + + def SetChannelName(self, ChannelName): + pChannelName = ctypes.c_char_p(str.encode(ChannelName)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_setchannelname(self._handle, pChannelName)) + + + def SetMinFeatureSize(self, MinFeatureSize): + dMinFeatureSize = ctypes.c_double(MinFeatureSize) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_setminfeaturesize(self._handle, dMinFeatureSize)) + + + def GetMinFeatureSize(self): + pMinFeatureSize = ctypes.c_double() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_getminfeaturesize(self._handle, pMinFeatureSize)) + + return pMinFeatureSize.value + + def SetFallBackValue(self, FallBackValue): + dFallBackValue = ctypes.c_double(FallBackValue) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_setfallbackvalue(self._handle, dFallBackValue)) + + + def GetFallBackValue(self): + pFallBackValue = ctypes.c_double() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_getfallbackvalue(self._handle, pFallBackValue)) + + return pFallBackValue.value + + def SetMeshBBoxOnly(self, MeshBBoxOnly): + bMeshBBoxOnly = ctypes.c_bool(MeshBBoxOnly) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_setmeshbboxonly(self._handle, bMeshBBoxOnly)) + + + def GetMeshBBoxOnly(self): + pMeshBBoxOnly = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_getmeshbboxonly(self._handle, pMeshBBoxOnly)) + + return pMeshBBoxOnly.value + + def SetMesh(self, TheMeshObject): + TheMeshHandle = None + if TheMeshObject: + TheMeshHandle = TheMeshObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_setmesh(self._handle, TheMeshHandle)) + + + def GetMesh(self): + TheMeshHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_getmesh(self._handle, TheMeshHandle)) + if TheMeshHandle: + TheMeshObject = self._wrapper._polymorphicFactory(TheMeshHandle) + else: + TheMeshObject = None + + return TheMeshObject + + def GetVolumeData(self): + TheVolumeDataHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_getvolumedata(self._handle, TheVolumeDataHandle)) + if TheVolumeDataHandle: + TheVolumeDataObject = self._wrapper._polymorphicFactory(TheVolumeDataHandle) + else: + TheVolumeDataObject = None + + return TheVolumeDataObject + + def SetVolumeData(self, TheVolumeDataObject): + TheVolumeDataHandle = None + if TheVolumeDataObject: + TheVolumeDataHandle = TheVolumeDataObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_levelset_setvolumedata(self._handle, TheVolumeDataHandle)) + + + + +''' Class Implementation for BeamLattice +''' +class BeamLattice(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def GetMinLength(self): + pMinLength = ctypes.c_double() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getminlength(self._handle, pMinLength)) + + return pMinLength.value + + def SetMinLength(self, MinLength): + dMinLength = ctypes.c_double(MinLength) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setminlength(self._handle, dMinLength)) + + + def GetClipping(self): + pClipMode = ctypes.c_int32() + pUniqueResourceID = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getclipping(self._handle, pClipMode, pUniqueResourceID)) + + return BeamLatticeClipMode(pClipMode.value), pUniqueResourceID.value + + def SetClipping(self, ClipMode, UniqueResourceID): + nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setclipping(self._handle, ClipMode, nUniqueResourceID)) + + + def GetRepresentation(self): + pHasRepresentation = ctypes.c_bool() + pUniqueResourceID = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getrepresentation(self._handle, pHasRepresentation, pUniqueResourceID)) + + return pHasRepresentation.value, pUniqueResourceID.value + + def SetRepresentation(self, UniqueResourceID): + nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setrepresentation(self._handle, nUniqueResourceID)) + + + def GetBallOptions(self): + pBallMode = ctypes.c_int32() + pBallRadius = ctypes.c_double() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getballoptions(self._handle, pBallMode, pBallRadius)) + + return BeamLatticeBallMode(pBallMode.value), pBallRadius.value + + def SetBallOptions(self, BallMode, BallRadius): + dBallRadius = ctypes.c_double(BallRadius) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setballoptions(self._handle, BallMode, dBallRadius)) + + + def GetBeamCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeamcount(self._handle, pCount)) + + return pCount.value + + def GetBeam(self, Index): + nIndex = ctypes.c_uint32(Index) + pBeamInfo = Beam() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeam(self._handle, nIndex, pBeamInfo)) + + return pBeamInfo - def _checkBinaryVersion(self): - nMajor, nMinor, _ = self.GetLibraryVersion() - if (nMajor != BindingVersion.MAJOR) or (nMinor < BindingVersion.MINOR): - raise ELib3MFException(ErrorCodes.INCOMPATIBLEBINARYVERSION) + def AddBeam(self, BeamInfo): + pIndex = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_addbeam(self._handle, BeamInfo, pIndex)) + + return pIndex.value - def checkError(self, instance, errorCode): - if errorCode != ErrorCodes.SUCCESS.value: - if instance: - if instance._wrapper != self: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'invalid wrapper call') - message,_ = self.GetLastError(instance) - raise ELib3MFException(errorCode, message) + def SetBeam(self, Index, BeamInfo): + nIndex = ctypes.c_uint32(Index) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setbeam(self._handle, nIndex, BeamInfo)) + - def GetLibraryVersion(self): - pMajor = ctypes.c_uint32() - pMinor = ctypes.c_uint32() - pMicro = ctypes.c_uint32() - self.checkError(None, self.lib.lib3mf_getlibraryversion(pMajor, pMinor, pMicro)) + def SetBeams(self, BeamInfo): + nBeamInfoCount = ctypes.c_uint64(len(BeamInfo)) + pBeamInfoBuffer = (Beam*len(BeamInfo))(*BeamInfo) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setbeams(self._handle, nBeamInfoCount, pBeamInfoBuffer)) - return pMajor.value, pMinor.value, pMicro.value - def GetPrereleaseInformation(self): - pHasPrereleaseInfo = ctypes.c_bool() - nPrereleaseInfoBufferSize = ctypes.c_uint64(0) - nPrereleaseInfoNeededChars = ctypes.c_uint64(0) - pPrereleaseInfoBuffer = ctypes.c_char_p(None) - self.checkError(None, self.lib.lib3mf_getprereleaseinformation(pHasPrereleaseInfo, nPrereleaseInfoBufferSize, nPrereleaseInfoNeededChars, pPrereleaseInfoBuffer)) - nPrereleaseInfoBufferSize = ctypes.c_uint64(nPrereleaseInfoNeededChars.value) - pPrereleaseInfoBuffer = (ctypes.c_char * (nPrereleaseInfoNeededChars.value))() - self.checkError(None, self.lib.lib3mf_getprereleaseinformation(pHasPrereleaseInfo, nPrereleaseInfoBufferSize, nPrereleaseInfoNeededChars, pPrereleaseInfoBuffer)) + def GetBeams(self): + nBeamInfoCount = ctypes.c_uint64(0) + nBeamInfoNeededCount = ctypes.c_uint64(0) + pBeamInfoBuffer = (Beam*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeams(self._handle, nBeamInfoCount, nBeamInfoNeededCount, pBeamInfoBuffer)) + nBeamInfoCount = ctypes.c_uint64(nBeamInfoNeededCount.value) + pBeamInfoBuffer = (Beam * nBeamInfoNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeams(self._handle, nBeamInfoCount, nBeamInfoNeededCount, pBeamInfoBuffer)) - return pHasPrereleaseInfo.value, pPrereleaseInfoBuffer.value.decode() + return [pBeamInfoBuffer[i] for i in range(nBeamInfoNeededCount.value)] - def GetBuildInformation(self): - pHasBuildInfo = ctypes.c_bool() - nBuildInformationBufferSize = ctypes.c_uint64(0) - nBuildInformationNeededChars = ctypes.c_uint64(0) - pBuildInformationBuffer = ctypes.c_char_p(None) - self.checkError(None, self.lib.lib3mf_getbuildinformation(pHasBuildInfo, nBuildInformationBufferSize, nBuildInformationNeededChars, pBuildInformationBuffer)) - nBuildInformationBufferSize = ctypes.c_uint64(nBuildInformationNeededChars.value) - pBuildInformationBuffer = (ctypes.c_char * (nBuildInformationNeededChars.value))() - self.checkError(None, self.lib.lib3mf_getbuildinformation(pHasBuildInfo, nBuildInformationBufferSize, nBuildInformationNeededChars, pBuildInformationBuffer)) + def GetBallCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getballcount(self._handle, pCount)) - return pHasBuildInfo.value, pBuildInformationBuffer.value.decode() + return pCount.value - def GetSpecificationVersion(self, SpecificationURL): - pSpecificationURL = ctypes.c_char_p(str.encode(SpecificationURL)) - pIsSupported = ctypes.c_bool() - pMajor = ctypes.c_uint32() - pMinor = ctypes.c_uint32() - pMicro = ctypes.c_uint32() - self.checkError(None, self.lib.lib3mf_getspecificationversion(pSpecificationURL, pIsSupported, pMajor, pMinor, pMicro)) + def GetBall(self, Index): + nIndex = ctypes.c_uint32(Index) + pBallInfo = Ball() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getball(self._handle, nIndex, pBallInfo)) - return pIsSupported.value, pMajor.value, pMinor.value, pMicro.value + return pBallInfo - def CreateModel(self): - ModelHandle = ctypes.c_void_p() - self.checkError(None, self.lib.lib3mf_createmodel(ModelHandle)) - if ModelHandle: - ModelObject = self._polymorphicFactory(ModelHandle) + def AddBall(self, BallInfo): + pIndex = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_addball(self._handle, BallInfo, pIndex)) + + return pIndex.value + + def SetBall(self, Index, BallInfo): + nIndex = ctypes.c_uint32(Index) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setball(self._handle, nIndex, BallInfo)) + + + def SetBalls(self, BallInfo): + nBallInfoCount = ctypes.c_uint64(len(BallInfo)) + pBallInfoBuffer = (Ball*len(BallInfo))(*BallInfo) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setballs(self._handle, nBallInfoCount, pBallInfoBuffer)) + + + def GetBalls(self): + nBallInfoCount = ctypes.c_uint64(0) + nBallInfoNeededCount = ctypes.c_uint64(0) + pBallInfoBuffer = (Ball*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getballs(self._handle, nBallInfoCount, nBallInfoNeededCount, pBallInfoBuffer)) + nBallInfoCount = ctypes.c_uint64(nBallInfoNeededCount.value) + pBallInfoBuffer = (Ball * nBallInfoNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getballs(self._handle, nBallInfoCount, nBallInfoNeededCount, pBallInfoBuffer)) + + return [pBallInfoBuffer[i] for i in range(nBallInfoNeededCount.value)] + + def GetBeamSetCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeamsetcount(self._handle, pCount)) + + return pCount.value + + def AddBeamSet(self): + BeamSetHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_addbeamset(self._handle, BeamSetHandle)) + if BeamSetHandle: + BeamSetObject = self._wrapper._polymorphicFactory(BeamSetHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return ModelObject + return BeamSetObject - def Release(self, InstanceObject): - InstanceHandle = None - if InstanceObject: - InstanceHandle = InstanceObject._handle + def GetBeamSet(self, Index): + nIndex = ctypes.c_uint32(Index) + BeamSetHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeamset(self._handle, nIndex, BeamSetHandle)) + if BeamSetHandle: + BeamSetObject = self._wrapper._polymorphicFactory(BeamSetHandle) else: - raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') - self.checkError(None, self.lib.lib3mf_release(InstanceHandle)) + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return BeamSetObject - def Acquire(self, InstanceObject): - InstanceHandle = None - if InstanceObject: - InstanceHandle = InstanceObject._handle + + +''' Class Implementation for FunctionReference +''' +class FunctionReference(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def GetFunctionResourceID(self): + pUniqueResourceID = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionreference_getfunctionresourceid(self._handle, pUniqueResourceID)) + + return pUniqueResourceID.value + + def SetFunctionResourceID(self, UniqueResourceID): + nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionreference_setfunctionresourceid(self._handle, nUniqueResourceID)) + + + def GetTransform(self): + pTransform = Transform() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionreference_gettransform(self._handle, pTransform)) + + return pTransform + + def SetTransform(self, Transform): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionreference_settransform(self._handle, Transform)) + + + def GetChannelName(self): + nChannelNameBufferSize = ctypes.c_uint64(0) + nChannelNameNeededChars = ctypes.c_uint64(0) + pChannelNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionreference_getchannelname(self._handle, nChannelNameBufferSize, nChannelNameNeededChars, pChannelNameBuffer)) + nChannelNameBufferSize = ctypes.c_uint64(nChannelNameNeededChars.value) + pChannelNameBuffer = (ctypes.c_char * (nChannelNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionreference_getchannelname(self._handle, nChannelNameBufferSize, nChannelNameNeededChars, pChannelNameBuffer)) + + return pChannelNameBuffer.value.decode() + + def SetChannelName(self, ChannelName): + pChannelName = ctypes.c_char_p(str.encode(ChannelName)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionreference_setchannelname(self._handle, pChannelName)) + + + def SetMinFeatureSize(self, MinFeatureSize): + dMinFeatureSize = ctypes.c_double(MinFeatureSize) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionreference_setminfeaturesize(self._handle, dMinFeatureSize)) + + + def GetMinFeatureSize(self): + pMinFeatureSize = ctypes.c_double() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionreference_getminfeaturesize(self._handle, pMinFeatureSize)) + + return pMinFeatureSize.value + + def SetFallBackValue(self, FallBackValue): + dFallBackValue = ctypes.c_double(FallBackValue) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionreference_setfallbackvalue(self._handle, dFallBackValue)) + + + def GetFallBackValue(self): + pFallBackValue = ctypes.c_double() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionreference_getfallbackvalue(self._handle, pFallBackValue)) + + return pFallBackValue.value + + + +''' Class Implementation for VolumeDataColor +''' +class VolumeDataColor(FunctionReference): + def __init__(self, handle, wrapper): + FunctionReference.__init__(self, handle, wrapper) + + +''' Class Implementation for MaterialMapping +''' +class MaterialMapping(FunctionReference): + def __init__(self, handle, wrapper): + FunctionReference.__init__(self, handle, wrapper) + + +''' Class Implementation for VolumeDataComposite +''' +class VolumeDataComposite(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def GetBaseMaterialGroup(self): + BaseMaterialGroupInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedatacomposite_getbasematerialgroup(self._handle, BaseMaterialGroupInstanceHandle)) + if BaseMaterialGroupInstanceHandle: + BaseMaterialGroupInstanceObject = self._wrapper._polymorphicFactory(BaseMaterialGroupInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return BaseMaterialGroupInstanceObject + + def SetBaseMaterialGroup(self, BaseMaterialGroupInstanceObject): + BaseMaterialGroupInstanceHandle = None + if BaseMaterialGroupInstanceObject: + BaseMaterialGroupInstanceHandle = BaseMaterialGroupInstanceObject._handle else: raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') - self.checkError(None, self.lib.lib3mf_acquire(InstanceHandle)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedatacomposite_setbasematerialgroup(self._handle, BaseMaterialGroupInstanceHandle)) - def SetJournal(self, JournalPath): - pJournalPath = ctypes.c_char_p(str.encode(JournalPath)) - self.checkError(None, self.lib.lib3mf_setjournal(pJournalPath)) + def GetMaterialMappingCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedatacomposite_getmaterialmappingcount(self._handle, pCount)) + return pCount.value - def GetLastError(self, InstanceObject): - InstanceHandle = None - if InstanceObject: - InstanceHandle = InstanceObject._handle + def GetMaterialMapping(self, Index): + nIndex = ctypes.c_uint32(Index) + TheMaterialMappingHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedatacomposite_getmaterialmapping(self._handle, nIndex, TheMaterialMappingHandle)) + if TheMaterialMappingHandle: + TheMaterialMappingObject = self._wrapper._polymorphicFactory(TheMaterialMappingHandle) else: - raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') - nLastErrorStringBufferSize = ctypes.c_uint64(0) - nLastErrorStringNeededChars = ctypes.c_uint64(0) - pLastErrorStringBuffer = ctypes.c_char_p(None) - pHasLastError = ctypes.c_bool() - self.checkError(None, self.lib.lib3mf_getlasterror(InstanceHandle, nLastErrorStringBufferSize, nLastErrorStringNeededChars, pLastErrorStringBuffer, pHasLastError)) - nLastErrorStringBufferSize = ctypes.c_uint64(nLastErrorStringNeededChars.value) - pLastErrorStringBuffer = (ctypes.c_char * (nLastErrorStringNeededChars.value))() - self.checkError(None, self.lib.lib3mf_getlasterror(InstanceHandle, nLastErrorStringBufferSize, nLastErrorStringNeededChars, pLastErrorStringBuffer, pHasLastError)) + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return TheMaterialMappingObject + + def AddMaterialMapping(self, Transform): + TheMaterialMappingHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedatacomposite_addmaterialmapping(self._handle, Transform, TheMaterialMappingHandle)) + if TheMaterialMappingHandle: + TheMaterialMappingObject = self._wrapper._polymorphicFactory(TheMaterialMappingHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return TheMaterialMappingObject + + def RemoveMaterialMapping(self, Index): + nIndex = ctypes.c_uint32(Index) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedatacomposite_removematerialmapping(self._handle, nIndex)) + + + + +''' Class Implementation for VolumeDataProperty +''' +class VolumeDataProperty(FunctionReference): + def __init__(self, handle, wrapper): + FunctionReference.__init__(self, handle, wrapper) + def GetName(self): + nPropertyNameBufferSize = ctypes.c_uint64(0) + nPropertyNameNeededChars = ctypes.c_uint64(0) + pPropertyNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedataproperty_getname(self._handle, nPropertyNameBufferSize, nPropertyNameNeededChars, pPropertyNameBuffer)) + nPropertyNameBufferSize = ctypes.c_uint64(nPropertyNameNeededChars.value) + pPropertyNameBuffer = (ctypes.c_char * (nPropertyNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedataproperty_getname(self._handle, nPropertyNameBufferSize, nPropertyNameNeededChars, pPropertyNameBuffer)) + + return pPropertyNameBuffer.value.decode() + + def SetIsRequired(self, IsRequired): + bIsRequired = ctypes.c_bool(IsRequired) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedataproperty_setisrequired(self._handle, bIsRequired)) + + + def IsRequired(self): + pIsRequired = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedataproperty_isrequired(self._handle, pIsRequired)) + + return pIsRequired.value + + + +''' Class Implementation for VolumeData +''' +class VolumeData(Resource): + def __init__(self, handle, wrapper): + Resource.__init__(self, handle, wrapper) + def GetComposite(self): + TheCompositeDataHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedata_getcomposite(self._handle, TheCompositeDataHandle)) + if TheCompositeDataHandle: + TheCompositeDataObject = self._wrapper._polymorphicFactory(TheCompositeDataHandle) + else: + TheCompositeDataObject = None + + return TheCompositeDataObject + + def CreateNewComposite(self): + TheCompositeDataHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedata_createnewcomposite(self._handle, TheCompositeDataHandle)) + if TheCompositeDataHandle: + TheCompositeDataObject = self._wrapper._polymorphicFactory(TheCompositeDataHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return TheCompositeDataObject + + def RemoveComposite(self): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedata_removecomposite(self._handle)) + + + def GetColor(self): + TheColorDataHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedata_getcolor(self._handle, TheColorDataHandle)) + if TheColorDataHandle: + TheColorDataObject = self._wrapper._polymorphicFactory(TheColorDataHandle) + else: + TheColorDataObject = None + + return TheColorDataObject + + def CreateNewColor(self, TheFunctionObject): + TheFunctionHandle = None + if TheFunctionObject: + TheFunctionHandle = TheFunctionObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + TheColorDataHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedata_createnewcolor(self._handle, TheFunctionHandle, TheColorDataHandle)) + if TheColorDataHandle: + TheColorDataObject = self._wrapper._polymorphicFactory(TheColorDataHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pLastErrorStringBuffer.value.decode(), pHasLastError.value + return TheColorDataObject - def GetSymbolLookupMethod(self): - pSymbolLookupMethod = ctypes.c_void_p() - self.checkError(None, self.lib.lib3mf_getsymbollookupmethod(pSymbolLookupMethod)) + def RemoveColor(self): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedata_removecolor(self._handle)) - return pSymbolLookupMethod.value - def RetrieveProgressMessage(self, TheProgressIdentifier): - nProgressMessageBufferSize = ctypes.c_uint64(0) - nProgressMessageNeededChars = ctypes.c_uint64(0) - pProgressMessageBuffer = ctypes.c_char_p(None) - self.checkError(None, self.lib.lib3mf_retrieveprogressmessage(TheProgressIdentifier, nProgressMessageBufferSize, nProgressMessageNeededChars, pProgressMessageBuffer)) - nProgressMessageBufferSize = ctypes.c_uint64(nProgressMessageNeededChars.value) - pProgressMessageBuffer = (ctypes.c_char * (nProgressMessageNeededChars.value))() - self.checkError(None, self.lib.lib3mf_retrieveprogressmessage(TheProgressIdentifier, nProgressMessageBufferSize, nProgressMessageNeededChars, pProgressMessageBuffer)) + def GetPropertyCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedata_getpropertycount(self._handle, pCount)) - return pProgressMessageBuffer.value.decode() + return pCount.value - def RGBAToColor(self, Red, Green, Blue, Alpha): - nRed = ctypes.c_uint8(Red) - nGreen = ctypes.c_uint8(Green) - nBlue = ctypes.c_uint8(Blue) - nAlpha = ctypes.c_uint8(Alpha) - pTheColor = Color() - self.checkError(None, self.lib.lib3mf_rgbatocolor(nRed, nGreen, nBlue, nAlpha, pTheColor)) + def GetProperty(self, Index): + nIndex = ctypes.c_uint32(Index) + TheVolumeDataPropertyHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedata_getproperty(self._handle, nIndex, TheVolumeDataPropertyHandle)) + if TheVolumeDataPropertyHandle: + TheVolumeDataPropertyObject = self._wrapper._polymorphicFactory(TheVolumeDataPropertyHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pTheColor + return TheVolumeDataPropertyObject - def FloatRGBAToColor(self, Red, Green, Blue, Alpha): - fRed = ctypes.c_float(Red) - fGreen = ctypes.c_float(Green) - fBlue = ctypes.c_float(Blue) - fAlpha = ctypes.c_float(Alpha) - pTheColor = Color() - self.checkError(None, self.lib.lib3mf_floatrgbatocolor(fRed, fGreen, fBlue, fAlpha, pTheColor)) + def AddPropertyFromFunction(self, Name, TheFunctionObject): + pName = ctypes.c_char_p(str.encode(Name)) + TheFunctionHandle = None + if TheFunctionObject: + TheFunctionHandle = TheFunctionObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + TheVolumeDataPropertyHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedata_addpropertyfromfunction(self._handle, pName, TheFunctionHandle, TheVolumeDataPropertyHandle)) + if TheVolumeDataPropertyHandle: + TheVolumeDataPropertyObject = self._wrapper._polymorphicFactory(TheVolumeDataPropertyHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pTheColor + return TheVolumeDataPropertyObject - def ColorToRGBA(self, TheColor): - pRed = ctypes.c_uint8() - pGreen = ctypes.c_uint8() - pBlue = ctypes.c_uint8() - pAlpha = ctypes.c_uint8() - self.checkError(None, self.lib.lib3mf_colortorgba(TheColor, pRed, pGreen, pBlue, pAlpha)) + def RemoveProperty(self, Index): + nIndex = ctypes.c_uint32(Index) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_volumedata_removeproperty(self._handle, nIndex)) - return pRed.value, pGreen.value, pBlue.value, pAlpha.value - def ColorToFloatRGBA(self, TheColor): - pRed = ctypes.c_float() - pGreen = ctypes.c_float() - pBlue = ctypes.c_float() - pAlpha = ctypes.c_float() - self.checkError(None, self.lib.lib3mf_colortofloatrgba(TheColor, pRed, pGreen, pBlue, pAlpha)) + + +''' Class Implementation for Component +''' +class Component(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def GetObjectResource(self): + ObjectResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_getobjectresource(self._handle, ObjectResourceHandle)) + if ObjectResourceHandle: + ObjectResourceObject = self._wrapper._polymorphicFactory(ObjectResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pRed.value, pGreen.value, pBlue.value, pAlpha.value + return ObjectResourceObject - def GetIdentityTransform(self): - pTransform = Transform() - self.checkError(None, self.lib.lib3mf_getidentitytransform(pTransform)) + def GetObjectResourceID(self): + pUniqueResourceID = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_getobjectresourceid(self._handle, pUniqueResourceID)) - return pTransform + return pUniqueResourceID.value - def GetUniformScaleTransform(self, Factor): - fFactor = ctypes.c_float(Factor) - pTransform = Transform() - self.checkError(None, self.lib.lib3mf_getuniformscaletransform(fFactor, pTransform)) + def GetUUID(self): + pHasUUID = ctypes.c_bool() + nUUIDBufferSize = ctypes.c_uint64(0) + nUUIDNeededChars = ctypes.c_uint64(0) + pUUIDBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_getuuid(self._handle, pHasUUID, nUUIDBufferSize, nUUIDNeededChars, pUUIDBuffer)) + nUUIDBufferSize = ctypes.c_uint64(nUUIDNeededChars.value) + pUUIDBuffer = (ctypes.c_char * (nUUIDNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_getuuid(self._handle, pHasUUID, nUUIDBufferSize, nUUIDNeededChars, pUUIDBuffer)) - return pTransform + return pHasUUID.value, pUUIDBuffer.value.decode() - def GetScaleTransform(self, FactorX, FactorY, FactorZ): - fFactorX = ctypes.c_float(FactorX) - fFactorY = ctypes.c_float(FactorY) - fFactorZ = ctypes.c_float(FactorZ) - pTransform = Transform() - self.checkError(None, self.lib.lib3mf_getscaletransform(fFactorX, fFactorY, fFactorZ, pTransform)) + def SetUUID(self, UUID): + pUUID = ctypes.c_char_p(str.encode(UUID)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_setuuid(self._handle, pUUID)) - return pTransform - def GetTranslationTransform(self, VectorX, VectorY, VectorZ): - fVectorX = ctypes.c_float(VectorX) - fVectorY = ctypes.c_float(VectorY) - fVectorZ = ctypes.c_float(VectorZ) + def HasTransform(self): + pHasTransform = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_hastransform(self._handle, pHasTransform)) + + return pHasTransform.value + + def GetTransform(self): pTransform = Transform() - self.checkError(None, self.lib.lib3mf_gettranslationtransform(fVectorX, fVectorY, fVectorZ, pTransform)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_gettransform(self._handle, pTransform)) return pTransform - '''IMPORTANT: PolymorphicFactory method should not be used by application directly. - It's designed to be used on Lib3MFHandle object only once. - If it's used on any existing object as a form of dynamic cast then - Wrapper.AcquireInstance(object) must be called after instantiating new object. - This is important to keep reference count matching between application and library sides. - ''' - def _polymorphicFactory(self, handle): - class PolymorphicFactory(): - def getObjectById(self, classtypeid, handle, wrapper): - methodName = 'getObjectById_' + format(classtypeid.value, '016X') - method = getattr(self, methodName, lambda: 'Invalid class type id') - return method(handle, wrapper) - def getObjectById_856632D0BAF1D8B7(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Base" - return Base(handle, wrapper) - def getObjectById_E76F642F363FD7E9(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Writer" - return Writer(handle, wrapper) - def getObjectById_2D86831DA59FBE72(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Reader" - return Reader(handle, wrapper) - def getObjectById_0E55A826D377483E(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::PackagePart" - return PackagePart(handle, wrapper) - def getObjectById_DFE3889D1B269CBB(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Resource" - return Resource(handle, wrapper) - def getObjectById_460F3515E2621DBE(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ResourceIterator" - return ResourceIterator(handle, wrapper) - def getObjectById_69684DB99FA813F6(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::SliceStackIterator" - return SliceStackIterator(handle, wrapper) - def getObjectById_DE92510BD2112288(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ObjectIterator" - return ObjectIterator(handle, wrapper) - def getObjectById_F4196034E2B9FDE6(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MeshObjectIterator" - return MeshObjectIterator(handle, wrapper) - def getObjectById_564DE4217ED7614A(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObjectIterator" - return ComponentsObjectIterator(handle, wrapper) - def getObjectById_4BD32B4870FFC03B(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Texture2DIterator" - return Texture2DIterator(handle, wrapper) - def getObjectById_65E6EDD9362C79CB(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroupIterator" - return BaseMaterialGroupIterator(handle, wrapper) - def getObjectById_10274A1757C729C0(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ColorGroupIterator" - return ColorGroupIterator(handle, wrapper) - def getObjectById_30D55F4DB88FE0CA(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroupIterator" - return Texture2DGroupIterator(handle, wrapper) - def getObjectById_A99CC6C3F70FB6F9(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterialsIterator" - return CompositeMaterialsIterator(handle, wrapper) - def getObjectById_C2BDF5D8CBBDB1F0(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroupIterator" - return MultiPropertyGroupIterator(handle, wrapper) - def getObjectById_D17716D063DE2C22(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MetaData" - return MetaData(handle, wrapper) - def getObjectById_0C3B85369E9B25D3(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MetaDataGroup" - return MetaDataGroup(handle, wrapper) - def getObjectById_2DA2136F577A779C(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Object" - return Object(handle, wrapper) - def getObjectById_3B3A6DC6EC610497(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MeshObject" - return MeshObject(handle, wrapper) - def getObjectById_63B3B461B30B4BA5(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BeamLattice" - return BeamLattice(handle, wrapper) - def getObjectById_4ECDB6A6F69F2BEB(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Component" - return Component(handle, wrapper) - def getObjectById_6522CF04EB283FED(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" - return ComponentsObject(handle, wrapper) - def getObjectById_30CCDBE90E00B55B(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" - return BeamSet(handle, wrapper) - def getObjectById_B27D4656E16609FA(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BaseMaterialGroup" - return BaseMaterialGroup(handle, wrapper) - def getObjectById_D085FB2E49CDB5B1(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ColorGroup" - return ColorGroup(handle, wrapper) - def getObjectById_BC1208397E37055D(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Texture2DGroup" - return Texture2DGroup(handle, wrapper) - def getObjectById_CE16224D688B86F2(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" - return CompositeMaterials(handle, wrapper) - def getObjectById_B989E02E43158FE6(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" - return MultiPropertyGroup(handle, wrapper) - def getObjectById_8CE7A1191A63A35D(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Attachment" - return Attachment(handle, wrapper) - def getObjectById_E0441CF976B36319(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" - return Texture2D(handle, wrapper) - def getObjectById_68FB2D5FFC4BA12A(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BuildItem" - return BuildItem(handle, wrapper) - def getObjectById_A7D21BD364910860(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::BuildItemIterator" - return BuildItemIterator(handle, wrapper) - def getObjectById_2198BCF4D8DF9C40(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Slice" - return Slice(handle, wrapper) - def getObjectById_6594B031B6096238(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::SliceStack" - return SliceStack(handle, wrapper) - def getObjectById_D9E46D5E6D8118EE(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Consumer" - return Consumer(handle, wrapper) - def getObjectById_385C42FC5609498A(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::AccessRight" - return AccessRight(handle, wrapper) - def getObjectById_7FB36B91D4CE4671(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ContentEncryptionParams" - return ContentEncryptionParams(handle, wrapper) - def getObjectById_1A47A5E258E22EF9(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ResourceData" - return ResourceData(handle, wrapper) - def getObjectById_D59067227E428AA4(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::ResourceDataGroup" - return ResourceDataGroup(handle, wrapper) - def getObjectById_1CC9E0CC082253C6(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::KeyStore" - return KeyStore(handle, wrapper) - def getObjectById_5A8164ECEDB03F09(self, handle, wrapper): # First 64 bits of SHA1 of a string: "Lib3MF::Model" - return Model(handle, wrapper) + def SetTransform(self, Transform): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_settransform(self._handle, Transform)) - if not handle: - return None - pClassTypeId = ctypes.c_uint64() - self.checkError(None, self.lib.lib3mf_base_classtypeid(handle, pClassTypeId)) - factory = PolymorphicFactory() - return factory.getObjectById(pClassTypeId, handle, self) -''' Class Implementation for Base +''' Class Implementation for ComponentsObject ''' -class Base: +class ComponentsObject(Object): def __init__(self, handle, wrapper): - if not handle or not wrapper: - raise ELib3MFException(ErrorCodes.INVALIDPARAM) - self._handle = handle - self._wrapper = wrapper + Object.__init__(self, handle, wrapper) + def AddComponent(self, ObjectResourceObject, Transform): + ObjectResourceHandle = None + if ObjectResourceObject: + ObjectResourceHandle = ObjectResourceObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + ComponentInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_componentsobject_addcomponent(self._handle, ObjectResourceHandle, Transform, ComponentInstanceHandle)) + if ComponentInstanceHandle: + ComponentInstanceObject = self._wrapper._polymorphicFactory(ComponentInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ComponentInstanceObject + + def GetComponent(self, Index): + nIndex = ctypes.c_uint32(Index) + ComponentInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_componentsobject_getcomponent(self._handle, nIndex, ComponentInstanceHandle)) + if ComponentInstanceHandle: + ComponentInstanceObject = self._wrapper._polymorphicFactory(ComponentInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ComponentInstanceObject - def __del__(self): - self._wrapper.Release(self) - def ClassTypeId(self): - pClassTypeId = ctypes.c_uint64() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_base_classtypeid(self._handle, pClassTypeId)) + def GetComponentCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_componentsobject_getcomponentcount(self._handle, pCount)) - return pClassTypeId.value + return pCount.value -''' Class Implementation for Writer +''' Class Implementation for BeamSet ''' -class Writer(Base): +class BeamSet(Base): def __init__(self, handle, wrapper): Base.__init__(self, handle, wrapper) - def WriteToFile(self, Filename): - pFilename = ctypes.c_char_p(str.encode(Filename)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_writetofile(self._handle, pFilename)) + def SetName(self, Name): + pName = ctypes.c_char_p(str.encode(Name)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_setname(self._handle, pName)) - def GetStreamSize(self): - pStreamSize = ctypes.c_uint64() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getstreamsize(self._handle, pStreamSize)) + def GetName(self): + nNameBufferSize = ctypes.c_uint64(0) + nNameNeededChars = ctypes.c_uint64(0) + pNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) + nNameBufferSize = ctypes.c_uint64(nNameNeededChars.value) + pNameBuffer = (ctypes.c_char * (nNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) - return pStreamSize.value + return pNameBuffer.value.decode() - def WriteToBuffer(self): - nBufferCount = ctypes.c_uint64(0) - nBufferNeededCount = ctypes.c_uint64(0) - pBufferBuffer = (ctypes.c_uint8*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) - nBufferCount = ctypes.c_uint64(nBufferNeededCount.value) - pBufferBuffer = (ctypes.c_uint8 * nBufferNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) + def SetIdentifier(self, Identifier): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_setidentifier(self._handle, pIdentifier)) - return [pBufferBuffer[i] for i in range(nBufferNeededCount.value)] - def WriteToCallback(self, TheWriteCallbackFunc, TheSeekCallbackFunc, UserData): - pUserData = ctypes.c_void_p(UserData) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_writetocallback(self._handle, TheWriteCallbackFunc, TheSeekCallbackFunc, pUserData)) + def GetIdentifier(self): + nIdentifierBufferSize = ctypes.c_uint64(0) + nIdentifierNeededChars = ctypes.c_uint64(0) + pIdentifierBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getidentifier(self._handle, nIdentifierBufferSize, nIdentifierNeededChars, pIdentifierBuffer)) + nIdentifierBufferSize = ctypes.c_uint64(nIdentifierNeededChars.value) + pIdentifierBuffer = (ctypes.c_char * (nIdentifierNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getidentifier(self._handle, nIdentifierBufferSize, nIdentifierNeededChars, pIdentifierBuffer)) + return pIdentifierBuffer.value.decode() - def SetProgressCallback(self, ProgressCallbackFunc, UserData): - pUserData = ctypes.c_void_p(UserData) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_setprogresscallback(self._handle, ProgressCallbackFunc, pUserData)) + def GetReferenceCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getreferencecount(self._handle, pCount)) + return pCount.value - def GetDecimalPrecision(self): - pDecimalPrecision = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getdecimalprecision(self._handle, pDecimalPrecision)) + def SetReferences(self, References): + nReferencesCount = ctypes.c_uint64(len(References)) + pReferencesBuffer = (ctypes.c_uint32*len(References))(*References) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_setreferences(self._handle, nReferencesCount, pReferencesBuffer)) - return pDecimalPrecision.value - def SetDecimalPrecision(self, DecimalPrecision): - nDecimalPrecision = ctypes.c_uint32(DecimalPrecision) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_setdecimalprecision(self._handle, nDecimalPrecision)) + def GetReferences(self): + nReferencesCount = ctypes.c_uint64(0) + nReferencesNeededCount = ctypes.c_uint64(0) + pReferencesBuffer = (ctypes.c_uint32*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getreferences(self._handle, nReferencesCount, nReferencesNeededCount, pReferencesBuffer)) + nReferencesCount = ctypes.c_uint64(nReferencesNeededCount.value) + pReferencesBuffer = (ctypes.c_uint32 * nReferencesNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getreferences(self._handle, nReferencesCount, nReferencesNeededCount, pReferencesBuffer)) + return [pReferencesBuffer[i] for i in range(nReferencesNeededCount.value)] - def SetStrictModeActive(self, StrictModeActive): - bStrictModeActive = ctypes.c_bool(StrictModeActive) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_setstrictmodeactive(self._handle, bStrictModeActive)) + def GetBallReferenceCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getballreferencecount(self._handle, pCount)) + return pCount.value - def GetStrictModeActive(self): - pStrictModeActive = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getstrictmodeactive(self._handle, pStrictModeActive)) + def SetBallReferences(self, BallReferences): + nBallReferencesCount = ctypes.c_uint64(len(BallReferences)) + pBallReferencesBuffer = (ctypes.c_uint32*len(BallReferences))(*BallReferences) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_setballreferences(self._handle, nBallReferencesCount, pBallReferencesBuffer)) - return pStrictModeActive.value - def GetWarning(self, Index): - nIndex = ctypes.c_uint32(Index) - pErrorCode = ctypes.c_uint32() - nWarningBufferSize = ctypes.c_uint64(0) - nWarningNeededChars = ctypes.c_uint64(0) - pWarningBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getwarning(self._handle, nIndex, pErrorCode, nWarningBufferSize, nWarningNeededChars, pWarningBuffer)) - nWarningBufferSize = ctypes.c_uint64(nWarningNeededChars.value) - pWarningBuffer = (ctypes.c_char * (nWarningNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getwarning(self._handle, nIndex, pErrorCode, nWarningBufferSize, nWarningNeededChars, pWarningBuffer)) + def GetBallReferences(self): + nBallReferencesCount = ctypes.c_uint64(0) + nBallReferencesNeededCount = ctypes.c_uint64(0) + pBallReferencesBuffer = (ctypes.c_uint32*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getballreferences(self._handle, nBallReferencesCount, nBallReferencesNeededCount, pBallReferencesBuffer)) + nBallReferencesCount = ctypes.c_uint64(nBallReferencesNeededCount.value) + pBallReferencesBuffer = (ctypes.c_uint32 * nBallReferencesNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getballreferences(self._handle, nBallReferencesCount, nBallReferencesNeededCount, pBallReferencesBuffer)) - return pErrorCode.value, pWarningBuffer.value.decode() + return [pBallReferencesBuffer[i] for i in range(nBallReferencesNeededCount.value)] - def GetWarningCount(self): + + +''' Class Implementation for BaseMaterialGroup +''' +class BaseMaterialGroup(Resource): + def __init__(self, handle, wrapper): + Resource.__init__(self, handle, wrapper) + def GetCount(self): pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_getwarningcount(self._handle, pCount)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getcount(self._handle, pCount)) return pCount.value - def AddKeyWrappingCallback(self, ConsumerID, TheCallbackFunc, UserData): - pConsumerID = ctypes.c_char_p(str.encode(ConsumerID)) - pUserData = ctypes.c_void_p(UserData) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_addkeywrappingcallback(self._handle, pConsumerID, TheCallbackFunc, pUserData)) + def GetAllPropertyIDs(self): + nPropertyIDsCount = ctypes.c_uint64(0) + nPropertyIDsNeededCount = ctypes.c_uint64(0) + pPropertyIDsBuffer = (ctypes.c_uint32*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) + pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] - def SetContentEncryptionCallback(self, TheCallbackFunc, UserData): - pUserData = ctypes.c_void_p(UserData) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_writer_setcontentencryptioncallback(self._handle, TheCallbackFunc, pUserData)) + def AddMaterial(self, Name, DisplayColor): + pName = ctypes.c_char_p(str.encode(Name)) + pPropertyID = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_addmaterial(self._handle, pName, DisplayColor, pPropertyID)) + return pPropertyID.value - - -''' Class Implementation for Reader -''' -class Reader(Base): - def __init__(self, handle, wrapper): - Base.__init__(self, handle, wrapper) - def ReadFromFile(self, Filename): - pFilename = ctypes.c_char_p(str.encode(Filename)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_readfromfile(self._handle, pFilename)) + def RemoveMaterial(self, PropertyID): + nPropertyID = ctypes.c_uint32(PropertyID) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_removematerial(self._handle, nPropertyID)) - def ReadFromBuffer(self, Buffer): - nBufferCount = ctypes.c_uint64(len(Buffer)) - pBufferBuffer = (ctypes.c_uint8*len(Buffer))(*Buffer) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_readfrombuffer(self._handle, nBufferCount, pBufferBuffer)) + def GetName(self, PropertyID): + nPropertyID = ctypes.c_uint32(PropertyID) + nNameBufferSize = ctypes.c_uint64(0) + nNameNeededChars = ctypes.c_uint64(0) + pNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getname(self._handle, nPropertyID, nNameBufferSize, nNameNeededChars, pNameBuffer)) + nNameBufferSize = ctypes.c_uint64(nNameNeededChars.value) + pNameBuffer = (ctypes.c_char * (nNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getname(self._handle, nPropertyID, nNameBufferSize, nNameNeededChars, pNameBuffer)) + return pNameBuffer.value.decode() - def ReadFromCallback(self, TheReadCallbackFunc, StreamSize, TheSeekCallbackFunc, UserData): - nStreamSize = ctypes.c_uint64(StreamSize) - pUserData = ctypes.c_void_p(UserData) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_readfromcallback(self._handle, TheReadCallbackFunc, nStreamSize, TheSeekCallbackFunc, pUserData)) + def SetName(self, PropertyID, Name): + nPropertyID = ctypes.c_uint32(PropertyID) + pName = ctypes.c_char_p(str.encode(Name)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_setname(self._handle, nPropertyID, pName)) - def SetProgressCallback(self, ProgressCallbackFunc, UserData): - pUserData = ctypes.c_void_p(UserData) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_setprogresscallback(self._handle, ProgressCallbackFunc, pUserData)) + def SetDisplayColor(self, PropertyID, TheColor): + nPropertyID = ctypes.c_uint32(PropertyID) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_setdisplaycolor(self._handle, nPropertyID, TheColor)) - def AddRelationToRead(self, RelationShipType): - pRelationShipType = ctypes.c_char_p(str.encode(RelationShipType)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_addrelationtoread(self._handle, pRelationShipType)) + def GetDisplayColor(self, PropertyID): + nPropertyID = ctypes.c_uint32(PropertyID) + pTheColor = Color() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getdisplaycolor(self._handle, nPropertyID, pTheColor)) + return pTheColor - def RemoveRelationToRead(self, RelationShipType): - pRelationShipType = ctypes.c_char_p(str.encode(RelationShipType)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_removerelationtoread(self._handle, pRelationShipType)) + + +''' Class Implementation for ColorGroup +''' +class ColorGroup(Resource): + def __init__(self, handle, wrapper): + Resource.__init__(self, handle, wrapper) + def GetCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_getcount(self._handle, pCount)) + return pCount.value - def SetStrictModeActive(self, StrictModeActive): - bStrictModeActive = ctypes.c_bool(StrictModeActive) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_setstrictmodeactive(self._handle, bStrictModeActive)) + def GetAllPropertyIDs(self): + nPropertyIDsCount = ctypes.c_uint64(0) + nPropertyIDsNeededCount = ctypes.c_uint64(0) + pPropertyIDsBuffer = (ctypes.c_uint32*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) + pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] - def GetStrictModeActive(self): - pStrictModeActive = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_getstrictmodeactive(self._handle, pStrictModeActive)) + def AddColor(self, TheColor): + pPropertyID = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_addcolor(self._handle, TheColor, pPropertyID)) - return pStrictModeActive.value + return pPropertyID.value - def GetWarning(self, Index): - nIndex = ctypes.c_uint32(Index) - pErrorCode = ctypes.c_uint32() - nWarningBufferSize = ctypes.c_uint64(0) - nWarningNeededChars = ctypes.c_uint64(0) - pWarningBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_getwarning(self._handle, nIndex, pErrorCode, nWarningBufferSize, nWarningNeededChars, pWarningBuffer)) - nWarningBufferSize = ctypes.c_uint64(nWarningNeededChars.value) - pWarningBuffer = (ctypes.c_char * (nWarningNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_getwarning(self._handle, nIndex, pErrorCode, nWarningBufferSize, nWarningNeededChars, pWarningBuffer)) + def RemoveColor(self, PropertyID): + nPropertyID = ctypes.c_uint32(PropertyID) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_removecolor(self._handle, nPropertyID)) + + + def SetColor(self, PropertyID, TheColor): + nPropertyID = ctypes.c_uint32(PropertyID) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_setcolor(self._handle, nPropertyID, TheColor)) + + + def GetColor(self, PropertyID): + nPropertyID = ctypes.c_uint32(PropertyID) + pTheColor = Color() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_getcolor(self._handle, nPropertyID, pTheColor)) - return pErrorCode.value, pWarningBuffer.value.decode() + return pTheColor - def GetWarningCount(self): + + +''' Class Implementation for Texture2DGroup +''' +class Texture2DGroup(Resource): + def __init__(self, handle, wrapper): + Resource.__init__(self, handle, wrapper) + def GetCount(self): pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_getwarningcount(self._handle, pCount)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_getcount(self._handle, pCount)) return pCount.value - def AddKeyWrappingCallback(self, ConsumerID, TheCallbackFunc, UserData): - pConsumerID = ctypes.c_char_p(str.encode(ConsumerID)) - pUserData = ctypes.c_void_p(UserData) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_addkeywrappingcallback(self._handle, pConsumerID, TheCallbackFunc, pUserData)) + def GetAllPropertyIDs(self): + nPropertyIDsCount = ctypes.c_uint64(0) + nPropertyIDsNeededCount = ctypes.c_uint64(0) + pPropertyIDsBuffer = (ctypes.c_uint32*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) + pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] - def SetContentEncryptionCallback(self, TheCallbackFunc, UserData): - pUserData = ctypes.c_void_p(UserData) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_reader_setcontentencryptioncallback(self._handle, TheCallbackFunc, pUserData)) + def AddTex2Coord(self, UVCoordinate): + pPropertyID = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_addtex2coord(self._handle, UVCoordinate, pPropertyID)) + return pPropertyID.value - - -''' Class Implementation for PackagePart -''' -class PackagePart(Base): - def __init__(self, handle, wrapper): - Base.__init__(self, handle, wrapper) - def GetPath(self): - nPathBufferSize = ctypes.c_uint64(0) - nPathNeededChars = ctypes.c_uint64(0) - pPathBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_packagepart_getpath(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) - nPathBufferSize = ctypes.c_uint64(nPathNeededChars.value) - pPathBuffer = (ctypes.c_char * (nPathNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_packagepart_getpath(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) + def GetTex2Coord(self, PropertyID): + nPropertyID = ctypes.c_uint32(PropertyID) + pUVCoordinate = Tex2Coord() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_gettex2coord(self._handle, nPropertyID, pUVCoordinate)) - return pPathBuffer.value.decode() + return pUVCoordinate - def SetPath(self, Path): - pPath = ctypes.c_char_p(str.encode(Path)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_packagepart_setpath(self._handle, pPath)) + def RemoveTex2Coord(self, PropertyID): + nPropertyID = ctypes.c_uint32(PropertyID) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_removetex2coord(self._handle, nPropertyID)) + def GetTexture2D(self): + Texture2DInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_gettexture2d(self._handle, Texture2DInstanceHandle)) + if Texture2DInstanceHandle: + Texture2DInstanceObject = self._wrapper._polymorphicFactory(Texture2DInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return Texture2DInstanceObject + -''' Class Implementation for Resource +''' Class Implementation for CompositeMaterials ''' -class Resource(Base): +class CompositeMaterials(Resource): def __init__(self, handle, wrapper): - Base.__init__(self, handle, wrapper) - def GetResourceID(self): - pUniqueResourceID = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resource_getresourceid(self._handle, pUniqueResourceID)) + Resource.__init__(self, handle, wrapper) + def GetCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getcount(self._handle, pCount)) - return pUniqueResourceID.value + return pCount.value - def GetUniqueResourceID(self): - pUniqueResourceID = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resource_getuniqueresourceid(self._handle, pUniqueResourceID)) + def GetAllPropertyIDs(self): + nPropertyIDsCount = ctypes.c_uint64(0) + nPropertyIDsNeededCount = ctypes.c_uint64(0) + pPropertyIDsBuffer = (ctypes.c_uint32*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) + pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - return pUniqueResourceID.value + return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] - def PackagePart(self): - PackagePartHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resource_packagepart(self._handle, PackagePartHandle)) - if PackagePartHandle: - PackagePartObject = self._wrapper._polymorphicFactory(PackagePartHandle) + def GetBaseMaterialGroup(self): + BaseMaterialGroupInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getbasematerialgroup(self._handle, BaseMaterialGroupInstanceHandle)) + if BaseMaterialGroupInstanceHandle: + BaseMaterialGroupInstanceObject = self._wrapper._polymorphicFactory(BaseMaterialGroupInstanceHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return PackagePartObject + return BaseMaterialGroupInstanceObject - def SetPackagePart(self, PackagePartObject): - PackagePartHandle = None - if PackagePartObject: - PackagePartHandle = PackagePartObject._handle - else: - raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resource_setpackagepart(self._handle, PackagePartHandle)) + def AddComposite(self, Composite): + nCompositeCount = ctypes.c_uint64(len(Composite)) + pCompositeBuffer = (CompositeConstituent*len(Composite))(*Composite) + pPropertyID = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_addcomposite(self._handle, nCompositeCount, pCompositeBuffer, pPropertyID)) + return pPropertyID.value - def GetModelResourceID(self): - pModelResourceId = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resource_getmodelresourceid(self._handle, pModelResourceId)) + def RemoveComposite(self, PropertyID): + nPropertyID = ctypes.c_uint32(PropertyID) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_removecomposite(self._handle, nPropertyID)) - return pModelResourceId.value + + def GetComposite(self, PropertyID): + nPropertyID = ctypes.c_uint32(PropertyID) + nCompositeCount = ctypes.c_uint64(0) + nCompositeNeededCount = ctypes.c_uint64(0) + pCompositeBuffer = (CompositeConstituent*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getcomposite(self._handle, nPropertyID, nCompositeCount, nCompositeNeededCount, pCompositeBuffer)) + nCompositeCount = ctypes.c_uint64(nCompositeNeededCount.value) + pCompositeBuffer = (CompositeConstituent * nCompositeNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getcomposite(self._handle, nPropertyID, nCompositeCount, nCompositeNeededCount, pCompositeBuffer)) + + return [pCompositeBuffer[i] for i in range(nCompositeNeededCount.value)] -''' Class Implementation for ResourceIterator +''' Class Implementation for MultiPropertyGroup ''' -class ResourceIterator(Base): +class MultiPropertyGroup(Resource): def __init__(self, handle, wrapper): - Base.__init__(self, handle, wrapper) - def MoveNext(self): - pHasNext = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceiterator_movenext(self._handle, pHasNext)) + Resource.__init__(self, handle, wrapper) + def GetCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getcount(self._handle, pCount)) - return pHasNext.value + return pCount.value - def MovePrevious(self): - pHasPrevious = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceiterator_moveprevious(self._handle, pHasPrevious)) + def GetAllPropertyIDs(self): + nPropertyIDsCount = ctypes.c_uint64(0) + nPropertyIDsNeededCount = ctypes.c_uint64(0) + pPropertyIDsBuffer = (ctypes.c_uint32*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) + pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - return pHasPrevious.value + return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] - def GetCurrent(self): - ResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceiterator_getcurrent(self._handle, ResourceHandle)) - if ResourceHandle: - ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) - else: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + def AddMultiProperty(self, PropertyIDs): + nPropertyIDsCount = ctypes.c_uint64(len(PropertyIDs)) + pPropertyIDsBuffer = (ctypes.c_uint32*len(PropertyIDs))(*PropertyIDs) + pPropertyID = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_addmultiproperty(self._handle, nPropertyIDsCount, pPropertyIDsBuffer, pPropertyID)) - return ResourceObject + return pPropertyID.value - def Clone(self): - OutResourceIteratorHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceiterator_clone(self._handle, OutResourceIteratorHandle)) - if OutResourceIteratorHandle: - OutResourceIteratorObject = self._wrapper._polymorphicFactory(OutResourceIteratorHandle) - else: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + def SetMultiProperty(self, PropertyID, PropertyIDs): + nPropertyID = ctypes.c_uint32(PropertyID) + nPropertyIDsCount = ctypes.c_uint64(len(PropertyIDs)) + pPropertyIDsBuffer = (ctypes.c_uint32*len(PropertyIDs))(*PropertyIDs) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_setmultiproperty(self._handle, nPropertyID, nPropertyIDsCount, pPropertyIDsBuffer)) - return OutResourceIteratorObject - def Count(self): - pCount = ctypes.c_uint64() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceiterator_count(self._handle, pCount)) + def GetMultiProperty(self, PropertyID): + nPropertyID = ctypes.c_uint32(PropertyID) + nPropertyIDsCount = ctypes.c_uint64(0) + nPropertyIDsNeededCount = ctypes.c_uint64(0) + pPropertyIDsBuffer = (ctypes.c_uint32*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getmultiproperty(self._handle, nPropertyID, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) + pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getmultiproperty(self._handle, nPropertyID, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + + return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + + def RemoveMultiProperty(self, PropertyID): + nPropertyID = ctypes.c_uint32(PropertyID) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_removemultiproperty(self._handle, nPropertyID)) + + + def GetLayerCount(self): + pCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getlayercount(self._handle, pCount)) return pCount.value - - -''' Class Implementation for SliceStackIterator -''' -class SliceStackIterator(ResourceIterator): - def __init__(self, handle, wrapper): - ResourceIterator.__init__(self, handle, wrapper) - def GetCurrentSliceStack(self): - ResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_slicestackiterator_getcurrentslicestack(self._handle, ResourceHandle)) - if ResourceHandle: - ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) - else: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + def AddLayer(self, TheLayer): + pLayerIndex = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_addlayer(self._handle, TheLayer, pLayerIndex)) - return ResourceObject + return pLayerIndex.value - - -''' Class Implementation for ObjectIterator -''' -class ObjectIterator(ResourceIterator): - def __init__(self, handle, wrapper): - ResourceIterator.__init__(self, handle, wrapper) - def GetCurrentObject(self): - ResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_objectiterator_getcurrentobject(self._handle, ResourceHandle)) - if ResourceHandle: - ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) - else: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + def GetLayer(self, LayerIndex): + nLayerIndex = ctypes.c_uint32(LayerIndex) + pTheLayer = MultiPropertyLayer() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getlayer(self._handle, nLayerIndex, pTheLayer)) - return ResourceObject + return pTheLayer - - -''' Class Implementation for MeshObjectIterator -''' -class MeshObjectIterator(ResourceIterator): - def __init__(self, handle, wrapper): - ResourceIterator.__init__(self, handle, wrapper) - def GetCurrentMeshObject(self): - ResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobjectiterator_getcurrentmeshobject(self._handle, ResourceHandle)) - if ResourceHandle: - ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) - else: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + def RemoveLayer(self, LayerIndex): + nLayerIndex = ctypes.c_uint32(LayerIndex) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_removelayer(self._handle, nLayerIndex)) - return ResourceObject -''' Class Implementation for ComponentsObjectIterator +''' Class Implementation for Image3D ''' -class ComponentsObjectIterator(ResourceIterator): +class Image3D(Resource): def __init__(self, handle, wrapper): - ResourceIterator.__init__(self, handle, wrapper) - def GetCurrentComponentsObject(self): - ResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_componentsobjectiterator_getcurrentcomponentsobject(self._handle, ResourceHandle)) - if ResourceHandle: - ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) - else: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + Resource.__init__(self, handle, wrapper) + def GetName(self): + nNameBufferSize = ctypes.c_uint64(0) + nNameNeededChars = ctypes.c_uint64(0) + pNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_image3d_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) + nNameBufferSize = ctypes.c_uint64(nNameNeededChars.value) + pNameBuffer = (ctypes.c_char * (nNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_image3d_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) - return ResourceObject + return pNameBuffer.value.decode() + + def SetName(self, Name): + pName = ctypes.c_char_p(str.encode(Name)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_image3d_setname(self._handle, pName)) + + + def IsImageStack(self): + pIsImageStack = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_image3d_isimagestack(self._handle, pIsImageStack)) + + return pIsImageStack.value -''' Class Implementation for Texture2DIterator +''' Class Implementation for ImageStack ''' -class Texture2DIterator(ResourceIterator): +class ImageStack(Image3D): def __init__(self, handle, wrapper): - ResourceIterator.__init__(self, handle, wrapper) - def GetCurrentTexture2D(self): - ResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2diterator_getcurrenttexture2d(self._handle, ResourceHandle)) - if ResourceHandle: - ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + Image3D.__init__(self, handle, wrapper) + def GetRowCount(self): + pRowCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_imagestack_getrowcount(self._handle, pRowCount)) + + return pRowCount.value + + def SetRowCount(self, RowCount): + nRowCount = ctypes.c_uint32(RowCount) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_imagestack_setrowcount(self._handle, nRowCount)) + + + def GetColumnCount(self): + pColumnCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_imagestack_getcolumncount(self._handle, pColumnCount)) + + return pColumnCount.value + + def SetColumnCount(self, ColumnCount): + nColumnCount = ctypes.c_uint32(ColumnCount) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_imagestack_setcolumncount(self._handle, nColumnCount)) + + + def GetSheetCount(self): + pSheetCount = ctypes.c_uint32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_imagestack_getsheetcount(self._handle, pSheetCount)) + + return pSheetCount.value + + def GetSheet(self, Index): + nIndex = ctypes.c_uint32(Index) + SheetHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_imagestack_getsheet(self._handle, nIndex, SheetHandle)) + if SheetHandle: + SheetObject = self._wrapper._polymorphicFactory(SheetHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return ResourceObject + return SheetObject - - -''' Class Implementation for BaseMaterialGroupIterator -''' -class BaseMaterialGroupIterator(ResourceIterator): - def __init__(self, handle, wrapper): - ResourceIterator.__init__(self, handle, wrapper) - def GetCurrentBaseMaterialGroup(self): - ResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroupiterator_getcurrentbasematerialgroup(self._handle, ResourceHandle)) - if ResourceHandle: - ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + def SetSheet(self, Index, SheetObject): + nIndex = ctypes.c_uint32(Index) + SheetHandle = None + if SheetObject: + SheetHandle = SheetObject._handle else: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_imagestack_setsheet(self._handle, nIndex, SheetHandle)) - return ResourceObject - - -''' Class Implementation for ColorGroupIterator -''' -class ColorGroupIterator(ResourceIterator): - def __init__(self, handle, wrapper): - ResourceIterator.__init__(self, handle, wrapper) - def GetCurrentColorGroup(self): - ResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroupiterator_getcurrentcolorgroup(self._handle, ResourceHandle)) - if ResourceHandle: - ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + def CreateEmptySheet(self, Index, Path): + nIndex = ctypes.c_uint32(Index) + pPath = ctypes.c_char_p(str.encode(Path)) + SheetHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_imagestack_createemptysheet(self._handle, nIndex, pPath, SheetHandle)) + if SheetHandle: + SheetObject = self._wrapper._polymorphicFactory(SheetHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return ResourceObject + return SheetObject - - -''' Class Implementation for Texture2DGroupIterator -''' -class Texture2DGroupIterator(ResourceIterator): - def __init__(self, handle, wrapper): - ResourceIterator.__init__(self, handle, wrapper) - def GetCurrentTexture2DGroup(self): - ResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroupiterator_getcurrenttexture2dgroup(self._handle, ResourceHandle)) - if ResourceHandle: - ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + def CreateSheetFromBuffer(self, Index, Path, Data): + nIndex = ctypes.c_uint32(Index) + pPath = ctypes.c_char_p(str.encode(Path)) + nDataCount = ctypes.c_uint64(len(Data)) + pDataBuffer = (ctypes.c_uint8*len(Data))(*Data) + SheetHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_imagestack_createsheetfrombuffer(self._handle, nIndex, pPath, nDataCount, pDataBuffer, SheetHandle)) + if SheetHandle: + SheetObject = self._wrapper._polymorphicFactory(SheetHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return ResourceObject + return SheetObject - - -''' Class Implementation for CompositeMaterialsIterator -''' -class CompositeMaterialsIterator(ResourceIterator): - def __init__(self, handle, wrapper): - ResourceIterator.__init__(self, handle, wrapper) - def GetCurrentCompositeMaterials(self): - ResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerialsiterator_getcurrentcompositematerials(self._handle, ResourceHandle)) - if ResourceHandle: - ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + def CreateSheetFromFile(self, Index, Path, FileName): + nIndex = ctypes.c_uint32(Index) + pPath = ctypes.c_char_p(str.encode(Path)) + pFileName = ctypes.c_char_p(str.encode(FileName)) + SheetHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_imagestack_createsheetfromfile(self._handle, nIndex, pPath, pFileName, SheetHandle)) + if SheetHandle: + SheetObject = self._wrapper._polymorphicFactory(SheetHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return ResourceObject + return SheetObject -''' Class Implementation for MultiPropertyGroupIterator +''' Class Implementation for Attachment ''' -class MultiPropertyGroupIterator(ResourceIterator): +class Attachment(Base): def __init__(self, handle, wrapper): - ResourceIterator.__init__(self, handle, wrapper) - def GetCurrentMultiPropertyGroup(self): - ResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup(self._handle, ResourceHandle)) - if ResourceHandle: - ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + Base.__init__(self, handle, wrapper) + def GetPath(self): + nPathBufferSize = ctypes.c_uint64(0) + nPathNeededChars = ctypes.c_uint64(0) + pPathBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_getpath(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) + nPathBufferSize = ctypes.c_uint64(nPathNeededChars.value) + pPathBuffer = (ctypes.c_char * (nPathNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_getpath(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) + + return pPathBuffer.value.decode() + + def SetPath(self, Path): + pPath = ctypes.c_char_p(str.encode(Path)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_setpath(self._handle, pPath)) + + + def PackagePart(self): + PackagePartHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_packagepart(self._handle, PackagePartHandle)) + if PackagePartHandle: + PackagePartObject = self._wrapper._polymorphicFactory(PackagePartHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return ResourceObject + return PackagePartObject - - -''' Class Implementation for MetaData -''' -class MetaData(Base): - def __init__(self, handle, wrapper): - Base.__init__(self, handle, wrapper) - def GetNameSpace(self): - nNameSpaceBufferSize = ctypes.c_uint64(0) - nNameSpaceNeededChars = ctypes.c_uint64(0) - pNameSpaceBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getnamespace(self._handle, nNameSpaceBufferSize, nNameSpaceNeededChars, pNameSpaceBuffer)) - nNameSpaceBufferSize = ctypes.c_uint64(nNameSpaceNeededChars.value) - pNameSpaceBuffer = (ctypes.c_char * (nNameSpaceNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getnamespace(self._handle, nNameSpaceBufferSize, nNameSpaceNeededChars, pNameSpaceBuffer)) + def GetRelationShipType(self): + nPathBufferSize = ctypes.c_uint64(0) + nPathNeededChars = ctypes.c_uint64(0) + pPathBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_getrelationshiptype(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) + nPathBufferSize = ctypes.c_uint64(nPathNeededChars.value) + pPathBuffer = (ctypes.c_char * (nPathNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_getrelationshiptype(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) - return pNameSpaceBuffer.value.decode() + return pPathBuffer.value.decode() - def SetNameSpace(self, NameSpace): - pNameSpace = ctypes.c_char_p(str.encode(NameSpace)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_setnamespace(self._handle, pNameSpace)) + def SetRelationShipType(self, Path): + pPath = ctypes.c_char_p(str.encode(Path)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_setrelationshiptype(self._handle, pPath)) - def GetName(self): - nNameBufferSize = ctypes.c_uint64(0) - nNameNeededChars = ctypes.c_uint64(0) - pNameBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) - nNameBufferSize = ctypes.c_uint64(nNameNeededChars.value) - pNameBuffer = (ctypes.c_char * (nNameNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) + def WriteToFile(self, FileName): + pFileName = ctypes.c_char_p(str.encode(FileName)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_writetofile(self._handle, pFileName)) - return pNameBuffer.value.decode() - def SetName(self, Name): - pName = ctypes.c_char_p(str.encode(Name)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_setname(self._handle, pName)) + def ReadFromFile(self, FileName): + pFileName = ctypes.c_char_p(str.encode(FileName)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_readfromfile(self._handle, pFileName)) + + + def ReadFromCallback(self, TheReadCallbackFunc, StreamSize, TheSeekCallbackFunc, UserData): + nStreamSize = ctypes.c_uint64(StreamSize) + pUserData = ctypes.c_void_p(UserData) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_readfromcallback(self._handle, TheReadCallbackFunc, nStreamSize, TheSeekCallbackFunc, pUserData)) + + + def GetStreamSize(self): + pStreamSize = ctypes.c_uint64() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_getstreamsize(self._handle, pStreamSize)) + + return pStreamSize.value + + def WriteToBuffer(self): + nBufferCount = ctypes.c_uint64(0) + nBufferNeededCount = ctypes.c_uint64(0) + pBufferBuffer = (ctypes.c_uint8*0)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) + nBufferCount = ctypes.c_uint64(nBufferNeededCount.value) + pBufferBuffer = (ctypes.c_uint8 * nBufferNeededCount.value)() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) + + return [pBufferBuffer[i] for i in range(nBufferNeededCount.value)] + + def ReadFromBuffer(self, Buffer): + nBufferCount = ctypes.c_uint64(len(Buffer)) + pBufferBuffer = (ctypes.c_uint8*len(Buffer))(*Buffer) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_readfrombuffer(self._handle, nBufferCount, pBufferBuffer)) + + + + +''' Class Implementation for Texture2D +''' +class Texture2D(Resource): + def __init__(self, handle, wrapper): + Resource.__init__(self, handle, wrapper) + def GetAttachment(self): + AttachmentHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_getattachment(self._handle, AttachmentHandle)) + if AttachmentHandle: + AttachmentObject = self._wrapper._polymorphicFactory(AttachmentHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return AttachmentObject - def GetKey(self): - nKeyBufferSize = ctypes.c_uint64(0) - nKeyNeededChars = ctypes.c_uint64(0) - pKeyBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getkey(self._handle, nKeyBufferSize, nKeyNeededChars, pKeyBuffer)) - nKeyBufferSize = ctypes.c_uint64(nKeyNeededChars.value) - pKeyBuffer = (ctypes.c_char * (nKeyNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getkey(self._handle, nKeyBufferSize, nKeyNeededChars, pKeyBuffer)) + def SetAttachment(self, AttachmentObject): + AttachmentHandle = None + if AttachmentObject: + AttachmentHandle = AttachmentObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_setattachment(self._handle, AttachmentHandle)) - return pKeyBuffer.value.decode() - def GetMustPreserve(self): - pMustPreserve = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getmustpreserve(self._handle, pMustPreserve)) + def GetContentType(self): + pContentType = ctypes.c_int32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_getcontenttype(self._handle, pContentType)) - return pMustPreserve.value + return TextureType(pContentType.value) - def SetMustPreserve(self, MustPreserve): - bMustPreserve = ctypes.c_bool(MustPreserve) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_setmustpreserve(self._handle, bMustPreserve)) + def SetContentType(self, ContentType): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_setcontenttype(self._handle, ContentType)) - def GetType(self): - nTypeBufferSize = ctypes.c_uint64(0) - nTypeNeededChars = ctypes.c_uint64(0) - pTypeBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_gettype(self._handle, nTypeBufferSize, nTypeNeededChars, pTypeBuffer)) - nTypeBufferSize = ctypes.c_uint64(nTypeNeededChars.value) - pTypeBuffer = (ctypes.c_char * (nTypeNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_gettype(self._handle, nTypeBufferSize, nTypeNeededChars, pTypeBuffer)) + def GetTileStyleUV(self): + pTileStyleU = ctypes.c_int32() + pTileStyleV = ctypes.c_int32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_gettilestyleuv(self._handle, pTileStyleU, pTileStyleV)) - return pTypeBuffer.value.decode() + return TextureTileStyle(pTileStyleU.value), TextureTileStyle(pTileStyleV.value) - def SetType(self, Type): - pType = ctypes.c_char_p(str.encode(Type)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_settype(self._handle, pType)) + def SetTileStyleUV(self, TileStyleU, TileStyleV): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_settilestyleuv(self._handle, TileStyleU, TileStyleV)) - def GetValue(self): - nValueBufferSize = ctypes.c_uint64(0) - nValueNeededChars = ctypes.c_uint64(0) - pValueBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getvalue(self._handle, nValueBufferSize, nValueNeededChars, pValueBuffer)) - nValueBufferSize = ctypes.c_uint64(nValueNeededChars.value) - pValueBuffer = (ctypes.c_char * (nValueNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_getvalue(self._handle, nValueBufferSize, nValueNeededChars, pValueBuffer)) + def GetFilter(self): + pFilter = ctypes.c_int32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_getfilter(self._handle, pFilter)) - return pValueBuffer.value.decode() + return TextureFilter(pFilter.value) - def SetValue(self, Value): - pValue = ctypes.c_char_p(str.encode(Value)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadata_setvalue(self._handle, pValue)) + def SetFilter(self, Filter): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_setfilter(self._handle, Filter)) -''' Class Implementation for MetaDataGroup +''' Class Implementation for ImplicitPort ''' -class MetaDataGroup(Base): +class ImplicitPort(Base): def __init__(self, handle, wrapper): Base.__init__(self, handle, wrapper) - def GetMetaDataCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_getmetadatacount(self._handle, pCount)) - - return pCount.value - - def GetMetaData(self, Index): - nIndex = ctypes.c_uint32(Index) - MetaDataHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_getmetadata(self._handle, nIndex, MetaDataHandle)) - if MetaDataHandle: - MetaDataObject = self._wrapper._polymorphicFactory(MetaDataHandle) - else: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + def GetIdentifier(self): + nIdentifierBufferSize = ctypes.c_uint64(0) + nIdentifierNeededChars = ctypes.c_uint64(0) + pIdentifierBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitport_getidentifier(self._handle, nIdentifierBufferSize, nIdentifierNeededChars, pIdentifierBuffer)) + nIdentifierBufferSize = ctypes.c_uint64(nIdentifierNeededChars.value) + pIdentifierBuffer = (ctypes.c_char * (nIdentifierNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitport_getidentifier(self._handle, nIdentifierBufferSize, nIdentifierNeededChars, pIdentifierBuffer)) - return MetaDataObject + return pIdentifierBuffer.value.decode() - def GetMetaDataByKey(self, NameSpace, Name): - pNameSpace = ctypes.c_char_p(str.encode(NameSpace)) - pName = ctypes.c_char_p(str.encode(Name)) - MetaDataHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_getmetadatabykey(self._handle, pNameSpace, pName, MetaDataHandle)) - if MetaDataHandle: - MetaDataObject = self._wrapper._polymorphicFactory(MetaDataHandle) - else: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + def SetIdentifier(self, Identifier): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitport_setidentifier(self._handle, pIdentifier)) - return MetaDataObject - def RemoveMetaDataByIndex(self, Index): - nIndex = ctypes.c_uint32(Index) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_removemetadatabyindex(self._handle, nIndex)) + def GetDisplayName(self): + nDisplayNameBufferSize = ctypes.c_uint64(0) + nDisplayNameNeededChars = ctypes.c_uint64(0) + pDisplayNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitport_getdisplayname(self._handle, nDisplayNameBufferSize, nDisplayNameNeededChars, pDisplayNameBuffer)) + nDisplayNameBufferSize = ctypes.c_uint64(nDisplayNameNeededChars.value) + pDisplayNameBuffer = (ctypes.c_char * (nDisplayNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitport_getdisplayname(self._handle, nDisplayNameBufferSize, nDisplayNameNeededChars, pDisplayNameBuffer)) + return pDisplayNameBuffer.value.decode() - def RemoveMetaData(self, TheMetaDataObject): - TheMetaDataHandle = None - if TheMetaDataObject: - TheMetaDataHandle = TheMetaDataObject._handle - else: - raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_removemetadata(self._handle, TheMetaDataHandle)) + def SetDisplayName(self, DisplayName): + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitport_setdisplayname(self._handle, pDisplayName)) - def AddMetaData(self, NameSpace, Name, Value, Type, MustPreserve): - pNameSpace = ctypes.c_char_p(str.encode(NameSpace)) - pName = ctypes.c_char_p(str.encode(Name)) - pValue = ctypes.c_char_p(str.encode(Value)) - pType = ctypes.c_char_p(str.encode(Type)) - bMustPreserve = ctypes.c_bool(MustPreserve) - MetaDataHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_metadatagroup_addmetadata(self._handle, pNameSpace, pName, pValue, pType, bMustPreserve, MetaDataHandle)) - if MetaDataHandle: - MetaDataObject = self._wrapper._polymorphicFactory(MetaDataHandle) - else: - raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + def SetType(self, ImplicitPortType): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitport_settype(self._handle, ImplicitPortType)) - return MetaDataObject - - -''' Class Implementation for Object -''' -class Object(Resource): - def __init__(self, handle, wrapper): - Resource.__init__(self, handle, wrapper) def GetType(self): - pObjectType = ctypes.c_int32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_gettype(self._handle, pObjectType)) + pImplicitPortType = ctypes.c_int32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitport_gettype(self._handle, pImplicitPortType)) - return ObjectType(pObjectType.value) + return ImplicitPortType(pImplicitPortType.value) - def SetType(self, ObjectType): - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_settype(self._handle, ObjectType)) + def GetReference(self): + nReferenceBufferSize = ctypes.c_uint64(0) + nReferenceNeededChars = ctypes.c_uint64(0) + pReferenceBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitport_getreference(self._handle, nReferenceBufferSize, nReferenceNeededChars, pReferenceBuffer)) + nReferenceBufferSize = ctypes.c_uint64(nReferenceNeededChars.value) + pReferenceBuffer = (ctypes.c_char * (nReferenceNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitport_getreference(self._handle, nReferenceBufferSize, nReferenceNeededChars, pReferenceBuffer)) + return pReferenceBuffer.value.decode() - def GetName(self): - nNameBufferSize = ctypes.c_uint64(0) - nNameNeededChars = ctypes.c_uint64(0) - pNameBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) - nNameBufferSize = ctypes.c_uint64(nNameNeededChars.value) - pNameBuffer = (ctypes.c_char * (nNameNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) + def SetReference(self, Reference): + pReference = ctypes.c_char_p(str.encode(Reference)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitport_setreference(self._handle, pReference)) - return pNameBuffer.value.decode() - def SetName(self, Name): - pName = ctypes.c_char_p(str.encode(Name)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_setname(self._handle, pName)) + + +''' Class Implementation for Iterator +''' +class Iterator(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def MoveNext(self): + pHasNext = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_iterator_movenext(self._handle, pHasNext)) + return pHasNext.value - def GetPartNumber(self): - nPartNumberBufferSize = ctypes.c_uint64(0) - nPartNumberNeededChars = ctypes.c_uint64(0) - pPartNumberBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getpartnumber(self._handle, nPartNumberBufferSize, nPartNumberNeededChars, pPartNumberBuffer)) - nPartNumberBufferSize = ctypes.c_uint64(nPartNumberNeededChars.value) - pPartNumberBuffer = (ctypes.c_char * (nPartNumberNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getpartnumber(self._handle, nPartNumberBufferSize, nPartNumberNeededChars, pPartNumberBuffer)) + def MovePrevious(self): + pHasPrevious = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_iterator_moveprevious(self._handle, pHasPrevious)) - return pPartNumberBuffer.value.decode() + return pHasPrevious.value - def SetPartNumber(self, PartNumber): - pPartNumber = ctypes.c_char_p(str.encode(PartNumber)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_setpartnumber(self._handle, pPartNumber)) + def Count(self): + pCount = ctypes.c_uint64() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_iterator_count(self._handle, pCount)) + return pCount.value - def IsMeshObject(self): - pIsMeshObject = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_ismeshobject(self._handle, pIsMeshObject)) + + +''' Class Implementation for ImplicitPortIterator +''' +class ImplicitPortIterator(Iterator): + def __init__(self, handle, wrapper): + Iterator.__init__(self, handle, wrapper) + def GetCurrent(self): + PortHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitportiterator_getcurrent(self._handle, PortHandle)) + if PortHandle: + PortObject = self._wrapper._polymorphicFactory(PortHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pIsMeshObject.value + return PortObject - def IsComponentsObject(self): - pIsComponentsObject = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_iscomponentsobject(self._handle, pIsComponentsObject)) + + +''' Class Implementation for ImplicitNode +''' +class ImplicitNode(Base): + def __init__(self, handle, wrapper): + Base.__init__(self, handle, wrapper) + def GetIdentifier(self): + nIdentifierBufferSize = ctypes.c_uint64(0) + nIdentifierNeededChars = ctypes.c_uint64(0) + pIdentifierBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_getidentifier(self._handle, nIdentifierBufferSize, nIdentifierNeededChars, pIdentifierBuffer)) + nIdentifierBufferSize = ctypes.c_uint64(nIdentifierNeededChars.value) + pIdentifierBuffer = (ctypes.c_char * (nIdentifierNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_getidentifier(self._handle, nIdentifierBufferSize, nIdentifierNeededChars, pIdentifierBuffer)) - return pIsComponentsObject.value + return pIdentifierBuffer.value.decode() - def IsValid(self): - pIsValid = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_isvalid(self._handle, pIsValid)) + def SetIdentifier(self, Identifier): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_setidentifier(self._handle, pIdentifier)) - return pIsValid.value - def SetAttachmentAsThumbnail(self, AttachmentObject): - AttachmentHandle = None - if AttachmentObject: - AttachmentHandle = AttachmentObject._handle - else: - raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_setattachmentasthumbnail(self._handle, AttachmentHandle)) + def GetDisplayName(self): + nDisplayNameBufferSize = ctypes.c_uint64(0) + nDisplayNameNeededChars = ctypes.c_uint64(0) + pDisplayNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_getdisplayname(self._handle, nDisplayNameBufferSize, nDisplayNameNeededChars, pDisplayNameBuffer)) + nDisplayNameBufferSize = ctypes.c_uint64(nDisplayNameNeededChars.value) + pDisplayNameBuffer = (ctypes.c_char * (nDisplayNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_getdisplayname(self._handle, nDisplayNameBufferSize, nDisplayNameNeededChars, pDisplayNameBuffer)) + return pDisplayNameBuffer.value.decode() - def GetThumbnailAttachment(self): - AttachmentHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getthumbnailattachment(self._handle, AttachmentHandle)) - if AttachmentHandle: - AttachmentObject = self._wrapper._polymorphicFactory(AttachmentHandle) - else: - AttachmentObject = None + def SetDisplayName(self, DisplayName): + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_setdisplayname(self._handle, pDisplayName)) - return AttachmentObject - def ClearThumbnailAttachment(self): - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_clearthumbnailattachment(self._handle)) + def GetTag(self): + nTagBufferSize = ctypes.c_uint64(0) + nTagNeededChars = ctypes.c_uint64(0) + pTagBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_gettag(self._handle, nTagBufferSize, nTagNeededChars, pTagBuffer)) + nTagBufferSize = ctypes.c_uint64(nTagNeededChars.value) + pTagBuffer = (ctypes.c_char * (nTagNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_gettag(self._handle, nTagBufferSize, nTagNeededChars, pTagBuffer)) + return pTagBuffer.value.decode() - def GetOutbox(self): - pOutbox = Box() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getoutbox(self._handle, pOutbox)) + def SetTag(self, Tag): + pTag = ctypes.c_char_p(str.encode(Tag)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_settag(self._handle, pTag)) - return pOutbox - def GetUUID(self): - pHasUUID = ctypes.c_bool() - nUUIDBufferSize = ctypes.c_uint64(0) - nUUIDNeededChars = ctypes.c_uint64(0) - pUUIDBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getuuid(self._handle, pHasUUID, nUUIDBufferSize, nUUIDNeededChars, pUUIDBuffer)) - nUUIDBufferSize = ctypes.c_uint64(nUUIDNeededChars.value) - pUUIDBuffer = (ctypes.c_char * (nUUIDNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getuuid(self._handle, pHasUUID, nUUIDBufferSize, nUUIDNeededChars, pUUIDBuffer)) + def GetNodeType(self): + pType = ctypes.c_int32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_getnodetype(self._handle, pType)) - return pHasUUID.value, pUUIDBuffer.value.decode() + return ImplicitNodeType(pType.value) - def SetUUID(self, UUID): - pUUID = ctypes.c_char_p(str.encode(UUID)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_setuuid(self._handle, pUUID)) + def AddInput(self, Identifier, DisplayName): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + PortHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_addinput(self._handle, pIdentifier, pDisplayName, PortHandle)) + if PortHandle: + PortObject = self._wrapper._polymorphicFactory(PortHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return PortObject - def GetMetaDataGroup(self): - MetaDataGroupHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getmetadatagroup(self._handle, MetaDataGroupHandle)) - if MetaDataGroupHandle: - MetaDataGroupObject = self._wrapper._polymorphicFactory(MetaDataGroupHandle) + def GetInputs(self): + IteratorHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_getinputs(self._handle, IteratorHandle)) + if IteratorHandle: + IteratorObject = self._wrapper._polymorphicFactory(IteratorHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return IteratorObject + + def AddOutput(self, Identifier, DisplayName): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + PortHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_addoutput(self._handle, pIdentifier, pDisplayName, PortHandle)) + if PortHandle: + PortObject = self._wrapper._polymorphicFactory(PortHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return MetaDataGroupObject + return PortObject - def SetSlicesMeshResolution(self, MeshResolution): - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_setslicesmeshresolution(self._handle, MeshResolution)) + def GetOutputs(self): + IteratorHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_getoutputs(self._handle, IteratorHandle)) + if IteratorHandle: + IteratorObject = self._wrapper._polymorphicFactory(IteratorHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return IteratorObject - def GetSlicesMeshResolution(self): - pMeshResolution = ctypes.c_int32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getslicesmeshresolution(self._handle, pMeshResolution)) + def FindInput(self, Identifier): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + InputHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_findinput(self._handle, pIdentifier, InputHandle)) + if InputHandle: + InputObject = self._wrapper._polymorphicFactory(InputHandle) + else: + InputObject = None - return SlicesMeshResolution(pMeshResolution.value) + return InputObject - def HasSlices(self, Recursive): - bRecursive = ctypes.c_bool(Recursive) - pHasSlices = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_hasslices(self._handle, bRecursive, pHasSlices)) + def FindOutput(self, Identifier): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + OutputHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_findoutput(self._handle, pIdentifier, OutputHandle)) + if OutputHandle: + OutputObject = self._wrapper._polymorphicFactory(OutputHandle) + else: + OutputObject = None - return pHasSlices.value + return OutputObject - def ClearSliceStack(self): - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_clearslicestack(self._handle)) + def AreTypesValid(self): + pValid = ctypes.c_bool() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitnode_aretypesvalid(self._handle, pValid)) + return pValid.value - def GetSliceStack(self): - SliceStackInstanceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_getslicestack(self._handle, SliceStackInstanceHandle)) - if SliceStackInstanceHandle: - SliceStackInstanceObject = self._wrapper._polymorphicFactory(SliceStackInstanceHandle) + + +''' Class Implementation for OneInputNode +''' +class OneInputNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def GetInputA(self): + InputHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_oneinputnode_getinputa(self._handle, InputHandle)) + if InputHandle: + InputObject = self._wrapper._polymorphicFactory(InputHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return SliceStackInstanceObject + return InputObject - def AssignSliceStack(self, SliceStackInstanceObject): - SliceStackInstanceHandle = None - if SliceStackInstanceObject: - SliceStackInstanceHandle = SliceStackInstanceObject._handle + def GetOutputResult(self): + ResultHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_oneinputnode_getoutputresult(self._handle, ResultHandle)) + if ResultHandle: + ResultObject = self._wrapper._polymorphicFactory(ResultHandle) else: - raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_object_assignslicestack(self._handle, SliceStackInstanceHandle)) + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return ResultObject -''' Class Implementation for MeshObject +''' Class Implementation for SinNode ''' -class MeshObject(Object): +class SinNode(OneInputNode): def __init__(self, handle, wrapper): - Object.__init__(self, handle, wrapper) - def GetVertexCount(self): - pVertexCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getvertexcount(self._handle, pVertexCount)) - - return pVertexCount.value - - def GetTriangleCount(self): - pVertexCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettrianglecount(self._handle, pVertexCount)) - - return pVertexCount.value - - def GetVertex(self, Index): - nIndex = ctypes.c_uint32(Index) - pCoordinates = Position() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getvertex(self._handle, nIndex, pCoordinates)) - - return pCoordinates - - def SetVertex(self, Index, Coordinates): - nIndex = ctypes.c_uint32(Index) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_setvertex(self._handle, nIndex, Coordinates)) + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for CosNode +''' +class CosNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for TanNode +''' +class TanNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for ArcSinNode +''' +class ArcSinNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for ArcCosNode +''' +class ArcCosNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for ArcTanNode +''' +class ArcTanNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for SinhNode +''' +class SinhNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for CoshNode +''' +class CoshNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for TanhNode +''' +class TanhNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for RoundNode +''' +class RoundNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for CeilNode +''' +class CeilNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for FloorNode +''' +class FloorNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for SignNode +''' +class SignNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for FractNode +''' +class FractNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for AbsNode +''' +class AbsNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for ExpNode +''' +class ExpNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for LogNode +''' +class LogNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for Log2Node +''' +class Log2Node(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for Log10Node +''' +class Log10Node(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for LengthNode +''' +class LengthNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for TransposeNode +''' +class TransposeNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for InverseNode +''' +class InverseNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for SqrtNode +''' +class SqrtNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for ResourceIdNode +''' +class ResourceIdNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def SetResource(self, ResourceObject): + ResourceHandle = None + if ResourceObject: + ResourceHandle = ResourceObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceidnode_setresource(self._handle, ResourceHandle)) - def AddVertex(self, Coordinates): - pNewIndex = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_addvertex(self._handle, Coordinates, pNewIndex)) + def GetResource(self): + ResourceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceidnode_getresource(self._handle, ResourceHandle)) + if ResourceHandle: + ResourceObject = self._wrapper._polymorphicFactory(ResourceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pNewIndex.value + return ResourceObject - def GetVertices(self): - nVerticesCount = ctypes.c_uint64(0) - nVerticesNeededCount = ctypes.c_uint64(0) - pVerticesBuffer = (Position*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getvertices(self._handle, nVerticesCount, nVerticesNeededCount, pVerticesBuffer)) - nVerticesCount = ctypes.c_uint64(nVerticesNeededCount.value) - pVerticesBuffer = (Position * nVerticesNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getvertices(self._handle, nVerticesCount, nVerticesNeededCount, pVerticesBuffer)) + def GetOutputValue(self): + ValueHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_resourceidnode_getoutputvalue(self._handle, ValueHandle)) + if ValueHandle: + ValueObject = self._wrapper._polymorphicFactory(ValueHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pVerticesBuffer[i] for i in range(nVerticesNeededCount.value)] + return ValueObject - def GetTriangle(self, Index): - nIndex = ctypes.c_uint32(Index) - pIndices = Triangle() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettriangle(self._handle, nIndex, pIndices)) + + +''' Class Implementation for TwoInputNode +''' +class TwoInputNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + def GetInputB(self): + BHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_twoinputnode_getinputb(self._handle, BHandle)) + if BHandle: + BObject = self._wrapper._polymorphicFactory(BHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pIndices + return BObject - def SetTriangle(self, Index, Indices): - nIndex = ctypes.c_uint32(Index) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_settriangle(self._handle, nIndex, Indices)) + + +''' Class Implementation for AdditionNode +''' +class AdditionNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for SubtractionNode +''' +class SubtractionNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for MultiplicationNode +''' +class MultiplicationNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for DivisionNode +''' +class DivisionNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for DotNode +''' +class DotNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for CrossNode +''' +class CrossNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for ArcTan2Node +''' +class ArcTan2Node(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for MatVecMultiplicationNode +''' +class MatVecMultiplicationNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for MinNode +''' +class MinNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for MaxNode +''' +class MaxNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for FmodNode +''' +class FmodNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for ModNode +''' +class ModNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for PowNode +''' +class PowNode(TwoInputNode): + def __init__(self, handle, wrapper): + TwoInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for SelectNode +''' +class SelectNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + def GetInputB(self): + BHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_selectnode_getinputb(self._handle, BHandle)) + if BHandle: + BObject = self._wrapper._polymorphicFactory(BHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return BObject - def AddTriangle(self, Indices): - pNewIndex = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_addtriangle(self._handle, Indices, pNewIndex)) + def GetInputC(self): + CHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_selectnode_getinputc(self._handle, CHandle)) + if CHandle: + CObject = self._wrapper._polymorphicFactory(CHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pNewIndex.value + return CObject - def GetTriangleIndices(self): - nIndicesCount = ctypes.c_uint64(0) - nIndicesNeededCount = ctypes.c_uint64(0) - pIndicesBuffer = (Triangle*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettriangleindices(self._handle, nIndicesCount, nIndicesNeededCount, pIndicesBuffer)) - nIndicesCount = ctypes.c_uint64(nIndicesNeededCount.value) - pIndicesBuffer = (Triangle * nIndicesNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettriangleindices(self._handle, nIndicesCount, nIndicesNeededCount, pIndicesBuffer)) + def GetInputD(self): + DHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_selectnode_getinputd(self._handle, DHandle)) + if DHandle: + DObject = self._wrapper._polymorphicFactory(DHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pIndicesBuffer[i] for i in range(nIndicesNeededCount.value)] + return DObject - def SetObjectLevelProperty(self, UniqueResourceID, PropertyID): - nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) - nPropertyID = ctypes.c_uint32(PropertyID) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_setobjectlevelproperty(self._handle, nUniqueResourceID, nPropertyID)) + + +''' Class Implementation for ClampNode +''' +class ClampNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + def GetInputMin(self): + MinHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_clampnode_getinputmin(self._handle, MinHandle)) + if MinHandle: + MinObject = self._wrapper._polymorphicFactory(MinHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return MinObject - def GetObjectLevelProperty(self): - pUniqueResourceID = ctypes.c_uint32() - pPropertyID = ctypes.c_uint32() - pHasObjectLevelProperty = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getobjectlevelproperty(self._handle, pUniqueResourceID, pPropertyID, pHasObjectLevelProperty)) + def GetInputMax(self): + MaxHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_clampnode_getinputmax(self._handle, MaxHandle)) + if MaxHandle: + MaxObject = self._wrapper._polymorphicFactory(MaxHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pUniqueResourceID.value, pPropertyID.value, pHasObjectLevelProperty.value + return MaxObject - def SetTriangleProperties(self, Index, Properties): - nIndex = ctypes.c_uint32(Index) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_settriangleproperties(self._handle, nIndex, Properties)) + + +''' Class Implementation for ComposeVectorNode +''' +class ComposeVectorNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def GetInputX(self): + XHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composevectornode_getinputx(self._handle, XHandle)) + if XHandle: + XObject = self._wrapper._polymorphicFactory(XHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return XObject - def GetTriangleProperties(self, Index): - nIndex = ctypes.c_uint32(Index) - pProperty = TriangleProperties() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_gettriangleproperties(self._handle, nIndex, pProperty)) + def GetInputY(self): + YHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composevectornode_getinputy(self._handle, YHandle)) + if YHandle: + YObject = self._wrapper._polymorphicFactory(YHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pProperty + return YObject - def SetAllTriangleProperties(self, PropertiesArray): - nPropertiesArrayCount = ctypes.c_uint64(len(PropertiesArray)) - pPropertiesArrayBuffer = (TriangleProperties*len(PropertiesArray))(*PropertiesArray) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_setalltriangleproperties(self._handle, nPropertiesArrayCount, pPropertiesArrayBuffer)) + def GetInputZ(self): + ZHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composevectornode_getinputz(self._handle, ZHandle)) + if ZHandle: + ZObject = self._wrapper._polymorphicFactory(ZHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return ZObject - def GetAllTriangleProperties(self): - nPropertiesArrayCount = ctypes.c_uint64(0) - nPropertiesArrayNeededCount = ctypes.c_uint64(0) - pPropertiesArrayBuffer = (TriangleProperties*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getalltriangleproperties(self._handle, nPropertiesArrayCount, nPropertiesArrayNeededCount, pPropertiesArrayBuffer)) - nPropertiesArrayCount = ctypes.c_uint64(nPropertiesArrayNeededCount.value) - pPropertiesArrayBuffer = (TriangleProperties * nPropertiesArrayNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_getalltriangleproperties(self._handle, nPropertiesArrayCount, nPropertiesArrayNeededCount, pPropertiesArrayBuffer)) + def GetOutputResult(self): + ResultHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composevectornode_getoutputresult(self._handle, ResultHandle)) + if ResultHandle: + ResultObject = self._wrapper._polymorphicFactory(ResultHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pPropertiesArrayBuffer[i] for i in range(nPropertiesArrayNeededCount.value)] + return ResultObject - def ClearAllProperties(self): - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_clearallproperties(self._handle)) + + +''' Class Implementation for VectorFromScalarNode +''' +class VectorFromScalarNode(OneInputNode): + def __init__(self, handle, wrapper): + OneInputNode.__init__(self, handle, wrapper) + + +''' Class Implementation for DecomposeVectorNode +''' +class DecomposeVectorNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def GetInputA(self): + AHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_decomposevectornode_getinputa(self._handle, AHandle)) + if AHandle: + AObject = self._wrapper._polymorphicFactory(AHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return AObject - def SetGeometry(self, Vertices, Indices): - nVerticesCount = ctypes.c_uint64(len(Vertices)) - pVerticesBuffer = (Position*len(Vertices))(*Vertices) - nIndicesCount = ctypes.c_uint64(len(Indices)) - pIndicesBuffer = (Triangle*len(Indices))(*Indices) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_setgeometry(self._handle, nVerticesCount, pVerticesBuffer, nIndicesCount, pIndicesBuffer)) + def GetOutputX(self): + XHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_decomposevectornode_getoutputx(self._handle, XHandle)) + if XHandle: + XObject = self._wrapper._polymorphicFactory(XHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return XObject - def IsManifoldAndOriented(self): - pIsManifoldAndOriented = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_ismanifoldandoriented(self._handle, pIsManifoldAndOriented)) + def GetOutputY(self): + YHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_decomposevectornode_getoutputy(self._handle, YHandle)) + if YHandle: + YObject = self._wrapper._polymorphicFactory(YHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pIsManifoldAndOriented.value + return YObject - def BeamLattice(self): - TheBeamLatticeHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshobject_beamlattice(self._handle, TheBeamLatticeHandle)) - if TheBeamLatticeHandle: - TheBeamLatticeObject = self._wrapper._polymorphicFactory(TheBeamLatticeHandle) + def GetOutputZ(self): + ZHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_decomposevectornode_getoutputz(self._handle, ZHandle)) + if ZHandle: + ZObject = self._wrapper._polymorphicFactory(ZHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return TheBeamLatticeObject + return ZObject -''' Class Implementation for BeamLattice +''' Class Implementation for ComposeMatrixNode ''' -class BeamLattice(Base): +class ComposeMatrixNode(ImplicitNode): def __init__(self, handle, wrapper): - Base.__init__(self, handle, wrapper) - def GetMinLength(self): - pMinLength = ctypes.c_double() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getminlength(self._handle, pMinLength)) + ImplicitNode.__init__(self, handle, wrapper) + def GetInputM00(self): + M00Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm00(self._handle, M00Handle)) + if M00Handle: + M00Object = self._wrapper._polymorphicFactory(M00Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pMinLength.value + return M00Object - def SetMinLength(self, MinLength): - dMinLength = ctypes.c_double(MinLength) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setminlength(self._handle, dMinLength)) + def GetInputM01(self): + M01Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm01(self._handle, M01Handle)) + if M01Handle: + M01Object = self._wrapper._polymorphicFactory(M01Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return M01Object - def GetClipping(self): - pClipMode = ctypes.c_int32() - pUniqueResourceID = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getclipping(self._handle, pClipMode, pUniqueResourceID)) + def GetInputM02(self): + M02Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm02(self._handle, M02Handle)) + if M02Handle: + M02Object = self._wrapper._polymorphicFactory(M02Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return BeamLatticeClipMode(pClipMode.value), pUniqueResourceID.value + return M02Object - def SetClipping(self, ClipMode, UniqueResourceID): - nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setclipping(self._handle, ClipMode, nUniqueResourceID)) + def GetInputM03(self): + M03Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm03(self._handle, M03Handle)) + if M03Handle: + M03Object = self._wrapper._polymorphicFactory(M03Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return M03Object - def GetRepresentation(self): - pHasRepresentation = ctypes.c_bool() - pUniqueResourceID = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getrepresentation(self._handle, pHasRepresentation, pUniqueResourceID)) + def GetInputM10(self): + M10Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm10(self._handle, M10Handle)) + if M10Handle: + M10Object = self._wrapper._polymorphicFactory(M10Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pHasRepresentation.value, pUniqueResourceID.value + return M10Object - def SetRepresentation(self, UniqueResourceID): - nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setrepresentation(self._handle, nUniqueResourceID)) + def GetInputM11(self): + M11Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm11(self._handle, M11Handle)) + if M11Handle: + M11Object = self._wrapper._polymorphicFactory(M11Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return M11Object - def GetBallOptions(self): - pBallMode = ctypes.c_int32() - pBallRadius = ctypes.c_double() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getballoptions(self._handle, pBallMode, pBallRadius)) + def GetInputM12(self): + M12Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm12(self._handle, M12Handle)) + if M12Handle: + M12Object = self._wrapper._polymorphicFactory(M12Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return BeamLatticeBallMode(pBallMode.value), pBallRadius.value + return M12Object - def SetBallOptions(self, BallMode, BallRadius): - dBallRadius = ctypes.c_double(BallRadius) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setballoptions(self._handle, BallMode, dBallRadius)) + def GetInputM13(self): + M13Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm13(self._handle, M13Handle)) + if M13Handle: + M13Object = self._wrapper._polymorphicFactory(M13Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return M13Object - def GetBeamCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeamcount(self._handle, pCount)) + def GetInputM20(self): + M20Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm20(self._handle, M20Handle)) + if M20Handle: + M20Object = self._wrapper._polymorphicFactory(M20Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pCount.value + return M20Object - def GetBeam(self, Index): - nIndex = ctypes.c_uint32(Index) - pBeamInfo = Beam() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeam(self._handle, nIndex, pBeamInfo)) + def GetInputM21(self): + M21Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm21(self._handle, M21Handle)) + if M21Handle: + M21Object = self._wrapper._polymorphicFactory(M21Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pBeamInfo + return M21Object - def AddBeam(self, BeamInfo): - pIndex = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_addbeam(self._handle, BeamInfo, pIndex)) + def GetInputM22(self): + M22Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm22(self._handle, M22Handle)) + if M22Handle: + M22Object = self._wrapper._polymorphicFactory(M22Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pIndex.value + return M22Object - def SetBeam(self, Index, BeamInfo): - nIndex = ctypes.c_uint32(Index) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setbeam(self._handle, nIndex, BeamInfo)) + def GetInputM23(self): + M23Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm23(self._handle, M23Handle)) + if M23Handle: + M23Object = self._wrapper._polymorphicFactory(M23Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return M23Object - def SetBeams(self, BeamInfo): - nBeamInfoCount = ctypes.c_uint64(len(BeamInfo)) - pBeamInfoBuffer = (Beam*len(BeamInfo))(*BeamInfo) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setbeams(self._handle, nBeamInfoCount, pBeamInfoBuffer)) + def GetInputM30(self): + M30Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm30(self._handle, M30Handle)) + if M30Handle: + M30Object = self._wrapper._polymorphicFactory(M30Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return M30Object - def GetBeams(self): - nBeamInfoCount = ctypes.c_uint64(0) - nBeamInfoNeededCount = ctypes.c_uint64(0) - pBeamInfoBuffer = (Beam*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeams(self._handle, nBeamInfoCount, nBeamInfoNeededCount, pBeamInfoBuffer)) - nBeamInfoCount = ctypes.c_uint64(nBeamInfoNeededCount.value) - pBeamInfoBuffer = (Beam * nBeamInfoNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeams(self._handle, nBeamInfoCount, nBeamInfoNeededCount, pBeamInfoBuffer)) + def GetInputM31(self): + M31Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm31(self._handle, M31Handle)) + if M31Handle: + M31Object = self._wrapper._polymorphicFactory(M31Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pBeamInfoBuffer[i] for i in range(nBeamInfoNeededCount.value)] + return M31Object - def GetBallCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getballcount(self._handle, pCount)) + def GetInputM32(self): + M32Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm32(self._handle, M32Handle)) + if M32Handle: + M32Object = self._wrapper._polymorphicFactory(M32Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pCount.value + return M32Object - def GetBall(self, Index): - nIndex = ctypes.c_uint32(Index) - pBallInfo = Ball() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getball(self._handle, nIndex, pBallInfo)) + def GetInputM33(self): + M33Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getinputm33(self._handle, M33Handle)) + if M33Handle: + M33Object = self._wrapper._polymorphicFactory(M33Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pBallInfo + return M33Object - def AddBall(self, BallInfo): - pIndex = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_addball(self._handle, BallInfo, pIndex)) + def GetOutputResult(self): + ResultHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_composematrixnode_getoutputresult(self._handle, ResultHandle)) + if ResultHandle: + ResultObject = self._wrapper._polymorphicFactory(ResultHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pIndex.value + return ResultObject - def SetBall(self, Index, BallInfo): - nIndex = ctypes.c_uint32(Index) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setball(self._handle, nIndex, BallInfo)) + + +''' Class Implementation for MatrixFromRowsNode +''' +class MatrixFromRowsNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def GetInputA(self): + Row0Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_matrixfromrowsnode_getinputa(self._handle, Row0Handle)) + if Row0Handle: + Row0Object = self._wrapper._polymorphicFactory(Row0Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return Row0Object - def SetBalls(self, BallInfo): - nBallInfoCount = ctypes.c_uint64(len(BallInfo)) - pBallInfoBuffer = (Ball*len(BallInfo))(*BallInfo) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_setballs(self._handle, nBallInfoCount, pBallInfoBuffer)) + def GetInputB(self): + Row1Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_matrixfromrowsnode_getinputb(self._handle, Row1Handle)) + if Row1Handle: + Row1Object = self._wrapper._polymorphicFactory(Row1Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return Row1Object - def GetBalls(self): - nBallInfoCount = ctypes.c_uint64(0) - nBallInfoNeededCount = ctypes.c_uint64(0) - pBallInfoBuffer = (Ball*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getballs(self._handle, nBallInfoCount, nBallInfoNeededCount, pBallInfoBuffer)) - nBallInfoCount = ctypes.c_uint64(nBallInfoNeededCount.value) - pBallInfoBuffer = (Ball * nBallInfoNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getballs(self._handle, nBallInfoCount, nBallInfoNeededCount, pBallInfoBuffer)) + def GetInputC(self): + Row2Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_matrixfromrowsnode_getinputc(self._handle, Row2Handle)) + if Row2Handle: + Row2Object = self._wrapper._polymorphicFactory(Row2Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pBallInfoBuffer[i] for i in range(nBallInfoNeededCount.value)] + return Row2Object - def GetBeamSetCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeamsetcount(self._handle, pCount)) + def GetInputD(self): + Row3Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_matrixfromrowsnode_getinputd(self._handle, Row3Handle)) + if Row3Handle: + Row3Object = self._wrapper._polymorphicFactory(Row3Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return Row3Object + + def GetOutputResult(self): + ResultHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_matrixfromrowsnode_getoutputresult(self._handle, ResultHandle)) + if ResultHandle: + ResultObject = self._wrapper._polymorphicFactory(ResultHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResultObject + + + +''' Class Implementation for MatrixFromColumnsNode +''' +class MatrixFromColumnsNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def GetInputA(self): + Column0Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_matrixfromcolumnsnode_getinputa(self._handle, Column0Handle)) + if Column0Handle: + Column0Object = self._wrapper._polymorphicFactory(Column0Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return Column0Object + + def GetInputB(self): + Column1Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_matrixfromcolumnsnode_getinputb(self._handle, Column1Handle)) + if Column1Handle: + Column1Object = self._wrapper._polymorphicFactory(Column1Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return Column1Object + + def GetInputC(self): + Column2Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_matrixfromcolumnsnode_getinputc(self._handle, Column2Handle)) + if Column2Handle: + Column2Object = self._wrapper._polymorphicFactory(Column2Handle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pCount.value + return Column2Object - def AddBeamSet(self): - BeamSetHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_addbeamset(self._handle, BeamSetHandle)) - if BeamSetHandle: - BeamSetObject = self._wrapper._polymorphicFactory(BeamSetHandle) + def GetInputD(self): + Column3Handle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_matrixfromcolumnsnode_getinputd(self._handle, Column3Handle)) + if Column3Handle: + Column3Object = self._wrapper._polymorphicFactory(Column3Handle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return BeamSetObject + return Column3Object - def GetBeamSet(self, Index): - nIndex = ctypes.c_uint32(Index) - BeamSetHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamlattice_getbeamset(self._handle, nIndex, BeamSetHandle)) - if BeamSetHandle: - BeamSetObject = self._wrapper._polymorphicFactory(BeamSetHandle) + def GetOutputResult(self): + ResultHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_matrixfromcolumnsnode_getoutputresult(self._handle, ResultHandle)) + if ResultHandle: + ResultObject = self._wrapper._polymorphicFactory(ResultHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return BeamSetObject + return ResultObject -''' Class Implementation for Component +''' Class Implementation for ConstantNode ''' -class Component(Base): +class ConstantNode(ImplicitNode): def __init__(self, handle, wrapper): - Base.__init__(self, handle, wrapper) - def GetObjectResource(self): - ObjectResourceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_getobjectresource(self._handle, ObjectResourceHandle)) - if ObjectResourceHandle: - ObjectResourceObject = self._wrapper._polymorphicFactory(ObjectResourceHandle) + ImplicitNode.__init__(self, handle, wrapper) + def SetConstant(self, Value): + dValue = ctypes.c_double(Value) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_constantnode_setconstant(self._handle, dValue)) + + + def GetConstant(self): + pValue = ctypes.c_double() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_constantnode_getconstant(self._handle, pValue)) + + return pValue.value + + def GetOutputValue(self): + ValueHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_constantnode_getoutputvalue(self._handle, ValueHandle)) + if ValueHandle: + ValueObject = self._wrapper._polymorphicFactory(ValueHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return ObjectResourceObject + return ValueObject - def GetObjectResourceID(self): - pUniqueResourceID = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_getobjectresourceid(self._handle, pUniqueResourceID)) + + +''' Class Implementation for ConstVecNode +''' +class ConstVecNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def SetVector(self, Value): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_constvecnode_setvector(self._handle, Value)) - return pUniqueResourceID.value - def GetUUID(self): - pHasUUID = ctypes.c_bool() - nUUIDBufferSize = ctypes.c_uint64(0) - nUUIDNeededChars = ctypes.c_uint64(0) - pUUIDBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_getuuid(self._handle, pHasUUID, nUUIDBufferSize, nUUIDNeededChars, pUUIDBuffer)) - nUUIDBufferSize = ctypes.c_uint64(nUUIDNeededChars.value) - pUUIDBuffer = (ctypes.c_char * (nUUIDNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_getuuid(self._handle, pHasUUID, nUUIDBufferSize, nUUIDNeededChars, pUUIDBuffer)) + def GetVector(self): + pValue = Vector() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_constvecnode_getvector(self._handle, pValue)) - return pHasUUID.value, pUUIDBuffer.value.decode() + return pValue - def SetUUID(self, UUID): - pUUID = ctypes.c_char_p(str.encode(UUID)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_setuuid(self._handle, pUUID)) + def GetOutputVector(self): + VectorHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_constvecnode_getoutputvector(self._handle, VectorHandle)) + if VectorHandle: + VectorObject = self._wrapper._polymorphicFactory(VectorHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return VectorObject - def HasTransform(self): - pHasTransform = ctypes.c_bool() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_hastransform(self._handle, pHasTransform)) + + +''' Class Implementation for ConstMatNode +''' +class ConstMatNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def SetMatrix(self, Value): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_constmatnode_setmatrix(self._handle, Value)) - return pHasTransform.value - def GetTransform(self): - pTransform = Transform() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_gettransform(self._handle, pTransform)) + def GetMatrix(self): + pValue = Matrix4x4() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_constmatnode_getmatrix(self._handle, pValue)) - return pTransform + return pValue - def SetTransform(self, Transform): - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_component_settransform(self._handle, Transform)) + def GetOutputMatrix(self): + MatrixHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_constmatnode_getoutputmatrix(self._handle, MatrixHandle)) + if MatrixHandle: + MatrixObject = self._wrapper._polymorphicFactory(MatrixHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return MatrixObject -''' Class Implementation for ComponentsObject +''' Class Implementation for MeshNode ''' -class ComponentsObject(Object): +class MeshNode(ImplicitNode): def __init__(self, handle, wrapper): - Object.__init__(self, handle, wrapper) - def AddComponent(self, ObjectResourceObject, Transform): - ObjectResourceHandle = None - if ObjectResourceObject: - ObjectResourceHandle = ObjectResourceObject._handle + ImplicitNode.__init__(self, handle, wrapper) + def GetInputMesh(self): + MeshHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshnode_getinputmesh(self._handle, MeshHandle)) + if MeshHandle: + MeshObject = self._wrapper._polymorphicFactory(MeshHandle) else: - raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') - ComponentInstanceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_componentsobject_addcomponent(self._handle, ObjectResourceHandle, Transform, ComponentInstanceHandle)) - if ComponentInstanceHandle: - ComponentInstanceObject = self._wrapper._polymorphicFactory(ComponentInstanceHandle) + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return MeshObject + + def GetInputPos(self): + PosHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshnode_getinputpos(self._handle, PosHandle)) + if PosHandle: + PosObject = self._wrapper._polymorphicFactory(PosHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return ComponentInstanceObject + return PosObject - def GetComponent(self, Index): - nIndex = ctypes.c_uint32(Index) - ComponentInstanceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_componentsobject_getcomponent(self._handle, nIndex, ComponentInstanceHandle)) - if ComponentInstanceHandle: - ComponentInstanceObject = self._wrapper._polymorphicFactory(ComponentInstanceHandle) + def GetOutputDistance(self): + DistanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_meshnode_getoutputdistance(self._handle, DistanceHandle)) + if DistanceHandle: + DistanceObject = self._wrapper._polymorphicFactory(DistanceHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return ComponentInstanceObject + return DistanceObject - def GetComponentCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_componentsobject_getcomponentcount(self._handle, pCount)) + + +''' Class Implementation for UnsignedMeshNode +''' +class UnsignedMeshNode(ImplicitNode): + def __init__(self, handle, wrapper): + ImplicitNode.__init__(self, handle, wrapper) + def GetInputMesh(self): + MeshHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_unsignedmeshnode_getinputmesh(self._handle, MeshHandle)) + if MeshHandle: + MeshObject = self._wrapper._polymorphicFactory(MeshHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pCount.value + return MeshObject + + def GetInputPos(self): + PosHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_unsignedmeshnode_getinputpos(self._handle, PosHandle)) + if PosHandle: + PosObject = self._wrapper._polymorphicFactory(PosHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return PosObject + + def GetOutputDistance(self): + DistanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_unsignedmeshnode_getoutputdistance(self._handle, DistanceHandle)) + if DistanceHandle: + DistanceObject = self._wrapper._polymorphicFactory(DistanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return DistanceObject -''' Class Implementation for BeamSet +''' Class Implementation for FunctionCallNode ''' -class BeamSet(Base): +class FunctionCallNode(ImplicitNode): def __init__(self, handle, wrapper): - Base.__init__(self, handle, wrapper) - def SetName(self, Name): - pName = ctypes.c_char_p(str.encode(Name)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_setname(self._handle, pName)) + ImplicitNode.__init__(self, handle, wrapper) + def GetInputFunctionID(self): + FunctionHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functioncallnode_getinputfunctionid(self._handle, FunctionHandle)) + if FunctionHandle: + FunctionObject = self._wrapper._polymorphicFactory(FunctionHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return FunctionObject - def GetName(self): - nNameBufferSize = ctypes.c_uint64(0) - nNameNeededChars = ctypes.c_uint64(0) - pNameBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) - nNameBufferSize = ctypes.c_uint64(nNameNeededChars.value) - pNameBuffer = (ctypes.c_char * (nNameNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getname(self._handle, nNameBufferSize, nNameNeededChars, pNameBuffer)) + + +''' Class Implementation for NodeIterator +''' +class NodeIterator(Iterator): + def __init__(self, handle, wrapper): + Iterator.__init__(self, handle, wrapper) + def GetCurrent(self): + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_nodeiterator_getcurrent(self._handle, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pNameBuffer.value.decode() + return NodeObject - def SetIdentifier(self, Identifier): + + +''' Class Implementation for Function +''' +class Function(Resource): + def __init__(self, handle, wrapper): + Resource.__init__(self, handle, wrapper) + def GetDisplayName(self): + nDisplayNameBufferSize = ctypes.c_uint64(0) + nDisplayNameNeededChars = ctypes.c_uint64(0) + pDisplayNameBuffer = ctypes.c_char_p(None) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_function_getdisplayname(self._handle, nDisplayNameBufferSize, nDisplayNameNeededChars, pDisplayNameBuffer)) + nDisplayNameBufferSize = ctypes.c_uint64(nDisplayNameNeededChars.value) + pDisplayNameBuffer = (ctypes.c_char * (nDisplayNameNeededChars.value))() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_function_getdisplayname(self._handle, nDisplayNameBufferSize, nDisplayNameNeededChars, pDisplayNameBuffer)) + + return pDisplayNameBuffer.value.decode() + + def SetDisplayName(self, DisplayName): + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_function_setdisplayname(self._handle, pDisplayName)) + + + def AddInput(self, Identifier, DisplayName, Type): pIdentifier = ctypes.c_char_p(str.encode(Identifier)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_setidentifier(self._handle, pIdentifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + PortHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_function_addinput(self._handle, pIdentifier, pDisplayName, Type, PortHandle)) + if PortHandle: + PortObject = self._wrapper._polymorphicFactory(PortHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return PortObject + + def GetInputs(self): + IteratorHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_function_getinputs(self._handle, IteratorHandle)) + if IteratorHandle: + IteratorObject = self._wrapper._polymorphicFactory(IteratorHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return IteratorObject + + def RemoveInput(self, InputObject): + InputHandle = None + if InputObject: + InputHandle = InputObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_function_removeinput(self._handle, InputHandle)) + + + def AddOutput(self, Identifier, DisplayName, Type): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + PortHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_function_addoutput(self._handle, pIdentifier, pDisplayName, Type, PortHandle)) + if PortHandle: + PortObject = self._wrapper._polymorphicFactory(PortHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return PortObject + + def GetOutputs(self): + IteratorHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_function_getoutputs(self._handle, IteratorHandle)) + if IteratorHandle: + IteratorObject = self._wrapper._polymorphicFactory(IteratorHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return IteratorObject + + def RemoveOutput(self, OutputObject): + OutputHandle = None + if OutputObject: + OutputHandle = OutputObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_function_removeoutput(self._handle, OutputHandle)) + + + def FindInput(self, Identifier): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + InputHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_function_findinput(self._handle, pIdentifier, InputHandle)) + if InputHandle: + InputObject = self._wrapper._polymorphicFactory(InputHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return InputObject + + def FindOutput(self, Identifier): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + OutputHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_function_findoutput(self._handle, pIdentifier, OutputHandle)) + if OutputHandle: + OutputObject = self._wrapper._polymorphicFactory(OutputHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return OutputObject + + +''' Class Implementation for ImplicitFunction +''' +class ImplicitFunction(Function): + def __init__(self, handle, wrapper): + Function.__init__(self, handle, wrapper) def GetIdentifier(self): nIdentifierBufferSize = ctypes.c_uint64(0) nIdentifierNeededChars = ctypes.c_uint64(0) pIdentifierBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getidentifier(self._handle, nIdentifierBufferSize, nIdentifierNeededChars, pIdentifierBuffer)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_getidentifier(self._handle, nIdentifierBufferSize, nIdentifierNeededChars, pIdentifierBuffer)) nIdentifierBufferSize = ctypes.c_uint64(nIdentifierNeededChars.value) pIdentifierBuffer = (ctypes.c_char * (nIdentifierNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getidentifier(self._handle, nIdentifierBufferSize, nIdentifierNeededChars, pIdentifierBuffer)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_getidentifier(self._handle, nIdentifierBufferSize, nIdentifierNeededChars, pIdentifierBuffer)) return pIdentifierBuffer.value.decode() - def GetReferenceCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getreferencecount(self._handle, pCount)) + def SetIdentifier(self, Identifier): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_setidentifier(self._handle, pIdentifier)) - return pCount.value - def SetReferences(self, References): - nReferencesCount = ctypes.c_uint64(len(References)) - pReferencesBuffer = (ctypes.c_uint32*len(References))(*References) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_setreferences(self._handle, nReferencesCount, pReferencesBuffer)) + def AddNode(self, NodeType, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addnode(self._handle, NodeType, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def GetReferences(self): - nReferencesCount = ctypes.c_uint64(0) - nReferencesNeededCount = ctypes.c_uint64(0) - pReferencesBuffer = (ctypes.c_uint32*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getreferences(self._handle, nReferencesCount, nReferencesNeededCount, pReferencesBuffer)) - nReferencesCount = ctypes.c_uint64(nReferencesNeededCount.value) - pReferencesBuffer = (ctypes.c_uint32 * nReferencesNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getreferences(self._handle, nReferencesCount, nReferencesNeededCount, pReferencesBuffer)) + def AddSinNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addsinnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pReferencesBuffer[i] for i in range(nReferencesNeededCount.value)] + return NodeObject - def GetBallReferenceCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getballreferencecount(self._handle, pCount)) + def AddCosNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addcosnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pCount.value + return NodeObject - def SetBallReferences(self, BallReferences): - nBallReferencesCount = ctypes.c_uint64(len(BallReferences)) - pBallReferencesBuffer = (ctypes.c_uint32*len(BallReferences))(*BallReferences) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_setballreferences(self._handle, nBallReferencesCount, pBallReferencesBuffer)) + def AddTanNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addtannode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def GetBallReferences(self): - nBallReferencesCount = ctypes.c_uint64(0) - nBallReferencesNeededCount = ctypes.c_uint64(0) - pBallReferencesBuffer = (ctypes.c_uint32*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getballreferences(self._handle, nBallReferencesCount, nBallReferencesNeededCount, pBallReferencesBuffer)) - nBallReferencesCount = ctypes.c_uint64(nBallReferencesNeededCount.value) - pBallReferencesBuffer = (ctypes.c_uint32 * nBallReferencesNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_beamset_getballreferences(self._handle, nBallReferencesCount, nBallReferencesNeededCount, pBallReferencesBuffer)) + def AddArcSinNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addarcsinnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pBallReferencesBuffer[i] for i in range(nBallReferencesNeededCount.value)] + return NodeObject - - -''' Class Implementation for BaseMaterialGroup -''' -class BaseMaterialGroup(Resource): - def __init__(self, handle, wrapper): - Resource.__init__(self, handle, wrapper) - def GetCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getcount(self._handle, pCount)) + def AddArcCosNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addarccosnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return NodeObject + + def AddArcTan2Node(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addarctan2node(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return NodeObject + + def AddSinhNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addsinhnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return NodeObject + + def AddCoshNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addcoshnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pCount.value + return NodeObject - def GetAllPropertyIDs(self): - nPropertyIDsCount = ctypes.c_uint64(0) - nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) - pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + def AddTanhNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addtanhnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return NodeObject - def AddMaterial(self, Name, DisplayColor): - pName = ctypes.c_char_p(str.encode(Name)) - pPropertyID = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_addmaterial(self._handle, pName, DisplayColor, pPropertyID)) + def AddRoundNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addroundnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pPropertyID.value + return NodeObject - def RemoveMaterial(self, PropertyID): - nPropertyID = ctypes.c_uint32(PropertyID) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_removematerial(self._handle, nPropertyID)) + def AddCeilNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addceilnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def GetName(self, PropertyID): - nPropertyID = ctypes.c_uint32(PropertyID) - nNameBufferSize = ctypes.c_uint64(0) - nNameNeededChars = ctypes.c_uint64(0) - pNameBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getname(self._handle, nPropertyID, nNameBufferSize, nNameNeededChars, pNameBuffer)) - nNameBufferSize = ctypes.c_uint64(nNameNeededChars.value) - pNameBuffer = (ctypes.c_char * (nNameNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getname(self._handle, nPropertyID, nNameBufferSize, nNameNeededChars, pNameBuffer)) + def AddFloorNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addfloornode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pNameBuffer.value.decode() + return NodeObject - def SetName(self, PropertyID, Name): - nPropertyID = ctypes.c_uint32(PropertyID) - pName = ctypes.c_char_p(str.encode(Name)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_setname(self._handle, nPropertyID, pName)) + def AddSignNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addsignnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def SetDisplayColor(self, PropertyID, TheColor): - nPropertyID = ctypes.c_uint32(PropertyID) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_setdisplaycolor(self._handle, nPropertyID, TheColor)) + def AddFractNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addfractnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def GetDisplayColor(self, PropertyID): - nPropertyID = ctypes.c_uint32(PropertyID) - pTheColor = Color() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_basematerialgroup_getdisplaycolor(self._handle, nPropertyID, pTheColor)) + def AddAbsNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addabsnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pTheColor + return NodeObject - - -''' Class Implementation for ColorGroup -''' -class ColorGroup(Resource): - def __init__(self, handle, wrapper): - Resource.__init__(self, handle, wrapper) - def GetCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_getcount(self._handle, pCount)) + def AddExpNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addexpnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pCount.value + return NodeObject - def GetAllPropertyIDs(self): - nPropertyIDsCount = ctypes.c_uint64(0) - nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) - pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + def AddLogNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addlognode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return NodeObject - def AddColor(self, TheColor): - pPropertyID = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_addcolor(self._handle, TheColor, pPropertyID)) + def AddLog2Node(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addlog2node(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pPropertyID.value + return NodeObject - def RemoveColor(self, PropertyID): - nPropertyID = ctypes.c_uint32(PropertyID) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_removecolor(self._handle, nPropertyID)) + def AddLog10Node(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addlog10node(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def SetColor(self, PropertyID, TheColor): - nPropertyID = ctypes.c_uint32(PropertyID) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_setcolor(self._handle, nPropertyID, TheColor)) + def AddLengthNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addlengthnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def GetColor(self, PropertyID): - nPropertyID = ctypes.c_uint32(PropertyID) - pTheColor = Color() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_colorgroup_getcolor(self._handle, nPropertyID, pTheColor)) + def AddTransposeNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addtransposenode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pTheColor + return NodeObject - - -''' Class Implementation for Texture2DGroup -''' -class Texture2DGroup(Resource): - def __init__(self, handle, wrapper): - Resource.__init__(self, handle, wrapper) - def GetCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_getcount(self._handle, pCount)) + def InverseNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_inversenode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pCount.value + return NodeObject - def GetAllPropertyIDs(self): - nPropertyIDsCount = ctypes.c_uint64(0) - nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) - pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + def AddSqrtNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addsqrtnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return NodeObject - def AddTex2Coord(self, UVCoordinate): - pPropertyID = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_addtex2coord(self._handle, UVCoordinate, pPropertyID)) + def AddResourceIdNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addresourceidnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pPropertyID.value + return NodeObject - def GetTex2Coord(self, PropertyID): - nPropertyID = ctypes.c_uint32(PropertyID) - pUVCoordinate = Tex2Coord() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_gettex2coord(self._handle, nPropertyID, pUVCoordinate)) + def AddAdditionNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addadditionnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pUVCoordinate + return NodeObject - def RemoveTex2Coord(self, PropertyID): - nPropertyID = ctypes.c_uint32(PropertyID) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_removetex2coord(self._handle, nPropertyID)) + def AddSubtractionNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addsubtractionnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def GetTexture2D(self): - Texture2DInstanceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2dgroup_gettexture2d(self._handle, Texture2DInstanceHandle)) - if Texture2DInstanceHandle: - Texture2DInstanceObject = self._wrapper._polymorphicFactory(Texture2DInstanceHandle) + def AddMultiplicationNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addmultiplicationnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return Texture2DInstanceObject + return NodeObject - - -''' Class Implementation for CompositeMaterials -''' -class CompositeMaterials(Resource): - def __init__(self, handle, wrapper): - Resource.__init__(self, handle, wrapper) - def GetCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getcount(self._handle, pCount)) + def AddDivisionNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_adddivisionnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pCount.value + return NodeObject - def GetAllPropertyIDs(self): - nPropertyIDsCount = ctypes.c_uint64(0) - nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) - pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + def AddDotNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_adddotnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return NodeObject - def GetBaseMaterialGroup(self): - BaseMaterialGroupInstanceHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getbasematerialgroup(self._handle, BaseMaterialGroupInstanceHandle)) - if BaseMaterialGroupInstanceHandle: - BaseMaterialGroupInstanceObject = self._wrapper._polymorphicFactory(BaseMaterialGroupInstanceHandle) + def AddCrossNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addcrossnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return BaseMaterialGroupInstanceObject + return NodeObject - def AddComposite(self, Composite): - nCompositeCount = ctypes.c_uint64(len(Composite)) - pCompositeBuffer = (CompositeConstituent*len(Composite))(*Composite) - pPropertyID = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_addcomposite(self._handle, nCompositeCount, pCompositeBuffer, pPropertyID)) + def AddMatVecMultiplicationNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addmatvecmultiplicationnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pPropertyID.value + return NodeObject - def RemoveComposite(self, PropertyID): - nPropertyID = ctypes.c_uint32(PropertyID) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_removecomposite(self._handle, nPropertyID)) + def AddMinNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addminnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def GetComposite(self, PropertyID): - nPropertyID = ctypes.c_uint32(PropertyID) - nCompositeCount = ctypes.c_uint64(0) - nCompositeNeededCount = ctypes.c_uint64(0) - pCompositeBuffer = (CompositeConstituent*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getcomposite(self._handle, nPropertyID, nCompositeCount, nCompositeNeededCount, pCompositeBuffer)) - nCompositeCount = ctypes.c_uint64(nCompositeNeededCount.value) - pCompositeBuffer = (CompositeConstituent * nCompositeNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_compositematerials_getcomposite(self._handle, nPropertyID, nCompositeCount, nCompositeNeededCount, pCompositeBuffer)) + def AddMaxNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addmaxnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pCompositeBuffer[i] for i in range(nCompositeNeededCount.value)] + return NodeObject - - -''' Class Implementation for MultiPropertyGroup -''' -class MultiPropertyGroup(Resource): - def __init__(self, handle, wrapper): - Resource.__init__(self, handle, wrapper) - def GetCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getcount(self._handle, pCount)) + def AddFmodNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addfmodnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pCount.value + return NodeObject - def GetAllPropertyIDs(self): - nPropertyIDsCount = ctypes.c_uint64(0) - nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) - pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getallpropertyids(self._handle, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + def AddPowNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addpownode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return NodeObject - def AddMultiProperty(self, PropertyIDs): - nPropertyIDsCount = ctypes.c_uint64(len(PropertyIDs)) - pPropertyIDsBuffer = (ctypes.c_uint32*len(PropertyIDs))(*PropertyIDs) - pPropertyID = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_addmultiproperty(self._handle, nPropertyIDsCount, pPropertyIDsBuffer, pPropertyID)) + def AddSelectNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addselectnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pPropertyID.value + return NodeObject - def SetMultiProperty(self, PropertyID, PropertyIDs): - nPropertyID = ctypes.c_uint32(PropertyID) - nPropertyIDsCount = ctypes.c_uint64(len(PropertyIDs)) - pPropertyIDsBuffer = (ctypes.c_uint32*len(PropertyIDs))(*PropertyIDs) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_setmultiproperty(self._handle, nPropertyID, nPropertyIDsCount, pPropertyIDsBuffer)) + def AddClampNode(self, Identifier, Configuration, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addclampnode(self._handle, pIdentifier, Configuration, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def GetMultiProperty(self, PropertyID): - nPropertyID = ctypes.c_uint32(PropertyID) - nPropertyIDsCount = ctypes.c_uint64(0) - nPropertyIDsNeededCount = ctypes.c_uint64(0) - pPropertyIDsBuffer = (ctypes.c_uint32*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getmultiproperty(self._handle, nPropertyID, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) - nPropertyIDsCount = ctypes.c_uint64(nPropertyIDsNeededCount.value) - pPropertyIDsBuffer = (ctypes.c_uint32 * nPropertyIDsNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getmultiproperty(self._handle, nPropertyID, nPropertyIDsCount, nPropertyIDsNeededCount, pPropertyIDsBuffer)) + def AddComposeVectorNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addcomposevectornode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return [pPropertyIDsBuffer[i] for i in range(nPropertyIDsNeededCount.value)] + return NodeObject - def RemoveMultiProperty(self, PropertyID): - nPropertyID = ctypes.c_uint32(PropertyID) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_removemultiproperty(self._handle, nPropertyID)) + def AddVectorFromScalarNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addvectorfromscalarnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def GetLayerCount(self): - pCount = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getlayercount(self._handle, pCount)) + def AddDecomposeVectorNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_adddecomposevectornode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pCount.value + return NodeObject - def AddLayer(self, TheLayer): - pLayerIndex = ctypes.c_uint32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_addlayer(self._handle, TheLayer, pLayerIndex)) + def AddComposeMatrixNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addcomposematrixnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pLayerIndex.value + return NodeObject - def GetLayer(self, LayerIndex): - nLayerIndex = ctypes.c_uint32(LayerIndex) - pTheLayer = MultiPropertyLayer() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_getlayer(self._handle, nLayerIndex, pTheLayer)) + def AddMatrixFromRowsNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addmatrixfromrowsnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pTheLayer + return NodeObject - def RemoveLayer(self, LayerIndex): - nLayerIndex = ctypes.c_uint32(LayerIndex) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_multipropertygroup_removelayer(self._handle, nLayerIndex)) + def AddMatrixFromColumnsNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addmatrixfromcolumnsnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - - -''' Class Implementation for Attachment -''' -class Attachment(Base): - def __init__(self, handle, wrapper): - Base.__init__(self, handle, wrapper) - def GetPath(self): - nPathBufferSize = ctypes.c_uint64(0) - nPathNeededChars = ctypes.c_uint64(0) - pPathBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_getpath(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) - nPathBufferSize = ctypes.c_uint64(nPathNeededChars.value) - pPathBuffer = (ctypes.c_char * (nPathNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_getpath(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) + def AddConstantNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addconstantnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pPathBuffer.value.decode() + return NodeObject - def SetPath(self, Path): - pPath = ctypes.c_char_p(str.encode(Path)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_setpath(self._handle, pPath)) + def AddConstVecNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addconstvecnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def PackagePart(self): - PackagePartHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_packagepart(self._handle, PackagePartHandle)) - if PackagePartHandle: - PackagePartObject = self._wrapper._polymorphicFactory(PackagePartHandle) + def AddConstMatNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addconstmatnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return PackagePartObject + return NodeObject - def GetRelationShipType(self): - nPathBufferSize = ctypes.c_uint64(0) - nPathNeededChars = ctypes.c_uint64(0) - pPathBuffer = ctypes.c_char_p(None) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_getrelationshiptype(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) - nPathBufferSize = ctypes.c_uint64(nPathNeededChars.value) - pPathBuffer = (ctypes.c_char * (nPathNeededChars.value))() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_getrelationshiptype(self._handle, nPathBufferSize, nPathNeededChars, pPathBuffer)) + def AddMeshNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addmeshnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return pPathBuffer.value.decode() + return NodeObject - def SetRelationShipType(self, Path): - pPath = ctypes.c_char_p(str.encode(Path)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_setrelationshiptype(self._handle, pPath)) + def AddUnsignedMeshNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addunsignedmeshnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def WriteToFile(self, FileName): - pFileName = ctypes.c_char_p(str.encode(FileName)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_writetofile(self._handle, pFileName)) + def AddFunctionCallNode(self, Identifier, DisplayName, Tag): + pIdentifier = ctypes.c_char_p(str.encode(Identifier)) + pDisplayName = ctypes.c_char_p(str.encode(DisplayName)) + pTag = ctypes.c_char_p(str.encode(Tag)) + NodeHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addfunctioncallnode(self._handle, pIdentifier, pDisplayName, pTag, NodeHandle)) + if NodeHandle: + NodeObject = self._wrapper._polymorphicFactory(NodeHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return NodeObject - def ReadFromFile(self, FileName): - pFileName = ctypes.c_char_p(str.encode(FileName)) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_readfromfile(self._handle, pFileName)) + def GetNodes(self): + IteratorHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_getnodes(self._handle, IteratorHandle)) + if IteratorHandle: + IteratorObject = self._wrapper._polymorphicFactory(IteratorHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + return IteratorObject - def ReadFromCallback(self, TheReadCallbackFunc, StreamSize, TheSeekCallbackFunc, UserData): - nStreamSize = ctypes.c_uint64(StreamSize) - pUserData = ctypes.c_void_p(UserData) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_readfromcallback(self._handle, TheReadCallbackFunc, nStreamSize, TheSeekCallbackFunc, pUserData)) + def RemoveNode(self, NodeObject): + NodeHandle = None + if NodeObject: + NodeHandle = NodeObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_removenode(self._handle, NodeHandle)) - def GetStreamSize(self): - pStreamSize = ctypes.c_uint64() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_getstreamsize(self._handle, pStreamSize)) + def AddLink(self, SourceObject, TargetObject): + SourceHandle = None + if SourceObject: + SourceHandle = SourceObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + TargetHandle = None + if TargetObject: + TargetHandle = TargetObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addlink(self._handle, SourceHandle, TargetHandle)) - return pStreamSize.value - def WriteToBuffer(self): - nBufferCount = ctypes.c_uint64(0) - nBufferNeededCount = ctypes.c_uint64(0) - pBufferBuffer = (ctypes.c_uint8*0)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) - nBufferCount = ctypes.c_uint64(nBufferNeededCount.value) - pBufferBuffer = (ctypes.c_uint8 * nBufferNeededCount.value)() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_writetobuffer(self._handle, nBufferCount, nBufferNeededCount, pBufferBuffer)) + def AddLinkByNames(self, Source, Target): + pSource = ctypes.c_char_p(str.encode(Source)) + pTarget = ctypes.c_char_p(str.encode(Target)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_addlinkbynames(self._handle, pSource, pTarget)) - return [pBufferBuffer[i] for i in range(nBufferNeededCount.value)] - def ReadFromBuffer(self, Buffer): - nBufferCount = ctypes.c_uint64(len(Buffer)) - pBufferBuffer = (ctypes.c_uint8*len(Buffer))(*Buffer) - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_attachment_readfrombuffer(self._handle, nBufferCount, pBufferBuffer)) + def Clear(self): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_clear(self._handle)) + + + def SortNodesTopologically(self): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_implicitfunction_sortnodestopologically(self._handle)) -''' Class Implementation for Texture2D +''' Class Implementation for FunctionFromImage3D ''' -class Texture2D(Resource): +class FunctionFromImage3D(Function): def __init__(self, handle, wrapper): - Resource.__init__(self, handle, wrapper) - def GetAttachment(self): - AttachmentHandle = ctypes.c_void_p() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_getattachment(self._handle, AttachmentHandle)) - if AttachmentHandle: - AttachmentObject = self._wrapper._polymorphicFactory(AttachmentHandle) + Function.__init__(self, handle, wrapper) + def GetImage3D(self): + Image3DHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_getimage3d(self._handle, Image3DHandle)) + if Image3DHandle: + Image3DObject = self._wrapper._polymorphicFactory(Image3DHandle) else: raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') - return AttachmentObject + return Image3DObject - def SetAttachment(self, AttachmentObject): - AttachmentHandle = None - if AttachmentObject: - AttachmentHandle = AttachmentObject._handle + def SetImage3D(self, Image3DObject): + Image3DHandle = None + if Image3DObject: + Image3DHandle = Image3DObject._handle else: raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_setattachment(self._handle, AttachmentHandle)) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_setimage3d(self._handle, Image3DHandle)) - def GetContentType(self): - pContentType = ctypes.c_int32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_getcontenttype(self._handle, pContentType)) + def SetFilter(self, Filter): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_setfilter(self._handle, Filter)) - return TextureType(pContentType.value) - def SetContentType(self, ContentType): - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_setcontenttype(self._handle, ContentType)) + def GetFilter(self): + pFilter = ctypes.c_int32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_getfilter(self._handle, pFilter)) + return TextureFilter(pFilter.value) - def GetTileStyleUV(self): + def SetTileStyles(self, TileStyleU, TileStyleV, TileStyleW): + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_settilestyles(self._handle, TileStyleU, TileStyleV, TileStyleW)) + + + def GetTileStyles(self): pTileStyleU = ctypes.c_int32() pTileStyleV = ctypes.c_int32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_gettilestyleuv(self._handle, pTileStyleU, pTileStyleV)) + pTileStyleW = ctypes.c_int32() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_gettilestyles(self._handle, pTileStyleU, pTileStyleV, pTileStyleW)) - return TextureTileStyle(pTileStyleU.value), TextureTileStyle(pTileStyleV.value) + return TextureTileStyle(pTileStyleU.value), TextureTileStyle(pTileStyleV.value), TextureTileStyle(pTileStyleW.value) - def SetTileStyleUV(self, TileStyleU, TileStyleV): - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_settilestyleuv(self._handle, TileStyleU, TileStyleV)) + def GetOffset(self): + pOffset = ctypes.c_double() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_getoffset(self._handle, pOffset)) + return pOffset.value - def GetFilter(self): - pFilter = ctypes.c_int32() - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_getfilter(self._handle, pFilter)) + def SetOffset(self, Offset): + dOffset = ctypes.c_double(Offset) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_setoffset(self._handle, dOffset)) - return TextureFilter(pFilter.value) - def SetFilter(self, Filter): - self._wrapper.checkError(self, self._wrapper.lib.lib3mf_texture2d_setfilter(self._handle, Filter)) + def GetScale(self): + pScale = ctypes.c_double() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_getscale(self._handle, pScale)) + + return pScale.value + + def SetScale(self, Scale): + dScale = ctypes.c_double(Scale) + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_functionfromimage3d_setscale(self._handle, dScale)) @@ -6974,6 +12360,17 @@ def GetSliceStackByID(self, UniqueResourceID): return SliceStacInstanceObject + def GetLevelSetByID(self, UniqueResourceID): + nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) + LevelSetObjectInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_getlevelsetbyid(self._handle, nUniqueResourceID, LevelSetObjectInstanceHandle)) + if LevelSetObjectInstanceHandle: + LevelSetObjectInstanceObject = self._wrapper._polymorphicFactory(LevelSetObjectInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return LevelSetObjectInstanceObject + def GetBuildUUID(self): pHasUUID = ctypes.c_bool() nUUIDBufferSize = ctypes.c_uint64(0) @@ -7117,6 +12514,16 @@ def GetSliceStacks(self): return ResourceIteratorObject + def GetImage3Ds(self): + ResourceIteratorHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_getimage3ds(self._handle, ResourceIteratorHandle)) + if ResourceIteratorHandle: + ResourceIteratorObject = self._wrapper._polymorphicFactory(ResourceIteratorHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceIteratorObject + def MergeToModel(self): MergedModelInstanceHandle = ctypes.c_void_p() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_mergetomodel(self._handle, MergedModelInstanceHandle)) @@ -7127,6 +12534,15 @@ def MergeToModel(self): return MergedModelInstanceObject + def MergeFromModel(self, ModelInstanceObject): + ModelInstanceHandle = None + if ModelInstanceObject: + ModelInstanceHandle = ModelInstanceObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_mergefrommodel(self._handle, ModelInstanceHandle)) + + def AddMeshObject(self): MeshObjectInstanceHandle = ctypes.c_void_p() self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_addmeshobject(self._handle, MeshObjectInstanceHandle)) @@ -7233,6 +12649,30 @@ def AddMultiPropertyGroup(self): return MultiPropertyGroupInstanceObject + def AddImageStack(self, ColumnCount, RowCount, SheetCount): + nColumnCount = ctypes.c_uint32(ColumnCount) + nRowCount = ctypes.c_uint32(RowCount) + nSheetCount = ctypes.c_uint32(SheetCount) + InstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_addimagestack(self._handle, nColumnCount, nRowCount, nSheetCount, InstanceHandle)) + if InstanceHandle: + InstanceObject = self._wrapper._polymorphicFactory(InstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return InstanceObject + + def GetImageStackByID(self, UniqueResourceID): + nUniqueResourceID = ctypes.c_uint32(UniqueResourceID) + ImageStackInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_getimagestackbyid(self._handle, nUniqueResourceID, ImageStackInstanceHandle)) + if ImageStackInstanceHandle: + ImageStackInstanceObject = self._wrapper._polymorphicFactory(ImageStackInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ImageStackInstanceObject + def AddBuildItem(self, ObjectObject, Transform): ObjectHandle = None if ObjectObject: @@ -7372,4 +12812,78 @@ def GetKeyStore(self): return KeyStoreObject + def GetFunctions(self): + TheResourceIteratorHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_getfunctions(self._handle, TheResourceIteratorHandle)) + if TheResourceIteratorHandle: + TheResourceIteratorObject = self._wrapper._polymorphicFactory(TheResourceIteratorHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return TheResourceIteratorObject + + def AddImplicitFunction(self): + FunctionInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_addimplicitfunction(self._handle, FunctionInstanceHandle)) + if FunctionInstanceHandle: + FunctionInstanceObject = self._wrapper._polymorphicFactory(FunctionInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return FunctionInstanceObject + + def AddFunctionFromImage3D(self, Image3DInstanceObject): + Image3DInstanceHandle = None + if Image3DInstanceObject: + Image3DInstanceHandle = Image3DInstanceObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + FunctionInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_addfunctionfromimage3d(self._handle, Image3DInstanceHandle, FunctionInstanceHandle)) + if FunctionInstanceHandle: + FunctionInstanceObject = self._wrapper._polymorphicFactory(FunctionInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return FunctionInstanceObject + + def AddVolumeData(self): + VolumeDataInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_addvolumedata(self._handle, VolumeDataInstanceHandle)) + if VolumeDataInstanceHandle: + VolumeDataInstanceObject = self._wrapper._polymorphicFactory(VolumeDataInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return VolumeDataInstanceObject + + def AddLevelSet(self): + LevelSetInstanceHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_addlevelset(self._handle, LevelSetInstanceHandle)) + if LevelSetInstanceHandle: + LevelSetInstanceObject = self._wrapper._polymorphicFactory(LevelSetInstanceHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return LevelSetInstanceObject + + def GetLevelSets(self): + ResourceIteratorHandle = ctypes.c_void_p() + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_getlevelsets(self._handle, ResourceIteratorHandle)) + if ResourceIteratorHandle: + ResourceIteratorObject = self._wrapper._polymorphicFactory(ResourceIteratorHandle) + else: + raise ELib3MFException(ErrorCodes.INVALIDCAST, 'Invalid return/output value') + + return ResourceIteratorObject + + def RemoveResource(self, ResourceObject): + ResourceHandle = None + if ResourceObject: + ResourceHandle = ResourceObject._handle + else: + raise ELib3MFException(ErrorCodes.INVALIDPARAM, 'Invalid return/output value') + self._wrapper.checkError(self, self._wrapper.lib.lib3mf_model_removeresource(self._handle, ResourceHandle)) + + diff --git a/Autogenerated/Source/lib3mf_abi.hpp b/Autogenerated/Source/lib3mf_abi.hpp index 44b8273b8..f79071d19 100644 --- a/Autogenerated/Source/lib3mf_abi.hpp +++ b/Autogenerated/Source/lib3mf_abi.hpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++-Header file in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -575,6 +575,45 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerialsiterator_getcurrentcomposi */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup(Lib3MF_MultiPropertyGroupIterator pMultiPropertyGroupIterator, Lib3MF_MultiPropertyGroup * pResource); +/************************************************************************************************************************* + Class definition for Image3DIterator +**************************************************************************************************************************/ + +/** +* Returns the Image3D the iterator points at. +* +* @param[in] pImage3DIterator - Image3DIterator instance. +* @param[out] pResource - returns the Image3D instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3diterator_getcurrentimage3d(Lib3MF_Image3DIterator pImage3DIterator, Lib3MF_Image3D * pResource); + +/************************************************************************************************************************* + Class definition for FunctionIterator +**************************************************************************************************************************/ + +/** +* Returns the Function the iterator points at. +* +* @param[in] pFunctionIterator - FunctionIterator instance. +* @param[out] pResource - returns the Function instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functioniterator_getcurrentfunction(Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource); + +/************************************************************************************************************************* + Class definition for LevelSetIterator +**************************************************************************************************************************/ + +/** +* Returns the LevelSet the iterator points at. +* +* @param[in] pLevelSetIterator - LevelSetIterator instance. +* @param[out] pResource - returns the MeshObject instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelsetiterator_getcurrentlevelset(Lib3MF_LevelSetIterator pLevelSetIterator, Lib3MF_LevelSet * pResource); + /************************************************************************************************************************* Class definition for MetaData **************************************************************************************************************************/ @@ -834,6 +873,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_ismeshobject(Lib3MF_Object pObject, b */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_iscomponentsobject(Lib3MF_Object pObject, bool * pIsComponentsObject); +/** +* Retrieves, if an object is a level set object +* +* @param[in] pObject - Object instance. +* @param[out] pIsLevelSetObject - returns, whether the object is a level set object +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_object_islevelsetobject(Lib3MF_Object pObject, bool * pIsLevelSetObject); + /** * Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. * @@ -1166,6 +1214,174 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_ismanifoldandoriented(Lib3MF_Mesh */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_beamlattice(Lib3MF_MeshObject pMeshObject, Lib3MF_BeamLattice * pTheBeamLattice); +/** +* Retrieves the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[out] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_getvolumedata(Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this MeshObject. +* +* @param[in] pMeshObject - MeshObject instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshobject_setvolumedata(Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData pTheVolumeData); + +/************************************************************************************************************************* + Class definition for LevelSet +**************************************************************************************************************************/ + +/** +* Returns the function that is used as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getfunction(Lib3MF_LevelSet pLevelSet, Lib3MF_Function * pTheFunction); + +/** +* Sets the function to use as boundary shape. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheFunction - the function to use as boundary shape +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setfunction(Lib3MF_LevelSet pLevelSet, Lib3MF_Function pTheFunction); + +/** +* Returns the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTransform - the transformation matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_gettransform(Lib3MF_LevelSet pLevelSet, Lib3MF::sTransform * pTransform); + +/** +* Sets the transformation matrix into the coordinate system of the referenced Function. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_settransform(Lib3MF_LevelSet pLevelSet, const Lib3MF::sTransform * pTransform); + +/** +* Returns the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getchannelname(Lib3MF_LevelSet pLevelSet, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); + +/** +* Sets the name of the function output channel to use. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pChannelName - new name of the function output channel +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setchannelname(Lib3MF_LevelSet pLevelSet, const char * pChannelName); + +/** +* Sets the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setminfeaturesize(Lib3MF_LevelSet pLevelSet, Lib3MF_double dMinFeatureSize); + +/** +* Returns the minimal feature size as a hint for the function evaluator +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMinFeatureSize - minimal feature size +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getminfeaturesize(Lib3MF_LevelSet pLevelSet, Lib3MF_double * pMinFeatureSize); + +/** +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] dFallBackValue - fallback value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setfallbackvalue(Lib3MF_LevelSet pLevelSet, Lib3MF_double dFallBackValue); + +/** +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pFallBackValue - fallback value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getfallbackvalue(Lib3MF_LevelSet pLevelSet, Lib3MF_double * pFallBackValue); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setmeshbboxonly(Lib3MF_LevelSet pLevelSet, bool bMeshBBoxOnly); + +/** +* If set only the bounding box of the mesh is intersected with the boundary +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getmeshbboxonly(Lib3MF_LevelSet pLevelSet, bool * pMeshBBoxOnly); + +/** +* Sets the mesh to use as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setmesh(Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject pTheMesh); + +/** +* Returns the mesh that is used as evaluation domain +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheMesh - The mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getmesh(Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh); + +/** +* Retrieves the VolumeData this Object. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[out] pTheVolumeData - the VolumeData of this Object +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_getvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData); + +/** +* Sets the VolumeData of this LevelSet. +* +* @param[in] pLevelSet - LevelSet instance. +* @param[in] pTheVolumeData - the VolumeData of this MeshObject +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_levelset_setvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData pTheVolumeData); + /************************************************************************************************************************* Class definition for BeamLattice **************************************************************************************************************************/ @@ -1396,784 +1612,3179 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_addbeamset(Lib3MF_BeamLattice pB LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamlattice_getbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet); /************************************************************************************************************************* - Class definition for Component + Class definition for FunctionReference **************************************************************************************************************************/ /** -* Returns the Resource Instance of the component. +* Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. * -* @param[in] pComponent - Component instance. -* @param[out] pObjectResource - filled with the Resource Instance. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresource(Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getfunctionresourceid(Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 * pUniqueResourceID); /** -* Returns the UniqueResourceID of the component. +* Sets the UniqueResourceID to refer to. * -* @param[in] pComponent - Component instance. -* @param[out] pUniqueResourceID - returns the UniqueResourceID. +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nUniqueResourceID - UniqueResourceID of the function * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresourceid(Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setfunctionresourceid(Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 nUniqueResourceID); /** -* returns, whether a component has a UUID and, if true, the component's UUID +* Returns the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[out] pHasUUID - flag whether the component has a UUID -* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) -* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pTransform - the transformation matrix * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getuuid(Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_gettransform(Lib3MF_FunctionReference pFunctionReference, Lib3MF::sTransform * pTransform); /** -* sets the component's UUID +* Sets the transformation matrix into the coordinate system of the referenced Function. * -* @param[in] pComponent - Component instance. -* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pTransform - new transformation matrix * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_setuuid(Lib3MF_Component pComponent, const char * pUUID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_settransform(Lib3MF_FunctionReference pFunctionReference, const Lib3MF::sTransform * pTransform); /** -* Returns, if the component has a different transformation than the identity matrix +* Returns the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] nChannelNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pChannelNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pChannelNameBuffer - buffer of the name of the function output channel, may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_hastransform(Lib3MF_Component pComponent, bool * pHasTransform); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getchannelname(Lib3MF_FunctionReference pFunctionReference, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer); /** -* Returns the transformation matrix of the component. +* Sets the name of the function output channel to use. * -* @param[in] pComponent - Component instance. -* @param[out] pTransform - filled with the component transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] pChannelName - new name of the function output channel * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_gettransform(Lib3MF_Component pComponent, Lib3MF::sTransform * pTransform); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setchannelname(Lib3MF_FunctionReference pFunctionReference, const char * pChannelName); /** -* Sets the transformation matrix of the component. +* Sets the minimal feature size as a hint for the function evaluator * -* @param[in] pComponent - Component instance. -* @param[in] pTransform - new transformation matrix +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_settransform(Lib3MF_Component pComponent, const Lib3MF::sTransform * pTransform); - -/************************************************************************************************************************* - Class definition for ComponentsObject -**************************************************************************************************************************/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setminfeaturesize(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dMinFeatureSize); /** -* Adds a new component to a components object. +* Returns the minimal feature size as a hint for the function evaluator * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] pObjectResource - object to add as component. Must not lead to circular references! -* @param[in] pTransform - optional transform matrix for the component. -* @param[out] pComponentInstance - new component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pMinFeatureSize - minimal feature size * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_addcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const Lib3MF::sTransform * pTransform, Lib3MF_Component * pComponentInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getminfeaturesize(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pMinFeatureSize); /** -* Retrieves a component from a component object. +* Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) -* @param[out] pComponentInstance - component instance +* @param[in] pFunctionReference - FunctionReference instance. +* @param[in] dFallBackValue - fallback value * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_setfallbackvalue(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dFallBackValue); /** -* Retrieves a component count of a component object. +* Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). * -* @param[in] pComponentsObject - ComponentsObject instance. -* @param[out] pCount - returns the component count +* @param[in] pFunctionReference - FunctionReference instance. +* @param[out] pFallBackValue - fallback value * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponentcount(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionreference_getfallbackvalue(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pFallBackValue); /************************************************************************************************************************* - Class definition for BeamSet + Class definition for VolumeDataColor **************************************************************************************************************************/ -/** -* Sets a beamset's name string -* -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pName - new name of the beamset. -* @return error code or 0 (success) -*/ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setname(Lib3MF_BeamSet pBeamSet, const char * pName); +/************************************************************************************************************************* + Class definition for MaterialMapping +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for VolumeDataComposite +**************************************************************************************************************************/ /** -* Retrieves a beamset's name string +* Returns the BaseMaterialGroup used within this volume data item * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pBaseMaterialGroupInstance - The BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getname(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getbasematerialgroup(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); /** -* Sets a beamset's identifier string +* Sets the BaseMaterialGroup to use within this volume data item. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] pIdentifier - new name of the beamset. +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setidentifier(Lib3MF_BeamSet pBeamSet, const char * pIdentifier); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_setbasematerialgroup(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance); /** -* Retrieves a beamset's identifier string +* Returns the number of material mappings of this VolumeDataComposite element * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) -* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[out] pCount - the number of material mappings. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getidentifier(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmappingcount(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount); /** -* Retrieves the reference count of a beamset +* Returns MaterialMappting with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the reference count +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - Index of the MaterialMapping in question. +* @param[out] pTheMaterialMapping - MaterialMapping used in this element * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_getmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Sets the references of a beamset +* Adds a the MaterialMapping * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] pTransform - new transformation matrix +* @param[out] pTheMaterialMapping - The new MaterialMapping * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_addmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, const Lib3MF::sTransform * pTransform, Lib3MF_MaterialMapping * pTheMaterialMapping); /** -* Retrieves the references of a beamset +* Removes the MaterialMapping with given index * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nReferencesBufferSize - Number of elements in buffer -* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @param[in] pVolumeDataComposite - VolumeDataComposite instance. +* @param[in] nIndex - The index of the MaterialMapping to be removed. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedatacomposite_removematerialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex); + +/************************************************************************************************************************* + Class definition for VolumeDataProperty +**************************************************************************************************************************/ /** -* Retrieves the ball reference count of a beamset +* Gets the qualified name of this property. * -* @param[in] pBeamSet - BeamSet instance. -* @param[out] pCount - returns the ball reference count +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] nPropertyNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pPropertyNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPropertyNameBuffer - buffer of The qualified name of this property., may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_getname(Lib3MF_VolumeDataProperty pVolumeDataProperty, const Lib3MF_uint32 nPropertyNameBufferSize, Lib3MF_uint32* pPropertyNameNeededChars, char * pPropertyNameBuffer); /** -* Sets the ball references of a beamset +* Sets whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setballreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_setisrequired(Lib3MF_VolumeDataProperty pVolumeDataProperty, bool bIsRequired); /** -* Retrieves the ball references of a beamset +* Returns whether this property is required to process this 3MF document instance. * -* @param[in] pBeamSet - BeamSet instance. -* @param[in] nBallReferencesBufferSize - Number of elements in buffer -* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @param[in] pVolumeDataProperty - VolumeDataProperty instance. +* @param[out] pIsRequired - Is this property required to process this 3MF document instance? * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedataproperty_isrequired(Lib3MF_VolumeDataProperty pVolumeDataProperty, bool * pIsRequired); /************************************************************************************************************************* - Class definition for BaseMaterialGroup + Class definition for VolumeData **************************************************************************************************************************/ /** -* Retrieves the count of base materials in the material group. +* Returns the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[out] pCount - returns the count of base materials. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - filled with the VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getcount(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getcomposite(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* returns all the PropertyIDs of all materials in this group +* Creates a new VolumeDataComposite for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheCompositeData - The new VolumeDataComposite of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getallpropertyids(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_createnewcomposite(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData); /** -* Adds a new material to the material group +* Removes the VolumeDataComposite of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] pName - new name of the base material. -* @param[in] pDisplayColor - Display color of the material -* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_addmaterial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const Lib3MF::sColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removecomposite(Lib3MF_VolumeData pVolumeData); /** -* Removes a material from the material group. +* Returns the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pTheColorData - filled with the VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_removematerial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getcolor(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataColor * pTheColorData); /** -* Returns the base material's name +* Creates a new VolumeDataColor for this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] nNameBufferSize - size of the buffer (including trailing 0) -* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheColorData - The new VolumeDataColor of this VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_createnewcolor(Lib3MF_VolumeData pVolumeData, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataColor * pTheColorData); /** -* Sets a base material's name +* Removes the VolumeDataColor of this VolumeData instance * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pName - new name of the base material. +* @param[in] pVolumeData - VolumeData instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removecolor(Lib3MF_VolumeData pVolumeData); /** -* Sets a base material's display color. +* Returns the number of VolumeDataProperty * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[in] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[out] pCount - the number of VolumeDataProperty-elements within this VolumdeData * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getpropertycount(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount); /** -* Returns a base material's display color. +* Returns the VolumeDataProperty at a given Index * -* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. -* @param[in] nPropertyID - PropertyID of the material in the material group. -* @param[out] pTheColor - The base material's display color +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be returned. +* @param[out] pTheVolumeDataProperty - the VolumeDataProperty at the given index. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_getproperty(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Adds a new VolumeDataProperty from a Function +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] pName - the qualified name (namespace+name) of the Property +* @param[in] pTheFunction - Function used in this element +* @param[out] pTheVolumeDataProperty - the newly created VolumeDataProperty. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_addpropertyfromfunction(Lib3MF_VolumeData pVolumeData, const char * pName, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty); + +/** +* Removes the VolumeDataProperty with a given index +* +* @param[in] pVolumeData - VolumeData instance. +* @param[in] nIndex - the index of the VolumeDataProperty to be removed. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_volumedata_removeproperty(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex); /************************************************************************************************************************* - Class definition for ColorGroup + Class definition for Component **************************************************************************************************************************/ /** -* Retrieves the count of base materials in this Color Group. +* Returns the Resource Instance of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[out] pCount - returns the count of colors within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pObjectResource - filled with the Resource Instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcount(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresource(Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource); /** -* returns all the PropertyIDs of all colors within this group +* Returns the UniqueResourceID of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @param[in] pComponent - Component instance. +* @param[out] pUniqueResourceID - returns the UniqueResourceID. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getallpropertyids(Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getobjectresourceid(Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID); /** -* Adds a new value. +* returns, whether a component has a UUID and, if true, the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] pTheColor - The new color -* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @param[in] pComponent - Component instance. +* @param[out] pHasUUID - flag whether the component has a UUID +* @param[in] nUUIDBufferSize - size of the buffer (including trailing 0) +* @param[out] pUUIDNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pUUIDBuffer - buffer of the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx', may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_addcolor(Lib3MF_ColorGroup pColorGroup, const Lib3MF::sColor * pTheColor, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_getuuid(Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer); /** -* Removes a color from the color group. +* sets the component's UUID * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @param[in] pComponent - Component instance. +* @param[in] pUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_removecolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_setuuid(Lib3MF_Component pComponent, const char * pUUID); /** -* Sets a color value. +* Returns, if the component has a different transformation than the identity matrix * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[in] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pHasTransform - if true is returned, the transformation is not equal than the identity * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_setcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_hastransform(Lib3MF_Component pComponent, bool * pHasTransform); /** -* Sets a color value. +* Returns the transformation matrix of the component. * -* @param[in] pColorGroup - ColorGroup instance. -* @param[in] nPropertyID - PropertyID of a color within this color group. -* @param[out] pTheColor - The color +* @param[in] pComponent - Component instance. +* @param[out] pTransform - filled with the component transformation matrix * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_gettransform(Lib3MF_Component pComponent, Lib3MF::sTransform * pTransform); + +/** +* Sets the transformation matrix of the component. +* +* @param[in] pComponent - Component instance. +* @param[in] pTransform - new transformation matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_component_settransform(Lib3MF_Component pComponent, const Lib3MF::sTransform * pTransform); /************************************************************************************************************************* - Class definition for Texture2DGroup + Class definition for ComponentsObject **************************************************************************************************************************/ /** -* Retrieves the count of tex2coords in the Texture2DGroup. +* Adds a new component to a components object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pCount - returns the count of tex2coords. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] pObjectResource - object to add as component. Must not lead to circular references! +* @param[in] pTransform - optional transform matrix for the component. +* @param[out] pComponentInstance - new component instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getcount(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_addcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const Lib3MF::sTransform * pTransform, Lib3MF_Component * pComponentInstance); /** -* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* Retrieves a component from a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) +* @param[out] pComponentInstance - component instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getallpropertyids(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance); /** -* Adds a new tex2coord to the Texture2DGroup +* Retrieves a component count of a component object. * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. -* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @param[in] pComponentsObject - ComponentsObject instance. +* @param[out] pCount - returns the component count * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_addtex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF::sTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_componentsobject_getcomponentcount(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount); + +/************************************************************************************************************************* + Class definition for BeamSet +**************************************************************************************************************************/ /** -* Obtains a tex2coord to the Texture2DGroup +* Sets a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. -* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pName - new name of the beamset. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sTex2Coord * pUVCoordinate); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setname(Lib3MF_BeamSet pBeamSet, const char * pName); /** -* Removes a tex2coords from the Texture2DGroup. +* Retrieves a beamset's name string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the beamset., may be NULL * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_removetex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getname(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); /** -* Obtains the texture2D instance of this group. +* Sets a beamset's identifier string * -* @param[in] pTexture2DGroup - Texture2DGroup instance. -* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @param[in] pBeamSet - BeamSet instance. +* @param[in] pIdentifier - new name of the beamset. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettexture2d(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setidentifier(Lib3MF_BeamSet pBeamSet, const char * pIdentifier); + +/** +* Retrieves a beamset's identifier string +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of returns the identifier of the beamset., may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getidentifier(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Retrieves the reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the reference count +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[in] pReferencesBuffer - uint32 buffer of the new indices of all beams in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nReferencesBufferSize - Number of elements in buffer +* @param[out] pReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer); + +/** +* Retrieves the ball reference count of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[out] pCount - returns the ball reference count +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount); + +/** +* Sets the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[in] pBallReferencesBuffer - uint32 buffer of the new indices of all balls in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_setballreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer); + +/** +* Retrieves the ball references of a beamset +* +* @param[in] pBeamSet - BeamSet instance. +* @param[in] nBallReferencesBufferSize - Number of elements in buffer +* @param[out] pBallReferencesNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_beamset_getballreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer); /************************************************************************************************************************* - Class definition for CompositeMaterials + Class definition for BaseMaterialGroup **************************************************************************************************************************/ /** -* Retrieves the count of Composite-s in the CompositeMaterials. +* Retrieves the count of base materials in the material group. * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pCount - returns the count of Composite-s +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[out] pCount - returns the count of base materials. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcount(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getcount(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount); /** -* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* returns all the PropertyIDs of all materials in this group * -* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getallpropertyids(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new material to the material group +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] pName - new name of the base material. +* @param[in] pDisplayColor - Display color of the material +* @param[out] pPropertyID - returns new PropertyID of the new material in the material group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_addmaterial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const Lib3MF::sColor * pDisplayColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a material from the material group. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_removematerial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID); + +/** +* Returns the base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of returns the name of the base material., may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* Sets a base material's name +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pName - new name of the base material. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName); + +/** +* Sets a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[in] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_setdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); + +/** +* Returns a base material's display color. +* +* @param[in] pBaseMaterialGroup - BaseMaterialGroup instance. +* @param[in] nPropertyID - PropertyID of the material in the material group. +* @param[out] pTheColor - The base material's display color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_basematerialgroup_getdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); + +/************************************************************************************************************************* + Class definition for ColorGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of base materials in this Color Group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[out] pCount - returns the count of colors within this color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcount(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all colors within this group +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the color in the color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getallpropertyids(Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] pTheColor - The new color +* @param[out] pPropertyID - PropertyID of the new color within this color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_addcolor(Lib3MF_ColorGroup pColorGroup, const Lib3MF::sColor * pTheColor, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a color from the color group. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of the color to be removed from the color group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_removecolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[in] pTheColor - The color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_setcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const Lib3MF::sColor * pTheColor); + +/** +* Sets a color value. +* +* @param[in] pColorGroup - ColorGroup instance. +* @param[in] nPropertyID - PropertyID of a color within this color group. +* @param[out] pTheColor - The color +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_colorgroup_getcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sColor * pTheColor); + +/************************************************************************************************************************* + Class definition for Texture2DGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of tex2coords in the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pCount - returns the count of tex2coords. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getcount(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all tex2coords in this Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_getallpropertyids(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @param[out] pPropertyID - returns new PropertyID of the new tex2coord in the Texture2DGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_addtex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF::sTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID); + +/** +* Obtains a tex2coord to the Texture2DGroup +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. +* @param[out] pUVCoordinate - The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, Lib3MF::sTex2Coord * pUVCoordinate); + +/** +* Removes a tex2coords from the Texture2DGroup. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_removetex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID); + +/** +* Obtains the texture2D instance of this group. +* +* @param[in] pTexture2DGroup - Texture2DGroup instance. +* @param[out] pTexture2DInstance - the texture2D instance of this group. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2dgroup_gettexture2d(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance); + +/************************************************************************************************************************* + Class definition for CompositeMaterials +**************************************************************************************************************************/ + +/** +* Retrieves the count of Composite-s in the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pCount - returns the count of Composite-s +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcount(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. * @param[in] nPropertyIDsBufferSize - Number of elements in buffer * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. * @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the Composite-Mixing Values in the CompositeMaterials. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getallpropertyids(Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getallpropertyids(Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getbasematerialgroup(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); + +/** +* Adds a new Composite-Mixing Values to the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite +* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_addcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const Lib3MF::sCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_removecomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); + +/** +* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* +* @param[in] pCompositeMaterials - CompositeMaterials instance. +* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. +* @param[in] nCompositeBufferSize - Number of elements in buffer +* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, Lib3MF::sCompositeConstituent * pCompositeBuffer); + +/************************************************************************************************************************* + Class definition for MultiPropertyGroup +**************************************************************************************************************************/ + +/** +* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the count of MultiProperty-s +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getcount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getallpropertyids(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Adds a new MultiProperty to the MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. +* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); + +/** +* Sets the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_setmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Obtains the PropertyIDs of a MultiProperty. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. +* @param[in] nPropertyIDsBufferSize - Number of elements in buffer +* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); + +/** +* Removes a MultiProperty from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removemultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); + +/** +* Retrieves the number of layers of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[out] pCount - returns the number of layers +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayercount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); + +/** +* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup +* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF::sMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); + +/** +* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried +* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, Lib3MF::sMultiPropertyLayer * pTheLayer); + +/** +* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* +* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. +* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removelayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); + +/************************************************************************************************************************* + Class definition for Image3D +**************************************************************************************************************************/ + +/** +* returns the name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] nNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pNameBuffer - buffer of the name of this Image3D, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_getname(Lib3MF_Image3D pImage3D, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer); + +/** +* sets a new name of this Image3D +* +* @param[in] pImage3D - Image3D instance. +* @param[in] pName - the new name of this Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_setname(Lib3MF_Image3D pImage3D, const char * pName); + +/** +* Retrieves, if this Image3D is a ImageStack +* +* @param[in] pImage3D - Image3D instance. +* @param[out] pIsImageStack - returns, whether the Image3D is an ImageStack +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_image3d_isimagestack(Lib3MF_Image3D pImage3D, bool * pIsImageStack); + +/************************************************************************************************************************* + Class definition for ImageStack +**************************************************************************************************************************/ + +/** +* Retrieves the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pRowCount - number of rows +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getrowcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pRowCount); + +/** +* Sets the number of rows in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nRowCount - number of rows +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setrowcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nRowCount); + +/** +* Retrieves the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pColumnCount - number of columns +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getcolumncount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pColumnCount); + +/** +* Sets the number of columns in each image of this image3d +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nColumnCount - number of columns +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setcolumncount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nColumnCount); + +/** +* Retrieves the number of images in the stack. +* +* @param[in] pImageStack - ImageStack instance. +* @param[out] pSheetCount - number of images +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getsheetcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pSheetCount); + +/** +* Retrieves a sheet of the stack. Raises an error if sheet is not set. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_getsheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pSheet); + +/** +* Sets a sheet to an existing attachment. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_setsheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment pSheet); + +/** +* Creates a new sheet attachment with empty data. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createemptysheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a memory buffer. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] nDataBufferSize - Number of elements in buffer +* @param[in] pDataBuffer - uint8 buffer of binary image data +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createsheetfrombuffer(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer, Lib3MF_Attachment * pSheet); + +/** +* Creates a new sheet attachment from a file on disk. +* +* @param[in] pImageStack - ImageStack instance. +* @param[in] nIndex - index of the image (0-based) +* @param[in] pPath - path of part in the package +* @param[in] pFileName - file name to read from +* @param[out] pSheet - attachment containing the image +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_imagestack_createsheetfromfile(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, const char * pFileName, Lib3MF_Attachment * pSheet); + +/************************************************************************************************************************* + Class definition for Attachment +**************************************************************************************************************************/ + +/** +* Retrieves an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getpath(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's package path. This function will be removed in a later release. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new path of the attachment. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setpath(Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Returns the PackagePart that is this attachment. +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pPackagePart - The PackagePart of this attachment. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_packagepart(Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); + +/** +* Retrieves an attachment's relationship type +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nPathBufferSize - size of the buffer (including trailing 0) +* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getrelationshiptype(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); + +/** +* Sets an attachment's relationship type. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pPath - new relationship type string. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attachment pAttachment, const char * pPath); + +/** +* Writes out the attachment as file. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to write into. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pFileName - file to read from. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName); + +/** +* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* +* @param[in] pAttachment - Attachment instance. +* @param[in] pTheReadCallback - Callback to call for reading a data chunk +* @param[in] nStreamSize - number of bytes the callback returns +* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. +* @param[in] pUserData - Userdata that is passed to the callback function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromcallback(Lib3MF_Attachment pAttachment, Lib3MF::ReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MF::SeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); + +/** +* Retrieves the size of the attachment stream +* +* @param[in] pAttachment - Attachment instance. +* @param[out] pStreamSize - the stream size +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); + +/** +* Writes out the attachment into a buffer +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. +* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); + +/** +* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* +* @param[in] pAttachment - Attachment instance. +* @param[in] nBufferBufferSize - Number of elements in buffer +* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfrombuffer(Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); + +/************************************************************************************************************************* + Class definition for Texture2D +**************************************************************************************************************************/ + +/** +* Retrieves the attachment located at the path of the texture. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); + +/** +* Sets the texture's package path to the path of the attachment. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] pAttachment - attachment that holds the texture's image information. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pContentType - returns content type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getcontenttype(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType * pContentType); + +/** +* Retrieves a texture's content type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eContentType - new Content Type +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setcontenttype(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType eContentType); + +/** +* Retrieves a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pTileStyleU - returns tilestyle type enum. +* @param[out] pTileStyleV - returns tilestyle type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_gettilestyleuv(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle * pTileStyleU, Lib3MF::eTextureTileStyle * pTileStyleV); + +/** +* Sets a texture's tilestyle type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eTileStyleU - new tilestyle type enum. +* @param[in] eTileStyleV - new tilestyle type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_settilestyleuv(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle eTileStyleU, Lib3MF::eTextureTileStyle eTileStyleV); + +/** +* Retrieves a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[out] pFilter - returns filter type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getfilter(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter * pFilter); + +/** +* Sets a texture's filter type. +* +* @param[in] pTexture2D - Texture2D instance. +* @param[in] eFilter - sets new filter type enum. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setfilter(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter eFilter); + +/************************************************************************************************************************* + Class definition for ImplicitPort +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_getidentifier(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_setidentifier(Lib3MF_ImplicitPort pImplicitPort, const char * pIdentifier); + +/** +* Retrieves the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_getdisplayname(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_setdisplayname(Lib3MF_ImplicitPort pImplicitPort, const char * pDisplayName); + +/** +* Sets the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] eImplicitPortType - the type +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_settype(Lib3MF_ImplicitPort pImplicitPort, Lib3MF::eImplicitPortType eImplicitPortType); + +/** +* Retrieves the type of the port +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[out] pImplicitPortType - the type +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_gettype(Lib3MF_ImplicitPort pImplicitPort, Lib3MF::eImplicitPortType * pImplicitPortType); + +/** +* Retrieves the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] nReferenceBufferSize - size of the buffer (including trailing 0) +* @param[out] pReferenceNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pReferenceBuffer - buffer of the reference, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_getreference(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nReferenceBufferSize, Lib3MF_uint32* pReferenceNeededChars, char * pReferenceBuffer); + +/** +* Sets the reference of the port, only used for input ports +* +* @param[in] pImplicitPort - ImplicitPort instance. +* @param[in] pReference - the reference +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitport_setreference(Lib3MF_ImplicitPort pImplicitPort, const char * pReference); + +/************************************************************************************************************************* + Class definition for Iterator +**************************************************************************************************************************/ + +/** +* Iterates to the next item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasNext - Iterates to the next item in the list. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_iterator_movenext(Lib3MF_Iterator pIterator, bool * pHasNext); + +/** +* Iterates to the previous item in the list. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pHasPrevious - Iterates to the previous item in the list. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_iterator_moveprevious(Lib3MF_Iterator pIterator, bool * pHasPrevious); + +/** +* Returns the number of items the iterator captures. +* +* @param[in] pIterator - Iterator instance. +* @param[out] pCount - returns the number of items the iterator captures. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_iterator_count(Lib3MF_Iterator pIterator, Lib3MF_uint64 * pCount); + +/************************************************************************************************************************* + Class definition for ImplicitPortIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pImplicitPortIterator - ImplicitPortIterator instance. +* @param[out] pPort - The current element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitportiterator_getcurrent(Lib3MF_ImplicitPortIterator pImplicitPortIterator, Lib3MF_ImplicitPort * pPort); + +/************************************************************************************************************************* + Class definition for ImplicitNode +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getidentifier(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_setidentifier(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier); + +/** +* Retrieves the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getdisplayname(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_setdisplayname(Lib3MF_ImplicitNode pImplicitNode, const char * pDisplayName); + +/** +* Retrieves the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] nTagBufferSize - size of the buffer (including trailing 0) +* @param[out] pTagNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pTagBuffer - buffer of the tag, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_gettag(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nTagBufferSize, Lib3MF_uint32* pTagNeededChars, char * pTagBuffer); + +/** +* Sets the tag of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pTag - the tag +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_settag(Lib3MF_ImplicitNode pImplicitNode, const char * pTag); + +/** +* Retrieves the type of the node +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pType - the type of the node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getnodetype(Lib3MF_ImplicitNode pImplicitNode, Lib3MF::eImplicitNodeType * pType); + +/** +* Add an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[out] pPort - +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_addinput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator for the inputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getinputs(Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Add an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[out] pPort - +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_addoutput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pIterator - the iterator the outputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_getoutputs(Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Retrieves an input +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_findinput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_findoutput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/** +* Checks if the types of the input and output ports are valid for the node type +* +* @param[in] pImplicitNode - ImplicitNode instance. +* @param[out] pValid - true, if the types are valid +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitnode_aretypesvalid(Lib3MF_ImplicitNode pImplicitNode, bool * pValid); + +/************************************************************************************************************************* + Class definition for OneInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pInput - the input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_oneinputnode_getinputa(Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves the output +* +* @param[in] pOneInputNode - OneInputNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_oneinputnode_getoutputresult(Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for SinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcSinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcCosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SinhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CoshNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TanhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for RoundNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CeilNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FloorNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SignNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FractNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for AbsNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ExpNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LogNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for Log10Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for LengthNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for TransposeNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for InverseNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SqrtNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ResourceIdNode +**************************************************************************************************************************/ + +/** +* Sets the Resource that the resourceid attribute of the node will point to +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[in] pResource - the resource +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_resourceidnode_setresource(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource pResource); + +/** +* Retrieves the resource of the node +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pResource - the resource +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_resourceidnode_getresource(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource * pResource); + +/** +* Retrieves the output +* +* @param[in] pResourceIdNode - ResourceIdNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_resourceidnode_getoutputvalue(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for TwoInputNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pTwoInputNode - TwoInputNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_twoinputnode_getinputb(Lib3MF_TwoInputNode pTwoInputNode, Lib3MF_ImplicitPort * pB); + +/************************************************************************************************************************* + Class definition for AdditionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SubtractionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DivisionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DotNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for CrossNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ArcTan2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MatVecMultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for MaxNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for FmodNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for ModNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for PowNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for SelectNode +**************************************************************************************************************************/ + +/** +* Retrieves the second input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pB - the second input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_selectnode_getinputb(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pB); + +/** +* Retrieves the third input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pC - the third input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_selectnode_getinputc(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pC); + +/** +* Retrieves the fourth input +* +* @param[in] pSelectNode - SelectNode instance. +* @param[out] pD - the fourth input +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_selectnode_getinputd(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pD); + +/************************************************************************************************************************* + Class definition for ClampNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the lower limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMin - the input for the lower limit +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_clampnode_getinputmin(Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMin); + +/** +* Retrieves the input for the upper limit +* +* @param[in] pClampNode - ClampNode instance. +* @param[out] pMax - the input for the upper limit +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_clampnode_getinputmax(Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMax); + +/************************************************************************************************************************* + Class definition for ComposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the x component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pX - the input for the x component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getinputx(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the input for the y component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pY - the input for the y component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getinputy(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the input for the z component +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pZ - the input for the z component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getinputz(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/** +* Retrieves the output +* +* @param[in] pComposeVectorNode - ComposeVectorNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composevectornode_getoutputresult(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for VectorFromScalarNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class definition for DecomposeVectorNode +**************************************************************************************************************************/ + +/** +* Retrieves the input +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pA - the input port for the vector to decompose +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getinputa(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pA); + +/** +* Retrieves the output for the x component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pX - the output for the x component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getoutputx(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pX); + +/** +* Retrieves the output for the y component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pY - the output for the y component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getoutputy(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pY); + +/** +* Retrieves the output for the z component +* +* @param[in] pDecomposeVectorNode - DecomposeVectorNode instance. +* @param[out] pZ - the output for the z component +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_decomposevectornode_getoutputz(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pZ); + +/************************************************************************************************************************* + Class definition for ComposeMatrixNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the element 0 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM00 - the input for the m00 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm00(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM00); + +/** +* Retrieves the input for the element 0 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM01 - the input for the m01 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm01(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM01); + +/** +* Retrieves the input for the element 0 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM02 - the input for the m02 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm02(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM02); + +/** +* Retrieves the input for the element 0 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM03 - the input for the m03 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm03(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM03); + +/** +* Retrieves the input for the element 1 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM10 - the input for the m10 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm10(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM10); + +/** +* Retrieves the input for the element 1 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM11 - the input for the m11 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm11(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM11); + +/** +* Retrieves the input for the element 1 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM12 - the input for the m12 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm12(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM12); + +/** +* Retrieves the input for the element 1 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM13 - the input for the m3 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm13(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM13); + +/** +* Retrieves the input for the element 2 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM20 - the input for the m2 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm20(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM20); + +/** +* Retrieves the input for the element 2 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM21 - +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm21(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM21); + +/** +* Retrieves the input for the element 2 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM22 - the input for the m22 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm22(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM22); + +/** +* Retrieves the input for the element 2 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM23 - the input for the m23 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm23(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM23); + +/** +* Retrieves the input for the element 3 0 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM30 - the input for the m30 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm30(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM30); + +/** +* Retrieves the input for the element 3 1 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM31 - the input for the m31 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm31(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM31); + +/** +* Retrieves the input for the element 3 2 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM32 - the input for the m32 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm32(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM32); + +/** +* Retrieves the input for the element 3 3 +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pM33 - the input for the m33 element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getinputm33(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM33); + +/** +* Retrieves the output +* +* @param[in] pComposeMatrixNode - ComposeMatrixNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_composematrixnode_getoutputresult(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromRowsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow0 - the input for the first row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputa(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow0); + +/** +* Retrieves the input for the second row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow1 - the input for the second row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputb(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow1); + +/** +* Retrieves the input for the third row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow2 - the input for the third row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputc(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow2); + +/** +* Retrieves the input for the fourth row +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pRow3 - the input for the fourth row +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getinputd(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromRowsNode - MatrixFromRowsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromrowsnode_getoutputresult(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for MatrixFromColumnsNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the first column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn0 - the input for the first column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputa(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn0); + +/** +* Retrieves the input for the second column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn1 - the input for the second column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputb(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn1); + +/** +* Retrieves the input for the third column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn2 - the input for the third column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputc(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn2); + +/** +* Retrieves the input for the fourth column +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pColumn3 - the input for the fourth column +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputd(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn3); + +/** +* Retrieves the output +* +* @param[in] pMatrixFromColumnsNode - MatrixFromColumnsNode instance. +* @param[out] pResult - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_matrixfromcolumnsnode_getoutputresult(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pResult); + +/************************************************************************************************************************* + Class definition for ConstantNode +**************************************************************************************************************************/ + +/** +* Sets the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[in] dValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constantnode_setconstant(Lib3MF_ConstantNode pConstantNode, Lib3MF_double dValue); + +/** +* Retrieves the constant value of the node +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constantnode_getconstant(Lib3MF_ConstantNode pConstantNode, Lib3MF_double * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstantNode - ConstantNode instance. +* @param[out] pValue - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constantnode_getoutputvalue(Lib3MF_ConstantNode pConstantNode, Lib3MF_ImplicitPort * pValue); + +/************************************************************************************************************************* + Class definition for ConstVecNode +**************************************************************************************************************************/ + +/** +* Sets the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constvecnode_setvector(Lib3MF_ConstVecNode pConstVecNode, const Lib3MF::sVector * pValue); + +/** +* Retrieves the vector value of the node +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constvecnode_getvector(Lib3MF_ConstVecNode pConstVecNode, Lib3MF::sVector * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstVecNode - ConstVecNode instance. +* @param[out] pVector - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constvecnode_getoutputvector(Lib3MF_ConstVecNode pConstVecNode, Lib3MF_ImplicitPort * pVector); + +/************************************************************************************************************************* + Class definition for ConstMatNode +**************************************************************************************************************************/ + +/** +* Sets the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[in] pValue - the value +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constmatnode_setmatrix(Lib3MF_ConstMatNode pConstMatNode, const Lib3MF::sMatrix4x4 * pValue); + +/** +* Retrieves the matrix value of the node +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pValue - the matrix +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constmatnode_getmatrix(Lib3MF_ConstMatNode pConstMatNode, Lib3MF::sMatrix4x4 * pValue); + +/** +* Retrieves the output +* +* @param[in] pConstMatNode - ConstMatNode instance. +* @param[out] pMatrix - the output +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_constmatnode_getoutputmatrix(Lib3MF_ConstMatNode pConstMatNode, Lib3MF_ImplicitPort * pMatrix); + +/************************************************************************************************************************* + Class definition for MeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshnode_getinputmesh(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshnode_getinputpos(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pMeshNode - MeshNode instance. +* @param[out] pDistance - the output port for the signed distance to the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_meshnode_getoutputdistance(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for UnsignedMeshNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the model resource id of the mesh +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pMesh - the input port for the model resource id of the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getinputmesh(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pMesh); + +/** +* Retrieves the input for the position +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pPos - the input port for the position +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getinputpos(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pPos); + +/** +* Retrieves the output +* +* @param[in] pUnsignedMeshNode - UnsignedMeshNode instance. +* @param[out] pDistance - the output port for the unsigned distance to the mesh +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_unsignedmeshnode_getoutputdistance(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance); + +/************************************************************************************************************************* + Class definition for FunctionCallNode +**************************************************************************************************************************/ + +/** +* Retrieves the input for the function id +* +* @param[in] pFunctionCallNode - FunctionCallNode instance. +* @param[out] pFunction - the input port for the function +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functioncallnode_getinputfunctionid(Lib3MF_FunctionCallNode pFunctionCallNode, Lib3MF_ImplicitPort * pFunction); + +/************************************************************************************************************************* + Class definition for NodeIterator +**************************************************************************************************************************/ + +/** +* Returns the current element +* +* @param[in] pNodeIterator - NodeIterator instance. +* @param[out] pNode - The current element +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_nodeiterator_getcurrent(Lib3MF_NodeIterator pNodeIterator, Lib3MF_ImplicitNode * pNode); + +/************************************************************************************************************************* + Class definition for Function +**************************************************************************************************************************/ + +/** +* Retrieves the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] nDisplayNameBufferSize - size of the buffer (including trailing 0) +* @param[out] pDisplayNameNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pDisplayNameBuffer - buffer of the display name, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_getdisplayname(Lib3MF_Function pFunction, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer); + +/** +* Sets the display name of the function +* +* @param[in] pFunction - Function instance. +* @param[in] pDisplayName - the display name +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_setdisplayname(Lib3MF_Function pFunction, const char * pDisplayName); + +/** +* Add an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[in] pDisplayName - the display name of the input +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_addinput(Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, Lib3MF::eImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the inputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the list of inputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_getinputs(Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an input +* +* @param[in] pFunction - Function instance. +* @param[in] pInput - The input to be removed +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_removeinput(Lib3MF_Function pFunction, Lib3MF_ImplicitPort pInput); + +/** +* Add an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[in] pDisplayName - the display name of the output +* @param[in] eType - the type of the input +* @param[out] pPort - The added input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_addoutput(Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, Lib3MF::eImplicitPortType eType, Lib3MF_ImplicitPort * pPort); + +/** +* Retrieves the outputs +* +* @param[in] pFunction - Function instance. +* @param[out] pIterator - iterator for the outputs +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_getoutputs(Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator); + +/** +* Removes an output +* +* @param[in] pFunction - Function instance. +* @param[in] pOutput - The output to be removed +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_removeoutput(Lib3MF_Function pFunction, Lib3MF_ImplicitPort pOutput); + +/** +* Retrieves an input +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the input +* @param[out] pInput - the input port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_findinput(Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pInput); + +/** +* Retrieves an output +* +* @param[in] pFunction - Function instance. +* @param[in] pIdentifier - the identifier of the output +* @param[out] pOutput - the output port +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_function_findoutput(Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput); + +/************************************************************************************************************************* + Class definition for ImplicitFunction +**************************************************************************************************************************/ + +/** +* Retrieves the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] nIdentifierBufferSize - size of the buffer (including trailing 0) +* @param[out] pIdentifierNeededChars - will be filled with the count of the written bytes, or needed buffer size. +* @param[out] pIdentifierBuffer - buffer of the identifier, may be NULL +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_getidentifier(Lib3MF_ImplicitFunction pImplicitFunction, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer); + +/** +* Sets the identifier of the function +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_setidentifier(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier); + +/** +* Add a node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] eNodeType - the type of the node +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addnode(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF::eImplicitNodeType eNodeType, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ImplicitNode * pNode); + +/** +* Add a SinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsinnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinNode * pNode); + +/** +* Add a CosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcosnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CosNode * pNode); + +/** +* Add a TanNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addtannode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanNode * pNode); + +/** +* Add a ArcSinNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addarcsinnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcSinNode * pNode); + +/** +* Add a ArcCosNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addarccosnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcCosNode * pNode); + +/** +* Add a ArcTan2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addarctan2node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcTan2Node * pNode); + +/** +* Add a SinhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsinhnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinhNode * pNode); + +/** +* Add a CoshNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcoshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CoshNode * pNode); + +/** +* Add a TanhNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addtanhnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanhNode * pNode); + +/** +* Add a RoundNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addroundnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_RoundNode * pNode); + +/** +* Add a CeilNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addceilnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CeilNode * pNode); + +/** +* Add a FloorNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfloornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FloorNode * pNode); + +/** +* Add a SignNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsignnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SignNode * pNode); + +/** +* Add a FractNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfractnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FractNode * pNode); + +/** +* Add a AbsNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addabsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AbsNode * pNode); + +/** +* Add a ExpNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addexpnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ExpNode * pNode); + +/** +* Add a LogNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlognode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_LogNode * pNode); + +/** +* Add a Log2Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlog2node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log2Node * pNode); + +/** +* Add a Log10Node +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlog10node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log10Node * pNode); + +/** +* Add a LengthNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlengthnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_LengthNode * pNode); + +/** +* Add a TransposeNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addtransposenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TransposeNode * pNode); + +/** +* Add a InverseNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_inversenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_InverseNode * pNode); + +/** +* Add a SqrtNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsqrtnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SqrtNode * pNode); + +/** +* Add a ResourceIdNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addresourceidnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ResourceIdNode * pNode); + +/** +* Add an AdditionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addadditionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AdditionNode * pNode); + +/** +* Add a SubtractionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addsubtractionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SubtractionNode * pNode); + +/** +* Add a MultiplicationNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmultiplicationnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MultiplicationNode * pNode); + +/** +* Add a DivisionNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_adddivisionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_DivisionNode * pNode); + +/** +* Add a DotNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_adddotnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DotNode * pNode); + +/** +* Add a CrossNode +* +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcrossnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_CrossNode * pNode); /** -* Obtains the BaseMaterialGroup instance of this CompositeMaterials. +* Add a MatVecMultiplicationNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[out] pBaseMaterialGroupInstance - returns the BaseMaterialGroup instance of this CompositeMaterials +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getbasematerialgroup(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmatvecmultiplicationnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatVecMultiplicationNode * pNode); /** -* Adds a new Composite-Mixing Values to the CompositeMaterials. +* Add a MinNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[in] pCompositeBuffer - CompositeConstituent buffer of The Composite Constituents to be added as composite -* @param[out] pPropertyID - returns new PropertyID of the new Composite in the CompositeMaterials. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_addcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const Lib3MF::sCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addminnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MinNode * pNode); /** -* Removes a Composite-Maxing Ratio from the CompositeMaterials. +* Add a MaxNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_removecomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmaxnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MaxNode * pNode); /** -* Obtains a Composite-Maxing Ratio of this CompositeMaterials. +* Add a FmodNode * -* @param[in] pCompositeMaterials - CompositeMaterials instance. -* @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. -* @param[in] nCompositeBufferSize - Number of elements in buffer -* @param[out] pCompositeNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_compositematerials_getcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, Lib3MF::sCompositeConstituent * pCompositeBuffer); - -/************************************************************************************************************************* - Class definition for MultiPropertyGroup -**************************************************************************************************************************/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfmodnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FmodNode * pNode); /** -* Retrieves the count of MultiProperty-s in the MultiPropertyGroup. +* Add a PowNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the count of MultiProperty-s +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getcount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addpownode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_PowNode * pNode); /** -* returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup +* Add a SelectNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getallpropertyids(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addselectnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SelectNode * pNode); /** -* Adds a new MultiProperty to the MultiPropertyGroup. +* Add a ClampNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the new MultiProperty. -* @param[out] pPropertyID - returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] eConfiguration - the configuration of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addclampnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, Lib3MF::eImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ClampNode * pNode); /** -* Sets the PropertyIDs of a MultiProperty. +* Add a ComposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[in] pPropertyIDsBuffer - uint32 buffer of The new PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_setmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcomposevectornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeVectorNode * pNode); /** -* Obtains the PropertyIDs of a MultiProperty. +* Add a VectorFromScalar * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. -* @param[in] nPropertyIDsBufferSize - Number of elements in buffer -* @param[out] pPropertyIDsNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addvectorfromscalarnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_VectorFromScalarNode * pNode); /** -* Removes a MultiProperty from this MultiPropertyGroup. +* Add a DecomposeVectorNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removemultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_adddecomposevectornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DecomposeVectorNode * pNode); /** -* Retrieves the number of layers of this MultiPropertyGroup. +* Add a ComposeMatrixNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[out] pCount - returns the number of layers +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayercount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addcomposematrixnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeMatrixNode * pNode); /** -* Adds a MultiPropertyLayer to this MultiPropertyGroup. +* Add a MatrixFromRowsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] pTheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup -* @param[out] pLayerIndex - returns the index of this MultiPropertyLayer +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_addlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF::sMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmatrixfromrowsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromRowsNode * pNode); /** -* Obtains a MultiPropertyLayer of this MultiPropertyGroup. +* Add a MatrixFromColumnsNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried -* @param[out] pTheLayer - The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_getlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, Lib3MF::sMultiPropertyLayer * pTheLayer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmatrixfromcolumnsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromColumnsNode * pNode); /** -* Removes a MultiPropertyLayer from this MultiPropertyGroup. +* Add a ConstantNode * -* @param[in] pMultiPropertyGroup - MultiPropertyGroup instance. -* @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_multipropertygroup_removelayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex); - -/************************************************************************************************************************* - Class definition for Attachment -**************************************************************************************************************************/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addconstantnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstantNode * pNode); /** -* Retrieves an attachment's package path. This function will be removed in a later release. +* Add a ConstVecNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package path string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getpath(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addconstvecnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstVecNode * pNode); /** -* Sets an attachment's package path. This function will be removed in a later release. +* Add a ConstMatNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new path of the attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setpath(Lib3MF_Attachment pAttachment, const char * pPath); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addconstmatnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstMatNode * pNode); /** -* Returns the PackagePart that is this attachment. +* Add a MeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[out] pPackagePart - The PackagePart of this attachment. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_packagepart(Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addmeshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MeshNode * pNode); /** -* Retrieves an attachment's relationship type +* Add a UnsignedMeshNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] nPathBufferSize - size of the buffer (including trailing 0) -* @param[out] pPathNeededChars - will be filled with the count of the written bytes, or needed buffer size. -* @param[out] pPathBuffer - buffer of returns the attachment's package relationship type string, may be NULL +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getrelationshiptype(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addunsignedmeshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode); /** -* Sets an attachment's relationship type. +* Add a FunctionCallNode * -* @param[in] pAttachment - Attachment instance. -* @param[in] pPath - new relationship type string. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pIdentifier - the identifier of the node +* @param[in] pDisplayName - the display name of the node +* @param[in] pTag - the tag of the node +* @param[out] pNode - the added node * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attachment pAttachment, const char * pPath); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addfunctioncallnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode); /** -* Writes out the attachment as file. +* Retrieves the nodes * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to write into. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[out] pIterator - iterator for the list of nodes * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_getnodes(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_NodeIterator * pIterator); /** -* Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Removes a node * -* @param[in] pAttachment - Attachment instance. -* @param[in] pFileName - file to read from. +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pNode - The node to be removed * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_removenode(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitNode pNode); /** -* Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[in] pTheReadCallback - Callback to call for reading a data chunk -* @param[in] nStreamSize - number of bytes the callback returns -* @param[in] pTheSeekCallback - Callback to call for seeking in the stream. -* @param[in] pUserData - Userdata that is passed to the callback function +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - the source port +* @param[in] pTarget - the target port * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfromcallback(Lib3MF_Attachment pAttachment, Lib3MF::ReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MF::SeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlink(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitPort pSource, Lib3MF_ImplicitPort pTarget); /** -* Retrieves the size of the attachment stream +* Add a link * -* @param[in] pAttachment - Attachment instance. -* @param[out] pStreamSize - the stream size +* @param[in] pImplicitFunction - ImplicitFunction instance. +* @param[in] pSource - name of the source port in the format nodename.portname +* @param[in] pTarget - name of the target port in the format nodename.portname * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_addlinkbynames(Lib3MF_ImplicitFunction pImplicitFunction, const char * pSource, const char * pTarget); /** -* Writes out the attachment into a buffer +* Clears the function * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[out] pBufferNeededCount - will be filled with the count of the written elements, or needed buffer size. -* @param[out] pBufferBuffer - uint8 buffer of Buffer to write into +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_clear(Lib3MF_ImplicitFunction pImplicitFunction); /** -* Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). +* Sorts the nodes topologically * -* @param[in] pAttachment - Attachment instance. -* @param[in] nBufferBufferSize - Number of elements in buffer -* @param[in] pBufferBuffer - uint8 buffer of Buffer to read from +* @param[in] pImplicitFunction - ImplicitFunction instance. * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_attachment_readfrombuffer(Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_implicitfunction_sortnodestopologically(Lib3MF_ImplicitFunction pImplicitFunction); /************************************************************************************************************************* - Class definition for Texture2D + Class definition for FunctionFromImage3D **************************************************************************************************************************/ /** -* Retrieves the attachment located at the path of the texture. +* Returns the selected 3D image. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pImage3D - image instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getimage3d(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D * pImage3D); /** -* Sets the texture's package path to the path of the attachment. +* Sets the 3D image of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] pAttachment - attachment that holds the texture's image information. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] pImage3D - image instance * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setimage3d(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D pImage3D); /** -* Retrieves a texture's content type. +* Sets the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pContentType - returns content type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eFilter - texture filter * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getcontenttype(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType * pContentType); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setfilter(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureFilter eFilter); /** -* Retrieves a texture's content type. +* Returns the texture filter of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eContentType - new Content Type +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pFilter - texture filter * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setcontenttype(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureType eContentType); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getfilter(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureFilter * pFilter); /** -* Retrieves a texture's tilestyle type. +* Sets the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pTileStyleU - returns tilestyle type enum. -* @param[out] pTileStyleV - returns tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] eTileStyleU - tile style in U +* @param[in] eTileStyleV - tile style in V +* @param[in] eTileStyleW - tile style in W * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_gettilestyleuv(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle * pTileStyleU, Lib3MF::eTextureTileStyle * pTileStyleV); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_settilestyles(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureTileStyle eTileStyleU, Lib3MF::eTextureTileStyle eTileStyleV, Lib3MF::eTextureTileStyle eTileStyleW); /** -* Sets a texture's tilestyle type. +* Retrieves the tile styles of the selector. * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eTileStyleU - new tilestyle type enum. -* @param[in] eTileStyleV - new tilestyle type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pTileStyleU - tile style in U +* @param[out] pTileStyleV - tile style in V +* @param[out] pTileStyleW - tile style in W * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_settilestyleuv(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureTileStyle eTileStyleU, Lib3MF::eTextureTileStyle eTileStyleV); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_gettilestyles(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF::eTextureTileStyle * pTileStyleU, Lib3MF::eTextureTileStyle * pTileStyleV, Lib3MF::eTextureTileStyle * pTileStyleW); /** -* Retrieves a texture's filter type. +* returns the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[out] pFilter - returns filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_getfilter(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter * pFilter); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getoffset(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pOffset); /** -* Sets a texture's filter type. +* Sets the offset value for the pixel values in the Image3D * -* @param[in] pTexture2D - Texture2D instance. -* @param[in] eFilter - sets new filter type enum. +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dOffset - the offset value for the pixel values in the Image3D * @return error code or 0 (success) */ -LIB3MF_DECLSPEC Lib3MFResult lib3mf_texture2d_setfilter(Lib3MF_Texture2D pTexture2D, Lib3MF::eTextureFilter eFilter); +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setoffset(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dOffset); + +/** +* returns the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[out] pScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_getscale(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pScale); + +/** +* Sets the scale value for the pixel values in the Image3D +* +* @param[in] pFunctionFromImage3D - FunctionFromImage3D instance. +* @param[in] dScale - the scale value for the pixel values in the Image3D +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_functionfromimage3d_setscale(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dScale); /************************************************************************************************************************* Class definition for BuildItem @@ -3145,6 +5756,16 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getcolorgroupbyid(Lib3MF_Model pModel, */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_SliceStack * pSliceStacInstance); +/** +* finds a level set object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pLevelSetObjectInstance - returns the level set object instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getlevelsetbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance); + /** * returns, whether a build has a UUID and, if true, the build's UUID * @@ -3283,6 +5904,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getmultipropertygroups(Lib3MF_Model pM */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestacks(Lib3MF_Model pModel, Lib3MF_SliceStackIterator * pResourceIterator); +/** +* creates a resource iterator instance with all image3d resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getimage3ds(Lib3MF_Model pModel, Lib3MF_Image3DIterator * pResourceIterator); + /** * Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. * @@ -3292,6 +5922,15 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getslicestacks(Lib3MF_Model pModel, Li */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_mergetomodel(Lib3MF_Model pModel, Lib3MF_Model * pMergedModelInstance); +/** +* Merges the given model into this model. +* +* @param[in] pModel - Model instance. +* @param[in] pModelInstance - model to be merged +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_mergefrommodel(Lib3MF_Model pModel, Lib3MF_Model pModelInstance); + /** * adds an empty mesh object to the model. * @@ -3377,6 +6016,28 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addcompositematerials(Lib3MF_Model pMo */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addmultipropertygroup(Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance); +/** +* creates a new 3D Image Resource +* +* @param[in] pModel - Model instance. +* @param[in] nColumnCount - the number of columns in each sheet. +* @param[in] nRowCount - the number of rows in each sheet. +* @param[in] nSheetCount - the number of sheets in the image stack. +* @param[out] pInstance - returns the new ImageStack instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addimagestack(Lib3MF_Model pModel, Lib3MF_uint32 nColumnCount, Lib3MF_uint32 nRowCount, Lib3MF_uint32 nSheetCount, Lib3MF_ImageStack * pInstance); + +/** +* finds an ImageStack object by its UniqueResourceID +* +* @param[in] pModel - Model instance. +* @param[in] nUniqueResourceID - UniqueResourceID +* @param[out] pImageStackInstance - returns the image stack instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getimagestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ImageStack * pImageStackInstance); + /** * adds a build item to the model. * @@ -3528,6 +6189,70 @@ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_setrandomnumbercallback(Lib3MF_Model p */ LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getkeystore(Lib3MF_Model pModel, Lib3MF_KeyStore * pKeyStore); +/** +* creates a resource iterator for all functions +* +* @param[in] pModel - Model instance. +* @param[out] pTheResourceIterator - returns the resource iterator +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getfunctions(Lib3MF_Model pModel, Lib3MF_FunctionIterator * pTheResourceIterator); + +/** +* adds a function described by nodes to the model +* +* @param[in] pModel - Model instance. +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addimplicitfunction(Lib3MF_Model pModel, Lib3MF_ImplicitFunction * pFunctionInstance); + +/** +* adds a function defined by an image3d to the model +* +* @param[in] pModel - Model instance. +* @param[in] pImage3DInstance - the Image3D-instance used for this function +* @param[out] pFunctionInstance - returns the function instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addfunctionfromimage3d(Lib3MF_Model pModel, Lib3MF_Image3D pImage3DInstance, Lib3MF_FunctionFromImage3D * pFunctionInstance); + +/** +* adds a volume data resource to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pVolumeDataInstance - returns the new volume data instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addvolumedata(Lib3MF_Model pModel, Lib3MF_VolumeData * pVolumeDataInstance); + +/** +* adds an empty boundary shape object to the model. +* +* @param[in] pModel - Model instance. +* @param[out] pLevelSetInstance - returns the mesh object instance +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_addlevelset(Lib3MF_Model pModel, Lib3MF_LevelSet * pLevelSetInstance); + +/** +* creates a resource iterator instance with all boundary shape resources. +* +* @param[in] pModel - Model instance. +* @param[out] pResourceIterator - returns the iterator instance. +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_getlevelsets(Lib3MF_Model pModel, Lib3MF_LevelSetIterator * pResourceIterator); + +/** +* Removes a resource from the model +* +* @param[in] pModel - Model instance. +* @param[in] pResource - The resource to remove +* @return error code or 0 (success) +*/ +LIB3MF_DECLSPEC Lib3MFResult lib3mf_model_removeresource(Lib3MF_Model pModel, Lib3MF_Resource pResource); + /************************************************************************************************************************* Global functions **************************************************************************************************************************/ diff --git a/Autogenerated/Source/lib3mf_interfaceexception.cpp b/Autogenerated/Source/lib3mf_interfaceexception.cpp index 5f10f6f2f..c93e0cf1c 100644 --- a/Autogenerated/Source/lib3mf_interfaceexception.cpp +++ b/Autogenerated/Source/lib3mf_interfaceexception.cpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++ Implementation file with the basic internal exception type in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ diff --git a/Autogenerated/Source/lib3mf_interfaceexception.hpp b/Autogenerated/Source/lib3mf_interfaceexception.hpp index 38891fe7e..f0f87b41c 100644 --- a/Autogenerated/Source/lib3mf_interfaceexception.hpp +++ b/Autogenerated/Source/lib3mf_interfaceexception.hpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++ Header file with the basic internal exception type in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ diff --git a/Autogenerated/Source/lib3mf_interfacejournal.cpp b/Autogenerated/Source/lib3mf_interfacejournal.cpp index 5a94fcddf..2da32518b 100644 --- a/Autogenerated/Source/lib3mf_interfacejournal.cpp +++ b/Autogenerated/Source/lib3mf_interfacejournal.cpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++ implementation file in order to allow easy development of the 3MF Library. It provides an automatic Journaling mechanism for the library implementation. -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -286,7 +286,7 @@ CLib3MFInterfaceJournal::CLib3MFInterfaceJournal (const std::string & sFileName) m_StartTime = std::chrono::high_resolution_clock::now(); m_Stream.open (sFileName, std::ios::out); m_Stream << "\n"; - m_Stream << "\n"; + m_Stream << "\n"; m_Stream << "\n"; } diff --git a/Autogenerated/Source/lib3mf_interfacejournal.hpp b/Autogenerated/Source/lib3mf_interfacejournal.hpp index 361b67bc0..b2ce46c29 100644 --- a/Autogenerated/Source/lib3mf_interfacejournal.hpp +++ b/Autogenerated/Source/lib3mf_interfacejournal.hpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++ header file in order to allow easy development of the 3MF Library. It provides an automatic Journaling mechanism for the library implementation. -Interface version: 2.3.2 +Interface version: 2.4.0 */ diff --git a/Autogenerated/Source/lib3mf_interfaces.hpp b/Autogenerated/Source/lib3mf_interfaces.hpp index 906ffae2d..dfda93cea 100644 --- a/Autogenerated/Source/lib3mf_interfaces.hpp +++ b/Autogenerated/Source/lib3mf_interfaces.hpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -30,7 +30,7 @@ Abstract: This is an autogenerated C++ header file in order to allow easy development of the 3MF Library. The implementer of the 3MF Library needs to derive concrete classes from the abstract classes in this header. -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -67,11 +67,21 @@ class IColorGroupIterator; class ITexture2DGroupIterator; class ICompositeMaterialsIterator; class IMultiPropertyGroupIterator; +class IImage3DIterator; +class IFunctionIterator; +class ILevelSetIterator; class IMetaData; class IMetaDataGroup; class IObject; class IMeshObject; +class ILevelSet; class IBeamLattice; +class IFunctionReference; +class IVolumeDataColor; +class IMaterialMapping; +class IVolumeDataComposite; +class IVolumeDataProperty; +class IVolumeData; class IComponent; class IComponentsObject; class IBeamSet; @@ -80,8 +90,71 @@ class IColorGroup; class ITexture2DGroup; class ICompositeMaterials; class IMultiPropertyGroup; +class IImage3D; +class IImageStack; class IAttachment; class ITexture2D; +class IImplicitPort; +class IIterator; +class IImplicitPortIterator; +class IImplicitNode; +class IOneInputNode; +class ISinNode; +class ICosNode; +class ITanNode; +class IArcSinNode; +class IArcCosNode; +class IArcTanNode; +class ISinhNode; +class ICoshNode; +class ITanhNode; +class IRoundNode; +class ICeilNode; +class IFloorNode; +class ISignNode; +class IFractNode; +class IAbsNode; +class IExpNode; +class ILogNode; +class ILog2Node; +class ILog10Node; +class ILengthNode; +class ITransposeNode; +class IInverseNode; +class ISqrtNode; +class IResourceIdNode; +class ITwoInputNode; +class IAdditionNode; +class ISubtractionNode; +class IMultiplicationNode; +class IDivisionNode; +class IDotNode; +class ICrossNode; +class IArcTan2Node; +class IMatVecMultiplicationNode; +class IMinNode; +class IMaxNode; +class IFmodNode; +class IModNode; +class IPowNode; +class ISelectNode; +class IClampNode; +class IComposeVectorNode; +class IVectorFromScalarNode; +class IDecomposeVectorNode; +class IComposeMatrixNode; +class IMatrixFromRowsNode; +class IMatrixFromColumnsNode; +class IConstantNode; +class IConstVecNode; +class IConstMatNode; +class IMeshNode; +class IUnsignedMeshNode; +class IFunctionCallNode; +class INodeIterator; +class IFunction; +class IImplicitFunction; +class IFunctionFromImage3D; class IBuildItem; class IBuildItemIterator; class ISlice; @@ -901,6 +974,84 @@ class IMultiPropertyGroupIterator : public virtual IResourceIterator { typedef IBaseSharedPtr PIMultiPropertyGroupIterator; +/************************************************************************************************************************* + Class interface for Image3DIterator +**************************************************************************************************************************/ + +class IImage3DIterator : public virtual IResourceIterator { +public: + /** + * IImage3DIterator::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xC4B8EC00A82BF336UL; // First 64 bits of SHA1 of a string: "Lib3MF::Image3DIterator" + } + + /** + * IImage3DIterator::GetCurrentImage3D - Returns the Image3D the iterator points at. + * @return returns the Image3D instance. + */ + virtual IImage3D * GetCurrentImage3D() = 0; + +}; + +typedef IBaseSharedPtr PIImage3DIterator; + + +/************************************************************************************************************************* + Class interface for FunctionIterator +**************************************************************************************************************************/ + +class IFunctionIterator : public virtual IResourceIterator { +public: + /** + * IFunctionIterator::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x40E9035363ACE65EUL; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionIterator" + } + + /** + * IFunctionIterator::GetCurrentFunction - Returns the Function the iterator points at. + * @return returns the Function instance. + */ + virtual IFunction * GetCurrentFunction() = 0; + +}; + +typedef IBaseSharedPtr PIFunctionIterator; + + +/************************************************************************************************************************* + Class interface for LevelSetIterator +**************************************************************************************************************************/ + +class ILevelSetIterator : public virtual IResourceIterator { +public: + /** + * ILevelSetIterator::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xA0C005C035D5371DUL; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSetIterator" + } + + /** + * ILevelSetIterator::GetCurrentLevelSet - Returns the LevelSet the iterator points at. + * @return returns the MeshObject instance. + */ + virtual ILevelSet * GetCurrentLevelSet() = 0; + +}; + +typedef IBaseSharedPtr PILevelSetIterator; + + /************************************************************************************************************************* Class interface for MetaData **************************************************************************************************************************/ @@ -1114,6 +1265,12 @@ class IObject : public virtual IResource { */ virtual bool IsComponentsObject() = 0; + /** + * IObject::IsLevelSetObject - Retrieves, if an object is a level set object + * @return returns, whether the object is a level set object + */ + virtual bool IsLevelSetObject() = 0; + /** * IObject::IsValid - Retrieves, if the object is valid according to the core spec. For mesh objects, we distinguish between the type attribute of the object:In case of object type other, this always means false.In case of object type model or solidsupport, this means, if the mesh suffices all requirements of the core spec chapter 4.1.In case of object type support or surface, this always means true.A component objects is valid if and only if it contains at least one component and all child components are valid objects. * @return returns whether the object is a valid object description @@ -1358,11 +1515,139 @@ class IMeshObject : public virtual IObject { */ virtual IBeamLattice * BeamLattice() = 0; + /** + * IMeshObject::GetVolumeData - Retrieves the VolumeData of this MeshObject. + * @return the VolumeData of this MeshObject + */ + virtual IVolumeData * GetVolumeData() = 0; + + /** + * IMeshObject::SetVolumeData - Sets the VolumeData of this MeshObject. + * @param[in] pTheVolumeData - the VolumeData of this MeshObject + */ + virtual void SetVolumeData(IVolumeData* pTheVolumeData) = 0; + }; typedef IBaseSharedPtr PIMeshObject; +/************************************************************************************************************************* + Class interface for LevelSet +**************************************************************************************************************************/ + +class ILevelSet : public virtual IObject { +public: + /** + * ILevelSet::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xE8A7D9C192EFD0E2UL; // First 64 bits of SHA1 of a string: "Lib3MF::LevelSet" + } + + /** + * ILevelSet::GetFunction - Returns the function that is used as boundary shape. + * @return the function to use as boundary shape + */ + virtual IFunction * GetFunction() = 0; + + /** + * ILevelSet::SetFunction - Sets the function to use as boundary shape. + * @param[in] pTheFunction - the function to use as boundary shape + */ + virtual void SetFunction(IFunction* pTheFunction) = 0; + + /** + * ILevelSet::GetTransform - Returns the transformation matrix into the coordinate system of the referenced Function. + * @return the transformation matrix + */ + virtual Lib3MF::sTransform GetTransform() = 0; + + /** + * ILevelSet::SetTransform - Sets the transformation matrix into the coordinate system of the referenced Function. + * @param[in] Transform - new transformation matrix + */ + virtual void SetTransform(const Lib3MF::sTransform Transform) = 0; + + /** + * ILevelSet::GetChannelName - Returns the name of the function output channel to use. + * @return the name of the function output channel + */ + virtual std::string GetChannelName() = 0; + + /** + * ILevelSet::SetChannelName - Sets the name of the function output channel to use. + * @param[in] sChannelName - new name of the function output channel + */ + virtual void SetChannelName(const std::string & sChannelName) = 0; + + /** + * ILevelSet::SetMinFeatureSize - Sets the minimal feature size as a hint for the function evaluator + * @param[in] dMinFeatureSize - minimal feature size + */ + virtual void SetMinFeatureSize(const Lib3MF_double dMinFeatureSize) = 0; + + /** + * ILevelSet::GetMinFeatureSize - Returns the minimal feature size as a hint for the function evaluator + * @return minimal feature size + */ + virtual Lib3MF_double GetMinFeatureSize() = 0; + + /** + * ILevelSet::SetFallBackValue - Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @param[in] dFallBackValue - fallback value + */ + virtual void SetFallBackValue(const Lib3MF_double dFallBackValue) = 0; + + /** + * ILevelSet::GetFallBackValue - Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @return fallback value + */ + virtual Lib3MF_double GetFallBackValue() = 0; + + /** + * ILevelSet::SetMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + * @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + */ + virtual void SetMeshBBoxOnly(const bool bMeshBBoxOnly) = 0; + + /** + * ILevelSet::GetMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + * @return If set only the bounding box of the mesh is intersected with the boundary + */ + virtual bool GetMeshBBoxOnly() = 0; + + /** + * ILevelSet::SetMesh - Sets the mesh to use as evaluation domain + * @param[in] pTheMesh - The mesh + */ + virtual void SetMesh(IMeshObject* pTheMesh) = 0; + + /** + * ILevelSet::GetMesh - Returns the mesh that is used as evaluation domain + * @return The mesh + */ + virtual IMeshObject * GetMesh() = 0; + + /** + * ILevelSet::GetVolumeData - Retrieves the VolumeData this Object. + * @return the VolumeData of this Object + */ + virtual IVolumeData * GetVolumeData() = 0; + + /** + * ILevelSet::SetVolumeData - Sets the VolumeData of this LevelSet. + * @param[in] pTheVolumeData - the VolumeData of this MeshObject + */ + virtual void SetVolumeData(IVolumeData* pTheVolumeData) = 0; + +}; + +typedef IBaseSharedPtr PILevelSet; + + /************************************************************************************************************************* Class interface for BeamLattice **************************************************************************************************************************/ @@ -1540,189 +1825,487 @@ typedef IBaseSharedPtr PIBeamLattice; /************************************************************************************************************************* - Class interface for Component + Class interface for FunctionReference **************************************************************************************************************************/ -class IComponent : public virtual IBase { +class IFunctionReference : public virtual IBase { public: /** - * IComponent::ClassTypeId - Get Class Type Id + * IFunctionReference::ClassTypeId - Get Class Type Id * @return Class type as a 64 bits integer */ Lib3MF_uint64 ClassTypeId() override { - return 0x4ECDB6A6F69F2BEBUL; // First 64 bits of SHA1 of a string: "Lib3MF::Component" + return 0x4DF17E76926221C2UL; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionReference" } /** - * IComponent::GetObjectResource - Returns the Resource Instance of the component. - * @return filled with the Resource Instance. + * IFunctionReference::GetFunctionResourceID - Returns the UniqueResourceID of the Function. Only functions with a 'pos'-input are allowed. + * @return returns the UniqueResourceID. */ - virtual IObject * GetObjectResource() = 0; + virtual Lib3MF_uint32 GetFunctionResourceID() = 0; /** - * IComponent::GetObjectResourceID - Returns the UniqueResourceID of the component. - * @return returns the UniqueResourceID. + * IFunctionReference::SetFunctionResourceID - Sets the UniqueResourceID to refer to. + * @param[in] nUniqueResourceID - UniqueResourceID of the function */ - virtual Lib3MF_uint32 GetObjectResourceID() = 0; + virtual void SetFunctionResourceID(const Lib3MF_uint32 nUniqueResourceID) = 0; /** - * IComponent::GetUUID - returns, whether a component has a UUID and, if true, the component's UUID - * @param[out] bHasUUID - flag whether the component has a UUID - * @return the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * IFunctionReference::GetTransform - Returns the transformation matrix into the coordinate system of the referenced Function. + * @return the transformation matrix */ - virtual std::string GetUUID(bool & bHasUUID) = 0; + virtual Lib3MF::sTransform GetTransform() = 0; /** - * IComponent::SetUUID - sets the component's UUID - * @param[in] sUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + * IFunctionReference::SetTransform - Sets the transformation matrix into the coordinate system of the referenced Function. + * @param[in] Transform - new transformation matrix */ - virtual void SetUUID(const std::string & sUUID) = 0; + virtual void SetTransform(const Lib3MF::sTransform Transform) = 0; /** - * IComponent::HasTransform - Returns, if the component has a different transformation than the identity matrix - * @return if true is returned, the transformation is not equal than the identity + * IFunctionReference::GetChannelName - Returns the name of the function output channel to use. + * @return the name of the function output channel */ - virtual bool HasTransform() = 0; + virtual std::string GetChannelName() = 0; /** - * IComponent::GetTransform - Returns the transformation matrix of the component. - * @return filled with the component transformation matrix + * IFunctionReference::SetChannelName - Sets the name of the function output channel to use. + * @param[in] sChannelName - new name of the function output channel */ - virtual Lib3MF::sTransform GetTransform() = 0; + virtual void SetChannelName(const std::string & sChannelName) = 0; /** - * IComponent::SetTransform - Sets the transformation matrix of the component. - * @param[in] Transform - new transformation matrix + * IFunctionReference::SetMinFeatureSize - Sets the minimal feature size as a hint for the function evaluator + * @param[in] dMinFeatureSize - minimal feature size */ - virtual void SetTransform(const Lib3MF::sTransform Transform) = 0; + virtual void SetMinFeatureSize(const Lib3MF_double dMinFeatureSize) = 0; + + /** + * IFunctionReference::GetMinFeatureSize - Returns the minimal feature size as a hint for the function evaluator + * @return minimal feature size + */ + virtual Lib3MF_double GetMinFeatureSize() = 0; + + /** + * IFunctionReference::SetFallBackValue - Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @param[in] dFallBackValue - fallback value + */ + virtual void SetFallBackValue(const Lib3MF_double dFallBackValue) = 0; + + /** + * IFunctionReference::GetFallBackValue - Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @return fallback value + */ + virtual Lib3MF_double GetFallBackValue() = 0; }; -typedef IBaseSharedPtr PIComponent; +typedef IBaseSharedPtr PIFunctionReference; /************************************************************************************************************************* - Class interface for ComponentsObject + Class interface for VolumeDataColor **************************************************************************************************************************/ -class IComponentsObject : public virtual IObject { +class IVolumeDataColor : public virtual IFunctionReference { public: /** - * IComponentsObject::ClassTypeId - Get Class Type Id + * IVolumeDataColor::ClassTypeId - Get Class Type Id * @return Class type as a 64 bits integer */ Lib3MF_uint64 ClassTypeId() override { - return 0x6522CF04EB283FEDUL; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" + return 0xD85B5B6143E787E3UL; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataColor" } - /** - * IComponentsObject::AddComponent - Adds a new component to a components object. - * @param[in] pObjectResource - object to add as component. Must not lead to circular references! - * @param[in] Transform - optional transform matrix for the component. - * @return new component instance - */ - virtual IComponent * AddComponent(IObject* pObjectResource, const Lib3MF::sTransform Transform) = 0; +}; - /** - * IComponentsObject::GetComponent - Retrieves a component from a component object. - * @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) - * @return component instance - */ - virtual IComponent * GetComponent(const Lib3MF_uint32 nIndex) = 0; +typedef IBaseSharedPtr PIVolumeDataColor; + + +/************************************************************************************************************************* + Class interface for MaterialMapping +**************************************************************************************************************************/ +class IMaterialMapping : public virtual IFunctionReference { +public: /** - * IComponentsObject::GetComponentCount - Retrieves a component count of a component object. - * @return returns the component count + * IMaterialMapping::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer */ - virtual Lib3MF_uint32 GetComponentCount() = 0; + Lib3MF_uint64 ClassTypeId() override + { + return 0x241FE6B4817C3FE4UL; // First 64 bits of SHA1 of a string: "Lib3MF::MaterialMapping" + } }; -typedef IBaseSharedPtr PIComponentsObject; +typedef IBaseSharedPtr PIMaterialMapping; /************************************************************************************************************************* - Class interface for BeamSet + Class interface for VolumeDataComposite **************************************************************************************************************************/ -class IBeamSet : public virtual IBase { +class IVolumeDataComposite : public virtual IBase { public: /** - * IBeamSet::ClassTypeId - Get Class Type Id + * IVolumeDataComposite::ClassTypeId - Get Class Type Id * @return Class type as a 64 bits integer */ Lib3MF_uint64 ClassTypeId() override { - return 0x30CCDBE90E00B55BUL; // First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" + return 0x46F1DAC40581B304UL; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataComposite" } /** - * IBeamSet::SetName - Sets a beamset's name string - * @param[in] sName - new name of the beamset. + * IVolumeDataComposite::GetBaseMaterialGroup - Returns the BaseMaterialGroup used within this volume data item + * @return The BaseMaterialGroup instance of this VolumeDataComposite element */ - virtual void SetName(const std::string & sName) = 0; + virtual IBaseMaterialGroup * GetBaseMaterialGroup() = 0; /** - * IBeamSet::GetName - Retrieves a beamset's name string - * @return returns the name of the beamset. + * IVolumeDataComposite::SetBaseMaterialGroup - Sets the BaseMaterialGroup to use within this volume data item. + * @param[in] pBaseMaterialGroupInstance - The new BaseMaterialGroup instance of this VolumeDataComposite element */ - virtual std::string GetName() = 0; + virtual void SetBaseMaterialGroup(IBaseMaterialGroup* pBaseMaterialGroupInstance) = 0; /** - * IBeamSet::SetIdentifier - Sets a beamset's identifier string - * @param[in] sIdentifier - new name of the beamset. + * IVolumeDataComposite::GetMaterialMappingCount - Returns the number of material mappings of this VolumeDataComposite element + * @return the number of material mappings. */ - virtual void SetIdentifier(const std::string & sIdentifier) = 0; + virtual Lib3MF_uint32 GetMaterialMappingCount() = 0; /** - * IBeamSet::GetIdentifier - Retrieves a beamset's identifier string - * @return returns the identifier of the beamset. + * IVolumeDataComposite::GetMaterialMapping - Returns MaterialMappting with given index + * @param[in] nIndex - Index of the MaterialMapping in question. + * @return MaterialMapping used in this element */ - virtual std::string GetIdentifier() = 0; + virtual IMaterialMapping * GetMaterialMapping(const Lib3MF_uint32 nIndex) = 0; /** - * IBeamSet::GetReferenceCount - Retrieves the reference count of a beamset - * @return returns the reference count + * IVolumeDataComposite::AddMaterialMapping - Adds a the MaterialMapping + * @param[in] Transform - new transformation matrix + * @return The new MaterialMapping */ - virtual Lib3MF_uint32 GetReferenceCount() = 0; + virtual IMaterialMapping * AddMaterialMapping(const Lib3MF::sTransform Transform) = 0; /** - * IBeamSet::SetReferences - Sets the references of a beamset - * @param[in] nReferencesBufferSize - Number of elements in buffer - * @param[in] pReferencesBuffer - the new indices of all beams in this beamset + * IVolumeDataComposite::RemoveMaterialMapping - Removes the MaterialMapping with given index + * @param[in] nIndex - The index of the MaterialMapping to be removed. */ - virtual void SetReferences(const Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer) = 0; + virtual void RemoveMaterialMapping(const Lib3MF_uint32 nIndex) = 0; + +}; + +typedef IBaseSharedPtr PIVolumeDataComposite; + + +/************************************************************************************************************************* + Class interface for VolumeDataProperty +**************************************************************************************************************************/ +class IVolumeDataProperty : public virtual IFunctionReference { +public: /** - * IBeamSet::GetReferences - Retrieves the references of a beamset - * @param[in] nReferencesBufferSize - Number of elements in buffer - * @param[out] pReferencesNeededCount - will be filled with the count of the written structs, or needed buffer size. - * @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset + * IVolumeDataProperty::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer */ - virtual void GetReferences(Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer) = 0; + Lib3MF_uint64 ClassTypeId() override + { + return 0xFC368AA44ACE42DAUL; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeDataProperty" + } /** - * IBeamSet::GetBallReferenceCount - Retrieves the ball reference count of a beamset - * @return returns the ball reference count + * IVolumeDataProperty::GetName - Gets the qualified name of this property. + * @return The qualified name of this property. */ - virtual Lib3MF_uint32 GetBallReferenceCount() = 0; + virtual std::string GetName() = 0; /** - * IBeamSet::SetBallReferences - Sets the ball references of a beamset - * @param[in] nBallReferencesBufferSize - Number of elements in buffer - * @param[in] pBallReferencesBuffer - the new indices of all balls in this beamset + * IVolumeDataProperty::SetIsRequired - Sets whether this property is required to process this 3MF document instance. + * @param[in] bIsRequired - New value for whether this property is required to process this 3MF document instance. */ - virtual void SetBallReferences(const Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer) = 0; + virtual void SetIsRequired(const bool bIsRequired) = 0; /** - * IBeamSet::GetBallReferences - Retrieves the ball references of a beamset - * @param[in] nBallReferencesBufferSize - Number of elements in buffer - * @param[out] pBallReferencesNeededCount - will be filled with the count of the written structs, or needed buffer size. - * @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset + * IVolumeDataProperty::IsRequired - Returns whether this property is required to process this 3MF document instance. + * @return Is this property required to process this 3MF document instance? */ - virtual void GetBallReferences(Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer) = 0; + virtual bool IsRequired() = 0; + +}; + +typedef IBaseSharedPtr PIVolumeDataProperty; + + +/************************************************************************************************************************* + Class interface for VolumeData +**************************************************************************************************************************/ + +class IVolumeData : public virtual IResource { +public: + /** + * IVolumeData::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x9200586FB91587A7UL; // First 64 bits of SHA1 of a string: "Lib3MF::VolumeData" + } + + /** + * IVolumeData::GetComposite - Returns the VolumeDataComposite of this VolumeData instance + * @return filled with the VolumeDataComposite of this VolumeData instance. + */ + virtual IVolumeDataComposite * GetComposite() = 0; + + /** + * IVolumeData::CreateNewComposite - Creates a new VolumeDataComposite for this VolumeData instance + * @return The new VolumeDataComposite of this VolumeData instance. + */ + virtual IVolumeDataComposite * CreateNewComposite() = 0; + + /** + * IVolumeData::RemoveComposite - Removes the VolumeDataComposite of this VolumeData instance + */ + virtual void RemoveComposite() = 0; + + /** + * IVolumeData::GetColor - Returns the VolumeDataColor of this VolumeData instance + * @return filled with the VolumeDataColor of this VolumeData instance. + */ + virtual IVolumeDataColor * GetColor() = 0; + + /** + * IVolumeData::CreateNewColor - Creates a new VolumeDataColor for this VolumeData instance + * @param[in] pTheFunction - Function used in this element + * @return The new VolumeDataColor of this VolumeData instance. + */ + virtual IVolumeDataColor * CreateNewColor(IFunction* pTheFunction) = 0; + + /** + * IVolumeData::RemoveColor - Removes the VolumeDataColor of this VolumeData instance + */ + virtual void RemoveColor() = 0; + + /** + * IVolumeData::GetPropertyCount - Returns the number of VolumeDataProperty + * @return the number of VolumeDataProperty-elements within this VolumdeData + */ + virtual Lib3MF_uint32 GetPropertyCount() = 0; + + /** + * IVolumeData::GetProperty - Returns the VolumeDataProperty at a given Index + * @param[in] nIndex - the index of the VolumeDataProperty to be returned. + * @return the VolumeDataProperty at the given index. + */ + virtual IVolumeDataProperty * GetProperty(const Lib3MF_uint32 nIndex) = 0; + + /** + * IVolumeData::AddPropertyFromFunction - Adds a new VolumeDataProperty from a Function + * @param[in] sName - the qualified name (namespace+name) of the Property + * @param[in] pTheFunction - Function used in this element + * @return the newly created VolumeDataProperty. + */ + virtual IVolumeDataProperty * AddPropertyFromFunction(const std::string & sName, IFunction* pTheFunction) = 0; + + /** + * IVolumeData::RemoveProperty - Removes the VolumeDataProperty with a given index + * @param[in] nIndex - the index of the VolumeDataProperty to be removed. + */ + virtual void RemoveProperty(const Lib3MF_uint32 nIndex) = 0; + +}; + +typedef IBaseSharedPtr PIVolumeData; + + +/************************************************************************************************************************* + Class interface for Component +**************************************************************************************************************************/ + +class IComponent : public virtual IBase { +public: + /** + * IComponent::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x4ECDB6A6F69F2BEBUL; // First 64 bits of SHA1 of a string: "Lib3MF::Component" + } + + /** + * IComponent::GetObjectResource - Returns the Resource Instance of the component. + * @return filled with the Resource Instance. + */ + virtual IObject * GetObjectResource() = 0; + + /** + * IComponent::GetObjectResourceID - Returns the UniqueResourceID of the component. + * @return returns the UniqueResourceID. + */ + virtual Lib3MF_uint32 GetObjectResourceID() = 0; + + /** + * IComponent::GetUUID - returns, whether a component has a UUID and, if true, the component's UUID + * @param[out] bHasUUID - flag whether the component has a UUID + * @return the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + virtual std::string GetUUID(bool & bHasUUID) = 0; + + /** + * IComponent::SetUUID - sets the component's UUID + * @param[in] sUUID - the UUID as string of the form 'xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx' + */ + virtual void SetUUID(const std::string & sUUID) = 0; + + /** + * IComponent::HasTransform - Returns, if the component has a different transformation than the identity matrix + * @return if true is returned, the transformation is not equal than the identity + */ + virtual bool HasTransform() = 0; + + /** + * IComponent::GetTransform - Returns the transformation matrix of the component. + * @return filled with the component transformation matrix + */ + virtual Lib3MF::sTransform GetTransform() = 0; + + /** + * IComponent::SetTransform - Sets the transformation matrix of the component. + * @param[in] Transform - new transformation matrix + */ + virtual void SetTransform(const Lib3MF::sTransform Transform) = 0; + +}; + +typedef IBaseSharedPtr PIComponent; + + +/************************************************************************************************************************* + Class interface for ComponentsObject +**************************************************************************************************************************/ + +class IComponentsObject : public virtual IObject { +public: + /** + * IComponentsObject::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x6522CF04EB283FEDUL; // First 64 bits of SHA1 of a string: "Lib3MF::ComponentsObject" + } + + /** + * IComponentsObject::AddComponent - Adds a new component to a components object. + * @param[in] pObjectResource - object to add as component. Must not lead to circular references! + * @param[in] Transform - optional transform matrix for the component. + * @return new component instance + */ + virtual IComponent * AddComponent(IObject* pObjectResource, const Lib3MF::sTransform Transform) = 0; + + /** + * IComponentsObject::GetComponent - Retrieves a component from a component object. + * @param[in] nIndex - index of the component to retrieve (0 to componentcount - 1) + * @return component instance + */ + virtual IComponent * GetComponent(const Lib3MF_uint32 nIndex) = 0; + + /** + * IComponentsObject::GetComponentCount - Retrieves a component count of a component object. + * @return returns the component count + */ + virtual Lib3MF_uint32 GetComponentCount() = 0; + +}; + +typedef IBaseSharedPtr PIComponentsObject; + + +/************************************************************************************************************************* + Class interface for BeamSet +**************************************************************************************************************************/ + +class IBeamSet : public virtual IBase { +public: + /** + * IBeamSet::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x30CCDBE90E00B55BUL; // First 64 bits of SHA1 of a string: "Lib3MF::BeamSet" + } + + /** + * IBeamSet::SetName - Sets a beamset's name string + * @param[in] sName - new name of the beamset. + */ + virtual void SetName(const std::string & sName) = 0; + + /** + * IBeamSet::GetName - Retrieves a beamset's name string + * @return returns the name of the beamset. + */ + virtual std::string GetName() = 0; + + /** + * IBeamSet::SetIdentifier - Sets a beamset's identifier string + * @param[in] sIdentifier - new name of the beamset. + */ + virtual void SetIdentifier(const std::string & sIdentifier) = 0; + + /** + * IBeamSet::GetIdentifier - Retrieves a beamset's identifier string + * @return returns the identifier of the beamset. + */ + virtual std::string GetIdentifier() = 0; + + /** + * IBeamSet::GetReferenceCount - Retrieves the reference count of a beamset + * @return returns the reference count + */ + virtual Lib3MF_uint32 GetReferenceCount() = 0; + + /** + * IBeamSet::SetReferences - Sets the references of a beamset + * @param[in] nReferencesBufferSize - Number of elements in buffer + * @param[in] pReferencesBuffer - the new indices of all beams in this beamset + */ + virtual void SetReferences(const Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer) = 0; + + /** + * IBeamSet::GetReferences - Retrieves the references of a beamset + * @param[in] nReferencesBufferSize - Number of elements in buffer + * @param[out] pReferencesNeededCount - will be filled with the count of the written structs, or needed buffer size. + * @param[out] pReferencesBuffer - uint32 buffer of retrieves the indices of all beams in this beamset + */ + virtual void GetReferences(Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer) = 0; + + /** + * IBeamSet::GetBallReferenceCount - Retrieves the ball reference count of a beamset + * @return returns the ball reference count + */ + virtual Lib3MF_uint32 GetBallReferenceCount() = 0; + + /** + * IBeamSet::SetBallReferences - Sets the ball references of a beamset + * @param[in] nBallReferencesBufferSize - Number of elements in buffer + * @param[in] pBallReferencesBuffer - the new indices of all balls in this beamset + */ + virtual void SetBallReferences(const Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer) = 0; + + /** + * IBeamSet::GetBallReferences - Retrieves the ball references of a beamset + * @param[in] nBallReferencesBufferSize - Number of elements in buffer + * @param[out] pBallReferencesNeededCount - will be filled with the count of the written structs, or needed buffer size. + * @param[out] pBallReferencesBuffer - uint32 buffer of retrieves the indices of all balls in this beamset + */ + virtual void GetBallReferences(Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer) = 0; }; @@ -1907,339 +2490,2891 @@ class ITexture2DGroup : public virtual IResource { * @param[in] nPropertyID - the PropertyID of the tex2coord in the Texture2DGroup. * @return The u/v-coordinate within the texture, horizontally right/vertically up from the origin in the lower left of the texture. */ - virtual Lib3MF::sTex2Coord GetTex2Coord(const Lib3MF_uint32 nPropertyID) = 0; + virtual Lib3MF::sTex2Coord GetTex2Coord(const Lib3MF_uint32 nPropertyID) = 0; + + /** + * ITexture2DGroup::RemoveTex2Coord - Removes a tex2coords from the Texture2DGroup. + * @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. + */ + virtual void RemoveTex2Coord(const Lib3MF_uint32 nPropertyID) = 0; + + /** + * ITexture2DGroup::GetTexture2D - Obtains the texture2D instance of this group. + * @return the texture2D instance of this group. + */ + virtual ITexture2D * GetTexture2D() = 0; + +}; + +typedef IBaseSharedPtr PITexture2DGroup; + + +/************************************************************************************************************************* + Class interface for CompositeMaterials +**************************************************************************************************************************/ + +class ICompositeMaterials : public virtual IResource { +public: + /** + * ICompositeMaterials::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xCE16224D688B86F2UL; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" + } + + /** + * ICompositeMaterials::GetCount - Retrieves the count of Composite-s in the CompositeMaterials. + * @return returns the count of Composite-s + */ + virtual Lib3MF_uint32 GetCount() = 0; + + /** + * ICompositeMaterials::GetAllPropertyIDs - returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials + * @param[in] nPropertyIDsBufferSize - Number of elements in buffer + * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written structs, or needed buffer size. + * @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the Composite-Mixing Values in the CompositeMaterials. + */ + virtual void GetAllPropertyIDs(Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) = 0; + + /** + * ICompositeMaterials::GetBaseMaterialGroup - Obtains the BaseMaterialGroup instance of this CompositeMaterials. + * @return returns the BaseMaterialGroup instance of this CompositeMaterials + */ + virtual IBaseMaterialGroup * GetBaseMaterialGroup() = 0; + + /** + * ICompositeMaterials::AddComposite - Adds a new Composite-Mixing Values to the CompositeMaterials. + * @param[in] nCompositeBufferSize - Number of elements in buffer + * @param[in] pCompositeBuffer - The Composite Constituents to be added as composite + * @return returns new PropertyID of the new Composite in the CompositeMaterials. + */ + virtual Lib3MF_uint32 AddComposite(const Lib3MF_uint64 nCompositeBufferSize, const Lib3MF::sCompositeConstituent * pCompositeBuffer) = 0; + + /** + * ICompositeMaterials::RemoveComposite - Removes a Composite-Maxing Ratio from the CompositeMaterials. + * @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. + */ + virtual void RemoveComposite(const Lib3MF_uint32 nPropertyID) = 0; + + /** + * ICompositeMaterials::GetComposite - Obtains a Composite-Maxing Ratio of this CompositeMaterials. + * @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. + * @param[in] nCompositeBufferSize - Number of elements in buffer + * @param[out] pCompositeNeededCount - will be filled with the count of the written structs, or needed buffer size. + * @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID + */ + virtual void GetComposite(const Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, Lib3MF::sCompositeConstituent * pCompositeBuffer) = 0; + +}; + +typedef IBaseSharedPtr PICompositeMaterials; + + +/************************************************************************************************************************* + Class interface for MultiPropertyGroup +**************************************************************************************************************************/ + +class IMultiPropertyGroup : public virtual IResource { +public: + /** + * IMultiPropertyGroup::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xB989E02E43158FE6UL; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" + } + + /** + * IMultiPropertyGroup::GetCount - Retrieves the count of MultiProperty-s in the MultiPropertyGroup. + * @return returns the count of MultiProperty-s + */ + virtual Lib3MF_uint32 GetCount() = 0; + + /** + * IMultiPropertyGroup::GetAllPropertyIDs - returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup + * @param[in] nPropertyIDsBufferSize - Number of elements in buffer + * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written structs, or needed buffer size. + * @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. + */ + virtual void GetAllPropertyIDs(Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) = 0; + + /** + * IMultiPropertyGroup::AddMultiProperty - Adds a new MultiProperty to the MultiPropertyGroup. + * @param[in] nPropertyIDsBufferSize - Number of elements in buffer + * @param[in] pPropertyIDsBuffer - The PropertyIDs of the new MultiProperty. + * @return returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. + */ + virtual Lib3MF_uint32 AddMultiProperty(const Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer) = 0; + + /** + * IMultiPropertyGroup::SetMultiProperty - Sets the PropertyIDs of a MultiProperty. + * @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. + * @param[in] nPropertyIDsBufferSize - Number of elements in buffer + * @param[in] pPropertyIDsBuffer - The new PropertyIDs of the MultiProperty + */ + virtual void SetMultiProperty(const Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer) = 0; + + /** + * IMultiPropertyGroup::GetMultiProperty - Obtains the PropertyIDs of a MultiProperty. + * @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. + * @param[in] nPropertyIDsBufferSize - Number of elements in buffer + * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written structs, or needed buffer size. + * @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty + */ + virtual void GetMultiProperty(const Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) = 0; + + /** + * IMultiPropertyGroup::RemoveMultiProperty - Removes a MultiProperty from this MultiPropertyGroup. + * @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. + */ + virtual void RemoveMultiProperty(const Lib3MF_uint32 nPropertyID) = 0; + + /** + * IMultiPropertyGroup::GetLayerCount - Retrieves the number of layers of this MultiPropertyGroup. + * @return returns the number of layers + */ + virtual Lib3MF_uint32 GetLayerCount() = 0; + + /** + * IMultiPropertyGroup::AddLayer - Adds a MultiPropertyLayer to this MultiPropertyGroup. + * @param[in] TheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup + * @return returns the index of this MultiPropertyLayer + */ + virtual Lib3MF_uint32 AddLayer(const Lib3MF::sMultiPropertyLayer TheLayer) = 0; + + /** + * IMultiPropertyGroup::GetLayer - Obtains a MultiPropertyLayer of this MultiPropertyGroup. + * @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried + * @return The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup + */ + virtual Lib3MF::sMultiPropertyLayer GetLayer(const Lib3MF_uint32 nLayerIndex) = 0; + + /** + * IMultiPropertyGroup::RemoveLayer - Removes a MultiPropertyLayer from this MultiPropertyGroup. + * @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed + */ + virtual void RemoveLayer(const Lib3MF_uint32 nLayerIndex) = 0; + +}; + +typedef IBaseSharedPtr PIMultiPropertyGroup; + + +/************************************************************************************************************************* + Class interface for Image3D +**************************************************************************************************************************/ + +class IImage3D : public virtual IResource { +public: + /** + * IImage3D::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xBD938FF2D2663D61UL; // First 64 bits of SHA1 of a string: "Lib3MF::Image3D" + } + + /** + * IImage3D::GetName - returns the name of this Image3D + * @return the name of this Image3D + */ + virtual std::string GetName() = 0; + + /** + * IImage3D::SetName - sets a new name of this Image3D + * @param[in] sName - the new name of this Image3D + */ + virtual void SetName(const std::string & sName) = 0; + + /** + * IImage3D::IsImageStack - Retrieves, if this Image3D is a ImageStack + * @return returns, whether the Image3D is an ImageStack + */ + virtual bool IsImageStack() = 0; + +}; + +typedef IBaseSharedPtr PIImage3D; + + +/************************************************************************************************************************* + Class interface for ImageStack +**************************************************************************************************************************/ + +class IImageStack : public virtual IImage3D { +public: + /** + * IImageStack::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x13A2561F0CFB712AUL; // First 64 bits of SHA1 of a string: "Lib3MF::ImageStack" + } + + /** + * IImageStack::GetRowCount - Retrieves the number of rows in each image of this image3d + * @return number of rows + */ + virtual Lib3MF_uint32 GetRowCount() = 0; + + /** + * IImageStack::SetRowCount - Sets the number of rows in each image of this image3d + * @param[in] nRowCount - number of rows + */ + virtual void SetRowCount(const Lib3MF_uint32 nRowCount) = 0; + + /** + * IImageStack::GetColumnCount - Retrieves the number of columns in each image of this image3d + * @return number of columns + */ + virtual Lib3MF_uint32 GetColumnCount() = 0; + + /** + * IImageStack::SetColumnCount - Sets the number of columns in each image of this image3d + * @param[in] nColumnCount - number of columns + */ + virtual void SetColumnCount(const Lib3MF_uint32 nColumnCount) = 0; + + /** + * IImageStack::GetSheetCount - Retrieves the number of images in the stack. + * @return number of images + */ + virtual Lib3MF_uint32 GetSheetCount() = 0; + + /** + * IImageStack::GetSheet - Retrieves a sheet of the stack. Raises an error if sheet is not set. + * @param[in] nIndex - index of the image (0-based) + * @return attachment containing the image + */ + virtual IAttachment * GetSheet(const Lib3MF_uint32 nIndex) = 0; + + /** + * IImageStack::SetSheet - Sets a sheet to an existing attachment. + * @param[in] nIndex - index of the image (0-based) + * @param[in] pSheet - attachment containing the image + */ + virtual void SetSheet(const Lib3MF_uint32 nIndex, IAttachment* pSheet) = 0; + + /** + * IImageStack::CreateEmptySheet - Creates a new sheet attachment with empty data. + * @param[in] nIndex - index of the image (0-based) + * @param[in] sPath - path of part in the package + * @return attachment containing the image + */ + virtual IAttachment * CreateEmptySheet(const Lib3MF_uint32 nIndex, const std::string & sPath) = 0; + + /** + * IImageStack::CreateSheetFromBuffer - Creates a new sheet attachment from a memory buffer. + * @param[in] nIndex - index of the image (0-based) + * @param[in] sPath - path of part in the package + * @param[in] nDataBufferSize - Number of elements in buffer + * @param[in] pDataBuffer - binary image data + * @return attachment containing the image + */ + virtual IAttachment * CreateSheetFromBuffer(const Lib3MF_uint32 nIndex, const std::string & sPath, const Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer) = 0; + + /** + * IImageStack::CreateSheetFromFile - Creates a new sheet attachment from a file on disk. + * @param[in] nIndex - index of the image (0-based) + * @param[in] sPath - path of part in the package + * @param[in] sFileName - file name to read from + * @return attachment containing the image + */ + virtual IAttachment * CreateSheetFromFile(const Lib3MF_uint32 nIndex, const std::string & sPath, const std::string & sFileName) = 0; + +}; + +typedef IBaseSharedPtr PIImageStack; + + +/************************************************************************************************************************* + Class interface for Attachment +**************************************************************************************************************************/ + +class IAttachment : public virtual IBase { +public: + /** + * IAttachment::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x8CE7A1191A63A35DUL; // First 64 bits of SHA1 of a string: "Lib3MF::Attachment" + } + + /** + * IAttachment::GetPath - Retrieves an attachment's package path. This function will be removed in a later release. + * @return returns the attachment's package path string + */ + virtual std::string GetPath() = 0; + + /** + * IAttachment::SetPath - Sets an attachment's package path. This function will be removed in a later release. + * @param[in] sPath - new path of the attachment. + */ + virtual void SetPath(const std::string & sPath) = 0; + + /** + * IAttachment::PackagePart - Returns the PackagePart that is this attachment. + * @return The PackagePart of this attachment. + */ + virtual IPackagePart * PackagePart() = 0; + + /** + * IAttachment::GetRelationShipType - Retrieves an attachment's relationship type + * @return returns the attachment's package relationship type string + */ + virtual std::string GetRelationShipType() = 0; + + /** + * IAttachment::SetRelationShipType - Sets an attachment's relationship type. + * @param[in] sPath - new relationship type string. + */ + virtual void SetRelationShipType(const std::string & sPath) = 0; + + /** + * IAttachment::WriteToFile - Writes out the attachment as file. + * @param[in] sFileName - file to write into. + */ + virtual void WriteToFile(const std::string & sFileName) = 0; + + /** + * IAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * @param[in] sFileName - file to read from. + */ + virtual void ReadFromFile(const std::string & sFileName) = 0; + + /** + * IAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. + * @param[in] pTheReadCallback - callback function + * @param[in] nStreamSize - number of bytes the callback returns + * @param[in] pTheSeekCallback - callback function + * @param[in] nUserData - Userdata that is passed to the callback function + */ + virtual void ReadFromCallback(const Lib3MF::ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const Lib3MF::SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) = 0; + + /** + * IAttachment::GetStreamSize - Retrieves the size of the attachment stream + * @return the stream size + */ + virtual Lib3MF_uint64 GetStreamSize() = 0; + + /** + * IAttachment::WriteToBuffer - Writes out the attachment into a buffer + * @param[in] nBufferBufferSize - Number of elements in buffer + * @param[out] pBufferNeededCount - will be filled with the count of the written structs, or needed buffer size. + * @param[out] pBufferBuffer - uint8 buffer of Buffer to write into + */ + virtual void WriteToBuffer(Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer) = 0; + + /** + * IAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). + * @param[in] nBufferBufferSize - Number of elements in buffer + * @param[in] pBufferBuffer - Buffer to read from + */ + virtual void ReadFromBuffer(const Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer) = 0; + +}; + +typedef IBaseSharedPtr PIAttachment; + + +/************************************************************************************************************************* + Class interface for Texture2D +**************************************************************************************************************************/ + +class ITexture2D : public virtual IResource { +public: + /** + * ITexture2D::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xE0441CF976B36319UL; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" + } + + /** + * ITexture2D::GetAttachment - Retrieves the attachment located at the path of the texture. + * @return attachment that holds the texture's image information. + */ + virtual IAttachment * GetAttachment() = 0; + + /** + * ITexture2D::SetAttachment - Sets the texture's package path to the path of the attachment. + * @param[in] pAttachment - attachment that holds the texture's image information. + */ + virtual void SetAttachment(IAttachment* pAttachment) = 0; + + /** + * ITexture2D::GetContentType - Retrieves a texture's content type. + * @return returns content type enum. + */ + virtual Lib3MF::eTextureType GetContentType() = 0; + + /** + * ITexture2D::SetContentType - Retrieves a texture's content type. + * @param[in] eContentType - new Content Type + */ + virtual void SetContentType(const Lib3MF::eTextureType eContentType) = 0; + + /** + * ITexture2D::GetTileStyleUV - Retrieves a texture's tilestyle type. + * @param[out] eTileStyleU - returns tilestyle type enum. + * @param[out] eTileStyleV - returns tilestyle type enum. + */ + virtual void GetTileStyleUV(Lib3MF::eTextureTileStyle & eTileStyleU, Lib3MF::eTextureTileStyle & eTileStyleV) = 0; + + /** + * ITexture2D::SetTileStyleUV - Sets a texture's tilestyle type. + * @param[in] eTileStyleU - new tilestyle type enum. + * @param[in] eTileStyleV - new tilestyle type enum. + */ + virtual void SetTileStyleUV(const Lib3MF::eTextureTileStyle eTileStyleU, const Lib3MF::eTextureTileStyle eTileStyleV) = 0; + + /** + * ITexture2D::GetFilter - Retrieves a texture's filter type. + * @return returns filter type enum. + */ + virtual Lib3MF::eTextureFilter GetFilter() = 0; + + /** + * ITexture2D::SetFilter - Sets a texture's filter type. + * @param[in] eFilter - sets new filter type enum. + */ + virtual void SetFilter(const Lib3MF::eTextureFilter eFilter) = 0; + +}; + +typedef IBaseSharedPtr PITexture2D; + + +/************************************************************************************************************************* + Class interface for ImplicitPort +**************************************************************************************************************************/ + +class IImplicitPort : public virtual IBase { +public: + /** + * IImplicitPort::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xD5C49B04AF1963CDUL; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPort" + } + + /** + * IImplicitPort::GetIdentifier - Retrieves the identifier of the port + * @return the identifier + */ + virtual std::string GetIdentifier() = 0; + + /** + * IImplicitPort::SetIdentifier - Sets the identifier of the port + * @param[in] sIdentifier - the identifier + */ + virtual void SetIdentifier(const std::string & sIdentifier) = 0; + + /** + * IImplicitPort::GetDisplayName - Retrieves the display name of the port + * @return the display name + */ + virtual std::string GetDisplayName() = 0; + + /** + * IImplicitPort::SetDisplayName - Sets the display name of the port + * @param[in] sDisplayName - the display name + */ + virtual void SetDisplayName(const std::string & sDisplayName) = 0; + + /** + * IImplicitPort::SetType - Sets the type of the port + * @param[in] eImplicitPortType - the type + */ + virtual void SetType(const Lib3MF::eImplicitPortType eImplicitPortType) = 0; + + /** + * IImplicitPort::GetType - Retrieves the type of the port + * @return the type + */ + virtual Lib3MF::eImplicitPortType GetType() = 0; + + /** + * IImplicitPort::GetReference - Retrieves the reference of the port, only used for input ports + * @return the reference + */ + virtual std::string GetReference() = 0; + + /** + * IImplicitPort::SetReference - Sets the reference of the port, only used for input ports + * @param[in] sReference - the reference + */ + virtual void SetReference(const std::string & sReference) = 0; + +}; + +typedef IBaseSharedPtr PIImplicitPort; + + +/************************************************************************************************************************* + Class interface for Iterator +**************************************************************************************************************************/ + +class IIterator : public virtual IBase { +public: + /** + * IIterator::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x52F06268CD098EFEUL; // First 64 bits of SHA1 of a string: "Lib3MF::Iterator" + } + + /** + * IIterator::MoveNext - Iterates to the next item in the list. + * @return Iterates to the next item in the list. + */ + virtual bool MoveNext() = 0; + + /** + * IIterator::MovePrevious - Iterates to the previous item in the list. + * @return Iterates to the previous item in the list. + */ + virtual bool MovePrevious() = 0; + + /** + * IIterator::Count - Returns the number of items the iterator captures. + * @return returns the number of items the iterator captures. + */ + virtual Lib3MF_uint64 Count() = 0; + +}; + +typedef IBaseSharedPtr PIIterator; + + +/************************************************************************************************************************* + Class interface for ImplicitPortIterator +**************************************************************************************************************************/ + +class IImplicitPortIterator : public virtual IIterator { +public: + /** + * IImplicitPortIterator::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xC62268F2D7C7012CUL; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitPortIterator" + } + + /** + * IImplicitPortIterator::GetCurrent - Returns the current element + * @return The current element + */ + virtual IImplicitPort * GetCurrent() = 0; + +}; + +typedef IBaseSharedPtr PIImplicitPortIterator; + + +/************************************************************************************************************************* + Class interface for ImplicitNode +**************************************************************************************************************************/ + +class IImplicitNode : public virtual IBase { +public: + /** + * IImplicitNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xE72592A7725AB29BUL; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitNode" + } + + /** + * IImplicitNode::GetIdentifier - Retrieves the identifier of the node + * @return the identifier + */ + virtual std::string GetIdentifier() = 0; + + /** + * IImplicitNode::SetIdentifier - Sets the identifier of the node + * @param[in] sIdentifier - the identifier + */ + virtual void SetIdentifier(const std::string & sIdentifier) = 0; + + /** + * IImplicitNode::GetDisplayName - Retrieves the display name of the node + * @return the display name + */ + virtual std::string GetDisplayName() = 0; + + /** + * IImplicitNode::SetDisplayName - Sets the display name of the node + * @param[in] sDisplayName - the display name + */ + virtual void SetDisplayName(const std::string & sDisplayName) = 0; + + /** + * IImplicitNode::GetTag - Retrieves the tag of the node + * @return the tag + */ + virtual std::string GetTag() = 0; + + /** + * IImplicitNode::SetTag - Sets the tag of the node + * @param[in] sTag - the tag + */ + virtual void SetTag(const std::string & sTag) = 0; + + /** + * IImplicitNode::GetNodeType - Retrieves the type of the node + * @return the type of the node + */ + virtual Lib3MF::eImplicitNodeType GetNodeType() = 0; + + /** + * IImplicitNode::AddInput - Add an input + * @param[in] sIdentifier - the identifier of the input + * @param[in] sDisplayName - the display name of the input + * @return + */ + virtual IImplicitPort * AddInput(const std::string & sIdentifier, const std::string & sDisplayName) = 0; + + /** + * IImplicitNode::GetInputs - Retrieves the inputs + * @return the iterator for the inputs + */ + virtual IImplicitPortIterator * GetInputs() = 0; + + /** + * IImplicitNode::AddOutput - Add an output + * @param[in] sIdentifier - the identifier of the output + * @param[in] sDisplayName - the display name of the output + * @return + */ + virtual IImplicitPort * AddOutput(const std::string & sIdentifier, const std::string & sDisplayName) = 0; + + /** + * IImplicitNode::GetOutputs - Retrieves the outputs + * @return the iterator the outputs + */ + virtual IImplicitPortIterator * GetOutputs() = 0; + + /** + * IImplicitNode::FindInput - Retrieves an input + * @param[in] sIdentifier - the identifier of the input + * @return the input port + */ + virtual IImplicitPort * FindInput(const std::string & sIdentifier) = 0; + + /** + * IImplicitNode::FindOutput - Retrieves an output + * @param[in] sIdentifier - the identifier of the output + * @return the output port + */ + virtual IImplicitPort * FindOutput(const std::string & sIdentifier) = 0; + + /** + * IImplicitNode::AreTypesValid - Checks if the types of the input and output ports are valid for the node type + * @return true, if the types are valid + */ + virtual bool AreTypesValid() = 0; + +}; + +typedef IBaseSharedPtr PIImplicitNode; + + +/************************************************************************************************************************* + Class interface for OneInputNode +**************************************************************************************************************************/ + +class IOneInputNode : public virtual IImplicitNode { +public: + /** + * IOneInputNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xB19B9FDA94B0A5E7UL; // First 64 bits of SHA1 of a string: "Lib3MF::OneInputNode" + } + + /** + * IOneInputNode::GetInputA - Retrieves the input + * @return the input + */ + virtual IImplicitPort * GetInputA() = 0; + + /** + * IOneInputNode::GetOutputResult - Retrieves the output + * @return the output + */ + virtual IImplicitPort * GetOutputResult() = 0; + +}; + +typedef IBaseSharedPtr PIOneInputNode; + + +/************************************************************************************************************************* + Class interface for SinNode +**************************************************************************************************************************/ + +class ISinNode : public virtual IOneInputNode { +public: + /** + * ISinNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xD5AEA50A56306722UL; // First 64 bits of SHA1 of a string: "Lib3MF::SinNode" + } + +}; + +typedef IBaseSharedPtr PISinNode; + + +/************************************************************************************************************************* + Class interface for CosNode +**************************************************************************************************************************/ + +class ICosNode : public virtual IOneInputNode { +public: + /** + * ICosNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x59BC328F6FB5C5FFUL; // First 64 bits of SHA1 of a string: "Lib3MF::CosNode" + } + +}; + +typedef IBaseSharedPtr PICosNode; + + +/************************************************************************************************************************* + Class interface for TanNode +**************************************************************************************************************************/ + +class ITanNode : public virtual IOneInputNode { +public: + /** + * ITanNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x2614CC572AF350B7UL; // First 64 bits of SHA1 of a string: "Lib3MF::TanNode" + } + +}; + +typedef IBaseSharedPtr PITanNode; + + +/************************************************************************************************************************* + Class interface for ArcSinNode +**************************************************************************************************************************/ + +class IArcSinNode : public virtual IOneInputNode { +public: + /** + * IArcSinNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xE554C8A7E72AAF4DUL; // First 64 bits of SHA1 of a string: "Lib3MF::ArcSinNode" + } + +}; + +typedef IBaseSharedPtr PIArcSinNode; + + +/************************************************************************************************************************* + Class interface for ArcCosNode +**************************************************************************************************************************/ + +class IArcCosNode : public virtual IOneInputNode { +public: + /** + * IArcCosNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x943AF6AE0EFD2B8AUL; // First 64 bits of SHA1 of a string: "Lib3MF::ArcCosNode" + } + +}; + +typedef IBaseSharedPtr PIArcCosNode; + + +/************************************************************************************************************************* + Class interface for ArcTanNode +**************************************************************************************************************************/ + +class IArcTanNode : public virtual IOneInputNode { +public: + /** + * IArcTanNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xE47D547615816BADUL; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTanNode" + } + +}; + +typedef IBaseSharedPtr PIArcTanNode; + + +/************************************************************************************************************************* + Class interface for SinhNode +**************************************************************************************************************************/ + +class ISinhNode : public virtual IOneInputNode { +public: + /** + * ISinhNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x3C7756A456F2D089UL; // First 64 bits of SHA1 of a string: "Lib3MF::SinhNode" + } + +}; + +typedef IBaseSharedPtr PISinhNode; + + +/************************************************************************************************************************* + Class interface for CoshNode +**************************************************************************************************************************/ + +class ICoshNode : public virtual IOneInputNode { +public: + /** + * ICoshNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x4A993F91E1DE256DUL; // First 64 bits of SHA1 of a string: "Lib3MF::CoshNode" + } + +}; + +typedef IBaseSharedPtr PICoshNode; + + +/************************************************************************************************************************* + Class interface for TanhNode +**************************************************************************************************************************/ + +class ITanhNode : public virtual IOneInputNode { +public: + /** + * ITanhNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xCF077B19B0B78E9DUL; // First 64 bits of SHA1 of a string: "Lib3MF::TanhNode" + } + +}; + +typedef IBaseSharedPtr PITanhNode; + + +/************************************************************************************************************************* + Class interface for RoundNode +**************************************************************************************************************************/ + +class IRoundNode : public virtual IOneInputNode { +public: + /** + * IRoundNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xD9F5A53C657765AEUL; // First 64 bits of SHA1 of a string: "Lib3MF::RoundNode" + } + +}; + +typedef IBaseSharedPtr PIRoundNode; + + +/************************************************************************************************************************* + Class interface for CeilNode +**************************************************************************************************************************/ + +class ICeilNode : public virtual IOneInputNode { +public: + /** + * ICeilNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x627E211653E11D93UL; // First 64 bits of SHA1 of a string: "Lib3MF::CeilNode" + } + +}; + +typedef IBaseSharedPtr PICeilNode; + + +/************************************************************************************************************************* + Class interface for FloorNode +**************************************************************************************************************************/ + +class IFloorNode : public virtual IOneInputNode { +public: + /** + * IFloorNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x392A0F4C041D249CUL; // First 64 bits of SHA1 of a string: "Lib3MF::FloorNode" + } + +}; + +typedef IBaseSharedPtr PIFloorNode; + + +/************************************************************************************************************************* + Class interface for SignNode +**************************************************************************************************************************/ + +class ISignNode : public virtual IOneInputNode { +public: + /** + * ISignNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x8A45165E6C9646D7UL; // First 64 bits of SHA1 of a string: "Lib3MF::SignNode" + } + +}; + +typedef IBaseSharedPtr PISignNode; + + +/************************************************************************************************************************* + Class interface for FractNode +**************************************************************************************************************************/ + +class IFractNode : public virtual IOneInputNode { +public: + /** + * IFractNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x53E62FD67F4D9A65UL; // First 64 bits of SHA1 of a string: "Lib3MF::FractNode" + } + +}; + +typedef IBaseSharedPtr PIFractNode; + + +/************************************************************************************************************************* + Class interface for AbsNode +**************************************************************************************************************************/ + +class IAbsNode : public virtual IOneInputNode { +public: + /** + * IAbsNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x6B641C7060040BE3UL; // First 64 bits of SHA1 of a string: "Lib3MF::AbsNode" + } + +}; + +typedef IBaseSharedPtr PIAbsNode; + + +/************************************************************************************************************************* + Class interface for ExpNode +**************************************************************************************************************************/ + +class IExpNode : public virtual IOneInputNode { +public: + /** + * IExpNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x3390243A8E2410F3UL; // First 64 bits of SHA1 of a string: "Lib3MF::ExpNode" + } + +}; + +typedef IBaseSharedPtr PIExpNode; + + +/************************************************************************************************************************* + Class interface for LogNode +**************************************************************************************************************************/ + +class ILogNode : public virtual IOneInputNode { +public: + /** + * ILogNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x70021D73AA89FDUL; // First 64 bits of SHA1 of a string: "Lib3MF::LogNode" + } + +}; + +typedef IBaseSharedPtr PILogNode; + + +/************************************************************************************************************************* + Class interface for Log2Node +**************************************************************************************************************************/ + +class ILog2Node : public virtual IOneInputNode { +public: + /** + * ILog2Node::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xE8C0ABF7C5DC7068UL; // First 64 bits of SHA1 of a string: "Lib3MF::Log2Node" + } + +}; + +typedef IBaseSharedPtr PILog2Node; + + +/************************************************************************************************************************* + Class interface for Log10Node +**************************************************************************************************************************/ + +class ILog10Node : public virtual IOneInputNode { +public: + /** + * ILog10Node::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x87740AD53454E0DFUL; // First 64 bits of SHA1 of a string: "Lib3MF::Log10Node" + } + +}; + +typedef IBaseSharedPtr PILog10Node; + + +/************************************************************************************************************************* + Class interface for LengthNode +**************************************************************************************************************************/ + +class ILengthNode : public virtual IOneInputNode { +public: + /** + * ILengthNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xD85889E2739A74B1UL; // First 64 bits of SHA1 of a string: "Lib3MF::LengthNode" + } + +}; + +typedef IBaseSharedPtr PILengthNode; + + +/************************************************************************************************************************* + Class interface for TransposeNode +**************************************************************************************************************************/ + +class ITransposeNode : public virtual IOneInputNode { +public: + /** + * ITransposeNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xA808B7599C158CE6UL; // First 64 bits of SHA1 of a string: "Lib3MF::TransposeNode" + } + +}; + +typedef IBaseSharedPtr PITransposeNode; + + +/************************************************************************************************************************* + Class interface for InverseNode +**************************************************************************************************************************/ + +class IInverseNode : public virtual IOneInputNode { +public: + /** + * IInverseNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xE8601F66A23A0540UL; // First 64 bits of SHA1 of a string: "Lib3MF::InverseNode" + } + +}; + +typedef IBaseSharedPtr PIInverseNode; + + +/************************************************************************************************************************* + Class interface for SqrtNode +**************************************************************************************************************************/ + +class ISqrtNode : public virtual IOneInputNode { +public: + /** + * ISqrtNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x9F831944A3DE31DAUL; // First 64 bits of SHA1 of a string: "Lib3MF::SqrtNode" + } + +}; + +typedef IBaseSharedPtr PISqrtNode; + + +/************************************************************************************************************************* + Class interface for ResourceIdNode +**************************************************************************************************************************/ + +class IResourceIdNode : public virtual IImplicitNode { +public: + /** + * IResourceIdNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xCA86A77C71CD3FAEUL; // First 64 bits of SHA1 of a string: "Lib3MF::ResourceIdNode" + } + + /** + * IResourceIdNode::SetResource - Sets the Resource that the resourceid attribute of the node will point to + * @param[in] pResource - the resource + */ + virtual void SetResource(IResource* pResource) = 0; + + /** + * IResourceIdNode::GetResource - Retrieves the resource of the node + * @return the resource + */ + virtual IResource * GetResource() = 0; + + /** + * IResourceIdNode::GetOutputValue - Retrieves the output + * @return the output + */ + virtual IImplicitPort * GetOutputValue() = 0; + +}; + +typedef IBaseSharedPtr PIResourceIdNode; + + +/************************************************************************************************************************* + Class interface for TwoInputNode +**************************************************************************************************************************/ + +class ITwoInputNode : public virtual IOneInputNode { +public: + /** + * ITwoInputNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x7DE3951BA4C1064CUL; // First 64 bits of SHA1 of a string: "Lib3MF::TwoInputNode" + } + + /** + * ITwoInputNode::GetInputB - Retrieves the second input + * @return the second input + */ + virtual IImplicitPort * GetInputB() = 0; + +}; + +typedef IBaseSharedPtr PITwoInputNode; + + +/************************************************************************************************************************* + Class interface for AdditionNode +**************************************************************************************************************************/ + +class IAdditionNode : public virtual ITwoInputNode { +public: + /** + * IAdditionNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x57A2236998DF5248UL; // First 64 bits of SHA1 of a string: "Lib3MF::AdditionNode" + } + +}; + +typedef IBaseSharedPtr PIAdditionNode; + + +/************************************************************************************************************************* + Class interface for SubtractionNode +**************************************************************************************************************************/ + +class ISubtractionNode : public virtual ITwoInputNode { +public: + /** + * ISubtractionNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x6079B12FFF345D02UL; // First 64 bits of SHA1 of a string: "Lib3MF::SubtractionNode" + } + +}; + +typedef IBaseSharedPtr PISubtractionNode; + + +/************************************************************************************************************************* + Class interface for MultiplicationNode +**************************************************************************************************************************/ + +class IMultiplicationNode : public virtual ITwoInputNode { +public: + /** + * IMultiplicationNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xA3C27CF54C2AA76CUL; // First 64 bits of SHA1 of a string: "Lib3MF::MultiplicationNode" + } + +}; + +typedef IBaseSharedPtr PIMultiplicationNode; + + +/************************************************************************************************************************* + Class interface for DivisionNode +**************************************************************************************************************************/ + +class IDivisionNode : public virtual ITwoInputNode { +public: + /** + * IDivisionNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xB896B6413C08CF39UL; // First 64 bits of SHA1 of a string: "Lib3MF::DivisionNode" + } + +}; + +typedef IBaseSharedPtr PIDivisionNode; + + +/************************************************************************************************************************* + Class interface for DotNode +**************************************************************************************************************************/ + +class IDotNode : public virtual ITwoInputNode { +public: + /** + * IDotNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xFE60932A66375FADUL; // First 64 bits of SHA1 of a string: "Lib3MF::DotNode" + } + +}; + +typedef IBaseSharedPtr PIDotNode; + + +/************************************************************************************************************************* + Class interface for CrossNode +**************************************************************************************************************************/ + +class ICrossNode : public virtual ITwoInputNode { +public: + /** + * ICrossNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x106182D38CA5CFE3UL; // First 64 bits of SHA1 of a string: "Lib3MF::CrossNode" + } + +}; + +typedef IBaseSharedPtr PICrossNode; + + +/************************************************************************************************************************* + Class interface for ArcTan2Node +**************************************************************************************************************************/ + +class IArcTan2Node : public virtual ITwoInputNode { +public: + /** + * IArcTan2Node::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xB6153EF5DE7E5E11UL; // First 64 bits of SHA1 of a string: "Lib3MF::ArcTan2Node" + } + +}; + +typedef IBaseSharedPtr PIArcTan2Node; + + +/************************************************************************************************************************* + Class interface for MatVecMultiplicationNode +**************************************************************************************************************************/ + +class IMatVecMultiplicationNode : public virtual ITwoInputNode { +public: + /** + * IMatVecMultiplicationNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x7570C43B9721D0C0UL; // First 64 bits of SHA1 of a string: "Lib3MF::MatVecMultiplicationNode" + } + +}; + +typedef IBaseSharedPtr PIMatVecMultiplicationNode; + + +/************************************************************************************************************************* + Class interface for MinNode +**************************************************************************************************************************/ + +class IMinNode : public virtual ITwoInputNode { +public: + /** + * IMinNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x846AFDE9A091E997UL; // First 64 bits of SHA1 of a string: "Lib3MF::MinNode" + } + +}; + +typedef IBaseSharedPtr PIMinNode; + + +/************************************************************************************************************************* + Class interface for MaxNode +**************************************************************************************************************************/ + +class IMaxNode : public virtual ITwoInputNode { +public: + /** + * IMaxNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x73F910381BF250DUL; // First 64 bits of SHA1 of a string: "Lib3MF::MaxNode" + } + +}; + +typedef IBaseSharedPtr PIMaxNode; + + +/************************************************************************************************************************* + Class interface for FmodNode +**************************************************************************************************************************/ + +class IFmodNode : public virtual ITwoInputNode { +public: + /** + * IFmodNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x1EF703D298223F2AUL; // First 64 bits of SHA1 of a string: "Lib3MF::FmodNode" + } + +}; + +typedef IBaseSharedPtr PIFmodNode; + + +/************************************************************************************************************************* + Class interface for ModNode +**************************************************************************************************************************/ + +class IModNode : public virtual ITwoInputNode { +public: + /** + * IModNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xEA57335849379F22UL; // First 64 bits of SHA1 of a string: "Lib3MF::ModNode" + } + +}; + +typedef IBaseSharedPtr PIModNode; + + +/************************************************************************************************************************* + Class interface for PowNode +**************************************************************************************************************************/ + +class IPowNode : public virtual ITwoInputNode { +public: + /** + * IPowNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x7700AA17CA1AC0F8UL; // First 64 bits of SHA1 of a string: "Lib3MF::PowNode" + } + +}; + +typedef IBaseSharedPtr PIPowNode; + + +/************************************************************************************************************************* + Class interface for SelectNode +**************************************************************************************************************************/ + +class ISelectNode : public virtual IOneInputNode { +public: + /** + * ISelectNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x1127ED71E05A9BD4UL; // First 64 bits of SHA1 of a string: "Lib3MF::SelectNode" + } + + /** + * ISelectNode::GetInputB - Retrieves the second input + * @return the second input + */ + virtual IImplicitPort * GetInputB() = 0; + + /** + * ISelectNode::GetInputC - Retrieves the third input + * @return the third input + */ + virtual IImplicitPort * GetInputC() = 0; + + /** + * ISelectNode::GetInputD - Retrieves the fourth input + * @return the fourth input + */ + virtual IImplicitPort * GetInputD() = 0; + +}; + +typedef IBaseSharedPtr PISelectNode; + + +/************************************************************************************************************************* + Class interface for ClampNode +**************************************************************************************************************************/ + +class IClampNode : public virtual IOneInputNode { +public: + /** + * IClampNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x77AF68C971B1485FUL; // First 64 bits of SHA1 of a string: "Lib3MF::ClampNode" + } + + /** + * IClampNode::GetInputMin - Retrieves the input for the lower limit + * @return the input for the lower limit + */ + virtual IImplicitPort * GetInputMin() = 0; + + /** + * IClampNode::GetInputMax - Retrieves the input for the upper limit + * @return the input for the upper limit + */ + virtual IImplicitPort * GetInputMax() = 0; + +}; + +typedef IBaseSharedPtr PIClampNode; + + +/************************************************************************************************************************* + Class interface for ComposeVectorNode +**************************************************************************************************************************/ + +class IComposeVectorNode : public virtual IImplicitNode { +public: + /** + * IComposeVectorNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x49C24B8840C01F7EUL; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeVectorNode" + } + + /** + * IComposeVectorNode::GetInputX - Retrieves the input for the x component + * @return the input for the x component + */ + virtual IImplicitPort * GetInputX() = 0; + + /** + * IComposeVectorNode::GetInputY - Retrieves the input for the y component + * @return the input for the y component + */ + virtual IImplicitPort * GetInputY() = 0; + + /** + * IComposeVectorNode::GetInputZ - Retrieves the input for the z component + * @return the input for the z component + */ + virtual IImplicitPort * GetInputZ() = 0; + + /** + * IComposeVectorNode::GetOutputResult - Retrieves the output + * @return the output + */ + virtual IImplicitPort * GetOutputResult() = 0; + +}; + +typedef IBaseSharedPtr PIComposeVectorNode; + + +/************************************************************************************************************************* + Class interface for VectorFromScalarNode +**************************************************************************************************************************/ + +class IVectorFromScalarNode : public virtual IOneInputNode { +public: + /** + * IVectorFromScalarNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x2E417B93351375E2UL; // First 64 bits of SHA1 of a string: "Lib3MF::VectorFromScalarNode" + } + +}; + +typedef IBaseSharedPtr PIVectorFromScalarNode; + + +/************************************************************************************************************************* + Class interface for DecomposeVectorNode +**************************************************************************************************************************/ + +class IDecomposeVectorNode : public virtual IImplicitNode { +public: + /** + * IDecomposeVectorNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xCC4F8D561CCE35D4UL; // First 64 bits of SHA1 of a string: "Lib3MF::DecomposeVectorNode" + } + + /** + * IDecomposeVectorNode::GetInputA - Retrieves the input + * @return the input port for the vector to decompose + */ + virtual IImplicitPort * GetInputA() = 0; + + /** + * IDecomposeVectorNode::GetOutputX - Retrieves the output for the x component + * @return the output for the x component + */ + virtual IImplicitPort * GetOutputX() = 0; + + /** + * IDecomposeVectorNode::GetOutputY - Retrieves the output for the y component + * @return the output for the y component + */ + virtual IImplicitPort * GetOutputY() = 0; + + /** + * IDecomposeVectorNode::GetOutputZ - Retrieves the output for the z component + * @return the output for the z component + */ + virtual IImplicitPort * GetOutputZ() = 0; + +}; + +typedef IBaseSharedPtr PIDecomposeVectorNode; + + +/************************************************************************************************************************* + Class interface for ComposeMatrixNode +**************************************************************************************************************************/ + +class IComposeMatrixNode : public virtual IImplicitNode { +public: + /** + * IComposeMatrixNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x9EF9EB54A53AA40DUL; // First 64 bits of SHA1 of a string: "Lib3MF::ComposeMatrixNode" + } + + /** + * IComposeMatrixNode::GetInputM00 - Retrieves the input for the element 0 0 + * @return the input for the m00 element + */ + virtual IImplicitPort * GetInputM00() = 0; + + /** + * IComposeMatrixNode::GetInputM01 - Retrieves the input for the element 0 1 + * @return the input for the m01 element + */ + virtual IImplicitPort * GetInputM01() = 0; + + /** + * IComposeMatrixNode::GetInputM02 - Retrieves the input for the element 0 2 + * @return the input for the m02 element + */ + virtual IImplicitPort * GetInputM02() = 0; + + /** + * IComposeMatrixNode::GetInputM03 - Retrieves the input for the element 0 3 + * @return the input for the m03 element + */ + virtual IImplicitPort * GetInputM03() = 0; + + /** + * IComposeMatrixNode::GetInputM10 - Retrieves the input for the element 1 0 + * @return the input for the m10 element + */ + virtual IImplicitPort * GetInputM10() = 0; + + /** + * IComposeMatrixNode::GetInputM11 - Retrieves the input for the element 1 1 + * @return the input for the m11 element + */ + virtual IImplicitPort * GetInputM11() = 0; + + /** + * IComposeMatrixNode::GetInputM12 - Retrieves the input for the element 1 2 + * @return the input for the m12 element + */ + virtual IImplicitPort * GetInputM12() = 0; + + /** + * IComposeMatrixNode::GetInputM13 - Retrieves the input for the element 1 3 + * @return the input for the m3 element + */ + virtual IImplicitPort * GetInputM13() = 0; + + /** + * IComposeMatrixNode::GetInputM20 - Retrieves the input for the element 2 0 + * @return the input for the m2 element + */ + virtual IImplicitPort * GetInputM20() = 0; + + /** + * IComposeMatrixNode::GetInputM21 - Retrieves the input for the element 2 1 + * @return + */ + virtual IImplicitPort * GetInputM21() = 0; + + /** + * IComposeMatrixNode::GetInputM22 - Retrieves the input for the element 2 2 + * @return the input for the m22 element + */ + virtual IImplicitPort * GetInputM22() = 0; + + /** + * IComposeMatrixNode::GetInputM23 - Retrieves the input for the element 2 3 + * @return the input for the m23 element + */ + virtual IImplicitPort * GetInputM23() = 0; + + /** + * IComposeMatrixNode::GetInputM30 - Retrieves the input for the element 3 0 + * @return the input for the m30 element + */ + virtual IImplicitPort * GetInputM30() = 0; + + /** + * IComposeMatrixNode::GetInputM31 - Retrieves the input for the element 3 1 + * @return the input for the m31 element + */ + virtual IImplicitPort * GetInputM31() = 0; + + /** + * IComposeMatrixNode::GetInputM32 - Retrieves the input for the element 3 2 + * @return the input for the m32 element + */ + virtual IImplicitPort * GetInputM32() = 0; + + /** + * IComposeMatrixNode::GetInputM33 - Retrieves the input for the element 3 3 + * @return the input for the m33 element + */ + virtual IImplicitPort * GetInputM33() = 0; + + /** + * IComposeMatrixNode::GetOutputResult - Retrieves the output + * @return the output + */ + virtual IImplicitPort * GetOutputResult() = 0; + +}; + +typedef IBaseSharedPtr PIComposeMatrixNode; + + +/************************************************************************************************************************* + Class interface for MatrixFromRowsNode +**************************************************************************************************************************/ + +class IMatrixFromRowsNode : public virtual IImplicitNode { +public: + /** + * IMatrixFromRowsNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xD6DFD0A7EB64AC33UL; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromRowsNode" + } + + /** + * IMatrixFromRowsNode::GetInputA - Retrieves the input for the first row + * @return the input for the first row + */ + virtual IImplicitPort * GetInputA() = 0; + + /** + * IMatrixFromRowsNode::GetInputB - Retrieves the input for the second row + * @return the input for the second row + */ + virtual IImplicitPort * GetInputB() = 0; + + /** + * IMatrixFromRowsNode::GetInputC - Retrieves the input for the third row + * @return the input for the third row + */ + virtual IImplicitPort * GetInputC() = 0; + + /** + * IMatrixFromRowsNode::GetInputD - Retrieves the input for the fourth row + * @return the input for the fourth row + */ + virtual IImplicitPort * GetInputD() = 0; + + /** + * IMatrixFromRowsNode::GetOutputResult - Retrieves the output + * @return the output + */ + virtual IImplicitPort * GetOutputResult() = 0; + +}; + +typedef IBaseSharedPtr PIMatrixFromRowsNode; + + +/************************************************************************************************************************* + Class interface for MatrixFromColumnsNode +**************************************************************************************************************************/ + +class IMatrixFromColumnsNode : public virtual IImplicitNode { +public: + /** + * IMatrixFromColumnsNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xDCBEAFCF83F3AACUL; // First 64 bits of SHA1 of a string: "Lib3MF::MatrixFromColumnsNode" + } + + /** + * IMatrixFromColumnsNode::GetInputA - Retrieves the input for the first column + * @return the input for the first column + */ + virtual IImplicitPort * GetInputA() = 0; + + /** + * IMatrixFromColumnsNode::GetInputB - Retrieves the input for the second column + * @return the input for the second column + */ + virtual IImplicitPort * GetInputB() = 0; + + /** + * IMatrixFromColumnsNode::GetInputC - Retrieves the input for the third column + * @return the input for the third column + */ + virtual IImplicitPort * GetInputC() = 0; + + /** + * IMatrixFromColumnsNode::GetInputD - Retrieves the input for the fourth column + * @return the input for the fourth column + */ + virtual IImplicitPort * GetInputD() = 0; + + /** + * IMatrixFromColumnsNode::GetOutputResult - Retrieves the output + * @return the output + */ + virtual IImplicitPort * GetOutputResult() = 0; + +}; + +typedef IBaseSharedPtr PIMatrixFromColumnsNode; + + +/************************************************************************************************************************* + Class interface for ConstantNode +**************************************************************************************************************************/ + +class IConstantNode : public virtual IImplicitNode { +public: + /** + * IConstantNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x3F8E5D082F966B1BUL; // First 64 bits of SHA1 of a string: "Lib3MF::ConstantNode" + } + + /** + * IConstantNode::SetConstant - Sets the constant value of the node + * @param[in] dValue - the value + */ + virtual void SetConstant(const Lib3MF_double dValue) = 0; + + /** + * IConstantNode::GetConstant - Retrieves the constant value of the node + * @return the value + */ + virtual Lib3MF_double GetConstant() = 0; + + /** + * IConstantNode::GetOutputValue - Retrieves the output + * @return the output + */ + virtual IImplicitPort * GetOutputValue() = 0; + +}; + +typedef IBaseSharedPtr PIConstantNode; + + +/************************************************************************************************************************* + Class interface for ConstVecNode +**************************************************************************************************************************/ + +class IConstVecNode : public virtual IImplicitNode { +public: + /** + * IConstVecNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x9C9363B3F708D556UL; // First 64 bits of SHA1 of a string: "Lib3MF::ConstVecNode" + } + + /** + * IConstVecNode::SetVector - Sets the vector value of the node + * @param[in] Value - the value + */ + virtual void SetVector(const Lib3MF::sVector Value) = 0; + + /** + * IConstVecNode::GetVector - Retrieves the vector value of the node + * @return the value + */ + virtual Lib3MF::sVector GetVector() = 0; + + /** + * IConstVecNode::GetOutputVector - Retrieves the output + * @return the output + */ + virtual IImplicitPort * GetOutputVector() = 0; + +}; + +typedef IBaseSharedPtr PIConstVecNode; + + +/************************************************************************************************************************* + Class interface for ConstMatNode +**************************************************************************************************************************/ + +class IConstMatNode : public virtual IImplicitNode { +public: + /** + * IConstMatNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xF85C90EDCE6F90A4UL; // First 64 bits of SHA1 of a string: "Lib3MF::ConstMatNode" + } + + /** + * IConstMatNode::SetMatrix - Sets the matrix value of the node + * @param[in] Value - the value + */ + virtual void SetMatrix(const Lib3MF::sMatrix4x4 Value) = 0; + + /** + * IConstMatNode::GetMatrix - Retrieves the matrix value of the node + * @return the matrix + */ + virtual Lib3MF::sMatrix4x4 GetMatrix() = 0; + + /** + * IConstMatNode::GetOutputMatrix - Retrieves the output + * @return the output + */ + virtual IImplicitPort * GetOutputMatrix() = 0; + +}; + +typedef IBaseSharedPtr PIConstMatNode; + + +/************************************************************************************************************************* + Class interface for MeshNode +**************************************************************************************************************************/ + +class IMeshNode : public virtual IImplicitNode { +public: + /** + * IMeshNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x53601FD432E3DEF4UL; // First 64 bits of SHA1 of a string: "Lib3MF::MeshNode" + } + + /** + * IMeshNode::GetInputMesh - Retrieves the input for the model resource id of the mesh + * @return the input port for the model resource id of the mesh + */ + virtual IImplicitPort * GetInputMesh() = 0; + + /** + * IMeshNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position + */ + virtual IImplicitPort * GetInputPos() = 0; + + /** + * IMeshNode::GetOutputDistance - Retrieves the output + * @return the output port for the signed distance to the mesh + */ + virtual IImplicitPort * GetOutputDistance() = 0; + +}; + +typedef IBaseSharedPtr PIMeshNode; + + +/************************************************************************************************************************* + Class interface for UnsignedMeshNode +**************************************************************************************************************************/ + +class IUnsignedMeshNode : public virtual IImplicitNode { +public: + /** + * IUnsignedMeshNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x29985A628251A9CDUL; // First 64 bits of SHA1 of a string: "Lib3MF::UnsignedMeshNode" + } + + /** + * IUnsignedMeshNode::GetInputMesh - Retrieves the input for the model resource id of the mesh + * @return the input port for the model resource id of the mesh + */ + virtual IImplicitPort * GetInputMesh() = 0; + + /** + * IUnsignedMeshNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position + */ + virtual IImplicitPort * GetInputPos() = 0; + + /** + * IUnsignedMeshNode::GetOutputDistance - Retrieves the output + * @return the output port for the unsigned distance to the mesh + */ + virtual IImplicitPort * GetOutputDistance() = 0; + +}; + +typedef IBaseSharedPtr PIUnsignedMeshNode; + + +/************************************************************************************************************************* + Class interface for FunctionCallNode +**************************************************************************************************************************/ + +class IFunctionCallNode : public virtual IImplicitNode { +public: + /** + * IFunctionCallNode::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x765C17C952F24E3UL; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionCallNode" + } + + /** + * IFunctionCallNode::GetInputFunctionID - Retrieves the input for the function id + * @return the input port for the function + */ + virtual IImplicitPort * GetInputFunctionID() = 0; + +}; + +typedef IBaseSharedPtr PIFunctionCallNode; + + +/************************************************************************************************************************* + Class interface for NodeIterator +**************************************************************************************************************************/ + +class INodeIterator : public virtual IIterator { +public: + /** + * INodeIterator::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0xFC006BC888CAB4D0UL; // First 64 bits of SHA1 of a string: "Lib3MF::NodeIterator" + } + + /** + * INodeIterator::GetCurrent - Returns the current element + * @return The current element + */ + virtual IImplicitNode * GetCurrent() = 0; + +}; + +typedef IBaseSharedPtr PINodeIterator; + + +/************************************************************************************************************************* + Class interface for Function +**************************************************************************************************************************/ + +class IFunction : public virtual IResource { +public: + /** + * IFunction::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x9EFB2757CA1A5231UL; // First 64 bits of SHA1 of a string: "Lib3MF::Function" + } + + /** + * IFunction::GetDisplayName - Retrieves the display name of the function + * @return the display name + */ + virtual std::string GetDisplayName() = 0; + + /** + * IFunction::SetDisplayName - Sets the display name of the function + * @param[in] sDisplayName - the display name + */ + virtual void SetDisplayName(const std::string & sDisplayName) = 0; + + /** + * IFunction::AddInput - Add an input + * @param[in] sIdentifier - the identifier of the input + * @param[in] sDisplayName - the display name of the input + * @param[in] eType - the type of the input + * @return The added input port + */ + virtual IImplicitPort * AddInput(const std::string & sIdentifier, const std::string & sDisplayName, const Lib3MF::eImplicitPortType eType) = 0; + + /** + * IFunction::GetInputs - Retrieves the inputs + * @return iterator for the list of inputs + */ + virtual IImplicitPortIterator * GetInputs() = 0; + + /** + * IFunction::RemoveInput - Removes an input + * @param[in] pInput - The input to be removed + */ + virtual void RemoveInput(IImplicitPort* pInput) = 0; + + /** + * IFunction::AddOutput - Add an output + * @param[in] sIdentifier - the identifier of the output + * @param[in] sDisplayName - the display name of the output + * @param[in] eType - the type of the input + * @return The added input port + */ + virtual IImplicitPort * AddOutput(const std::string & sIdentifier, const std::string & sDisplayName, const Lib3MF::eImplicitPortType eType) = 0; + + /** + * IFunction::GetOutputs - Retrieves the outputs + * @return iterator for the outputs + */ + virtual IImplicitPortIterator * GetOutputs() = 0; + + /** + * IFunction::RemoveOutput - Removes an output + * @param[in] pOutput - The output to be removed + */ + virtual void RemoveOutput(IImplicitPort* pOutput) = 0; + + /** + * IFunction::FindInput - Retrieves an input + * @param[in] sIdentifier - the identifier of the input + * @return the input port + */ + virtual IImplicitPort * FindInput(const std::string & sIdentifier) = 0; + + /** + * IFunction::FindOutput - Retrieves an output + * @param[in] sIdentifier - the identifier of the output + * @return the output port + */ + virtual IImplicitPort * FindOutput(const std::string & sIdentifier) = 0; + +}; + +typedef IBaseSharedPtr PIFunction; + + +/************************************************************************************************************************* + Class interface for ImplicitFunction +**************************************************************************************************************************/ + +class IImplicitFunction : public virtual IFunction { +public: + /** + * IImplicitFunction::ClassTypeId - Get Class Type Id + * @return Class type as a 64 bits integer + */ + Lib3MF_uint64 ClassTypeId() override + { + return 0x6CE54469EEA83BC1UL; // First 64 bits of SHA1 of a string: "Lib3MF::ImplicitFunction" + } + + /** + * IImplicitFunction::GetIdentifier - Retrieves the identifier of the function + * @return the identifier + */ + virtual std::string GetIdentifier() = 0; + + /** + * IImplicitFunction::SetIdentifier - Sets the identifier of the function + * @param[in] sIdentifier - the identifier + */ + virtual void SetIdentifier(const std::string & sIdentifier) = 0; + + /** + * IImplicitFunction::AddNode - Add a node + * @param[in] eNodeType - the type of the node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IImplicitNode * AddNode(const Lib3MF::eImplicitNodeType eNodeType, const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddSinNode - Add a SinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual ISinNode * AddSinNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddCosNode - Add a CosNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual ICosNode * AddCosNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddTanNode - Add a TanNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual ITanNode * AddTanNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddArcSinNode - Add a ArcSinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IArcSinNode * AddArcSinNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddArcCosNode - Add a ArcCosNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IArcCosNode * AddArcCosNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddArcTan2Node - Add a ArcTan2Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IArcTan2Node * AddArcTan2Node(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddSinhNode - Add a SinhNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual ISinhNode * AddSinhNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddCoshNode - Add a CoshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual ICoshNode * AddCoshNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddTanhNode - Add a TanhNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual ITanhNode * AddTanhNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddRoundNode - Add a RoundNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IRoundNode * AddRoundNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + + /** + * IImplicitFunction::AddCeilNode - Add a CeilNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual ICeilNode * AddCeilNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * ITexture2DGroup::RemoveTex2Coord - Removes a tex2coords from the Texture2DGroup. - * @param[in] nPropertyID - PropertyID of the tex2coords in the Texture2DGroup. + * IImplicitFunction::AddFloorNode - Add a FloorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual void RemoveTex2Coord(const Lib3MF_uint32 nPropertyID) = 0; + virtual IFloorNode * AddFloorNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * ITexture2DGroup::GetTexture2D - Obtains the texture2D instance of this group. - * @return the texture2D instance of this group. + * IImplicitFunction::AddSignNode - Add a SignNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual ITexture2D * GetTexture2D() = 0; + virtual ISignNode * AddSignNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; -}; + /** + * IImplicitFunction::AddFractNode - Add a FractNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IFractNode * AddFractNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; -typedef IBaseSharedPtr PITexture2DGroup; + /** + * IImplicitFunction::AddAbsNode - Add a AbsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IAbsNode * AddAbsNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + /** + * IImplicitFunction::AddExpNode - Add a ExpNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IExpNode * AddExpNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; -/************************************************************************************************************************* - Class interface for CompositeMaterials -**************************************************************************************************************************/ + /** + * IImplicitFunction::AddLogNode - Add a LogNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual ILogNode * AddLogNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; -class ICompositeMaterials : public virtual IResource { -public: /** - * ICompositeMaterials::ClassTypeId - Get Class Type Id - * @return Class type as a 64 bits integer + * IImplicitFunction::AddLog2Node - Add a Log2Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint64 ClassTypeId() override - { - return 0xCE16224D688B86F2UL; // First 64 bits of SHA1 of a string: "Lib3MF::CompositeMaterials" - } + virtual ILog2Node * AddLog2Node(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * ICompositeMaterials::GetCount - Retrieves the count of Composite-s in the CompositeMaterials. - * @return returns the count of Composite-s + * IImplicitFunction::AddLog10Node - Add a Log10Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual Lib3MF_uint32 GetCount() = 0; + virtual ILog10Node * AddLog10Node(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * ICompositeMaterials::GetAllPropertyIDs - returns all the PropertyIDs of all Composite-Mixing Values in this CompositeMaterials - * @param[in] nPropertyIDsBufferSize - Number of elements in buffer - * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written structs, or needed buffer size. - * @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the Composite-Mixing Values in the CompositeMaterials. + * IImplicitFunction::AddLengthNode - Add a LengthNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual void GetAllPropertyIDs(Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) = 0; + virtual ILengthNode * AddLengthNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * ICompositeMaterials::GetBaseMaterialGroup - Obtains the BaseMaterialGroup instance of this CompositeMaterials. - * @return returns the BaseMaterialGroup instance of this CompositeMaterials + * IImplicitFunction::AddTransposeNode - Add a TransposeNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual IBaseMaterialGroup * GetBaseMaterialGroup() = 0; + virtual ITransposeNode * AddTransposeNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * ICompositeMaterials::AddComposite - Adds a new Composite-Mixing Values to the CompositeMaterials. - * @param[in] nCompositeBufferSize - Number of elements in buffer - * @param[in] pCompositeBuffer - The Composite Constituents to be added as composite - * @return returns new PropertyID of the new Composite in the CompositeMaterials. + * IImplicitFunction::InverseNode - Add a InverseNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual Lib3MF_uint32 AddComposite(const Lib3MF_uint64 nCompositeBufferSize, const Lib3MF::sCompositeConstituent * pCompositeBuffer) = 0; + virtual IInverseNode * InverseNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * ICompositeMaterials::RemoveComposite - Removes a Composite-Maxing Ratio from the CompositeMaterials. - * @param[in] nPropertyID - PropertyID of the Composite-Mixing Values in the CompositeMaterials to be removed. + * IImplicitFunction::AddSqrtNode - Add a SqrtNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual void RemoveComposite(const Lib3MF_uint32 nPropertyID) = 0; + virtual ISqrtNode * AddSqrtNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * ICompositeMaterials::GetComposite - Obtains a Composite-Maxing Ratio of this CompositeMaterials. - * @param[in] nPropertyID - the PropertyID of the Composite-Maxing Ratio in the CompositeMaterials. - * @param[in] nCompositeBufferSize - Number of elements in buffer - * @param[out] pCompositeNeededCount - will be filled with the count of the written structs, or needed buffer size. - * @param[out] pCompositeBuffer - CompositeConstituent buffer of The Composite-Mixing Values with the given PropertyID + * IImplicitFunction::AddResourceIdNode - Add a ResourceIdNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual void GetComposite(const Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, Lib3MF::sCompositeConstituent * pCompositeBuffer) = 0; + virtual IResourceIdNode * AddResourceIdNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; -}; + /** + * IImplicitFunction::AddAdditionNode - Add an AdditionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IAdditionNode * AddAdditionNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; -typedef IBaseSharedPtr PICompositeMaterials; + /** + * IImplicitFunction::AddSubtractionNode - Add a SubtractionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual ISubtractionNode * AddSubtractionNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; + /** + * IImplicitFunction::AddMultiplicationNode - Add a MultiplicationNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IMultiplicationNode * AddMultiplicationNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; -/************************************************************************************************************************* - Class interface for MultiPropertyGroup -**************************************************************************************************************************/ + /** + * IImplicitFunction::AddDivisionNode - Add a DivisionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IDivisionNode * AddDivisionNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; -class IMultiPropertyGroup : public virtual IResource { -public: /** - * IMultiPropertyGroup::ClassTypeId - Get Class Type Id - * @return Class type as a 64 bits integer + * IImplicitFunction::AddDotNode - Add a DotNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint64 ClassTypeId() override - { - return 0xB989E02E43158FE6UL; // First 64 bits of SHA1 of a string: "Lib3MF::MultiPropertyGroup" - } + virtual IDotNode * AddDotNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IMultiPropertyGroup::GetCount - Retrieves the count of MultiProperty-s in the MultiPropertyGroup. - * @return returns the count of MultiProperty-s + * IImplicitFunction::AddCrossNode - Add a CrossNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual Lib3MF_uint32 GetCount() = 0; + virtual ICrossNode * AddCrossNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IMultiPropertyGroup::GetAllPropertyIDs - returns all the PropertyIDs of all MultiProperty-s in this MultiPropertyGroup - * @param[in] nPropertyIDsBufferSize - Number of elements in buffer - * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written structs, or needed buffer size. - * @param[out] pPropertyIDsBuffer - uint32 buffer of PropertyID of the MultiProperty-s in the MultiPropertyGroup. + * IImplicitFunction::AddMatVecMultiplicationNode - Add a MatVecMultiplicationNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual void GetAllPropertyIDs(Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) = 0; + virtual IMatVecMultiplicationNode * AddMatVecMultiplicationNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IMultiPropertyGroup::AddMultiProperty - Adds a new MultiProperty to the MultiPropertyGroup. - * @param[in] nPropertyIDsBufferSize - Number of elements in buffer - * @param[in] pPropertyIDsBuffer - The PropertyIDs of the new MultiProperty. - * @return returns the PropertyID of the new MultiProperty in the MultiPropertyGroup. + * IImplicitFunction::AddMinNode - Add a MinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual Lib3MF_uint32 AddMultiProperty(const Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer) = 0; + virtual IMinNode * AddMinNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IMultiPropertyGroup::SetMultiProperty - Sets the PropertyIDs of a MultiProperty. - * @param[in] nPropertyID - the PropertyID of the MultiProperty to be changed. - * @param[in] nPropertyIDsBufferSize - Number of elements in buffer - * @param[in] pPropertyIDsBuffer - The new PropertyIDs of the MultiProperty + * IImplicitFunction::AddMaxNode - Add a MaxNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual void SetMultiProperty(const Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer) = 0; + virtual IMaxNode * AddMaxNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IMultiPropertyGroup::GetMultiProperty - Obtains the PropertyIDs of a MultiProperty. - * @param[in] nPropertyID - the PropertyID of the MultiProperty to be queried. - * @param[in] nPropertyIDsBufferSize - Number of elements in buffer - * @param[out] pPropertyIDsNeededCount - will be filled with the count of the written structs, or needed buffer size. - * @param[out] pPropertyIDsBuffer - uint32 buffer of The PropertyIDs of the MultiProperty + * IImplicitFunction::AddFmodNode - Add a FmodNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual void GetMultiProperty(const Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) = 0; + virtual IFmodNode * AddFmodNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IMultiPropertyGroup::RemoveMultiProperty - Removes a MultiProperty from this MultiPropertyGroup. - * @param[in] nPropertyID - the PropertyID of the MultiProperty to be removed. + * IImplicitFunction::AddPowNode - Add a PowNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual void RemoveMultiProperty(const Lib3MF_uint32 nPropertyID) = 0; + virtual IPowNode * AddPowNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IMultiPropertyGroup::GetLayerCount - Retrieves the number of layers of this MultiPropertyGroup. - * @return returns the number of layers + * IImplicitFunction::AddSelectNode - Add a SelectNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual Lib3MF_uint32 GetLayerCount() = 0; + virtual ISelectNode * AddSelectNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IMultiPropertyGroup::AddLayer - Adds a MultiPropertyLayer to this MultiPropertyGroup. - * @param[in] TheLayer - The MultiPropertyLayer to add to this MultiPropertyGroup - * @return returns the index of this MultiPropertyLayer + * IImplicitFunction::AddClampNode - Add a ClampNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual Lib3MF_uint32 AddLayer(const Lib3MF::sMultiPropertyLayer TheLayer) = 0; + virtual IClampNode * AddClampNode(const std::string & sIdentifier, const Lib3MF::eImplicitNodeConfiguration eConfiguration, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IMultiPropertyGroup::GetLayer - Obtains a MultiPropertyLayer of this MultiPropertyGroup. - * @param[in] nLayerIndex - The Index of the MultiPropertyLayer queried - * @return The MultiPropertyLayer with index LayerIndex within MultiPropertyGroup + * IImplicitFunction::AddComposeVectorNode - Add a ComposeVectorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual Lib3MF::sMultiPropertyLayer GetLayer(const Lib3MF_uint32 nLayerIndex) = 0; + virtual IComposeVectorNode * AddComposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IMultiPropertyGroup::RemoveLayer - Removes a MultiPropertyLayer from this MultiPropertyGroup. - * @param[in] nLayerIndex - The Index of the MultiPropertyLayer to be removed + * IImplicitFunction::AddVectorFromScalarNode - Add a VectorFromScalar + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual void RemoveLayer(const Lib3MF_uint32 nLayerIndex) = 0; + virtual IVectorFromScalarNode * AddVectorFromScalarNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; -}; + /** + * IImplicitFunction::AddDecomposeVectorNode - Add a DecomposeVectorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IDecomposeVectorNode * AddDecomposeVectorNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; -typedef IBaseSharedPtr PIMultiPropertyGroup; + /** + * IImplicitFunction::AddComposeMatrixNode - Add a ComposeMatrixNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IComposeMatrixNode * AddComposeMatrixNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; + /** + * IImplicitFunction::AddMatrixFromRowsNode - Add a MatrixFromRowsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IMatrixFromRowsNode * AddMatrixFromRowsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; -/************************************************************************************************************************* - Class interface for Attachment -**************************************************************************************************************************/ + /** + * IImplicitFunction::AddMatrixFromColumnsNode - Add a MatrixFromColumnsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + virtual IMatrixFromColumnsNode * AddMatrixFromColumnsNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; -class IAttachment : public virtual IBase { -public: /** - * IAttachment::ClassTypeId - Get Class Type Id - * @return Class type as a 64 bits integer + * IImplicitFunction::AddConstantNode - Add a ConstantNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - Lib3MF_uint64 ClassTypeId() override - { - return 0x8CE7A1191A63A35DUL; // First 64 bits of SHA1 of a string: "Lib3MF::Attachment" - } + virtual IConstantNode * AddConstantNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IAttachment::GetPath - Retrieves an attachment's package path. This function will be removed in a later release. - * @return returns the attachment's package path string + * IImplicitFunction::AddConstVecNode - Add a ConstVecNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual std::string GetPath() = 0; + virtual IConstVecNode * AddConstVecNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IAttachment::SetPath - Sets an attachment's package path. This function will be removed in a later release. - * @param[in] sPath - new path of the attachment. + * IImplicitFunction::AddConstMatNode - Add a ConstMatNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual void SetPath(const std::string & sPath) = 0; + virtual IConstMatNode * AddConstMatNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IAttachment::PackagePart - Returns the PackagePart that is this attachment. - * @return The PackagePart of this attachment. + * IImplicitFunction::AddMeshNode - Add a MeshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual IPackagePart * PackagePart() = 0; + virtual IMeshNode * AddMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IAttachment::GetRelationShipType - Retrieves an attachment's relationship type - * @return returns the attachment's package relationship type string + * IImplicitFunction::AddUnsignedMeshNode - Add a UnsignedMeshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual std::string GetRelationShipType() = 0; + virtual IUnsignedMeshNode * AddUnsignedMeshNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IAttachment::SetRelationShipType - Sets an attachment's relationship type. - * @param[in] sPath - new relationship type string. + * IImplicitFunction::AddFunctionCallNode - Add a FunctionCallNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node */ - virtual void SetRelationShipType(const std::string & sPath) = 0; + virtual IFunctionCallNode * AddFunctionCallNode(const std::string & sIdentifier, const std::string & sDisplayName, const std::string & sTag) = 0; /** - * IAttachment::WriteToFile - Writes out the attachment as file. - * @param[in] sFileName - file to write into. + * IImplicitFunction::GetNodes - Retrieves the nodes + * @return iterator for the list of nodes */ - virtual void WriteToFile(const std::string & sFileName) = 0; + virtual INodeIterator * GetNodes() = 0; /** - * IAttachment::ReadFromFile - Reads an attachment from a file. The path of this file is only read when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. - * @param[in] sFileName - file to read from. + * IImplicitFunction::RemoveNode - Removes a node + * @param[in] pNode - The node to be removed */ - virtual void ReadFromFile(const std::string & sFileName) = 0; + virtual void RemoveNode(IImplicitNode* pNode) = 0; /** - * IAttachment::ReadFromCallback - Reads an attachment from the data provided by a callback function. This callback function is only invoked when this attachment is being written as part of the 3MF package, or via the WriteToFile or WriteToBuffer-methods. - * @param[in] pTheReadCallback - callback function - * @param[in] nStreamSize - number of bytes the callback returns - * @param[in] pTheSeekCallback - callback function - * @param[in] nUserData - Userdata that is passed to the callback function + * IImplicitFunction::AddLink - Add a link + * @param[in] pSource - the source port + * @param[in] pTarget - the target port */ - virtual void ReadFromCallback(const Lib3MF::ReadCallback pTheReadCallback, const Lib3MF_uint64 nStreamSize, const Lib3MF::SeekCallback pTheSeekCallback, const Lib3MF_pvoid pUserData) = 0; + virtual void AddLink(IImplicitPort* pSource, IImplicitPort* pTarget) = 0; /** - * IAttachment::GetStreamSize - Retrieves the size of the attachment stream - * @return the stream size + * IImplicitFunction::AddLinkByNames - Add a link + * @param[in] sSource - name of the source port in the format nodename.portname + * @param[in] sTarget - name of the target port in the format nodename.portname */ - virtual Lib3MF_uint64 GetStreamSize() = 0; + virtual void AddLinkByNames(const std::string & sSource, const std::string & sTarget) = 0; /** - * IAttachment::WriteToBuffer - Writes out the attachment into a buffer - * @param[in] nBufferBufferSize - Number of elements in buffer - * @param[out] pBufferNeededCount - will be filled with the count of the written structs, or needed buffer size. - * @param[out] pBufferBuffer - uint8 buffer of Buffer to write into + * IImplicitFunction::Clear - Clears the function */ - virtual void WriteToBuffer(Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer) = 0; + virtual void Clear() = 0; /** - * IAttachment::ReadFromBuffer - Reads an attachment from a memory buffer. This buffer is immediatly read (in contrast to the ReadFromCallback and ReadFromFile-methods). - * @param[in] nBufferBufferSize - Number of elements in buffer - * @param[in] pBufferBuffer - Buffer to read from + * IImplicitFunction::SortNodesTopologically - Sorts the nodes topologically */ - virtual void ReadFromBuffer(const Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer) = 0; + virtual void SortNodesTopologically() = 0; }; -typedef IBaseSharedPtr PIAttachment; +typedef IBaseSharedPtr PIImplicitFunction; /************************************************************************************************************************* - Class interface for Texture2D + Class interface for FunctionFromImage3D **************************************************************************************************************************/ -class ITexture2D : public virtual IResource { +class IFunctionFromImage3D : public virtual IFunction { public: /** - * ITexture2D::ClassTypeId - Get Class Type Id + * IFunctionFromImage3D::ClassTypeId - Get Class Type Id * @return Class type as a 64 bits integer */ Lib3MF_uint64 ClassTypeId() override { - return 0xE0441CF976B36319UL; // First 64 bits of SHA1 of a string: "Lib3MF::Texture2D" + return 0x9BD7D3C2026B8CE8UL; // First 64 bits of SHA1 of a string: "Lib3MF::FunctionFromImage3D" } /** - * ITexture2D::GetAttachment - Retrieves the attachment located at the path of the texture. - * @return attachment that holds the texture's image information. + * IFunctionFromImage3D::GetImage3D - Returns the selected 3D image. + * @return image instance */ - virtual IAttachment * GetAttachment() = 0; + virtual IImage3D * GetImage3D() = 0; /** - * ITexture2D::SetAttachment - Sets the texture's package path to the path of the attachment. - * @param[in] pAttachment - attachment that holds the texture's image information. + * IFunctionFromImage3D::SetImage3D - Sets the 3D image of the selector. + * @param[in] pImage3D - image instance */ - virtual void SetAttachment(IAttachment* pAttachment) = 0; + virtual void SetImage3D(IImage3D* pImage3D) = 0; /** - * ITexture2D::GetContentType - Retrieves a texture's content type. - * @return returns content type enum. + * IFunctionFromImage3D::SetFilter - Sets the texture filter of the selector. + * @param[in] eFilter - texture filter */ - virtual Lib3MF::eTextureType GetContentType() = 0; + virtual void SetFilter(const Lib3MF::eTextureFilter eFilter) = 0; /** - * ITexture2D::SetContentType - Retrieves a texture's content type. - * @param[in] eContentType - new Content Type + * IFunctionFromImage3D::GetFilter - Returns the texture filter of the selector. + * @return texture filter */ - virtual void SetContentType(const Lib3MF::eTextureType eContentType) = 0; + virtual Lib3MF::eTextureFilter GetFilter() = 0; /** - * ITexture2D::GetTileStyleUV - Retrieves a texture's tilestyle type. - * @param[out] eTileStyleU - returns tilestyle type enum. - * @param[out] eTileStyleV - returns tilestyle type enum. + * IFunctionFromImage3D::SetTileStyles - Sets the tile styles of the selector. + * @param[in] eTileStyleU - tile style in U + * @param[in] eTileStyleV - tile style in V + * @param[in] eTileStyleW - tile style in W */ - virtual void GetTileStyleUV(Lib3MF::eTextureTileStyle & eTileStyleU, Lib3MF::eTextureTileStyle & eTileStyleV) = 0; + virtual void SetTileStyles(const Lib3MF::eTextureTileStyle eTileStyleU, const Lib3MF::eTextureTileStyle eTileStyleV, const Lib3MF::eTextureTileStyle eTileStyleW) = 0; /** - * ITexture2D::SetTileStyleUV - Sets a texture's tilestyle type. - * @param[in] eTileStyleU - new tilestyle type enum. - * @param[in] eTileStyleV - new tilestyle type enum. + * IFunctionFromImage3D::GetTileStyles - Retrieves the tile styles of the selector. + * @param[out] eTileStyleU - tile style in U + * @param[out] eTileStyleV - tile style in V + * @param[out] eTileStyleW - tile style in W */ - virtual void SetTileStyleUV(const Lib3MF::eTextureTileStyle eTileStyleU, const Lib3MF::eTextureTileStyle eTileStyleV) = 0; + virtual void GetTileStyles(Lib3MF::eTextureTileStyle & eTileStyleU, Lib3MF::eTextureTileStyle & eTileStyleV, Lib3MF::eTextureTileStyle & eTileStyleW) = 0; /** - * ITexture2D::GetFilter - Retrieves a texture's filter type. - * @return returns filter type enum. + * IFunctionFromImage3D::GetOffset - returns the offset value for the pixel values in the Image3D + * @return the offset value for the pixel values in the Image3D */ - virtual Lib3MF::eTextureFilter GetFilter() = 0; + virtual Lib3MF_double GetOffset() = 0; /** - * ITexture2D::SetFilter - Sets a texture's filter type. - * @param[in] eFilter - sets new filter type enum. + * IFunctionFromImage3D::SetOffset - Sets the offset value for the pixel values in the Image3D + * @param[in] dOffset - the offset value for the pixel values in the Image3D */ - virtual void SetFilter(const Lib3MF::eTextureFilter eFilter) = 0; + virtual void SetOffset(const Lib3MF_double dOffset) = 0; + + /** + * IFunctionFromImage3D::GetScale - returns the scale value for the pixel values in the Image3D + * @return the scale value for the pixel values in the Image3D + */ + virtual Lib3MF_double GetScale() = 0; + + /** + * IFunctionFromImage3D::SetScale - Sets the scale value for the pixel values in the Image3D + * @param[in] dScale - the scale value for the pixel values in the Image3D + */ + virtual void SetScale(const Lib3MF_double dScale) = 0; }; -typedef IBaseSharedPtr PITexture2D; +typedef IBaseSharedPtr PIFunctionFromImage3D; /************************************************************************************************************************* @@ -3081,6 +6216,13 @@ class IModel : public virtual IBase { */ virtual ISliceStack * GetSliceStackByID(const Lib3MF_uint32 nUniqueResourceID) = 0; + /** + * IModel::GetLevelSetByID - finds a level set object by its UniqueResourceID + * @param[in] nUniqueResourceID - UniqueResourceID + * @return returns the level set object instance + */ + virtual ILevelSet * GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID) = 0; + /** * IModel::GetBuildUUID - returns, whether a build has a UUID and, if true, the build's UUID * @param[out] bHasUUID - flag whether the build has a UUID @@ -3172,12 +6314,24 @@ class IModel : public virtual IBase { */ virtual ISliceStackIterator * GetSliceStacks() = 0; + /** + * IModel::GetImage3Ds - creates a resource iterator instance with all image3d resources. + * @return returns the iterator instance. + */ + virtual IImage3DIterator * GetImage3Ds() = 0; + /** * IModel::MergeToModel - Merges all components and objects which are referenced by a build item into a mesh. The memory is duplicated and a new model is created. * @return returns the merged model instance */ virtual IModel * MergeToModel() = 0; + /** + * IModel::MergeFromModel - Merges the given model into this model. + * @param[in] pModelInstance - model to be merged + */ + virtual void MergeFromModel(IModel* pModelInstance) = 0; + /** * IModel::AddMeshObject - adds an empty mesh object to the model. * @return returns the mesh object instance @@ -3236,6 +6390,22 @@ class IModel : public virtual IBase { */ virtual IMultiPropertyGroup * AddMultiPropertyGroup() = 0; + /** + * IModel::AddImageStack - creates a new 3D Image Resource + * @param[in] nColumnCount - the number of columns in each sheet. + * @param[in] nRowCount - the number of rows in each sheet. + * @param[in] nSheetCount - the number of sheets in the image stack. + * @return returns the new ImageStack instance + */ + virtual IImageStack * AddImageStack(const Lib3MF_uint32 nColumnCount, const Lib3MF_uint32 nRowCount, const Lib3MF_uint32 nSheetCount) = 0; + + /** + * IModel::GetImageStackByID - finds an ImageStack object by its UniqueResourceID + * @param[in] nUniqueResourceID - UniqueResourceID + * @return returns the image stack instance + */ + virtual IImageStack * GetImageStackByID(const Lib3MF_uint32 nUniqueResourceID) = 0; + /** * IModel::AddBuildItem - adds a build item to the model. * @param[in] pObject - Object instance. @@ -3339,6 +6509,49 @@ class IModel : public virtual IBase { */ virtual IKeyStore * GetKeyStore() = 0; + /** + * IModel::GetFunctions - creates a resource iterator for all functions + * @return returns the resource iterator + */ + virtual IFunctionIterator * GetFunctions() = 0; + + /** + * IModel::AddImplicitFunction - adds a function described by nodes to the model + * @return returns the function instance + */ + virtual IImplicitFunction * AddImplicitFunction() = 0; + + /** + * IModel::AddFunctionFromImage3D - adds a function defined by an image3d to the model + * @param[in] pImage3DInstance - the Image3D-instance used for this function + * @return returns the function instance + */ + virtual IFunctionFromImage3D * AddFunctionFromImage3D(IImage3D* pImage3DInstance) = 0; + + /** + * IModel::AddVolumeData - adds a volume data resource to the model. + * @return returns the new volume data instance. + */ + virtual IVolumeData * AddVolumeData() = 0; + + /** + * IModel::AddLevelSet - adds an empty boundary shape object to the model. + * @return returns the mesh object instance + */ + virtual ILevelSet * AddLevelSet() = 0; + + /** + * IModel::GetLevelSets - creates a resource iterator instance with all boundary shape resources. + * @return returns the iterator instance. + */ + virtual ILevelSetIterator * GetLevelSets() = 0; + + /** + * IModel::RemoveResource - Removes a resource from the model + * @param[in] pResource - The resource to remove + */ + virtual void RemoveResource(IResource* pResource) = 0; + }; typedef IBaseSharedPtr PIModel; diff --git a/Autogenerated/Source/lib3mf_interfacewrapper.cpp b/Autogenerated/Source/lib3mf_interfacewrapper.cpp index 92633dbbd..c4e50c07e 100644 --- a/Autogenerated/Source/lib3mf_interfacewrapper.cpp +++ b/Autogenerated/Source/lib3mf_interfacewrapper.cpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++ implementation file in order to allow easy development of the 3MF Library. The functions in this file need to be implemented. It needs to be generated only once. -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -1874,6 +1874,126 @@ Lib3MFResult lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup(Lib3 } +/************************************************************************************************************************* + Class implementation for Image3DIterator +**************************************************************************************************************************/ +Lib3MFResult lib3mf_image3diterator_getcurrentimage3d(Lib3MF_Image3DIterator pImage3DIterator, Lib3MF_Image3D * pResource) +{ + IBase* pIBaseClass = (IBase *)pImage3DIterator; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImage3DIterator, "Image3DIterator", "GetCurrentImage3D"); + } + if (pResource == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResource(nullptr); + IImage3DIterator* pIImage3DIterator = dynamic_cast(pIBaseClass); + if (!pIImage3DIterator) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResource = pIImage3DIterator->GetCurrentImage3D(); + + *pResource = (IBase*)(pBaseResource); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Resource", *pResource); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for FunctionIterator +**************************************************************************************************************************/ +Lib3MFResult lib3mf_functioniterator_getcurrentfunction(Lib3MF_FunctionIterator pFunctionIterator, Lib3MF_Function * pResource) +{ + IBase* pIBaseClass = (IBase *)pFunctionIterator; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionIterator, "FunctionIterator", "GetCurrentFunction"); + } + if (pResource == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResource(nullptr); + IFunctionIterator* pIFunctionIterator = dynamic_cast(pIBaseClass); + if (!pIFunctionIterator) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResource = pIFunctionIterator->GetCurrentFunction(); + + *pResource = (IBase*)(pBaseResource); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Resource", *pResource); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for LevelSetIterator +**************************************************************************************************************************/ +Lib3MFResult lib3mf_levelsetiterator_getcurrentlevelset(Lib3MF_LevelSetIterator pLevelSetIterator, Lib3MF_LevelSet * pResource) +{ + IBase* pIBaseClass = (IBase *)pLevelSetIterator; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSetIterator, "LevelSetIterator", "GetCurrentLevelSet"); + } + if (pResource == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResource(nullptr); + ILevelSetIterator* pILevelSetIterator = dynamic_cast(pIBaseClass); + if (!pILevelSetIterator) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResource = pILevelSetIterator->GetCurrentLevelSet(); + + *pResource = (IBase*)(pBaseResource); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Resource", *pResource); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + /************************************************************************************************************************* Class implementation for MetaData **************************************************************************************************************************/ @@ -2924,6 +3044,40 @@ Lib3MFResult lib3mf_object_iscomponentsobject(Lib3MF_Object pObject, bool * pIsC } } +Lib3MFResult lib3mf_object_islevelsetobject(Lib3MF_Object pObject, bool * pIsLevelSetObject) +{ + IBase* pIBaseClass = (IBase *)pObject; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pObject, "Object", "IsLevelSetObject"); + } + if (pIsLevelSetObject == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IObject* pIObject = dynamic_cast(pIBaseClass); + if (!pIObject) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pIsLevelSetObject = pIObject->IsLevelSetObject(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addBooleanResult("IsLevelSetObject", *pIsLevelSetObject); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + Lib3MFResult lib3mf_object_isvalid(Lib3MF_Object pObject, bool * pIsValid) { IBase* pIBaseClass = (IBase *)pObject; @@ -4109,29 +4263,27 @@ Lib3MFResult lib3mf_meshobject_beamlattice(Lib3MF_MeshObject pMeshObject, Lib3MF } } - -/************************************************************************************************************************* - Class implementation for BeamLattice -**************************************************************************************************************************/ -Lib3MFResult lib3mf_beamlattice_getminlength(Lib3MF_BeamLattice pBeamLattice, Lib3MF_double * pMinLength) +Lib3MFResult lib3mf_meshobject_getvolumedata(Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData * pTheVolumeData) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pMeshObject; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetMinLength"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pMeshObject, "MeshObject", "GetVolumeData"); } - if (pMinLength == nullptr) + if (pTheVolumeData == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + IBase* pBaseTheVolumeData(nullptr); + IMeshObject* pIMeshObject = dynamic_cast(pIBaseClass); + if (!pIMeshObject) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pMinLength = pIBeamLattice->GetMinLength(); + pBaseTheVolumeData = pIMeshObject->GetVolumeData(); + *pTheVolumeData = (IBase*)(pBaseTheVolumeData); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addDoubleResult("MinLength", *pMinLength); + pJournalEntry->addHandleResult("TheVolumeData", *pTheVolumeData); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4147,21 +4299,26 @@ Lib3MFResult lib3mf_beamlattice_getminlength(Lib3MF_BeamLattice pBeamLattice, Li } } -Lib3MFResult lib3mf_beamlattice_setminlength(Lib3MF_BeamLattice pBeamLattice, Lib3MF_double dMinLength) +Lib3MFResult lib3mf_meshobject_setvolumedata(Lib3MF_MeshObject pMeshObject, Lib3MF_VolumeData pTheVolumeData) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pMeshObject; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetMinLength"); - pJournalEntry->addDoubleParameter("MinLength", dMinLength); + pJournalEntry = m_GlobalJournal->beginClassMethod(pMeshObject, "MeshObject", "SetVolumeData"); + pJournalEntry->addHandleParameter("TheVolumeData", pTheVolumeData); } - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + IBase* pIBaseClassTheVolumeData = (IBase *)pTheVolumeData; + IVolumeData* pITheVolumeData = dynamic_cast(pIBaseClassTheVolumeData); + if (!pITheVolumeData) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IMeshObject* pIMeshObject = dynamic_cast(pIBaseClass); + if (!pIMeshObject) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->SetMinLength(dMinLength); + pIMeshObject->SetVolumeData(pITheVolumeData); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -4179,28 +4336,31 @@ Lib3MFResult lib3mf_beamlattice_setminlength(Lib3MF_BeamLattice pBeamLattice, Li } } -Lib3MFResult lib3mf_beamlattice_getclipping(Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeClipMode * pClipMode, Lib3MF_uint32 * pUniqueResourceID) + +/************************************************************************************************************************* + Class implementation for LevelSet +**************************************************************************************************************************/ +Lib3MFResult lib3mf_levelset_getfunction(Lib3MF_LevelSet pLevelSet, Lib3MF_Function * pTheFunction) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetClipping"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "GetFunction"); } - if (!pClipMode) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - if (!pUniqueResourceID) + if (pTheFunction == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + IBase* pBaseTheFunction(nullptr); + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->GetClipping(*pClipMode, *pUniqueResourceID); + pBaseTheFunction = pILevelSet->GetFunction(); + *pTheFunction = (IBase*)(pBaseTheFunction); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addEnumResult("ClipMode", "BeamLatticeClipMode", (Lib3MF_int32)(*pClipMode)); - pJournalEntry->addUInt32Result("UniqueResourceID", *pUniqueResourceID); + pJournalEntry->addHandleResult("TheFunction", *pTheFunction); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4216,22 +4376,26 @@ Lib3MFResult lib3mf_beamlattice_getclipping(Lib3MF_BeamLattice pBeamLattice, eLi } } -Lib3MFResult lib3mf_beamlattice_setclipping(Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeClipMode eClipMode, Lib3MF_uint32 nUniqueResourceID) +Lib3MFResult lib3mf_levelset_setfunction(Lib3MF_LevelSet pLevelSet, Lib3MF_Function pTheFunction) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetClipping"); - pJournalEntry->addEnumParameter("ClipMode", "BeamLatticeClipMode", (Lib3MF_int32)(eClipMode)); - pJournalEntry->addUInt32Parameter("UniqueResourceID", nUniqueResourceID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "SetFunction"); + pJournalEntry->addHandleParameter("TheFunction", pTheFunction); } - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + IBase* pIBaseClassTheFunction = (IBase *)pTheFunction; + IFunction* pITheFunction = dynamic_cast(pIBaseClassTheFunction); + if (!pITheFunction) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->SetClipping(eClipMode, nUniqueResourceID); + pILevelSet->SetFunction(pITheFunction); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -4249,28 +4413,24 @@ Lib3MFResult lib3mf_beamlattice_setclipping(Lib3MF_BeamLattice pBeamLattice, eLi } } -Lib3MFResult lib3mf_beamlattice_getrepresentation(Lib3MF_BeamLattice pBeamLattice, bool * pHasRepresentation, Lib3MF_uint32 * pUniqueResourceID) +Lib3MFResult lib3mf_levelset_gettransform(Lib3MF_LevelSet pLevelSet, sLib3MFTransform * pTransform) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetRepresentation"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "GetTransform"); } - if (pHasRepresentation == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - if (!pUniqueResourceID) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + if (pTransform == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pHasRepresentation = pIBeamLattice->GetRepresentation(*pUniqueResourceID); + *pTransform = pILevelSet->GetTransform(); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addBooleanResult("HasRepresentation", *pHasRepresentation); - pJournalEntry->addUInt32Result("UniqueResourceID", *pUniqueResourceID); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4286,21 +4446,20 @@ Lib3MFResult lib3mf_beamlattice_getrepresentation(Lib3MF_BeamLattice pBeamLattic } } -Lib3MFResult lib3mf_beamlattice_setrepresentation(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nUniqueResourceID) +Lib3MFResult lib3mf_levelset_settransform(Lib3MF_LevelSet pLevelSet, const sLib3MFTransform * pTransform) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetRepresentation"); - pJournalEntry->addUInt32Parameter("UniqueResourceID", nUniqueResourceID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "SetTransform"); } - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->SetRepresentation(nUniqueResourceID); + pILevelSet->SetTransform(*pTransform); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -4318,28 +4477,47 @@ Lib3MFResult lib3mf_beamlattice_setrepresentation(Lib3MF_BeamLattice pBeamLattic } } -Lib3MFResult lib3mf_beamlattice_getballoptions(Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeBallMode * pBallMode, Lib3MF_double * pBallRadius) +Lib3MFResult lib3mf_levelset_getchannelname(Lib3MF_LevelSet pLevelSet, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBallOptions"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "GetChannelName"); } - if (!pBallMode) + if ( (!pChannelNameBuffer) && !(pChannelNameNeededChars) ) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - if (!pBallRadius) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + std::string sChannelName(""); + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->GetBallOptions(*pBallMode, *pBallRadius); + bool isCacheCall = (pChannelNameBuffer == nullptr); + if (isCacheCall) { + sChannelName = pILevelSet->GetChannelName(); + pILevelSet->_setCache (new ParameterCache_1 (sChannelName)); + } + else { + auto cache = dynamic_cast*> (pILevelSet->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sChannelName); + pILevelSet->_setCache (nullptr); + } + + if (pChannelNameNeededChars) + *pChannelNameNeededChars = (Lib3MF_uint32) (sChannelName.size()+1); + if (pChannelNameBuffer) { + if (sChannelName.size() >= nChannelNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iChannelName = 0; iChannelName < sChannelName.size(); iChannelName++) + pChannelNameBuffer[iChannelName] = sChannelName[iChannelName]; + pChannelNameBuffer[sChannelName.size()] = 0; + } if (pJournalEntry.get() != nullptr) { - pJournalEntry->addEnumResult("BallMode", "BeamLatticeBallMode", (Lib3MF_int32)(*pBallMode)); - pJournalEntry->addDoubleResult("BallRadius", *pBallRadius); + pJournalEntry->addStringResult("ChannelName", sChannelName.c_str()); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4355,22 +4533,24 @@ Lib3MFResult lib3mf_beamlattice_getballoptions(Lib3MF_BeamLattice pBeamLattice, } } -Lib3MFResult lib3mf_beamlattice_setballoptions(Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeBallMode eBallMode, Lib3MF_double dBallRadius) +Lib3MFResult lib3mf_levelset_setchannelname(Lib3MF_LevelSet pLevelSet, const char * pChannelName) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetBallOptions"); - pJournalEntry->addEnumParameter("BallMode", "BeamLatticeBallMode", (Lib3MF_int32)(eBallMode)); - pJournalEntry->addDoubleParameter("BallRadius", dBallRadius); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "SetChannelName"); + pJournalEntry->addStringParameter("ChannelName", pChannelName); } - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + if (pChannelName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sChannelName(pChannelName); + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->SetBallOptions(eBallMode, dBallRadius); + pILevelSet->SetChannelName(sChannelName); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -4388,25 +4568,23 @@ Lib3MFResult lib3mf_beamlattice_setballoptions(Lib3MF_BeamLattice pBeamLattice, } } -Lib3MFResult lib3mf_beamlattice_getbeamcount(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) +Lib3MFResult lib3mf_levelset_setminfeaturesize(Lib3MF_LevelSet pLevelSet, Lib3MF_double dMinFeatureSize) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBeamCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "SetMinFeatureSize"); + pJournalEntry->addDoubleParameter("MinFeatureSize", dMinFeatureSize); } - if (pCount == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pIBeamLattice->GetBeamCount(); + pILevelSet->SetMinFeatureSize(dMinFeatureSize); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4422,25 +4600,25 @@ Lib3MFResult lib3mf_beamlattice_getbeamcount(Lib3MF_BeamLattice pBeamLattice, Li } } -Lib3MFResult lib3mf_beamlattice_getbeam(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, sLib3MFBeam * pBeamInfo) +Lib3MFResult lib3mf_levelset_getminfeaturesize(Lib3MF_LevelSet pLevelSet, Lib3MF_double * pMinFeatureSize) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBeam"); - pJournalEntry->addUInt32Parameter("Index", nIndex); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "GetMinFeatureSize"); } - if (pBeamInfo == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + if (pMinFeatureSize == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pBeamInfo = pIBeamLattice->GetBeam(nIndex); + *pMinFeatureSize = pILevelSet->GetMinFeatureSize(); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addDoubleResult("MinFeatureSize", *pMinFeatureSize); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4456,25 +4634,23 @@ Lib3MFResult lib3mf_beamlattice_getbeam(Lib3MF_BeamLattice pBeamLattice, Lib3MF_ } } -Lib3MFResult lib3mf_beamlattice_addbeam(Lib3MF_BeamLattice pBeamLattice, const sLib3MFBeam * pBeamInfo, Lib3MF_uint32 * pIndex) +Lib3MFResult lib3mf_levelset_setfallbackvalue(Lib3MF_LevelSet pLevelSet, Lib3MF_double dFallBackValue) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "AddBeam"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "SetFallBackValue"); + pJournalEntry->addDoubleParameter("FallBackValue", dFallBackValue); } - if (pIndex == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pIndex = pIBeamLattice->AddBeam(*pBeamInfo); + pILevelSet->SetFallBackValue(dFallBackValue); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Index", *pIndex); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4490,23 +4666,25 @@ Lib3MFResult lib3mf_beamlattice_addbeam(Lib3MF_BeamLattice pBeamLattice, const s } } -Lib3MFResult lib3mf_beamlattice_setbeam(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const sLib3MFBeam * pBeamInfo) +Lib3MFResult lib3mf_levelset_getfallbackvalue(Lib3MF_LevelSet pLevelSet, Lib3MF_double * pFallBackValue) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetBeam"); - pJournalEntry->addUInt32Parameter("Index", nIndex); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "GetFallBackValue"); } - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + if (pFallBackValue == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->SetBeam(nIndex, *pBeamInfo); + *pFallBackValue = pILevelSet->GetFallBackValue(); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addDoubleResult("FallBackValue", *pFallBackValue); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4522,22 +4700,21 @@ Lib3MFResult lib3mf_beamlattice_setbeam(Lib3MF_BeamLattice pBeamLattice, Lib3MF_ } } -Lib3MFResult lib3mf_beamlattice_setbeams(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBeamInfoBufferSize, const sLib3MFBeam * pBeamInfoBuffer) +Lib3MFResult lib3mf_levelset_setmeshbboxonly(Lib3MF_LevelSet pLevelSet, bool bMeshBBoxOnly) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetBeams"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "SetMeshBBoxOnly"); + pJournalEntry->addBooleanParameter("MeshBBoxOnly", bMeshBBoxOnly); } - if ( (!pBeamInfoBuffer) && (nBeamInfoBufferSize>0)) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->SetBeams(nBeamInfoBufferSize, pBeamInfoBuffer); + pILevelSet->SetMeshBBoxOnly(bMeshBBoxOnly); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -4555,24 +4732,25 @@ Lib3MFResult lib3mf_beamlattice_setbeams(Lib3MF_BeamLattice pBeamLattice, Lib3MF } } -Lib3MFResult lib3mf_beamlattice_getbeams(Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBeamInfoBufferSize, Lib3MF_uint64* pBeamInfoNeededCount, sLib3MFBeam * pBeamInfoBuffer) +Lib3MFResult lib3mf_levelset_getmeshbboxonly(Lib3MF_LevelSet pLevelSet, bool * pMeshBBoxOnly) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBeams"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "GetMeshBBoxOnly"); } - if ((!pBeamInfoBuffer) && !(pBeamInfoNeededCount)) + if (pMeshBBoxOnly == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->GetBeams(nBeamInfoBufferSize, pBeamInfoNeededCount, pBeamInfoBuffer); + *pMeshBBoxOnly = pILevelSet->GetMeshBBoxOnly(); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addBooleanResult("MeshBBoxOnly", *pMeshBBoxOnly); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4588,25 +4766,28 @@ Lib3MFResult lib3mf_beamlattice_getbeams(Lib3MF_BeamLattice pBeamLattice, const } } -Lib3MFResult lib3mf_beamlattice_getballcount(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) +Lib3MFResult lib3mf_levelset_setmesh(Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject pTheMesh) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBallCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "SetMesh"); + pJournalEntry->addHandleParameter("TheMesh", pTheMesh); } - if (pCount == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + IBase* pIBaseClassTheMesh = (IBase *)pTheMesh; + IMeshObject* pITheMesh = dynamic_cast(pIBaseClassTheMesh); + if (!pITheMesh) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pIBeamLattice->GetBallCount(); + pILevelSet->SetMesh(pITheMesh); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4622,25 +4803,27 @@ Lib3MFResult lib3mf_beamlattice_getballcount(Lib3MF_BeamLattice pBeamLattice, Li } } -Lib3MFResult lib3mf_beamlattice_getball(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, sLib3MFBall * pBallInfo) +Lib3MFResult lib3mf_levelset_getmesh(Lib3MF_LevelSet pLevelSet, Lib3MF_MeshObject * pTheMesh) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBall"); - pJournalEntry->addUInt32Parameter("Index", nIndex); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "GetMesh"); } - if (pBallInfo == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + if (pTheMesh == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseTheMesh(nullptr); + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pBallInfo = pIBeamLattice->GetBall(nIndex); + pBaseTheMesh = pILevelSet->GetMesh(); + *pTheMesh = (IBase*)(pBaseTheMesh); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("TheMesh", *pTheMesh); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4656,25 +4839,27 @@ Lib3MFResult lib3mf_beamlattice_getball(Lib3MF_BeamLattice pBeamLattice, Lib3MF_ } } -Lib3MFResult lib3mf_beamlattice_addball(Lib3MF_BeamLattice pBeamLattice, const sLib3MFBall * pBallInfo, Lib3MF_uint32 * pIndex) +Lib3MFResult lib3mf_levelset_getvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData * pTheVolumeData) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "AddBall"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "GetVolumeData"); } - if (pIndex == nullptr) + if (pTheVolumeData == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + IBase* pBaseTheVolumeData(nullptr); + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pIndex = pIBeamLattice->AddBall(*pBallInfo); + pBaseTheVolumeData = pILevelSet->GetVolumeData(); + *pTheVolumeData = (IBase*)(pBaseTheVolumeData); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Index", *pIndex); + pJournalEntry->addHandleResult("TheVolumeData", *pTheVolumeData); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4690,21 +4875,26 @@ Lib3MFResult lib3mf_beamlattice_addball(Lib3MF_BeamLattice pBeamLattice, const s } } -Lib3MFResult lib3mf_beamlattice_setball(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const sLib3MFBall * pBallInfo) +Lib3MFResult lib3mf_levelset_setvolumedata(Lib3MF_LevelSet pLevelSet, Lib3MF_VolumeData pTheVolumeData) { - IBase* pIBaseClass = (IBase *)pBeamLattice; + IBase* pIBaseClass = (IBase *)pLevelSet; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetBall"); - pJournalEntry->addUInt32Parameter("Index", nIndex); + pJournalEntry = m_GlobalJournal->beginClassMethod(pLevelSet, "LevelSet", "SetVolumeData"); + pJournalEntry->addHandleParameter("TheVolumeData", pTheVolumeData); } - IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); - if (!pIBeamLattice) + IBase* pIBaseClassTheVolumeData = (IBase *)pTheVolumeData; + IVolumeData* pITheVolumeData = dynamic_cast(pIBaseClassTheVolumeData); + if (!pITheVolumeData) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + ILevelSet* pILevelSet = dynamic_cast(pIBaseClass); + if (!pILevelSet) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->SetBall(nIndex, *pBallInfo); + pILevelSet->SetVolumeData(pITheVolumeData); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -4722,24 +4912,29 @@ Lib3MFResult lib3mf_beamlattice_setball(Lib3MF_BeamLattice pBeamLattice, Lib3MF_ } } -Lib3MFResult lib3mf_beamlattice_setballs(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBallInfoBufferSize, const sLib3MFBall * pBallInfoBuffer) + +/************************************************************************************************************************* + Class implementation for BeamLattice +**************************************************************************************************************************/ +Lib3MFResult lib3mf_beamlattice_getminlength(Lib3MF_BeamLattice pBeamLattice, Lib3MF_double * pMinLength) { IBase* pIBaseClass = (IBase *)pBeamLattice; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetBalls"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetMinLength"); } - if ( (!pBallInfoBuffer) && (nBallInfoBufferSize>0)) + if (pMinLength == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); if (!pIBeamLattice) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->SetBalls(nBallInfoBufferSize, pBallInfoBuffer); + *pMinLength = pIBeamLattice->GetMinLength(); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addDoubleResult("MinLength", *pMinLength); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4755,22 +4950,21 @@ Lib3MFResult lib3mf_beamlattice_setballs(Lib3MF_BeamLattice pBeamLattice, Lib3MF } } -Lib3MFResult lib3mf_beamlattice_getballs(Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBallInfoBufferSize, Lib3MF_uint64* pBallInfoNeededCount, sLib3MFBall * pBallInfoBuffer) +Lib3MFResult lib3mf_beamlattice_setminlength(Lib3MF_BeamLattice pBeamLattice, Lib3MF_double dMinLength) { IBase* pIBaseClass = (IBase *)pBeamLattice; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBalls"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetMinLength"); + pJournalEntry->addDoubleParameter("MinLength", dMinLength); } - if ((!pBallInfoBuffer) && !(pBallInfoNeededCount)) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); if (!pIBeamLattice) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamLattice->GetBalls(nBallInfoBufferSize, pBallInfoNeededCount, pBallInfoBuffer); + pIBeamLattice->SetMinLength(dMinLength); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -4788,25 +4982,28 @@ Lib3MFResult lib3mf_beamlattice_getballs(Lib3MF_BeamLattice pBeamLattice, const } } -Lib3MFResult lib3mf_beamlattice_getbeamsetcount(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) +Lib3MFResult lib3mf_beamlattice_getclipping(Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeClipMode * pClipMode, Lib3MF_uint32 * pUniqueResourceID) { IBase* pIBaseClass = (IBase *)pBeamLattice; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBeamSetCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetClipping"); } - if (pCount == nullptr) + if (!pClipMode) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (!pUniqueResourceID) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); if (!pIBeamLattice) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pIBeamLattice->GetBeamSetCount(); + pIBeamLattice->GetClipping(*pClipMode, *pUniqueResourceID); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->addEnumResult("ClipMode", "BeamLatticeClipMode", (Lib3MF_int32)(*pClipMode)); + pJournalEntry->addUInt32Result("UniqueResourceID", *pUniqueResourceID); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4822,27 +5019,24 @@ Lib3MFResult lib3mf_beamlattice_getbeamsetcount(Lib3MF_BeamLattice pBeamLattice, } } -Lib3MFResult lib3mf_beamlattice_addbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3MF_BeamSet * pBeamSet) +Lib3MFResult lib3mf_beamlattice_setclipping(Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeClipMode eClipMode, Lib3MF_uint32 nUniqueResourceID) { IBase* pIBaseClass = (IBase *)pBeamLattice; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "AddBeamSet"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetClipping"); + pJournalEntry->addEnumParameter("ClipMode", "BeamLatticeClipMode", (Lib3MF_int32)(eClipMode)); + pJournalEntry->addUInt32Parameter("UniqueResourceID", nUniqueResourceID); } - if (pBeamSet == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pBaseBeamSet(nullptr); IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); if (!pIBeamLattice) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBaseBeamSet = pIBeamLattice->AddBeamSet(); + pIBeamLattice->SetClipping(eClipMode, nUniqueResourceID); - *pBeamSet = (IBase*)(pBaseBeamSet); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("BeamSet", *pBeamSet); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4858,28 +5052,28 @@ Lib3MFResult lib3mf_beamlattice_addbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3 } } -Lib3MFResult lib3mf_beamlattice_getbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet) +Lib3MFResult lib3mf_beamlattice_getrepresentation(Lib3MF_BeamLattice pBeamLattice, bool * pHasRepresentation, Lib3MF_uint32 * pUniqueResourceID) { IBase* pIBaseClass = (IBase *)pBeamLattice; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBeamSet"); - pJournalEntry->addUInt32Parameter("Index", nIndex); + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetRepresentation"); } - if (pBeamSet == nullptr) + if (pHasRepresentation == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (!pUniqueResourceID) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pBaseBeamSet(nullptr); IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); if (!pIBeamLattice) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBaseBeamSet = pIBeamLattice->GetBeamSet(nIndex); + *pHasRepresentation = pIBeamLattice->GetRepresentation(*pUniqueResourceID); - *pBeamSet = (IBase*)(pBaseBeamSet); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("BeamSet", *pBeamSet); + pJournalEntry->addBooleanResult("HasRepresentation", *pHasRepresentation); + pJournalEntry->addUInt32Result("UniqueResourceID", *pUniqueResourceID); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4895,31 +5089,23 @@ Lib3MFResult lib3mf_beamlattice_getbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3 } } - -/************************************************************************************************************************* - Class implementation for Component -**************************************************************************************************************************/ -Lib3MFResult lib3mf_component_getobjectresource(Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource) +Lib3MFResult lib3mf_beamlattice_setrepresentation(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nUniqueResourceID) { - IBase* pIBaseClass = (IBase *)pComponent; + IBase* pIBaseClass = (IBase *)pBeamLattice; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "GetObjectResource"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetRepresentation"); + pJournalEntry->addUInt32Parameter("UniqueResourceID", nUniqueResourceID); } - if (pObjectResource == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pBaseObjectResource(nullptr); - IComponent* pIComponent = dynamic_cast(pIBaseClass); - if (!pIComponent) + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBaseObjectResource = pIComponent->GetObjectResource(); + pIBeamLattice->SetRepresentation(nUniqueResourceID); - *pObjectResource = (IBase*)(pBaseObjectResource); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("ObjectResource", *pObjectResource); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4935,25 +5121,28 @@ Lib3MFResult lib3mf_component_getobjectresource(Lib3MF_Component pComponent, Lib } } -Lib3MFResult lib3mf_component_getobjectresourceid(Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID) +Lib3MFResult lib3mf_beamlattice_getballoptions(Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeBallMode * pBallMode, Lib3MF_double * pBallRadius) { - IBase* pIBaseClass = (IBase *)pComponent; + IBase* pIBaseClass = (IBase *)pBeamLattice; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "GetObjectResourceID"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBallOptions"); } - if (pUniqueResourceID == nullptr) + if (!pBallMode) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IComponent* pIComponent = dynamic_cast(pIBaseClass); - if (!pIComponent) + if (!pBallRadius) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pUniqueResourceID = pIComponent->GetObjectResourceID(); + pIBeamLattice->GetBallOptions(*pBallMode, *pBallRadius); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("UniqueResourceID", *pUniqueResourceID); + pJournalEntry->addEnumResult("BallMode", "BeamLatticeBallMode", (Lib3MF_int32)(*pBallMode)); + pJournalEntry->addDoubleResult("BallRadius", *pBallRadius); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -4969,50 +5158,24 @@ Lib3MFResult lib3mf_component_getobjectresourceid(Lib3MF_Component pComponent, L } } -Lib3MFResult lib3mf_component_getuuid(Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +Lib3MFResult lib3mf_beamlattice_setballoptions(Lib3MF_BeamLattice pBeamLattice, eLib3MFBeamLatticeBallMode eBallMode, Lib3MF_double dBallRadius) { - IBase* pIBaseClass = (IBase *)pComponent; + IBase* pIBaseClass = (IBase *)pBeamLattice; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "GetUUID"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetBallOptions"); + pJournalEntry->addEnumParameter("BallMode", "BeamLatticeBallMode", (Lib3MF_int32)(eBallMode)); + pJournalEntry->addDoubleParameter("BallRadius", dBallRadius); } - if (!pHasUUID) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - if ( (!pUUIDBuffer) && !(pUUIDNeededChars) ) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sUUID(""); - IComponent* pIComponent = dynamic_cast(pIBaseClass); - if (!pIComponent) + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - bool isCacheCall = (pUUIDBuffer == nullptr); - if (isCacheCall) { - sUUID = pIComponent->GetUUID(*pHasUUID); + pIBeamLattice->SetBallOptions(eBallMode, dBallRadius); - pIComponent->_setCache (new ParameterCache_2 (*pHasUUID, sUUID)); - } - else { - auto cache = dynamic_cast*> (pIComponent->_getCache ()); - if (cache == nullptr) - throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - cache->retrieveData (*pHasUUID, sUUID); - pIComponent->_setCache (nullptr); - } - - if (pUUIDNeededChars) - *pUUIDNeededChars = (Lib3MF_uint32) (sUUID.size()+1); - if (pUUIDBuffer) { - if (sUUID.size() >= nUUIDBufferSize) - throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); - for (size_t iUUID = 0; iUUID < sUUID.size(); iUUID++) - pUUIDBuffer[iUUID] = sUUID[iUUID]; - pUUIDBuffer[sUUID.size()] = 0; - } if (pJournalEntry.get() != nullptr) { - pJournalEntry->addBooleanResult("HasUUID", *pHasUUID); - pJournalEntry->addStringResult("UUID", sUUID.c_str()); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5028,26 +5191,25 @@ Lib3MFResult lib3mf_component_getuuid(Lib3MF_Component pComponent, bool * pHasUU } } -Lib3MFResult lib3mf_component_setuuid(Lib3MF_Component pComponent, const char * pUUID) +Lib3MFResult lib3mf_beamlattice_getbeamcount(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) { - IBase* pIBaseClass = (IBase *)pComponent; + IBase* pIBaseClass = (IBase *)pBeamLattice; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "SetUUID"); - pJournalEntry->addStringParameter("UUID", pUUID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBeamCount"); } - if (pUUID == nullptr) + if (pCount == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sUUID(pUUID); - IComponent* pIComponent = dynamic_cast(pIBaseClass); - if (!pIComponent) + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIComponent->SetUUID(sUUID); + *pCount = pIBeamLattice->GetBeamCount(); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5063,25 +5225,25 @@ Lib3MFResult lib3mf_component_setuuid(Lib3MF_Component pComponent, const char * } } -Lib3MFResult lib3mf_component_hastransform(Lib3MF_Component pComponent, bool * pHasTransform) +Lib3MFResult lib3mf_beamlattice_getbeam(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, sLib3MFBeam * pBeamInfo) { - IBase* pIBaseClass = (IBase *)pComponent; + IBase* pIBaseClass = (IBase *)pBeamLattice; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "HasTransform"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBeam"); + pJournalEntry->addUInt32Parameter("Index", nIndex); } - if (pHasTransform == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IComponent* pIComponent = dynamic_cast(pIBaseClass); - if (!pIComponent) + if (pBeamInfo == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pHasTransform = pIComponent->HasTransform(); + *pBeamInfo = pIBeamLattice->GetBeam(nIndex); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addBooleanResult("HasTransform", *pHasTransform); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5097,21 +5259,1734 @@ Lib3MFResult lib3mf_component_hastransform(Lib3MF_Component pComponent, bool * p } } -Lib3MFResult lib3mf_component_gettransform(Lib3MF_Component pComponent, sLib3MFTransform * pTransform) +Lib3MFResult lib3mf_beamlattice_addbeam(Lib3MF_BeamLattice pBeamLattice, const sLib3MFBeam * pBeamInfo, Lib3MF_uint32 * pIndex) { - IBase* pIBaseClass = (IBase *)pComponent; + IBase* pIBaseClass = (IBase *)pBeamLattice; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "GetTransform"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "AddBeam"); } - if (pTransform == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IComponent* pIComponent = dynamic_cast(pIBaseClass); - if (!pIComponent) - throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - + if (pIndex == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pIndex = pIBeamLattice->AddBeam(*pBeamInfo); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Index", *pIndex); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_setbeam(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const sLib3MFBeam * pBeamInfo) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetBeam"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + } + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamLattice->SetBeam(nIndex, *pBeamInfo); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_setbeams(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBeamInfoBufferSize, const sLib3MFBeam * pBeamInfoBuffer) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetBeams"); + } + if ( (!pBeamInfoBuffer) && (nBeamInfoBufferSize>0)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamLattice->SetBeams(nBeamInfoBufferSize, pBeamInfoBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_getbeams(Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBeamInfoBufferSize, Lib3MF_uint64* pBeamInfoNeededCount, sLib3MFBeam * pBeamInfoBuffer) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBeams"); + } + if ((!pBeamInfoBuffer) && !(pBeamInfoNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamLattice->GetBeams(nBeamInfoBufferSize, pBeamInfoNeededCount, pBeamInfoBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_getballcount(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBallCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIBeamLattice->GetBallCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_getball(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, sLib3MFBall * pBallInfo) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBall"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + } + if (pBallInfo == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pBallInfo = pIBeamLattice->GetBall(nIndex); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_addball(Lib3MF_BeamLattice pBeamLattice, const sLib3MFBall * pBallInfo, Lib3MF_uint32 * pIndex) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "AddBall"); + } + if (pIndex == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pIndex = pIBeamLattice->AddBall(*pBallInfo); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Index", *pIndex); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_setball(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, const sLib3MFBall * pBallInfo) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetBall"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + } + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamLattice->SetBall(nIndex, *pBallInfo); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_setballs(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint64 nBallInfoBufferSize, const sLib3MFBall * pBallInfoBuffer) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "SetBalls"); + } + if ( (!pBallInfoBuffer) && (nBallInfoBufferSize>0)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamLattice->SetBalls(nBallInfoBufferSize, pBallInfoBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_getballs(Lib3MF_BeamLattice pBeamLattice, const Lib3MF_uint64 nBallInfoBufferSize, Lib3MF_uint64* pBallInfoNeededCount, sLib3MFBall * pBallInfoBuffer) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBalls"); + } + if ((!pBallInfoBuffer) && !(pBallInfoNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamLattice->GetBalls(nBallInfoBufferSize, pBallInfoNeededCount, pBallInfoBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_getbeamsetcount(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBeamSetCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIBeamLattice->GetBeamSetCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_addbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3MF_BeamSet * pBeamSet) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "AddBeamSet"); + } + if (pBeamSet == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseBeamSet(nullptr); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseBeamSet = pIBeamLattice->AddBeamSet(); + + *pBeamSet = (IBase*)(pBaseBeamSet); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("BeamSet", *pBeamSet); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamlattice_getbeamset(Lib3MF_BeamLattice pBeamLattice, Lib3MF_uint32 nIndex, Lib3MF_BeamSet * pBeamSet) +{ + IBase* pIBaseClass = (IBase *)pBeamLattice; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamLattice, "BeamLattice", "GetBeamSet"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + } + if (pBeamSet == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseBeamSet(nullptr); + IBeamLattice* pIBeamLattice = dynamic_cast(pIBaseClass); + if (!pIBeamLattice) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseBeamSet = pIBeamLattice->GetBeamSet(nIndex); + + *pBeamSet = (IBase*)(pBaseBeamSet); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("BeamSet", *pBeamSet); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for FunctionReference +**************************************************************************************************************************/ +Lib3MFResult lib3mf_functionreference_getfunctionresourceid(Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 * pUniqueResourceID) +{ + IBase* pIBaseClass = (IBase *)pFunctionReference; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionReference, "FunctionReference", "GetFunctionResourceID"); + } + if (pUniqueResourceID == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IFunctionReference* pIFunctionReference = dynamic_cast(pIBaseClass); + if (!pIFunctionReference) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pUniqueResourceID = pIFunctionReference->GetFunctionResourceID(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("UniqueResourceID", *pUniqueResourceID); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functionreference_setfunctionresourceid(Lib3MF_FunctionReference pFunctionReference, Lib3MF_uint32 nUniqueResourceID) +{ + IBase* pIBaseClass = (IBase *)pFunctionReference; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionReference, "FunctionReference", "SetFunctionResourceID"); + pJournalEntry->addUInt32Parameter("UniqueResourceID", nUniqueResourceID); + } + IFunctionReference* pIFunctionReference = dynamic_cast(pIBaseClass); + if (!pIFunctionReference) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIFunctionReference->SetFunctionResourceID(nUniqueResourceID); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functionreference_gettransform(Lib3MF_FunctionReference pFunctionReference, sLib3MFTransform * pTransform) +{ + IBase* pIBaseClass = (IBase *)pFunctionReference; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionReference, "FunctionReference", "GetTransform"); + } + if (pTransform == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IFunctionReference* pIFunctionReference = dynamic_cast(pIBaseClass); + if (!pIFunctionReference) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pTransform = pIFunctionReference->GetTransform(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functionreference_settransform(Lib3MF_FunctionReference pFunctionReference, const sLib3MFTransform * pTransform) +{ + IBase* pIBaseClass = (IBase *)pFunctionReference; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionReference, "FunctionReference", "SetTransform"); + } + IFunctionReference* pIFunctionReference = dynamic_cast(pIBaseClass); + if (!pIFunctionReference) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIFunctionReference->SetTransform(*pTransform); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functionreference_getchannelname(Lib3MF_FunctionReference pFunctionReference, const Lib3MF_uint32 nChannelNameBufferSize, Lib3MF_uint32* pChannelNameNeededChars, char * pChannelNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pFunctionReference; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionReference, "FunctionReference", "GetChannelName"); + } + if ( (!pChannelNameBuffer) && !(pChannelNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sChannelName(""); + IFunctionReference* pIFunctionReference = dynamic_cast(pIBaseClass); + if (!pIFunctionReference) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pChannelNameBuffer == nullptr); + if (isCacheCall) { + sChannelName = pIFunctionReference->GetChannelName(); + + pIFunctionReference->_setCache (new ParameterCache_1 (sChannelName)); + } + else { + auto cache = dynamic_cast*> (pIFunctionReference->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sChannelName); + pIFunctionReference->_setCache (nullptr); + } + + if (pChannelNameNeededChars) + *pChannelNameNeededChars = (Lib3MF_uint32) (sChannelName.size()+1); + if (pChannelNameBuffer) { + if (sChannelName.size() >= nChannelNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iChannelName = 0; iChannelName < sChannelName.size(); iChannelName++) + pChannelNameBuffer[iChannelName] = sChannelName[iChannelName]; + pChannelNameBuffer[sChannelName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("ChannelName", sChannelName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functionreference_setchannelname(Lib3MF_FunctionReference pFunctionReference, const char * pChannelName) +{ + IBase* pIBaseClass = (IBase *)pFunctionReference; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionReference, "FunctionReference", "SetChannelName"); + pJournalEntry->addStringParameter("ChannelName", pChannelName); + } + if (pChannelName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sChannelName(pChannelName); + IFunctionReference* pIFunctionReference = dynamic_cast(pIBaseClass); + if (!pIFunctionReference) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIFunctionReference->SetChannelName(sChannelName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functionreference_setminfeaturesize(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dMinFeatureSize) +{ + IBase* pIBaseClass = (IBase *)pFunctionReference; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionReference, "FunctionReference", "SetMinFeatureSize"); + pJournalEntry->addDoubleParameter("MinFeatureSize", dMinFeatureSize); + } + IFunctionReference* pIFunctionReference = dynamic_cast(pIBaseClass); + if (!pIFunctionReference) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIFunctionReference->SetMinFeatureSize(dMinFeatureSize); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functionreference_getminfeaturesize(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pMinFeatureSize) +{ + IBase* pIBaseClass = (IBase *)pFunctionReference; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionReference, "FunctionReference", "GetMinFeatureSize"); + } + if (pMinFeatureSize == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IFunctionReference* pIFunctionReference = dynamic_cast(pIBaseClass); + if (!pIFunctionReference) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pMinFeatureSize = pIFunctionReference->GetMinFeatureSize(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addDoubleResult("MinFeatureSize", *pMinFeatureSize); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functionreference_setfallbackvalue(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double dFallBackValue) +{ + IBase* pIBaseClass = (IBase *)pFunctionReference; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionReference, "FunctionReference", "SetFallBackValue"); + pJournalEntry->addDoubleParameter("FallBackValue", dFallBackValue); + } + IFunctionReference* pIFunctionReference = dynamic_cast(pIBaseClass); + if (!pIFunctionReference) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIFunctionReference->SetFallBackValue(dFallBackValue); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_functionreference_getfallbackvalue(Lib3MF_FunctionReference pFunctionReference, Lib3MF_double * pFallBackValue) +{ + IBase* pIBaseClass = (IBase *)pFunctionReference; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionReference, "FunctionReference", "GetFallBackValue"); + } + if (pFallBackValue == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IFunctionReference* pIFunctionReference = dynamic_cast(pIBaseClass); + if (!pIFunctionReference) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pFallBackValue = pIFunctionReference->GetFallBackValue(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addDoubleResult("FallBackValue", *pFallBackValue); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for VolumeDataColor +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for MaterialMapping +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for VolumeDataComposite +**************************************************************************************************************************/ +Lib3MFResult lib3mf_volumedatacomposite_getbasematerialgroup(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance) +{ + IBase* pIBaseClass = (IBase *)pVolumeDataComposite; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeDataComposite, "VolumeDataComposite", "GetBaseMaterialGroup"); + } + if (pBaseMaterialGroupInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseBaseMaterialGroupInstance(nullptr); + IVolumeDataComposite* pIVolumeDataComposite = dynamic_cast(pIBaseClass); + if (!pIVolumeDataComposite) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseBaseMaterialGroupInstance = pIVolumeDataComposite->GetBaseMaterialGroup(); + + *pBaseMaterialGroupInstance = (IBase*)(pBaseBaseMaterialGroupInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("BaseMaterialGroupInstance", *pBaseMaterialGroupInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedatacomposite_setbasematerialgroup(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance) +{ + IBase* pIBaseClass = (IBase *)pVolumeDataComposite; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeDataComposite, "VolumeDataComposite", "SetBaseMaterialGroup"); + pJournalEntry->addHandleParameter("BaseMaterialGroupInstance", pBaseMaterialGroupInstance); + } + IBase* pIBaseClassBaseMaterialGroupInstance = (IBase *)pBaseMaterialGroupInstance; + IBaseMaterialGroup* pIBaseMaterialGroupInstance = dynamic_cast(pIBaseClassBaseMaterialGroupInstance); + if (!pIBaseMaterialGroupInstance) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IVolumeDataComposite* pIVolumeDataComposite = dynamic_cast(pIBaseClass); + if (!pIVolumeDataComposite) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIVolumeDataComposite->SetBaseMaterialGroup(pIBaseMaterialGroupInstance); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedatacomposite_getmaterialmappingcount(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pVolumeDataComposite; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeDataComposite, "VolumeDataComposite", "GetMaterialMappingCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IVolumeDataComposite* pIVolumeDataComposite = dynamic_cast(pIBaseClass); + if (!pIVolumeDataComposite) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIVolumeDataComposite->GetMaterialMappingCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedatacomposite_getmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex, Lib3MF_MaterialMapping * pTheMaterialMapping) +{ + IBase* pIBaseClass = (IBase *)pVolumeDataComposite; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeDataComposite, "VolumeDataComposite", "GetMaterialMapping"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + } + if (pTheMaterialMapping == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseTheMaterialMapping(nullptr); + IVolumeDataComposite* pIVolumeDataComposite = dynamic_cast(pIBaseClass); + if (!pIVolumeDataComposite) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseTheMaterialMapping = pIVolumeDataComposite->GetMaterialMapping(nIndex); + + *pTheMaterialMapping = (IBase*)(pBaseTheMaterialMapping); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("TheMaterialMapping", *pTheMaterialMapping); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedatacomposite_addmaterialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, const sLib3MFTransform * pTransform, Lib3MF_MaterialMapping * pTheMaterialMapping) +{ + IBase* pIBaseClass = (IBase *)pVolumeDataComposite; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeDataComposite, "VolumeDataComposite", "AddMaterialMapping"); + } + if (pTheMaterialMapping == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseTheMaterialMapping(nullptr); + IVolumeDataComposite* pIVolumeDataComposite = dynamic_cast(pIBaseClass); + if (!pIVolumeDataComposite) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseTheMaterialMapping = pIVolumeDataComposite->AddMaterialMapping(*pTransform); + + *pTheMaterialMapping = (IBase*)(pBaseTheMaterialMapping); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("TheMaterialMapping", *pTheMaterialMapping); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedatacomposite_removematerialmapping(Lib3MF_VolumeDataComposite pVolumeDataComposite, Lib3MF_uint32 nIndex) +{ + IBase* pIBaseClass = (IBase *)pVolumeDataComposite; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeDataComposite, "VolumeDataComposite", "RemoveMaterialMapping"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + } + IVolumeDataComposite* pIVolumeDataComposite = dynamic_cast(pIBaseClass); + if (!pIVolumeDataComposite) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIVolumeDataComposite->RemoveMaterialMapping(nIndex); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for VolumeDataProperty +**************************************************************************************************************************/ +Lib3MFResult lib3mf_volumedataproperty_getname(Lib3MF_VolumeDataProperty pVolumeDataProperty, const Lib3MF_uint32 nPropertyNameBufferSize, Lib3MF_uint32* pPropertyNameNeededChars, char * pPropertyNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pVolumeDataProperty; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeDataProperty, "VolumeDataProperty", "GetName"); + } + if ( (!pPropertyNameBuffer) && !(pPropertyNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sPropertyName(""); + IVolumeDataProperty* pIVolumeDataProperty = dynamic_cast(pIBaseClass); + if (!pIVolumeDataProperty) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pPropertyNameBuffer == nullptr); + if (isCacheCall) { + sPropertyName = pIVolumeDataProperty->GetName(); + + pIVolumeDataProperty->_setCache (new ParameterCache_1 (sPropertyName)); + } + else { + auto cache = dynamic_cast*> (pIVolumeDataProperty->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sPropertyName); + pIVolumeDataProperty->_setCache (nullptr); + } + + if (pPropertyNameNeededChars) + *pPropertyNameNeededChars = (Lib3MF_uint32) (sPropertyName.size()+1); + if (pPropertyNameBuffer) { + if (sPropertyName.size() >= nPropertyNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iPropertyName = 0; iPropertyName < sPropertyName.size(); iPropertyName++) + pPropertyNameBuffer[iPropertyName] = sPropertyName[iPropertyName]; + pPropertyNameBuffer[sPropertyName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("PropertyName", sPropertyName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedataproperty_setisrequired(Lib3MF_VolumeDataProperty pVolumeDataProperty, bool bIsRequired) +{ + IBase* pIBaseClass = (IBase *)pVolumeDataProperty; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeDataProperty, "VolumeDataProperty", "SetIsRequired"); + pJournalEntry->addBooleanParameter("IsRequired", bIsRequired); + } + IVolumeDataProperty* pIVolumeDataProperty = dynamic_cast(pIBaseClass); + if (!pIVolumeDataProperty) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIVolumeDataProperty->SetIsRequired(bIsRequired); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedataproperty_isrequired(Lib3MF_VolumeDataProperty pVolumeDataProperty, bool * pIsRequired) +{ + IBase* pIBaseClass = (IBase *)pVolumeDataProperty; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeDataProperty, "VolumeDataProperty", "IsRequired"); + } + if (pIsRequired == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IVolumeDataProperty* pIVolumeDataProperty = dynamic_cast(pIBaseClass); + if (!pIVolumeDataProperty) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pIsRequired = pIVolumeDataProperty->IsRequired(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addBooleanResult("IsRequired", *pIsRequired); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for VolumeData +**************************************************************************************************************************/ +Lib3MFResult lib3mf_volumedata_getcomposite(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData) +{ + IBase* pIBaseClass = (IBase *)pVolumeData; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeData, "VolumeData", "GetComposite"); + } + if (pTheCompositeData == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseTheCompositeData(nullptr); + IVolumeData* pIVolumeData = dynamic_cast(pIBaseClass); + if (!pIVolumeData) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseTheCompositeData = pIVolumeData->GetComposite(); + + *pTheCompositeData = (IBase*)(pBaseTheCompositeData); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("TheCompositeData", *pTheCompositeData); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedata_createnewcomposite(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataComposite * pTheCompositeData) +{ + IBase* pIBaseClass = (IBase *)pVolumeData; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeData, "VolumeData", "CreateNewComposite"); + } + if (pTheCompositeData == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseTheCompositeData(nullptr); + IVolumeData* pIVolumeData = dynamic_cast(pIBaseClass); + if (!pIVolumeData) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseTheCompositeData = pIVolumeData->CreateNewComposite(); + + *pTheCompositeData = (IBase*)(pBaseTheCompositeData); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("TheCompositeData", *pTheCompositeData); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedata_removecomposite(Lib3MF_VolumeData pVolumeData) +{ + IBase* pIBaseClass = (IBase *)pVolumeData; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeData, "VolumeData", "RemoveComposite"); + } + IVolumeData* pIVolumeData = dynamic_cast(pIBaseClass); + if (!pIVolumeData) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIVolumeData->RemoveComposite(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedata_getcolor(Lib3MF_VolumeData pVolumeData, Lib3MF_VolumeDataColor * pTheColorData) +{ + IBase* pIBaseClass = (IBase *)pVolumeData; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeData, "VolumeData", "GetColor"); + } + if (pTheColorData == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseTheColorData(nullptr); + IVolumeData* pIVolumeData = dynamic_cast(pIBaseClass); + if (!pIVolumeData) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseTheColorData = pIVolumeData->GetColor(); + + *pTheColorData = (IBase*)(pBaseTheColorData); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("TheColorData", *pTheColorData); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedata_createnewcolor(Lib3MF_VolumeData pVolumeData, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataColor * pTheColorData) +{ + IBase* pIBaseClass = (IBase *)pVolumeData; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeData, "VolumeData", "CreateNewColor"); + pJournalEntry->addHandleParameter("TheFunction", pTheFunction); + } + if (pTheColorData == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pIBaseClassTheFunction = (IBase *)pTheFunction; + IFunction* pITheFunction = dynamic_cast(pIBaseClassTheFunction); + if (!pITheFunction) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IBase* pBaseTheColorData(nullptr); + IVolumeData* pIVolumeData = dynamic_cast(pIBaseClass); + if (!pIVolumeData) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseTheColorData = pIVolumeData->CreateNewColor(pITheFunction); + + *pTheColorData = (IBase*)(pBaseTheColorData); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("TheColorData", *pTheColorData); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedata_removecolor(Lib3MF_VolumeData pVolumeData) +{ + IBase* pIBaseClass = (IBase *)pVolumeData; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeData, "VolumeData", "RemoveColor"); + } + IVolumeData* pIVolumeData = dynamic_cast(pIBaseClass); + if (!pIVolumeData) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIVolumeData->RemoveColor(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedata_getpropertycount(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pVolumeData; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeData, "VolumeData", "GetPropertyCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IVolumeData* pIVolumeData = dynamic_cast(pIBaseClass); + if (!pIVolumeData) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIVolumeData->GetPropertyCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedata_getproperty(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty) +{ + IBase* pIBaseClass = (IBase *)pVolumeData; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeData, "VolumeData", "GetProperty"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + } + if (pTheVolumeDataProperty == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseTheVolumeDataProperty(nullptr); + IVolumeData* pIVolumeData = dynamic_cast(pIBaseClass); + if (!pIVolumeData) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseTheVolumeDataProperty = pIVolumeData->GetProperty(nIndex); + + *pTheVolumeDataProperty = (IBase*)(pBaseTheVolumeDataProperty); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("TheVolumeDataProperty", *pTheVolumeDataProperty); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedata_addpropertyfromfunction(Lib3MF_VolumeData pVolumeData, const char * pName, Lib3MF_Function pTheFunction, Lib3MF_VolumeDataProperty * pTheVolumeDataProperty) +{ + IBase* pIBaseClass = (IBase *)pVolumeData; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeData, "VolumeData", "AddPropertyFromFunction"); + pJournalEntry->addStringParameter("Name", pName); + pJournalEntry->addHandleParameter("TheFunction", pTheFunction); + } + if (pName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTheVolumeDataProperty == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sName(pName); + IBase* pIBaseClassTheFunction = (IBase *)pTheFunction; + IFunction* pITheFunction = dynamic_cast(pIBaseClassTheFunction); + if (!pITheFunction) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IBase* pBaseTheVolumeDataProperty(nullptr); + IVolumeData* pIVolumeData = dynamic_cast(pIBaseClass); + if (!pIVolumeData) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseTheVolumeDataProperty = pIVolumeData->AddPropertyFromFunction(sName, pITheFunction); + + *pTheVolumeDataProperty = (IBase*)(pBaseTheVolumeDataProperty); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("TheVolumeDataProperty", *pTheVolumeDataProperty); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_volumedata_removeproperty(Lib3MF_VolumeData pVolumeData, Lib3MF_uint32 nIndex) +{ + IBase* pIBaseClass = (IBase *)pVolumeData; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pVolumeData, "VolumeData", "RemoveProperty"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + } + IVolumeData* pIVolumeData = dynamic_cast(pIBaseClass); + if (!pIVolumeData) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIVolumeData->RemoveProperty(nIndex); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for Component +**************************************************************************************************************************/ +Lib3MFResult lib3mf_component_getobjectresource(Lib3MF_Component pComponent, Lib3MF_Object * pObjectResource) +{ + IBase* pIBaseClass = (IBase *)pComponent; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "GetObjectResource"); + } + if (pObjectResource == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseObjectResource(nullptr); + IComponent* pIComponent = dynamic_cast(pIBaseClass); + if (!pIComponent) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseObjectResource = pIComponent->GetObjectResource(); + + *pObjectResource = (IBase*)(pBaseObjectResource); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("ObjectResource", *pObjectResource); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_component_getobjectresourceid(Lib3MF_Component pComponent, Lib3MF_uint32 * pUniqueResourceID) +{ + IBase* pIBaseClass = (IBase *)pComponent; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "GetObjectResourceID"); + } + if (pUniqueResourceID == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IComponent* pIComponent = dynamic_cast(pIBaseClass); + if (!pIComponent) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pUniqueResourceID = pIComponent->GetObjectResourceID(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("UniqueResourceID", *pUniqueResourceID); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_component_getuuid(Lib3MF_Component pComponent, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) +{ + IBase* pIBaseClass = (IBase *)pComponent; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "GetUUID"); + } + if (!pHasUUID) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if ( (!pUUIDBuffer) && !(pUUIDNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sUUID(""); + IComponent* pIComponent = dynamic_cast(pIBaseClass); + if (!pIComponent) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pUUIDBuffer == nullptr); + if (isCacheCall) { + sUUID = pIComponent->GetUUID(*pHasUUID); + + pIComponent->_setCache (new ParameterCache_2 (*pHasUUID, sUUID)); + } + else { + auto cache = dynamic_cast*> (pIComponent->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (*pHasUUID, sUUID); + pIComponent->_setCache (nullptr); + } + + if (pUUIDNeededChars) + *pUUIDNeededChars = (Lib3MF_uint32) (sUUID.size()+1); + if (pUUIDBuffer) { + if (sUUID.size() >= nUUIDBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iUUID = 0; iUUID < sUUID.size(); iUUID++) + pUUIDBuffer[iUUID] = sUUID[iUUID]; + pUUIDBuffer[sUUID.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addBooleanResult("HasUUID", *pHasUUID); + pJournalEntry->addStringResult("UUID", sUUID.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_component_setuuid(Lib3MF_Component pComponent, const char * pUUID) +{ + IBase* pIBaseClass = (IBase *)pComponent; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "SetUUID"); + pJournalEntry->addStringParameter("UUID", pUUID); + } + if (pUUID == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sUUID(pUUID); + IComponent* pIComponent = dynamic_cast(pIBaseClass); + if (!pIComponent) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIComponent->SetUUID(sUUID); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_component_hastransform(Lib3MF_Component pComponent, bool * pHasTransform) +{ + IBase* pIBaseClass = (IBase *)pComponent; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "HasTransform"); + } + if (pHasTransform == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IComponent* pIComponent = dynamic_cast(pIBaseClass); + if (!pIComponent) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pHasTransform = pIComponent->HasTransform(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addBooleanResult("HasTransform", *pHasTransform); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_component_gettransform(Lib3MF_Component pComponent, sLib3MFTransform * pTransform) +{ + IBase* pIBaseClass = (IBase *)pComponent; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "GetTransform"); + } + if (pTransform == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IComponent* pIComponent = dynamic_cast(pIBaseClass); + if (!pIComponent) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + *pTransform = pIComponent->GetTransform(); if (pJournalEntry.get() != nullptr) { @@ -5130,22 +7005,6940 @@ Lib3MFResult lib3mf_component_gettransform(Lib3MF_Component pComponent, sLib3MFT } } -Lib3MFResult lib3mf_component_settransform(Lib3MF_Component pComponent, const sLib3MFTransform * pTransform) +Lib3MFResult lib3mf_component_settransform(Lib3MF_Component pComponent, const sLib3MFTransform * pTransform) +{ + IBase* pIBaseClass = (IBase *)pComponent; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "SetTransform"); + } + IComponent* pIComponent = dynamic_cast(pIBaseClass); + if (!pIComponent) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIComponent->SetTransform(*pTransform); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ComponentsObject +**************************************************************************************************************************/ +Lib3MFResult lib3mf_componentsobject_addcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance) +{ + IBase* pIBaseClass = (IBase *)pComponentsObject; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComponentsObject, "ComponentsObject", "AddComponent"); + pJournalEntry->addHandleParameter("ObjectResource", pObjectResource); + } + if (pComponentInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pIBaseClassObjectResource = (IBase *)pObjectResource; + IObject* pIObjectResource = dynamic_cast(pIBaseClassObjectResource); + if (!pIObjectResource) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IBase* pBaseComponentInstance(nullptr); + IComponentsObject* pIComponentsObject = dynamic_cast(pIBaseClass); + if (!pIComponentsObject) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseComponentInstance = pIComponentsObject->AddComponent(pIObjectResource, *pTransform); + + *pComponentInstance = (IBase*)(pBaseComponentInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("ComponentInstance", *pComponentInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_componentsobject_getcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance) +{ + IBase* pIBaseClass = (IBase *)pComponentsObject; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComponentsObject, "ComponentsObject", "GetComponent"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + } + if (pComponentInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseComponentInstance(nullptr); + IComponentsObject* pIComponentsObject = dynamic_cast(pIBaseClass); + if (!pIComponentsObject) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseComponentInstance = pIComponentsObject->GetComponent(nIndex); + + *pComponentInstance = (IBase*)(pBaseComponentInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("ComponentInstance", *pComponentInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_componentsobject_getcomponentcount(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pComponentsObject; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComponentsObject, "ComponentsObject", "GetComponentCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IComponentsObject* pIComponentsObject = dynamic_cast(pIBaseClass); + if (!pIComponentsObject) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIComponentsObject->GetComponentCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for BeamSet +**************************************************************************************************************************/ +Lib3MFResult lib3mf_beamset_setname(Lib3MF_BeamSet pBeamSet, const char * pName) +{ + IBase* pIBaseClass = (IBase *)pBeamSet; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "SetName"); + pJournalEntry->addStringParameter("Name", pName); + } + if (pName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sName(pName); + IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); + if (!pIBeamSet) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamSet->SetName(sName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamset_getname(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pBeamSet; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetName"); + } + if ( (!pNameBuffer) && !(pNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sName(""); + IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); + if (!pIBeamSet) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pNameBuffer == nullptr); + if (isCacheCall) { + sName = pIBeamSet->GetName(); + + pIBeamSet->_setCache (new ParameterCache_1 (sName)); + } + else { + auto cache = dynamic_cast*> (pIBeamSet->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sName); + pIBeamSet->_setCache (nullptr); + } + + if (pNameNeededChars) + *pNameNeededChars = (Lib3MF_uint32) (sName.size()+1); + if (pNameBuffer) { + if (sName.size() >= nNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iName = 0; iName < sName.size(); iName++) + pNameBuffer[iName] = sName[iName]; + pNameBuffer[sName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("Name", sName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamset_setidentifier(Lib3MF_BeamSet pBeamSet, const char * pIdentifier) +{ + IBase* pIBaseClass = (IBase *)pBeamSet; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "SetIdentifier"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); + if (!pIBeamSet) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamSet->SetIdentifier(sIdentifier); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamset_getidentifier(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer) +{ + IBase* pIBaseClass = (IBase *)pBeamSet; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetIdentifier"); + } + if ( (!pIdentifierBuffer) && !(pIdentifierNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(""); + IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); + if (!pIBeamSet) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pIdentifierBuffer == nullptr); + if (isCacheCall) { + sIdentifier = pIBeamSet->GetIdentifier(); + + pIBeamSet->_setCache (new ParameterCache_1 (sIdentifier)); + } + else { + auto cache = dynamic_cast*> (pIBeamSet->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sIdentifier); + pIBeamSet->_setCache (nullptr); + } + + if (pIdentifierNeededChars) + *pIdentifierNeededChars = (Lib3MF_uint32) (sIdentifier.size()+1); + if (pIdentifierBuffer) { + if (sIdentifier.size() >= nIdentifierBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iIdentifier = 0; iIdentifier < sIdentifier.size(); iIdentifier++) + pIdentifierBuffer[iIdentifier] = sIdentifier[iIdentifier]; + pIdentifierBuffer[sIdentifier.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("Identifier", sIdentifier.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamset_getreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pBeamSet; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetReferenceCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); + if (!pIBeamSet) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIBeamSet->GetReferenceCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamset_setreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer) +{ + IBase* pIBaseClass = (IBase *)pBeamSet; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "SetReferences"); + } + if ( (!pReferencesBuffer) && (nReferencesBufferSize>0)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); + if (!pIBeamSet) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamSet->SetReferences(nReferencesBufferSize, pReferencesBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamset_getreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer) +{ + IBase* pIBaseClass = (IBase *)pBeamSet; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetReferences"); + } + if ((!pReferencesBuffer) && !(pReferencesNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); + if (!pIBeamSet) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamSet->GetReferences(nReferencesBufferSize, pReferencesNeededCount, pReferencesBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamset_getballreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pBeamSet; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetBallReferenceCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); + if (!pIBeamSet) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIBeamSet->GetBallReferenceCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamset_setballreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer) +{ + IBase* pIBaseClass = (IBase *)pBeamSet; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "SetBallReferences"); + } + if ( (!pBallReferencesBuffer) && (nBallReferencesBufferSize>0)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); + if (!pIBeamSet) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamSet->SetBallReferences(nBallReferencesBufferSize, pBallReferencesBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_beamset_getballreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer) +{ + IBase* pIBaseClass = (IBase *)pBeamSet; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetBallReferences"); + } + if ((!pBallReferencesBuffer) && !(pBallReferencesNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); + if (!pIBeamSet) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBeamSet->GetBallReferences(nBallReferencesBufferSize, pBallReferencesNeededCount, pBallReferencesBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for BaseMaterialGroup +**************************************************************************************************************************/ +Lib3MFResult lib3mf_basematerialgroup_getcount(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "GetCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); + if (!pIBaseMaterialGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIBaseMaterialGroup->GetCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_basematerialgroup_getallpropertyids(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +{ + IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "GetAllPropertyIDs"); + } + if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); + if (!pIBaseMaterialGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBaseMaterialGroup->GetAllPropertyIDs(nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_basematerialgroup_addmaterial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID) +{ + IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "AddMaterial"); + pJournalEntry->addStringParameter("Name", pName); + } + if (pName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pPropertyID == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sName(pName); + IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); + if (!pIBaseMaterialGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pPropertyID = pIBaseMaterialGroup->AddMaterial(sName, *pDisplayColor); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("PropertyID", *pPropertyID); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_basematerialgroup_removematerial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID) +{ + IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "RemoveMaterial"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); + if (!pIBaseMaterialGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBaseMaterialGroup->RemoveMaterial(nPropertyID); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_basematerialgroup_getname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "GetName"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + if ( (!pNameBuffer) && !(pNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sName(""); + IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); + if (!pIBaseMaterialGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pNameBuffer == nullptr); + if (isCacheCall) { + sName = pIBaseMaterialGroup->GetName(nPropertyID); + + pIBaseMaterialGroup->_setCache (new ParameterCache_1 (sName)); + } + else { + auto cache = dynamic_cast*> (pIBaseMaterialGroup->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sName); + pIBaseMaterialGroup->_setCache (nullptr); + } + + if (pNameNeededChars) + *pNameNeededChars = (Lib3MF_uint32) (sName.size()+1); + if (pNameBuffer) { + if (sName.size() >= nNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iName = 0; iName < sName.size(); iName++) + pNameBuffer[iName] = sName[iName]; + pNameBuffer[sName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("Name", sName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_basematerialgroup_setname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName) +{ + IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "SetName"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry->addStringParameter("Name", pName); + } + if (pName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sName(pName); + IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); + if (!pIBaseMaterialGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBaseMaterialGroup->SetName(nPropertyID, sName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_basematerialgroup_setdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor) +{ + IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "SetDisplayColor"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); + if (!pIBaseMaterialGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIBaseMaterialGroup->SetDisplayColor(nPropertyID, *pTheColor); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_basematerialgroup_getdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor) +{ + IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "GetDisplayColor"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + if (pTheColor == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); + if (!pIBaseMaterialGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pTheColor = pIBaseMaterialGroup->GetDisplayColor(nPropertyID); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ColorGroup +**************************************************************************************************************************/ +Lib3MFResult lib3mf_colorgroup_getcount(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pColorGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "GetCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); + if (!pIColorGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIColorGroup->GetCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_colorgroup_getallpropertyids(Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +{ + IBase* pIBaseClass = (IBase *)pColorGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "GetAllPropertyIDs"); + } + if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); + if (!pIColorGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIColorGroup->GetAllPropertyIDs(nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_colorgroup_addcolor(Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID) +{ + IBase* pIBaseClass = (IBase *)pColorGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "AddColor"); + } + if (pPropertyID == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); + if (!pIColorGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pPropertyID = pIColorGroup->AddColor(*pTheColor); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("PropertyID", *pPropertyID); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_colorgroup_removecolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID) +{ + IBase* pIBaseClass = (IBase *)pColorGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "RemoveColor"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); + if (!pIColorGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIColorGroup->RemoveColor(nPropertyID); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_colorgroup_setcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor) +{ + IBase* pIBaseClass = (IBase *)pColorGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "SetColor"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); + if (!pIColorGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIColorGroup->SetColor(nPropertyID, *pTheColor); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_colorgroup_getcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor) +{ + IBase* pIBaseClass = (IBase *)pColorGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "GetColor"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + if (pTheColor == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); + if (!pIColorGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pTheColor = pIColorGroup->GetColor(nPropertyID); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for Texture2DGroup +**************************************************************************************************************************/ +Lib3MFResult lib3mf_texture2dgroup_getcount(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pTexture2DGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "GetCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); + if (!pITexture2DGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pITexture2DGroup->GetCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2dgroup_getallpropertyids(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +{ + IBase* pIBaseClass = (IBase *)pTexture2DGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "GetAllPropertyIDs"); + } + if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); + if (!pITexture2DGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pITexture2DGroup->GetAllPropertyIDs(nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2dgroup_addtex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID) +{ + IBase* pIBaseClass = (IBase *)pTexture2DGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "AddTex2Coord"); + } + if (pPropertyID == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); + if (!pITexture2DGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pPropertyID = pITexture2DGroup->AddTex2Coord(*pUVCoordinate); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("PropertyID", *pPropertyID); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2dgroup_gettex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate) +{ + IBase* pIBaseClass = (IBase *)pTexture2DGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "GetTex2Coord"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + if (pUVCoordinate == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); + if (!pITexture2DGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pUVCoordinate = pITexture2DGroup->GetTex2Coord(nPropertyID); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2dgroup_removetex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID) +{ + IBase* pIBaseClass = (IBase *)pTexture2DGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "RemoveTex2Coord"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); + if (!pITexture2DGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pITexture2DGroup->RemoveTex2Coord(nPropertyID); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2dgroup_gettexture2d(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance) +{ + IBase* pIBaseClass = (IBase *)pTexture2DGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "GetTexture2D"); + } + if (pTexture2DInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseTexture2DInstance(nullptr); + ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); + if (!pITexture2DGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseTexture2DInstance = pITexture2DGroup->GetTexture2D(); + + *pTexture2DInstance = (IBase*)(pBaseTexture2DInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Texture2DInstance", *pTexture2DInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for CompositeMaterials +**************************************************************************************************************************/ +Lib3MFResult lib3mf_compositematerials_getcount(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pCompositeMaterials; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "GetCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); + if (!pICompositeMaterials) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pICompositeMaterials->GetCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_compositematerials_getallpropertyids(Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +{ + IBase* pIBaseClass = (IBase *)pCompositeMaterials; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "GetAllPropertyIDs"); + } + if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); + if (!pICompositeMaterials) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pICompositeMaterials->GetAllPropertyIDs(nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_compositematerials_getbasematerialgroup(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance) +{ + IBase* pIBaseClass = (IBase *)pCompositeMaterials; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "GetBaseMaterialGroup"); + } + if (pBaseMaterialGroupInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseBaseMaterialGroupInstance(nullptr); + ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); + if (!pICompositeMaterials) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseBaseMaterialGroupInstance = pICompositeMaterials->GetBaseMaterialGroup(); + + *pBaseMaterialGroupInstance = (IBase*)(pBaseBaseMaterialGroupInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("BaseMaterialGroupInstance", *pBaseMaterialGroupInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_compositematerials_addcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID) +{ + IBase* pIBaseClass = (IBase *)pCompositeMaterials; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "AddComposite"); + } + if ( (!pCompositeBuffer) && (nCompositeBufferSize>0)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pPropertyID == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); + if (!pICompositeMaterials) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pPropertyID = pICompositeMaterials->AddComposite(nCompositeBufferSize, pCompositeBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("PropertyID", *pPropertyID); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_compositematerials_removecomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID) +{ + IBase* pIBaseClass = (IBase *)pCompositeMaterials; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "RemoveComposite"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); + if (!pICompositeMaterials) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pICompositeMaterials->RemoveComposite(nPropertyID); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_compositematerials_getcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer) +{ + IBase* pIBaseClass = (IBase *)pCompositeMaterials; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "GetComposite"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + if ((!pCompositeBuffer) && !(pCompositeNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); + if (!pICompositeMaterials) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pICompositeMaterials->GetComposite(nPropertyID, nCompositeBufferSize, pCompositeNeededCount, pCompositeBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for MultiPropertyGroup +**************************************************************************************************************************/ +Lib3MFResult lib3mf_multipropertygroup_getcount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "GetCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); + if (!pIMultiPropertyGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIMultiPropertyGroup->GetCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_multipropertygroup_getallpropertyids(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +{ + IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "GetAllPropertyIDs"); + } + if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); + if (!pIMultiPropertyGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIMultiPropertyGroup->GetAllPropertyIDs(nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_multipropertygroup_addmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID) +{ + IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "AddMultiProperty"); + } + if ( (!pPropertyIDsBuffer) && (nPropertyIDsBufferSize>0)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pPropertyID == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); + if (!pIMultiPropertyGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pPropertyID = pIMultiPropertyGroup->AddMultiProperty(nPropertyIDsBufferSize, pPropertyIDsBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("PropertyID", *pPropertyID); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_multipropertygroup_setmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer) +{ + IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "SetMultiProperty"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + if ( (!pPropertyIDsBuffer) && (nPropertyIDsBufferSize>0)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); + if (!pIMultiPropertyGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIMultiPropertyGroup->SetMultiProperty(nPropertyID, nPropertyIDsBufferSize, pPropertyIDsBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_multipropertygroup_getmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +{ + IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "GetMultiProperty"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); + if (!pIMultiPropertyGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIMultiPropertyGroup->GetMultiProperty(nPropertyID, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_multipropertygroup_removemultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID) +{ + IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "RemoveMultiProperty"); + pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + } + IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); + if (!pIMultiPropertyGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIMultiPropertyGroup->RemoveMultiProperty(nPropertyID); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_multipropertygroup_getlayercount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount) +{ + IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "GetLayerCount"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); + if (!pIMultiPropertyGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIMultiPropertyGroup->GetLayerCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_multipropertygroup_addlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex) +{ + IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "AddLayer"); + } + if (pLayerIndex == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); + if (!pIMultiPropertyGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pLayerIndex = pIMultiPropertyGroup->AddLayer(*pTheLayer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("LayerIndex", *pLayerIndex); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_multipropertygroup_getlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer) +{ + IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "GetLayer"); + pJournalEntry->addUInt32Parameter("LayerIndex", nLayerIndex); + } + if (pTheLayer == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); + if (!pIMultiPropertyGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pTheLayer = pIMultiPropertyGroup->GetLayer(nLayerIndex); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_multipropertygroup_removelayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex) +{ + IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "RemoveLayer"); + pJournalEntry->addUInt32Parameter("LayerIndex", nLayerIndex); + } + IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); + if (!pIMultiPropertyGroup) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIMultiPropertyGroup->RemoveLayer(nLayerIndex); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for Image3D +**************************************************************************************************************************/ +Lib3MFResult lib3mf_image3d_getname(Lib3MF_Image3D pImage3D, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pImage3D; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImage3D, "Image3D", "GetName"); + } + if ( (!pNameBuffer) && !(pNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sName(""); + IImage3D* pIImage3D = dynamic_cast(pIBaseClass); + if (!pIImage3D) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pNameBuffer == nullptr); + if (isCacheCall) { + sName = pIImage3D->GetName(); + + pIImage3D->_setCache (new ParameterCache_1 (sName)); + } + else { + auto cache = dynamic_cast*> (pIImage3D->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sName); + pIImage3D->_setCache (nullptr); + } + + if (pNameNeededChars) + *pNameNeededChars = (Lib3MF_uint32) (sName.size()+1); + if (pNameBuffer) { + if (sName.size() >= nNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iName = 0; iName < sName.size(); iName++) + pNameBuffer[iName] = sName[iName]; + pNameBuffer[sName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("Name", sName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_image3d_setname(Lib3MF_Image3D pImage3D, const char * pName) +{ + IBase* pIBaseClass = (IBase *)pImage3D; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImage3D, "Image3D", "SetName"); + pJournalEntry->addStringParameter("Name", pName); + } + if (pName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sName(pName); + IImage3D* pIImage3D = dynamic_cast(pIBaseClass); + if (!pIImage3D) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIImage3D->SetName(sName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_image3d_isimagestack(Lib3MF_Image3D pImage3D, bool * pIsImageStack) +{ + IBase* pIBaseClass = (IBase *)pImage3D; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImage3D, "Image3D", "IsImageStack"); + } + if (pIsImageStack == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IImage3D* pIImage3D = dynamic_cast(pIBaseClass); + if (!pIImage3D) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pIsImageStack = pIImage3D->IsImageStack(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addBooleanResult("IsImageStack", *pIsImageStack); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ImageStack +**************************************************************************************************************************/ +Lib3MFResult lib3mf_imagestack_getrowcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pRowCount) +{ + IBase* pIBaseClass = (IBase *)pImageStack; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImageStack, "ImageStack", "GetRowCount"); + } + if (pRowCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IImageStack* pIImageStack = dynamic_cast(pIBaseClass); + if (!pIImageStack) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pRowCount = pIImageStack->GetRowCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("RowCount", *pRowCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_imagestack_setrowcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nRowCount) +{ + IBase* pIBaseClass = (IBase *)pImageStack; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImageStack, "ImageStack", "SetRowCount"); + pJournalEntry->addUInt32Parameter("RowCount", nRowCount); + } + IImageStack* pIImageStack = dynamic_cast(pIBaseClass); + if (!pIImageStack) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIImageStack->SetRowCount(nRowCount); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_imagestack_getcolumncount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pColumnCount) +{ + IBase* pIBaseClass = (IBase *)pImageStack; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImageStack, "ImageStack", "GetColumnCount"); + } + if (pColumnCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IImageStack* pIImageStack = dynamic_cast(pIBaseClass); + if (!pIImageStack) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pColumnCount = pIImageStack->GetColumnCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("ColumnCount", *pColumnCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_imagestack_setcolumncount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nColumnCount) +{ + IBase* pIBaseClass = (IBase *)pImageStack; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImageStack, "ImageStack", "SetColumnCount"); + pJournalEntry->addUInt32Parameter("ColumnCount", nColumnCount); + } + IImageStack* pIImageStack = dynamic_cast(pIBaseClass); + if (!pIImageStack) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIImageStack->SetColumnCount(nColumnCount); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_imagestack_getsheetcount(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 * pSheetCount) +{ + IBase* pIBaseClass = (IBase *)pImageStack; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImageStack, "ImageStack", "GetSheetCount"); + } + if (pSheetCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IImageStack* pIImageStack = dynamic_cast(pIBaseClass); + if (!pIImageStack) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pSheetCount = pIImageStack->GetSheetCount(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt32Result("SheetCount", *pSheetCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_imagestack_getsheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment * pSheet) +{ + IBase* pIBaseClass = (IBase *)pImageStack; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImageStack, "ImageStack", "GetSheet"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + } + if (pSheet == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseSheet(nullptr); + IImageStack* pIImageStack = dynamic_cast(pIBaseClass); + if (!pIImageStack) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseSheet = pIImageStack->GetSheet(nIndex); + + *pSheet = (IBase*)(pBaseSheet); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Sheet", *pSheet); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_imagestack_setsheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, Lib3MF_Attachment pSheet) +{ + IBase* pIBaseClass = (IBase *)pImageStack; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImageStack, "ImageStack", "SetSheet"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + pJournalEntry->addHandleParameter("Sheet", pSheet); + } + IBase* pIBaseClassSheet = (IBase *)pSheet; + IAttachment* pISheet = dynamic_cast(pIBaseClassSheet); + if (!pISheet) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IImageStack* pIImageStack = dynamic_cast(pIBaseClass); + if (!pIImageStack) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIImageStack->SetSheet(nIndex, pISheet); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_imagestack_createemptysheet(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_Attachment * pSheet) +{ + IBase* pIBaseClass = (IBase *)pImageStack; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImageStack, "ImageStack", "CreateEmptySheet"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + pJournalEntry->addStringParameter("Path", pPath); + } + if (pPath == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pSheet == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sPath(pPath); + IBase* pBaseSheet(nullptr); + IImageStack* pIImageStack = dynamic_cast(pIBaseClass); + if (!pIImageStack) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseSheet = pIImageStack->CreateEmptySheet(nIndex, sPath); + + *pSheet = (IBase*)(pBaseSheet); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Sheet", *pSheet); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_imagestack_createsheetfrombuffer(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer, Lib3MF_Attachment * pSheet) +{ + IBase* pIBaseClass = (IBase *)pImageStack; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImageStack, "ImageStack", "CreateSheetFromBuffer"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + pJournalEntry->addStringParameter("Path", pPath); + } + if (pPath == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if ( (!pDataBuffer) && (nDataBufferSize>0)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pSheet == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sPath(pPath); + IBase* pBaseSheet(nullptr); + IImageStack* pIImageStack = dynamic_cast(pIBaseClass); + if (!pIImageStack) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseSheet = pIImageStack->CreateSheetFromBuffer(nIndex, sPath, nDataBufferSize, pDataBuffer); + + *pSheet = (IBase*)(pBaseSheet); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Sheet", *pSheet); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_imagestack_createsheetfromfile(Lib3MF_ImageStack pImageStack, Lib3MF_uint32 nIndex, const char * pPath, const char * pFileName, Lib3MF_Attachment * pSheet) +{ + IBase* pIBaseClass = (IBase *)pImageStack; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImageStack, "ImageStack", "CreateSheetFromFile"); + pJournalEntry->addUInt32Parameter("Index", nIndex); + pJournalEntry->addStringParameter("Path", pPath); + pJournalEntry->addStringParameter("FileName", pFileName); + } + if (pPath == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pFileName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pSheet == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sPath(pPath); + std::string sFileName(pFileName); + IBase* pBaseSheet(nullptr); + IImageStack* pIImageStack = dynamic_cast(pIBaseClass); + if (!pIImageStack) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseSheet = pIImageStack->CreateSheetFromFile(nIndex, sPath, sFileName); + + *pSheet = (IBase*)(pBaseSheet); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Sheet", *pSheet); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for Attachment +**************************************************************************************************************************/ +Lib3MFResult lib3mf_attachment_getpath(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer) +{ + IBase* pIBaseClass = (IBase *)pAttachment; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "GetPath"); + } + if ( (!pPathBuffer) && !(pPathNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sPath(""); + IAttachment* pIAttachment = dynamic_cast(pIBaseClass); + if (!pIAttachment) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pPathBuffer == nullptr); + if (isCacheCall) { + sPath = pIAttachment->GetPath(); + + pIAttachment->_setCache (new ParameterCache_1 (sPath)); + } + else { + auto cache = dynamic_cast*> (pIAttachment->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sPath); + pIAttachment->_setCache (nullptr); + } + + if (pPathNeededChars) + *pPathNeededChars = (Lib3MF_uint32) (sPath.size()+1); + if (pPathBuffer) { + if (sPath.size() >= nPathBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iPath = 0; iPath < sPath.size(); iPath++) + pPathBuffer[iPath] = sPath[iPath]; + pPathBuffer[sPath.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("Path", sPath.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_attachment_setpath(Lib3MF_Attachment pAttachment, const char * pPath) +{ + IBase* pIBaseClass = (IBase *)pAttachment; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "SetPath"); + pJournalEntry->addStringParameter("Path", pPath); + } + if (pPath == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sPath(pPath); + IAttachment* pIAttachment = dynamic_cast(pIBaseClass); + if (!pIAttachment) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIAttachment->SetPath(sPath); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_attachment_packagepart(Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart) +{ + IBase* pIBaseClass = (IBase *)pAttachment; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "PackagePart"); + } + if (pPackagePart == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBasePackagePart(nullptr); + IAttachment* pIAttachment = dynamic_cast(pIBaseClass); + if (!pIAttachment) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBasePackagePart = pIAttachment->PackagePart(); + + *pPackagePart = (IBase*)(pBasePackagePart); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("PackagePart", *pPackagePart); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_attachment_getrelationshiptype(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer) +{ + IBase* pIBaseClass = (IBase *)pAttachment; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "GetRelationShipType"); + } + if ( (!pPathBuffer) && !(pPathNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sPath(""); + IAttachment* pIAttachment = dynamic_cast(pIBaseClass); + if (!pIAttachment) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pPathBuffer == nullptr); + if (isCacheCall) { + sPath = pIAttachment->GetRelationShipType(); + + pIAttachment->_setCache (new ParameterCache_1 (sPath)); + } + else { + auto cache = dynamic_cast*> (pIAttachment->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sPath); + pIAttachment->_setCache (nullptr); + } + + if (pPathNeededChars) + *pPathNeededChars = (Lib3MF_uint32) (sPath.size()+1); + if (pPathBuffer) { + if (sPath.size() >= nPathBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iPath = 0; iPath < sPath.size(); iPath++) + pPathBuffer[iPath] = sPath[iPath]; + pPathBuffer[sPath.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("Path", sPath.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attachment pAttachment, const char * pPath) +{ + IBase* pIBaseClass = (IBase *)pAttachment; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "SetRelationShipType"); + pJournalEntry->addStringParameter("Path", pPath); + } + if (pPath == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sPath(pPath); + IAttachment* pIAttachment = dynamic_cast(pIBaseClass); + if (!pIAttachment) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIAttachment->SetRelationShipType(sPath); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName) +{ + IBase* pIBaseClass = (IBase *)pAttachment; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "WriteToFile"); + pJournalEntry->addStringParameter("FileName", pFileName); + } + if (pFileName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sFileName(pFileName); + IAttachment* pIAttachment = dynamic_cast(pIBaseClass); + if (!pIAttachment) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIAttachment->WriteToFile(sFileName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName) +{ + IBase* pIBaseClass = (IBase *)pAttachment; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "ReadFromFile"); + pJournalEntry->addStringParameter("FileName", pFileName); + } + if (pFileName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sFileName(pFileName); + IAttachment* pIAttachment = dynamic_cast(pIBaseClass); + if (!pIAttachment) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIAttachment->ReadFromFile(sFileName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_attachment_readfromcallback(Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData) +{ + IBase* pIBaseClass = (IBase *)pAttachment; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "ReadFromCallback"); + pJournalEntry->addUInt64Parameter("StreamSize", nStreamSize); + pJournalEntry->addPointerParameter("UserData", pUserData); + } + IAttachment* pIAttachment = dynamic_cast(pIBaseClass); + if (!pIAttachment) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIAttachment->ReadFromCallback(pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize) +{ + IBase* pIBaseClass = (IBase *)pAttachment; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "GetStreamSize"); + } + if (pStreamSize == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IAttachment* pIAttachment = dynamic_cast(pIBaseClass); + if (!pIAttachment) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pStreamSize = pIAttachment->GetStreamSize(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt64Result("StreamSize", *pStreamSize); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer) +{ + IBase* pIBaseClass = (IBase *)pAttachment; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "WriteToBuffer"); + } + if ((!pBufferBuffer) && !(pBufferNeededCount)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IAttachment* pIAttachment = dynamic_cast(pIBaseClass); + if (!pIAttachment) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIAttachment->WriteToBuffer(nBufferBufferSize, pBufferNeededCount, pBufferBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_attachment_readfrombuffer(Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer) +{ + IBase* pIBaseClass = (IBase *)pAttachment; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "ReadFromBuffer"); + } + if ( (!pBufferBuffer) && (nBufferBufferSize>0)) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IAttachment* pIAttachment = dynamic_cast(pIBaseClass); + if (!pIAttachment) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIAttachment->ReadFromBuffer(nBufferBufferSize, pBufferBuffer); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for Texture2D +**************************************************************************************************************************/ +Lib3MFResult lib3mf_texture2d_getattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment) +{ + IBase* pIBaseClass = (IBase *)pTexture2D; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "GetAttachment"); + } + if (pAttachment == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseAttachment(nullptr); + ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); + if (!pITexture2D) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseAttachment = pITexture2D->GetAttachment(); + + *pAttachment = (IBase*)(pBaseAttachment); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Attachment", *pAttachment); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2d_setattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment) +{ + IBase* pIBaseClass = (IBase *)pTexture2D; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "SetAttachment"); + pJournalEntry->addHandleParameter("Attachment", pAttachment); + } + IBase* pIBaseClassAttachment = (IBase *)pAttachment; + IAttachment* pIAttachment = dynamic_cast(pIBaseClassAttachment); + if (!pIAttachment) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); + if (!pITexture2D) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pITexture2D->SetAttachment(pIAttachment); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2d_getcontenttype(Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType) +{ + IBase* pIBaseClass = (IBase *)pTexture2D; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "GetContentType"); + } + if (pContentType == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); + if (!pITexture2D) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pContentType = pITexture2D->GetContentType(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addEnumResult("ContentType", "TextureType", (Lib3MF_int32)(*pContentType)); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2d_setcontenttype(Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType) +{ + IBase* pIBaseClass = (IBase *)pTexture2D; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "SetContentType"); + pJournalEntry->addEnumParameter("ContentType", "TextureType", (Lib3MF_int32)(eContentType)); + } + ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); + if (!pITexture2D) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pITexture2D->SetContentType(eContentType); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2d_gettilestyleuv(Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV) +{ + IBase* pIBaseClass = (IBase *)pTexture2D; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "GetTileStyleUV"); + } + if (!pTileStyleU) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (!pTileStyleV) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); + if (!pITexture2D) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pITexture2D->GetTileStyleUV(*pTileStyleU, *pTileStyleV); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addEnumResult("TileStyleU", "TextureTileStyle", (Lib3MF_int32)(*pTileStyleU)); + pJournalEntry->addEnumResult("TileStyleV", "TextureTileStyle", (Lib3MF_int32)(*pTileStyleV)); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2d_settilestyleuv(Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV) +{ + IBase* pIBaseClass = (IBase *)pTexture2D; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "SetTileStyleUV"); + pJournalEntry->addEnumParameter("TileStyleU", "TextureTileStyle", (Lib3MF_int32)(eTileStyleU)); + pJournalEntry->addEnumParameter("TileStyleV", "TextureTileStyle", (Lib3MF_int32)(eTileStyleV)); + } + ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); + if (!pITexture2D) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pITexture2D->SetTileStyleUV(eTileStyleU, eTileStyleV); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2d_getfilter(Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter) +{ + IBase* pIBaseClass = (IBase *)pTexture2D; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "GetFilter"); + } + if (pFilter == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); + if (!pITexture2D) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pFilter = pITexture2D->GetFilter(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addEnumResult("Filter", "TextureFilter", (Lib3MF_int32)(*pFilter)); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_texture2d_setfilter(Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter) +{ + IBase* pIBaseClass = (IBase *)pTexture2D; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "SetFilter"); + pJournalEntry->addEnumParameter("Filter", "TextureFilter", (Lib3MF_int32)(eFilter)); + } + ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); + if (!pITexture2D) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pITexture2D->SetFilter(eFilter); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ImplicitPort +**************************************************************************************************************************/ +Lib3MFResult lib3mf_implicitport_getidentifier(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer) +{ + IBase* pIBaseClass = (IBase *)pImplicitPort; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitPort, "ImplicitPort", "GetIdentifier"); + } + if ( (!pIdentifierBuffer) && !(pIdentifierNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(""); + IImplicitPort* pIImplicitPort = dynamic_cast(pIBaseClass); + if (!pIImplicitPort) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pIdentifierBuffer == nullptr); + if (isCacheCall) { + sIdentifier = pIImplicitPort->GetIdentifier(); + + pIImplicitPort->_setCache (new ParameterCache_1 (sIdentifier)); + } + else { + auto cache = dynamic_cast*> (pIImplicitPort->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sIdentifier); + pIImplicitPort->_setCache (nullptr); + } + + if (pIdentifierNeededChars) + *pIdentifierNeededChars = (Lib3MF_uint32) (sIdentifier.size()+1); + if (pIdentifierBuffer) { + if (sIdentifier.size() >= nIdentifierBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iIdentifier = 0; iIdentifier < sIdentifier.size(); iIdentifier++) + pIdentifierBuffer[iIdentifier] = sIdentifier[iIdentifier]; + pIdentifierBuffer[sIdentifier.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("Identifier", sIdentifier.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitport_setidentifier(Lib3MF_ImplicitPort pImplicitPort, const char * pIdentifier) +{ + IBase* pIBaseClass = (IBase *)pImplicitPort; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitPort, "ImplicitPort", "SetIdentifier"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + IImplicitPort* pIImplicitPort = dynamic_cast(pIBaseClass); + if (!pIImplicitPort) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIImplicitPort->SetIdentifier(sIdentifier); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitport_getdisplayname(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pImplicitPort; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitPort, "ImplicitPort", "GetDisplayName"); + } + if ( (!pDisplayNameBuffer) && !(pDisplayNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sDisplayName(""); + IImplicitPort* pIImplicitPort = dynamic_cast(pIBaseClass); + if (!pIImplicitPort) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pDisplayNameBuffer == nullptr); + if (isCacheCall) { + sDisplayName = pIImplicitPort->GetDisplayName(); + + pIImplicitPort->_setCache (new ParameterCache_1 (sDisplayName)); + } + else { + auto cache = dynamic_cast*> (pIImplicitPort->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sDisplayName); + pIImplicitPort->_setCache (nullptr); + } + + if (pDisplayNameNeededChars) + *pDisplayNameNeededChars = (Lib3MF_uint32) (sDisplayName.size()+1); + if (pDisplayNameBuffer) { + if (sDisplayName.size() >= nDisplayNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iDisplayName = 0; iDisplayName < sDisplayName.size(); iDisplayName++) + pDisplayNameBuffer[iDisplayName] = sDisplayName[iDisplayName]; + pDisplayNameBuffer[sDisplayName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("DisplayName", sDisplayName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitport_setdisplayname(Lib3MF_ImplicitPort pImplicitPort, const char * pDisplayName) +{ + IBase* pIBaseClass = (IBase *)pImplicitPort; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitPort, "ImplicitPort", "SetDisplayName"); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + } + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sDisplayName(pDisplayName); + IImplicitPort* pIImplicitPort = dynamic_cast(pIBaseClass); + if (!pIImplicitPort) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIImplicitPort->SetDisplayName(sDisplayName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitport_settype(Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType eImplicitPortType) +{ + IBase* pIBaseClass = (IBase *)pImplicitPort; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitPort, "ImplicitPort", "SetType"); + pJournalEntry->addEnumParameter("ImplicitPortType", "ImplicitPortType", (Lib3MF_int32)(eImplicitPortType)); + } + IImplicitPort* pIImplicitPort = dynamic_cast(pIBaseClass); + if (!pIImplicitPort) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIImplicitPort->SetType(eImplicitPortType); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitport_gettype(Lib3MF_ImplicitPort pImplicitPort, eLib3MFImplicitPortType * pImplicitPortType) +{ + IBase* pIBaseClass = (IBase *)pImplicitPort; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitPort, "ImplicitPort", "GetType"); + } + if (pImplicitPortType == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IImplicitPort* pIImplicitPort = dynamic_cast(pIBaseClass); + if (!pIImplicitPort) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pImplicitPortType = pIImplicitPort->GetType(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addEnumResult("ImplicitPortType", "ImplicitPortType", (Lib3MF_int32)(*pImplicitPortType)); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitport_getreference(Lib3MF_ImplicitPort pImplicitPort, const Lib3MF_uint32 nReferenceBufferSize, Lib3MF_uint32* pReferenceNeededChars, char * pReferenceBuffer) +{ + IBase* pIBaseClass = (IBase *)pImplicitPort; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitPort, "ImplicitPort", "GetReference"); + } + if ( (!pReferenceBuffer) && !(pReferenceNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sReference(""); + IImplicitPort* pIImplicitPort = dynamic_cast(pIBaseClass); + if (!pIImplicitPort) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pReferenceBuffer == nullptr); + if (isCacheCall) { + sReference = pIImplicitPort->GetReference(); + + pIImplicitPort->_setCache (new ParameterCache_1 (sReference)); + } + else { + auto cache = dynamic_cast*> (pIImplicitPort->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sReference); + pIImplicitPort->_setCache (nullptr); + } + + if (pReferenceNeededChars) + *pReferenceNeededChars = (Lib3MF_uint32) (sReference.size()+1); + if (pReferenceBuffer) { + if (sReference.size() >= nReferenceBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iReference = 0; iReference < sReference.size(); iReference++) + pReferenceBuffer[iReference] = sReference[iReference]; + pReferenceBuffer[sReference.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("Reference", sReference.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitport_setreference(Lib3MF_ImplicitPort pImplicitPort, const char * pReference) +{ + IBase* pIBaseClass = (IBase *)pImplicitPort; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitPort, "ImplicitPort", "SetReference"); + pJournalEntry->addStringParameter("Reference", pReference); + } + if (pReference == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sReference(pReference); + IImplicitPort* pIImplicitPort = dynamic_cast(pIBaseClass); + if (!pIImplicitPort) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIImplicitPort->SetReference(sReference); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for Iterator +**************************************************************************************************************************/ +Lib3MFResult lib3mf_iterator_movenext(Lib3MF_Iterator pIterator, bool * pHasNext) +{ + IBase* pIBaseClass = (IBase *)pIterator; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pIterator, "Iterator", "MoveNext"); + } + if (pHasNext == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IIterator* pIIterator = dynamic_cast(pIBaseClass); + if (!pIIterator) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pHasNext = pIIterator->MoveNext(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addBooleanResult("HasNext", *pHasNext); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_iterator_moveprevious(Lib3MF_Iterator pIterator, bool * pHasPrevious) +{ + IBase* pIBaseClass = (IBase *)pIterator; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pIterator, "Iterator", "MovePrevious"); + } + if (pHasPrevious == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IIterator* pIIterator = dynamic_cast(pIBaseClass); + if (!pIIterator) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pHasPrevious = pIIterator->MovePrevious(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addBooleanResult("HasPrevious", *pHasPrevious); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_iterator_count(Lib3MF_Iterator pIterator, Lib3MF_uint64 * pCount) +{ + IBase* pIBaseClass = (IBase *)pIterator; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pIterator, "Iterator", "Count"); + } + if (pCount == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IIterator* pIIterator = dynamic_cast(pIBaseClass); + if (!pIIterator) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pCount = pIIterator->Count(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addUInt64Result("Count", *pCount); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ImplicitPortIterator +**************************************************************************************************************************/ +Lib3MFResult lib3mf_implicitportiterator_getcurrent(Lib3MF_ImplicitPortIterator pImplicitPortIterator, Lib3MF_ImplicitPort * pPort) +{ + IBase* pIBaseClass = (IBase *)pImplicitPortIterator; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitPortIterator, "ImplicitPortIterator", "GetCurrent"); + } + if (pPort == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBasePort(nullptr); + IImplicitPortIterator* pIImplicitPortIterator = dynamic_cast(pIBaseClass); + if (!pIImplicitPortIterator) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBasePort = pIImplicitPortIterator->GetCurrent(); + + *pPort = (IBase*)(pBasePort); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Port", *pPort); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ImplicitNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_implicitnode_getidentifier(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "GetIdentifier"); + } + if ( (!pIdentifierBuffer) && !(pIdentifierNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(""); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pIdentifierBuffer == nullptr); + if (isCacheCall) { + sIdentifier = pIImplicitNode->GetIdentifier(); + + pIImplicitNode->_setCache (new ParameterCache_1 (sIdentifier)); + } + else { + auto cache = dynamic_cast*> (pIImplicitNode->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sIdentifier); + pIImplicitNode->_setCache (nullptr); + } + + if (pIdentifierNeededChars) + *pIdentifierNeededChars = (Lib3MF_uint32) (sIdentifier.size()+1); + if (pIdentifierBuffer) { + if (sIdentifier.size() >= nIdentifierBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iIdentifier = 0; iIdentifier < sIdentifier.size(); iIdentifier++) + pIdentifierBuffer[iIdentifier] = sIdentifier[iIdentifier]; + pIdentifierBuffer[sIdentifier.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("Identifier", sIdentifier.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_setidentifier(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "SetIdentifier"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIImplicitNode->SetIdentifier(sIdentifier); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_getdisplayname(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "GetDisplayName"); + } + if ( (!pDisplayNameBuffer) && !(pDisplayNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sDisplayName(""); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pDisplayNameBuffer == nullptr); + if (isCacheCall) { + sDisplayName = pIImplicitNode->GetDisplayName(); + + pIImplicitNode->_setCache (new ParameterCache_1 (sDisplayName)); + } + else { + auto cache = dynamic_cast*> (pIImplicitNode->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sDisplayName); + pIImplicitNode->_setCache (nullptr); + } + + if (pDisplayNameNeededChars) + *pDisplayNameNeededChars = (Lib3MF_uint32) (sDisplayName.size()+1); + if (pDisplayNameBuffer) { + if (sDisplayName.size() >= nDisplayNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iDisplayName = 0; iDisplayName < sDisplayName.size(); iDisplayName++) + pDisplayNameBuffer[iDisplayName] = sDisplayName[iDisplayName]; + pDisplayNameBuffer[sDisplayName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("DisplayName", sDisplayName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_setdisplayname(Lib3MF_ImplicitNode pImplicitNode, const char * pDisplayName) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "SetDisplayName"); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + } + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sDisplayName(pDisplayName); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIImplicitNode->SetDisplayName(sDisplayName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_gettag(Lib3MF_ImplicitNode pImplicitNode, const Lib3MF_uint32 nTagBufferSize, Lib3MF_uint32* pTagNeededChars, char * pTagBuffer) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "GetTag"); + } + if ( (!pTagBuffer) && !(pTagNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sTag(""); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pTagBuffer == nullptr); + if (isCacheCall) { + sTag = pIImplicitNode->GetTag(); + + pIImplicitNode->_setCache (new ParameterCache_1 (sTag)); + } + else { + auto cache = dynamic_cast*> (pIImplicitNode->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sTag); + pIImplicitNode->_setCache (nullptr); + } + + if (pTagNeededChars) + *pTagNeededChars = (Lib3MF_uint32) (sTag.size()+1); + if (pTagBuffer) { + if (sTag.size() >= nTagBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iTag = 0; iTag < sTag.size(); iTag++) + pTagBuffer[iTag] = sTag[iTag]; + pTagBuffer[sTag.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("Tag", sTag.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_settag(Lib3MF_ImplicitNode pImplicitNode, const char * pTag) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "SetTag"); + pJournalEntry->addStringParameter("Tag", pTag); + } + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sTag(pTag); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIImplicitNode->SetTag(sTag); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_getnodetype(Lib3MF_ImplicitNode pImplicitNode, eLib3MFImplicitNodeType * pType) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "GetNodeType"); + } + if (pType == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pType = pIImplicitNode->GetNodeType(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addEnumResult("Type", "ImplicitNodeType", (Lib3MF_int32)(*pType)); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_addinput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "AddInput"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pPort == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + IBase* pBasePort(nullptr); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBasePort = pIImplicitNode->AddInput(sIdentifier, sDisplayName); + + *pPort = (IBase*)(pBasePort); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Port", *pPort); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_getinputs(Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "GetInputs"); + } + if (pIterator == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseIterator(nullptr); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseIterator = pIImplicitNode->GetInputs(); + + *pIterator = (IBase*)(pBaseIterator); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Iterator", *pIterator); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_addoutput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, const char * pDisplayName, Lib3MF_ImplicitPort * pPort) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "AddOutput"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pPort == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + IBase* pBasePort(nullptr); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBasePort = pIImplicitNode->AddOutput(sIdentifier, sDisplayName); + + *pPort = (IBase*)(pBasePort); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Port", *pPort); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_getoutputs(Lib3MF_ImplicitNode pImplicitNode, Lib3MF_ImplicitPortIterator * pIterator) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "GetOutputs"); + } + if (pIterator == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseIterator(nullptr); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseIterator = pIImplicitNode->GetOutputs(); + + *pIterator = (IBase*)(pBaseIterator); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Iterator", *pIterator); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_findinput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pInput) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "FindInput"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pInput == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + IBase* pBaseInput(nullptr); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseInput = pIImplicitNode->FindInput(sIdentifier); + + *pInput = (IBase*)(pBaseInput); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Input", *pInput); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_findoutput(Lib3MF_ImplicitNode pImplicitNode, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "FindOutput"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pOutput == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + IBase* pBaseOutput(nullptr); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseOutput = pIImplicitNode->FindOutput(sIdentifier); + + *pOutput = (IBase*)(pBaseOutput); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Output", *pOutput); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_implicitnode_aretypesvalid(Lib3MF_ImplicitNode pImplicitNode, bool * pValid) +{ + IBase* pIBaseClass = (IBase *)pImplicitNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitNode, "ImplicitNode", "AreTypesValid"); + } + if (pValid == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IImplicitNode* pIImplicitNode = dynamic_cast(pIBaseClass); + if (!pIImplicitNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pValid = pIImplicitNode->AreTypesValid(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addBooleanResult("Valid", *pValid); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for OneInputNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_oneinputnode_getinputa(Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pInput) +{ + IBase* pIBaseClass = (IBase *)pOneInputNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pOneInputNode, "OneInputNode", "GetInputA"); + } + if (pInput == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseInput(nullptr); + IOneInputNode* pIOneInputNode = dynamic_cast(pIBaseClass); + if (!pIOneInputNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseInput = pIOneInputNode->GetInputA(); + + *pInput = (IBase*)(pBaseInput); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Input", *pInput); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_oneinputnode_getoutputresult(Lib3MF_OneInputNode pOneInputNode, Lib3MF_ImplicitPort * pResult) +{ + IBase* pIBaseClass = (IBase *)pOneInputNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pOneInputNode, "OneInputNode", "GetOutputResult"); + } + if (pResult == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResult(nullptr); + IOneInputNode* pIOneInputNode = dynamic_cast(pIBaseClass); + if (!pIOneInputNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResult = pIOneInputNode->GetOutputResult(); + + *pResult = (IBase*)(pBaseResult); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Result", *pResult); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for SinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for CosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for TanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for ArcSinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for ArcCosNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for ArcTanNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for SinhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for CoshNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for TanhNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for RoundNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for CeilNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for FloorNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for SignNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for FractNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for AbsNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for ExpNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for LogNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for Log2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for Log10Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for LengthNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for TransposeNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for InverseNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for SqrtNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for ResourceIdNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_resourceidnode_setresource(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource pResource) +{ + IBase* pIBaseClass = (IBase *)pResourceIdNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pResourceIdNode, "ResourceIdNode", "SetResource"); + pJournalEntry->addHandleParameter("Resource", pResource); + } + IBase* pIBaseClassResource = (IBase *)pResource; + IResource* pIResource = dynamic_cast(pIBaseClassResource); + if (!pIResource) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IResourceIdNode* pIResourceIdNode = dynamic_cast(pIBaseClass); + if (!pIResourceIdNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIResourceIdNode->SetResource(pIResource); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_resourceidnode_getresource(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_Resource * pResource) +{ + IBase* pIBaseClass = (IBase *)pResourceIdNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pResourceIdNode, "ResourceIdNode", "GetResource"); + } + if (pResource == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResource(nullptr); + IResourceIdNode* pIResourceIdNode = dynamic_cast(pIBaseClass); + if (!pIResourceIdNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResource = pIResourceIdNode->GetResource(); + + *pResource = (IBase*)(pBaseResource); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Resource", *pResource); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_resourceidnode_getoutputvalue(Lib3MF_ResourceIdNode pResourceIdNode, Lib3MF_ImplicitPort * pValue) +{ + IBase* pIBaseClass = (IBase *)pResourceIdNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pResourceIdNode, "ResourceIdNode", "GetOutputValue"); + } + if (pValue == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseValue(nullptr); + IResourceIdNode* pIResourceIdNode = dynamic_cast(pIBaseClass); + if (!pIResourceIdNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseValue = pIResourceIdNode->GetOutputValue(); + + *pValue = (IBase*)(pBaseValue); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Value", *pValue); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for TwoInputNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_twoinputnode_getinputb(Lib3MF_TwoInputNode pTwoInputNode, Lib3MF_ImplicitPort * pB) +{ + IBase* pIBaseClass = (IBase *)pTwoInputNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pTwoInputNode, "TwoInputNode", "GetInputB"); + } + if (pB == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseB(nullptr); + ITwoInputNode* pITwoInputNode = dynamic_cast(pIBaseClass); + if (!pITwoInputNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseB = pITwoInputNode->GetInputB(); + + *pB = (IBase*)(pBaseB); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("B", *pB); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for AdditionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for SubtractionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for MultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for DivisionNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for DotNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for CrossNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for ArcTan2Node +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for MatVecMultiplicationNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for MinNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for MaxNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for FmodNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for ModNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for PowNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for SelectNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_selectnode_getinputb(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pB) +{ + IBase* pIBaseClass = (IBase *)pSelectNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pSelectNode, "SelectNode", "GetInputB"); + } + if (pB == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseB(nullptr); + ISelectNode* pISelectNode = dynamic_cast(pIBaseClass); + if (!pISelectNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseB = pISelectNode->GetInputB(); + + *pB = (IBase*)(pBaseB); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("B", *pB); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_selectnode_getinputc(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pC) +{ + IBase* pIBaseClass = (IBase *)pSelectNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pSelectNode, "SelectNode", "GetInputC"); + } + if (pC == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseC(nullptr); + ISelectNode* pISelectNode = dynamic_cast(pIBaseClass); + if (!pISelectNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseC = pISelectNode->GetInputC(); + + *pC = (IBase*)(pBaseC); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("C", *pC); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_selectnode_getinputd(Lib3MF_SelectNode pSelectNode, Lib3MF_ImplicitPort * pD) +{ + IBase* pIBaseClass = (IBase *)pSelectNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pSelectNode, "SelectNode", "GetInputD"); + } + if (pD == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseD(nullptr); + ISelectNode* pISelectNode = dynamic_cast(pIBaseClass); + if (!pISelectNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseD = pISelectNode->GetInputD(); + + *pD = (IBase*)(pBaseD); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("D", *pD); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ClampNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_clampnode_getinputmin(Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMin) +{ + IBase* pIBaseClass = (IBase *)pClampNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pClampNode, "ClampNode", "GetInputMin"); + } + if (pMin == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseMin(nullptr); + IClampNode* pIClampNode = dynamic_cast(pIBaseClass); + if (!pIClampNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseMin = pIClampNode->GetInputMin(); + + *pMin = (IBase*)(pBaseMin); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Min", *pMin); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_clampnode_getinputmax(Lib3MF_ClampNode pClampNode, Lib3MF_ImplicitPort * pMax) +{ + IBase* pIBaseClass = (IBase *)pClampNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pClampNode, "ClampNode", "GetInputMax"); + } + if (pMax == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseMax(nullptr); + IClampNode* pIClampNode = dynamic_cast(pIBaseClass); + if (!pIClampNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseMax = pIClampNode->GetInputMax(); + + *pMax = (IBase*)(pBaseMax); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Max", *pMax); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ComposeVectorNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_composevectornode_getinputx(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pX) +{ + IBase* pIBaseClass = (IBase *)pComposeVectorNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeVectorNode, "ComposeVectorNode", "GetInputX"); + } + if (pX == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseX(nullptr); + IComposeVectorNode* pIComposeVectorNode = dynamic_cast(pIBaseClass); + if (!pIComposeVectorNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseX = pIComposeVectorNode->GetInputX(); + + *pX = (IBase*)(pBaseX); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("X", *pX); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composevectornode_getinputy(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pY) +{ + IBase* pIBaseClass = (IBase *)pComposeVectorNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeVectorNode, "ComposeVectorNode", "GetInputY"); + } + if (pY == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseY(nullptr); + IComposeVectorNode* pIComposeVectorNode = dynamic_cast(pIBaseClass); + if (!pIComposeVectorNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseY = pIComposeVectorNode->GetInputY(); + + *pY = (IBase*)(pBaseY); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Y", *pY); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composevectornode_getinputz(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pZ) +{ + IBase* pIBaseClass = (IBase *)pComposeVectorNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeVectorNode, "ComposeVectorNode", "GetInputZ"); + } + if (pZ == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseZ(nullptr); + IComposeVectorNode* pIComposeVectorNode = dynamic_cast(pIBaseClass); + if (!pIComposeVectorNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseZ = pIComposeVectorNode->GetInputZ(); + + *pZ = (IBase*)(pBaseZ); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Z", *pZ); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composevectornode_getoutputresult(Lib3MF_ComposeVectorNode pComposeVectorNode, Lib3MF_ImplicitPort * pResult) +{ + IBase* pIBaseClass = (IBase *)pComposeVectorNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeVectorNode, "ComposeVectorNode", "GetOutputResult"); + } + if (pResult == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResult(nullptr); + IComposeVectorNode* pIComposeVectorNode = dynamic_cast(pIBaseClass); + if (!pIComposeVectorNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResult = pIComposeVectorNode->GetOutputResult(); + + *pResult = (IBase*)(pBaseResult); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Result", *pResult); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for VectorFromScalarNode +**************************************************************************************************************************/ + +/************************************************************************************************************************* + Class implementation for DecomposeVectorNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_decomposevectornode_getinputa(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pA) +{ + IBase* pIBaseClass = (IBase *)pDecomposeVectorNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pDecomposeVectorNode, "DecomposeVectorNode", "GetInputA"); + } + if (pA == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseA(nullptr); + IDecomposeVectorNode* pIDecomposeVectorNode = dynamic_cast(pIBaseClass); + if (!pIDecomposeVectorNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseA = pIDecomposeVectorNode->GetInputA(); + + *pA = (IBase*)(pBaseA); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("A", *pA); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_decomposevectornode_getoutputx(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pX) +{ + IBase* pIBaseClass = (IBase *)pDecomposeVectorNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pDecomposeVectorNode, "DecomposeVectorNode", "GetOutputX"); + } + if (pX == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseX(nullptr); + IDecomposeVectorNode* pIDecomposeVectorNode = dynamic_cast(pIBaseClass); + if (!pIDecomposeVectorNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseX = pIDecomposeVectorNode->GetOutputX(); + + *pX = (IBase*)(pBaseX); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("X", *pX); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_decomposevectornode_getoutputy(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pY) +{ + IBase* pIBaseClass = (IBase *)pDecomposeVectorNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pDecomposeVectorNode, "DecomposeVectorNode", "GetOutputY"); + } + if (pY == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseY(nullptr); + IDecomposeVectorNode* pIDecomposeVectorNode = dynamic_cast(pIBaseClass); + if (!pIDecomposeVectorNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseY = pIDecomposeVectorNode->GetOutputY(); + + *pY = (IBase*)(pBaseY); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Y", *pY); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_decomposevectornode_getoutputz(Lib3MF_DecomposeVectorNode pDecomposeVectorNode, Lib3MF_ImplicitPort * pZ) +{ + IBase* pIBaseClass = (IBase *)pDecomposeVectorNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pDecomposeVectorNode, "DecomposeVectorNode", "GetOutputZ"); + } + if (pZ == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseZ(nullptr); + IDecomposeVectorNode* pIDecomposeVectorNode = dynamic_cast(pIBaseClass); + if (!pIDecomposeVectorNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseZ = pIDecomposeVectorNode->GetOutputZ(); + + *pZ = (IBase*)(pBaseZ); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Z", *pZ); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ComposeMatrixNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_composematrixnode_getinputm00(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM00) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM00"); + } + if (pM00 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM00(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM00 = pIComposeMatrixNode->GetInputM00(); + + *pM00 = (IBase*)(pBaseM00); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M00", *pM00); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm01(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM01) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM01"); + } + if (pM01 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM01(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM01 = pIComposeMatrixNode->GetInputM01(); + + *pM01 = (IBase*)(pBaseM01); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M01", *pM01); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm02(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM02) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM02"); + } + if (pM02 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM02(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM02 = pIComposeMatrixNode->GetInputM02(); + + *pM02 = (IBase*)(pBaseM02); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M02", *pM02); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm03(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM03) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM03"); + } + if (pM03 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM03(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM03 = pIComposeMatrixNode->GetInputM03(); + + *pM03 = (IBase*)(pBaseM03); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M03", *pM03); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm10(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM10) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM10"); + } + if (pM10 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM10(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM10 = pIComposeMatrixNode->GetInputM10(); + + *pM10 = (IBase*)(pBaseM10); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M10", *pM10); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm11(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM11) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM11"); + } + if (pM11 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM11(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM11 = pIComposeMatrixNode->GetInputM11(); + + *pM11 = (IBase*)(pBaseM11); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M11", *pM11); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm12(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM12) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM12"); + } + if (pM12 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM12(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM12 = pIComposeMatrixNode->GetInputM12(); + + *pM12 = (IBase*)(pBaseM12); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M12", *pM12); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm13(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM13) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM13"); + } + if (pM13 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM13(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM13 = pIComposeMatrixNode->GetInputM13(); + + *pM13 = (IBase*)(pBaseM13); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M13", *pM13); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm20(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM20) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM20"); + } + if (pM20 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM20(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM20 = pIComposeMatrixNode->GetInputM20(); + + *pM20 = (IBase*)(pBaseM20); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M20", *pM20); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm21(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM21) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM21"); + } + if (pM21 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM21(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM21 = pIComposeMatrixNode->GetInputM21(); + + *pM21 = (IBase*)(pBaseM21); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M21", *pM21); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm22(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM22) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM22"); + } + if (pM22 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM22(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM22 = pIComposeMatrixNode->GetInputM22(); + + *pM22 = (IBase*)(pBaseM22); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M22", *pM22); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm23(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM23) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM23"); + } + if (pM23 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM23(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM23 = pIComposeMatrixNode->GetInputM23(); + + *pM23 = (IBase*)(pBaseM23); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M23", *pM23); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm30(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM30) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM30"); + } + if (pM30 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM30(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM30 = pIComposeMatrixNode->GetInputM30(); + + *pM30 = (IBase*)(pBaseM30); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M30", *pM30); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm31(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM31) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM31"); + } + if (pM31 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM31(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM31 = pIComposeMatrixNode->GetInputM31(); + + *pM31 = (IBase*)(pBaseM31); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M31", *pM31); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm32(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM32) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM32"); + } + if (pM32 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM32(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM32 = pIComposeMatrixNode->GetInputM32(); + + *pM32 = (IBase*)(pBaseM32); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M32", *pM32); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getinputm33(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pM33) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetInputM33"); + } + if (pM33 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseM33(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseM33 = pIComposeMatrixNode->GetInputM33(); + + *pM33 = (IBase*)(pBaseM33); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("M33", *pM33); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_composematrixnode_getoutputresult(Lib3MF_ComposeMatrixNode pComposeMatrixNode, Lib3MF_ImplicitPort * pResult) +{ + IBase* pIBaseClass = (IBase *)pComposeMatrixNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pComposeMatrixNode, "ComposeMatrixNode", "GetOutputResult"); + } + if (pResult == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResult(nullptr); + IComposeMatrixNode* pIComposeMatrixNode = dynamic_cast(pIBaseClass); + if (!pIComposeMatrixNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResult = pIComposeMatrixNode->GetOutputResult(); + + *pResult = (IBase*)(pBaseResult); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Result", *pResult); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for MatrixFromRowsNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_matrixfromrowsnode_getinputa(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow0) +{ + IBase* pIBaseClass = (IBase *)pMatrixFromRowsNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMatrixFromRowsNode, "MatrixFromRowsNode", "GetInputA"); + } + if (pRow0 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseRow0(nullptr); + IMatrixFromRowsNode* pIMatrixFromRowsNode = dynamic_cast(pIBaseClass); + if (!pIMatrixFromRowsNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseRow0 = pIMatrixFromRowsNode->GetInputA(); + + *pRow0 = (IBase*)(pBaseRow0); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Row0", *pRow0); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_matrixfromrowsnode_getinputb(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow1) +{ + IBase* pIBaseClass = (IBase *)pMatrixFromRowsNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMatrixFromRowsNode, "MatrixFromRowsNode", "GetInputB"); + } + if (pRow1 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseRow1(nullptr); + IMatrixFromRowsNode* pIMatrixFromRowsNode = dynamic_cast(pIBaseClass); + if (!pIMatrixFromRowsNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseRow1 = pIMatrixFromRowsNode->GetInputB(); + + *pRow1 = (IBase*)(pBaseRow1); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Row1", *pRow1); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_matrixfromrowsnode_getinputc(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow2) +{ + IBase* pIBaseClass = (IBase *)pMatrixFromRowsNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMatrixFromRowsNode, "MatrixFromRowsNode", "GetInputC"); + } + if (pRow2 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseRow2(nullptr); + IMatrixFromRowsNode* pIMatrixFromRowsNode = dynamic_cast(pIBaseClass); + if (!pIMatrixFromRowsNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseRow2 = pIMatrixFromRowsNode->GetInputC(); + + *pRow2 = (IBase*)(pBaseRow2); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Row2", *pRow2); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_matrixfromrowsnode_getinputd(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pRow3) +{ + IBase* pIBaseClass = (IBase *)pMatrixFromRowsNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMatrixFromRowsNode, "MatrixFromRowsNode", "GetInputD"); + } + if (pRow3 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseRow3(nullptr); + IMatrixFromRowsNode* pIMatrixFromRowsNode = dynamic_cast(pIBaseClass); + if (!pIMatrixFromRowsNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseRow3 = pIMatrixFromRowsNode->GetInputD(); + + *pRow3 = (IBase*)(pBaseRow3); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Row3", *pRow3); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_matrixfromrowsnode_getoutputresult(Lib3MF_MatrixFromRowsNode pMatrixFromRowsNode, Lib3MF_ImplicitPort * pResult) +{ + IBase* pIBaseClass = (IBase *)pMatrixFromRowsNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMatrixFromRowsNode, "MatrixFromRowsNode", "GetOutputResult"); + } + if (pResult == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResult(nullptr); + IMatrixFromRowsNode* pIMatrixFromRowsNode = dynamic_cast(pIBaseClass); + if (!pIMatrixFromRowsNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResult = pIMatrixFromRowsNode->GetOutputResult(); + + *pResult = (IBase*)(pBaseResult); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Result", *pResult); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for MatrixFromColumnsNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputa(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn0) +{ + IBase* pIBaseClass = (IBase *)pMatrixFromColumnsNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMatrixFromColumnsNode, "MatrixFromColumnsNode", "GetInputA"); + } + if (pColumn0 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseColumn0(nullptr); + IMatrixFromColumnsNode* pIMatrixFromColumnsNode = dynamic_cast(pIBaseClass); + if (!pIMatrixFromColumnsNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseColumn0 = pIMatrixFromColumnsNode->GetInputA(); + + *pColumn0 = (IBase*)(pBaseColumn0); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Column0", *pColumn0); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputb(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn1) +{ + IBase* pIBaseClass = (IBase *)pMatrixFromColumnsNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMatrixFromColumnsNode, "MatrixFromColumnsNode", "GetInputB"); + } + if (pColumn1 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseColumn1(nullptr); + IMatrixFromColumnsNode* pIMatrixFromColumnsNode = dynamic_cast(pIBaseClass); + if (!pIMatrixFromColumnsNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseColumn1 = pIMatrixFromColumnsNode->GetInputB(); + + *pColumn1 = (IBase*)(pBaseColumn1); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Column1", *pColumn1); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputc(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn2) +{ + IBase* pIBaseClass = (IBase *)pMatrixFromColumnsNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMatrixFromColumnsNode, "MatrixFromColumnsNode", "GetInputC"); + } + if (pColumn2 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseColumn2(nullptr); + IMatrixFromColumnsNode* pIMatrixFromColumnsNode = dynamic_cast(pIBaseClass); + if (!pIMatrixFromColumnsNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseColumn2 = pIMatrixFromColumnsNode->GetInputC(); + + *pColumn2 = (IBase*)(pBaseColumn2); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Column2", *pColumn2); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_matrixfromcolumnsnode_getinputd(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pColumn3) +{ + IBase* pIBaseClass = (IBase *)pMatrixFromColumnsNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMatrixFromColumnsNode, "MatrixFromColumnsNode", "GetInputD"); + } + if (pColumn3 == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseColumn3(nullptr); + IMatrixFromColumnsNode* pIMatrixFromColumnsNode = dynamic_cast(pIBaseClass); + if (!pIMatrixFromColumnsNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseColumn3 = pIMatrixFromColumnsNode->GetInputD(); + + *pColumn3 = (IBase*)(pBaseColumn3); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Column3", *pColumn3); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_matrixfromcolumnsnode_getoutputresult(Lib3MF_MatrixFromColumnsNode pMatrixFromColumnsNode, Lib3MF_ImplicitPort * pResult) +{ + IBase* pIBaseClass = (IBase *)pMatrixFromColumnsNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMatrixFromColumnsNode, "MatrixFromColumnsNode", "GetOutputResult"); + } + if (pResult == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResult(nullptr); + IMatrixFromColumnsNode* pIMatrixFromColumnsNode = dynamic_cast(pIBaseClass); + if (!pIMatrixFromColumnsNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResult = pIMatrixFromColumnsNode->GetOutputResult(); + + *pResult = (IBase*)(pBaseResult); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Result", *pResult); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ConstantNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_constantnode_setconstant(Lib3MF_ConstantNode pConstantNode, Lib3MF_double dValue) +{ + IBase* pIBaseClass = (IBase *)pConstantNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pConstantNode, "ConstantNode", "SetConstant"); + pJournalEntry->addDoubleParameter("Value", dValue); + } + IConstantNode* pIConstantNode = dynamic_cast(pIBaseClass); + if (!pIConstantNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIConstantNode->SetConstant(dValue); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_constantnode_getconstant(Lib3MF_ConstantNode pConstantNode, Lib3MF_double * pValue) +{ + IBase* pIBaseClass = (IBase *)pConstantNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pConstantNode, "ConstantNode", "GetConstant"); + } + if (pValue == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IConstantNode* pIConstantNode = dynamic_cast(pIBaseClass); + if (!pIConstantNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pValue = pIConstantNode->GetConstant(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addDoubleResult("Value", *pValue); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_constantnode_getoutputvalue(Lib3MF_ConstantNode pConstantNode, Lib3MF_ImplicitPort * pValue) +{ + IBase* pIBaseClass = (IBase *)pConstantNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pConstantNode, "ConstantNode", "GetOutputValue"); + } + if (pValue == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseValue(nullptr); + IConstantNode* pIConstantNode = dynamic_cast(pIBaseClass); + if (!pIConstantNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseValue = pIConstantNode->GetOutputValue(); + + *pValue = (IBase*)(pBaseValue); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Value", *pValue); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ConstVecNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_constvecnode_setvector(Lib3MF_ConstVecNode pConstVecNode, const sLib3MFVector * pValue) +{ + IBase* pIBaseClass = (IBase *)pConstVecNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pConstVecNode, "ConstVecNode", "SetVector"); + } + IConstVecNode* pIConstVecNode = dynamic_cast(pIBaseClass); + if (!pIConstVecNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIConstVecNode->SetVector(*pValue); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_constvecnode_getvector(Lib3MF_ConstVecNode pConstVecNode, sLib3MFVector * pValue) +{ + IBase* pIBaseClass = (IBase *)pConstVecNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pConstVecNode, "ConstVecNode", "GetVector"); + } + if (pValue == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IConstVecNode* pIConstVecNode = dynamic_cast(pIBaseClass); + if (!pIConstVecNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pValue = pIConstVecNode->GetVector(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_constvecnode_getoutputvector(Lib3MF_ConstVecNode pConstVecNode, Lib3MF_ImplicitPort * pVector) +{ + IBase* pIBaseClass = (IBase *)pConstVecNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pConstVecNode, "ConstVecNode", "GetOutputVector"); + } + if (pVector == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseVector(nullptr); + IConstVecNode* pIConstVecNode = dynamic_cast(pIBaseClass); + if (!pIConstVecNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseVector = pIConstVecNode->GetOutputVector(); + + *pVector = (IBase*)(pBaseVector); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Vector", *pVector); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for ConstMatNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_constmatnode_setmatrix(Lib3MF_ConstMatNode pConstMatNode, const sLib3MFMatrix4x4 * pValue) +{ + IBase* pIBaseClass = (IBase *)pConstMatNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pConstMatNode, "ConstMatNode", "SetMatrix"); + } + IConstMatNode* pIConstMatNode = dynamic_cast(pIBaseClass); + if (!pIConstMatNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIConstMatNode->SetMatrix(*pValue); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_constmatnode_getmatrix(Lib3MF_ConstMatNode pConstMatNode, sLib3MFMatrix4x4 * pValue) +{ + IBase* pIBaseClass = (IBase *)pConstMatNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pConstMatNode, "ConstMatNode", "GetMatrix"); + } + if (pValue == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IConstMatNode* pIConstMatNode = dynamic_cast(pIBaseClass); + if (!pIConstMatNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + *pValue = pIConstMatNode->GetMatrix(); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_constmatnode_getoutputmatrix(Lib3MF_ConstMatNode pConstMatNode, Lib3MF_ImplicitPort * pMatrix) +{ + IBase* pIBaseClass = (IBase *)pConstMatNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pConstMatNode, "ConstMatNode", "GetOutputMatrix"); + } + if (pMatrix == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseMatrix(nullptr); + IConstMatNode* pIConstMatNode = dynamic_cast(pIBaseClass); + if (!pIConstMatNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseMatrix = pIConstMatNode->GetOutputMatrix(); + + *pMatrix = (IBase*)(pBaseMatrix); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Matrix", *pMatrix); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for MeshNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_meshnode_getinputmesh(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pMesh) +{ + IBase* pIBaseClass = (IBase *)pMeshNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMeshNode, "MeshNode", "GetInputMesh"); + } + if (pMesh == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseMesh(nullptr); + IMeshNode* pIMeshNode = dynamic_cast(pIBaseClass); + if (!pIMeshNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseMesh = pIMeshNode->GetInputMesh(); + + *pMesh = (IBase*)(pBaseMesh); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Mesh", *pMesh); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_meshnode_getinputpos(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pPos) +{ + IBase* pIBaseClass = (IBase *)pMeshNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMeshNode, "MeshNode", "GetInputPos"); + } + if (pPos == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBasePos(nullptr); + IMeshNode* pIMeshNode = dynamic_cast(pIBaseClass); + if (!pIMeshNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBasePos = pIMeshNode->GetInputPos(); + + *pPos = (IBase*)(pBasePos); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Pos", *pPos); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_meshnode_getoutputdistance(Lib3MF_MeshNode pMeshNode, Lib3MF_ImplicitPort * pDistance) +{ + IBase* pIBaseClass = (IBase *)pMeshNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pMeshNode, "MeshNode", "GetOutputDistance"); + } + if (pDistance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseDistance(nullptr); + IMeshNode* pIMeshNode = dynamic_cast(pIBaseClass); + if (!pIMeshNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseDistance = pIMeshNode->GetOutputDistance(); + + *pDistance = (IBase*)(pBaseDistance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Distance", *pDistance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for UnsignedMeshNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_unsignedmeshnode_getinputmesh(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pMesh) +{ + IBase* pIBaseClass = (IBase *)pUnsignedMeshNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pUnsignedMeshNode, "UnsignedMeshNode", "GetInputMesh"); + } + if (pMesh == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseMesh(nullptr); + IUnsignedMeshNode* pIUnsignedMeshNode = dynamic_cast(pIBaseClass); + if (!pIUnsignedMeshNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseMesh = pIUnsignedMeshNode->GetInputMesh(); + + *pMesh = (IBase*)(pBaseMesh); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Mesh", *pMesh); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_unsignedmeshnode_getinputpos(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pPos) +{ + IBase* pIBaseClass = (IBase *)pUnsignedMeshNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pUnsignedMeshNode, "UnsignedMeshNode", "GetInputPos"); + } + if (pPos == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBasePos(nullptr); + IUnsignedMeshNode* pIUnsignedMeshNode = dynamic_cast(pIBaseClass); + if (!pIUnsignedMeshNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBasePos = pIUnsignedMeshNode->GetInputPos(); + + *pPos = (IBase*)(pBasePos); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Pos", *pPos); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_unsignedmeshnode_getoutputdistance(Lib3MF_UnsignedMeshNode pUnsignedMeshNode, Lib3MF_ImplicitPort * pDistance) +{ + IBase* pIBaseClass = (IBase *)pUnsignedMeshNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pUnsignedMeshNode, "UnsignedMeshNode", "GetOutputDistance"); + } + if (pDistance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseDistance(nullptr); + IUnsignedMeshNode* pIUnsignedMeshNode = dynamic_cast(pIBaseClass); + if (!pIUnsignedMeshNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseDistance = pIUnsignedMeshNode->GetOutputDistance(); + + *pDistance = (IBase*)(pBaseDistance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Distance", *pDistance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for FunctionCallNode +**************************************************************************************************************************/ +Lib3MFResult lib3mf_functioncallnode_getinputfunctionid(Lib3MF_FunctionCallNode pFunctionCallNode, Lib3MF_ImplicitPort * pFunction) +{ + IBase* pIBaseClass = (IBase *)pFunctionCallNode; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionCallNode, "FunctionCallNode", "GetInputFunctionID"); + } + if (pFunction == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseFunction(nullptr); + IFunctionCallNode* pIFunctionCallNode = dynamic_cast(pIBaseClass); + if (!pIFunctionCallNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseFunction = pIFunctionCallNode->GetInputFunctionID(); + + *pFunction = (IBase*)(pBaseFunction); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Function", *pFunction); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for NodeIterator +**************************************************************************************************************************/ +Lib3MFResult lib3mf_nodeiterator_getcurrent(Lib3MF_NodeIterator pNodeIterator, Lib3MF_ImplicitNode * pNode) +{ + IBase* pIBaseClass = (IBase *)pNodeIterator; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pNodeIterator, "NodeIterator", "GetCurrent"); + } + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseNode(nullptr); + INodeIterator* pINodeIterator = dynamic_cast(pIBaseClass); + if (!pINodeIterator) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseNode = pINodeIterator->GetCurrent(); + + *pNode = (IBase*)(pBaseNode); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + + +/************************************************************************************************************************* + Class implementation for Function +**************************************************************************************************************************/ +Lib3MFResult lib3mf_function_getdisplayname(Lib3MF_Function pFunction, const Lib3MF_uint32 nDisplayNameBufferSize, Lib3MF_uint32* pDisplayNameNeededChars, char * pDisplayNameBuffer) +{ + IBase* pIBaseClass = (IBase *)pFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunction, "Function", "GetDisplayName"); + } + if ( (!pDisplayNameBuffer) && !(pDisplayNameNeededChars) ) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sDisplayName(""); + IFunction* pIFunction = dynamic_cast(pIBaseClass); + if (!pIFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + bool isCacheCall = (pDisplayNameBuffer == nullptr); + if (isCacheCall) { + sDisplayName = pIFunction->GetDisplayName(); + + pIFunction->_setCache (new ParameterCache_1 (sDisplayName)); + } + else { + auto cache = dynamic_cast*> (pIFunction->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sDisplayName); + pIFunction->_setCache (nullptr); + } + + if (pDisplayNameNeededChars) + *pDisplayNameNeededChars = (Lib3MF_uint32) (sDisplayName.size()+1); + if (pDisplayNameBuffer) { + if (sDisplayName.size() >= nDisplayNameBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iDisplayName = 0; iDisplayName < sDisplayName.size(); iDisplayName++) + pDisplayNameBuffer[iDisplayName] = sDisplayName[iDisplayName]; + pDisplayNameBuffer[sDisplayName.size()] = 0; + } + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addStringResult("DisplayName", sDisplayName.c_str()); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_function_setdisplayname(Lib3MF_Function pFunction, const char * pDisplayName) +{ + IBase* pIBaseClass = (IBase *)pFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunction, "Function", "SetDisplayName"); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + } + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sDisplayName(pDisplayName); + IFunction* pIFunction = dynamic_cast(pIBaseClass); + if (!pIFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIFunction->SetDisplayName(sDisplayName); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_function_addinput(Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort) +{ + IBase* pIBaseClass = (IBase *)pFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunction, "Function", "AddInput"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addEnumParameter("Type", "ImplicitPortType", (Lib3MF_int32)(eType)); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pPort == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + IBase* pBasePort(nullptr); + IFunction* pIFunction = dynamic_cast(pIBaseClass); + if (!pIFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBasePort = pIFunction->AddInput(sIdentifier, sDisplayName, eType); + + *pPort = (IBase*)(pBasePort); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Port", *pPort); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_function_getinputs(Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator) +{ + IBase* pIBaseClass = (IBase *)pFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunction, "Function", "GetInputs"); + } + if (pIterator == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseIterator(nullptr); + IFunction* pIFunction = dynamic_cast(pIBaseClass); + if (!pIFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseIterator = pIFunction->GetInputs(); + + *pIterator = (IBase*)(pBaseIterator); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Iterator", *pIterator); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_function_removeinput(Lib3MF_Function pFunction, Lib3MF_ImplicitPort pInput) +{ + IBase* pIBaseClass = (IBase *)pFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunction, "Function", "RemoveInput"); + pJournalEntry->addHandleParameter("Input", pInput); + } + IBase* pIBaseClassInput = (IBase *)pInput; + IImplicitPort* pIInput = dynamic_cast(pIBaseClassInput); + if (!pIInput) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IFunction* pIFunction = dynamic_cast(pIBaseClass); + if (!pIFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIFunction->RemoveInput(pIInput); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_function_addoutput(Lib3MF_Function pFunction, const char * pIdentifier, const char * pDisplayName, eLib3MFImplicitPortType eType, Lib3MF_ImplicitPort * pPort) +{ + IBase* pIBaseClass = (IBase *)pFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunction, "Function", "AddOutput"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addEnumParameter("Type", "ImplicitPortType", (Lib3MF_int32)(eType)); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pPort == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + IBase* pBasePort(nullptr); + IFunction* pIFunction = dynamic_cast(pIBaseClass); + if (!pIFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBasePort = pIFunction->AddOutput(sIdentifier, sDisplayName, eType); + + *pPort = (IBase*)(pBasePort); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Port", *pPort); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_function_getoutputs(Lib3MF_Function pFunction, Lib3MF_ImplicitPortIterator * pIterator) +{ + IBase* pIBaseClass = (IBase *)pFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunction, "Function", "GetOutputs"); + } + if (pIterator == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseIterator(nullptr); + IFunction* pIFunction = dynamic_cast(pIBaseClass); + if (!pIFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseIterator = pIFunction->GetOutputs(); + + *pIterator = (IBase*)(pBaseIterator); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Iterator", *pIterator); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_function_removeoutput(Lib3MF_Function pFunction, Lib3MF_ImplicitPort pOutput) +{ + IBase* pIBaseClass = (IBase *)pFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunction, "Function", "RemoveOutput"); + pJournalEntry->addHandleParameter("Output", pOutput); + } + IBase* pIBaseClassOutput = (IBase *)pOutput; + IImplicitPort* pIOutput = dynamic_cast(pIBaseClassOutput); + if (!pIOutput) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IFunction* pIFunction = dynamic_cast(pIBaseClass); + if (!pIFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIFunction->RemoveOutput(pIOutput); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_function_findinput(Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pInput) +{ + IBase* pIBaseClass = (IBase *)pFunction; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunction, "Function", "FindInput"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + } + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pInput == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + IBase* pBaseInput(nullptr); + IFunction* pIFunction = dynamic_cast(pIBaseClass); + if (!pIFunction) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseInput = pIFunction->FindInput(sIdentifier); + + *pInput = (IBase*)(pBaseInput); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Input", *pInput); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_function_findoutput(Lib3MF_Function pFunction, const char * pIdentifier, Lib3MF_ImplicitPort * pOutput) { - IBase* pIBaseClass = (IBase *)pComponent; + IBase* pIBaseClass = (IBase *)pFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pComponent, "Component", "SetTransform"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunction, "Function", "FindOutput"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); } - IComponent* pIComponent = dynamic_cast(pIBaseClass); - if (!pIComponent) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pOutput == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + IBase* pBaseOutput(nullptr); + IFunction* pIFunction = dynamic_cast(pIBaseClass); + if (!pIFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIComponent->SetTransform(*pTransform); + pBaseOutput = pIFunction->FindOutput(sIdentifier); + *pOutput = (IBase*)(pBaseOutput); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Output", *pOutput); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5163,35 +13956,49 @@ Lib3MFResult lib3mf_component_settransform(Lib3MF_Component pComponent, const sL /************************************************************************************************************************* - Class implementation for ComponentsObject + Class implementation for ImplicitFunction **************************************************************************************************************************/ -Lib3MFResult lib3mf_componentsobject_addcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_Object pObjectResource, const sLib3MFTransform * pTransform, Lib3MF_Component * pComponentInstance) +Lib3MFResult lib3mf_implicitfunction_getidentifier(Lib3MF_ImplicitFunction pImplicitFunction, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer) { - IBase* pIBaseClass = (IBase *)pComponentsObject; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pComponentsObject, "ComponentsObject", "AddComponent"); - pJournalEntry->addHandleParameter("ObjectResource", pObjectResource); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "GetIdentifier"); } - if (pComponentInstance == nullptr) + if ( (!pIdentifierBuffer) && !(pIdentifierNeededChars) ) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pIBaseClassObjectResource = (IBase *)pObjectResource; - IObject* pIObjectResource = dynamic_cast(pIBaseClassObjectResource); - if (!pIObjectResource) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); - - IBase* pBaseComponentInstance(nullptr); - IComponentsObject* pIComponentsObject = dynamic_cast(pIBaseClass); - if (!pIComponentsObject) + std::string sIdentifier(""); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBaseComponentInstance = pIComponentsObject->AddComponent(pIObjectResource, *pTransform); + bool isCacheCall = (pIdentifierBuffer == nullptr); + if (isCacheCall) { + sIdentifier = pIImplicitFunction->GetIdentifier(); - *pComponentInstance = (IBase*)(pBaseComponentInstance); + pIImplicitFunction->_setCache (new ParameterCache_1 (sIdentifier)); + } + else { + auto cache = dynamic_cast*> (pIImplicitFunction->_getCache ()); + if (cache == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + cache->retrieveData (sIdentifier); + pIImplicitFunction->_setCache (nullptr); + } + + if (pIdentifierNeededChars) + *pIdentifierNeededChars = (Lib3MF_uint32) (sIdentifier.size()+1); + if (pIdentifierBuffer) { + if (sIdentifier.size() >= nIdentifierBufferSize) + throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); + for (size_t iIdentifier = 0; iIdentifier < sIdentifier.size(); iIdentifier++) + pIdentifierBuffer[iIdentifier] = sIdentifier[iIdentifier]; + pIdentifierBuffer[sIdentifier.size()] = 0; + } if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("ComponentInstance", *pComponentInstance); + pJournalEntry->addStringResult("Identifier", sIdentifier.c_str()); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5207,28 +14014,26 @@ Lib3MFResult lib3mf_componentsobject_addcomponent(Lib3MF_ComponentsObject pCompo } } -Lib3MFResult lib3mf_componentsobject_getcomponent(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 nIndex, Lib3MF_Component * pComponentInstance) +Lib3MFResult lib3mf_implicitfunction_setidentifier(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier) { - IBase* pIBaseClass = (IBase *)pComponentsObject; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pComponentsObject, "ComponentsObject", "GetComponent"); - pJournalEntry->addUInt32Parameter("Index", nIndex); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "SetIdentifier"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); } - if (pComponentInstance == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pBaseComponentInstance(nullptr); - IComponentsObject* pIComponentsObject = dynamic_cast(pIBaseClass); - if (!pIComponentsObject) + std::string sIdentifier(pIdentifier); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBaseComponentInstance = pIComponentsObject->GetComponent(nIndex); + pIImplicitFunction->SetIdentifier(sIdentifier); - *pComponentInstance = (IBase*)(pBaseComponentInstance); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("ComponentInstance", *pComponentInstance); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5244,25 +14049,41 @@ Lib3MFResult lib3mf_componentsobject_getcomponent(Lib3MF_ComponentsObject pCompo } } -Lib3MFResult lib3mf_componentsobject_getcomponentcount(Lib3MF_ComponentsObject pComponentsObject, Lib3MF_uint32 * pCount) +Lib3MFResult lib3mf_implicitfunction_addnode(Lib3MF_ImplicitFunction pImplicitFunction, eLib3MFImplicitNodeType eNodeType, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ImplicitNode * pNode) { - IBase* pIBaseClass = (IBase *)pComponentsObject; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pComponentsObject, "ComponentsObject", "GetComponentCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddNode"); + pJournalEntry->addEnumParameter("NodeType", "ImplicitNodeType", (Lib3MF_int32)(eNodeType)); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pCount == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IComponentsObject* pIComponentsObject = dynamic_cast(pIBaseClass); - if (!pIComponentsObject) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pIComponentsObject->GetComponentCount(); + pBaseNode = pIImplicitFunction->AddNode(eNodeType, sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5278,30 +14099,40 @@ Lib3MFResult lib3mf_componentsobject_getcomponentcount(Lib3MF_ComponentsObject p } } - -/************************************************************************************************************************* - Class implementation for BeamSet -**************************************************************************************************************************/ -Lib3MFResult lib3mf_beamset_setname(Lib3MF_BeamSet pBeamSet, const char * pName) +Lib3MFResult lib3mf_implicitfunction_addsinnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinNode * pNode) { - IBase* pIBaseClass = (IBase *)pBeamSet; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "SetName"); - pJournalEntry->addStringParameter("Name", pName); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddSinNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pName == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sName(pName); - IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); - if (!pIBeamSet) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamSet->SetName(sName); + pBaseNode = pIImplicitFunction->AddSinNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5317,47 +14148,40 @@ Lib3MFResult lib3mf_beamset_setname(Lib3MF_BeamSet pBeamSet, const char * pName) } } -Lib3MFResult lib3mf_beamset_getname(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer) +Lib3MFResult lib3mf_implicitfunction_addcosnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CosNode * pNode) { - IBase* pIBaseClass = (IBase *)pBeamSet; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetName"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddCosNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ( (!pNameBuffer) && !(pNameNeededChars) ) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sName(""); - IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); - if (!pIBeamSet) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - bool isCacheCall = (pNameBuffer == nullptr); - if (isCacheCall) { - sName = pIBeamSet->GetName(); + pBaseNode = pIImplicitFunction->AddCosNode(sIdentifier, eConfiguration, sDisplayName, sTag); - pIBeamSet->_setCache (new ParameterCache_1 (sName)); - } - else { - auto cache = dynamic_cast*> (pIBeamSet->_getCache ()); - if (cache == nullptr) - throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - cache->retrieveData (sName); - pIBeamSet->_setCache (nullptr); - } - - if (pNameNeededChars) - *pNameNeededChars = (Lib3MF_uint32) (sName.size()+1); - if (pNameBuffer) { - if (sName.size() >= nNameBufferSize) - throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); - for (size_t iName = 0; iName < sName.size(); iName++) - pNameBuffer[iName] = sName[iName]; - pNameBuffer[sName.size()] = 0; - } + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addStringResult("Name", sName.c_str()); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5373,26 +14197,40 @@ Lib3MFResult lib3mf_beamset_getname(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 } } -Lib3MFResult lib3mf_beamset_setidentifier(Lib3MF_BeamSet pBeamSet, const char * pIdentifier) +Lib3MFResult lib3mf_implicitfunction_addtannode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanNode * pNode) { - IBase* pIBaseClass = (IBase *)pBeamSet; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "SetIdentifier"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddTanNode"); pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); std::string sIdentifier(pIdentifier); - IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); - if (!pIBeamSet) + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamSet->SetIdentifier(sIdentifier); + pBaseNode = pIImplicitFunction->AddTanNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5408,47 +14246,40 @@ Lib3MFResult lib3mf_beamset_setidentifier(Lib3MF_BeamSet pBeamSet, const char * } } -Lib3MFResult lib3mf_beamset_getidentifier(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint32 nIdentifierBufferSize, Lib3MF_uint32* pIdentifierNeededChars, char * pIdentifierBuffer) +Lib3MFResult lib3mf_implicitfunction_addarcsinnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcSinNode * pNode) { - IBase* pIBaseClass = (IBase *)pBeamSet; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetIdentifier"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddArcSinNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ( (!pIdentifierBuffer) && !(pIdentifierNeededChars) ) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sIdentifier(""); - IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); - if (!pIBeamSet) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - bool isCacheCall = (pIdentifierBuffer == nullptr); - if (isCacheCall) { - sIdentifier = pIBeamSet->GetIdentifier(); + pBaseNode = pIImplicitFunction->AddArcSinNode(sIdentifier, eConfiguration, sDisplayName, sTag); - pIBeamSet->_setCache (new ParameterCache_1 (sIdentifier)); - } - else { - auto cache = dynamic_cast*> (pIBeamSet->_getCache ()); - if (cache == nullptr) - throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - cache->retrieveData (sIdentifier); - pIBeamSet->_setCache (nullptr); - } - - if (pIdentifierNeededChars) - *pIdentifierNeededChars = (Lib3MF_uint32) (sIdentifier.size()+1); - if (pIdentifierBuffer) { - if (sIdentifier.size() >= nIdentifierBufferSize) - throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); - for (size_t iIdentifier = 0; iIdentifier < sIdentifier.size(); iIdentifier++) - pIdentifierBuffer[iIdentifier] = sIdentifier[iIdentifier]; - pIdentifierBuffer[sIdentifier.size()] = 0; - } + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addStringResult("Identifier", sIdentifier.c_str()); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5464,25 +14295,40 @@ Lib3MFResult lib3mf_beamset_getidentifier(Lib3MF_BeamSet pBeamSet, const Lib3MF_ } } -Lib3MFResult lib3mf_beamset_getreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount) +Lib3MFResult lib3mf_implicitfunction_addarccosnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcCosNode * pNode) { - IBase* pIBaseClass = (IBase *)pBeamSet; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetReferenceCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddArcCosNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pCount == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); - if (!pIBeamSet) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pIBeamSet->GetReferenceCount(); + pBaseNode = pIImplicitFunction->AddArcCosNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5498,24 +14344,40 @@ Lib3MFResult lib3mf_beamset_getreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_ui } } -Lib3MFResult lib3mf_beamset_setreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nReferencesBufferSize, const Lib3MF_uint32 * pReferencesBuffer) +Lib3MFResult lib3mf_implicitfunction_addarctan2node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ArcTan2Node * pNode) { - IBase* pIBaseClass = (IBase *)pBeamSet; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "SetReferences"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddArcTan2Node"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ( (!pReferencesBuffer) && (nReferencesBufferSize>0)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); - if (!pIBeamSet) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamSet->SetReferences(nReferencesBufferSize, pReferencesBuffer); + pBaseNode = pIImplicitFunction->AddArcTan2Node(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5531,24 +14393,40 @@ Lib3MFResult lib3mf_beamset_setreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 } } -Lib3MFResult lib3mf_beamset_getreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nReferencesBufferSize, Lib3MF_uint64* pReferencesNeededCount, Lib3MF_uint32 * pReferencesBuffer) +Lib3MFResult lib3mf_implicitfunction_addsinhnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SinhNode * pNode) { - IBase* pIBaseClass = (IBase *)pBeamSet; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetReferences"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddSinhNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ((!pReferencesBuffer) && !(pReferencesNeededCount)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); - if (!pIBeamSet) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamSet->GetReferences(nReferencesBufferSize, pReferencesNeededCount, pReferencesBuffer); + pBaseNode = pIImplicitFunction->AddSinhNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5564,25 +14442,40 @@ Lib3MFResult lib3mf_beamset_getreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_ } } -Lib3MFResult lib3mf_beamset_getballreferencecount(Lib3MF_BeamSet pBeamSet, Lib3MF_uint32 * pCount) +Lib3MFResult lib3mf_implicitfunction_addcoshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CoshNode * pNode) { - IBase* pIBaseClass = (IBase *)pBeamSet; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetBallReferenceCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddCoshNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pCount == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); - if (!pIBeamSet) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pIBeamSet->GetBallReferenceCount(); + pBaseNode = pIImplicitFunction->AddCoshNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5598,24 +14491,40 @@ Lib3MFResult lib3mf_beamset_getballreferencecount(Lib3MF_BeamSet pBeamSet, Lib3M } } -Lib3MFResult lib3mf_beamset_setballreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_uint64 nBallReferencesBufferSize, const Lib3MF_uint32 * pBallReferencesBuffer) +Lib3MFResult lib3mf_implicitfunction_addtanhnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TanhNode * pNode) { - IBase* pIBaseClass = (IBase *)pBeamSet; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "SetBallReferences"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddTanhNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ( (!pBallReferencesBuffer) && (nBallReferencesBufferSize>0)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); - if (!pIBeamSet) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamSet->SetBallReferences(nBallReferencesBufferSize, pBallReferencesBuffer); + pBaseNode = pIImplicitFunction->AddTanhNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5631,24 +14540,40 @@ Lib3MFResult lib3mf_beamset_setballreferences(Lib3MF_BeamSet pBeamSet, Lib3MF_ui } } -Lib3MFResult lib3mf_beamset_getballreferences(Lib3MF_BeamSet pBeamSet, const Lib3MF_uint64 nBallReferencesBufferSize, Lib3MF_uint64* pBallReferencesNeededCount, Lib3MF_uint32 * pBallReferencesBuffer) +Lib3MFResult lib3mf_implicitfunction_addroundnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_RoundNode * pNode) { - IBase* pIBaseClass = (IBase *)pBeamSet; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBeamSet, "BeamSet", "GetBallReferences"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddRoundNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ((!pBallReferencesBuffer) && !(pBallReferencesNeededCount)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBeamSet* pIBeamSet = dynamic_cast(pIBaseClass); - if (!pIBeamSet) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBeamSet->GetBallReferences(nBallReferencesBufferSize, pBallReferencesNeededCount, pBallReferencesBuffer); + pBaseNode = pIImplicitFunction->AddRoundNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5664,29 +14589,40 @@ Lib3MFResult lib3mf_beamset_getballreferences(Lib3MF_BeamSet pBeamSet, const Lib } } - -/************************************************************************************************************************* - Class implementation for BaseMaterialGroup -**************************************************************************************************************************/ -Lib3MFResult lib3mf_basematerialgroup_getcount(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 * pCount) +Lib3MFResult lib3mf_implicitfunction_addceilnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_CeilNode * pNode) { - IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "GetCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddCeilNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pCount == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); - if (!pIBaseMaterialGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pIBaseMaterialGroup->GetCount(); + pBaseNode = pIImplicitFunction->AddCeilNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5702,24 +14638,40 @@ Lib3MFResult lib3mf_basematerialgroup_getcount(Lib3MF_BaseMaterialGroup pBaseMat } } -Lib3MFResult lib3mf_basematerialgroup_getallpropertyids(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult lib3mf_implicitfunction_addfloornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FloorNode * pNode) { - IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "GetAllPropertyIDs"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddFloorNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); - if (!pIBaseMaterialGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBaseMaterialGroup->GetAllPropertyIDs(nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + pBaseNode = pIImplicitFunction->AddFloorNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5735,29 +14687,40 @@ Lib3MFResult lib3mf_basematerialgroup_getallpropertyids(Lib3MF_BaseMaterialGroup } } -Lib3MFResult lib3mf_basematerialgroup_addmaterial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, const char * pName, const sLib3MFColor * pDisplayColor, Lib3MF_uint32 * pPropertyID) +Lib3MFResult lib3mf_implicitfunction_addsignnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SignNode * pNode) { - IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "AddMaterial"); - pJournalEntry->addStringParameter("Name", pName); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddSignNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pName == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - if (pPropertyID == nullptr) + if (pDisplayName == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sName(pName); - IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); - if (!pIBaseMaterialGroup) + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pPropertyID = pIBaseMaterialGroup->AddMaterial(sName, *pDisplayColor); + pBaseNode = pIImplicitFunction->AddSignNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("PropertyID", *pPropertyID); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5773,23 +14736,40 @@ Lib3MFResult lib3mf_basematerialgroup_addmaterial(Lib3MF_BaseMaterialGroup pBase } } -Lib3MFResult lib3mf_basematerialgroup_removematerial(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID) +Lib3MFResult lib3mf_implicitfunction_addfractnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FractNode * pNode) { - IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "RemoveMaterial"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddFractNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); - if (!pIBaseMaterialGroup) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBaseMaterialGroup->RemoveMaterial(nPropertyID); + pBaseNode = pIImplicitFunction->AddFractNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5805,48 +14785,40 @@ Lib3MFResult lib3mf_basematerialgroup_removematerial(Lib3MF_BaseMaterialGroup pB } } -Lib3MFResult lib3mf_basematerialgroup_getname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint32 nNameBufferSize, Lib3MF_uint32* pNameNeededChars, char * pNameBuffer) +Lib3MFResult lib3mf_implicitfunction_addabsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AbsNode * pNode) { - IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "GetName"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddAbsNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ( (!pNameBuffer) && !(pNameNeededChars) ) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sName(""); - IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); - if (!pIBaseMaterialGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - bool isCacheCall = (pNameBuffer == nullptr); - if (isCacheCall) { - sName = pIBaseMaterialGroup->GetName(nPropertyID); + pBaseNode = pIImplicitFunction->AddAbsNode(sIdentifier, eConfiguration, sDisplayName, sTag); - pIBaseMaterialGroup->_setCache (new ParameterCache_1 (sName)); - } - else { - auto cache = dynamic_cast*> (pIBaseMaterialGroup->_getCache ()); - if (cache == nullptr) - throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - cache->retrieveData (sName); - pIBaseMaterialGroup->_setCache (nullptr); - } - - if (pNameNeededChars) - *pNameNeededChars = (Lib3MF_uint32) (sName.size()+1); - if (pNameBuffer) { - if (sName.size() >= nNameBufferSize) - throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); - for (size_t iName = 0; iName < sName.size(); iName++) - pNameBuffer[iName] = sName[iName]; - pNameBuffer[sName.size()] = 0; - } + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addStringResult("Name", sName.c_str()); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5862,27 +14834,40 @@ Lib3MFResult lib3mf_basematerialgroup_getname(Lib3MF_BaseMaterialGroup pBaseMate } } -Lib3MFResult lib3mf_basematerialgroup_setname(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const char * pName) +Lib3MFResult lib3mf_implicitfunction_addexpnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ExpNode * pNode) { - IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "SetName"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); - pJournalEntry->addStringParameter("Name", pName); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddExpNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pName == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sName(pName); - IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); - if (!pIBaseMaterialGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBaseMaterialGroup->SetName(nPropertyID, sName); + pBaseNode = pIImplicitFunction->AddExpNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5898,23 +14883,40 @@ Lib3MFResult lib3mf_basematerialgroup_setname(Lib3MF_BaseMaterialGroup pBaseMate } } -Lib3MFResult lib3mf_basematerialgroup_setdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor) +Lib3MFResult lib3mf_implicitfunction_addlognode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_LogNode * pNode) { - IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "SetDisplayColor"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddLogNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); - if (!pIBaseMaterialGroup) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIBaseMaterialGroup->SetDisplayColor(nPropertyID, *pTheColor); + pBaseNode = pIImplicitFunction->AddLogNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5930,25 +14932,40 @@ Lib3MFResult lib3mf_basematerialgroup_setdisplaycolor(Lib3MF_BaseMaterialGroup p } } -Lib3MFResult lib3mf_basematerialgroup_getdisplaycolor(Lib3MF_BaseMaterialGroup pBaseMaterialGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor) +Lib3MFResult lib3mf_implicitfunction_addlog2node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log2Node * pNode) { - IBase* pIBaseClass = (IBase *)pBaseMaterialGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pBaseMaterialGroup, "BaseMaterialGroup", "GetDisplayColor"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddLog2Node"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pTheColor == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBaseMaterialGroup* pIBaseMaterialGroup = dynamic_cast(pIBaseClass); - if (!pIBaseMaterialGroup) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pTheColor = pIBaseMaterialGroup->GetDisplayColor(nPropertyID); + pBaseNode = pIImplicitFunction->AddLog2Node(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -5964,29 +14981,40 @@ Lib3MFResult lib3mf_basematerialgroup_getdisplaycolor(Lib3MF_BaseMaterialGroup p } } - -/************************************************************************************************************************* - Class implementation for ColorGroup -**************************************************************************************************************************/ -Lib3MFResult lib3mf_colorgroup_getcount(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 * pCount) +Lib3MFResult lib3mf_implicitfunction_addlog10node(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_Log10Node * pNode) { - IBase* pIBaseClass = (IBase *)pColorGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "GetCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddLog10Node"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pCount == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); - if (!pIColorGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pIColorGroup->GetCount(); + pBaseNode = pIImplicitFunction->AddLog10Node(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6002,24 +15030,39 @@ Lib3MFResult lib3mf_colorgroup_getcount(Lib3MF_ColorGroup pColorGroup, Lib3MF_ui } } -Lib3MFResult lib3mf_colorgroup_getallpropertyids(Lib3MF_ColorGroup pColorGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult lib3mf_implicitfunction_addlengthnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_LengthNode * pNode) { - IBase* pIBaseClass = (IBase *)pColorGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "GetAllPropertyIDs"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddLengthNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); - if (!pIColorGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIColorGroup->GetAllPropertyIDs(nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + pBaseNode = pIImplicitFunction->AddLengthNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6035,25 +15078,40 @@ Lib3MFResult lib3mf_colorgroup_getallpropertyids(Lib3MF_ColorGroup pColorGroup, } } -Lib3MFResult lib3mf_colorgroup_addcolor(Lib3MF_ColorGroup pColorGroup, const sLib3MFColor * pTheColor, Lib3MF_uint32 * pPropertyID) +Lib3MFResult lib3mf_implicitfunction_addtransposenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_TransposeNode * pNode) { - IBase* pIBaseClass = (IBase *)pColorGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "AddColor"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddTransposeNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pPropertyID == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); - if (!pIColorGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pPropertyID = pIColorGroup->AddColor(*pTheColor); + pBaseNode = pIImplicitFunction->AddTransposeNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("PropertyID", *pPropertyID); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6069,23 +15127,39 @@ Lib3MFResult lib3mf_colorgroup_addcolor(Lib3MF_ColorGroup pColorGroup, const sLi } } -Lib3MFResult lib3mf_colorgroup_removecolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID) +Lib3MFResult lib3mf_implicitfunction_inversenode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_InverseNode * pNode) { - IBase* pIBaseClass = (IBase *)pColorGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "RemoveColor"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "InverseNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); - if (!pIColorGroup) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIColorGroup->RemoveColor(nPropertyID); + pBaseNode = pIImplicitFunction->InverseNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6101,23 +15175,40 @@ Lib3MFResult lib3mf_colorgroup_removecolor(Lib3MF_ColorGroup pColorGroup, Lib3MF } } -Lib3MFResult lib3mf_colorgroup_setcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, const sLib3MFColor * pTheColor) +Lib3MFResult lib3mf_implicitfunction_addsqrtnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SqrtNode * pNode) { - IBase* pIBaseClass = (IBase *)pColorGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "SetColor"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddSqrtNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); - if (!pIColorGroup) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIColorGroup->SetColor(nPropertyID, *pTheColor); + pBaseNode = pIImplicitFunction->AddSqrtNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6133,25 +15224,39 @@ Lib3MFResult lib3mf_colorgroup_setcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_ui } } -Lib3MFResult lib3mf_colorgroup_getcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_uint32 nPropertyID, sLib3MFColor * pTheColor) +Lib3MFResult lib3mf_implicitfunction_addresourceidnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ResourceIdNode * pNode) { - IBase* pIBaseClass = (IBase *)pColorGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pColorGroup, "ColorGroup", "GetColor"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddResourceIdNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pTheColor == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IColorGroup* pIColorGroup = dynamic_cast(pIBaseClass); - if (!pIColorGroup) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pTheColor = pIColorGroup->GetColor(nPropertyID); + pBaseNode = pIImplicitFunction->AddResourceIdNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6164,32 +15269,43 @@ Lib3MFResult lib3mf_colorgroup_getcolor(Lib3MF_ColorGroup pColorGroup, Lib3MF_ui } catch (...) { return handleUnhandledException(pIBaseClass, pJournalEntry.get()); - } -} - - -/************************************************************************************************************************* - Class implementation for Texture2DGroup -**************************************************************************************************************************/ -Lib3MFResult lib3mf_texture2dgroup_getcount(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 * pCount) + } +} + +Lib3MFResult lib3mf_implicitfunction_addadditionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_AdditionNode * pNode) { - IBase* pIBaseClass = (IBase *)pTexture2DGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "GetCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddAdditionNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pCount == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); - if (!pITexture2DGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pITexture2DGroup->GetCount(); + pBaseNode = pIImplicitFunction->AddAdditionNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6205,24 +15321,40 @@ Lib3MFResult lib3mf_texture2dgroup_getcount(Lib3MF_Texture2DGroup pTexture2DGrou } } -Lib3MFResult lib3mf_texture2dgroup_getallpropertyids(Lib3MF_Texture2DGroup pTexture2DGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult lib3mf_implicitfunction_addsubtractionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SubtractionNode * pNode) { - IBase* pIBaseClass = (IBase *)pTexture2DGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "GetAllPropertyIDs"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddSubtractionNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); - if (!pITexture2DGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pITexture2DGroup->GetAllPropertyIDs(nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + pBaseNode = pIImplicitFunction->AddSubtractionNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6238,25 +15370,40 @@ Lib3MFResult lib3mf_texture2dgroup_getallpropertyids(Lib3MF_Texture2DGroup pText } } -Lib3MFResult lib3mf_texture2dgroup_addtex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, const sLib3MFTex2Coord * pUVCoordinate, Lib3MF_uint32 * pPropertyID) +Lib3MFResult lib3mf_implicitfunction_addmultiplicationnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MultiplicationNode * pNode) { - IBase* pIBaseClass = (IBase *)pTexture2DGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "AddTex2Coord"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddMultiplicationNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pPropertyID == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); - if (!pITexture2DGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pPropertyID = pITexture2DGroup->AddTex2Coord(*pUVCoordinate); + pBaseNode = pIImplicitFunction->AddMultiplicationNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("PropertyID", *pPropertyID); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6272,25 +15419,40 @@ Lib3MFResult lib3mf_texture2dgroup_addtex2coord(Lib3MF_Texture2DGroup pTexture2D } } -Lib3MFResult lib3mf_texture2dgroup_gettex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID, sLib3MFTex2Coord * pUVCoordinate) +Lib3MFResult lib3mf_implicitfunction_adddivisionnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_DivisionNode * pNode) { - IBase* pIBaseClass = (IBase *)pTexture2DGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "GetTex2Coord"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddDivisionNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pUVCoordinate == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); - if (!pITexture2DGroup) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pUVCoordinate = pITexture2DGroup->GetTex2Coord(nPropertyID); + pBaseNode = pIImplicitFunction->AddDivisionNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6306,23 +15468,39 @@ Lib3MFResult lib3mf_texture2dgroup_gettex2coord(Lib3MF_Texture2DGroup pTexture2D } } -Lib3MFResult lib3mf_texture2dgroup_removetex2coord(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_uint32 nPropertyID) +Lib3MFResult lib3mf_implicitfunction_adddotnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DotNode * pNode) { - IBase* pIBaseClass = (IBase *)pTexture2DGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "RemoveTex2Coord"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddDotNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); - if (!pITexture2DGroup) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pITexture2DGroup->RemoveTex2Coord(nPropertyID); + pBaseNode = pIImplicitFunction->AddDotNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6338,27 +15516,39 @@ Lib3MFResult lib3mf_texture2dgroup_removetex2coord(Lib3MF_Texture2DGroup pTextur } } -Lib3MFResult lib3mf_texture2dgroup_gettexture2d(Lib3MF_Texture2DGroup pTexture2DGroup, Lib3MF_Texture2D * pTexture2DInstance) +Lib3MFResult lib3mf_implicitfunction_addcrossnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_CrossNode * pNode) { - IBase* pIBaseClass = (IBase *)pTexture2DGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2DGroup, "Texture2DGroup", "GetTexture2D"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddCrossNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pTexture2DInstance == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pBaseTexture2DInstance(nullptr); - ITexture2DGroup* pITexture2DGroup = dynamic_cast(pIBaseClass); - if (!pITexture2DGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBaseTexture2DInstance = pITexture2DGroup->GetTexture2D(); + pBaseNode = pIImplicitFunction->AddCrossNode(sIdentifier, sDisplayName, sTag); - *pTexture2DInstance = (IBase*)(pBaseTexture2DInstance); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("Texture2DInstance", *pTexture2DInstance); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6374,29 +15564,39 @@ Lib3MFResult lib3mf_texture2dgroup_gettexture2d(Lib3MF_Texture2DGroup pTexture2D } } - -/************************************************************************************************************************* - Class implementation for CompositeMaterials -**************************************************************************************************************************/ -Lib3MFResult lib3mf_compositematerials_getcount(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 * pCount) +Lib3MFResult lib3mf_implicitfunction_addmatvecmultiplicationnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatVecMultiplicationNode * pNode) { - IBase* pIBaseClass = (IBase *)pCompositeMaterials; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "GetCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddMatVecMultiplicationNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pCount == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); - if (!pICompositeMaterials) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pICompositeMaterials->GetCount(); + pBaseNode = pIImplicitFunction->AddMatVecMultiplicationNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6412,24 +15612,40 @@ Lib3MFResult lib3mf_compositematerials_getcount(Lib3MF_CompositeMaterials pCompo } } -Lib3MFResult lib3mf_compositematerials_getallpropertyids(Lib3MF_CompositeMaterials pCompositeMaterials, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult lib3mf_implicitfunction_addminnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MinNode * pNode) { - IBase* pIBaseClass = (IBase *)pCompositeMaterials; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "GetAllPropertyIDs"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddMinNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); - if (!pICompositeMaterials) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pICompositeMaterials->GetAllPropertyIDs(nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + pBaseNode = pIImplicitFunction->AddMinNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6445,27 +15661,40 @@ Lib3MFResult lib3mf_compositematerials_getallpropertyids(Lib3MF_CompositeMateria } } -Lib3MFResult lib3mf_compositematerials_getbasematerialgroup(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_BaseMaterialGroup * pBaseMaterialGroupInstance) +Lib3MFResult lib3mf_implicitfunction_addmaxnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_MaxNode * pNode) { - IBase* pIBaseClass = (IBase *)pCompositeMaterials; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "GetBaseMaterialGroup"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddMaxNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pBaseMaterialGroupInstance == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pBaseBaseMaterialGroupInstance(nullptr); - ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); - if (!pICompositeMaterials) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBaseBaseMaterialGroupInstance = pICompositeMaterials->GetBaseMaterialGroup(); + pBaseNode = pIImplicitFunction->AddMaxNode(sIdentifier, eConfiguration, sDisplayName, sTag); - *pBaseMaterialGroupInstance = (IBase*)(pBaseBaseMaterialGroupInstance); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("BaseMaterialGroupInstance", *pBaseMaterialGroupInstance); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6481,27 +15710,40 @@ Lib3MFResult lib3mf_compositematerials_getbasematerialgroup(Lib3MF_CompositeMate } } -Lib3MFResult lib3mf_compositematerials_addcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint64 nCompositeBufferSize, const sLib3MFCompositeConstituent * pCompositeBuffer, Lib3MF_uint32 * pPropertyID) +Lib3MFResult lib3mf_implicitfunction_addfmodnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_FmodNode * pNode) { - IBase* pIBaseClass = (IBase *)pCompositeMaterials; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "AddComposite"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddFmodNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ( (!pCompositeBuffer) && (nCompositeBufferSize>0)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - if (pPropertyID == nullptr) + if (pDisplayName == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); - if (!pICompositeMaterials) + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pPropertyID = pICompositeMaterials->AddComposite(nCompositeBufferSize, pCompositeBuffer); + pBaseNode = pIImplicitFunction->AddFmodNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("PropertyID", *pPropertyID); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6517,23 +15759,40 @@ Lib3MFResult lib3mf_compositematerials_addcomposite(Lib3MF_CompositeMaterials pC } } -Lib3MFResult lib3mf_compositematerials_removecomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID) +Lib3MFResult lib3mf_implicitfunction_addpownode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_PowNode * pNode) { - IBase* pIBaseClass = (IBase *)pCompositeMaterials; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "RemoveComposite"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddPowNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); - if (!pICompositeMaterials) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pICompositeMaterials->RemoveComposite(nPropertyID); + pBaseNode = pIImplicitFunction->AddPowNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6549,25 +15808,40 @@ Lib3MFResult lib3mf_compositematerials_removecomposite(Lib3MF_CompositeMaterials } } -Lib3MFResult lib3mf_compositematerials_getcomposite(Lib3MF_CompositeMaterials pCompositeMaterials, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nCompositeBufferSize, Lib3MF_uint64* pCompositeNeededCount, sLib3MFCompositeConstituent * pCompositeBuffer) +Lib3MFResult lib3mf_implicitfunction_addselectnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_SelectNode * pNode) { - IBase* pIBaseClass = (IBase *)pCompositeMaterials; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pCompositeMaterials, "CompositeMaterials", "GetComposite"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddSelectNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ((!pCompositeBuffer) && !(pCompositeNeededCount)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - ICompositeMaterials* pICompositeMaterials = dynamic_cast(pIBaseClass); - if (!pICompositeMaterials) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pICompositeMaterials->GetComposite(nPropertyID, nCompositeBufferSize, pCompositeNeededCount, pCompositeBuffer); + pBaseNode = pIImplicitFunction->AddSelectNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6583,29 +15857,40 @@ Lib3MFResult lib3mf_compositematerials_getcomposite(Lib3MF_CompositeMaterials pC } } - -/************************************************************************************************************************* - Class implementation for MultiPropertyGroup -**************************************************************************************************************************/ -Lib3MFResult lib3mf_multipropertygroup_getcount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount) +Lib3MFResult lib3mf_implicitfunction_addclampnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, eLib3MFImplicitNodeConfiguration eConfiguration, const char * pDisplayName, const char * pTag, Lib3MF_ClampNode * pNode) { - IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "GetCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddClampNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addEnumParameter("Configuration", "ImplicitNodeConfiguration", (Lib3MF_int32)(eConfiguration)); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pCount == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); - if (!pIMultiPropertyGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pIMultiPropertyGroup->GetCount(); + pBaseNode = pIImplicitFunction->AddClampNode(sIdentifier, eConfiguration, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6621,24 +15906,39 @@ Lib3MFResult lib3mf_multipropertygroup_getcount(Lib3MF_MultiPropertyGroup pMulti } } -Lib3MFResult lib3mf_multipropertygroup_getallpropertyids(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult lib3mf_implicitfunction_addcomposevectornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeVectorNode * pNode) { - IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "GetAllPropertyIDs"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddComposeVectorNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); - if (!pIMultiPropertyGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIMultiPropertyGroup->GetAllPropertyIDs(nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + pBaseNode = pIImplicitFunction->AddComposeVectorNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6654,27 +15954,39 @@ Lib3MFResult lib3mf_multipropertygroup_getallpropertyids(Lib3MF_MultiPropertyGro } } -Lib3MFResult lib3mf_multipropertygroup_addmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer, Lib3MF_uint32 * pPropertyID) +Lib3MFResult lib3mf_implicitfunction_addvectorfromscalarnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_VectorFromScalarNode * pNode) { - IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "AddMultiProperty"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddVectorFromScalarNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ( (!pPropertyIDsBuffer) && (nPropertyIDsBufferSize>0)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - if (pPropertyID == nullptr) + if (pDisplayName == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); - if (!pIMultiPropertyGroup) + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pPropertyID = pIMultiPropertyGroup->AddMultiProperty(nPropertyIDsBufferSize, pPropertyIDsBuffer); + pBaseNode = pIImplicitFunction->AddVectorFromScalarNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("PropertyID", *pPropertyID); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6690,25 +16002,39 @@ Lib3MFResult lib3mf_multipropertygroup_addmultiproperty(Lib3MF_MultiPropertyGrou } } -Lib3MFResult lib3mf_multipropertygroup_setmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, Lib3MF_uint64 nPropertyIDsBufferSize, const Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult lib3mf_implicitfunction_adddecomposevectornode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_DecomposeVectorNode * pNode) { - IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "SetMultiProperty"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddDecomposeVectorNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ( (!pPropertyIDsBuffer) && (nPropertyIDsBufferSize>0)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); - if (!pIMultiPropertyGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIMultiPropertyGroup->SetMultiProperty(nPropertyID, nPropertyIDsBufferSize, pPropertyIDsBuffer); + pBaseNode = pIImplicitFunction->AddDecomposeVectorNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6724,25 +16050,39 @@ Lib3MFResult lib3mf_multipropertygroup_setmultiproperty(Lib3MF_MultiPropertyGrou } } -Lib3MFResult lib3mf_multipropertygroup_getmultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID, const Lib3MF_uint64 nPropertyIDsBufferSize, Lib3MF_uint64* pPropertyIDsNeededCount, Lib3MF_uint32 * pPropertyIDsBuffer) +Lib3MFResult lib3mf_implicitfunction_addcomposematrixnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ComposeMatrixNode * pNode) { - IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "GetMultiProperty"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddComposeMatrixNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ((!pPropertyIDsBuffer) && !(pPropertyIDsNeededCount)) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); - if (!pIMultiPropertyGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIMultiPropertyGroup->GetMultiProperty(nPropertyID, nPropertyIDsBufferSize, pPropertyIDsNeededCount, pPropertyIDsBuffer); + pBaseNode = pIImplicitFunction->AddComposeMatrixNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6758,23 +16098,39 @@ Lib3MFResult lib3mf_multipropertygroup_getmultiproperty(Lib3MF_MultiPropertyGrou } } -Lib3MFResult lib3mf_multipropertygroup_removemultiproperty(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nPropertyID) +Lib3MFResult lib3mf_implicitfunction_addmatrixfromrowsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromRowsNode * pNode) { - IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { - if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "RemoveMultiProperty"); - pJournalEntry->addUInt32Parameter("PropertyID", nPropertyID); + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddMatrixFromRowsNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); - if (!pIMultiPropertyGroup) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIMultiPropertyGroup->RemoveMultiProperty(nPropertyID); + pBaseNode = pIImplicitFunction->AddMatrixFromRowsNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6790,25 +16146,39 @@ Lib3MFResult lib3mf_multipropertygroup_removemultiproperty(Lib3MF_MultiPropertyG } } -Lib3MFResult lib3mf_multipropertygroup_getlayercount(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 * pCount) +Lib3MFResult lib3mf_implicitfunction_addmatrixfromcolumnsnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MatrixFromColumnsNode * pNode) { - IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "GetLayerCount"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddMatrixFromColumnsNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pCount == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); - if (!pIMultiPropertyGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pCount = pIMultiPropertyGroup->GetLayerCount(); + pBaseNode = pIImplicitFunction->AddMatrixFromColumnsNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("Count", *pCount); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6824,25 +16194,39 @@ Lib3MFResult lib3mf_multipropertygroup_getlayercount(Lib3MF_MultiPropertyGroup p } } -Lib3MFResult lib3mf_multipropertygroup_addlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, const sLib3MFMultiPropertyLayer * pTheLayer, Lib3MF_uint32 * pLayerIndex) +Lib3MFResult lib3mf_implicitfunction_addconstantnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstantNode * pNode) { - IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "AddLayer"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddConstantNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pLayerIndex == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); - if (!pIMultiPropertyGroup) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pLayerIndex = pIMultiPropertyGroup->AddLayer(*pTheLayer); + pBaseNode = pIImplicitFunction->AddConstantNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt32Result("LayerIndex", *pLayerIndex); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6858,25 +16242,39 @@ Lib3MFResult lib3mf_multipropertygroup_addlayer(Lib3MF_MultiPropertyGroup pMulti } } -Lib3MFResult lib3mf_multipropertygroup_getlayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex, sLib3MFMultiPropertyLayer * pTheLayer) +Lib3MFResult lib3mf_implicitfunction_addconstvecnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstVecNode * pNode) { - IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "GetLayer"); - pJournalEntry->addUInt32Parameter("LayerIndex", nLayerIndex); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddConstVecNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pTheLayer == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); - if (!pIMultiPropertyGroup) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pTheLayer = pIMultiPropertyGroup->GetLayer(nLayerIndex); + pBaseNode = pIImplicitFunction->AddConstVecNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6892,23 +16290,39 @@ Lib3MFResult lib3mf_multipropertygroup_getlayer(Lib3MF_MultiPropertyGroup pMulti } } -Lib3MFResult lib3mf_multipropertygroup_removelayer(Lib3MF_MultiPropertyGroup pMultiPropertyGroup, Lib3MF_uint32 nLayerIndex) +Lib3MFResult lib3mf_implicitfunction_addconstmatnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_ConstMatNode * pNode) { - IBase* pIBaseClass = (IBase *)pMultiPropertyGroup; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pMultiPropertyGroup, "MultiPropertyGroup", "RemoveLayer"); - pJournalEntry->addUInt32Parameter("LayerIndex", nLayerIndex); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddConstMatNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - IMultiPropertyGroup* pIMultiPropertyGroup = dynamic_cast(pIBaseClass); - if (!pIMultiPropertyGroup) + if (pIdentifier == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIMultiPropertyGroup->RemoveLayer(nLayerIndex); + pBaseNode = pIImplicitFunction->AddConstMatNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6924,51 +16338,39 @@ Lib3MFResult lib3mf_multipropertygroup_removelayer(Lib3MF_MultiPropertyGroup pMu } } - -/************************************************************************************************************************* - Class implementation for Attachment -**************************************************************************************************************************/ -Lib3MFResult lib3mf_attachment_getpath(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer) +Lib3MFResult lib3mf_implicitfunction_addmeshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_MeshNode * pNode) { - IBase* pIBaseClass = (IBase *)pAttachment; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "GetPath"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddMeshNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if ( (!pPathBuffer) && !(pPathNeededChars) ) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sPath(""); - IAttachment* pIAttachment = dynamic_cast(pIBaseClass); - if (!pIAttachment) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - bool isCacheCall = (pPathBuffer == nullptr); - if (isCacheCall) { - sPath = pIAttachment->GetPath(); + pBaseNode = pIImplicitFunction->AddMeshNode(sIdentifier, sDisplayName, sTag); - pIAttachment->_setCache (new ParameterCache_1 (sPath)); - } - else { - auto cache = dynamic_cast*> (pIAttachment->_getCache ()); - if (cache == nullptr) - throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - cache->retrieveData (sPath); - pIAttachment->_setCache (nullptr); - } - - if (pPathNeededChars) - *pPathNeededChars = (Lib3MF_uint32) (sPath.size()+1); - if (pPathBuffer) { - if (sPath.size() >= nPathBufferSize) - throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); - for (size_t iPath = 0; iPath < sPath.size(); iPath++) - pPathBuffer[iPath] = sPath[iPath]; - pPathBuffer[sPath.size()] = 0; - } + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addStringResult("Path", sPath.c_str()); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -6984,26 +16386,39 @@ Lib3MFResult lib3mf_attachment_getpath(Lib3MF_Attachment pAttachment, const Lib3 } } -Lib3MFResult lib3mf_attachment_setpath(Lib3MF_Attachment pAttachment, const char * pPath) +Lib3MFResult lib3mf_implicitfunction_addunsignedmeshnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_UnsignedMeshNode * pNode) { - IBase* pIBaseClass = (IBase *)pAttachment; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "SetPath"); - pJournalEntry->addStringParameter("Path", pPath); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddUnsignedMeshNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pPath == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sPath(pPath); - IAttachment* pIAttachment = dynamic_cast(pIBaseClass); - if (!pIAttachment) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIAttachment->SetPath(sPath); + pBaseNode = pIImplicitFunction->AddUnsignedMeshNode(sIdentifier, sDisplayName, sTag); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -7019,27 +16434,39 @@ Lib3MFResult lib3mf_attachment_setpath(Lib3MF_Attachment pAttachment, const char } } -Lib3MFResult lib3mf_attachment_packagepart(Lib3MF_Attachment pAttachment, Lib3MF_PackagePart * pPackagePart) +Lib3MFResult lib3mf_implicitfunction_addfunctioncallnode(Lib3MF_ImplicitFunction pImplicitFunction, const char * pIdentifier, const char * pDisplayName, const char * pTag, Lib3MF_FunctionCallNode * pNode) { - IBase* pIBaseClass = (IBase *)pAttachment; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "PackagePart"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddFunctionCallNode"); + pJournalEntry->addStringParameter("Identifier", pIdentifier); + pJournalEntry->addStringParameter("DisplayName", pDisplayName); + pJournalEntry->addStringParameter("Tag", pTag); } - if (pPackagePart == nullptr) + if (pIdentifier == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pBasePackagePart(nullptr); - IAttachment* pIAttachment = dynamic_cast(pIBaseClass); - if (!pIAttachment) + if (pDisplayName == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pTag == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (pNode == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sIdentifier(pIdentifier); + std::string sDisplayName(pDisplayName); + std::string sTag(pTag); + IBase* pBaseNode(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBasePackagePart = pIAttachment->PackagePart(); + pBaseNode = pIImplicitFunction->AddFunctionCallNode(sIdentifier, sDisplayName, sTag); - *pPackagePart = (IBase*)(pBasePackagePart); + *pNode = (IBase*)(pBaseNode); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("PackagePart", *pPackagePart); + pJournalEntry->addHandleResult("Node", *pNode); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -7055,47 +16482,27 @@ Lib3MFResult lib3mf_attachment_packagepart(Lib3MF_Attachment pAttachment, Lib3MF } } -Lib3MFResult lib3mf_attachment_getrelationshiptype(Lib3MF_Attachment pAttachment, const Lib3MF_uint32 nPathBufferSize, Lib3MF_uint32* pPathNeededChars, char * pPathBuffer) +Lib3MFResult lib3mf_implicitfunction_getnodes(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_NodeIterator * pIterator) { - IBase* pIBaseClass = (IBase *)pAttachment; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "GetRelationShipType"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "GetNodes"); } - if ( (!pPathBuffer) && !(pPathNeededChars) ) + if (pIterator == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sPath(""); - IAttachment* pIAttachment = dynamic_cast(pIBaseClass); - if (!pIAttachment) + IBase* pBaseIterator(nullptr); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - bool isCacheCall = (pPathBuffer == nullptr); - if (isCacheCall) { - sPath = pIAttachment->GetRelationShipType(); + pBaseIterator = pIImplicitFunction->GetNodes(); - pIAttachment->_setCache (new ParameterCache_1 (sPath)); - } - else { - auto cache = dynamic_cast*> (pIAttachment->_getCache ()); - if (cache == nullptr) - throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - cache->retrieveData (sPath); - pIAttachment->_setCache (nullptr); - } - - if (pPathNeededChars) - *pPathNeededChars = (Lib3MF_uint32) (sPath.size()+1); - if (pPathBuffer) { - if (sPath.size() >= nPathBufferSize) - throw ELib3MFInterfaceException (LIB3MF_ERROR_BUFFERTOOSMALL); - for (size_t iPath = 0; iPath < sPath.size(); iPath++) - pPathBuffer[iPath] = sPath[iPath]; - pPathBuffer[sPath.size()] = 0; - } + *pIterator = (IBase*)(pBaseIterator); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addStringResult("Path", sPath.c_str()); + pJournalEntry->addHandleResult("Iterator", *pIterator); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -7111,24 +16518,26 @@ Lib3MFResult lib3mf_attachment_getrelationshiptype(Lib3MF_Attachment pAttachment } } -Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attachment pAttachment, const char * pPath) +Lib3MFResult lib3mf_implicitfunction_removenode(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitNode pNode) { - IBase* pIBaseClass = (IBase *)pAttachment; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "SetRelationShipType"); - pJournalEntry->addStringParameter("Path", pPath); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "RemoveNode"); + pJournalEntry->addHandleParameter("Node", pNode); } - if (pPath == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sPath(pPath); - IAttachment* pIAttachment = dynamic_cast(pIBaseClass); - if (!pIAttachment) + IBase* pIBaseClassNode = (IBase *)pNode; + IImplicitNode* pINode = dynamic_cast(pIBaseClassNode); + if (!pINode) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIAttachment->SetRelationShipType(sPath); + pIImplicitFunction->RemoveNode(pINode); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -7146,24 +16555,32 @@ Lib3MFResult lib3mf_attachment_setrelationshiptype(Lib3MF_Attachment pAttachment } } -Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const char * pFileName) +Lib3MFResult lib3mf_implicitfunction_addlink(Lib3MF_ImplicitFunction pImplicitFunction, Lib3MF_ImplicitPort pSource, Lib3MF_ImplicitPort pTarget) { - IBase* pIBaseClass = (IBase *)pAttachment; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "WriteToFile"); - pJournalEntry->addStringParameter("FileName", pFileName); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddLink"); + pJournalEntry->addHandleParameter("Source", pSource); + pJournalEntry->addHandleParameter("Target", pTarget); } - if (pFileName == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sFileName(pFileName); - IAttachment* pIAttachment = dynamic_cast(pIBaseClass); - if (!pIAttachment) + IBase* pIBaseClassSource = (IBase *)pSource; + IImplicitPort* pISource = dynamic_cast(pIBaseClassSource); + if (!pISource) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IBase* pIBaseClassTarget = (IBase *)pTarget; + IImplicitPort* pITarget = dynamic_cast(pIBaseClassTarget); + if (!pITarget) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIAttachment->WriteToFile(sFileName); + pIImplicitFunction->AddLink(pISource, pITarget); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -7181,24 +16598,28 @@ Lib3MFResult lib3mf_attachment_writetofile(Lib3MF_Attachment pAttachment, const } } -Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const char * pFileName) +Lib3MFResult lib3mf_implicitfunction_addlinkbynames(Lib3MF_ImplicitFunction pImplicitFunction, const char * pSource, const char * pTarget) { - IBase* pIBaseClass = (IBase *)pAttachment; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "ReadFromFile"); - pJournalEntry->addStringParameter("FileName", pFileName); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "AddLinkByNames"); + pJournalEntry->addStringParameter("Source", pSource); + pJournalEntry->addStringParameter("Target", pTarget); } - if (pFileName == nullptr) + if (pSource == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - std::string sFileName(pFileName); - IAttachment* pIAttachment = dynamic_cast(pIBaseClass); - if (!pIAttachment) + if (pTarget == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + std::string sSource(pSource); + std::string sTarget(pTarget); + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIAttachment->ReadFromFile(sFileName); + pIImplicitFunction->AddLinkByNames(sSource, sTarget); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -7216,22 +16637,20 @@ Lib3MFResult lib3mf_attachment_readfromfile(Lib3MF_Attachment pAttachment, const } } -Lib3MFResult lib3mf_attachment_readfromcallback(Lib3MF_Attachment pAttachment, Lib3MFReadCallback pTheReadCallback, Lib3MF_uint64 nStreamSize, Lib3MFSeekCallback pTheSeekCallback, Lib3MF_pvoid pUserData) +Lib3MFResult lib3mf_implicitfunction_clear(Lib3MF_ImplicitFunction pImplicitFunction) { - IBase* pIBaseClass = (IBase *)pAttachment; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "ReadFromCallback"); - pJournalEntry->addUInt64Parameter("StreamSize", nStreamSize); - pJournalEntry->addPointerParameter("UserData", pUserData); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "Clear"); } - IAttachment* pIAttachment = dynamic_cast(pIBaseClass); - if (!pIAttachment) + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIAttachment->ReadFromCallback(pTheReadCallback, nStreamSize, pTheSeekCallback, pUserData); + pIImplicitFunction->Clear(); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -7249,25 +16668,22 @@ Lib3MFResult lib3mf_attachment_readfromcallback(Lib3MF_Attachment pAttachment, L } } -Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment pAttachment, Lib3MF_uint64 * pStreamSize) +Lib3MFResult lib3mf_implicitfunction_sortnodestopologically(Lib3MF_ImplicitFunction pImplicitFunction) { - IBase* pIBaseClass = (IBase *)pAttachment; + IBase* pIBaseClass = (IBase *)pImplicitFunction; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "GetStreamSize"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pImplicitFunction, "ImplicitFunction", "SortNodesTopologically"); } - if (pStreamSize == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IAttachment* pIAttachment = dynamic_cast(pIBaseClass); - if (!pIAttachment) + IImplicitFunction* pIImplicitFunction = dynamic_cast(pIBaseClass); + if (!pIImplicitFunction) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pStreamSize = pIAttachment->GetStreamSize(); + pIImplicitFunction->SortNodesTopologically(); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addUInt64Result("StreamSize", *pStreamSize); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -7283,24 +16699,31 @@ Lib3MFResult lib3mf_attachment_getstreamsize(Lib3MF_Attachment pAttachment, Lib3 } } -Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, const Lib3MF_uint64 nBufferBufferSize, Lib3MF_uint64* pBufferNeededCount, Lib3MF_uint8 * pBufferBuffer) + +/************************************************************************************************************************* + Class implementation for FunctionFromImage3D +**************************************************************************************************************************/ +Lib3MFResult lib3mf_functionfromimage3d_getimage3d(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D * pImage3D) { - IBase* pIBaseClass = (IBase *)pAttachment; + IBase* pIBaseClass = (IBase *)pFunctionFromImage3D; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "WriteToBuffer"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionFromImage3D, "FunctionFromImage3D", "GetImage3D"); } - if ((!pBufferBuffer) && !(pBufferNeededCount)) + if (pImage3D == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IAttachment* pIAttachment = dynamic_cast(pIBaseClass); - if (!pIAttachment) + IBase* pBaseImage3D(nullptr); + IFunctionFromImage3D* pIFunctionFromImage3D = dynamic_cast(pIBaseClass); + if (!pIFunctionFromImage3D) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIAttachment->WriteToBuffer(nBufferBufferSize, pBufferNeededCount, pBufferBuffer); + pBaseImage3D = pIFunctionFromImage3D->GetImage3D(); + *pImage3D = (IBase*)(pBaseImage3D); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Image3D", *pImage3D); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -7316,22 +16739,26 @@ Lib3MFResult lib3mf_attachment_writetobuffer(Lib3MF_Attachment pAttachment, cons } } -Lib3MFResult lib3mf_attachment_readfrombuffer(Lib3MF_Attachment pAttachment, Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer) +Lib3MFResult lib3mf_functionfromimage3d_setimage3d(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_Image3D pImage3D) { - IBase* pIBaseClass = (IBase *)pAttachment; + IBase* pIBaseClass = (IBase *)pFunctionFromImage3D; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pAttachment, "Attachment", "ReadFromBuffer"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionFromImage3D, "FunctionFromImage3D", "SetImage3D"); + pJournalEntry->addHandleParameter("Image3D", pImage3D); } - if ( (!pBufferBuffer) && (nBufferBufferSize>0)) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IAttachment* pIAttachment = dynamic_cast(pIBaseClass); - if (!pIAttachment) + IBase* pIBaseClassImage3D = (IBase *)pImage3D; + IImage3D* pIImage3D = dynamic_cast(pIBaseClassImage3D); + if (!pIImage3D) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IFunctionFromImage3D* pIFunctionFromImage3D = dynamic_cast(pIBaseClass); + if (!pIFunctionFromImage3D) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pIAttachment->ReadFromBuffer(nBufferBufferSize, pBufferBuffer); + pIFunctionFromImage3D->SetImage3D(pIImage3D); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -7349,31 +16776,23 @@ Lib3MFResult lib3mf_attachment_readfrombuffer(Lib3MF_Attachment pAttachment, Lib } } - -/************************************************************************************************************************* - Class implementation for Texture2D -**************************************************************************************************************************/ -Lib3MFResult lib3mf_texture2d_getattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment * pAttachment) +Lib3MFResult lib3mf_functionfromimage3d_setfilter(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter eFilter) { - IBase* pIBaseClass = (IBase *)pTexture2D; + IBase* pIBaseClass = (IBase *)pFunctionFromImage3D; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "GetAttachment"); - } - if (pAttachment == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pBaseAttachment(nullptr); - ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); - if (!pITexture2D) + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionFromImage3D, "FunctionFromImage3D", "SetFilter"); + pJournalEntry->addEnumParameter("Filter", "TextureFilter", (Lib3MF_int32)(eFilter)); + } + IFunctionFromImage3D* pIFunctionFromImage3D = dynamic_cast(pIBaseClass); + if (!pIFunctionFromImage3D) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBaseAttachment = pITexture2D->GetAttachment(); + pIFunctionFromImage3D->SetFilter(eFilter); - *pAttachment = (IBase*)(pBaseAttachment); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("Attachment", *pAttachment); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -7389,28 +16808,25 @@ Lib3MFResult lib3mf_texture2d_getattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_ } } -Lib3MFResult lib3mf_texture2d_setattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_Attachment pAttachment) +Lib3MFResult lib3mf_functionfromimage3d_getfilter(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureFilter * pFilter) { - IBase* pIBaseClass = (IBase *)pTexture2D; + IBase* pIBaseClass = (IBase *)pFunctionFromImage3D; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "SetAttachment"); - pJournalEntry->addHandleParameter("Attachment", pAttachment); + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionFromImage3D, "FunctionFromImage3D", "GetFilter"); } - IBase* pIBaseClassAttachment = (IBase *)pAttachment; - IAttachment* pIAttachment = dynamic_cast(pIBaseClassAttachment); - if (!pIAttachment) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); - - ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); - if (!pITexture2D) + if (pFilter == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IFunctionFromImage3D* pIFunctionFromImage3D = dynamic_cast(pIBaseClass); + if (!pIFunctionFromImage3D) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pITexture2D->SetAttachment(pIAttachment); + *pFilter = pIFunctionFromImage3D->GetFilter(); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addEnumResult("Filter", "TextureFilter", (Lib3MF_int32)(*pFilter)); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -7426,25 +16842,25 @@ Lib3MFResult lib3mf_texture2d_setattachment(Lib3MF_Texture2D pTexture2D, Lib3MF_ } } -Lib3MFResult lib3mf_texture2d_getcontenttype(Lib3MF_Texture2D pTexture2D, eLib3MFTextureType * pContentType) +Lib3MFResult lib3mf_functionfromimage3d_settilestyles(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV, eLib3MFTextureTileStyle eTileStyleW) { - IBase* pIBaseClass = (IBase *)pTexture2D; + IBase* pIBaseClass = (IBase *)pFunctionFromImage3D; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "GetContentType"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionFromImage3D, "FunctionFromImage3D", "SetTileStyles"); + pJournalEntry->addEnumParameter("TileStyleU", "TextureTileStyle", (Lib3MF_int32)(eTileStyleU)); + pJournalEntry->addEnumParameter("TileStyleV", "TextureTileStyle", (Lib3MF_int32)(eTileStyleV)); + pJournalEntry->addEnumParameter("TileStyleW", "TextureTileStyle", (Lib3MF_int32)(eTileStyleW)); } - if (pContentType == nullptr) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); - if (!pITexture2D) + IFunctionFromImage3D* pIFunctionFromImage3D = dynamic_cast(pIBaseClass); + if (!pIFunctionFromImage3D) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pContentType = pITexture2D->GetContentType(); + pIFunctionFromImage3D->SetTileStyles(eTileStyleU, eTileStyleV, eTileStyleW); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addEnumResult("ContentType", "TextureType", (Lib3MF_int32)(*pContentType)); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -7460,23 +16876,31 @@ Lib3MFResult lib3mf_texture2d_getcontenttype(Lib3MF_Texture2D pTexture2D, eLib3M } } -Lib3MFResult lib3mf_texture2d_setcontenttype(Lib3MF_Texture2D pTexture2D, eLib3MFTextureType eContentType) +Lib3MFResult lib3mf_functionfromimage3d_gettilestyles(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV, eLib3MFTextureTileStyle * pTileStyleW) { - IBase* pIBaseClass = (IBase *)pTexture2D; + IBase* pIBaseClass = (IBase *)pFunctionFromImage3D; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "SetContentType"); - pJournalEntry->addEnumParameter("ContentType", "TextureType", (Lib3MF_int32)(eContentType)); + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionFromImage3D, "FunctionFromImage3D", "GetTileStyles"); } - ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); - if (!pITexture2D) + if (!pTileStyleU) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (!pTileStyleV) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + if (!pTileStyleW) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IFunctionFromImage3D* pIFunctionFromImage3D = dynamic_cast(pIBaseClass); + if (!pIFunctionFromImage3D) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pITexture2D->SetContentType(eContentType); + pIFunctionFromImage3D->GetTileStyles(*pTileStyleU, *pTileStyleV, *pTileStyleW); if (pJournalEntry.get() != nullptr) { + pJournalEntry->addEnumResult("TileStyleU", "TextureTileStyle", (Lib3MF_int32)(*pTileStyleU)); + pJournalEntry->addEnumResult("TileStyleV", "TextureTileStyle", (Lib3MF_int32)(*pTileStyleV)); + pJournalEntry->addEnumResult("TileStyleW", "TextureTileStyle", (Lib3MF_int32)(*pTileStyleW)); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -7492,28 +16916,25 @@ Lib3MFResult lib3mf_texture2d_setcontenttype(Lib3MF_Texture2D pTexture2D, eLib3M } } -Lib3MFResult lib3mf_texture2d_gettilestyleuv(Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle * pTileStyleU, eLib3MFTextureTileStyle * pTileStyleV) +Lib3MFResult lib3mf_functionfromimage3d_getoffset(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pOffset) { - IBase* pIBaseClass = (IBase *)pTexture2D; + IBase* pIBaseClass = (IBase *)pFunctionFromImage3D; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "GetTileStyleUV"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionFromImage3D, "FunctionFromImage3D", "GetOffset"); } - if (!pTileStyleU) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - if (!pTileStyleV) + if (pOffset == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); - if (!pITexture2D) + IFunctionFromImage3D* pIFunctionFromImage3D = dynamic_cast(pIBaseClass); + if (!pIFunctionFromImage3D) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pITexture2D->GetTileStyleUV(*pTileStyleU, *pTileStyleV); + *pOffset = pIFunctionFromImage3D->GetOffset(); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addEnumResult("TileStyleU", "TextureTileStyle", (Lib3MF_int32)(*pTileStyleU)); - pJournalEntry->addEnumResult("TileStyleV", "TextureTileStyle", (Lib3MF_int32)(*pTileStyleV)); + pJournalEntry->addDoubleResult("Offset", *pOffset); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -7529,22 +16950,21 @@ Lib3MFResult lib3mf_texture2d_gettilestyleuv(Lib3MF_Texture2D pTexture2D, eLib3M } } -Lib3MFResult lib3mf_texture2d_settilestyleuv(Lib3MF_Texture2D pTexture2D, eLib3MFTextureTileStyle eTileStyleU, eLib3MFTextureTileStyle eTileStyleV) +Lib3MFResult lib3mf_functionfromimage3d_setoffset(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dOffset) { - IBase* pIBaseClass = (IBase *)pTexture2D; + IBase* pIBaseClass = (IBase *)pFunctionFromImage3D; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "SetTileStyleUV"); - pJournalEntry->addEnumParameter("TileStyleU", "TextureTileStyle", (Lib3MF_int32)(eTileStyleU)); - pJournalEntry->addEnumParameter("TileStyleV", "TextureTileStyle", (Lib3MF_int32)(eTileStyleV)); + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionFromImage3D, "FunctionFromImage3D", "SetOffset"); + pJournalEntry->addDoubleParameter("Offset", dOffset); } - ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); - if (!pITexture2D) + IFunctionFromImage3D* pIFunctionFromImage3D = dynamic_cast(pIBaseClass); + if (!pIFunctionFromImage3D) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pITexture2D->SetTileStyleUV(eTileStyleU, eTileStyleV); + pIFunctionFromImage3D->SetOffset(dOffset); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -7562,25 +16982,25 @@ Lib3MFResult lib3mf_texture2d_settilestyleuv(Lib3MF_Texture2D pTexture2D, eLib3M } } -Lib3MFResult lib3mf_texture2d_getfilter(Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter * pFilter) +Lib3MFResult lib3mf_functionfromimage3d_getscale(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double * pScale) { - IBase* pIBaseClass = (IBase *)pTexture2D; + IBase* pIBaseClass = (IBase *)pFunctionFromImage3D; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "GetFilter"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionFromImage3D, "FunctionFromImage3D", "GetScale"); } - if (pFilter == nullptr) + if (pScale == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); - if (!pITexture2D) + IFunctionFromImage3D* pIFunctionFromImage3D = dynamic_cast(pIBaseClass); + if (!pIFunctionFromImage3D) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - *pFilter = pITexture2D->GetFilter(); + *pScale = pIFunctionFromImage3D->GetScale(); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addEnumResult("Filter", "TextureFilter", (Lib3MF_int32)(*pFilter)); + pJournalEntry->addDoubleResult("Scale", *pScale); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -7596,21 +17016,21 @@ Lib3MFResult lib3mf_texture2d_getfilter(Lib3MF_Texture2D pTexture2D, eLib3MFText } } -Lib3MFResult lib3mf_texture2d_setfilter(Lib3MF_Texture2D pTexture2D, eLib3MFTextureFilter eFilter) +Lib3MFResult lib3mf_functionfromimage3d_setscale(Lib3MF_FunctionFromImage3D pFunctionFromImage3D, Lib3MF_double dScale) { - IBase* pIBaseClass = (IBase *)pTexture2D; + IBase* pIBaseClass = (IBase *)pFunctionFromImage3D; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pTexture2D, "Texture2D", "SetFilter"); - pJournalEntry->addEnumParameter("Filter", "TextureFilter", (Lib3MF_int32)(eFilter)); + pJournalEntry = m_GlobalJournal->beginClassMethod(pFunctionFromImage3D, "FunctionFromImage3D", "SetScale"); + pJournalEntry->addDoubleParameter("Scale", dScale); } - ITexture2D* pITexture2D = dynamic_cast(pIBaseClass); - if (!pITexture2D) + IFunctionFromImage3D* pIFunctionFromImage3D = dynamic_cast(pIBaseClass); + if (!pIFunctionFromImage3D) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pITexture2D->SetFilter(eFilter); + pIFunctionFromImage3D->SetScale(dScale); if (pJournalEntry.get() != nullptr) { pJournalEntry->writeSuccess(); @@ -11255,6 +20675,43 @@ Lib3MFResult lib3mf_model_getslicestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 n } } +Lib3MFResult lib3mf_model_getlevelsetbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_LevelSet * pLevelSetObjectInstance) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "GetLevelSetByID"); + pJournalEntry->addUInt32Parameter("UniqueResourceID", nUniqueResourceID); + } + if (pLevelSetObjectInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseLevelSetObjectInstance(nullptr); + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseLevelSetObjectInstance = pIModel->GetLevelSetByID(nUniqueResourceID); + + *pLevelSetObjectInstance = (IBase*)(pBaseLevelSetObjectInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("LevelSetObjectInstance", *pLevelSetObjectInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + Lib3MFResult lib3mf_model_getbuilduuid(Lib3MF_Model pModel, bool * pHasUUID, const Lib3MF_uint32 nUUIDBufferSize, Lib3MF_uint32* pUUIDNeededChars, char * pUUIDBuffer) { IBase* pIBaseClass = (IBase *)pModel; @@ -11814,6 +21271,42 @@ Lib3MFResult lib3mf_model_getslicestacks(Lib3MF_Model pModel, Lib3MF_SliceStackI } } +Lib3MFResult lib3mf_model_getimage3ds(Lib3MF_Model pModel, Lib3MF_Image3DIterator * pResourceIterator) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "GetImage3Ds"); + } + if (pResourceIterator == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResourceIterator(nullptr); + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResourceIterator = pIModel->GetImage3Ds(); + + *pResourceIterator = (IBase*)(pBaseResourceIterator); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("ResourceIterator", *pResourceIterator); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + Lib3MFResult lib3mf_model_mergetomodel(Lib3MF_Model pModel, Lib3MF_Model * pMergedModelInstance) { IBase* pIBaseClass = (IBase *)pModel; @@ -11850,6 +21343,43 @@ Lib3MFResult lib3mf_model_mergetomodel(Lib3MF_Model pModel, Lib3MF_Model * pMerg } } +Lib3MFResult lib3mf_model_mergefrommodel(Lib3MF_Model pModel, Lib3MF_Model pModelInstance) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "MergeFromModel"); + pJournalEntry->addHandleParameter("ModelInstance", pModelInstance); + } + IBase* pIBaseClassModelInstance = (IBase *)pModelInstance; + IModel* pIModelInstance = dynamic_cast(pIBaseClassModelInstance); + if (!pIModelInstance) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIModel->MergeFromModel(pIModelInstance); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + Lib3MFResult lib3mf_model_addmeshobject(Lib3MF_Model pModel, Lib3MF_MeshObject * pMeshObjectInstance) { IBase* pIBaseClass = (IBase *)pModel; @@ -12055,9 +21585,93 @@ Lib3MFResult lib3mf_model_addcolorgroup(Lib3MF_Model pModel, Lib3MF_ColorGroup * pBaseColorGroupInstance = pIModel->AddColorGroup(); - *pColorGroupInstance = (IBase*)(pBaseColorGroupInstance); + *pColorGroupInstance = (IBase*)(pBaseColorGroupInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("ColorGroupInstance", *pColorGroupInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_model_addtexture2dgroup(Lib3MF_Model pModel, Lib3MF_Texture2D pTexture2DInstance, Lib3MF_Texture2DGroup * pTexture2DGroupInstance) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "AddTexture2DGroup"); + pJournalEntry->addHandleParameter("Texture2DInstance", pTexture2DInstance); + } + if (pTexture2DGroupInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pIBaseClassTexture2DInstance = (IBase *)pTexture2DInstance; + ITexture2D* pITexture2DInstance = dynamic_cast(pIBaseClassTexture2DInstance); + if (!pITexture2DInstance) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IBase* pBaseTexture2DGroupInstance(nullptr); + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseTexture2DGroupInstance = pIModel->AddTexture2DGroup(pITexture2DInstance); + + *pTexture2DGroupInstance = (IBase*)(pBaseTexture2DGroupInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("Texture2DGroupInstance", *pTexture2DGroupInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_model_addcompositematerials(Lib3MF_Model pModel, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance, Lib3MF_CompositeMaterials * pCompositeMaterialsInstance) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "AddCompositeMaterials"); + pJournalEntry->addHandleParameter("BaseMaterialGroupInstance", pBaseMaterialGroupInstance); + } + if (pCompositeMaterialsInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pIBaseClassBaseMaterialGroupInstance = (IBase *)pBaseMaterialGroupInstance; + IBaseMaterialGroup* pIBaseMaterialGroupInstance = dynamic_cast(pIBaseClassBaseMaterialGroupInstance); + if (!pIBaseMaterialGroupInstance) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IBase* pBaseCompositeMaterialsInstance(nullptr); + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseCompositeMaterialsInstance = pIModel->AddCompositeMaterials(pIBaseMaterialGroupInstance); + + *pCompositeMaterialsInstance = (IBase*)(pBaseCompositeMaterialsInstance); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("ColorGroupInstance", *pColorGroupInstance); + pJournalEntry->addHandleResult("CompositeMaterialsInstance", *pCompositeMaterialsInstance); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -12073,33 +21687,27 @@ Lib3MFResult lib3mf_model_addcolorgroup(Lib3MF_Model pModel, Lib3MF_ColorGroup * } } -Lib3MFResult lib3mf_model_addtexture2dgroup(Lib3MF_Model pModel, Lib3MF_Texture2D pTexture2DInstance, Lib3MF_Texture2DGroup * pTexture2DGroupInstance) +Lib3MFResult lib3mf_model_addmultipropertygroup(Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance) { IBase* pIBaseClass = (IBase *)pModel; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "AddTexture2DGroup"); - pJournalEntry->addHandleParameter("Texture2DInstance", pTexture2DInstance); + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "AddMultiPropertyGroup"); } - if (pTexture2DGroupInstance == nullptr) + if (pMultiPropertyGroupInstance == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pIBaseClassTexture2DInstance = (IBase *)pTexture2DInstance; - ITexture2D* pITexture2DInstance = dynamic_cast(pIBaseClassTexture2DInstance); - if (!pITexture2DInstance) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); - - IBase* pBaseTexture2DGroupInstance(nullptr); + IBase* pBaseMultiPropertyGroupInstance(nullptr); IModel* pIModel = dynamic_cast(pIBaseClass); if (!pIModel) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBaseTexture2DGroupInstance = pIModel->AddTexture2DGroup(pITexture2DInstance); + pBaseMultiPropertyGroupInstance = pIModel->AddMultiPropertyGroup(); - *pTexture2DGroupInstance = (IBase*)(pBaseTexture2DGroupInstance); + *pMultiPropertyGroupInstance = (IBase*)(pBaseMultiPropertyGroupInstance); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("Texture2DGroupInstance", *pTexture2DGroupInstance); + pJournalEntry->addHandleResult("MultiPropertyGroupInstance", *pMultiPropertyGroupInstance); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -12115,33 +21723,30 @@ Lib3MFResult lib3mf_model_addtexture2dgroup(Lib3MF_Model pModel, Lib3MF_Texture2 } } -Lib3MFResult lib3mf_model_addcompositematerials(Lib3MF_Model pModel, Lib3MF_BaseMaterialGroup pBaseMaterialGroupInstance, Lib3MF_CompositeMaterials * pCompositeMaterialsInstance) +Lib3MFResult lib3mf_model_addimagestack(Lib3MF_Model pModel, Lib3MF_uint32 nColumnCount, Lib3MF_uint32 nRowCount, Lib3MF_uint32 nSheetCount, Lib3MF_ImageStack * pInstance) { IBase* pIBaseClass = (IBase *)pModel; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "AddCompositeMaterials"); - pJournalEntry->addHandleParameter("BaseMaterialGroupInstance", pBaseMaterialGroupInstance); + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "AddImageStack"); + pJournalEntry->addUInt32Parameter("ColumnCount", nColumnCount); + pJournalEntry->addUInt32Parameter("RowCount", nRowCount); + pJournalEntry->addUInt32Parameter("SheetCount", nSheetCount); } - if (pCompositeMaterialsInstance == nullptr) + if (pInstance == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pIBaseClassBaseMaterialGroupInstance = (IBase *)pBaseMaterialGroupInstance; - IBaseMaterialGroup* pIBaseMaterialGroupInstance = dynamic_cast(pIBaseClassBaseMaterialGroupInstance); - if (!pIBaseMaterialGroupInstance) - throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); - - IBase* pBaseCompositeMaterialsInstance(nullptr); + IBase* pBaseInstance(nullptr); IModel* pIModel = dynamic_cast(pIBaseClass); if (!pIModel) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBaseCompositeMaterialsInstance = pIModel->AddCompositeMaterials(pIBaseMaterialGroupInstance); + pBaseInstance = pIModel->AddImageStack(nColumnCount, nRowCount, nSheetCount); - *pCompositeMaterialsInstance = (IBase*)(pBaseCompositeMaterialsInstance); + *pInstance = (IBase*)(pBaseInstance); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("CompositeMaterialsInstance", *pCompositeMaterialsInstance); + pJournalEntry->addHandleResult("Instance", *pInstance); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -12157,27 +21762,28 @@ Lib3MFResult lib3mf_model_addcompositematerials(Lib3MF_Model pModel, Lib3MF_Base } } -Lib3MFResult lib3mf_model_addmultipropertygroup(Lib3MF_Model pModel, Lib3MF_MultiPropertyGroup * pMultiPropertyGroupInstance) +Lib3MFResult lib3mf_model_getimagestackbyid(Lib3MF_Model pModel, Lib3MF_uint32 nUniqueResourceID, Lib3MF_ImageStack * pImageStackInstance) { IBase* pIBaseClass = (IBase *)pModel; PLib3MFInterfaceJournalEntry pJournalEntry; try { if (m_GlobalJournal.get() != nullptr) { - pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "AddMultiPropertyGroup"); + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "GetImageStackByID"); + pJournalEntry->addUInt32Parameter("UniqueResourceID", nUniqueResourceID); } - if (pMultiPropertyGroupInstance == nullptr) + if (pImageStackInstance == nullptr) throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); - IBase* pBaseMultiPropertyGroupInstance(nullptr); + IBase* pBaseImageStackInstance(nullptr); IModel* pIModel = dynamic_cast(pIBaseClass); if (!pIModel) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); - pBaseMultiPropertyGroupInstance = pIModel->AddMultiPropertyGroup(); + pBaseImageStackInstance = pIModel->GetImageStackByID(nUniqueResourceID); - *pMultiPropertyGroupInstance = (IBase*)(pBaseMultiPropertyGroupInstance); + *pImageStackInstance = (IBase*)(pBaseImageStackInstance); if (pJournalEntry.get() != nullptr) { - pJournalEntry->addHandleResult("MultiPropertyGroupInstance", *pMultiPropertyGroupInstance); + pJournalEntry->addHandleResult("ImageStackInstance", *pImageStackInstance); pJournalEntry->writeSuccess(); } return LIB3MF_SUCCESS; @@ -12779,6 +22385,265 @@ Lib3MFResult lib3mf_model_getkeystore(Lib3MF_Model pModel, Lib3MF_KeyStore * pKe } } +Lib3MFResult lib3mf_model_getfunctions(Lib3MF_Model pModel, Lib3MF_FunctionIterator * pTheResourceIterator) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "GetFunctions"); + } + if (pTheResourceIterator == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseTheResourceIterator(nullptr); + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseTheResourceIterator = pIModel->GetFunctions(); + + *pTheResourceIterator = (IBase*)(pBaseTheResourceIterator); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("TheResourceIterator", *pTheResourceIterator); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_model_addimplicitfunction(Lib3MF_Model pModel, Lib3MF_ImplicitFunction * pFunctionInstance) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "AddImplicitFunction"); + } + if (pFunctionInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseFunctionInstance(nullptr); + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseFunctionInstance = pIModel->AddImplicitFunction(); + + *pFunctionInstance = (IBase*)(pBaseFunctionInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("FunctionInstance", *pFunctionInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_model_addfunctionfromimage3d(Lib3MF_Model pModel, Lib3MF_Image3D pImage3DInstance, Lib3MF_FunctionFromImage3D * pFunctionInstance) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "AddFunctionFromImage3D"); + pJournalEntry->addHandleParameter("Image3DInstance", pImage3DInstance); + } + if (pFunctionInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pIBaseClassImage3DInstance = (IBase *)pImage3DInstance; + IImage3D* pIImage3DInstance = dynamic_cast(pIBaseClassImage3DInstance); + if (!pIImage3DInstance) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IBase* pBaseFunctionInstance(nullptr); + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseFunctionInstance = pIModel->AddFunctionFromImage3D(pIImage3DInstance); + + *pFunctionInstance = (IBase*)(pBaseFunctionInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("FunctionInstance", *pFunctionInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_model_addvolumedata(Lib3MF_Model pModel, Lib3MF_VolumeData * pVolumeDataInstance) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "AddVolumeData"); + } + if (pVolumeDataInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseVolumeDataInstance(nullptr); + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseVolumeDataInstance = pIModel->AddVolumeData(); + + *pVolumeDataInstance = (IBase*)(pBaseVolumeDataInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("VolumeDataInstance", *pVolumeDataInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_model_addlevelset(Lib3MF_Model pModel, Lib3MF_LevelSet * pLevelSetInstance) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "AddLevelSet"); + } + if (pLevelSetInstance == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseLevelSetInstance(nullptr); + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseLevelSetInstance = pIModel->AddLevelSet(); + + *pLevelSetInstance = (IBase*)(pBaseLevelSetInstance); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("LevelSetInstance", *pLevelSetInstance); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_model_getlevelsets(Lib3MF_Model pModel, Lib3MF_LevelSetIterator * pResourceIterator) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "GetLevelSets"); + } + if (pResourceIterator == nullptr) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDPARAM); + IBase* pBaseResourceIterator(nullptr); + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pBaseResourceIterator = pIModel->GetLevelSets(); + + *pResourceIterator = (IBase*)(pBaseResourceIterator); + if (pJournalEntry.get() != nullptr) { + pJournalEntry->addHandleResult("ResourceIterator", *pResourceIterator); + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + +Lib3MFResult lib3mf_model_removeresource(Lib3MF_Model pModel, Lib3MF_Resource pResource) +{ + IBase* pIBaseClass = (IBase *)pModel; + + PLib3MFInterfaceJournalEntry pJournalEntry; + try { + if (m_GlobalJournal.get() != nullptr) { + pJournalEntry = m_GlobalJournal->beginClassMethod(pModel, "Model", "RemoveResource"); + pJournalEntry->addHandleParameter("Resource", pResource); + } + IBase* pIBaseClassResource = (IBase *)pResource; + IResource* pIResource = dynamic_cast(pIBaseClassResource); + if (!pIResource) + throw ELib3MFInterfaceException (LIB3MF_ERROR_INVALIDCAST); + + IModel* pIModel = dynamic_cast(pIBaseClass); + if (!pIModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + pIModel->RemoveResource(pIResource); + + if (pJournalEntry.get() != nullptr) { + pJournalEntry->writeSuccess(); + } + return LIB3MF_SUCCESS; + } + catch (ELib3MFInterfaceException & Exception) { + return handleLib3MFException(pIBaseClass, Exception, pJournalEntry.get()); + } + catch (std::exception & StdException) { + return handleStdException(pIBaseClass, StdException, pJournalEntry.get()); + } + catch (...) { + return handleUnhandledException(pIBaseClass, pJournalEntry.get()); + } +} + /************************************************************************************************************************* @@ -12890,6 +22755,12 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_compositematerialsiterator_getcurrentcompositematerials; if (sProcName == "lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup") *ppProcAddress = (void*) &lib3mf_multipropertygroupiterator_getcurrentmultipropertygroup; + if (sProcName == "lib3mf_image3diterator_getcurrentimage3d") + *ppProcAddress = (void*) &lib3mf_image3diterator_getcurrentimage3d; + if (sProcName == "lib3mf_functioniterator_getcurrentfunction") + *ppProcAddress = (void*) &lib3mf_functioniterator_getcurrentfunction; + if (sProcName == "lib3mf_levelsetiterator_getcurrentlevelset") + *ppProcAddress = (void*) &lib3mf_levelsetiterator_getcurrentlevelset; if (sProcName == "lib3mf_metadata_getnamespace") *ppProcAddress = (void*) &lib3mf_metadata_getnamespace; if (sProcName == "lib3mf_metadata_setnamespace") @@ -12940,6 +22811,8 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_object_ismeshobject; if (sProcName == "lib3mf_object_iscomponentsobject") *ppProcAddress = (void*) &lib3mf_object_iscomponentsobject; + if (sProcName == "lib3mf_object_islevelsetobject") + *ppProcAddress = (void*) &lib3mf_object_islevelsetobject; if (sProcName == "lib3mf_object_isvalid") *ppProcAddress = (void*) &lib3mf_object_isvalid; if (sProcName == "lib3mf_object_setattachmentasthumbnail") @@ -13008,6 +22881,42 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_meshobject_ismanifoldandoriented; if (sProcName == "lib3mf_meshobject_beamlattice") *ppProcAddress = (void*) &lib3mf_meshobject_beamlattice; + if (sProcName == "lib3mf_meshobject_getvolumedata") + *ppProcAddress = (void*) &lib3mf_meshobject_getvolumedata; + if (sProcName == "lib3mf_meshobject_setvolumedata") + *ppProcAddress = (void*) &lib3mf_meshobject_setvolumedata; + if (sProcName == "lib3mf_levelset_getfunction") + *ppProcAddress = (void*) &lib3mf_levelset_getfunction; + if (sProcName == "lib3mf_levelset_setfunction") + *ppProcAddress = (void*) &lib3mf_levelset_setfunction; + if (sProcName == "lib3mf_levelset_gettransform") + *ppProcAddress = (void*) &lib3mf_levelset_gettransform; + if (sProcName == "lib3mf_levelset_settransform") + *ppProcAddress = (void*) &lib3mf_levelset_settransform; + if (sProcName == "lib3mf_levelset_getchannelname") + *ppProcAddress = (void*) &lib3mf_levelset_getchannelname; + if (sProcName == "lib3mf_levelset_setchannelname") + *ppProcAddress = (void*) &lib3mf_levelset_setchannelname; + if (sProcName == "lib3mf_levelset_setminfeaturesize") + *ppProcAddress = (void*) &lib3mf_levelset_setminfeaturesize; + if (sProcName == "lib3mf_levelset_getminfeaturesize") + *ppProcAddress = (void*) &lib3mf_levelset_getminfeaturesize; + if (sProcName == "lib3mf_levelset_setfallbackvalue") + *ppProcAddress = (void*) &lib3mf_levelset_setfallbackvalue; + if (sProcName == "lib3mf_levelset_getfallbackvalue") + *ppProcAddress = (void*) &lib3mf_levelset_getfallbackvalue; + if (sProcName == "lib3mf_levelset_setmeshbboxonly") + *ppProcAddress = (void*) &lib3mf_levelset_setmeshbboxonly; + if (sProcName == "lib3mf_levelset_getmeshbboxonly") + *ppProcAddress = (void*) &lib3mf_levelset_getmeshbboxonly; + if (sProcName == "lib3mf_levelset_setmesh") + *ppProcAddress = (void*) &lib3mf_levelset_setmesh; + if (sProcName == "lib3mf_levelset_getmesh") + *ppProcAddress = (void*) &lib3mf_levelset_getmesh; + if (sProcName == "lib3mf_levelset_getvolumedata") + *ppProcAddress = (void*) &lib3mf_levelset_getvolumedata; + if (sProcName == "lib3mf_levelset_setvolumedata") + *ppProcAddress = (void*) &lib3mf_levelset_setvolumedata; if (sProcName == "lib3mf_beamlattice_getminlength") *ppProcAddress = (void*) &lib3mf_beamlattice_getminlength; if (sProcName == "lib3mf_beamlattice_setminlength") @@ -13054,6 +22963,64 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_beamlattice_addbeamset; if (sProcName == "lib3mf_beamlattice_getbeamset") *ppProcAddress = (void*) &lib3mf_beamlattice_getbeamset; + if (sProcName == "lib3mf_functionreference_getfunctionresourceid") + *ppProcAddress = (void*) &lib3mf_functionreference_getfunctionresourceid; + if (sProcName == "lib3mf_functionreference_setfunctionresourceid") + *ppProcAddress = (void*) &lib3mf_functionreference_setfunctionresourceid; + if (sProcName == "lib3mf_functionreference_gettransform") + *ppProcAddress = (void*) &lib3mf_functionreference_gettransform; + if (sProcName == "lib3mf_functionreference_settransform") + *ppProcAddress = (void*) &lib3mf_functionreference_settransform; + if (sProcName == "lib3mf_functionreference_getchannelname") + *ppProcAddress = (void*) &lib3mf_functionreference_getchannelname; + if (sProcName == "lib3mf_functionreference_setchannelname") + *ppProcAddress = (void*) &lib3mf_functionreference_setchannelname; + if (sProcName == "lib3mf_functionreference_setminfeaturesize") + *ppProcAddress = (void*) &lib3mf_functionreference_setminfeaturesize; + if (sProcName == "lib3mf_functionreference_getminfeaturesize") + *ppProcAddress = (void*) &lib3mf_functionreference_getminfeaturesize; + if (sProcName == "lib3mf_functionreference_setfallbackvalue") + *ppProcAddress = (void*) &lib3mf_functionreference_setfallbackvalue; + if (sProcName == "lib3mf_functionreference_getfallbackvalue") + *ppProcAddress = (void*) &lib3mf_functionreference_getfallbackvalue; + if (sProcName == "lib3mf_volumedatacomposite_getbasematerialgroup") + *ppProcAddress = (void*) &lib3mf_volumedatacomposite_getbasematerialgroup; + if (sProcName == "lib3mf_volumedatacomposite_setbasematerialgroup") + *ppProcAddress = (void*) &lib3mf_volumedatacomposite_setbasematerialgroup; + if (sProcName == "lib3mf_volumedatacomposite_getmaterialmappingcount") + *ppProcAddress = (void*) &lib3mf_volumedatacomposite_getmaterialmappingcount; + if (sProcName == "lib3mf_volumedatacomposite_getmaterialmapping") + *ppProcAddress = (void*) &lib3mf_volumedatacomposite_getmaterialmapping; + if (sProcName == "lib3mf_volumedatacomposite_addmaterialmapping") + *ppProcAddress = (void*) &lib3mf_volumedatacomposite_addmaterialmapping; + if (sProcName == "lib3mf_volumedatacomposite_removematerialmapping") + *ppProcAddress = (void*) &lib3mf_volumedatacomposite_removematerialmapping; + if (sProcName == "lib3mf_volumedataproperty_getname") + *ppProcAddress = (void*) &lib3mf_volumedataproperty_getname; + if (sProcName == "lib3mf_volumedataproperty_setisrequired") + *ppProcAddress = (void*) &lib3mf_volumedataproperty_setisrequired; + if (sProcName == "lib3mf_volumedataproperty_isrequired") + *ppProcAddress = (void*) &lib3mf_volumedataproperty_isrequired; + if (sProcName == "lib3mf_volumedata_getcomposite") + *ppProcAddress = (void*) &lib3mf_volumedata_getcomposite; + if (sProcName == "lib3mf_volumedata_createnewcomposite") + *ppProcAddress = (void*) &lib3mf_volumedata_createnewcomposite; + if (sProcName == "lib3mf_volumedata_removecomposite") + *ppProcAddress = (void*) &lib3mf_volumedata_removecomposite; + if (sProcName == "lib3mf_volumedata_getcolor") + *ppProcAddress = (void*) &lib3mf_volumedata_getcolor; + if (sProcName == "lib3mf_volumedata_createnewcolor") + *ppProcAddress = (void*) &lib3mf_volumedata_createnewcolor; + if (sProcName == "lib3mf_volumedata_removecolor") + *ppProcAddress = (void*) &lib3mf_volumedata_removecolor; + if (sProcName == "lib3mf_volumedata_getpropertycount") + *ppProcAddress = (void*) &lib3mf_volumedata_getpropertycount; + if (sProcName == "lib3mf_volumedata_getproperty") + *ppProcAddress = (void*) &lib3mf_volumedata_getproperty; + if (sProcName == "lib3mf_volumedata_addpropertyfromfunction") + *ppProcAddress = (void*) &lib3mf_volumedata_addpropertyfromfunction; + if (sProcName == "lib3mf_volumedata_removeproperty") + *ppProcAddress = (void*) &lib3mf_volumedata_removeproperty; if (sProcName == "lib3mf_component_getobjectresource") *ppProcAddress = (void*) &lib3mf_component_getobjectresource; if (sProcName == "lib3mf_component_getobjectresourceid") @@ -13166,6 +23133,32 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_multipropertygroup_getlayer; if (sProcName == "lib3mf_multipropertygroup_removelayer") *ppProcAddress = (void*) &lib3mf_multipropertygroup_removelayer; + if (sProcName == "lib3mf_image3d_getname") + *ppProcAddress = (void*) &lib3mf_image3d_getname; + if (sProcName == "lib3mf_image3d_setname") + *ppProcAddress = (void*) &lib3mf_image3d_setname; + if (sProcName == "lib3mf_image3d_isimagestack") + *ppProcAddress = (void*) &lib3mf_image3d_isimagestack; + if (sProcName == "lib3mf_imagestack_getrowcount") + *ppProcAddress = (void*) &lib3mf_imagestack_getrowcount; + if (sProcName == "lib3mf_imagestack_setrowcount") + *ppProcAddress = (void*) &lib3mf_imagestack_setrowcount; + if (sProcName == "lib3mf_imagestack_getcolumncount") + *ppProcAddress = (void*) &lib3mf_imagestack_getcolumncount; + if (sProcName == "lib3mf_imagestack_setcolumncount") + *ppProcAddress = (void*) &lib3mf_imagestack_setcolumncount; + if (sProcName == "lib3mf_imagestack_getsheetcount") + *ppProcAddress = (void*) &lib3mf_imagestack_getsheetcount; + if (sProcName == "lib3mf_imagestack_getsheet") + *ppProcAddress = (void*) &lib3mf_imagestack_getsheet; + if (sProcName == "lib3mf_imagestack_setsheet") + *ppProcAddress = (void*) &lib3mf_imagestack_setsheet; + if (sProcName == "lib3mf_imagestack_createemptysheet") + *ppProcAddress = (void*) &lib3mf_imagestack_createemptysheet; + if (sProcName == "lib3mf_imagestack_createsheetfrombuffer") + *ppProcAddress = (void*) &lib3mf_imagestack_createsheetfrombuffer; + if (sProcName == "lib3mf_imagestack_createsheetfromfile") + *ppProcAddress = (void*) &lib3mf_imagestack_createsheetfromfile; if (sProcName == "lib3mf_attachment_getpath") *ppProcAddress = (void*) &lib3mf_attachment_getpath; if (sProcName == "lib3mf_attachment_setpath") @@ -13204,6 +23197,340 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_texture2d_getfilter; if (sProcName == "lib3mf_texture2d_setfilter") *ppProcAddress = (void*) &lib3mf_texture2d_setfilter; + if (sProcName == "lib3mf_implicitport_getidentifier") + *ppProcAddress = (void*) &lib3mf_implicitport_getidentifier; + if (sProcName == "lib3mf_implicitport_setidentifier") + *ppProcAddress = (void*) &lib3mf_implicitport_setidentifier; + if (sProcName == "lib3mf_implicitport_getdisplayname") + *ppProcAddress = (void*) &lib3mf_implicitport_getdisplayname; + if (sProcName == "lib3mf_implicitport_setdisplayname") + *ppProcAddress = (void*) &lib3mf_implicitport_setdisplayname; + if (sProcName == "lib3mf_implicitport_settype") + *ppProcAddress = (void*) &lib3mf_implicitport_settype; + if (sProcName == "lib3mf_implicitport_gettype") + *ppProcAddress = (void*) &lib3mf_implicitport_gettype; + if (sProcName == "lib3mf_implicitport_getreference") + *ppProcAddress = (void*) &lib3mf_implicitport_getreference; + if (sProcName == "lib3mf_implicitport_setreference") + *ppProcAddress = (void*) &lib3mf_implicitport_setreference; + if (sProcName == "lib3mf_iterator_movenext") + *ppProcAddress = (void*) &lib3mf_iterator_movenext; + if (sProcName == "lib3mf_iterator_moveprevious") + *ppProcAddress = (void*) &lib3mf_iterator_moveprevious; + if (sProcName == "lib3mf_iterator_count") + *ppProcAddress = (void*) &lib3mf_iterator_count; + if (sProcName == "lib3mf_implicitportiterator_getcurrent") + *ppProcAddress = (void*) &lib3mf_implicitportiterator_getcurrent; + if (sProcName == "lib3mf_implicitnode_getidentifier") + *ppProcAddress = (void*) &lib3mf_implicitnode_getidentifier; + if (sProcName == "lib3mf_implicitnode_setidentifier") + *ppProcAddress = (void*) &lib3mf_implicitnode_setidentifier; + if (sProcName == "lib3mf_implicitnode_getdisplayname") + *ppProcAddress = (void*) &lib3mf_implicitnode_getdisplayname; + if (sProcName == "lib3mf_implicitnode_setdisplayname") + *ppProcAddress = (void*) &lib3mf_implicitnode_setdisplayname; + if (sProcName == "lib3mf_implicitnode_gettag") + *ppProcAddress = (void*) &lib3mf_implicitnode_gettag; + if (sProcName == "lib3mf_implicitnode_settag") + *ppProcAddress = (void*) &lib3mf_implicitnode_settag; + if (sProcName == "lib3mf_implicitnode_getnodetype") + *ppProcAddress = (void*) &lib3mf_implicitnode_getnodetype; + if (sProcName == "lib3mf_implicitnode_addinput") + *ppProcAddress = (void*) &lib3mf_implicitnode_addinput; + if (sProcName == "lib3mf_implicitnode_getinputs") + *ppProcAddress = (void*) &lib3mf_implicitnode_getinputs; + if (sProcName == "lib3mf_implicitnode_addoutput") + *ppProcAddress = (void*) &lib3mf_implicitnode_addoutput; + if (sProcName == "lib3mf_implicitnode_getoutputs") + *ppProcAddress = (void*) &lib3mf_implicitnode_getoutputs; + if (sProcName == "lib3mf_implicitnode_findinput") + *ppProcAddress = (void*) &lib3mf_implicitnode_findinput; + if (sProcName == "lib3mf_implicitnode_findoutput") + *ppProcAddress = (void*) &lib3mf_implicitnode_findoutput; + if (sProcName == "lib3mf_implicitnode_aretypesvalid") + *ppProcAddress = (void*) &lib3mf_implicitnode_aretypesvalid; + if (sProcName == "lib3mf_oneinputnode_getinputa") + *ppProcAddress = (void*) &lib3mf_oneinputnode_getinputa; + if (sProcName == "lib3mf_oneinputnode_getoutputresult") + *ppProcAddress = (void*) &lib3mf_oneinputnode_getoutputresult; + if (sProcName == "lib3mf_resourceidnode_setresource") + *ppProcAddress = (void*) &lib3mf_resourceidnode_setresource; + if (sProcName == "lib3mf_resourceidnode_getresource") + *ppProcAddress = (void*) &lib3mf_resourceidnode_getresource; + if (sProcName == "lib3mf_resourceidnode_getoutputvalue") + *ppProcAddress = (void*) &lib3mf_resourceidnode_getoutputvalue; + if (sProcName == "lib3mf_twoinputnode_getinputb") + *ppProcAddress = (void*) &lib3mf_twoinputnode_getinputb; + if (sProcName == "lib3mf_selectnode_getinputb") + *ppProcAddress = (void*) &lib3mf_selectnode_getinputb; + if (sProcName == "lib3mf_selectnode_getinputc") + *ppProcAddress = (void*) &lib3mf_selectnode_getinputc; + if (sProcName == "lib3mf_selectnode_getinputd") + *ppProcAddress = (void*) &lib3mf_selectnode_getinputd; + if (sProcName == "lib3mf_clampnode_getinputmin") + *ppProcAddress = (void*) &lib3mf_clampnode_getinputmin; + if (sProcName == "lib3mf_clampnode_getinputmax") + *ppProcAddress = (void*) &lib3mf_clampnode_getinputmax; + if (sProcName == "lib3mf_composevectornode_getinputx") + *ppProcAddress = (void*) &lib3mf_composevectornode_getinputx; + if (sProcName == "lib3mf_composevectornode_getinputy") + *ppProcAddress = (void*) &lib3mf_composevectornode_getinputy; + if (sProcName == "lib3mf_composevectornode_getinputz") + *ppProcAddress = (void*) &lib3mf_composevectornode_getinputz; + if (sProcName == "lib3mf_composevectornode_getoutputresult") + *ppProcAddress = (void*) &lib3mf_composevectornode_getoutputresult; + if (sProcName == "lib3mf_decomposevectornode_getinputa") + *ppProcAddress = (void*) &lib3mf_decomposevectornode_getinputa; + if (sProcName == "lib3mf_decomposevectornode_getoutputx") + *ppProcAddress = (void*) &lib3mf_decomposevectornode_getoutputx; + if (sProcName == "lib3mf_decomposevectornode_getoutputy") + *ppProcAddress = (void*) &lib3mf_decomposevectornode_getoutputy; + if (sProcName == "lib3mf_decomposevectornode_getoutputz") + *ppProcAddress = (void*) &lib3mf_decomposevectornode_getoutputz; + if (sProcName == "lib3mf_composematrixnode_getinputm00") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm00; + if (sProcName == "lib3mf_composematrixnode_getinputm01") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm01; + if (sProcName == "lib3mf_composematrixnode_getinputm02") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm02; + if (sProcName == "lib3mf_composematrixnode_getinputm03") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm03; + if (sProcName == "lib3mf_composematrixnode_getinputm10") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm10; + if (sProcName == "lib3mf_composematrixnode_getinputm11") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm11; + if (sProcName == "lib3mf_composematrixnode_getinputm12") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm12; + if (sProcName == "lib3mf_composematrixnode_getinputm13") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm13; + if (sProcName == "lib3mf_composematrixnode_getinputm20") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm20; + if (sProcName == "lib3mf_composematrixnode_getinputm21") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm21; + if (sProcName == "lib3mf_composematrixnode_getinputm22") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm22; + if (sProcName == "lib3mf_composematrixnode_getinputm23") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm23; + if (sProcName == "lib3mf_composematrixnode_getinputm30") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm30; + if (sProcName == "lib3mf_composematrixnode_getinputm31") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm31; + if (sProcName == "lib3mf_composematrixnode_getinputm32") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm32; + if (sProcName == "lib3mf_composematrixnode_getinputm33") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getinputm33; + if (sProcName == "lib3mf_composematrixnode_getoutputresult") + *ppProcAddress = (void*) &lib3mf_composematrixnode_getoutputresult; + if (sProcName == "lib3mf_matrixfromrowsnode_getinputa") + *ppProcAddress = (void*) &lib3mf_matrixfromrowsnode_getinputa; + if (sProcName == "lib3mf_matrixfromrowsnode_getinputb") + *ppProcAddress = (void*) &lib3mf_matrixfromrowsnode_getinputb; + if (sProcName == "lib3mf_matrixfromrowsnode_getinputc") + *ppProcAddress = (void*) &lib3mf_matrixfromrowsnode_getinputc; + if (sProcName == "lib3mf_matrixfromrowsnode_getinputd") + *ppProcAddress = (void*) &lib3mf_matrixfromrowsnode_getinputd; + if (sProcName == "lib3mf_matrixfromrowsnode_getoutputresult") + *ppProcAddress = (void*) &lib3mf_matrixfromrowsnode_getoutputresult; + if (sProcName == "lib3mf_matrixfromcolumnsnode_getinputa") + *ppProcAddress = (void*) &lib3mf_matrixfromcolumnsnode_getinputa; + if (sProcName == "lib3mf_matrixfromcolumnsnode_getinputb") + *ppProcAddress = (void*) &lib3mf_matrixfromcolumnsnode_getinputb; + if (sProcName == "lib3mf_matrixfromcolumnsnode_getinputc") + *ppProcAddress = (void*) &lib3mf_matrixfromcolumnsnode_getinputc; + if (sProcName == "lib3mf_matrixfromcolumnsnode_getinputd") + *ppProcAddress = (void*) &lib3mf_matrixfromcolumnsnode_getinputd; + if (sProcName == "lib3mf_matrixfromcolumnsnode_getoutputresult") + *ppProcAddress = (void*) &lib3mf_matrixfromcolumnsnode_getoutputresult; + if (sProcName == "lib3mf_constantnode_setconstant") + *ppProcAddress = (void*) &lib3mf_constantnode_setconstant; + if (sProcName == "lib3mf_constantnode_getconstant") + *ppProcAddress = (void*) &lib3mf_constantnode_getconstant; + if (sProcName == "lib3mf_constantnode_getoutputvalue") + *ppProcAddress = (void*) &lib3mf_constantnode_getoutputvalue; + if (sProcName == "lib3mf_constvecnode_setvector") + *ppProcAddress = (void*) &lib3mf_constvecnode_setvector; + if (sProcName == "lib3mf_constvecnode_getvector") + *ppProcAddress = (void*) &lib3mf_constvecnode_getvector; + if (sProcName == "lib3mf_constvecnode_getoutputvector") + *ppProcAddress = (void*) &lib3mf_constvecnode_getoutputvector; + if (sProcName == "lib3mf_constmatnode_setmatrix") + *ppProcAddress = (void*) &lib3mf_constmatnode_setmatrix; + if (sProcName == "lib3mf_constmatnode_getmatrix") + *ppProcAddress = (void*) &lib3mf_constmatnode_getmatrix; + if (sProcName == "lib3mf_constmatnode_getoutputmatrix") + *ppProcAddress = (void*) &lib3mf_constmatnode_getoutputmatrix; + if (sProcName == "lib3mf_meshnode_getinputmesh") + *ppProcAddress = (void*) &lib3mf_meshnode_getinputmesh; + if (sProcName == "lib3mf_meshnode_getinputpos") + *ppProcAddress = (void*) &lib3mf_meshnode_getinputpos; + if (sProcName == "lib3mf_meshnode_getoutputdistance") + *ppProcAddress = (void*) &lib3mf_meshnode_getoutputdistance; + if (sProcName == "lib3mf_unsignedmeshnode_getinputmesh") + *ppProcAddress = (void*) &lib3mf_unsignedmeshnode_getinputmesh; + if (sProcName == "lib3mf_unsignedmeshnode_getinputpos") + *ppProcAddress = (void*) &lib3mf_unsignedmeshnode_getinputpos; + if (sProcName == "lib3mf_unsignedmeshnode_getoutputdistance") + *ppProcAddress = (void*) &lib3mf_unsignedmeshnode_getoutputdistance; + if (sProcName == "lib3mf_functioncallnode_getinputfunctionid") + *ppProcAddress = (void*) &lib3mf_functioncallnode_getinputfunctionid; + if (sProcName == "lib3mf_nodeiterator_getcurrent") + *ppProcAddress = (void*) &lib3mf_nodeiterator_getcurrent; + if (sProcName == "lib3mf_function_getdisplayname") + *ppProcAddress = (void*) &lib3mf_function_getdisplayname; + if (sProcName == "lib3mf_function_setdisplayname") + *ppProcAddress = (void*) &lib3mf_function_setdisplayname; + if (sProcName == "lib3mf_function_addinput") + *ppProcAddress = (void*) &lib3mf_function_addinput; + if (sProcName == "lib3mf_function_getinputs") + *ppProcAddress = (void*) &lib3mf_function_getinputs; + if (sProcName == "lib3mf_function_removeinput") + *ppProcAddress = (void*) &lib3mf_function_removeinput; + if (sProcName == "lib3mf_function_addoutput") + *ppProcAddress = (void*) &lib3mf_function_addoutput; + if (sProcName == "lib3mf_function_getoutputs") + *ppProcAddress = (void*) &lib3mf_function_getoutputs; + if (sProcName == "lib3mf_function_removeoutput") + *ppProcAddress = (void*) &lib3mf_function_removeoutput; + if (sProcName == "lib3mf_function_findinput") + *ppProcAddress = (void*) &lib3mf_function_findinput; + if (sProcName == "lib3mf_function_findoutput") + *ppProcAddress = (void*) &lib3mf_function_findoutput; + if (sProcName == "lib3mf_implicitfunction_getidentifier") + *ppProcAddress = (void*) &lib3mf_implicitfunction_getidentifier; + if (sProcName == "lib3mf_implicitfunction_setidentifier") + *ppProcAddress = (void*) &lib3mf_implicitfunction_setidentifier; + if (sProcName == "lib3mf_implicitfunction_addnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addnode; + if (sProcName == "lib3mf_implicitfunction_addsinnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addsinnode; + if (sProcName == "lib3mf_implicitfunction_addcosnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addcosnode; + if (sProcName == "lib3mf_implicitfunction_addtannode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addtannode; + if (sProcName == "lib3mf_implicitfunction_addarcsinnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addarcsinnode; + if (sProcName == "lib3mf_implicitfunction_addarccosnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addarccosnode; + if (sProcName == "lib3mf_implicitfunction_addarctan2node") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addarctan2node; + if (sProcName == "lib3mf_implicitfunction_addsinhnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addsinhnode; + if (sProcName == "lib3mf_implicitfunction_addcoshnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addcoshnode; + if (sProcName == "lib3mf_implicitfunction_addtanhnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addtanhnode; + if (sProcName == "lib3mf_implicitfunction_addroundnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addroundnode; + if (sProcName == "lib3mf_implicitfunction_addceilnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addceilnode; + if (sProcName == "lib3mf_implicitfunction_addfloornode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addfloornode; + if (sProcName == "lib3mf_implicitfunction_addsignnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addsignnode; + if (sProcName == "lib3mf_implicitfunction_addfractnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addfractnode; + if (sProcName == "lib3mf_implicitfunction_addabsnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addabsnode; + if (sProcName == "lib3mf_implicitfunction_addexpnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addexpnode; + if (sProcName == "lib3mf_implicitfunction_addlognode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addlognode; + if (sProcName == "lib3mf_implicitfunction_addlog2node") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addlog2node; + if (sProcName == "lib3mf_implicitfunction_addlog10node") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addlog10node; + if (sProcName == "lib3mf_implicitfunction_addlengthnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addlengthnode; + if (sProcName == "lib3mf_implicitfunction_addtransposenode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addtransposenode; + if (sProcName == "lib3mf_implicitfunction_inversenode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_inversenode; + if (sProcName == "lib3mf_implicitfunction_addsqrtnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addsqrtnode; + if (sProcName == "lib3mf_implicitfunction_addresourceidnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addresourceidnode; + if (sProcName == "lib3mf_implicitfunction_addadditionnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addadditionnode; + if (sProcName == "lib3mf_implicitfunction_addsubtractionnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addsubtractionnode; + if (sProcName == "lib3mf_implicitfunction_addmultiplicationnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addmultiplicationnode; + if (sProcName == "lib3mf_implicitfunction_adddivisionnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_adddivisionnode; + if (sProcName == "lib3mf_implicitfunction_adddotnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_adddotnode; + if (sProcName == "lib3mf_implicitfunction_addcrossnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addcrossnode; + if (sProcName == "lib3mf_implicitfunction_addmatvecmultiplicationnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addmatvecmultiplicationnode; + if (sProcName == "lib3mf_implicitfunction_addminnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addminnode; + if (sProcName == "lib3mf_implicitfunction_addmaxnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addmaxnode; + if (sProcName == "lib3mf_implicitfunction_addfmodnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addfmodnode; + if (sProcName == "lib3mf_implicitfunction_addpownode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addpownode; + if (sProcName == "lib3mf_implicitfunction_addselectnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addselectnode; + if (sProcName == "lib3mf_implicitfunction_addclampnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addclampnode; + if (sProcName == "lib3mf_implicitfunction_addcomposevectornode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addcomposevectornode; + if (sProcName == "lib3mf_implicitfunction_addvectorfromscalarnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addvectorfromscalarnode; + if (sProcName == "lib3mf_implicitfunction_adddecomposevectornode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_adddecomposevectornode; + if (sProcName == "lib3mf_implicitfunction_addcomposematrixnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addcomposematrixnode; + if (sProcName == "lib3mf_implicitfunction_addmatrixfromrowsnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addmatrixfromrowsnode; + if (sProcName == "lib3mf_implicitfunction_addmatrixfromcolumnsnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addmatrixfromcolumnsnode; + if (sProcName == "lib3mf_implicitfunction_addconstantnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addconstantnode; + if (sProcName == "lib3mf_implicitfunction_addconstvecnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addconstvecnode; + if (sProcName == "lib3mf_implicitfunction_addconstmatnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addconstmatnode; + if (sProcName == "lib3mf_implicitfunction_addmeshnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addmeshnode; + if (sProcName == "lib3mf_implicitfunction_addunsignedmeshnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addunsignedmeshnode; + if (sProcName == "lib3mf_implicitfunction_addfunctioncallnode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addfunctioncallnode; + if (sProcName == "lib3mf_implicitfunction_getnodes") + *ppProcAddress = (void*) &lib3mf_implicitfunction_getnodes; + if (sProcName == "lib3mf_implicitfunction_removenode") + *ppProcAddress = (void*) &lib3mf_implicitfunction_removenode; + if (sProcName == "lib3mf_implicitfunction_addlink") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addlink; + if (sProcName == "lib3mf_implicitfunction_addlinkbynames") + *ppProcAddress = (void*) &lib3mf_implicitfunction_addlinkbynames; + if (sProcName == "lib3mf_implicitfunction_clear") + *ppProcAddress = (void*) &lib3mf_implicitfunction_clear; + if (sProcName == "lib3mf_implicitfunction_sortnodestopologically") + *ppProcAddress = (void*) &lib3mf_implicitfunction_sortnodestopologically; + if (sProcName == "lib3mf_functionfromimage3d_getimage3d") + *ppProcAddress = (void*) &lib3mf_functionfromimage3d_getimage3d; + if (sProcName == "lib3mf_functionfromimage3d_setimage3d") + *ppProcAddress = (void*) &lib3mf_functionfromimage3d_setimage3d; + if (sProcName == "lib3mf_functionfromimage3d_setfilter") + *ppProcAddress = (void*) &lib3mf_functionfromimage3d_setfilter; + if (sProcName == "lib3mf_functionfromimage3d_getfilter") + *ppProcAddress = (void*) &lib3mf_functionfromimage3d_getfilter; + if (sProcName == "lib3mf_functionfromimage3d_settilestyles") + *ppProcAddress = (void*) &lib3mf_functionfromimage3d_settilestyles; + if (sProcName == "lib3mf_functionfromimage3d_gettilestyles") + *ppProcAddress = (void*) &lib3mf_functionfromimage3d_gettilestyles; + if (sProcName == "lib3mf_functionfromimage3d_getoffset") + *ppProcAddress = (void*) &lib3mf_functionfromimage3d_getoffset; + if (sProcName == "lib3mf_functionfromimage3d_setoffset") + *ppProcAddress = (void*) &lib3mf_functionfromimage3d_setoffset; + if (sProcName == "lib3mf_functionfromimage3d_getscale") + *ppProcAddress = (void*) &lib3mf_functionfromimage3d_getscale; + if (sProcName == "lib3mf_functionfromimage3d_setscale") + *ppProcAddress = (void*) &lib3mf_functionfromimage3d_setscale; if (sProcName == "lib3mf_builditem_getobjectresource") *ppProcAddress = (void*) &lib3mf_builditem_getobjectresource; if (sProcName == "lib3mf_builditem_getuuid") @@ -13392,6 +23719,8 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_model_getcolorgroupbyid; if (sProcName == "lib3mf_model_getslicestackbyid") *ppProcAddress = (void*) &lib3mf_model_getslicestackbyid; + if (sProcName == "lib3mf_model_getlevelsetbyid") + *ppProcAddress = (void*) &lib3mf_model_getlevelsetbyid; if (sProcName == "lib3mf_model_getbuilduuid") *ppProcAddress = (void*) &lib3mf_model_getbuilduuid; if (sProcName == "lib3mf_model_setbuilduuid") @@ -13422,8 +23751,12 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_model_getmultipropertygroups; if (sProcName == "lib3mf_model_getslicestacks") *ppProcAddress = (void*) &lib3mf_model_getslicestacks; + if (sProcName == "lib3mf_model_getimage3ds") + *ppProcAddress = (void*) &lib3mf_model_getimage3ds; if (sProcName == "lib3mf_model_mergetomodel") *ppProcAddress = (void*) &lib3mf_model_mergetomodel; + if (sProcName == "lib3mf_model_mergefrommodel") + *ppProcAddress = (void*) &lib3mf_model_mergefrommodel; if (sProcName == "lib3mf_model_addmeshobject") *ppProcAddress = (void*) &lib3mf_model_addmeshobject; if (sProcName == "lib3mf_model_addcomponentsobject") @@ -13442,6 +23775,10 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_model_addcompositematerials; if (sProcName == "lib3mf_model_addmultipropertygroup") *ppProcAddress = (void*) &lib3mf_model_addmultipropertygroup; + if (sProcName == "lib3mf_model_addimagestack") + *ppProcAddress = (void*) &lib3mf_model_addimagestack; + if (sProcName == "lib3mf_model_getimagestackbyid") + *ppProcAddress = (void*) &lib3mf_model_getimagestackbyid; if (sProcName == "lib3mf_model_addbuilditem") *ppProcAddress = (void*) &lib3mf_model_addbuilditem; if (sProcName == "lib3mf_model_removebuilditem") @@ -13474,6 +23811,20 @@ Lib3MFResult Lib3MF::Impl::Lib3MF_GetProcAddress (const char * pProcName, void * *ppProcAddress = (void*) &lib3mf_model_setrandomnumbercallback; if (sProcName == "lib3mf_model_getkeystore") *ppProcAddress = (void*) &lib3mf_model_getkeystore; + if (sProcName == "lib3mf_model_getfunctions") + *ppProcAddress = (void*) &lib3mf_model_getfunctions; + if (sProcName == "lib3mf_model_addimplicitfunction") + *ppProcAddress = (void*) &lib3mf_model_addimplicitfunction; + if (sProcName == "lib3mf_model_addfunctionfromimage3d") + *ppProcAddress = (void*) &lib3mf_model_addfunctionfromimage3d; + if (sProcName == "lib3mf_model_addvolumedata") + *ppProcAddress = (void*) &lib3mf_model_addvolumedata; + if (sProcName == "lib3mf_model_addlevelset") + *ppProcAddress = (void*) &lib3mf_model_addlevelset; + if (sProcName == "lib3mf_model_getlevelsets") + *ppProcAddress = (void*) &lib3mf_model_getlevelsets; + if (sProcName == "lib3mf_model_removeresource") + *ppProcAddress = (void*) &lib3mf_model_removeresource; if (sProcName == "lib3mf_getlibraryversion") *ppProcAddress = (void*) &lib3mf_getlibraryversion; if (sProcName == "lib3mf_getprereleaseinformation") diff --git a/Autogenerated/Source/lib3mf_types.hpp b/Autogenerated/Source/lib3mf_types.hpp index 705f02718..61ecedc56 100644 --- a/Autogenerated/Source/lib3mf_types.hpp +++ b/Autogenerated/Source/lib3mf_types.hpp @@ -1,6 +1,6 @@ /*++ -Copyright (C) 2019 3MF Consortium (Original Author) +Copyright (C) 2024 3MF Consortium (Original Author) All rights reserved. @@ -29,7 +29,7 @@ This file has been generated by the Automatic Component Toolkit (ACT) version 1. Abstract: This is an autogenerated C++-Header file with basic types in order to allow an easy use of the 3MF Library -Interface version: 2.3.2 +Interface version: 2.4.0 */ @@ -83,8 +83,8 @@ typedef void * Lib3MF_pvoid; **************************************************************************************************************************/ #define LIB3MF_VERSION_MAJOR 2 -#define LIB3MF_VERSION_MINOR 3 -#define LIB3MF_VERSION_MICRO 2 +#define LIB3MF_VERSION_MINOR 4 +#define LIB3MF_VERSION_MICRO 0 #define LIB3MF_VERSION_PRERELEASEINFO "" #define LIB3MF_VERSION_BUILDINFO "" @@ -129,13 +129,18 @@ typedef void * Lib3MF_pvoid; #define LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER 140 /** A progress identifier is unknown */ #define LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT 141 /** An element buffer exceeds its spec limit */ #define LIB3MF_ERROR_INVALIDRESOURCE 142 /** A resource is invalid */ +#define LIB3MF_ERROR_INVALIDLEVELSET 143 /** A level set is invalid */ #define LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE 2000 /** This object type is not valid for beamlattices */ #define LIB3MF_ERROR_INVALIDKEYSTORE 3000 /** The keystore object is invalid */ #define LIB3MF_ERROR_INVALIDKEYSTORECONSUMER 3001 /** The consumer keystore object is invalid */ #define LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND 3002 /** A consumer has not been found */ #define LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND 3003 /** A resource data has not been found */ #define LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED 3004 /** A Key or Conentent encryption callback has not been registered */ -#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key siue is invalid */ +#define LIB3MF_ERROR_INVALIDKEYSIZE 3005 /** The key size is invalid */ +#define LIB3MF_ERROR_INCOMPATIBLEPORTTYPES 4000 /** Link could not be added, the port types are incompatible */ +#define LIB3MF_ERROR_GRAPHISCYCLIC 4001 /** The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted. */ +#define LIB3MF_ERROR_INPUTNOTSET 4002 /** The input of a node is not set. */ +#define LIB3MF_ERROR_INVALIDNODECONFIGURATION 4003 /** The selected node configuration is not supported */ /************************************************************************************************************************* Error strings for Lib3MF @@ -180,13 +185,18 @@ inline const char * LIB3MF_GETERRORSTRING (Lib3MFResult nErrorCode) { case LIB3MF_ERROR_UNKOWNPROGRESSIDENTIFIER: return "A progress identifier is unknown"; case LIB3MF_ERROR_ELEMENTCOUNTEXCEEDSLIMIT: return "An element buffer exceeds its spec limit"; case LIB3MF_ERROR_INVALIDRESOURCE: return "A resource is invalid"; + case LIB3MF_ERROR_INVALIDLEVELSET: return "A level set is invalid"; case LIB3MF_ERROR_BEAMLATTICE_INVALID_OBJECTTYPE: return "This object type is not valid for beamlattices"; case LIB3MF_ERROR_INVALIDKEYSTORE: return "The keystore object is invalid"; case LIB3MF_ERROR_INVALIDKEYSTORECONSUMER: return "The consumer keystore object is invalid"; case LIB3MF_ERROR_KEYSTORECONSUMERNOTFOUND: return "A consumer has not been found"; case LIB3MF_ERROR_KEYSTORERESOURCEDATANOTFOUND: return "A resource data has not been found"; case LIB3MF_ERROR_SECURECONTEXTNOTREGISTERED: return "A Key or Conentent encryption callback has not been registered"; - case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key siue is invalid"; + case LIB3MF_ERROR_INVALIDKEYSIZE: return "The key size is invalid"; + case LIB3MF_ERROR_INCOMPATIBLEPORTTYPES: return "Link could not be added, the port types are incompatible"; + case LIB3MF_ERROR_GRAPHISCYCLIC: return "The functin graph is cyclic. Only dircected graphs are valid and can be topological sorted."; + case LIB3MF_ERROR_INPUTNOTSET: return "The input of a node is not set."; + case LIB3MF_ERROR_INVALIDNODECONFIGURATION: return "The selected node configuration is not supported"; default: return "unknown error"; } } @@ -211,11 +221,21 @@ typedef Lib3MFHandle Lib3MF_ColorGroupIterator; typedef Lib3MFHandle Lib3MF_Texture2DGroupIterator; typedef Lib3MFHandle Lib3MF_CompositeMaterialsIterator; typedef Lib3MFHandle Lib3MF_MultiPropertyGroupIterator; +typedef Lib3MFHandle Lib3MF_Image3DIterator; +typedef Lib3MFHandle Lib3MF_FunctionIterator; +typedef Lib3MFHandle Lib3MF_LevelSetIterator; typedef Lib3MFHandle Lib3MF_MetaData; typedef Lib3MFHandle Lib3MF_MetaDataGroup; typedef Lib3MFHandle Lib3MF_Object; typedef Lib3MFHandle Lib3MF_MeshObject; +typedef Lib3MFHandle Lib3MF_LevelSet; typedef Lib3MFHandle Lib3MF_BeamLattice; +typedef Lib3MFHandle Lib3MF_FunctionReference; +typedef Lib3MFHandle Lib3MF_VolumeDataColor; +typedef Lib3MFHandle Lib3MF_MaterialMapping; +typedef Lib3MFHandle Lib3MF_VolumeDataComposite; +typedef Lib3MFHandle Lib3MF_VolumeDataProperty; +typedef Lib3MFHandle Lib3MF_VolumeData; typedef Lib3MFHandle Lib3MF_Component; typedef Lib3MFHandle Lib3MF_ComponentsObject; typedef Lib3MFHandle Lib3MF_BeamSet; @@ -224,8 +244,71 @@ typedef Lib3MFHandle Lib3MF_ColorGroup; typedef Lib3MFHandle Lib3MF_Texture2DGroup; typedef Lib3MFHandle Lib3MF_CompositeMaterials; typedef Lib3MFHandle Lib3MF_MultiPropertyGroup; +typedef Lib3MFHandle Lib3MF_Image3D; +typedef Lib3MFHandle Lib3MF_ImageStack; typedef Lib3MFHandle Lib3MF_Attachment; typedef Lib3MFHandle Lib3MF_Texture2D; +typedef Lib3MFHandle Lib3MF_ImplicitPort; +typedef Lib3MFHandle Lib3MF_Iterator; +typedef Lib3MFHandle Lib3MF_ImplicitPortIterator; +typedef Lib3MFHandle Lib3MF_ImplicitNode; +typedef Lib3MFHandle Lib3MF_OneInputNode; +typedef Lib3MFHandle Lib3MF_SinNode; +typedef Lib3MFHandle Lib3MF_CosNode; +typedef Lib3MFHandle Lib3MF_TanNode; +typedef Lib3MFHandle Lib3MF_ArcSinNode; +typedef Lib3MFHandle Lib3MF_ArcCosNode; +typedef Lib3MFHandle Lib3MF_ArcTanNode; +typedef Lib3MFHandle Lib3MF_SinhNode; +typedef Lib3MFHandle Lib3MF_CoshNode; +typedef Lib3MFHandle Lib3MF_TanhNode; +typedef Lib3MFHandle Lib3MF_RoundNode; +typedef Lib3MFHandle Lib3MF_CeilNode; +typedef Lib3MFHandle Lib3MF_FloorNode; +typedef Lib3MFHandle Lib3MF_SignNode; +typedef Lib3MFHandle Lib3MF_FractNode; +typedef Lib3MFHandle Lib3MF_AbsNode; +typedef Lib3MFHandle Lib3MF_ExpNode; +typedef Lib3MFHandle Lib3MF_LogNode; +typedef Lib3MFHandle Lib3MF_Log2Node; +typedef Lib3MFHandle Lib3MF_Log10Node; +typedef Lib3MFHandle Lib3MF_LengthNode; +typedef Lib3MFHandle Lib3MF_TransposeNode; +typedef Lib3MFHandle Lib3MF_InverseNode; +typedef Lib3MFHandle Lib3MF_SqrtNode; +typedef Lib3MFHandle Lib3MF_ResourceIdNode; +typedef Lib3MFHandle Lib3MF_TwoInputNode; +typedef Lib3MFHandle Lib3MF_AdditionNode; +typedef Lib3MFHandle Lib3MF_SubtractionNode; +typedef Lib3MFHandle Lib3MF_MultiplicationNode; +typedef Lib3MFHandle Lib3MF_DivisionNode; +typedef Lib3MFHandle Lib3MF_DotNode; +typedef Lib3MFHandle Lib3MF_CrossNode; +typedef Lib3MFHandle Lib3MF_ArcTan2Node; +typedef Lib3MFHandle Lib3MF_MatVecMultiplicationNode; +typedef Lib3MFHandle Lib3MF_MinNode; +typedef Lib3MFHandle Lib3MF_MaxNode; +typedef Lib3MFHandle Lib3MF_FmodNode; +typedef Lib3MFHandle Lib3MF_ModNode; +typedef Lib3MFHandle Lib3MF_PowNode; +typedef Lib3MFHandle Lib3MF_SelectNode; +typedef Lib3MFHandle Lib3MF_ClampNode; +typedef Lib3MFHandle Lib3MF_ComposeVectorNode; +typedef Lib3MFHandle Lib3MF_VectorFromScalarNode; +typedef Lib3MFHandle Lib3MF_DecomposeVectorNode; +typedef Lib3MFHandle Lib3MF_ComposeMatrixNode; +typedef Lib3MFHandle Lib3MF_MatrixFromRowsNode; +typedef Lib3MFHandle Lib3MF_MatrixFromColumnsNode; +typedef Lib3MFHandle Lib3MF_ConstantNode; +typedef Lib3MFHandle Lib3MF_ConstVecNode; +typedef Lib3MFHandle Lib3MF_ConstMatNode; +typedef Lib3MFHandle Lib3MF_MeshNode; +typedef Lib3MFHandle Lib3MF_UnsignedMeshNode; +typedef Lib3MFHandle Lib3MF_FunctionCallNode; +typedef Lib3MFHandle Lib3MF_NodeIterator; +typedef Lib3MFHandle Lib3MF_Function; +typedef Lib3MFHandle Lib3MF_ImplicitFunction; +typedef Lib3MFHandle Lib3MF_FunctionFromImage3D; typedef Lib3MFHandle Lib3MF_BuildItem; typedef Lib3MFHandle Lib3MF_BuildItemIterator; typedef Lib3MFHandle Lib3MF_Slice; @@ -306,7 +389,7 @@ namespace Lib3MF { }; enum class eBeamLatticeBallMode : Lib3MF_int32 { - None = 0, + BeamLatticeBallModeNone = 0, Mixed = 1, All = 2 }; @@ -344,6 +427,103 @@ namespace Lib3MF { Multiply = 2 }; + enum class eChannelName : Lib3MF_int32 { + Red = 0, + Green = 1, + Blue = 2, + Alpha = 3 + }; + + enum class eCompositionMethod : Lib3MF_int32 { + WeightedSum = 0, + Multiply = 1, + Min = 2, + Max = 3, + Mask = 4 + }; + + enum class eCompositionSpace : Lib3MF_int32 { + Raw = 0, + LinearColor = 1 + }; + + /** + * enum class eImplicitNodeType - The type of the node + */ + enum class eImplicitNodeType : Lib3MF_int32 { + Addition = 1, /** Adds to values (scalar or vector) */ + Subtraction = 2, /** Subtracts two values (scalar or vector) */ + Multiplication = 3, /** Multiplies two values (scalar or vector) */ + Division = 4, /** Divides two values (scalar or vector) */ + Constant = 5, /** A constant scalar value */ + ConstVec = 6, /** A constant vector value */ + ConstMat = 7, /** A constant matrix value */ + ComposeVector = 8, /** Creates a vector from three scalar values */ + DecomposeVector = 9, /** Decomposes a vector into three scalar values */ + ComposeMatrix = 10, /** Creates a matrix from nine scalar values */ + MatrixFromColumns = 11, /** Creates a matrix from three column vector values */ + MatrixFromRows = 12, /** Creates a matrix from three row vector values */ + Dot = 13, /** Calculates the dot product of two vector values */ + Cross = 14, /** Calculates the cross product of two vector values */ + MatVecMultiplication = 15, /** Multiplies a matrix with a vector */ + Transpose = 16, /** Transposes a matrix */ + Inverse = 17, /** Computes the inverse of a matrix */ + Sinus = 18, /** Calculates the sinus */ + Cosinus = 19, /** Calculates the cosinus */ + Tan = 20, /** Calculates the tangent */ + ArcSin = 21, /** Calculates the arcsinus */ + ArcCos = 22, /** Calculates the arccosinus */ + ArcTan = 23, /** Calculates the arctangent */ + ArcTan2 = 24, /** Calculates the arctangent */ + Min = 25, /** Calculates the minimum tow values */ + Max = 26, /** Calculates the maximum of two values */ + Abs = 27, /** Calcul the absolute value */ + Fmod = 28, /** Computes the remainder of the divison of the inputs (same behavior as C fmod) */ + Pow = 29, /** Calculates the power A^B */ + Sqrt = 30, /** Calculates the square root */ + Exp = 31, /** Exponential function */ + Log = 32, /** Natural logarithmus */ + Log2 = 33, /** Logarithmus to the base 2 */ + Log10 = 34, /** Logarithmus to the base 10 */ + Select = 35, /** If A is less B returns C, else D */ + Clamp = 36, /** Clamps the input value to min and max */ + Sinh = 37, /** Calculates the hyperbolic sine */ + Cosh = 38, /** Calculates the hyperbolic cosine */ + Tanh = 39, /** Calculates the hyperbolic tangent */ + Round = 40, /** Rounds a scalar value to the nearest integer */ + Ceil = 41, /** Rounds a scalar value up to the nearest integer */ + Floor = 42, /** Rounds a scalar value down to the nearest integer */ + Sign = 43, /** Returns the sign */ + Fract = 44, /** Returns the fractional part */ + FunctionCall = 45, /** Calls a function */ + Mesh = 46, /** Calculates the signed distance to a mesh */ + Length = 47, /** Calculates the length of a vector */ + ConstResourceID = 48, /** Selects a resource (function, mesh etc.) */ + VectorFromScalar = 49, /** Creates a vector from one scalar values */ + UnsignedMesh = 50, /** Calculates the unsigned distance to a mesh */ + Mod = 51 /** Calculates the modulo of two values (same behaviour as glsl mod) */ + }; + + /** + * enum class eImplicitPortType - The type of the port + */ + enum class eImplicitPortType : Lib3MF_int32 { + Scalar = 1, /** Scalar */ + Vector = 2, /** Vector */ + Matrix = 3, /** 4x4 Matrix */ + ResourceID = 4 /** Resource ID */ + }; + + /** + * enum class eImplicitNodeConfiguration - Defines the input and output types of a node + */ + enum class eImplicitNodeConfiguration : Lib3MF_int32 { + Default = 1, /** Default */ + ScalarToScalar = 2, /** Scalar -> Scalar */ + VectorToVector = 3, /** Vector -> Vector */ + MatrixToMatrix = 4 /** Matrix -> Matrix */ + }; + enum class eEncryptionAlgorithm : Lib3MF_int32 { AES256_GCM = 1 /** http://www.w3.org/2009/xmlenc11#aes256-gcm */ }; @@ -435,6 +615,14 @@ namespace Lib3MF { Lib3MF_double m_Radius; } sBall; + typedef struct sVector { + Lib3MF_double m_Coordinates[3]; + } sVector; + + typedef struct sMatrix4x4 { + Lib3MF_double m_Field[4][4]; + } sMatrix4x4; + #pragma pack () /************************************************************************************************************************* @@ -530,6 +718,12 @@ typedef Lib3MF::eBeamLatticeClipMode eLib3MFBeamLatticeClipMode; typedef Lib3MF::eBeamLatticeBallMode eLib3MFBeamLatticeBallMode; typedef Lib3MF::eProgressIdentifier eLib3MFProgressIdentifier; typedef Lib3MF::eBlendMethod eLib3MFBlendMethod; +typedef Lib3MF::eChannelName eLib3MFChannelName; +typedef Lib3MF::eCompositionMethod eLib3MFCompositionMethod; +typedef Lib3MF::eCompositionSpace eLib3MFCompositionSpace; +typedef Lib3MF::eImplicitNodeType eLib3MFImplicitNodeType; +typedef Lib3MF::eImplicitPortType eLib3MFImplicitPortType; +typedef Lib3MF::eImplicitNodeConfiguration eLib3MFImplicitNodeConfiguration; typedef Lib3MF::eEncryptionAlgorithm eLib3MFEncryptionAlgorithm; typedef Lib3MF::eWrappingAlgorithm eLib3MFWrappingAlgorithm; typedef Lib3MF::eMgfAlgorithm eLib3MFMgfAlgorithm; @@ -547,6 +741,8 @@ typedef Lib3MF::sBox sLib3MFBox; typedef Lib3MF::sColor sLib3MFColor; typedef Lib3MF::sBeam sLib3MFBeam; typedef Lib3MF::sBall sLib3MFBall; +typedef Lib3MF::sVector sLib3MFVector; +typedef Lib3MF::sMatrix4x4 sLib3MFMatrix4x4; typedef Lib3MF::ProgressCallback Lib3MFProgressCallback; typedef Lib3MF::WriteCallback Lib3MFWriteCallback; typedef Lib3MF::ReadCallback Lib3MFReadCallback; diff --git a/AutomaticComponentToolkit/generateWrapperAndBindingsLinux64.sh b/AutomaticComponentToolkit/generateWrapperAndBindingsLinux64.sh new file mode 100755 index 000000000..4b9751618 --- /dev/null +++ b/AutomaticComponentToolkit/generateWrapperAndBindingsLinux64.sh @@ -0,0 +1,8 @@ +#!/bin/sh +./act.linux64 lib3mf.xml -bindings ../Autogenerated/Bindings -interfaces ../Autogenerated/Source -stubs ../Source/API -suppresslicense -suppressexamples +./act.linux64 lib3mf.xml -stubs ../Include/API -suppresslicense -suppressexamples -suppressbindings -suppressinterfaces + +# remove header form ../Source/API +find ../Source/API -name "*.hpp" -type f -delete +# remove cpp from ../Include/API +find ../Include/API -name "*.cpp" -type f -delete \ No newline at end of file diff --git a/AutomaticComponentToolkit/generateWrapperAndBindingsWin64.sh b/AutomaticComponentToolkit/generateWrapperAndBindingsWin64.sh new file mode 100644 index 000000000..8e12e4632 --- /dev/null +++ b/AutomaticComponentToolkit/generateWrapperAndBindingsWin64.sh @@ -0,0 +1,8 @@ +#!/bin/sh +./act.win64.exe lib3mf.xml -bindings ../Autogenerated/Bindings -interfaces ../Autogenerated/Source -stubs ../Source/API -suppresslicense -suppressexamples +./act.win64.exe lib3mf.xml -stubs ../Include/API -suppresslicense -suppressexamples -suppressbindings -suppressinterfaces + +# remove header form ../Source/API +find ../Source/API -name "*.hpp" -type f -delete +# remove cpp from ../Include/API +find ../Include/API -name "*.cpp" -type f -delete \ No newline at end of file diff --git a/AutomaticComponentToolkit/lib3mf.xml b/AutomaticComponentToolkit/lib3mf.xml index 078cdc4b4..d08606821 100644 --- a/AutomaticComponentToolkit/lib3mf.xml +++ b/AutomaticComponentToolkit/lib3mf.xml @@ -1,1017 +1,1781 @@ - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + \ No newline at end of file diff --git a/AutomaticComponentToolkit/patch_python.bat b/AutomaticComponentToolkit/patch_python.bat deleted file mode 100644 index a19c08d1f..000000000 --- a/AutomaticComponentToolkit/patch_python.bat +++ /dev/null @@ -1,17 +0,0 @@ -@echo off - -REM This script is to patch python binding which is using None keyword for enum. Apply this patch until ACT is fixed - -set "current_dir=%~dp0" - -REM Specify the python binding file path -set "file_path=%current_dir%\..\Autogenerated\Bindings\Python\Lib3MF.py" - -REM None is a python keyword which has to be replaced -set "search_line= None = 0" - -REM Replace None with BeamLatticeBallModeNone -set "new_line= BeamLatticeBallModeNone = 0" - -REM Use PowerShell to find and replace the line -powershell -Command "(Get-Content '%file_path%') -replace '%search_line%', '%new_line%' | Set-Content '%file_path%'" \ No newline at end of file diff --git a/AutomaticComponentToolkit/patch_python.sh b/AutomaticComponentToolkit/patch_python.sh deleted file mode 100644 index ebf8b909b..000000000 --- a/AutomaticComponentToolkit/patch_python.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# This script is to patch python binding which is using None keyword for enum. Apply this patch until ACT is fixed - -current_dir=`dirname "$0"` - -# Specify the python binding file path -file_path="$current_dir/../Autogenerated/Bindings/Python/Lib3MF.py" - -# None is python keyword which has to be replaced -search_line="\tNone = 0" - -# Replace None with BeamLatticeBallModeNone -new_line="\tBeamLatticeBallModeNone = 0" - -# Use sed to find and replace the line -sed -i "s|$search_line|$new_line|" "$file_path" \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index aaca07d2c..5e1911e52 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,8 +10,8 @@ include(GNUInstallDirs) # Define Version set(LIB3MF_VERSION_MAJOR 2) # increase on every backward-compatibility breaking change of the API -set(LIB3MF_VERSION_MINOR 3) # increase on every backward compatible change of the API -set(LIB3MF_VERSION_MICRO 2) # increase on on every change that does not alter the API +set(LIB3MF_VERSION_MINOR 4) # increase on every backward compatible change of the API +set(LIB3MF_VERSION_MICRO 0) # increase on on every change that does not alter the API set(LIB3MF_VERSION_PRERELEASE "") # denotes pre-release information of a version of lib3mf set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version") project(lib3mf @@ -19,6 +19,11 @@ project(lib3mf DESCRIPTION "An implementation of the 3D Manufacturing Format file standard" ) +find_program(buildcache_program buildcache) +if(buildcache_program) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${buildcache_program}") +endif() + set(CMAKE_INSTALL_BINDIR bin CACHE PATH "directory for installing binary files") set(CMAKE_INSTALL_LIBDIR lib CACHE PATH "directory for installing library files") set(CMAKE_INSTALL_INCLUDEDIR include/lib3mf CACHE PATH "directory for installing header files") @@ -30,16 +35,25 @@ option(BUILD_FOR_CODECOVERAGE "Build for code coverage analysis" OFF) option(STRIP_BINARIES "Strip binaries (on non-apple)" ON) option(USE_PLATFORM_UUID "Use UUID geneator that is provided by the OS (always ON for Windows)" OFF) +add_compile_options($<$:/MP>) +set (CMAKE_CXX_STANDARD 17) + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # using GCC add_definitions(-DBUILD_DLL) add_compile_options(-Wall) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O2") + if (CMAKE_BUILD_TYPE MATCHES DEBUG) + add_compile_options(-g) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Og") + else() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2") + endif(CMAKE_BUILD_TYPE MATCHES DEBUG) + elseif ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") # using GCC add_definitions(-DBUILD_DLL) add_compile_options(-Wall) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O2") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -O2") set(CMAKE_MACOSX_RPATH ON) endif() @@ -113,6 +127,21 @@ add_library(${PROJECT_NAME} SHARED ${SRCS_COMMON} ${HDRS_COMMON} ${ACT_GENERATED_SOURCE} ${VERSION_FILES_OUTPUTLOCATION} ) + +if (${MSVC}) + # using Visual Studio C++ + + # Allow unnamed structs and ensures that the min/max macros of minwindef.h are not used + + # Note the generator expression to limit the scope to c++ compiler, otherwise the RC compiler would get the arguments as well. + # Works with ninja, but not with the VS build generators + if (CMAKE_GENERATOR MATCHES "Ninja") + target_compile_options(${PROJECT_NAME} PUBLIC $<$:-DNOMINMAX /Wv:18>) + else() + target_compile_options(${PROJECT_NAME} PUBLIC -DNOMINMAX /Wv:18) + endif() +endif() + SOURCE_GROUP("Source Files\\Autogenerated" FILES ${ACT_GENERATED_SOURCE}) @@ -184,6 +213,10 @@ else() target_link_libraries(${PROJECT_NAME} ${ZLIB_LIBRARIES}) endif() + +target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/submodules/fast_float/include) + + set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "" IMPORT_PREFIX "" ) # This makes sure symbols are exported target_compile_options(${PROJECT_NAME} PRIVATE "-D__LIB3MF_EXPORTS") diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 000000000..dffe08f11 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,53 @@ +{ + "configurePresets": [ + { + "name": "windows-base", + "description": "Target Windows with the Visual Studio development environment.", + "hidden": true, + "generator": "Ninja", + "binaryDir": "${sourceDir}/build/${presetName}", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + } + }, + { + "name": "x64-debug", + "displayName": "x64 Debug", + "description": "Target Windows (64-bit) with the Visual Studio development environment. (Debug)", + "inherits": "windows-base", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "x64-release", + "displayName": "x64 Release", + "description": "Target Windows (64-bit) with the Visual Studio development environment. (RelWithDebInfo)", + "inherits": "windows-base", + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "x64-release-debug", + "displayName": "x64 Release with Debug", + "description": "Target Windows (64-bit) with the Visual Studio development environment. (RelWithDebInfo)", + "inherits": "x64-release", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo", + "CMAKE_CXX_FLAGS_DEBUG": "/Z7" + } + } + ], + "version": 3 +} \ No newline at end of file diff --git a/Include/API/lib3mf_absnode.hpp b/Include/API/lib3mf_absnode.hpp new file mode 100644 index 000000000..e2fddf149 --- /dev/null +++ b/Include/API/lib3mf_absnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CAbsNode + +*/ + + +#ifndef __LIB3MF_ABSNODE +#define __LIB3MF_ABSNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CAbsNode +**************************************************************************************************************************/ + +class CAbsNode : public virtual IAbsNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CAbsNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_ABSNODE diff --git a/Include/API/lib3mf_accessright.hpp b/Include/API/lib3mf_accessright.hpp index a1e8fe6b1..1c655eec6 100644 --- a/Include/API/lib3mf_accessright.hpp +++ b/Include/API/lib3mf_accessright.hpp @@ -56,13 +56,13 @@ namespace Lib3MF { CAccessRight(NMR::PKeyStoreAccessRight ar); // Inherited via IAccessRight - virtual IConsumer * GetConsumer() override; + IConsumer * GetConsumer() override; - virtual Lib3MF::eWrappingAlgorithm GetWrappingAlgorithm(); + Lib3MF::eWrappingAlgorithm GetWrappingAlgorithm() override; - virtual Lib3MF::eMgfAlgorithm GetMgfAlgorithm(); + Lib3MF::eMgfAlgorithm GetMgfAlgorithm() override; - virtual Lib3MF::eDigestMethod GetDigestMethod(); + Lib3MF::eDigestMethod GetDigestMethod() override; // Other access methods NMR::PKeyStoreAccessRight accessRight() const; diff --git a/Include/API/lib3mf_additionnode.hpp b/Include/API/lib3mf_additionnode.hpp new file mode 100644 index 000000000..e1f1038f8 --- /dev/null +++ b/Include/API/lib3mf_additionnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CAdditionNode + +*/ + + +#ifndef __LIB3MF_ADDITIONNODE +#define __LIB3MF_ADDITIONNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CAdditionNode +**************************************************************************************************************************/ + +class CAdditionNode : public virtual IAdditionNode, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CAdditionNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_ADDITIONNODE diff --git a/Include/API/lib3mf_arccosnode.hpp b/Include/API/lib3mf_arccosnode.hpp new file mode 100644 index 000000000..2619ddf74 --- /dev/null +++ b/Include/API/lib3mf_arccosnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CArcCosNode + +*/ + + +#ifndef __LIB3MF_ARCCOSNODE +#define __LIB3MF_ARCCOSNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CArcCosNode +**************************************************************************************************************************/ + +class CArcCosNode : public virtual IArcCosNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + /** + * Put protected members here. + */ + +public: + CArcCosNode(NMR::PModelImplicitNode pImplicitNode); + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_ARCCOSNODE diff --git a/Include/API/lib3mf_arcsinnode.hpp b/Include/API/lib3mf_arcsinnode.hpp new file mode 100644 index 000000000..b80b7f859 --- /dev/null +++ b/Include/API/lib3mf_arcsinnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CArcSinNode + +*/ + + +#ifndef __LIB3MF_ARCSINNODE +#define __LIB3MF_ARCSINNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CArcSinNode +**************************************************************************************************************************/ + +class CArcSinNode : public virtual IArcSinNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + /** + * Put protected members here. + */ + +public: + CArcSinNode(NMR::PModelImplicitNode pImplicitNode); + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_ARCSINNODE diff --git a/Include/API/lib3mf_arctan2node.hpp b/Include/API/lib3mf_arctan2node.hpp new file mode 100644 index 000000000..a808736f8 --- /dev/null +++ b/Include/API/lib3mf_arctan2node.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CArcTan2Node + +*/ + + +#ifndef __LIB3MF_ARCTAN2NODE +#define __LIB3MF_ARCTAN2NODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CArcTan2Node +**************************************************************************************************************************/ + +class CArcTan2Node : public virtual IArcTan2Node, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CArcTan2Node(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_ARCTAN2NODE diff --git a/Include/API/lib3mf_arctannode.hpp b/Include/API/lib3mf_arctannode.hpp new file mode 100644 index 000000000..469f660ae --- /dev/null +++ b/Include/API/lib3mf_arctannode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CArcTanNode + +*/ + + +#ifndef __LIB3MF_ARCTANNODE +#define __LIB3MF_ARCTANNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CArcTanNode +**************************************************************************************************************************/ + +class CArcTanNode : public virtual IArcTanNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CArcTanNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_ARCTANNODE diff --git a/Include/API/lib3mf_attachment.hpp b/Include/API/lib3mf_attachment.hpp index 1c3bfa778..b2f69a3cb 100644 --- a/Include/API/lib3mf_attachment.hpp +++ b/Include/API/lib3mf_attachment.hpp @@ -97,6 +97,8 @@ class CAttachment : public virtual IAttachment, public virtual CBase { void ReadFromBuffer(const Lib3MF_uint64 nBufferBufferSize, const Lib3MF_uint8 * pBufferBuffer); + NMR::PModelAttachment getModelAttachment (); + }; } diff --git a/Include/API/lib3mf_ceilnode.hpp b/Include/API/lib3mf_ceilnode.hpp new file mode 100644 index 000000000..3cf09ae05 --- /dev/null +++ b/Include/API/lib3mf_ceilnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CCeilNode + +*/ + + +#ifndef __LIB3MF_CEILNODE +#define __LIB3MF_CEILNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CCeilNode +**************************************************************************************************************************/ + +class CCeilNode : public virtual ICeilNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CCeilNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_CEILNODE diff --git a/Include/API/lib3mf_clampnode.hpp b/Include/API/lib3mf_clampnode.hpp new file mode 100644 index 000000000..23f2361ed --- /dev/null +++ b/Include/API/lib3mf_clampnode.hpp @@ -0,0 +1,99 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CClampNode + +*/ + + +#ifndef __LIB3MF_CLAMPNODE +#define __LIB3MF_CLAMPNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CClampNode +**************************************************************************************************************************/ + +class CClampNode : public virtual IClampNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CClampNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IClampNode::GetInputMin - Retrieves the input for the lower limit + * @return the input for the lower limit + */ + IImplicitPort * GetInputMin() override; + + /** + * IClampNode::GetInputMax - Retrieves the input for the upper limit + * @return the input for the upper limit + */ + IImplicitPort * GetInputMax() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_CLAMPNODE diff --git a/Include/API/lib3mf_componentsobject.hpp b/Include/API/lib3mf_componentsobject.hpp index 83f2cff20..2206a2540 100644 --- a/Include/API/lib3mf_componentsobject.hpp +++ b/Include/API/lib3mf_componentsobject.hpp @@ -86,6 +86,7 @@ class CComponentsObject : public virtual IComponentsObject, public virtual CObje bool IsComponentsObject(); + bool IsLevelSetObject() override; }; } diff --git a/Include/API/lib3mf_composematrixnode.hpp b/Include/API/lib3mf_composematrixnode.hpp new file mode 100644 index 000000000..24d9c2beb --- /dev/null +++ b/Include/API/lib3mf_composematrixnode.hpp @@ -0,0 +1,190 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CComposeMatrixNode + +*/ + + +#ifndef __LIB3MF_COMPOSEMATRIXNODE +#define __LIB3MF_COMPOSEMATRIXNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CComposeMatrixNode +**************************************************************************************************************************/ + +class CComposeMatrixNode : public virtual IComposeMatrixNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CComposeMatrixNode(NMR::PModelImplicitNode pImplicitNode); + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IComposeMatrixNode::GetInputM00 - Retrieves the input for the element 0 0 + * @return the input for the m00 element + */ + IImplicitPort * GetInputM00() override; + + /** + * IComposeMatrixNode::GetInputM01 - Retrieves the input for the element 0 1 + * @return the input for the m01 element + */ + IImplicitPort * GetInputM01() override; + + /** + * IComposeMatrixNode::GetInputM02 - Retrieves the input for the element 0 2 + * @return the input for the m02 element + */ + IImplicitPort * GetInputM02() override; + + /** + * IComposeMatrixNode::GetInputM03 - Retrieves the input for the element 0 3 + * @return the input for the m03 element + */ + IImplicitPort * GetInputM03() override; + + /** + * IComposeMatrixNode::GetInputM10 - Retrieves the input for the element 1 0 + * @return the input for the m10 element + */ + IImplicitPort * GetInputM10() override; + + /** + * IComposeMatrixNode::GetInputM11 - Retrieves the input for the element 1 1 + * @return the input for the m11 element + */ + IImplicitPort * GetInputM11() override; + + /** + * IComposeMatrixNode::GetInputM12 - Retrieves the input for the element 1 2 + * @return the input for the m12 element + */ + IImplicitPort * GetInputM12() override; + + /** + * IComposeMatrixNode::GetInputM13 - Retrieves the input for the element 1 3 + * @return the input for the m3 element + */ + IImplicitPort * GetInputM13() override; + + /** + * IComposeMatrixNode::GetInputM20 - Retrieves the input for the element 2 0 + * @return the input for the m2 element + */ + IImplicitPort * GetInputM20() override; + + /** + * IComposeMatrixNode::GetInputM21 - Retrieves the input for the element 2 1 + * @return + */ + IImplicitPort * GetInputM21() override; + + /** + * IComposeMatrixNode::GetInputM22 - Retrieves the input for the element 2 2 + * @return the input for the m22 element + */ + IImplicitPort * GetInputM22() override; + + /** + * IComposeMatrixNode::GetInputM23 - Retrieves the input for the element 2 3 + * @return the input for the m23 element + */ + IImplicitPort * GetInputM23() override; + + /** + * IComposeMatrixNode::GetInputM30 - Retrieves the input for the element 3 0 + * @return the input for the m30 element + */ + IImplicitPort * GetInputM30() override; + + /** + * IComposeMatrixNode::GetInputM31 - Retrieves the input for the element 3 1 + * @return the input for the m31 element + */ + IImplicitPort * GetInputM31() override; + + /** + * IComposeMatrixNode::GetInputM32 - Retrieves the input for the element 3 2 + * @return the input for the m32 element + */ + IImplicitPort * GetInputM32() override; + + /** + * IComposeMatrixNode::GetInputM33 - Retrieves the input for the element 3 3 + * @return the input for the m33 element + */ + IImplicitPort * GetInputM33() override; + + /** + * IComposeMatrixNode::GetOutputMatrix - Retrieves the output + * @return the output + */ + IImplicitPort * GetOutputResult() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_COMPOSEMATRIXNODE diff --git a/Include/API/lib3mf_composevectornode.hpp b/Include/API/lib3mf_composevectornode.hpp new file mode 100644 index 000000000..b8496bb38 --- /dev/null +++ b/Include/API/lib3mf_composevectornode.hpp @@ -0,0 +1,111 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CComposeVectorNode + +*/ + + +#ifndef __LIB3MF_COMPOSEVECTORNODE +#define __LIB3MF_COMPOSEVECTORNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CComposeVectorNode +**************************************************************************************************************************/ + +class CComposeVectorNode : public virtual IComposeVectorNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CComposeVectorNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IComposeVectorNode::GetInputX - Retrieves the input for the x component + * @return the input for the x component + */ + IImplicitPort * GetInputX() override; + + /** + * IComposeVectorNode::GetInputY - Retrieves the input for the y component + * @return the input for the y component + */ + IImplicitPort * GetInputY() override; + + /** + * IComposeVectorNode::GetInputZ - Retrieves the input for the z component + * @return the input for the z component + */ + IImplicitPort * GetInputZ() override; + + /** + * IComposeVectorNode::GetOutputVector - Retrieves the output + * @return the output + */ + IImplicitPort * GetOutputResult() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_COMPOSEVECTORNODE diff --git a/Include/API/lib3mf_constantnode.hpp b/Include/API/lib3mf_constantnode.hpp new file mode 100644 index 000000000..b0aa3325c --- /dev/null +++ b/Include/API/lib3mf_constantnode.hpp @@ -0,0 +1,105 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CConstantNode + +*/ + + +#ifndef __LIB3MF_CONSTANTNODE +#define __LIB3MF_CONSTANTNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CConstantNode +**************************************************************************************************************************/ + +class CConstantNode : public virtual IConstantNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CConstantNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IConstantNode::SetConstant - Sets the constant value of the node + * @param[in] dValue - the value + */ + void SetConstant(const Lib3MF_double dValue) override; + + /** + * IConstantNode::GetConstant - Retrieves the constant value of the node + * @return the value + */ + Lib3MF_double GetConstant() override; + + /** + * IConstantNode::GetOutputValue - Retrieves the output + * @return the output + */ + IImplicitPort * GetOutputValue() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_CONSTANTNODE diff --git a/Include/API/lib3mf_constmatnode.hpp b/Include/API/lib3mf_constmatnode.hpp new file mode 100644 index 000000000..95cb78dd1 --- /dev/null +++ b/Include/API/lib3mf_constmatnode.hpp @@ -0,0 +1,105 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CConstMatNode + +*/ + + +#ifndef __LIB3MF_CONSTMATNODE +#define __LIB3MF_CONSTMATNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CConstMatNode +**************************************************************************************************************************/ + +class CConstMatNode : public virtual IConstMatNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CConstMatNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IConstMatNode::SetMatrix - Sets the matrix value of the node + * @param[in] Value - the value + */ + void SetMatrix(const Lib3MF::sMatrix4x4 Value) override; + + /** + * IConstMatNode::GetMatrix - Retrieves the matrix value of the node + * @return the matrix + */ + Lib3MF::sMatrix4x4 GetMatrix() override; + + /** + * IConstMatNode::GetOutputMatrix - Retrieves the output + * @return the output + */ + IImplicitPort * GetOutputMatrix() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_CONSTMATNODE diff --git a/Include/API/lib3mf_constvecnode.hpp b/Include/API/lib3mf_constvecnode.hpp new file mode 100644 index 000000000..5f6c493e8 --- /dev/null +++ b/Include/API/lib3mf_constvecnode.hpp @@ -0,0 +1,105 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CConstVecNode + +*/ + + +#ifndef __LIB3MF_CONSTVECNODE +#define __LIB3MF_CONSTVECNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CConstVecNode +**************************************************************************************************************************/ + +class CConstVecNode : public virtual IConstVecNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CConstVecNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IConstVecNode::SetVector - Sets the vector value of the node + * @param[in] Value - the value + */ + void SetVector(const Lib3MF::sVector Value) override; + + /** + * IConstVecNode::GetVector - Retrieves the vector value of the node + * @return the value + */ + Lib3MF::sVector GetVector() override; + + /** + * IConstVecNode::GetOutputVector - Retrieves the output + * @return the output + */ + IImplicitPort * GetOutputVector() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_CONSTVECNODE diff --git a/Include/API/lib3mf_coshnode.hpp b/Include/API/lib3mf_coshnode.hpp new file mode 100644 index 000000000..b0de53b13 --- /dev/null +++ b/Include/API/lib3mf_coshnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CCoshNode + +*/ + + +#ifndef __LIB3MF_COSHNODE +#define __LIB3MF_COSHNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CCoshNode +**************************************************************************************************************************/ + +class CCoshNode : public virtual ICoshNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CCoshNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_COSHNODE diff --git a/Include/API/lib3mf_cosnode.hpp b/Include/API/lib3mf_cosnode.hpp new file mode 100644 index 000000000..1128cf777 --- /dev/null +++ b/Include/API/lib3mf_cosnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CCosNode + +*/ + + +#ifndef __LIB3MF_COSNODE +#define __LIB3MF_COSNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CCosNode +**************************************************************************************************************************/ + +class CCosNode : public virtual ICosNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CCosNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_COSNODE diff --git a/Include/API/lib3mf_crossnode.hpp b/Include/API/lib3mf_crossnode.hpp new file mode 100644 index 000000000..13d5a709b --- /dev/null +++ b/Include/API/lib3mf_crossnode.hpp @@ -0,0 +1,88 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CCrossNode + +*/ + + +#ifndef __LIB3MF_CROSSNODE +#define __LIB3MF_CROSSNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CCrossNode +**************************************************************************************************************************/ + +class CCrossNode : public virtual ICrossNode, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CCrossNode() = delete; + CCrossNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_CROSSNODE diff --git a/Include/API/lib3mf_decomposevectornode.hpp b/Include/API/lib3mf_decomposevectornode.hpp new file mode 100644 index 000000000..070ca9d33 --- /dev/null +++ b/Include/API/lib3mf_decomposevectornode.hpp @@ -0,0 +1,111 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CDecomposeVectorNode + +*/ + + +#ifndef __LIB3MF_DECOMPOSEVECTORNODE +#define __LIB3MF_DECOMPOSEVECTORNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CDecomposeVectorNode +**************************************************************************************************************************/ + +class CDecomposeVectorNode : public virtual IDecomposeVectorNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CDecomposeVectorNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IDecomposeVectorNode::GetInputVector - Retrieves the input + * @return the input + */ + IImplicitPort * GetInputA() override; + + /** + * IDecomposeVectorNode::GetOutputX - Retrieves the output for the x component + * @return the output for the x component + */ + IImplicitPort * GetOutputX() override; + + /** + * IDecomposeVectorNode::GetOutputY - Retrieves the output for the y component + * @return the output for the y component + */ + IImplicitPort * GetOutputY() override; + + /** + * IDecomposeVectorNode::GetOutputZ - Retrieves the output for the z component + * @return the output for the z component + */ + IImplicitPort * GetOutputZ() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_DECOMPOSEVECTORNODE diff --git a/Include/API/lib3mf_divisionnode.hpp b/Include/API/lib3mf_divisionnode.hpp new file mode 100644 index 000000000..0e23bf494 --- /dev/null +++ b/Include/API/lib3mf_divisionnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CDivisionNode + +*/ + + +#ifndef __LIB3MF_DIVISIONNODE +#define __LIB3MF_DIVISIONNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CDivisionNode +**************************************************************************************************************************/ + +class CDivisionNode : public virtual IDivisionNode, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CDivisionNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_DIVISIONNODE diff --git a/Include/API/lib3mf_dotnode.hpp b/Include/API/lib3mf_dotnode.hpp new file mode 100644 index 000000000..32951f09f --- /dev/null +++ b/Include/API/lib3mf_dotnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CDotNode + +*/ + + +#ifndef __LIB3MF_DOTNODE +#define __LIB3MF_DOTNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CDotNode +**************************************************************************************************************************/ + +class CDotNode : public virtual IDotNode, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CDotNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_DOTNODE diff --git a/Include/API/lib3mf_expnode.hpp b/Include/API/lib3mf_expnode.hpp new file mode 100644 index 000000000..3b9dae9e6 --- /dev/null +++ b/Include/API/lib3mf_expnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CExpNode + +*/ + + +#ifndef __LIB3MF_EXPNODE +#define __LIB3MF_EXPNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CExpNode +**************************************************************************************************************************/ + +class CExpNode : public virtual IExpNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CExpNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_EXPNODE diff --git a/Include/API/lib3mf_floornode.hpp b/Include/API/lib3mf_floornode.hpp new file mode 100644 index 000000000..21315063a --- /dev/null +++ b/Include/API/lib3mf_floornode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CFloorNode + +*/ + + +#ifndef __LIB3MF_FLOORNODE +#define __LIB3MF_FLOORNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CFloorNode +**************************************************************************************************************************/ + +class CFloorNode : public virtual IFloorNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CFloorNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_FLOORNODE diff --git a/Include/API/lib3mf_fmodnode.hpp b/Include/API/lib3mf_fmodnode.hpp new file mode 100644 index 000000000..ec99eb53e --- /dev/null +++ b/Include/API/lib3mf_fmodnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CFmodNode + +*/ + + +#ifndef __LIB3MF_FMODNODE +#define __LIB3MF_FMODNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CFmodNode +**************************************************************************************************************************/ + +class CFmodNode : public virtual IFmodNode, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CFmodNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_FMODNODE diff --git a/Include/API/lib3mf_fractnode.hpp b/Include/API/lib3mf_fractnode.hpp new file mode 100644 index 000000000..d50eb5c22 --- /dev/null +++ b/Include/API/lib3mf_fractnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CFractNode + +*/ + + +#ifndef __LIB3MF_FRACTNODE +#define __LIB3MF_FRACTNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CFractNode +**************************************************************************************************************************/ + +class CFractNode : public virtual IFractNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CFractNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_FRACTNODE diff --git a/Include/API/lib3mf_function.hpp b/Include/API/lib3mf_function.hpp new file mode 100644 index 000000000..3b8f2d716 --- /dev/null +++ b/Include/API/lib3mf_function.hpp @@ -0,0 +1,156 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CFunction + +*/ + + +#ifndef __LIB3MF_FUNCTION +#define __LIB3MF_FUNCTION + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_resource.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Model/Classes/NMR_ModelFunction.h" + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CFunction +**************************************************************************************************************************/ + +class CFunction : public virtual IFunction, public virtual CResource { +private: + /** + * Put private members here. + */ + NMR::CModelFunction* function(); + +protected: + + /** + * Put protected members here. + */ + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + CFunction() = delete; + CFunction(NMR::PModelResource pResource); + + /** + * Public member functions to implement. + */ + + /** + * IFunction::GetDisplayName - Retrieves the display name of the function + * @return the display name + */ + std::string GetDisplayName() override; + + /** + * IFunction::SetDisplayName - Sets the display name of the function + * @param[in] sDisplayName - the display name + */ + void SetDisplayName(const std::string & sDisplayName) override; + + /** + * IFunction::AddInput - Add an input + * @param[in] sIdentifier - the identifier of the input + * @param[in] sDisplayName - the display name of the input + * @param[in] eType - the type of the input + * @return The added input port + */ + IImplicitPort * AddInput(const std::string & sIdentifier, const std::string & sDisplayName, const Lib3MF::eImplicitPortType eType) override; + + /** + * IFunction::GetInputs - Retrieves the inputs + * @return iterator for the list of inputs + */ + IImplicitPortIterator * GetInputs() override; + + /** + * IFunction::RemoveInput - Removes an input + * @param[in] pInput - The input to be removed + */ + void RemoveInput(IImplicitPort* pInput) override; + + /** + * IFunction::AddOutput - Add an output + * @param[in] sIdentifier - the identifier of the output + * @param[in] sDisplayName - the display name of the output + * @param[in] eType - the type of the input + * @return The added input port + */ + IImplicitPort * AddOutput(const std::string & sIdentifier, const std::string & sDisplayName, const Lib3MF::eImplicitPortType eType) override; + + /** + * IFunction::GetOutputs - Retrieves the outputs + * @return iterator for the outputs + */ + IImplicitPortIterator * GetOutputs() override; + + /** + * IFunction::RemoveOutput - Removes an output + * @param[in] pOutput - The output to be removed + */ + void RemoveOutput(IImplicitPort* pOutput) override; + + /** + * IFunction::FindInput - Retrieves an input + * @param[in] sIdentifier - the identifier of the input + * @return the input port + */ + IImplicitPort * FindInput(const std::string & sIdentifier) override; + + /** + * IFunction::FindOutput - Retrieves an output + * @param[in] sIdentifier - the identifier of the output + * @return the output port + */ + IImplicitPort * FindOutput(const std::string & sIdentifier) override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_FUNCTION diff --git a/Include/API/lib3mf_functioncallnode.hpp b/Include/API/lib3mf_functioncallnode.hpp new file mode 100644 index 000000000..bdad495b4 --- /dev/null +++ b/Include/API/lib3mf_functioncallnode.hpp @@ -0,0 +1,92 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CFunctionCallNode + +*/ + + +#ifndef __LIB3MF_FUNCTIONCALLNODE +#define __LIB3MF_FUNCTIONCALLNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CFunctionCallNode +**************************************************************************************************************************/ + +class CFunctionCallNode : public virtual IFunctionCallNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CFunctionCallNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IFunctionCallNode::GetInputFunctionId - Retrieves the input for the function id + * @return the input port for the function + */ + IImplicitPort * GetInputFunctionID() override; +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_FUNCTIONCALLNODE diff --git a/Include/API/lib3mf_functionfromimage3d.hpp b/Include/API/lib3mf_functionfromimage3d.hpp new file mode 100644 index 000000000..ef781c443 --- /dev/null +++ b/Include/API/lib3mf_functionfromimage3d.hpp @@ -0,0 +1,156 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CFunctionFromImage3D + +*/ + + +#ifndef __LIB3MF_FUNCTIONFROMIMAGE3D +#define __LIB3MF_FUNCTIONFROMIMAGE3D + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_function.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Model/Classes/NMR_ModelFunctionFromImage3D.h" + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CFunctionFromImage3D +**************************************************************************************************************************/ + +class CFunctionFromImage3D : public virtual IFunctionFromImage3D, public virtual CFunction { +private: + + /** + * Put private members here. + */ + NMR::CModelFunctionFromImage3D* functionfromimage3d(); + +protected: + + /** + * Put protected members here. + */ + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + /** + * Put additional public members here. They will not be visible in the external API. + */ + CFunctionFromImage3D() = delete; + CFunctionFromImage3D(NMR::PModelResource pResource); + + /** + * Public member functions to implement. + */ + + /** + * IFunctionFromImage3D::GetImage3D - Returns the selected 3D image. + * @return image instance + */ + IImage3D * GetImage3D() override; + + /** + * IFunctionFromImage3D::SetImage3D - Sets the 3D image of the selector. + * @param[in] pImage3D - image instance + */ + void SetImage3D(IImage3D* pImage3D) override; + + /** + * IFunctionFromImage3D::SetFilter - Sets the texture filter of the selector. + * @param[in] eFilter - texture filter + */ + void SetFilter(const Lib3MF::eTextureFilter eFilter) override; + + /** + * IFunctionFromImage3D::GetFilter - Returns the texture filter of the selector. + * @return texture filter + */ + Lib3MF::eTextureFilter GetFilter() override; + + /** + * IFunctionFromImage3D::SetTileStyles - Sets the tile styles of the selector. + * @param[in] eTileStyleU - tile style in U + * @param[in] eTileStyleV - tile style in V + * @param[in] eTileStyleW - tile style in W + */ + void SetTileStyles(const Lib3MF::eTextureTileStyle eTileStyleU, const Lib3MF::eTextureTileStyle eTileStyleV, const Lib3MF::eTextureTileStyle eTileStyleW) override; + + /** + * IFunctionFromImage3D::GetTileStyles - Retrieves the tile styles of the selector. + * @param[out] eTileStyleU - tile style in U + * @param[out] eTileStyleV - tile style in V + * @param[out] eTileStyleW - tile style in W + */ + void GetTileStyles(Lib3MF::eTextureTileStyle & eTileStyleU, Lib3MF::eTextureTileStyle & eTileStyleV, Lib3MF::eTextureTileStyle & eTileStyleW) override; + + /** + * IFunctionFromImage3D::GetOffset - returns the offset value for the pixel values in the Image3D + * @return the offset value for the pixel values in the Image3D + */ + Lib3MF_double GetOffset() override; + + /** + * IFunctionFromImage3D::SetOffset - Sets the offset value for the pixel values in the Image3D + * @param[in] dOffset - the offset value for the pixel values in the Image3D + */ + void SetOffset(const Lib3MF_double dOffset) override; + + /** + * IFunctionFromImage3D::GetScale - returns the scale value for the pixel values in the Image3D + * @return the scale value for the pixel values in the Image3D + */ + Lib3MF_double GetScale() override; + + /** + * IFunctionFromImage3D::SetScale - Sets the scale value for the pixel values in the Image3D + * @param[in] dScale - the scale value for the pixel values in the Image3D + */ + void SetScale(const Lib3MF_double dScale) override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_FUNCTIONFROMIMAGE3D diff --git a/Include/API/lib3mf_functioniterator.hpp b/Include/API/lib3mf_functioniterator.hpp new file mode 100644 index 000000000..95d694838 --- /dev/null +++ b/Include/API/lib3mf_functioniterator.hpp @@ -0,0 +1,93 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CFunctionIterator + +*/ + + +#ifndef __LIB3MF_FUNCTIONITERATOR +#define __LIB3MF_FUNCTIONITERATOR + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_resourceiterator.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CFunctionIterator +**************************************************************************************************************************/ + +class CFunctionIterator : public virtual IFunctionIterator, public virtual CResourceIterator { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IFunctionIterator::GetCurrentFunction - Returns the Function the iterator points at. + * @return returns the Function instance. + */ + IFunction * GetCurrentFunction() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_FUNCTIONITERATOR diff --git a/Include/API/lib3mf_functionreference.hpp b/Include/API/lib3mf_functionreference.hpp new file mode 100644 index 000000000..b2c7b8295 --- /dev/null +++ b/Include/API/lib3mf_functionreference.hpp @@ -0,0 +1,149 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CFunctionReference + +*/ + + +#ifndef __LIB3MF_FUNCTIONREFERENCE +#define __LIB3MF_FUNCTIONREFERENCE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_base.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Common/NMR_FunctionReference.h" + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CFunctionReference +**************************************************************************************************************************/ + +class CFunctionReference : public virtual IFunctionReference, public virtual CBase { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + NMR::PFunctionReference m_pFunctionReference; +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + CFunctionReference(NMR::PFunctionReference pFunctionReference); + + /** + * Public member functions to implement. + */ + + /** + * IFunctionReference::GetFunctionResourceID - Returns the UniqueResourceID of the Function. + * @return returns the UniqueResourceID. + */ + Lib3MF_uint32 GetFunctionResourceID() override; + + /** + * IFunctionReference::SetFunctionResourceID - Sets the UniqueResourceID to refer to. + * @param[in] nUniqueResourceID - UniqueResourceID of the function + */ + void SetFunctionResourceID(const Lib3MF_uint32 nUniqueResourceID) override; + + + /** + * IFunctionReference::GetTransform - Returns the transformation matrix into the coordinate system of the referenced Function. + * @return the transformation matrix + */ + Lib3MF::sTransform GetTransform() override; + + /** + * IFunctionReference::SetTransform - Sets the transformation matrix into the coordinate system of the referenced Function. + * @param[in] Transform - new transformation matrix + */ + void SetTransform(const Lib3MF::sTransform Transform) override; + + /** + * IFunctionReference::GetChannelName - Returns the name of the function output to use. + * @return the name of the function output + */ + std::string GetChannelName() override; + + /** + * IFunctionReference::SetChannelName - Sets the name of the function output to use. + * @param[in] sChannelName - new name of the function output + */ + void SetChannelName(const std::string & sChannelName) override; + + /** + * IFunctionReference::SetMinFeatureSize - Sets the minimal feature size as a hint for the function evaluator + * @param[in] dMinFeatureSize - minimal feature size + */ + void SetMinFeatureSize(const Lib3MF_double dMinFeatureSize) override; + + /** + * IFunctionReference::GetMinFeatureSize - Returns the minimal feature size as a hint for the function evaluator + * @return minimal feature size + */ + Lib3MF_double GetMinFeatureSize() override; + + /** + * IFunctionReference::SetFallBackValue - Sets the fallback value to use + * if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @param[in] dFallBackValue - fallback value + */ + void SetFallBackValue(const Lib3MF_double dFallBackValue) override; + + /** + * IFunctionReference::GetFallBackValue - Returns the fallback value to + * use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @return fallback value + */ + Lib3MF_double GetFallBackValue(); +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_FUNCTIONREFERENCE diff --git a/Include/API/lib3mf_image3d.hpp b/Include/API/lib3mf_image3d.hpp new file mode 100644 index 000000000..8de452444 --- /dev/null +++ b/Include/API/lib3mf_image3d.hpp @@ -0,0 +1,94 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CImage3D + +*/ + + +#ifndef __LIB3MF_IMAGE3D +#define __LIB3MF_IMAGE3D + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_resource.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Model/Classes/NMR_ModelImage3D.h" + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CImage3D +**************************************************************************************************************************/ + +class CImage3D : public virtual IImage3D, public virtual CResource { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + NMR::CModelImage3D* image3D(); +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + CImage3D() = delete; + CImage3D(NMR::PModelResource pResource); + + /** + * Public member functions to implement. + */ + + std::string GetName() override; + + void SetName(const std::string & sName) override; + + bool IsImageStack() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_IMAGE3D diff --git a/Include/API/lib3mf_image3diterator.hpp b/Include/API/lib3mf_image3diterator.hpp new file mode 100644 index 000000000..4752d3535 --- /dev/null +++ b/Include/API/lib3mf_image3diterator.hpp @@ -0,0 +1,88 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CImage3DIterator + +*/ + + +#ifndef __LIB3MF_IMAGE3DITERATOR +#define __LIB3MF_IMAGE3DITERATOR + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_resourceiterator.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CImage3DIterator +**************************************************************************************************************************/ + +class CImage3DIterator : public virtual IImage3DIterator, public virtual CResourceIterator { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + IImage3D * GetCurrentImage3D() override; +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_IMAGE3DITERATOR diff --git a/Include/API/lib3mf_imagestack.hpp b/Include/API/lib3mf_imagestack.hpp new file mode 100644 index 000000000..b0d6da42c --- /dev/null +++ b/Include/API/lib3mf_imagestack.hpp @@ -0,0 +1,109 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CImageStack + +*/ + + +#ifndef __LIB3MF_IMAGESTACK +#define __LIB3MF_IMAGESTACK + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_image3d.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Model/Classes/NMR_ModelImageStack.h" + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CImageStack +**************************************************************************************************************************/ + +class CImageStack : public virtual IImageStack, public virtual CImage3D { +private: + + /** + * Put private members here. + */ + NMR::PModelImageStack m_pModelImageStack; + +protected: + + /** + * Put protected members here. + */ + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + CImageStack() = delete; + CImageStack(NMR::PModelImageStack pModelImageStack); + + /** + * Public member functions to implement. + */ + + Lib3MF_uint32 GetRowCount() override; + + void SetRowCount(const Lib3MF_uint32 nRowCount) override; + + Lib3MF_uint32 GetColumnCount() override; + + void SetColumnCount(const Lib3MF_uint32 nColumnCount) override; + + Lib3MF_uint32 GetSheetCount() override; + + IAttachment * GetSheet(const Lib3MF_uint32 nIndex) override; + + void SetSheet(const Lib3MF_uint32 nIndex, IAttachment* pSheet) override; + + IAttachment * CreateEmptySheet(const Lib3MF_uint32 nIndex, const std::string & sPath) override; + + IAttachment * CreateSheetFromBuffer(const Lib3MF_uint32 nIndex, const std::string & sPath, const Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer) override; + + IAttachment * CreateSheetFromFile(const Lib3MF_uint32 nIndex, const std::string & sPath, const std::string & sFileName) override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_IMAGESTACK diff --git a/Include/API/lib3mf_implicitfunction.hpp b/Include/API/lib3mf_implicitfunction.hpp new file mode 100644 index 000000000..8a4e24e8c --- /dev/null +++ b/Include/API/lib3mf_implicitfunction.hpp @@ -0,0 +1,795 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CImplicitFunction + +*/ + +#ifndef __LIB3MF_IMPLICITFUNCTION +#define __LIB3MF_IMPLICITFUNCTION + +#include "lib3mf_function.hpp" +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_base.hpp" + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Model/Classes/NMR_ModelImplicitFunction.h" + +namespace Lib3MF +{ + namespace Impl + { + + /************************************************************************************************************************* + Class declaration of CImplicitFunction + **************************************************************************************************************************/ + + class CImplicitFunction : public IImplicitFunction, public CFunction + { + private: + /** + * Put private members here. + */ + NMR::CModelImplicitFunction* function(); + + protected: + /** + * Put protected members here. + */ + + public: + /** + * Put additional public members here. They will not be visible in + * the external API. + */ + + CImplicitFunction() = delete; + CImplicitFunction(NMR::PModelResource pResource); + /** + * Public member functions to implement. + */ + + /** + * IImplicitFunction::GetIdentifier - Retrieves the identifier of + * the function + * @return the identifier + */ + std::string GetIdentifier() override; + + /** + * IImplicitFunction::SetIdentifier - Sets the identifier of the + * function + * @param[in] sIdentifier - the identifier + */ + void SetIdentifier(const std::string& sIdentifier) override; + + /** + * IImplicitFunction::AddNode - Add a node + * @param[in] eNodeType - the type of the node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IImplicitNode* AddNode( + const Lib3MF::eImplicitNodeType eNodeType, + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddSinNode - Add a SinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ISinNode* AddSinNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddCosNode - Add a CosNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ICosNode* AddCosNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddTanNode - Add a TanNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ITanNode* AddTanNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddArcSinNode - Add a ArcSinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IArcSinNode* AddArcSinNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddArcCosNode - Add a ArcCosNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IArcCosNode* AddArcCosNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddArcTan2Node - Add a ArcTan2Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IArcTan2Node* AddArcTan2Node( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddSinhNode - Add a SinhNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ISinhNode* AddSinhNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddCoshNode - Add a CoshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ICoshNode* AddCoshNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddTanhNode - Add a TanhNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ITanhNode* AddTanhNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddRoundNode - Add a RoundNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IRoundNode* AddRoundNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddCeilNode - Add a CeilNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ICeilNode* AddCeilNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddFloorNode - Add a FloorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IFloorNode* AddFloorNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddSignNode - Add a SignNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ISignNode* AddSignNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddFractNode - Add a FractNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IFractNode* AddFractNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddAbsNode - Add a AbsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IAbsNode* AddAbsNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddExpNode - Add a ExpNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IExpNode* AddExpNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddLogNode - Add a LogNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ILogNode* AddLogNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddLog2Node - Add a Log2Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ILog2Node* AddLog2Node( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddLog10Node - Add a Log10Node + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ILog10Node* AddLog10Node( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddLengthNode - Add a LengthNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ILengthNode* AddLengthNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddTransposeNode - Add a TransposeNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ITransposeNode* AddTransposeNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::InverseNode - Add a InverseNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IInverseNode* InverseNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddSqrtNode - Add a SqrtNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ISqrtNode* AddSqrtNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddResourceIdNode - Add a ResourceIdNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IResourceIdNode* AddResourceIdNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddAdditionNode - Add an AdditionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IAdditionNode* AddAdditionNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddSubtractionNode - Add a SubtractionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ISubtractionNode* AddSubtractionNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddMultiplicationNode - Add a + * MultiplicationNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IMultiplicationNode* AddMultiplicationNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddDivisionNode - Add a DivisionNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IDivisionNode* AddDivisionNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddDotNode - Add a DotNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IDotNode* AddDotNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddCrossNode - Add a CrossNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ICrossNode* AddCrossNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddMatVecMultiplicationNode - Add a + * MatVecMultiplicationNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IMatVecMultiplicationNode* AddMatVecMultiplicationNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddMinNode - Add a MinNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IMinNode* AddMinNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddMaxNode - Add a MaxNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IMaxNode* AddMaxNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddFmodNode - Add a FmodNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IFmodNode* AddFmodNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddPowNode - Add a PowNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IPowNode* AddPowNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddSelectNode - Add a SelectNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + ISelectNode* AddSelectNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddClampNode - Add a ClampNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] eConfiguration - the configuration of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IClampNode* AddClampNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddComposeVectorNode - Add a ComposeVectorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IComposeVectorNode* AddComposeVectorNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddVectorFromScalarNode - Add a VectorFromScalar + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IVectorFromScalarNode * AddVectorFromScalarNode(const std::string & sIdentifier, + const std::string & sDisplayName, + const std::string & sTag) override; + + /** + * IImplicitFunction::AddDecomposeVectorNode - Add a + * DecomposeVectorNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IDecomposeVectorNode* AddDecomposeVectorNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddComposeMatrixNode - Add a ComposeMatrixNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IComposeMatrixNode* AddComposeMatrixNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddMatrixFromRowsNode - Add a MatrixFromRowsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IMatrixFromRowsNode * AddMatrixFromRowsNode(const std::string & sIdentifier, + const std::string & sDisplayName, + const std::string & sTag) override; + + /** + * IImplicitFunction::AddMatrixFromColumnsNode - Add a MatrixFromColumnsNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IMatrixFromColumnsNode * AddMatrixFromColumnsNode(const std::string & sIdentifier, + const std::string & sDisplayName, + const std::string & sTag) override; + + /** + * IImplicitFunction::AddConstantNode - Add a ConstantNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IConstantNode* AddConstantNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddConstVecNode - Add a ConstVecNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IConstVecNode* AddConstVecNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddConstMatNode - Add a ConstMatNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IConstMatNode* AddConstMatNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddMeshNode - Add a MeshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IMeshNode* AddMeshNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::AddUnsignedMeshNode - Add a UnsignedMeshNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IUnsignedMeshNode * AddUnsignedMeshNode(const std::string & sIdentifier, + const std::string & sDisplayName, + const std::string & sTag) override; + + /** + * IImplicitFunction::AddFunctionCallNode - Add a FunctionCallNode + * @param[in] sIdentifier - the identifier of the node + * @param[in] sDisplayName - the display name of the node + * @param[in] sTag - the tag of the node + * @return the added node + */ + IFunctionCallNode* AddFunctionCallNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) override; + + /** + * IImplicitFunction::GetNodes - Retrieves the nodes + * @return the accessor to the nodes + */ + INodeIterator* GetNodes() override; + + /** + * IImplicitFunction::RemoveNode - Removes a node + * @param[in] pNode - The node to be removed + */ + void RemoveNode(IImplicitNode* pNode) override; + + /** + * IImplicitFunction::AddLink - Add a link + * @param[in] pSource - the source port + * @param[in] pTarget - the target port + */ + void AddLink(IImplicitPort* pSource, + IImplicitPort* pTarget) override; + + /** + * IImplicitFunction::AddLinkByNames - Add a link + * @param[in] sSource - name of the source port in the format + * nodename.portname + * @param[in] sTarget - name of the target port in the format + * nodename.portname + */ + void AddLinkByNames(const std::string& sSource, + const std::string& sTarget) override; + + /** + * IImplicitFunction::Clear - Clears the function + */ + void Clear() override; + + /** + * IImplicitFunction::SortNodesTopologically - Sorts the nodes + * topologically + */ + void SortNodesTopologically() override; + }; + + } // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_IMPLICITFUNCTION diff --git a/Include/API/lib3mf_implicitnode.hpp b/Include/API/lib3mf_implicitnode.hpp new file mode 100644 index 000000000..10b733bbe --- /dev/null +++ b/Include/API/lib3mf_implicitnode.hpp @@ -0,0 +1,173 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CImplicitNode + +*/ + +#ifndef __LIB3MF_IMPLICITNODE +#define __LIB3MF_IMPLICITNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_base.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Model/Classes/NMR_ModelImplicitNode.h" + +namespace Lib3MF +{ + namespace Impl + { + + /************************************************************************************************************************* + Class declaration of CImplicitNode + **************************************************************************************************************************/ + + class CImplicitNode : public virtual IImplicitNode, public virtual CBase + { + private: + + + protected: + /** + * Put protected members here. + */ + NMR::PModelImplicitNode m_pImplicitNode; + + IImplicitPort * FindInputOrThrow(const std::string & sIdentifier); + IImplicitPort * FindOutputOrThrow(const std::string & sIdentifier); + public: + + CImplicitNode() = default; + explicit CImplicitNode(NMR::PModelImplicitNode pImplicitNode); + + /** + * Public member functions to implement. + */ + + /** + * IImplicitNode::GetIdentifier - Retrieves the identifier of the node + * @return the identifier + */ + std::string GetIdentifier() override; + + /** + * IImplicitNode::SetIdentifier - Sets the identifier of the node + * @param[in] sIdentifier - the identifier + */ + void SetIdentifier(const std::string & sIdentifier) override; + + /** + * IImplicitNode::GetDisplayName - Retrieves the display name of the node + * @return the display name + */ + std::string GetDisplayName() override; + + /** + * IImplicitNode::SetDisplayName - Sets the display name of the node + * @param[in] sDisplayName - the display name + */ + void SetDisplayName(const std::string & sDisplayName) override; + + /** + * IImplicitNode::GetTag - Retrieves the tag of the node + * @return the tag + */ + std::string GetTag() override; + + /** + * IImplicitNode::SetTag - Sets the tag of the node + * @param[in] sTag - the tag + */ + void SetTag(const std::string& sTag) override; + + Lib3MF::eImplicitNodeType GetNodeType() override; + + /** + * IImplicitNode::AddInput - Add an input + * @param[in] sIdentifier - the identifier of the input + * @param[in] sDisplayName - the display name of the input + * @return + */ + IImplicitPort * AddInput(const std::string & sIdentifier, + const std::string & sDisplayName) override; + + /** + * IImplicitNode::GetInputs - Retrieves the inputs + * @return the accessor to the inputs + */ + IImplicitPortIterator * GetInputs() override; + + /** + * IImplicitNode::AddOutput - Add an output + * @param[in] sIdentifier - the identifier of the output + * @param[in] sDisplayName - the display name of the output + * @return + */ + IImplicitPort * AddOutput(const std::string & sIdentifier, + const std::string & sDisplayName) override; + + /** + * IImplicitNode::GetOutputs - Retrieves the outputs + * @return the accessor to the outputs + */ + IImplicitPortIterator * GetOutputs() override; + + /** + * IImplicitNode::FindInput - Retrieves an input + * @param[in] sIdentifier - the identifier of the input + * @return the input port + */ + IImplicitPort * FindInput(const std::string & sIdentifier) override; + + /** + * IImplicitNode::FindOutput - Retrieves an output + * @param[in] sIdentifier - the identifier of the output + * @return the output port + */ + IImplicitPort * FindOutput(const std::string & sIdentifier) override; + + /** + * IImplicitNode::AreTypesValid - Checks if the types of the input + * and output ports are valid for the node type + * @return true, if the types are valid + */ + bool AreTypesValid() override; + }; + + } // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_IMPLICITNODE diff --git a/Include/API/lib3mf_implicitport.hpp b/Include/API/lib3mf_implicitport.hpp new file mode 100644 index 000000000..28a1aaee3 --- /dev/null +++ b/Include/API/lib3mf_implicitport.hpp @@ -0,0 +1,137 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CImplicitPort + +*/ + +#ifndef __LIB3MF_IMPLICITPORT +#define __LIB3MF_IMPLICITPORT + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_base.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Model/Classes/NMR_ModelImplicitPort.h" + +namespace Lib3MF +{ + namespace Impl + { + + /************************************************************************************************************************* + Class declaration of CImplicitPort + **************************************************************************************************************************/ + + class CImplicitPort : public virtual IImplicitPort, public virtual CBase + { + private: + /** + * Put private members here. + */ + NMR::PModelImplicitPort m_pImplicitPort; + + protected: + /** + * Put protected members here. + */ + + public: + CImplicitPort(NMR::PModelImplicitPort pImplicitPort); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + /** + * Public member functions to implement. + */ + + /** + * IImplicitPort::GetIdentifier - Retrieves the identifier of the port + * @return the identifier + */ + std::string GetIdentifier() override; + + /** + * IImplicitPort::SetIdentifier - Sets the identifier of the port + * @param[in] sIdentifier - the identifier + */ + void SetIdentifier(const std::string & sIdentifier) override; + + /** + * IImplicitPort::GetDisplayName - Retrieves the display name of the port + * @return the display name + */ + std::string GetDisplayName() override; + + /** + * IImplicitPort::SetDisplayName - Sets the display name of the port + * @param[in] sDisplayName - the display name + */ + void SetDisplayName(const std::string & sDisplayName) override; + + /** + * IImplicitPort::SetType - Sets the type of the port + * @param[in] eImplicitPortType - the type + */ + void SetType(const Lib3MF::eImplicitPortType eImplicitPortType) override; + + /** + * IImplicitPort::GetType - Retrieves the type of the port + * @return the type + */ + Lib3MF::eImplicitPortType GetType() override; + + /** + * IImplicitPort::GetReference - Retrieves the reference of the port, only used for + * input ports + * @return the reference + */ + std::string GetReference() override; + + /** + * IImplicitPort::SetReference - Sets the reference of the port, only used for input + * ports + * @param[in] sReference - the reference + */ + void SetReference(const std::string & sReference) override; + + NMR::PModelImplicitPort getPort(); + }; + + } // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_IMPLICITPORT diff --git a/Include/API/lib3mf_implicitportiterator.hpp b/Include/API/lib3mf_implicitportiterator.hpp new file mode 100644 index 000000000..b0e6d169b --- /dev/null +++ b/Include/API/lib3mf_implicitportiterator.hpp @@ -0,0 +1,95 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CImplicitPortIterator + +*/ + + +#ifndef __LIB3MF_IMPLICITPORTITERATOR +#define __LIB3MF_IMPLICITPORTITERATOR + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_iterator.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Model/Classes/NMR_ModelImplicitNode.h" + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CImplicitPortIterator +**************************************************************************************************************************/ + +class CImplicitPortIterator : public virtual IImplicitPortIterator, public virtual CIterator { +private: + + /** + * Put private members here. + */ + NMR::PPorts m_pPorts; +protected: + + /** + * Put protected members here. + */ + +public: + CImplicitPortIterator(NMR::PPorts pPorts); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IImplicitPortIterator::GetCurrent - Returns the current element + * @return The current element + */ + IImplicitPort * GetCurrent() override; + + Lib3MF_uint64 Count() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_IMPLICITPORTITERATOR diff --git a/Include/API/lib3mf_inversenode.hpp b/Include/API/lib3mf_inversenode.hpp new file mode 100644 index 000000000..a013fd154 --- /dev/null +++ b/Include/API/lib3mf_inversenode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CInverseNode + +*/ + + +#ifndef __LIB3MF_INVERSENODE +#define __LIB3MF_INVERSENODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CInverseNode +**************************************************************************************************************************/ + +class CInverseNode : public virtual IInverseNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CInverseNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_INVERSENODE diff --git a/Include/API/lib3mf_iterator.hpp b/Include/API/lib3mf_iterator.hpp new file mode 100644 index 000000000..fb72702cd --- /dev/null +++ b/Include/API/lib3mf_iterator.hpp @@ -0,0 +1,106 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CIterator + +*/ + + +#ifndef __LIB3MF_ITERATOR +#define __LIB3MF_ITERATOR + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_base.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CIterator +**************************************************************************************************************************/ + +class CIterator : public virtual IIterator, public virtual CBase { +private: + + /** + * Put private members here. + */ + Lib3MF_int64 m_nCurrentIndex = -1; +protected: + + /** + * Put protected members here. + */ + Lib3MF_int64 getCurrentIndex(); + void throwIfInvalidIndex(); +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IIterator::MoveNext - Iterates to the next item in the list. + * @return Iterates to the next item in the list. + */ + bool MoveNext() override; + + /** + * IIterator::MovePrevious - Iterates to the previous item in the list. + * @return Iterates to the previous item in the list. + */ + bool MovePrevious() override; + + /** + * IIterator::Count - Returns the number of items the iterator captures. + * @return returns the number of items the iterator captures. + */ + Lib3MF_uint64 Count() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_ITERATOR diff --git a/Include/API/lib3mf_keystore.hpp b/Include/API/lib3mf_keystore.hpp index cfc4bb2b6..78e48df31 100644 --- a/Include/API/lib3mf_keystore.hpp +++ b/Include/API/lib3mf_keystore.hpp @@ -93,23 +93,29 @@ namespace Lib3MF { virtual Lib3MF_uint64 GetResourceDataGroupCount() override; - virtual IResourceDataGroup * GetResourceDataGroup(const Lib3MF_uint64 nResourceDataIndex) override; + IResourceDataGroup * GetResourceDataGroup(const Lib3MF_uint64 nResourceDataIndex) override; - virtual IResourceDataGroup * AddResourceDataGroup() override; + IResourceDataGroup * AddResourceDataGroup() override; - virtual void RemoveResourceDataGroup(IResourceDataGroup * pTheResourceDataGroup) override; + void RemoveResourceDataGroup(IResourceDataGroup * pTheResourceDataGroup) override; - virtual Lib3MF::Impl::IResourceDataGroup * FindResourceDataGroup(Lib3MF::Impl::IPackagePart *pPartPath); + Lib3MF::Impl::IResourceDataGroup * FindResourceDataGroup(Lib3MF::Impl::IPackagePart *pPartPath) override; - virtual IResourceData * AddResourceData(IResourceDataGroup* pResourceDataGroup, IPackagePart* pPartPath, const Lib3MF::eEncryptionAlgorithm eAlgorithm, const Lib3MF::eCompression eCompression, const Lib3MF_uint64 nAdditionalAuthenticationDataBufferSize, const Lib3MF_uint8 * pAdditionalAuthenticationDataBuffer); + IResourceData * AddResourceData( + IResourceDataGroup * pResourceDataGroup, + IPackagePart * pPartPath, + const Lib3MF::eEncryptionAlgorithm eAlgorithm, + const Lib3MF::eCompression eCompression, + const Lib3MF_uint64 nAdditionalAuthenticationDataBufferSize, + const Lib3MF_uint8 * pAdditionalAuthenticationDataBuffer) override; - virtual void RemoveResourceData(Lib3MF::Impl::IResourceData *pResourceData); + void RemoveResourceData(Lib3MF::Impl::IResourceData *pResourceData) override; - virtual Lib3MF_uint64 GetResourceDataCount(); + Lib3MF_uint64 GetResourceDataCount() override; - virtual Lib3MF::Impl::IResourceData * GetResourceData(const Lib3MF_uint64 nResourceDataIndex); + Lib3MF::Impl::IResourceData * GetResourceData(const Lib3MF_uint64 nResourceDataIndex) override; - virtual IResourceData * FindResourceData(IPackagePart * pResourcePath) override; + IResourceData * FindResourceData(IPackagePart * pResourcePath) override; }; diff --git a/Include/API/lib3mf_lengthnode.hpp b/Include/API/lib3mf_lengthnode.hpp new file mode 100644 index 000000000..912c6f26a --- /dev/null +++ b/Include/API/lib3mf_lengthnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CLengthNode + +*/ + + +#ifndef __LIB3MF_LENGTHNODE +#define __LIB3MF_LENGTHNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CLengthNode +**************************************************************************************************************************/ + +class CLengthNode : public virtual ILengthNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CLengthNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_LENGTHNODE diff --git a/Include/API/lib3mf_levelset.hpp b/Include/API/lib3mf_levelset.hpp new file mode 100644 index 000000000..be1c11e4a --- /dev/null +++ b/Include/API/lib3mf_levelset.hpp @@ -0,0 +1,194 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CLevelSet + +*/ + + +#ifndef __LIB3MF_BOUNDARYSHAPE +#define __LIB3MF_BOUNDARYSHAPE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_object.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Model/Classes/NMR_ModelLevelSetObject.h" + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CLevelSet +**************************************************************************************************************************/ + +class CLevelSet : public virtual ILevelSet, public virtual CObject { +private: + + /** + * Put private members here. + */ + NMR::PModelLevelSetObject levelSetObject(); +protected: + + /** + * Put protected members here. + */ + +public: + /** + * Put additional public members here. They will not be visible in the external API. + */ + + CLevelSet() = delete; + + CLevelSet(NMR::PModelResource pResource); + + + /** + * Public member functions to implement. + */ + static ILevelSet* fnCreateLevelSetFromModelResource( + NMR::PModelResource pResource, bool bFailIfUnkownClass); + + /** + * ILevelSet::GetFunction - Returns the function that is used as boundary shape. + * @return the function to use as boundary shape + */ + IFunction * GetFunction() override; + + /** + * ILevelSet::SetFunction - Sets the function to use as boundary shape. + * @param[in] pTheFunction - the function to use as boundary shape + */ + void SetFunction(IFunction* pTheFunction) override; + + /** + * ILevelSet::GetTransform - Returns the transformation matrix into the coordinate system of the referenced Function. + * @return the transformation matrix + */ + Lib3MF::sTransform GetTransform() override; + + /** + * ILevelSet::SetTransform - Sets the transformation matrix into the coordinate system of the referenced Function. + * @param[in] Transform - new transformation matrix + */ + void SetTransform(const Lib3MF::sTransform Transform) override; + + /** + * ILevelSet::GetChannelName - Returns the name of the function output channel to use. + * @return the name of the function output channel + */ + std::string GetChannelName() override; + + /** + * ILevelSet::SetChannelName - Sets the name of the function output channel to use. + * @param[in] sChannelName - new name of the function output channel + */ + void SetChannelName(const std::string & sChannelName) override; + + /** + * ILevelSet::SetMinFeatureSize - Sets the minimal feature size as a hint for the function evaluator + * @param[in] dMinFeatureSize - minimal feature size + */ + void SetMinFeatureSize(const Lib3MF_double dMinFeatureSize) override; + + /** + * ILevelSet::GetMinFeatureSize - Returns the minimal feature size as a hint for the function evaluator + * @return minimal feature size + */ + Lib3MF_double GetMinFeatureSize() override; + + /** + * ILevelSet::SetFallBackValue - Sets the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @param[in] dFallBackValue - fallback value + */ + void SetFallBackValue(const Lib3MF_double dFallBackValue) override; + + /** + * ILevelSet::GetFallBackValue - Returns the fallback value to use if the function evaluation fails (e.g. evaluates to NaN or Inf). + * @return fallback value + */ + Lib3MF_double GetFallBackValue() override; + + /** + * ILevelSet::SetMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + * @param[in] bMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + */ + void SetMeshBBoxOnly(const bool bMeshBBoxOnly) override; + + /** + * ILevelSet::GetMeshBBoxOnly - If set only the bounding box of the mesh is intersected with the boundary + * @return If set only the bounding box of the mesh is intersected with the boundary + */ + bool GetMeshBBoxOnly() override; + + /** + * ILevelSet::SetMesh - Sets the mesh to use as evaluation domain + * @param[in] pTheMesh - The mesh + */ + void SetMesh(IMeshObject* pTheMesh) override; + + /** + * ILevelSet::GetMesh - Returns the mesh that is used as evaluation domain + * @return The mesh + */ + IMeshObject * GetMesh() override; + + + /** + * ILevelSet::GetVolumeData - Retrieves the VolumeData this MeshObject. + * @return the VolumeData of this MeshObject + */ + IVolumeData * GetVolumeData() override; + + /** + * ILevelSet::SetVolumeData - Sets the VolumeData of this LevelSet. + * @param[in] pTheVolumeData - the VolumeData of this MeshObject + */ + void SetVolumeData(IVolumeData* pTheVolumeData) override; + + bool IsMeshObject() override; + + bool IsComponentsObject() override; + + bool IsLevelSetObject() override; +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_BOUNDARYSHAPE diff --git a/Include/API/lib3mf_levelsetiterator.hpp b/Include/API/lib3mf_levelsetiterator.hpp new file mode 100644 index 000000000..1684a1322 --- /dev/null +++ b/Include/API/lib3mf_levelsetiterator.hpp @@ -0,0 +1,93 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CLevelSetIterator + +*/ + + +#ifndef __LIB3MF_BOUNDARYSHAPEITERATOR +#define __LIB3MF_BOUNDARYSHAPEITERATOR + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_resourceiterator.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CLevelSetIterator +**************************************************************************************************************************/ + +class CLevelSetIterator : public virtual ILevelSetIterator, public virtual CResourceIterator { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * ILevelSetIterator::GetCurrentLevelSet - Returns the LevelSet the iterator points at. + * @return returns the MeshObject instance. + */ + ILevelSet * GetCurrentLevelSet() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_BOUNDARYSHAPEITERATOR diff --git a/Include/API/lib3mf_log10node.hpp b/Include/API/lib3mf_log10node.hpp new file mode 100644 index 000000000..d8429eaad --- /dev/null +++ b/Include/API/lib3mf_log10node.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CLog10Node + +*/ + + +#ifndef __LIB3MF_LOG10NODE +#define __LIB3MF_LOG10NODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CLog10Node +**************************************************************************************************************************/ + +class CLog10Node : public virtual ILog10Node, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CLog10Node(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_LOG10NODE diff --git a/Include/API/lib3mf_log2node.hpp b/Include/API/lib3mf_log2node.hpp new file mode 100644 index 000000000..712028582 --- /dev/null +++ b/Include/API/lib3mf_log2node.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CLog2Node + +*/ + + +#ifndef __LIB3MF_LOG2NODE +#define __LIB3MF_LOG2NODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CLog2Node +**************************************************************************************************************************/ + +class CLog2Node : public virtual ILog2Node, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CLog2Node(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_LOG2NODE diff --git a/Include/API/lib3mf_lognode.hpp b/Include/API/lib3mf_lognode.hpp new file mode 100644 index 000000000..c14eab2be --- /dev/null +++ b/Include/API/lib3mf_lognode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CLogNode + +*/ + + +#ifndef __LIB3MF_LOGNODE +#define __LIB3MF_LOGNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CLogNode +**************************************************************************************************************************/ + +class CLogNode : public virtual ILogNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CLogNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_LOGNODE diff --git a/Include/API/lib3mf_materialmapping.hpp b/Include/API/lib3mf_materialmapping.hpp new file mode 100644 index 000000000..0bfd6d6e5 --- /dev/null +++ b/Include/API/lib3mf_materialmapping.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CMaterialMapping + +*/ + + +#ifndef __LIB3MF_MATERIALMAPPING +#define __LIB3MF_MATERIALMAPPING + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_functionreference.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CMaterialMapping +**************************************************************************************************************************/ + +class CMaterialMapping : public virtual IMaterialMapping, public virtual CFunctionReference { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_MATERIALMAPPING diff --git a/Include/API/lib3mf_matrixfromcolumnsnode.hpp b/Include/API/lib3mf_matrixfromcolumnsnode.hpp new file mode 100644 index 000000000..0fe970046 --- /dev/null +++ b/Include/API/lib3mf_matrixfromcolumnsnode.hpp @@ -0,0 +1,117 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CMatrixFromColumnsNode + +*/ + + +#ifndef __LIB3MF_MATRIXFROMCOLUMNSNODE +#define __LIB3MF_MATRIXFROMCOLUMNSNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CMatrixFromColumnsNode +**************************************************************************************************************************/ + +class CMatrixFromColumnsNode : public virtual IMatrixFromColumnsNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CMatrixFromColumnsNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IMatrixFromColumnsNode::GetInputA - Retrieves the input for the first column + * @return the input for the first column + */ + IImplicitPort * GetInputA() override; + + /** + * IMatrixFromColumnsNode::GetInputB - Retrieves the input for the second column + * @return the input for the second column + */ + IImplicitPort * GetInputB() override; + + /** + * IMatrixFromColumnsNode::GetInputC - Retrieves the input for the third column + * @return the input for the third column + */ + IImplicitPort * GetInputC() override; + + /** + * IMatrixFromColumnsNode::GetInputD - Retrieves the input for the fourth column + * @return the input for the fourth column + */ + IImplicitPort * GetInputD() override; + + /** + * IMatrixFromColumnsNode::GetOutputResult - Retrieves the output + * @return the output + */ + IImplicitPort * GetOutputResult() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_MATRIXFROMCOLUMNSNODE diff --git a/Include/API/lib3mf_matrixfromrowsnode.hpp b/Include/API/lib3mf_matrixfromrowsnode.hpp new file mode 100644 index 000000000..b02703de5 --- /dev/null +++ b/Include/API/lib3mf_matrixfromrowsnode.hpp @@ -0,0 +1,117 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CMatrixFromRowsNode + +*/ + + +#ifndef __LIB3MF_MATRIXFROMROWSNODE +#define __LIB3MF_MATRIXFROMROWSNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CMatrixFromRowsNode +**************************************************************************************************************************/ + +class CMatrixFromRowsNode : public virtual IMatrixFromRowsNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CMatrixFromRowsNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IMatrixFromRowsNode::GetInputA - Retrieves the input for the first row + * @return the input for the first row + */ + IImplicitPort * GetInputA() override; + + /** + * IMatrixFromRowsNode::GetInputB - Retrieves the input for the second row + * @return the input for the second row + */ + IImplicitPort * GetInputB() override; + + /** + * IMatrixFromRowsNode::GetInputC - Retrieves the input for the third row + * @return the input for the third row + */ + IImplicitPort * GetInputC() override; + + /** + * IMatrixFromRowsNode::GetInputD - Retrieves the input for the fourth row + * @return the input for the fourth row + */ + IImplicitPort * GetInputD() override; + + /** + * IMatrixFromRowsNode::GetOutputResult - Retrieves the output + * @return the output + */ + IImplicitPort * GetOutputResult() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_MATRIXFROMROWSNODE diff --git a/Include/API/lib3mf_matvecmultiplicationnode.hpp b/Include/API/lib3mf_matvecmultiplicationnode.hpp new file mode 100644 index 000000000..c534ce439 --- /dev/null +++ b/Include/API/lib3mf_matvecmultiplicationnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CMatVecMultiplicationNode + +*/ + + +#ifndef __LIB3MF_MATVECMULTIPLICATIONNODE +#define __LIB3MF_MATVECMULTIPLICATIONNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CMatVecMultiplicationNode +**************************************************************************************************************************/ + +class CMatVecMultiplicationNode : public virtual IMatVecMultiplicationNode, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CMatVecMultiplicationNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_MATVECMULTIPLICATIONNODE diff --git a/Include/API/lib3mf_maxnode.hpp b/Include/API/lib3mf_maxnode.hpp new file mode 100644 index 000000000..06969d7c6 --- /dev/null +++ b/Include/API/lib3mf_maxnode.hpp @@ -0,0 +1,84 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CMaxNode + +*/ + +#ifndef __LIB3MF_MAXNODE +#define __LIB3MF_MAXNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + +namespace Lib3MF +{ + namespace Impl + { + + /************************************************************************************************************************* + Class declaration of CMaxNode + **************************************************************************************************************************/ + + class CMaxNode : public virtual IMaxNode, public virtual CTwoInputNode + { + private: + /** + * Put private members here. + */ + + protected: + /** + * Put protected members here. + */ + + public: + CMaxNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in + * the external API. + */ + + /** + * Public member functions to implement. + */ + }; + + } // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_MAXNODE diff --git a/Include/API/lib3mf_meshnode.hpp b/Include/API/lib3mf_meshnode.hpp new file mode 100644 index 000000000..6094a1445 --- /dev/null +++ b/Include/API/lib3mf_meshnode.hpp @@ -0,0 +1,105 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CMeshNode + +*/ + + +#ifndef __LIB3MF_MESHNODE +#define __LIB3MF_MESHNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CMeshNode +**************************************************************************************************************************/ + +class CMeshNode : public virtual IMeshNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CMeshNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IMeshNode::GetInputMesh - Retrieves the input for the model resource id of the mesh + * @return the input port for the model resource id of the mesh + */ + IImplicitPort * GetInputMesh() override; + + /** + * IMeshNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position + */ + IImplicitPort * GetInputPos() override; + + /** + * IMeshNode::GetOutputDistance - Retrieves the output + * @return the output port for the signed distance to the mesh + */ + IImplicitPort * GetOutputDistance() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_MESHNODE diff --git a/Include/API/lib3mf_meshobject.hpp b/Include/API/lib3mf_meshobject.hpp index edc714c5c..b5630a2dc 100644 --- a/Include/API/lib3mf_meshobject.hpp +++ b/Include/API/lib3mf_meshobject.hpp @@ -109,7 +109,9 @@ class CMeshObject : public virtual IMeshObject, public virtual CObject { bool IsComponentsObject(); - bool IsValid(); + bool IsLevelSetObject() override; + + bool IsValid(); virtual IBeamLattice * BeamLattice(); @@ -126,6 +128,10 @@ class CMeshObject : public virtual IMeshObject, public virtual CObject { void GetAllTriangleProperties(Lib3MF_uint64 nPropertiesArrayBufferSize, Lib3MF_uint64* pPropertiesArrayNeededCount, sLib3MFTriangleProperties * pPropertiesArrayBuffer); void ClearAllProperties(); + + IVolumeData * GetVolumeData() override; + + void SetVolumeData(IVolumeData* pTheVolumeData) override; }; } diff --git a/Include/API/lib3mf_minnode.hpp b/Include/API/lib3mf_minnode.hpp new file mode 100644 index 000000000..47cdb5e4a --- /dev/null +++ b/Include/API/lib3mf_minnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CMinNode + +*/ + + +#ifndef __LIB3MF_MINNODE +#define __LIB3MF_MINNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CMinNode +**************************************************************************************************************************/ + +class CMinNode : public virtual IMinNode, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CMinNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_MINNODE diff --git a/Include/API/lib3mf_model.hpp b/Include/API/lib3mf_model.hpp index d491ea086..6326c1227 100644 --- a/Include/API/lib3mf_model.hpp +++ b/Include/API/lib3mf_model.hpp @@ -58,6 +58,8 @@ class CModel : public virtual IModel, public virtual CBase { NMR::PModel m_model; + void mergeModel(NMR::CModel & sourceModel, NMR::CModel & targetModel); + protected: /** @@ -117,7 +119,9 @@ class CModel : public virtual IModel, public virtual CBase { ISliceStack * GetSliceStackByID(const Lib3MF_uint32 nUniqueResourceID) override; - std::string GetBuildUUID (bool & bHasUUID) override; + ILevelSet* GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID) override; + + std::string GetBuildUUID (bool & bHasUUID) override; void SetBuildUUID (const std::string & sUUID) override; @@ -147,6 +151,8 @@ class CModel : public virtual IModel, public virtual CBase { IModel * MergeToModel() override; + void MergeFromModel(IModel* pModelInstance) override; + IMeshObject * AddMeshObject() override; IComponentsObject * AddComponentsObject() override; @@ -195,9 +201,29 @@ class CModel : public virtual IModel, public virtual CBase { Lib3MF::sBox GetOutbox() override; - IKeyStore * GetKeyStore(); + IKeyStore * GetKeyStore() override; + + void SetRandomNumberCallback(const Lib3MF::RandomNumberCallback pTheCallback, const Lib3MF_pvoid pUserData) override; + + IImageStack * AddImageStack(const Lib3MF_uint32 nSizeX, const Lib3MF_uint32 nSizeY, const Lib3MF_uint32 nSheetCount) override; + + IImageStack* GetImageStackByID(const Lib3MF_uint32 nUniqueResourceID) override; + + IImage3DIterator * GetImage3Ds() override; + + IFunctionIterator * GetFunctions() override; + + IImplicitFunction * AddImplicitFunction() override; + + IFunctionFromImage3D* AddFunctionFromImage3D(IImage3D* pImage3DInstance) override; + + IVolumeData * AddVolumeData() override; + + ILevelSet* AddLevelSet() override; + + ILevelSetIterator * GetLevelSets() override; - void SetRandomNumberCallback(const Lib3MF::RandomNumberCallback pTheCallback, const Lib3MF_pvoid pUserData); + void RemoveResource(IResource* pResource) override; }; } diff --git a/Include/API/lib3mf_modnode.hpp b/Include/API/lib3mf_modnode.hpp new file mode 100644 index 000000000..8ea0e796d --- /dev/null +++ b/Include/API/lib3mf_modnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CModNode + +*/ + + +#ifndef __LIB3MF_MODNODE +#define __LIB3MF_MODNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CModNode +**************************************************************************************************************************/ + +class CModNode : public virtual IModNode, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CModNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_MODNODE diff --git a/Include/API/lib3mf_multiplicationnode.hpp b/Include/API/lib3mf_multiplicationnode.hpp new file mode 100644 index 000000000..032fa1bb2 --- /dev/null +++ b/Include/API/lib3mf_multiplicationnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CMultiplicationNode + +*/ + + +#ifndef __LIB3MF_MULTIPLICATIONNODE +#define __LIB3MF_MULTIPLICATIONNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CMultiplicationNode +**************************************************************************************************************************/ + +class CMultiplicationNode : public virtual IMultiplicationNode, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CMultiplicationNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_MULTIPLICATIONNODE diff --git a/Include/API/lib3mf_nodeiterator.hpp b/Include/API/lib3mf_nodeiterator.hpp new file mode 100644 index 000000000..4839fa5c6 --- /dev/null +++ b/Include/API/lib3mf_nodeiterator.hpp @@ -0,0 +1,96 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CNodeIterator + +*/ + +#ifndef __LIB3MF_NODEITERATOR +#define __LIB3MF_NODEITERATOR + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_iterator.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "lib3mf_implicitfunction.hpp" +#include "lib3mf_implicitnode.hpp" + +namespace Lib3MF +{ + namespace Impl + { + + /************************************************************************************************************************* + Class declaration of CNodeIterator + **************************************************************************************************************************/ + + class CNodeIterator : public virtual INodeIterator, public virtual CIterator + { + private: + /** + * Put private members here. + */ + NMR::PImplicitNodes m_pNodes; + + IImplicitNode * implicitNodeFromModelImplicitNode(NMR::PModelImplicitNode pNode); + protected: + /** + * Put protected members here. + */ + + public: + CNodeIterator(NMR::PImplicitNodes pNodes); + CNodeIterator() = delete; + /** + * Put additional public members here. They will not be visible in the external API. + */ + + /** + * Public member functions to implement. + */ + + /** + * INodeIterator::GetCurrent - Returns the current element + * @return The current element + */ + IImplicitNode * GetCurrent() override; + + Lib3MF_uint64 Count() override; + }; + + } // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_NODEITERATOR diff --git a/Include/API/lib3mf_object.hpp b/Include/API/lib3mf_object.hpp index 24bee6cac..1b92133ff 100644 --- a/Include/API/lib3mf_object.hpp +++ b/Include/API/lib3mf_object.hpp @@ -92,6 +92,8 @@ class CObject : public virtual IObject, public virtual CResource { virtual bool IsComponentsObject (); + virtual bool IsLevelSetObject (); + virtual IMeshObject * AsMeshObject(); virtual IComponentsObject * AsComponentsObject(); diff --git a/Include/API/lib3mf_oneinputnode.hpp b/Include/API/lib3mf_oneinputnode.hpp new file mode 100644 index 000000000..823e7d4ce --- /dev/null +++ b/Include/API/lib3mf_oneinputnode.hpp @@ -0,0 +1,101 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of COneInputNode + +*/ + + +#ifndef __LIB3MF_ONEINPUTNODE +#define __LIB3MF_ONEINPUTNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of COneInputNode +**************************************************************************************************************************/ + +class COneInputNode : public virtual IOneInputNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + COneInputNode() = default; + COneInputNode(NMR::PModelImplicitNode pImplicitNode); + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IOneInputNode::GetInputA - Retrieves the input + * @return the input + */ + IImplicitPort * GetInputA() override; + + /** + * IOneInputNode::GetOutputResult - Retrieves the output + * @return the output + */ + IImplicitPort * GetOutputResult() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_ONEINPUTNODE diff --git a/Include/API/lib3mf_pownode.hpp b/Include/API/lib3mf_pownode.hpp new file mode 100644 index 000000000..991e53bc1 --- /dev/null +++ b/Include/API/lib3mf_pownode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CPowNode + +*/ + + +#ifndef __LIB3MF_POWNODE +#define __LIB3MF_POWNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CPowNode +**************************************************************************************************************************/ + +class CPowNode : public virtual IPowNode, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CPowNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_POWNODE diff --git a/Include/API/lib3mf_resource.hpp b/Include/API/lib3mf_resource.hpp index a24bf7f2e..846a27f31 100644 --- a/Include/API/lib3mf_resource.hpp +++ b/Include/API/lib3mf_resource.hpp @@ -61,9 +61,9 @@ class CResource : public virtual IResource, public virtual CBase { protected: - NMR::PModelResource resource(); - public: + NMR::CModel* model(); + NMR::PModelResource resource(); /** * Put additional public members here. They will not be visible in the external API. diff --git a/Include/API/lib3mf_resourceidnode.hpp b/Include/API/lib3mf_resourceidnode.hpp new file mode 100644 index 000000000..2e620b41f --- /dev/null +++ b/Include/API/lib3mf_resourceidnode.hpp @@ -0,0 +1,106 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CResourceIdNode + +*/ + + +#ifndef __LIB3MF_RESOURCEIDNODE +#define __LIB3MF_RESOURCEIDNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CResourceIdNode +**************************************************************************************************************************/ + +class CResourceIdNode : public virtual IResourceIdNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + + CResourceIdNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IResourceIdNode::SetResource - Sets the Resource that the resourceid attribute of the node will point to + * @param[in] pResource - the resource + */ + void SetResource(IResource* pResource) override; + + /** + * IResourceIdNode::GetResource - Retrieves the resource of the node + * @return the resource + */ + IResource * GetResource() override; + + /** + * IResourceIdNode::GetOutputValue - Retrieves the output + * @return the output + */ + IImplicitPort * GetOutputValue() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_RESOURCEIDNODE diff --git a/Include/API/lib3mf_resourceiterator.hpp b/Include/API/lib3mf_resourceiterator.hpp index 064117203..42e76a972 100644 --- a/Include/API/lib3mf_resourceiterator.hpp +++ b/Include/API/lib3mf_resourceiterator.hpp @@ -54,6 +54,8 @@ namespace Impl { class CResourceIterator : public virtual IResourceIterator, public virtual CBase { private: + NMR::PModel m_pModel; + std::vector m_pResources; Lib3MF_int32 m_nCurrentIndex; diff --git a/Include/API/lib3mf_roundnode.hpp b/Include/API/lib3mf_roundnode.hpp new file mode 100644 index 000000000..72662118d --- /dev/null +++ b/Include/API/lib3mf_roundnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CRoundNode + +*/ + + +#ifndef __LIB3MF_ROUNDNODE +#define __LIB3MF_ROUNDNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CRoundNode +**************************************************************************************************************************/ + +class CRoundNode : public virtual IRoundNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CRoundNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_ROUNDNODE diff --git a/Include/API/lib3mf_selectnode.hpp b/Include/API/lib3mf_selectnode.hpp new file mode 100644 index 000000000..7b0cf39ce --- /dev/null +++ b/Include/API/lib3mf_selectnode.hpp @@ -0,0 +1,105 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CSelectNode + +*/ + + +#ifndef __LIB3MF_SELECTNODE +#define __LIB3MF_SELECTNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CSelectNode +**************************************************************************************************************************/ + +class CSelectNode : public virtual ISelectNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CSelectNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * ISelectNode::GetInputB - Retrieves the second input + * @return the second input + */ + IImplicitPort * GetInputB() override; + + /** + * ISelectNode::GetInputC - Retrieves the third input + * @return the third input + */ + IImplicitPort * GetInputC() override; + + /** + * ISelectNode::GetInputD - Retrieves the fourth input + * @return the fourth input + */ + IImplicitPort * GetInputD() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_SELECTNODE diff --git a/Include/API/lib3mf_signnode.hpp b/Include/API/lib3mf_signnode.hpp new file mode 100644 index 000000000..1451891e3 --- /dev/null +++ b/Include/API/lib3mf_signnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CSignNode + +*/ + + +#ifndef __LIB3MF_SIGNNODE +#define __LIB3MF_SIGNNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CSignNode +**************************************************************************************************************************/ + +class CSignNode : public virtual ISignNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CSignNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_SIGNNODE diff --git a/Include/API/lib3mf_sinhnode.hpp b/Include/API/lib3mf_sinhnode.hpp new file mode 100644 index 000000000..397b75e8a --- /dev/null +++ b/Include/API/lib3mf_sinhnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CSinhNode + +*/ + + +#ifndef __LIB3MF_SINHNODE +#define __LIB3MF_SINHNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CSinhNode +**************************************************************************************************************************/ + +class CSinhNode : public virtual ISinhNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CSinhNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_SINHNODE diff --git a/Include/API/lib3mf_sinnode.hpp b/Include/API/lib3mf_sinnode.hpp new file mode 100644 index 000000000..2b19cb2c8 --- /dev/null +++ b/Include/API/lib3mf_sinnode.hpp @@ -0,0 +1,88 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CSinNode + +*/ + + +#ifndef __LIB3MF_SINNODE +#define __LIB3MF_SINNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CSinNode +**************************************************************************************************************************/ + +class CSinNode : public virtual ISinNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CSinNode(NMR::PModelImplicitNode pImplicitNode); + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_SINNODE diff --git a/Include/API/lib3mf_sqrtnode.hpp b/Include/API/lib3mf_sqrtnode.hpp new file mode 100644 index 000000000..bb8124f7e --- /dev/null +++ b/Include/API/lib3mf_sqrtnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CSqrtNode + +*/ + + +#ifndef __LIB3MF_SQRTNODE +#define __LIB3MF_SQRTNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CSqrtNode +**************************************************************************************************************************/ + +class CSqrtNode : public virtual ISqrtNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CSqrtNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_SQRTNODE diff --git a/Include/API/lib3mf_subtractionnode.hpp b/Include/API/lib3mf_subtractionnode.hpp new file mode 100644 index 000000000..4e6eb351c --- /dev/null +++ b/Include/API/lib3mf_subtractionnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CSubtractionNode + +*/ + + +#ifndef __LIB3MF_SUBTRACTIONNODE +#define __LIB3MF_SUBTRACTIONNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_twoinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CSubtractionNode +**************************************************************************************************************************/ + +class CSubtractionNode : public virtual ISubtractionNode, public virtual CTwoInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CSubtractionNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_SUBTRACTIONNODE diff --git a/Include/API/lib3mf_tanhnode.hpp b/Include/API/lib3mf_tanhnode.hpp new file mode 100644 index 000000000..a6ff9ad61 --- /dev/null +++ b/Include/API/lib3mf_tanhnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CTanhNode + +*/ + + +#ifndef __LIB3MF_TANHNODE +#define __LIB3MF_TANHNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CTanhNode +**************************************************************************************************************************/ + +class CTanhNode : public virtual ITanhNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CTanhNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_TANHNODE diff --git a/Include/API/lib3mf_tannode.hpp b/Include/API/lib3mf_tannode.hpp new file mode 100644 index 000000000..53c0c86b6 --- /dev/null +++ b/Include/API/lib3mf_tannode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CTanNode + +*/ + + +#ifndef __LIB3MF_TANNODE +#define __LIB3MF_TANNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CTanNode +**************************************************************************************************************************/ + +class CTanNode : public virtual ITanNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CTanNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_TANNODE diff --git a/Include/API/lib3mf_transposenode.hpp b/Include/API/lib3mf_transposenode.hpp new file mode 100644 index 000000000..a1c30ca65 --- /dev/null +++ b/Include/API/lib3mf_transposenode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CTransposeNode + +*/ + + +#ifndef __LIB3MF_TRANSPOSENODE +#define __LIB3MF_TRANSPOSENODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CTransposeNode +**************************************************************************************************************************/ + +class CTransposeNode : public virtual ITransposeNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CTransposeNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_TRANSPOSENODE diff --git a/Include/API/lib3mf_twoinputnode.hpp b/Include/API/lib3mf_twoinputnode.hpp new file mode 100644 index 000000000..a53225985 --- /dev/null +++ b/Include/API/lib3mf_twoinputnode.hpp @@ -0,0 +1,94 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CTwoInputNode + +*/ + + +#ifndef __LIB3MF_TWOINPUTNODE +#define __LIB3MF_TWOINPUTNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CTwoInputNode +**************************************************************************************************************************/ + +class CTwoInputNode : public virtual ITwoInputNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CTwoInputNode() = default; + CTwoInputNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * ITwoInputNode::GetInputB - Retrieves the second input + * @return the second input + */ + IImplicitPort * GetInputB() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_TWOINPUTNODE diff --git a/Include/API/lib3mf_unsignedmeshnode.hpp b/Include/API/lib3mf_unsignedmeshnode.hpp new file mode 100644 index 000000000..29dbe1f90 --- /dev/null +++ b/Include/API/lib3mf_unsignedmeshnode.hpp @@ -0,0 +1,105 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CUnsignedMeshNode + +*/ + + +#ifndef __LIB3MF_UNSIGNEDMESHNODE +#define __LIB3MF_UNSIGNEDMESHNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_implicitnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CUnsignedMeshNode +**************************************************************************************************************************/ + +class CUnsignedMeshNode : public virtual IUnsignedMeshNode, public virtual CImplicitNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CUnsignedMeshNode(NMR::PModelImplicitNode pImplicitNode); + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ + + /** + * IUnsignedMeshNode::GetInputMesh - Retrieves the input for the model resource id of the mesh + * @return the input port for the model resource id of the mesh + */ + IImplicitPort * GetInputMesh() override; + + /** + * IUnsignedMeshNode::GetInputPos - Retrieves the input for the position + * @return the input port for the position + */ + IImplicitPort * GetInputPos() override; + + /** + * IUnsignedMeshNode::GetOutputDistance - Retrieves the output + * @return the output port for the unsigned distance to the mesh + */ + IImplicitPort * GetOutputDistance() override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_UNSIGNEDMESHNODE diff --git a/Include/API/lib3mf_utils.hpp b/Include/API/lib3mf_utils.hpp index 235df5d2e..66883f3d5 100644 --- a/Include/API/lib3mf_utils.hpp +++ b/Include/API/lib3mf_utils.hpp @@ -36,6 +36,7 @@ Abstract: This file contains utilties used in the API of lib3mf // Include custom headers here. #include "Common/Math/NMR_Matrix.h" +#include "Model/Classes/NMR_ModelTypes.h" #include "Common/NMR_SecureContentTypes.h" namespace Lib3MF { diff --git a/Include/API/lib3mf_vectorfromscalarnode.hpp b/Include/API/lib3mf_vectorfromscalarnode.hpp new file mode 100644 index 000000000..aa9d78750 --- /dev/null +++ b/Include/API/lib3mf_vectorfromscalarnode.hpp @@ -0,0 +1,87 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CVectorFromScalarNode + +*/ + + +#ifndef __LIB3MF_VECTORFROMSCALARNODE +#define __LIB3MF_VECTORFROMSCALARNODE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_oneinputnode.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. + + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CVectorFromScalarNode +**************************************************************************************************************************/ + +class CVectorFromScalarNode : public virtual IVectorFromScalarNode, public virtual COneInputNode { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + +public: + CVectorFromScalarNode(NMR::PModelImplicitNode pImplicitNode); + + /** + * Put additional public members here. They will not be visible in the external API. + */ + + + /** + * Public member functions to implement. + */ +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_VECTORFROMSCALARNODE diff --git a/Include/API/lib3mf_volumedata.hpp b/Include/API/lib3mf_volumedata.hpp new file mode 100644 index 000000000..d90bee8cf --- /dev/null +++ b/Include/API/lib3mf_volumedata.hpp @@ -0,0 +1,116 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CVolumeData + +*/ + + +#ifndef __LIB3MF_VOLUMEDATA +#define __LIB3MF_VOLUMEDATA + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_base.hpp" +#include "lib3mf_resource.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Common/Mesh/NMR_Mesh.h" +#include "Model/Classes/NMR_ModelVolumeData.h" +#include "Model/Classes/NMR_ModelMeshObject.h" +#include "Model/Classes/NMR_ModelResource.h" + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CVolumeData +**************************************************************************************************************************/ + +class CVolumeData : public virtual IVolumeData, public virtual CResource { +private: + + /** + * Put private members here. + */ + NMR::PModelVolumeData m_pVolumeData; + +protected: + + /** + * Put protected members here. + */ + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + CVolumeData() = delete; + CVolumeData(NMR::PModelResource pResource); + + // CVolumeData(NMR::PModelMeshObject pMeshObject, NMR::PModelVolumeData pVolumeData); + + /** + * Public member functions to implement. + */ + IVolumeDataComposite * GetComposite() override; + + IVolumeDataComposite * CreateNewComposite() override; + + void RemoveComposite() override; + + IVolumeDataColor * GetColor() override; + + IVolumeDataColor* CreateNewColor(IFunction* pTheFunction) override; + + void RemoveColor() override; + + Lib3MF_uint32 GetPropertyCount() override; + + IVolumeDataProperty * GetProperty(const Lib3MF_uint32 nIndex) override; + + IVolumeDataProperty* AddPropertyFromFunction( + const std::string& sName, IFunction* pTheFunction) override; + + + void RemoveProperty(const Lib3MF_uint32 nIndex) override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_VOLUMEDATA diff --git a/Include/API/lib3mf_volumedatacolor.hpp b/Include/API/lib3mf_volumedatacolor.hpp new file mode 100644 index 000000000..524ce8812 --- /dev/null +++ b/Include/API/lib3mf_volumedatacolor.hpp @@ -0,0 +1,89 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CVolumeDataColor + +*/ + + +#ifndef __LIB3MF_VOLUMEDATACOLOR +#define __LIB3MF_VOLUMEDATACOLOR + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_functionreference.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Common/Mesh/NMR_VolumeDataColor.h" + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CVolumeDataColor +**************************************************************************************************************************/ + +class CVolumeDataColor : public virtual IVolumeDataColor, public virtual CFunctionReference { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + NMR::PVolumeDataColor asVolumeDataColor(); + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + CVolumeDataColor() = delete; + CVolumeDataColor(NMR::PVolumeDataColor pColor); + + /** + * Public member functions to implement. + */ + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_VOLUMEDATACOLOR diff --git a/Include/API/lib3mf_volumedatacomposite.hpp b/Include/API/lib3mf_volumedatacomposite.hpp new file mode 100644 index 000000000..b2f9ebf21 --- /dev/null +++ b/Include/API/lib3mf_volumedatacomposite.hpp @@ -0,0 +1,102 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CVolumeDataComposite + +*/ + + +#ifndef __LIB3MF_VOLUMEDATACOMPOSITE +#define __LIB3MF_VOLUMEDATACOMPOSITE + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_base.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Common/Mesh/NMR_VolumeDataComposite.h" + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CVolumeDataComposite +**************************************************************************************************************************/ + +class CVolumeDataComposite : public virtual IVolumeDataComposite, public virtual CBase { +private: + + /** + * Put private members here. + */ + NMR::PVolumeDataComposite m_pVolumeDataComposite; + +protected: + + /** + * Put protected members here. + */ + NMR::PVolumeDataComposite volumeDataComposite(); + + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + CVolumeDataComposite() = delete; + CVolumeDataComposite(NMR::PVolumeDataComposite pComposite); + + /** + * Public member functions to implement. + */ + IBaseMaterialGroup * GetBaseMaterialGroup() override; + + void SetBaseMaterialGroup(IBaseMaterialGroup* pBaseMaterialGroupInstance) override; + + Lib3MF_uint32 GetMaterialMappingCount() override; + + IMaterialMapping * GetMaterialMapping(const Lib3MF_uint32 nIndex) override; + + IMaterialMapping * AddMaterialMapping(const Lib3MF::sTransform Transform) override; + + void RemoveMaterialMapping(const Lib3MF_uint32 nIndex) override; + +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_VOLUMEDATACOMPOSITE diff --git a/Include/API/lib3mf_volumedataproperty.hpp b/Include/API/lib3mf_volumedataproperty.hpp new file mode 100644 index 000000000..696ae5309 --- /dev/null +++ b/Include/API/lib3mf_volumedataproperty.hpp @@ -0,0 +1,94 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is the class declaration of CVolumeDataProperty + +*/ + + +#ifndef __LIB3MF_VOLUMEDATAPROPERTY +#define __LIB3MF_VOLUMEDATAPROPERTY + +#include "lib3mf_interfaces.hpp" + +// Parent classes +#include "lib3mf_functionreference.hpp" +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 4250) +#endif + +// Include custom headers here. +#include "Common/Mesh/NMR_VolumeDataProperty.h" + +namespace Lib3MF { +namespace Impl { + + +/************************************************************************************************************************* + Class declaration of CVolumeDataProperty +**************************************************************************************************************************/ + +class CVolumeDataProperty : public virtual IVolumeDataProperty, public virtual CFunctionReference { +private: + + /** + * Put private members here. + */ + +protected: + + /** + * Put protected members here. + */ + NMR::PVolumeDataProperty asVolumeDataProperty(); + +public: + + /** + * Put additional public members here. They will not be visible in the external API. + */ + CVolumeDataProperty() = delete; + CVolumeDataProperty(NMR::PVolumeDataProperty pProperty); + + /** + * Public member functions to implement. + */ + + std::string GetName() override; + + void SetIsRequired(const bool bIsRequired) override; + + bool IsRequired() override; +}; + +} // namespace Impl +} // namespace Lib3MF + +#ifdef _MSC_VER +#pragma warning(pop) +#endif +#endif // __LIB3MF_VOLUMEDATAPROPERTY diff --git a/Include/API/lib3mf_writer.hpp b/Include/API/lib3mf_writer.hpp index b06fb7a86..9aebe5098 100644 --- a/Include/API/lib3mf_writer.hpp +++ b/Include/API/lib3mf_writer.hpp @@ -100,17 +100,17 @@ class CWriter : public virtual IWriter, public virtual CBase { void SetDecimalPrecision(const Lib3MF_uint32 nDecimalPrecision) override; - void AddKeyWrappingCallback(const std::string & sConsumerID, const Lib3MF::KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData); + void AddKeyWrappingCallback(const std::string & sConsumerID, const Lib3MF::KeyWrappingCallback pTheCallback, const Lib3MF_pvoid pUserData) override; - void SetContentEncryptionCallback(const Lib3MF::ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData); + void SetContentEncryptionCallback(const Lib3MF::ContentEncryptionCallback pTheCallback, const Lib3MF_pvoid pUserData) override; - void SetStrictModeActive(const bool bStrictModeActive); + void SetStrictModeActive(const bool bStrictModeActive) override; - bool GetStrictModeActive(); + bool GetStrictModeActive() override; - std::string GetWarning(const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode); + std::string GetWarning(const Lib3MF_uint32 nIndex, Lib3MF_uint32 & nErrorCode) override; - Lib3MF_uint32 GetWarningCount(); + Lib3MF_uint32 GetWarningCount() override; }; diff --git a/Include/Common/Graph/DirectedGraph.h b/Include/Common/Graph/DirectedGraph.h new file mode 100644 index 000000000..a6a6c0ee1 --- /dev/null +++ b/Include/Common/Graph/DirectedGraph.h @@ -0,0 +1,67 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification,276529 are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#pragma once +#include "IDirectedGraph.h" + +namespace NMR::common::graph +{ + class DirectedGraph : public IDirectedGraph + { + public: + explicit DirectedGraph(std::size_t size); + void addDependency(Identifier id, Identifier idOfDependency) override; + void removeDependency(Identifier id, + Identifier idOfDependency) override; + [[nodiscard]] auto isDirectlyDependingOn( + Identifier id, + Identifier dependencyInQuestion) const -> bool override; + + [[nodiscard]] auto getSize() const -> std::size_t override; + + void removeVertex(Identifier id) override; + + [[nodiscard]] auto getVertices() const -> const DependencySet& override; + void addVertex(Identifier id) override; + + private: + std::size_t m_size; + std::vector m_graphData; + + DependencySet m_vertices; // Possible performance improvement: We could + // try out a std::set + + using PredecessorList = std::vector; + std::vector m_predecessors; + + // Inherited via IDirectedGraph + [[nodiscard]] auto hasPredecessors(Identifier id) const + -> bool override; + }; +} // namespace NMR::common::graph diff --git a/Include/Common/Graph/GraphAlgorithms.h b/Include/Common/Graph/GraphAlgorithms.h new file mode 100644 index 000000000..2ffc4b125 --- /dev/null +++ b/Include/Common/Graph/GraphAlgorithms.h @@ -0,0 +1,41 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification,276529 +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#pragma once + +#include "IDirectedGraph.h" +#include +#include +#include +#include + +namespace NMR::common::graph +{ + VertexList topologicalSort(const IDirectedGraph & graph); + bool isCyclic(const IDirectedGraph & graph); +} diff --git a/Include/Common/Graph/IDirectedGraph.h b/Include/Common/Graph/IDirectedGraph.h new file mode 100644 index 000000000..aa109ff36 --- /dev/null +++ b/Include/Common/Graph/IDirectedGraph.h @@ -0,0 +1,62 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification,276529 are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#pragma once + +#include +#include + +namespace NMR::common::graph +{ + using Identifier = std::size_t; + using DependencySet = std::set; + using VertexList = std::vector; + + class IDirectedGraph + { + public: + explicit IDirectedGraph(std::size_t const /*unused*/) {}; + virtual ~IDirectedGraph() = default; + virtual void addDependency(Identifier id, + Identifier idOfDependency) = 0; + virtual void removeDependency(Identifier id, + Identifier idOfDependency) = 0; + [[nodiscard]] virtual auto isDirectlyDependingOn( + Identifier id, Identifier dependencyInQuestion) const -> bool = 0; + + [[nodiscard]] virtual auto getSize() const -> std::size_t = 0; + virtual void removeVertex(Identifier id) = 0; + virtual void addVertex(Identifier id) = 0; + [[nodiscard]] virtual auto hasPredecessors(Identifier id) const + -> bool = 0; + + [[nodiscard]] virtual auto getVertices() const + -> const DependencySet& = 0; + }; +} // namespace NMR::common::graph diff --git a/Include/Common/Mesh/NMR_Mesh.h b/Include/Common/Mesh/NMR_Mesh.h index 628f43df0..adef011c6 100644 --- a/Include/Common/Mesh/NMR_Mesh.h +++ b/Include/Common/Mesh/NMR_Mesh.h @@ -58,7 +58,6 @@ namespace NMR { CBeamLattice m_BeamLattice; PMeshInformationHandler m_pMeshInformationHandler; - public: CMesh(); CMesh(_In_opt_ CMesh * pMesh); diff --git a/Include/Common/Mesh/NMR_MeshTypes.h b/Include/Common/Mesh/NMR_MeshTypes.h index 5dbe04378..b93169461 100644 --- a/Include/Common/Mesh/NMR_MeshTypes.h +++ b/Include/Common/Mesh/NMR_MeshTypes.h @@ -81,16 +81,13 @@ namespace NMR { m_sIdentifier = ""; } } BEAMSET; - typedef std::shared_ptr PBEAMSET; + typedef std::shared_ptr PBEAMSET; typedef struct MESHBEAM { - nfInt32 m_index; - nfInt32 m_nodeindices[2]; - nfDouble m_radius[2]; - nfInt32 m_capMode[2]; - // eModelBeamLatticeCapMode m_capMode[2]; - MESHBEAM() { - }; + nfInt32 m_index = 1; + nfInt32 m_nodeindices[2] = { 0, 0 }; + nfDouble m_radius[2] = { 1., 1. }; + nfInt32 m_capMode[2] = { 0,0 }; } MESHBEAM; typedef CPagedVector MESHBEAMS; @@ -98,8 +95,6 @@ namespace NMR { nfInt32 m_index; nfInt32 m_nodeindex; nfDouble m_radius; - MESHBALL() { - }; } MESHBALL; typedef CPagedVector MESHBALLS; diff --git a/Include/Common/Mesh/NMR_VolumeDataBoundary.h b/Include/Common/Mesh/NMR_VolumeDataBoundary.h new file mode 100644 index 000000000..f05cee91e --- /dev/null +++ b/Include/Common/Mesh/NMR_VolumeDataBoundary.h @@ -0,0 +1,61 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_VolumeDataBoundary.h defines the class CVolumeDataBoundary. + +--*/ + +#ifndef __NMR_VOLUMEDATABOUNDARY +#define __NMR_VOLUMEDATABOUNDARY + +#include "Common/NMR_Types.h" +#include "Model/Classes/NMR_ModelTypes.h" +#include "Common/NMR_FunctionReference.h" +#include + +namespace NMR { + class CModelFunction; + typedef std::shared_ptr PModelFunction; + + class CVolumeDataBoundary : public CFunctionReference { + private: + + bool m_meshBBoxOnly = false; + public: + CVolumeDataBoundary() = delete; + CVolumeDataBoundary(PModelFunction pFunction); + + bool getMeshBBoxOnly(); + void setMeshBBoxOnly(bool bMeshBBoxOnly); + }; + + typedef std::shared_ptr PVolumeDataBoundary; + +} + +#endif // __NMR_VOLUMEDATABOUNDARY diff --git a/Include/Common/Mesh/NMR_VolumeDataColor.h b/Include/Common/Mesh/NMR_VolumeDataColor.h new file mode 100644 index 000000000..a88db4fc6 --- /dev/null +++ b/Include/Common/Mesh/NMR_VolumeDataColor.h @@ -0,0 +1,54 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_VolumeDataColor.h defines the class CVolumeDataColor. + +--*/ + +#ifndef __NMR_VOLUMECOLOR +#define __NMR_VOLUMECOLOR + +#include "Common/NMR_Types.h" +#include "Model/Classes/NMR_ModelTypes.h" +#include "Common/NMR_FunctionReference.h" +#include "Model/Classes/NMR_ModelResource.h" +#include "Model/Classes/NMR_ModelFunction.h" + +namespace NMR { + + class CVolumeDataColor : public CFunctionReference { + private: + + public: + CVolumeDataColor(PModelFunction pFunction); + }; + + typedef std::shared_ptr PVolumeDataColor; +} + +#endif // __NMR_VOLUMECOLOR diff --git a/Include/Common/Mesh/NMR_VolumeDataComposite.h b/Include/Common/Mesh/NMR_VolumeDataComposite.h new file mode 100644 index 000000000..60b5d3902 --- /dev/null +++ b/Include/Common/Mesh/NMR_VolumeDataComposite.h @@ -0,0 +1,68 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_VolumeComposite.h defines the class CVolumeDataComposite. + +--*/ + +#ifndef __NMR_VOLUMEDATACOMPOSITE +#define __NMR_VOLUMEDATACOMPOSITE + +#include +#include "Common/NMR_Types.h" +#include "Common/NMR_FunctionReference.h" +#include "Model/Classes/NMR_ModelTypes.h" +#include "Model/Classes/NMR_ModelBaseMaterials.h" + +namespace NMR { + + class CModelFunction; + typedef std::shared_ptr PModelFunction; + // does not derive from the CVolumeBase, as CVolumeDataComposite contains + // multiple ScalarFieldReferences, but is not a ScalarFieldReference itself. + class CVolumeDataComposite { + private: + std::vector m_vctFunctionReferences; + NMR::PModelBaseMaterialResource m_pBaseMaterialGroup; + public: + CVolumeDataComposite(); + + NMR::PModelBaseMaterialResource getBaseMaterialGroup(); + void setBaseMaterialGroup(PModelBaseMaterialResource ); + + nfUint32 materialMappingCount() const; + PFunctionReference getMaterialMapping(nfUint32); + PFunctionReference addMaterialMapping(PModelFunction pFunction); + void removeMaterialMapping(nfUint32); + }; + + typedef std::shared_ptr PVolumeDataComposite; + +} + +#endif // __NMR_VOLUMEDATACOMPOSITE diff --git a/Include/Common/Mesh/NMR_VolumeDataProperty.h b/Include/Common/Mesh/NMR_VolumeDataProperty.h new file mode 100644 index 000000000..410c70448 --- /dev/null +++ b/Include/Common/Mesh/NMR_VolumeDataProperty.h @@ -0,0 +1,64 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_VolumeDataProperty.h defines the class CVolumeDataProperty. + +--*/ + +#ifndef __NMR_VOLUMEDATAPROPERTY +#define __NMR_VOLUMEDATAPROPERTY + +#include "Common/NMR_Types.h" +#include "Model/Classes/NMR_ModelTypes.h" +#include "Common/NMR_FunctionReference.h" + +namespace NMR { + class CModelFunction; + typedef std::shared_ptr PModelFunction; + + class CVolumeDataProperty : public CFunctionReference { + private: + std::string m_sName; + bool m_bIsRequired; + public: + CVolumeDataProperty() = delete; + explicit CVolumeDataProperty(PModelFunction pFunction); + CVolumeDataProperty(PModelFunction pFunction, std::string sName); + + std::string getName(); + void setName(std::string sPropertyName); + + bool isRequired(); + void setIsRequired(bool bIsRequired); + }; + + typedef std::shared_ptr PVolumeDataProperty; + +} + +#endif // __NMR_VOLUMEDATAPROPERTY diff --git a/Include/Common/NMR_ErrorConst.h b/Include/Common/NMR_ErrorConst.h index aaaf60fb8..9a772e5d2 100644 --- a/Include/Common/NMR_ErrorConst.h +++ b/Include/Common/NMR_ErrorConst.h @@ -1231,6 +1231,234 @@ Model error codes (0x8XXX) // A keystore element is not base64 encoded #define NMR_ERROR_KEYSTOREINVALIDENCODING 0x810E +// errors for the volumetric extension 0x88xx + +// Invalid Image3D Size +#define NMR_ERROR_INVALIDIMAGE3DSIZE 0x8800 + +// Too many channel selectors +#define NMR_ERROR_TOOMANYCHANNELSELECTORS 0x8801 + +// Too many volumetric channels +#define NMR_ERROR_TOOMANYVOLUMETRICCHANNELS 0x8802 + +// Could not map package ID +#define NMR_ERROR_COULDNOTMAPPACKAGEID 0x8803 + +// Duplicate volumetric channel +#define NMR_ERROR_DUPLICATEVOLUMETRICCHANNEL 0x8804 + +// Could not remove volumetric layer +#define NMR_ERROR_COULDNOTREMOVEVOLUMETRICLAYER 0x8805 + +// Could not reindex volumetric layer +#define NMR_ERROR_COULDNOTREINDEXVOLUMETRICLAYER 0x8806 + +// Could not reindex channel selector +#define NMR_ERROR_COULDNOTREINDEXCHANNELSELECTOR 0x8807 + +// Duplicate Image3D Name +#define NMR_ERROR_DUPLICATEIMAGE3DNAME 0x8808 + +// Duplicate Image3D Size +#define NMR_ERROR_DUPLICATEIMAGESTACKSIZE 0x8809 + +// Duplicate Image3D Sheet count +#define NMR_ERROR_DUPLICATEIMAGESTACKSHEETCOUNT 0x880A + +// Missing Image Stack Size +#define NMR_ERROR_MISSINGIMAGESTACKSIZE 0x880B + +// Missing Image Stack Sheetcount +#define NMR_ERROR_MISSINGIMAGESTACKSHEETCOUNT 0x880C + +// Missing 3D Image Name +#define NMR_ERROR_MISSINGIMAGE3DNAME 0x880D + +// Invalid Image3D Sheet Count +#define NMR_ERROR_INVALIDIMAGSHEETCOUNT 0x880E + +// Image Sheet not found +#define NMR_ERROR_IMAGESHEETNOTFOUND 0x880F + +// Too many Image Stack sheets +#define NMR_ERROR_TOOMANYIMAGESHEETS 0x8810 + +// Missing Image3D sheet path +#define NMR_ERROR_MISSINGIMAGE3DSHEETPATH 0x8811 + +// Duplicate Volumetric Background +#define NMR_ERROR_DUPLICATEVOLUMETRICBACKGROUND 0x8812 + +// Invalid Volumetric Background +#define NMR_ERROR_INVALIDVOLUMETRICBACKGROUND 0x8813 + +// Missing Volumetric DstChannel Name +#define NMR_ERROR_MISSINGVOLUMETRICDSTCHANNELNAME 0x8814 + +// Missing Volumetric Layer Blend Method +#define NMR_ERROR_MISSINGVOLUMETRICLAYERBLENDMETHOD 0x8815 + +// Duplicate Volumetric Blend Method +#define NMR_ERROR_DUPLICATEVOLUMETRICBLENDMETHOD 0x8816 + +// Missing Volumetric Layer Transform +#define NMR_ERROR_MISSINGVOLUMETRICLAYERTRANSFORM 0x8817 + +// Duplicate Volumetric Transform +#define NMR_ERROR_DUPLICATEVOLUMETRICTRANSFORM 0x8818 + +// Duplicate Volumetric Src Alpha +#define NMR_ERROR_DUPLICATEVOLUMETRICSRCALPHA 0x8819 + +// Invalid Volumetric Src Alpha +#define NMR_ERROR_INVALIDVOLUMETRICSRCALPHA 0x881A + +// Duplicate Volumetric Dst Alpha +#define NMR_ERROR_DUPLICATEVOLUMETRICDSTALPHA 0x881B + +// Invalid Volumetric Dst Alpha +#define NMR_ERROR_INVALIDVOLUMETRICDSTALPHA 0x881C + +// Duplicate Mask Channel Selector +#define NMR_ERROR_DUPLICATEMASKCHANNELSELECTOR 0x881D + +// Duplicate Volumetric Min Value +#define NMR_ERROR_DUPLICATEVOLUMETRICMINVALUE 0x881E + +// Invalid Volumetric Min Value +#define NMR_ERROR_INVALIDVOLUMETRICMINVALUE 0x881F + +// Duplicate Volumetric Max Value +#define NMR_ERROR_DUPLICATEVOLUMETRICMAXVALUE 0x8820 + +// Invalid Volumetric Max Value +#define NMR_ERROR_INVALIDVOLUMETRICMAXVALUE 0x8821 + +// Missing Channel Selector ID +#define NMR_ERROR_MISSINGCHANNELSELECTORID 0x8822 + +// Missing Channel Selector TileStyle +#define NMR_ERROR_MISSINGCHANNELSELECTORTILESTYLE 0x8823 + +// Duplicate Volumetric TileStyle +#define NMR_ERROR_DUPLICATEVOLUMETRICTILESTYLE 0x8824 + +// Duplicate Volumetric Filter +#define NMR_ERROR_DUPLICATEVOLUMETRICFILTER 0x8825 + +// Duplicate Volumetric Source Channel +#define NMR_ERROR_DUPLICATEVOLUMETRICSOURCECHANNEL 0x8826 + +// Duplicate Volumetric Destination Channel +#define NMR_ERROR_DUPLICATEVOLUMETRICDESTINATIONCHANNEL 0x8827 + +// Duplicate VolumeData Levelset +#define NMR_ERROR_DUPLICATEVOLUMEDATABOUNDARY 0x8828 + +// Duplicate VolumeData Transform +#define NMR_ERROR_DUPLICATEVOLUMEDATATRANSFORM 0x8829 + +// Duplicate VolumeData Channel +#define NMR_ERROR_DUPLICATEVOLUMEDATACHANNEL 0x882A + +// Duplicate VolumeData VolumetricStackID +#define NMR_ERROR_DUPLICATEVOLUMEDATAFIELDID 0x882B + +// Duplicate VolumeData Solid Threshold +#define NMR_ERROR_DUPLICATEVOLUMEDATASOLIDTHRESHOLD 0x882C + +// Missing VolumeData Channel +#define NMR_ERROR_MISSINGVOLUMEDATACHANNEL 0x882D + +// Missing VolumeData VolumetricStackID +#define NMR_ERROR_MISSINGVOLUMEDATAFIELDID 0x882E + +// Invalid VolumeData Solid Threshold +#define NMR_ERROR_INVALIDVOLUMEDATASOLIDTHRESHOLD 0x882F + +// Duplicate VolumeData Property +#define NMR_ERROR_DUPLICATEVOLUMEDATAPROPERTY 0x8830 + +// Missing VolumeData Property +#define NMR_ERROR_MISSINGVOLUMEDATAPROPERTYNAME 0x8831 + +// Missing Volumetric Source Alpha +#define NMR_ERROR_MISSINGVOLUMETRICSRCALPHA 0x882 + +// Missing Volumetric Destination Alpha +#define NMR_ERROR_MISSINGVOLUMETRICDSTALPHA 0x8833 + +// Missing attribute in scalar field composed +#define NMR_ERROR_MISSING_ATTRIBUTE_SCALARFIELDCOMPOSED 0x8834 + +// Duplicate attribute in scalar field composed +#define NMR_ERROR_DUPLICATE_ATTRIBUTE_SCALARFIELDCOMPOSED 0x8835 + +// Missing attribute in vector3d field composed +#define NMR_ERROR_MISSING_ATTRIBUTE_VECTOR3DFIELDCOMPOSED 0x8836 + +// Duplicate attribute in vector3d field composed +#define NMR_ERROR_DUPLICATE_ATTRIBUTE_VECTOR3DFIELDCOMPOSED 0x8837 + +// Unknown node type in implict model +#define NMR_ERROR_UNKNOWN_NODETYPE_IMPLICITMODEL 0x8838 + +// Invalid source node in implicit function +#define NMR_ERROR_IMPLICIT_FUNCTION_INVALID_SOURCE_NODE 0x8839 + +// Invalid target node in implicit function +#define NMR_ERROR_IMPLICIT_FUNCTION_INVALID_TARGET_NODE 0x883A + +// Invalid source port in implicit function +#define NMR_ERROR_IMPLICIT_FUNCTION_INVALID_SOURCE_PORT 0x883B + +// Invalid target port in implicit function +#define NMR_ERROR_IMPLICIT_FUNCTION_INVALID_TARGET_PORT 0x883C + +// Invalid port type in implicit function +#define NMR_ERROR_IMPLICIT_FUNCTION_INVALID_PORT_TYPE 0x883D + +// Port does not exist in node +#define NMR_ERROR_IMPLICIT_PORT_DOES_NOT_EXIST 0x883E + +// Duplicate attribute meshbboxonly in volumedata boundary +#define NMR_ERROR_DUPLICATE_VOLUMEDATA_MESHBBOXONLY 0x883F + +// Duplicate attribute minfeature size in volumedata element +#define NMR_ERROR_DUPLICATE_VOLUMEDATA_MINFEATURESIZE 0x8840 + +// Function graph is not a directed acyclic graph +#define NMR_ERROR_IMPLICIT_FUNCTION_CYCLIC_GRAPH 0x8841 + +// Duplicate attribute fallbackvalue in volumedata element +#define NMR_ERROR_DUPLICATE_VOLUMEDATA_FALLBACKVALUE 0x8842 + +// Duplicate attribute functionid in levelset element +#define NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_FUNCTION_ID 0x8843 + +// Duplicate attribute channel in levelset element +#define NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_CHANNEL 0x8844 + +// Duplicate attribute fallbackvalue in levelset element +#define NMR_ERROR_DUPLICATE_BOUNDARY_SHAOE_FALLBACKVALUE 0x8845 + +// Duplicate attribute transform in levelset element +#define NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_TRANSFORM 0x8846 + +// Duplicate attribute minfeaturesize in levelset element +#define NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_MIN_FEATURE_SIZE 0x8847 + +// Duplicate attribute fallbackvalue in levelset element +#define NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_FALLBACK_VALUE 0x8848 + +// Duplicate attribute volumeid in levelset element +#define NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_VOLUME_ID 0x8849 + +// Duplicate attribute mesh id in levelset element +#define NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_MESH_ID 0x884A + + /*------------------------------------------------------------------- XML Parser Error Constants (0x9XXX) -------------------------------------------------------------------*/ diff --git a/Include/Common/NMR_Exception.h b/Include/Common/NMR_Exception.h index 00271b1aa..0f31090b3 100644 --- a/Include/Common/NMR_Exception.h +++ b/Include/Common/NMR_Exception.h @@ -39,14 +39,19 @@ Each exception is identified via a global ErrorCode #include "Common/NMR_Types.h" #include "Common/NMR_Local.h" #include +#include namespace NMR { class CNMRException : public std::exception { private: nfError m_errorcode; - public: + std::string m_message; + + public: CNMRException(_In_ nfError errorcode); + CNMRException(_In_ nfError errorcode, _In_ const std::string & message); + virtual const char * what() const throw (); nfError getErrorCode() const; }; diff --git a/Include/Common/NMR_FunctionReference.h b/Include/Common/NMR_FunctionReference.h new file mode 100644 index 000000000..a5cb2447f --- /dev/null +++ b/Include/Common/NMR_FunctionReference.h @@ -0,0 +1,80 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_FunctionReference.h defines the class CFunctionReference. + +--*/ + +#pragma once + +#include "Common/NMR_Types.h" +#include "Common/Math/NMR_Geometry.h" +#include "Common/Math/NMR_Matrix.h" +#include "Model/Classes/NMR_ModelTypes.h" +#include "Model/Classes/NMR_PackageResourceID.h" + +namespace NMR { + class CModelFunction; + typedef std::shared_ptr PModelFunction; + + class CFunctionReference { + private: + UniqueResourceID m_pFunctionResourceID; + std::string m_outputPortName; + + NMR::NMATRIX3 m_transform = NMR::fnMATRIX3_identity(); + bool m_bHasTransform = false; + + double m_minFeatureSize = 0.0; + + double m_fallBackValue = 0.0; + public: + CFunctionReference() = delete; + explicit CFunctionReference(UniqueResourceID functionResourceId); + explicit CFunctionReference(PModelFunction pFunction); + + virtual void setFunctionResourceID(UniqueResourceID functionID); + virtual UniqueResourceID getFunctionResourceID() const; + + void setChannelName(std::string outputPortName); + std::string const& getChannelName() const; + + void setTransform(NMR::NMATRIX3 transform); + NMR::NMATRIX3 getTransform() const; + + bool hasTransform() const; + + void setMinFeatureSize(double minFeatureSize); + double getMinFeatureSize() const; + + void setFallBackValue(double fallBackValue); + double getFallBackValue() const; + }; + + typedef std::shared_ptr PFunctionReference; +} diff --git a/Include/Model/Classes/NMR_ImplicitNodeTypes.h b/Include/Model/Classes/NMR_ImplicitNodeTypes.h new file mode 100644 index 000000000..5fa0ad08e --- /dev/null +++ b/Include/Model/Classes/NMR_ImplicitNodeTypes.h @@ -0,0 +1,116 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#pragma once + +#include +#include +#include +#include +#include + +namespace NMR +{ + class CModelImplicitNode; + namespace implicit + { + using PortIdentifier = std::string; + + using PortMap = + std::unordered_map; + using In = PortMap; + using Out = PortMap; + + struct InputOutputRule + { + InputOutputRule(Lib3MF::eImplicitNodeConfiguration const& configuration, + In const& inputs, + Out const& outputs) + : configuration(configuration), inputs(inputs), outputs(outputs) + { + } + + Lib3MF::eImplicitNodeConfiguration configuration = Lib3MF::eImplicitNodeConfiguration::Default; + In inputs; + Out outputs; + }; + + using AllowedInputOutputs = std::vector; + + class NodeType + { + public: + NodeType(std::string const& name, + AllowedInputOutputs const& allowedInputOutputs); + + NodeType() = delete; + + std::string const& getName() const; + + AllowedInputOutputs const& getAllowedInputOutputs() const; + + Lib3MF::eImplicitNodeType getType() const; + + private: + std::string m_name; + AllowedInputOutputs m_allowedInputOutputs; + }; + + using NodeTypesMap = std::map; + + class NodeTypes + { + public: + NodeTypes(); + NodeTypes(NodeTypes const& other) = delete; + NodeTypes(NodeTypes&& other) = delete; + NodeTypes& operator=(NodeTypes const& other) = delete; + NodeTypes& operator=(NodeTypes&& other) = delete; + + NodeType const& getNodeType(Lib3MF::eImplicitNodeType type) const; + + NodeTypesMap const& getTypes() const; + + void addExpectedPortsToNode(NMR::CModelImplicitNode& node) const; + void addExpectedPortsToNode(NMR::CModelImplicitNode& node, Lib3MF::eImplicitNodeConfiguration const configuration) const; + + void applyInputOutputRuleToNode(NMR::CModelImplicitNode& node, + InputOutputRule const& rule) const; + + bool arePortsValidForNode(NMR::CModelImplicitNode const& node) const; + + private: + NodeTypesMap m_nodeTypes; + + bool arePortsValidForRule(NMR::CModelImplicitNode const& node, + InputOutputRule const& rule) const; + }; + + NodeTypes const& getNodeTypes(); + } // namespace implicit +} // namespace NMR \ No newline at end of file diff --git a/Include/Model/Classes/NMR_KeyStoreCEKParams.h b/Include/Model/Classes/NMR_KeyStoreCEKParams.h index becdeb0fb..1d605ef2b 100644 --- a/Include/Model/Classes/NMR_KeyStoreCEKParams.h +++ b/Include/Model/Classes/NMR_KeyStoreCEKParams.h @@ -42,8 +42,8 @@ namespace NMR { class CKeyStoreCEKParams { protected: - eKeyStoreEncryptAlgorithm m_eAlgorithm; nfBool m_bCompression; + eKeyStoreEncryptAlgorithm m_eAlgorithm; std::vector m_rgIv, m_rgTag, m_rgAad; nfUint64 m_nDescriptor; public: diff --git a/Include/Model/Classes/NMR_Model.h b/Include/Model/Classes/NMR_Model.h index d443f7ac8..21581aa38 100644 --- a/Include/Model/Classes/NMR_Model.h +++ b/Include/Model/Classes/NMR_Model.h @@ -96,6 +96,27 @@ namespace NMR { typedef std::map UniqueResourceIDMapping; + class CModelImage3D; + typedef std::shared_ptr PModelImage3D; + + class CModelImageStack; + typedef std::shared_ptr PModelImageStack; + + class CModelFunction; + typedef std::shared_ptr PModelFunction; + + class CModelImplicitFunction; + typedef std::shared_ptr PModelImplicitFunction; + + class CModelFunctionFromImage3D; + typedef std::shared_ptr PModelFunctionFromImage3D; + + class CModelVolumeData; + typedef std::shared_ptr PModelVolumeData; + + class LevelSetObject; + typedef std::shared_ptr PLevelSetObject; + // The Model class implements the unification of all model-file in a 3MF package // It should be understood as a "MultiModel" class CModel { @@ -148,6 +169,10 @@ namespace NMR { std::vector m_Texture2DGroupLookup; std::vector m_CompositeMaterialsLookup; std::vector m_MultiPropertyGroupLookup; + std::vector m_Image3DLookup; + std::vector m_FunctionLookup; // for implicit models + std::vector m_VolumeDataLookup; + std::vector m_levelSetObjectLookup; // The KeyStore reference PKeyStore m_pKeyStore; @@ -280,6 +305,29 @@ namespace NMR { CModelTexture2DResource * getTexture2D(_In_ nfUint32 nIndex); void mergeTextures2D(_In_ CModel * pSourceModel, _In_ UniqueResourceIDMapping &oldToNewMapping); + // Convenience functions for 3D Images + _Ret_maybenull_ PModelImage3D findImage3D(_In_ UniqueResourceID nResourceID); + _Ret_maybenull_ PModelImageStack findImageStack(_In_ UniqueResourceID nResourceID); + nfUint32 getImage3DCount(); + PModelResource getImage3DResource(_In_ nfUint32 nIndex); + CModelImage3D* getImage3D(_In_ nfUint32 nIndex); + void mergeImage3Ds(_In_ CModel* pSourceModel, _In_ UniqueResourceIDMapping& oldToNewMapping); + + // Convenience functions for Functions + PModelFunction findFunction(UniqueResourceID nResourceID); + nfUint32 getFunctionCount(); + PModelResource getFunctionResource(_In_ nfUint32 nIndex); + CModelImplicitFunction* getImplicitFunction(_In_ nfUint32 nIndex); + CModelFunctionFromImage3D* getFunctionFromImage3D(_In_ nfUint32 nIndex); + void mergeFunctions(_In_ CModel* pSourceModel, _In_ UniqueResourceIDMapping& oldToNewMapping); + + // Convenience functions for volume data + PModelVolumeData findVolumeData(UniqueResourceID nResourceID); + nfUint32 getVolumeDataCount(); + PModelResource getVolumeDataResource(_In_ nfUint32 nIndex); + CModelVolumeData* getVolumeData(_In_ nfUint32 nIndex); + + // Clear all build items and Resources void clearAll (); @@ -328,6 +376,10 @@ namespace NMR { nfBool hasCryptoRandCallbak() const; nfUint64 generateRandomBytes(nfByte *, nfUint64); + [[nodiscard]] ModelResourceID getMaxModelResourceID(); + + void removeResource(PModelResource pResource); + }; typedef std::shared_ptr PModel; diff --git a/Include/Model/Classes/NMR_ModelAttachment.h b/Include/Model/Classes/NMR_ModelAttachment.h index 758793d7b..2610e04ed 100644 --- a/Include/Model/Classes/NMR_ModelAttachment.h +++ b/Include/Model/Classes/NMR_ModelAttachment.h @@ -42,6 +42,8 @@ NMR_ModelAttachment.h defines the Model Attachment Class. namespace NMR { + typedef std::shared_ptr PModelAttachment; + class CModelAttachment { private: CModel * m_pModel; @@ -61,9 +63,10 @@ namespace NMR { void setStream(_In_ PImportStream pStream); void setRelationShipType(_In_ const std::string sRelationShipType); + + PModelAttachment cloneIntoNewModel (_In_ CModel * pModel, _In_ nfBool bCloneMemory); }; - typedef std::shared_ptr PModelAttachment; } diff --git a/Include/Model/Classes/NMR_ModelComponentsObject.h b/Include/Model/Classes/NMR_ModelComponentsObject.h index 8b4d1f0c7..86a2882bf 100644 --- a/Include/Model/Classes/NMR_ModelComponentsObject.h +++ b/Include/Model/Classes/NMR_ModelComponentsObject.h @@ -70,6 +70,8 @@ namespace NMR { void calculateComponentDepthLevel(nfUint32 nLevel) override; void extendOutbox(_Out_ NOUTBOX3& vOutBox, _In_ const NMATRIX3 mAccumulatedMatrix) override; + + ResourceDependencies getDependencies() override; }; typedef std::shared_ptr PModelComponentsObject; diff --git a/Include/Model/Classes/NMR_ModelConstants.h b/Include/Model/Classes/NMR_ModelConstants.h index 21191891b..7778b9905 100644 --- a/Include/Model/Classes/NMR_ModelConstants.h +++ b/Include/Model/Classes/NMR_ModelConstants.h @@ -84,12 +84,16 @@ These are given by the 3MF Standard #define XML_3MF_NAMESPACE_SECURECONTENTSPEC "http://schemas.microsoft.com/3dmanufacturing/securecontent/2019/04" #define XML_3MF_NAMESPACE_DIGITALSIGNATURESPEC "http://www.w3.org/2000/09/xmldsig#" #define XML_3MF_NAMESPACE_CIPHERVALUESPEC "http://www.w3.org/2001/04/xmlenc#" +#define XML_3MF_NAMESPACE_VOLUMETRICSPEC "http://schemas.3mf.io/3dmanufacturing/volumetric/2022/01" +#define XML_3MF_NAMESPACE_IMPLICITSPEC "http://schemas.3mf.io/3dmanufacturing/implicit/2023/12" #define XML_3MF_NAMESPACEPREFIX_MATERIAL "m" #define XML_3MF_NAMESPACEPREFIX_PRODUCTION "p" #define XML_3MF_NAMESPACEPREFIX_BEAMLATTICE "b" #define XML_3MF_NAMESPACEPREFIX_SLICE "s" #define XML_3MF_NAMESPACEPREFIX_SECURECONTENT "sc" +#define XML_3MF_NAMESPACEPREFIX_VOLUMETRIC "v" +#define XML_3MF_NAMESPACEPREFIX_IMPLICIT "i" #define XML_3MF_ATTRIBUTE_XMLNS "xmlns" #define XML_3MF_ATTRIBUTE_PREFIX_XML "xml" @@ -117,6 +121,7 @@ These are given by the 3MF Standard // Mesh element. #define XML_3MF_ELEMENT_MESH "mesh" +#define XML_3MF_ATTRIBUTE_MESH_VOLUMEDATA "volumeid" // Slices element. #define XML_3MF_ELEMENT_SLICES "slices" @@ -221,6 +226,94 @@ These are given by the 3MF Standard #define XML_3MF_ELEMENT_COMPOSITE "composite" #define XML_3MF_ATTRIBUTE_COMPOSITE_VALUES "values" + +// Volumetric Extension +#define XML_3MF_ELEMENT_IMAGE3D "image3d" +#define XML_3MF_ATTRIBUTE_IMAGE3D_ID "id" +#define XML_3MF_ATTRIBUTE_IMAGE3D_NAME "name" + +#define XML_3MF_ELEMENT_IMAGESTACK "imagestack" +#define XML_3MF_ATTRIBUTE_IMAGESTACK_ROWCOUNT "rowcount" +#define XML_3MF_ATTRIBUTE_IMAGESTACK_COLUMNCOUNT "columncount" +#define XML_3MF_ATTRIBUTE_IMAGESTACK_SHEETCOUNT "sheetcount" + +#define XML_3MF_ELEMENT_IMAGESHEET "imagesheet" +#define XML_3MF_ATTRIBUTE_IMAGESHEET_PATH "path" + +#define XML_3MF_ELEMENT_VOLUMEDATA "volumedata" +#define XML_3MF_ATTRIBUTE_VOLUMEDATA_ID "id" +#define XML_3MF_ELEMENT_VOLUMETRIC_COMPOSITE "composite" +#define XML_3MF_ELEMENT_VOLUMETRIC_COLOR "color" +#define XML_3MF_ELEMENT_VOLUMETRIC_PROPERTY "property" + +#define XML_3MF_ATTRIBUTE_VOLUMEDATA_FUNCTIONID "functionid" +#define XML_3MF_ATTRIBUTE_VOLUMEDATA_TRANSFORM "transform" +#define XML_3MF_ATTRIBUTE_VOLUMEDATA_CHANNEL "channel" +#define XML_3MF_ATTRIBUTE_VOLUMEDATA_SOLIDTHRESHOLD "solidthreshold" +#define XML_3MF_ATTRIBUTE_VOLUMEDATA_MINFEATURESIZE "minfeaturesize" +#define XML_3MF_ATTRIBUTE_VOLUMEDATA_FALLBACKVALUE "fallbackvalue" + +#define XML_3MF_ATTRIBUTE_VOLUMEDATA_PROPERTY "name" +#define XML_3MF_ATTRIBUTE_VOLUMEDATA_PROPERTY_REQUIRED "required" + + +// Voumeteric/Implicit +#define XML_3MF_ELEMENT_IMPLICIT_FUNCTION_DEPRECATED "function" +#define XML_3MF_ELEMENT_IMPLICIT_FUNCTION "implicitfunction" + +#define XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_ID "id" +#define XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_DISPLAY_NAME "displayname" +#define XML_3MF_ELEMENT_IMPLICIT_FUNCTION_INPUT "in" +#define XML_3MF_ELEMENT_IMPLICIT_FUNCTION_OUTPUT "out" +#define XML_3MF_ELEMENT_IMPLICIT_NODE_INPUT "in" +#define XML_3MF_ELEMENT_IMPLICIT_NODE_OUTPUT "out" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_VALUE "value" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_MATRIX "matrix" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_X "x" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_Y "y" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_Z "z" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_ID "identifier" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_DISPLAY_NAME "displayname" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_TAG "tag" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_RESOURCE_ID "resourceid" +#define XML_3MF_ATTRIBUTE_IMPLICIT_NODE_RESOURCE_ID_VALUE_DEPRECATED "resourceid" +#define XML_3MF_ATTRIBUTE_IMPLICIT_PORT_ID "identifier" +#define XML_3MF_ATTRIBUTE_IMPLICIT_PORT_DISPLAY_NAME "displayname" +#define XML_3MF_ATTRIBUTE_IMPLICIT_PORT_REFERENCE "ref" +#define XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_SCALAR "scalar" +#define XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_VECTOR "vector" +#define XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_MATRIX "matrix" +#define XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_RESOURCE_ID "resourceid" +#define XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_SCALAR_REF "scalarref" +#define XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_VECTOR_REF "vectorref" +#define XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_MATRIX_REF "matrixref" +#define XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_RESOURCE_REF "resourceref" + +#define XML_3MF_ELEMENT_FUNCTION_FROM_IMAGE3D "functionfromimage3d" +#define XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_IMAGE3DID "image3did" +#define XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_OFFSET "valueoffset" +#define XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_SCALE "valuescale" +#define XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_IMAGE3DID_DEPRECATED "image3dID" +#define XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_OFFSET_DEPRECATED "offset" +#define XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_SCALE_DEPRECATED "scale" +#define XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_TILESTYLEU "tilestyleu" +#define XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_TILESTYLEV "tilestylev" +#define XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_TILESTYLEW "tilestylew" +#define XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_FILTER "filter" + + +#define XML_3MF_ELEMENT_BOUNDARY_SHAPE "levelset" +#define XML_3MF_ATTRIBUTE_LEVELSET_VOLUMEDATA "volumeid" +#define XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_ID "id" +#define XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_FUNCTION_ID "functionid" +#define XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_CHANNEL "channel" +#define XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_CHANNEL_DEFAULT "shape" +#define XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_TRANSFORM "transform" +#define XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_MIN_FEATURE_SIZE "minfeaturesize" +#define XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_MESH_BBOX_ONLY "meshbboxonly" +#define XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_FALLBACK_VALUE "fallbackvalue" +#define XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_MESH_ID "meshid" + // Multiproperties #define XML_3MF_ELEMENT_MULTIPROPERTIES "multiproperties" #define XML_3MF_ATTRIBUTE_MULTIPROPERTIES_ID "id" @@ -228,6 +321,7 @@ These are given by the 3MF Standard #define XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHODS "blendmethods" #define XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHOD_MIX "mix" #define XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHOD_MULTIPLY "multiply" +#define XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHOD_MASK "mask" #define XML_3MF_ELEMENT_MULTI "multi" #define XML_3MF_ATTRIBUTE_MULTI_PINDICES "pindices" @@ -424,4 +518,8 @@ These are given by the 3MF Standard #define XML_3MF_MAXBEAMCOUNT 2147483647 #define XML_3MF_MAXBALLCOUNT 2147483647 +#ifdef __MINGW32__ +#define isNotANumber(x) ((x)!=(x)) +#endif + #endif // __NMR_MODELCONSTANTS diff --git a/Include/Model/Classes/NMR_ModelFunction.h b/Include/Model/Classes/NMR_ModelFunction.h new file mode 100644 index 000000000..ace840f93 --- /dev/null +++ b/Include/Model/Classes/NMR_ModelFunction.h @@ -0,0 +1,73 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ModelResource.h" +#include +#include + +#include +#include +#include + +namespace NMR +{ + class CModelFunction : public CModelResource + { + private: + std::string m_displayname; + + PPorts m_inputs; + PPorts m_outputs; + + public: + CModelFunction(_In_ const ModelResourceID sID, _In_ CModel* pModel); + + std::string const& getDisplayName() const; + void setDisplayName(std::string const& displayname); + + PModelImplicitPort addInput(const std::string& sPortIdentifier, + const std::string& sDisplayName, + const Lib3MF::eImplicitPortType ePortType); + + PModelImplicitPort addOutput(const std::string& sPortIdentifier, + const std::string& sDisplayName, + const Lib3MF::eImplicitPortType ePortType); + + PPorts const& getInputs() const; + PPorts const& getOutputs() const; + + PModelImplicitPort findInput(const std::string& sIdentifier) const; + PModelImplicitPort findOutput(const std::string& sIdentifier) const; + + virtual void clear(); + }; + + using PModelFunction = std::shared_ptr; +} diff --git a/Include/Model/Classes/NMR_ModelFunctionFromImage3D.h b/Include/Model/Classes/NMR_ModelFunctionFromImage3D.h new file mode 100644 index 000000000..fbd0980ca --- /dev/null +++ b/Include/Model/Classes/NMR_ModelFunctionFromImage3D.h @@ -0,0 +1,91 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +CModelFunctionFromImage3D.h defines a function that can be used inside of an implicit model to access a 3D image. +--*/ +#pragma once + +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Common/NMR_Types.h" + + +#include + +namespace NMR { + + class CModel; + typedef std::shared_ptr PModel; + + class CModelFunctionFromImage3D : public CModelFunction{ + + UniqueResourceID m_image3DUniqueResourceID{}; + + eModelTextureTileStyle m_tileStyleU = {}; + eModelTextureTileStyle m_tileStyleV = {}; + eModelTextureTileStyle m_tileStyleW = {}; + + eModelTextureFilter m_filter = {eModelTextureFilter::MODELTEXTUREFILTER_LINEAR}; + + double m_offset = {}; + double m_scale = {1.}; + public: + CModelFunctionFromImage3D() = delete; + CModelFunctionFromImage3D(const ModelResourceID sID, CModel * pModel); + + CModelFunctionFromImage3D(const CModelFunctionFromImage3D& other) = default; + CModelFunctionFromImage3D& operator=(const CModelFunctionFromImage3D& other) = default; + + void setImage3DUniqueResourceID(const UniqueResourceID sID); + UniqueResourceID getImage3DUniqueResourceID(); + + void setImage3DModelResourceID(const ModelResourceID sID); + ModelResourceID getImage3DModelResourceID(); + + void setTileStyleU(const eModelTextureTileStyle tileStyleU); + eModelTextureTileStyle getTileStyleU(); + + void setTileStyleV(const eModelTextureTileStyle tileStyleV); + eModelTextureTileStyle getTileStyleV(); + + void setTileStyleW(const eModelTextureTileStyle tileStyleW); + eModelTextureTileStyle getTileStyleW(); + + void setFilter(const eModelTextureFilter filter); + eModelTextureFilter getFilter(); + + void setOffset(double offset); + double getOffset(); + + void setScale(double scale); + double getScale(); + }; + + typedef std::shared_ptr PModelFunctionFromImage3D; +} + diff --git a/Include/Model/Classes/NMR_ModelImage3D.h b/Include/Model/Classes/NMR_ModelImage3D.h new file mode 100644 index 000000000..6a36090f2 --- /dev/null +++ b/Include/Model/Classes/NMR_ModelImage3D.h @@ -0,0 +1,69 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_ModelImage3D.h defines a 3D image for the volumetric extension + +--*/ + +#ifndef __NMR_MODELIMAGE3D +#define __NMR_MODELIMAGE3D + +#include "Common/NMR_Types.h" + + +#include "Model/Classes/NMR_ModelResource.h" +#include "Model/Classes/NMR_Model.h" +#include +#include "Common/Platform/NMR_ImportStream.h" +#include +#include +#include + +namespace NMR { + + class CModel; + typedef std::shared_ptr PModel; + + class CModelImage3D : public CModelResource { + private: + std::string m_sName; + + protected: + CModelImage3D(_In_ const ModelResourceID sID, _In_ CModel* pModel); + public: + CModelImage3D() = delete; + + void setName(std::string); + std::string getName() const; + }; + + typedef std::shared_ptr PModelImage3D; +} + +#endif // __NMR_MODELIMAGE3D + diff --git a/Include/Model/Classes/NMR_ModelImageStack.h b/Include/Model/Classes/NMR_ModelImageStack.h new file mode 100644 index 000000000..557892af8 --- /dev/null +++ b/Include/Model/Classes/NMR_ModelImageStack.h @@ -0,0 +1,80 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_ModelImageStack.h defines an image stack for the volumetric extension + +--*/ + +#ifndef __NMR_MODELIMAGESTACK +#define __NMR_MODELIMAGESTACK + +#include +#include +#include +#include +#include "Common/NMR_Types.h" +#include "Model/Classes/NMR_ModelImage3D.h" +#include "Common/Platform/NMR_ImportStream.h" + +constexpr auto MAX_IMAGESTACK_SIZE = (1024 * 1024 * 1024); + +namespace NMR { + + class CModelImageStack : public CModelImage3D { + private: + nfUint32 m_nRowCount; + nfUint32 m_nColumnCount; + nfUint32 m_nSheetCount; + + std::vector m_Sheets; + protected: + CModelImageStack(_In_ const ModelResourceID sID, _In_ CModel* pModel, _In_ nfUint32 nRowCount, _In_ nfUint32 nColumCount, nfUint32 nSheetCount); + + public: + CModelImageStack() = delete; + + static std::shared_ptr make(_In_ const ModelResourceID sID, _In_ CModel* pModel, _In_ nfUint32 nRowCount, _In_ nfUint32 nColumCount, nfUint32 nSheetCount); + + nfUint32 getRowCount() const; + nfUint32 getColumnCount() const; + nfUint32 getSheetCount() const; + void setRowCount(nfUint32 nRowCount); + void setColumnCount(nfUint32 nColumnCount); + void setSheetCount(nfUint32 nSheetCount); + + void setSheet(nfUint32 nSheetIndex, PModelAttachment pAttachment); + PModelAttachment getSheet(nfUint32 nSheetIndex); + PModelAttachment createSheet(nfUint32 nSheetIndex, const std::string & sPath, PImportStream pCopiedStream); + }; + + typedef std::shared_ptr PModelImageStack; + +} + +#endif // __NMR_MODELIMAGESTACK + diff --git a/Include/Model/Classes/NMR_ModelImplicitFunction.h b/Include/Model/Classes/NMR_ModelImplicitFunction.h new file mode 100644 index 000000000..e3600e9f9 --- /dev/null +++ b/Include/Model/Classes/NMR_ModelImplicitFunction.h @@ -0,0 +1,134 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#pragma once + +#include +#include + +#include +#include +#include + +#include "Model/Classes/NMR_ModelFunction.h" + +namespace NMR +{ + using ImplicitNodes = std::vector; + using PImplicitNodes = std::shared_ptr; + + namespace implicit + { + class NodeTypes; + } + + // Extract node name (before the first dot) from a node identifier + std::string extractNodeName(const ImplicitIdentifier& sIdentifier); + + // Extract port name (after the first dot) from a node identifier + std::string extractPortName(const ImplicitIdentifier& sIdentifier); + + // Concatenate node name and port name to a reference identifier + ImplicitIdentifier makeReferenceIdentifier( + const ImplicitIdentifier& sNodeIdentifier, + const ImplicitIdentifier& sPortIdentifier); + + class CModelImplicitFunction : public CModelFunction + { + private: + ImplicitIdentifier m_identifier; + PImplicitNodes m_nodes; + static const implicit::NodeTypes m_nodeTypes; + + CModelImplicitNode* findNode( + const ImplicitIdentifier& sIdentifier) const; + + public: + CModelImplicitFunction(_In_ const ModelResourceID sID, + _In_ CModel* pModel); + + // Copy constructor + CModelImplicitFunction(const CModelImplicitFunction& other) = default; + + // Copy assignment operator + CModelImplicitFunction& operator=(const CModelImplicitFunction& other) = + default; + + ImplicitIdentifier const& getIdentifier() const; + void setIdentifier(ImplicitIdentifier const& identifier); + + PModelImplicitNode addNode(const Lib3MF::eImplicitNodeType eNodeType, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag); + + PModelImplicitNode addNode(const Lib3MF::eImplicitNodeType eNodeType, const Lib3MF::eImplicitNodeConfiguration eConfiguration); + + PImplicitNodes getNodes() const; + + void addLink(const ImplicitIdentifier& sSourceNodeIdentifier, + const ImplicitIdentifier& sTargetNodeIdentifier); + + void addLink(PModelImplicitPort pSourcePort, PModelImplicitPort pTargetPort); + + implicit::NodeTypes const& getNodeTypes() const; + + void removeNode(const ImplicitIdentifier& sIdentifier); + + void clear() override; + + /** + * @brief Replaces a resource ID with a new one. + * + * This function replaces all occurrences of the old resource ID with + * the new one. + * + * @param sOldID The old resource ID to replace. + * @param sNewID The new resource ID to use. + */ + void replaceResourceID(const ModelResourceID sOldID, + const ModelResourceID sNewID); + + /** + * @brief Topologically sorts the implicit function tree. + * + * This function performs a topological sort on the implicit function + * tree, ensuring that parent nodes are always evaluated before their + * children. + * + */ + void sortNodesTopologically(); + + PModelImplicitPort findPort(const ImplicitIdentifier& sIdentifier) const; + + ResourceDependencies getDependencies() override; + }; + + using PModelImplicitFunction = std::shared_ptr; +} // namespace NMR diff --git a/Include/Model/Classes/NMR_ModelImplicitNode.h b/Include/Model/Classes/NMR_ModelImplicitNode.h new file mode 100644 index 000000000..ca010c614 --- /dev/null +++ b/Include/Model/Classes/NMR_ModelImplicitNode.h @@ -0,0 +1,126 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#pragma once + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace NMR +{ + class CModelImplicitFunction; + + using GraphID = unsigned int; + using TopologicalOrderIndex = unsigned int; + class CModelImplicitNode + { + private: + Lib3MF::eImplicitNodeType m_type; + ImplicitIdentifier m_identifier; + std::string m_displayname; + std::string m_tag; + + PPorts m_inputs; + PPorts m_outputs; + + // Optional values for constants + double m_constant = 0.; + std::unique_ptr m_vector; + std::unique_ptr m_matrix; + + // resource ID that is unique in the scope of a model to reference mesh objects, functions etc. + ModelResourceID m_modelResourceID; + + CModelImplicitFunction * m_parent = nullptr; + + // ID of the node in the graph, used for the topological sort + GraphID m_graphId = 0; + TopologicalOrderIndex m_topologicalOrderIndex = 0; + + public: + CModelImplicitNode(Lib3MF::eImplicitNodeType type, + ImplicitIdentifier const & identifier, + std::string const & displayname, + std::string const & tag, + CModelImplicitFunction * parent); + CModelImplicitNode(Lib3MF::eImplicitNodeType type, CModelImplicitFunction * parent); + + ImplicitIdentifier const & getIdentifier() const; + std::string const & getDisplayName() const; + std::string const& getTag() const; + void setIdentifier(ImplicitIdentifier const & identifier); + void setDisplayName(std::string const & displayname); + void setTag(std::string const& tag); + + void setType(Lib3MF::eImplicitNodeType type); + Lib3MF::eImplicitNodeType getNodeType() const; + + PModelImplicitPort addInput(const std::string & sIdentifier, + const std::string & sDisplayName); + + PModelImplicitPort addOutput(const std::string & sIdentifier, + const std::string & sDisplayName); + + PPorts getInputs() const; + PPorts getOutputs() const; + + PModelImplicitPort findInput(const std::string & sIdentifier) const; + PModelImplicitPort findOutput(const std::string & sIdentifier) const; + + void setConstant(double value); + double getConstant() const; + + void setVector(const Lib3MF::sVector & value); + Lib3MF::sVector getVector() const; + + + void setMatrix(const Lib3MF::sMatrix4x4 & value); + Lib3MF::sMatrix4x4 getMatrix() const; + + void setModelResourceID(ModelResourceID resourceID); + ModelResourceID getModelResourceID() const; + PModelResource getResource() const; + + bool arePortsValid() const; + + void setGraphID(GraphID id); + GraphID getGraphID() const; + CModelImplicitFunction * getParent() const; + void setParent(CModelImplicitFunction * parent); + }; + + using PModelImplicitNode = std::shared_ptr; +} diff --git a/Include/Model/Classes/NMR_ModelImplicitPort.h b/Include/Model/Classes/NMR_ModelImplicitPort.h new file mode 100644 index 000000000..f6a1505b6 --- /dev/null +++ b/Include/Model/Classes/NMR_ModelImplicitPort.h @@ -0,0 +1,90 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#pragma once + +#include +#include +#include +#include + +#include "Model/Classes/NMR_ModelImplicitPortNames.h" + + +namespace NMR +{ + + using ImplicitIdentifier = std::string; + class CModelImplicitNode; + class CModelImplicitPort; + class CModelImplicitFunction; + + class CModelImplicitPort + { + private: + CModelImplicitNode * m_parent = nullptr; + ImplicitIdentifier m_identifier; + std::string m_displayname; + Lib3MF::eImplicitPortType m_type = Lib3MF::eImplicitPortType::Scalar; + + mutable std::shared_ptr m_referencedPort; + ImplicitIdentifier m_reference; // m_reference might seem redundant, but it can be set if the dependency does not exist yet + + void updateReference() const; + + public: + CModelImplicitPort(CModelImplicitNode * parent, + ImplicitIdentifier const & identifier, + std::string const & displayname); + + CModelImplicitPort(ImplicitIdentifier const & identifier, + std::string const & displayname, + Lib3MF::eImplicitPortType type); + + ImplicitIdentifier const & getIdentifier() const; + std::string const & getDisplayName() const; + void setIdentifier(ImplicitIdentifier const & identifier); + void setDisplayName(std::string const & displayname); + + Lib3MF::eImplicitPortType getType() const; + void setType(Lib3MF::eImplicitPortType type); + + ImplicitIdentifier getReference() const; + void setReference(ImplicitIdentifier const & reference); + + CModelImplicitNode * getParent() const; + + std::shared_ptr getReferencedPort() const; + void setReferencedPort(std::shared_ptr const & referencedPort); + }; + + using PModelImplicitPort = std::shared_ptr; + + using Ports = std::vector; + using PPorts = std::shared_ptr; +} diff --git a/Include/Model/Classes/NMR_ModelImplicitPortNames.h b/Include/Model/Classes/NMR_ModelImplicitPortNames.h new file mode 100644 index 000000000..1b3fa202f --- /dev/null +++ b/Include/Model/Classes/NMR_ModelImplicitPortNames.h @@ -0,0 +1,79 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#pragma once + + +#include +#include + +namespace NMR +{ + struct InputNames + { + static auto constexpr A = "A"; + static auto constexpr B = "B"; + static auto constexpr C = "C"; + static auto constexpr D = "D"; + static auto constexpr m00 = "m00"; + static auto constexpr m01 = "m01"; + static auto constexpr m02 = "m02"; + static auto constexpr m03 = "m03"; + static auto constexpr m10 = "m10"; + static auto constexpr m11 = "m11"; + static auto constexpr m12 = "m12"; + static auto constexpr m13 = "m13"; + static auto constexpr m20 = "m20"; + static auto constexpr m21 = "m21"; + static auto constexpr m22 = "m22"; + static auto constexpr m23 = "m23"; + static auto constexpr m30 = "m30"; + static auto constexpr m31 = "m31"; + static auto constexpr m32 = "m32"; + static auto constexpr m33 = "m33"; + static auto constexpr x = "x"; + static auto constexpr y = "y"; + static auto constexpr z = "z"; + static auto constexpr pos = "pos"; + static auto constexpr mesh = "mesh"; + static auto constexpr color = "color"; + static auto constexpr min = "min"; + static auto constexpr max = "max"; + static auto constexpr functionID = "functionID"; + }; + + struct OutputNames + { + static auto constexpr result = "result"; + static auto constexpr value = "value"; + static auto constexpr vector = "vector"; + static auto constexpr matrix = "matrix"; + static auto constexpr color = "color"; + static auto constexpr distance = "distance"; + }; +} diff --git a/Include/Model/Classes/NMR_ModelLevelSetObject.h b/Include/Model/Classes/NMR_ModelLevelSetObject.h new file mode 100644 index 000000000..6a8832bd5 --- /dev/null +++ b/Include/Model/Classes/NMR_ModelLevelSetObject.h @@ -0,0 +1,116 @@ +/*++ + +Copyright (C) 2024 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_ModelLevelSetObject.cpp implements the Model LevelSet Object Class. +A model levelset object is an in memory representation of the 3MF +levelset object. + +--*/ + +#ifndef __NMR_ModelLevelSetObject +#define __NMR_ModelLevelSetObject + +#include "Model/Classes/NMR_ModelObject.h" + +#include + +namespace NMR { + + class CModel; + typedef std::shared_ptr PModel; + + class CModelVolumeData; + typedef std::shared_ptr PModelVolumeData; + + class CModelMeshObject; + typedef std::shared_ptr PModelMeshObject; + + class CModelFunction; + typedef std::shared_ptr PModelFunction; + + class CModelLevelSetObject : public CModelObject { + private: + PModelMeshObject m_pMesh; + PModelFunction m_pFunction; + PModelVolumeData m_pVolumeData; + + std::string m_outputPortName; + NMR::NMATRIX3 m_transform = NMR::fnMATRIX3_identity(); + bool m_bHasTransform = false; + double m_minFeatureSize = 0.0; + double m_fallBackValue = 0.0; + bool m_meshBBoxOnly = false; + public: + CModelLevelSetObject() = delete; + CModelLevelSetObject(const ModelResourceID sID, CModel * pModel); + ~CModelLevelSetObject(); + + void mergeToMesh(_In_ CMesh* pMesh, + _In_ const NMATRIX3 mMatrix) override; + + nfBool isValid() override; + nfBool hasSlices(nfBool bRecursive) override; + nfBool isValidForSlices( + const NMATRIX3& totalParentMatrix) override; + void extendOutbox(_Out_ NOUTBOX3& vOutBox, + _In_ const NMATRIX3 + mAccumulatedMatrix) override; + + PModelMeshObject getMesh(); + void setMesh(PModelMeshObject pMesh); + + PModelFunction getFunction(); + void setFunction(PModelFunction pFunction); + + PModelVolumeData getVolumeData(); + void setVolumeData(_In_ PModelVolumeData pVolumeData); + + void setChannelName(std::string outputPortName); + std::string const& getChannelName() const; + + void setTransform(NMR::NMATRIX3 transform); + NMR::NMATRIX3 getTransform() const; + bool hasTransform() const; + + void setMinFeatureSize(double minFeatureSize); + double getMinFeatureSize() const; + + void setFallBackValue(double fallBackValue); + double getFallBackValue() const; + + void setMeshBBoxOnly(bool bMeshBBoxOnly); + bool getMeshBBoxOnly() const; + + ResourceDependencies getDependencies() override; + }; + + typedef std::shared_ptr PModelLevelSetObject; + +} + +#endif // __NMR_ModelLevelSetObject diff --git a/Include/Model/Classes/NMR_ModelMeshObject.h b/Include/Model/Classes/NMR_ModelMeshObject.h index b040a4678..f3cbf34af 100644 --- a/Include/Model/Classes/NMR_ModelMeshObject.h +++ b/Include/Model/Classes/NMR_ModelMeshObject.h @@ -35,7 +35,8 @@ mesh object. #ifndef __NMR_MODELMESHOBJECT #define __NMR_MODELMESHOBJECT -#include "Common/Mesh/NMR_Mesh.h" +#include "Common/Mesh/NMR_Mesh.h" +#include "Model/Classes/NMR_ModelVolumeData.h" #include "Model/Classes/NMR_ModelObject.h" #include "Model/Classes/NMR_ModelMeshBeamLatticeAttributes.h" @@ -50,6 +51,8 @@ namespace NMR { class CModelMeshObject : public CModelObject { private: PMesh m_pMesh; + + PModelVolumeData m_pVolumeData; PModelMeshBeamLatticeAttributes m_pBeamLatticeAttributes; public: CModelMeshObject() = delete; @@ -80,6 +83,10 @@ namespace NMR { void extendOutbox(_Out_ NOUTBOX3& vOutBox, _In_ const NMATRIX3 mAccumulatedMatrix) override; + _Ret_notnull_ PModelVolumeData getVolumeData(); + void setVolumeData(_In_ PModelVolumeData pVolumeData); + + ResourceDependencies getDependencies() override; }; typedef std::shared_ptr PModelMeshObject; diff --git a/Include/Model/Classes/NMR_ModelObject.h b/Include/Model/Classes/NMR_ModelObject.h index 8195083e3..7d64f751d 100644 --- a/Include/Model/Classes/NMR_ModelObject.h +++ b/Include/Model/Classes/NMR_ModelObject.h @@ -118,7 +118,6 @@ namespace NMR { virtual void calculateComponentDepthLevel (nfUint32 nLevel); virtual void extendOutbox(_Out_ NOUTBOX3& vOutBox, _In_ const NMATRIX3 mAccumulatedMatrix) = 0; - }; typedef std::shared_ptr PModelObject; diff --git a/Include/Model/Classes/NMR_ModelResource.h b/Include/Model/Classes/NMR_ModelResource.h index 95eef8ebf..54b96e94c 100644 --- a/Include/Model/Classes/NMR_ModelResource.h +++ b/Include/Model/Classes/NMR_ModelResource.h @@ -41,9 +41,12 @@ resource object. #include "Model/Classes/NMR_Model.h" #include +#include namespace NMR { + using ResourceDependencies = std::vector; + class CModelResource { private: CModel * m_pModel; @@ -52,15 +55,14 @@ namespace NMR { protected: std::vector m_ResourceIndexMap; nfBool m_bHasResourceIndexMap; - CModel * Model(); - + CModel * Model(); public: CModelResource() = delete; // CModelResource(_In_ const PPackageResourceID sResourceID, _In_ CModel * pModel); CModelResource(_In_ const ModelResourceID sResourceID, _In_ CModel * pModel); virtual ~CModelResource(); - virtual PPackageResourceID getPackageResourceID(); + PPackageResourceID getPackageResourceID(); void setPackageResourceID(PPackageResourceID pID); bool mapResourceIndexToPropertyID (_In_ ModelResourceIndex nPropertyIndex, _Out_ ModelPropertyID & nPropertyID); @@ -69,6 +71,11 @@ namespace NMR { nfBool hasResourceIndexMap(); _Ret_notnull_ CModel * getModel(); + void setModel(CModel * pModel); + + /// Returns all dependencies of this resource, usd for topological sorting during writing + virtual ResourceDependencies getDependencies(); + }; typedef std::shared_ptr PModelResource; diff --git a/Include/Model/Classes/NMR_ModelTypes.h b/Include/Model/Classes/NMR_ModelTypes.h index a63ea066d..6c1fec494 100644 --- a/Include/Model/Classes/NMR_ModelTypes.h +++ b/Include/Model/Classes/NMR_ModelTypes.h @@ -79,8 +79,8 @@ namespace NMR { }; typedef struct MODELMESHBEAM { - DWORD m_nIndices[2]; - DOUBLE m_dRadius[2]; // the radius of end 0 or 1 of this beam + DWORD m_nIndices[2] = {0,0}; + DOUBLE m_dRadius[2] = { 1.,1. }; // the radius of end 0 or 1 of this beam eModelBeamLatticeCapMode m_eCapMode[2]; MODELMESHBEAM() { m_eCapMode[0] = MODELBEAMLATTICECAPMODE_SPHERE; @@ -89,16 +89,12 @@ namespace NMR { } MODELMESHBEAM; typedef struct MODELMESHBALL { - DWORD m_nIndex; - DOUBLE m_dRadius; // the radius of this ball + DWORD m_nIndex = 0; + DOUBLE m_dRadius = 1.; // the radius of this ball MODELMESHBALL() { } } MODELMESHBALL; - typedef struct { - FLOAT m_fFields[3][4]; - } MODELTRANSFORM; - typedef struct { BYTE m_Red; BYTE m_Green; @@ -124,9 +120,9 @@ namespace NMR { #pragma pack() typedef DWORD ModelPropertyID; - typedef DWORD ModelResourceID; - typedef DWORD UniqueResourceID; - typedef DWORD ModelResourceIndex; + typedef DWORD ModelResourceID; // Resource ID unique within a model, the id that you actually see as id in the xml + typedef DWORD UniqueResourceID; // Resource ID unique within a package, handled internally to allow access to resources across models + typedef DWORD ModelResourceIndex; //TODO: Add explanation enum eModelUnit { MODELUNIT_MICROMETER = 0, @@ -173,9 +169,29 @@ namespace NMR { }; enum eModelBlendMethod { - MODELBLENDMETHOD_NONE = 0, - MODELBLENDMETHOD_MIX = 1, - MODELBLENDMETHOD_MULTIPLY = 2 + MODELBLENDMETHOD_MIX = 0, + MODELBLENDMETHOD_MULTIPLY = 1, + MODELBLENDMETHOD_MASK = 2 + }; + + enum eModelColorChannel { + MODELCOLORCHANNEL_RED = 0, + MODELCOLORCHANNEL_GREEN = 1, + MODELCOLORCHANNEL_BLUE = 2, + MODELCOLORCHANNEL_ALPHA = 3 + }; + + enum class eModelCompositionMethod { + MODELCOMPOSITIONMETHOD_WEIGHTEDSUM = 0, + MODELCOMPOSITIONMETHOD_MULTIPLY= 1, + MODELCOMPOSITIONMETHOD_MIN = 2, + MODELCOMPOSITIONMETHOD_MAX = 3, + MODELCOMPOSITIONMETHOD_MASK = 4 + }; + + enum class eModelCompositionSpace { + MODELCOMPOSITIONSPACE_RAW = 0, + MODELCOMPOSITIONSPACE_LINEARCOLOR = 1 }; typedef struct { @@ -191,7 +207,6 @@ namespace NMR { UniqueResourceID m_nUniqueResourceID; eModelBlendMethod m_nMethod; } MODELMULTIPROPERTYLAYER; - } #endif // __NMR_MODELTYPES diff --git a/Include/Model/Classes/NMR_ModelVolumeData.h b/Include/Model/Classes/NMR_ModelVolumeData.h new file mode 100644 index 000000000..e7065bf2d --- /dev/null +++ b/Include/Model/Classes/NMR_ModelVolumeData.h @@ -0,0 +1,92 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_VolumeData.h defines the class CVolumeData. + +--*/ + +#ifndef __NMR_VOLUMEDATA +#define __NMR_VOLUMEDATA + +#include "Common/NMR_Types.h" +#include "Common/Math/NMR_Geometry.h" +#include "Common/Mesh/NMR_MeshTypes.h" + +#include "Common/Mesh/NMR_VolumeDataColor.h" +#include "Common/Mesh/NMR_VolumeDataProperty.h" +#include "Common/Mesh/NMR_VolumeDataComposite.h" +#include "Model/Classes/NMR_ModelResource.h" + +namespace NMR { + class CModelFunction; + typedef std::shared_ptr PModelFunction; + + class CModelVolumeData : public CModelResource { + private: + PVolumeDataComposite m_pComposite; + PVolumeDataColor m_pColor; + std::map m_mapProperties; + public: + CModelVolumeData() = delete; + CModelVolumeData(ModelResourceID sResourceID, + CModel* pModel); + + void clear(); + + nfBool hasProperty(std::string sName); + nfUint32 getPropertyCount() const; + PVolumeDataProperty getProperty(nfUint32 nIndex); + PVolumeDataProperty findProperty(std::string sName); + void addProperty(PVolumeDataProperty pProperty); + PVolumeDataProperty addProperty(std::string sName, + PModelFunction pfunction); + void removeProperty(std::string sName); + + bool hasColor() const; + PVolumeDataColor getColor(); + PVolumeDataColor createColor(PModelFunction pfunction); + void setColor(PVolumeDataColor pColor); + void removeColor(); + + bool hasComposite() const; + PVolumeDataComposite getComposite(); + PVolumeDataComposite createComposite(/* basematerialgroupd*/); + void setComposite(PVolumeDataComposite pComposite); + void removeComposite(); + + ResourceDependencies getDependencies() override; + + PPackageResourceID packageResourceIDFromResourceID( + UniqueResourceID uniqueResourceID); + }; + + typedef std::shared_ptr PModelVolumeData; + +} + +#endif // __NMR_BEAMLATTICE diff --git a/Include/Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h b/Include/Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h index 6b076bd8b..bbff6d93c 100644 --- a/Include/Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h +++ b/Include/Model/Reader/NMR_ModelReaderNode_KeyStoreBase.h @@ -42,8 +42,8 @@ namespace NMR { class CModelReaderNode_KeyStoreBase : public CModelReaderNode { protected: - CKeyStore * const m_pKeyStore; CModel * const m_pModel; + CKeyStore * const m_pKeyStore; public: CModelReaderNode_KeyStoreBase() = delete; diff --git a/Include/Model/Reader/Volumetric2201/NMR_Implicit_PortType_Convert.h b/Include/Model/Reader/Volumetric2201/NMR_Implicit_PortType_Convert.h new file mode 100644 index 000000000..42fff5075 --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_Implicit_PortType_Convert.h @@ -0,0 +1,55 @@ + + +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Coverter for PortType + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ModelConstants.h" +#include "lib3mf_types.hpp" + +#include + +namespace NMR +{ + + namespace implicit + { + const char * portTypeToRefName(Lib3MF::eImplicitPortType type); + + const char * portTypeToName(Lib3MF::eImplicitPortType type); + + bool portTypeFromRefName(std::string const & name, Lib3MF::eImplicitPortType & resultType); + + bool portTypeFromName(std::string const & name, Lib3MF::eImplicitPortType & resultType); + + } +} \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_FunctionFromImage3D.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_FunctionFromImage3D.h new file mode 100644 index 000000000..e50cf8df0 --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_FunctionFromImage3D.h @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for FunctionFromImage3D + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ImplicitNodeTypes.h" +#include "Model/Classes/NMR_ModelFunctionFromImage3D.h" +#include "Model/Reader/NMR_ModelReaderNode.h" + +namespace NMR +{ + class CModelReaderNode_FunctionFromImage3D : public CModelReaderNode + { + private: + PModelFunctionFromImage3D m_pFunctionFromImage3D; + CModel * m_pModel = nullptr; + + ModelResourceID m_nID = 0; + ModelResourceID m_imageModelResourceID = 0; + + std::string m_displayName; + + eModelTextureTileStyle m_tileStyleU = {}; + eModelTextureTileStyle m_tileStyleV = {}; + eModelTextureTileStyle m_tileStyleW = {}; + + eModelTextureFilter m_filter = {eModelTextureFilter::MODELTEXTUREFILTER_LINEAR}; + + double m_offset = {}; + double m_scale = {1.}; + + public: + CModelReaderNode_FunctionFromImage3D() = delete; + CModelReaderNode_FunctionFromImage3D(_In_ CModel * pModel, _In_ PModelWarnings pWarnings); + + void parseXML(_In_ CXmlReader * pXMLReader) override; + + void OnAttribute(_In_z_ const nfChar * pAttributeName, + _In_z_ const nfChar * pAttributeValue) override; + + }; + + typedef std::shared_ptr + PModelReaderNode_FunctionFromImage3D; + +} \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function.h new file mode 100644 index 000000000..0d2853f4c --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function.h @@ -0,0 +1,68 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for implicit function ressources + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Model/Reader/NMR_ModelReaderNode.h" +#include "Model/Classes/NMR_ImplicitNodeTypes.h" + +namespace NMR +{ + class CModelReaderNode_ImplicitFunction : public CModelReaderNode + { + private: + PModelImplicitFunction m_pImplicitFunction; + CModel * m_pModel = nullptr; + + ModelResourceID m_nID = 0; + + std::string m_displayName; + const static implicit::NodeTypes m_nodeTypes; + + public: + CModelReaderNode_ImplicitFunction() = delete; + CModelReaderNode_ImplicitFunction(_In_ CModel * pModel, _In_ PModelWarnings pWarnings); + + void parseXML(_In_ CXmlReader * pXMLReader) override; + + void OnAttribute(_In_z_ const nfChar * pAttributeName, + _In_z_ const nfChar * pAttributeValue) override; + + void OnNSChildElement(_In_z_ const nfChar * pChildName, + _In_z_ const nfChar * pNameSpace, + _In_ CXmlReader * pXMLReader) override; + + + }; + + typedef std::shared_ptr PModelReaderNode_ImplicitFunction; +} \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Input.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Input.h new file mode 100644 index 000000000..8e7f3e034 --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Input.h @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for a single input of a function for implicit modelling + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Model/Reader/NMR_ModelReaderNode.h" + +namespace NMR +{ + class CModelReaderNode_Implicit_Function_Input : public CModelReaderNode + { + private: + CModelImplicitFunction * m_pParentFunction; + + std::string m_identifier; + std::string m_displayName; + std::string m_reference; + Lib3MF::eImplicitPortType m_portType; + void createInput(); + + public: + CModelReaderNode_Implicit_Function_Input() = delete; + CModelReaderNode_Implicit_Function_Input(CModelImplicitFunction * pParentFunction, + PModelWarnings pWarnings, + Lib3MF::eImplicitPortType portType); + + void parseXML(CXmlReader * pXMLReader) override; + + void OnAttribute(const nfChar * pAttributeName, const nfChar * pAttributeValue) override; + }; + + typedef std::shared_ptr + PModelReaderNode_Implicit_Function_Input; +} \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Inputs.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Inputs.h new file mode 100644 index 000000000..ddb843d74 --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Inputs.h @@ -0,0 +1,60 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for ports of a function for implicit modelling + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Model/Reader/NMR_ModelReaderNode.h" + + +namespace NMR +{ + + class CModelReaderNode_Implicit_Function_Inputs : public CModelReaderNode + { + private: + CModelImplicitFunction * m_pImplicitFunction; + + public: + CModelReaderNode_Implicit_Function_Inputs() = delete; + CModelReaderNode_Implicit_Function_Inputs(CModelImplicitFunction * pParentFunction, + PModelWarnings pWarnings); + + void parseXML(CXmlReader * pXMLReader) override; + + void OnNSChildElement(const nfChar * pChildName, + const nfChar * pNameSpace, + CXmlReader * pXMLReader) override; + }; + + typedef std::shared_ptr + PModelReaderNode_Implicit_Function_Inputs; +} \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Output.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Output.h new file mode 100644 index 000000000..8a891e6ff --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Output.h @@ -0,0 +1,64 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for an output element + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Model/Reader/NMR_ModelReaderNode.h" + +namespace NMR +{ + class CModelReaderNode_Implicit_Function_Output : public CModelReaderNode + { + private: + CModelImplicitFunction * m_pParentFunction; + + std::string m_identifier; + std::string m_displayName; + std::string m_reference; + Lib3MF::eImplicitPortType m_portType; + void createOutput(); + public: + CModelReaderNode_Implicit_Function_Output() = delete; + CModelReaderNode_Implicit_Function_Output(CModelImplicitFunction * pParentFunction, + PModelWarnings pWarnings, + Lib3MF::eImplicitPortType portType + ); + + void parseXML(CXmlReader * pXMLReader) override; + + void OnAttribute(const nfChar * pAttributeName, const nfChar * pAttributeValue) override; + + + }; + + typedef std::shared_ptr PModelReaderNode_Implicit_Function_Output; +} \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Outputs.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Outputs.h new file mode 100644 index 000000000..356be171c --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Outputs.h @@ -0,0 +1,60 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for inputs (arguments) of a function for implicit modelling + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Model/Reader/NMR_ModelReaderNode.h" + + +namespace NMR +{ + + class CModelReaderNode_Implicit_Function_Outputs : public CModelReaderNode + { + private: + CModelImplicitFunction * m_pImplicitFunction; + + public: + CModelReaderNode_Implicit_Function_Outputs() = delete; + CModelReaderNode_Implicit_Function_Outputs(CModelImplicitFunction * pParentFunction, + PModelWarnings pWarnings); + + void parseXML(CXmlReader * pXMLReader) override; + + void OnNSChildElement(const nfChar * pChildName, + const nfChar * pNameSpace, + CXmlReader * pXMLReader) override; + }; + + typedef std::shared_ptr + PModelReaderNode_Implicit_Function_Outputs; +} \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.h new file mode 100644 index 000000000..af82ab592 --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.h @@ -0,0 +1,65 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for nodes of graph representing a function for implicit modelling + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ModelImplicitNode.h" +#include "Model/Reader/NMR_ModelReaderNode.h" + +namespace NMR +{ + class CModelReaderNode_Implicit_Node : public CModelReaderNode + { + private: + CModelImplicitNode * m_pImplicitNode; + CModel * m_pModel; + + double m_value; + Lib3MF::sVector m_vector; + public: + CModelReaderNode_Implicit_Node() = delete; + CModelReaderNode_Implicit_Node(_In_ CModel * pModel, + _In_ CModelImplicitNode * pImplicitNode, + _In_ PModelWarnings pWarnings); + + void parseXML(_In_ CXmlReader * pXMLReader) override; + + void OnAttribute(_In_z_ const nfChar * pAttributeName, + _In_z_ const nfChar * pAttributeValue) override; + + void OnNSChildElement(_In_z_ const nfChar * pChildName, + _In_z_ const nfChar * pNameSpace, + _In_ CXmlReader * pXMLReader) override; + }; + + typedef std::shared_ptr + PModelReaderNode_Implicit_Node; +} \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Inputs.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Inputs.h new file mode 100644 index 000000000..a7ca9339e --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Inputs.h @@ -0,0 +1,59 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for ports of a node of a graph representing a function for implicit modelling + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ModelImplicitNode.h" +#include "Model/Reader/NMR_ModelReaderNode.h" + +namespace NMR +{ + + class CModelReaderNode_Implicit_Node_Inputs : public CModelReaderNode + { + private: + CModelImplicitNode * m_pImplicitNode; + + public: + CModelReaderNode_Implicit_Node_Inputs() = delete; + CModelReaderNode_Implicit_Node_Inputs(_In_ CModelImplicitNode * pParentNode, + _In_ PModelWarnings pWarnings + ); + + void parseXML(_In_ CXmlReader * pXMLReader) override; + + void OnNSChildElement(_In_z_ const nfChar * pChildName, + _In_z_ const nfChar * pNameSpace, + _In_ CXmlReader * pXMLReader) override; + }; + + typedef std::shared_ptr PModelReaderNode_Implicit_Node_Inputs; +} \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Outputs.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Outputs.h new file mode 100644 index 000000000..a343a1b4f --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Outputs.h @@ -0,0 +1,59 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for output ports of a node + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ModelImplicitNode.h" +#include "Model/Reader/NMR_ModelReaderNode.h" + +namespace NMR +{ + + class CModelReaderNode_Implicit_Node_Outputs : public CModelReaderNode + { + private: + CModelImplicitNode * m_pImplicitNode; + + public: + CModelReaderNode_Implicit_Node_Outputs() = delete; + CModelReaderNode_Implicit_Node_Outputs(_In_ CModelImplicitNode * pParentNode, + _In_ PModelWarnings pWarnings + ); + + void parseXML(_In_ CXmlReader * pXMLReader) override; + + void OnNSChildElement(_In_z_ const nfChar * pChildName, + _In_z_ const nfChar * pNameSpace, + _In_ CXmlReader * pXMLReader) override; + }; + + typedef std::shared_ptr PModelReaderNode_Implicit_Node_Outputs; +} \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Port.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Port.h new file mode 100644 index 000000000..5a71b7b35 --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Port.h @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for a single port of a node of a graph representing a function for implicit modelling + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ModelImplicitNode.h" +#include "Model/Reader/NMR_ModelReaderNode.h" + +namespace NMR +{ + + enum class ImplicitPortInOut + { + Input, + Output + }; + + + class CModelReaderNode_Implicit_Port : public CModelReaderNode + { + private: + CModelImplicitNode * m_pParentNode; + + std::string m_identifier; + std::string m_displayName; + std::string m_reference; + Lib3MF::eImplicitPortType m_portType; + ImplicitPortInOut m_inOut; + + + public: + CModelReaderNode_Implicit_Port() = delete; + CModelReaderNode_Implicit_Port(CModelImplicitNode * pParentNode, + PModelWarnings pWarnings, + Lib3MF::eImplicitPortType portType, + ImplicitPortInOut inOut); + + void parseXML(CXmlReader * pXMLReader) override; + + void OnAttribute(const nfChar * pAttributeName, const nfChar * pAttributeValue) override; + + void createInput(); + void createOutput(); + }; + + typedef std::shared_ptr PModelReaderNode_Implicit_Port; +} \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_LevelSet.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_LevelSet.h new file mode 100644 index 000000000..102c0ccc3 --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_LevelSet.h @@ -0,0 +1,88 @@ +/*++ + +Copyright (C) 2024 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for boundary shape objects + +--*/ + +#pragma once + +#include "Model/Classes/NMR_ImplicitNodeTypes.h" +#include "Model/Classes/NMR_ModelLevelSetObject.h" +#include "Model/Reader/NMR_ModelReaderNode.h" +#include "Model/Reader/v100/NMR_ModelReaderNode100_Object.h" + +namespace NMR +{ + class CModelReaderNode_LevelSet : public CModelReaderNode + { + private: + PModelLevelSetObject m_pLevelSet; + CModel* m_parentModel = nullptr; + + ModelResourceID m_resID = 0; + + nfBool m_bHasFunctionID = false; + nfBool m_bHasTransform = false; + nfBool m_bHasChannel = false; + nfBool m_bHasMeshBBoxOnly = false; + nfBool m_meshBBoxOnly = false; + nfBool m_bHasMeshID = false; + + double m_dMinFeatureSize = 0.0; + nfBool m_bHasMinFeatureSize = false; + + double m_dFallBackValue = 0.0; + nfBool m_bHasFallBackValue = false; + + ModelResourceID m_nFunctionID; + NMATRIX3 m_Transform; + + std::string m_sChannel; + + ModelResourceID m_nVolumeDataID = 0; + ModelResourceID m_nMeshID = 0; + nfBool m_bHasVolumeDataID = false; + + public: + CModelReaderNode_LevelSet() = delete; + CModelReaderNode_LevelSet(CModel* pModel, PModelLevelSetObject levelSet, PModelWarnings pWarnings, + PProgressMonitor pProgressMonitor); + + void parseXML(_In_ CXmlReader* pXMLReader) override; + + void OnAttribute(_In_z_ const nfChar* pAttributeName, + _In_z_ const nfChar* pAttributeValue) override; + + void OnNSChildElement(_In_z_ const nfChar* pChildName, + _In_z_ const nfChar* pNameSpace, + _In_ CXmlReader* pXMLReader) override; + }; + + typedef std::shared_ptr + PModelReaderNode_LevelSet; +} // namespace NMR \ No newline at end of file diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Color.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Color.h new file mode 100644 index 000000000..13edd1a9c --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Color.h @@ -0,0 +1,76 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +NMR_ModelReaderNode_Volumetric2201_Color.h covers the official 3MF volumetric extension. + +--*/ + +#ifndef __NMR_MODELREADERNODE_Volumetric2201_COLOR +#define __NMR_MODELREADERNODE_Volumetric2201_COLOR + +#include "Model/Reader/NMR_ModelReaderNode.h" +#include "Model/Classes/NMR_ModelComponent.h" +#include "Model/Classes/NMR_ModelVolumeData.h" +#include "Common/Math/NMR_Matrix.h" + +namespace NMR { + + class CModelReaderNode_Volumetric2201_Color : public CModelReaderNode { + private: + nfBool m_bHasFieldID = false; + nfBool m_bHasTransform = false; + nfBool m_bHasChannel = false; + + ModelResourceID m_nFieldID; + NMATRIX3 m_Transform = fnMATRIX3_identity(); + std::string m_sChannel; + + double m_dMinFeatureSize = 0.0; + nfBool m_bHasMinFeatureSize = false; + + double m_dFallBackValue = 0.0; + nfBool m_bHasFallBackValue = false; + + protected: + virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue); + public: + CModelReaderNode_Volumetric2201_Color() = delete; + CModelReaderNode_Volumetric2201_Color(_In_ PModelWarnings pWarnings); + + virtual void parseXML(_In_ CXmlReader * pXMLReader); + + virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader); + + PVolumeDataColor MakeColor(_In_ CModel* pModel); + }; + + typedef std::shared_ptr PModelReaderNode_Volumetric2201_Color; + +} + +#endif // __NMR_MODELREADERNODE_Volumetric2201_COLOR + diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Image3D.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Image3D.h new file mode 100644 index 000000000..4e784e15b --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Image3D.h @@ -0,0 +1,68 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +NMR_ModelReaderNode_Volumetric2201_Image3D.h covers the official 3MF volumetric extension. + +--*/ + +#ifndef __NMR_MODELREADERNODE_Volumetric2201_IMAGE3D +#define __NMR_MODELREADERNODE_Volumetric2201_IMAGE3D + +#include "Model/Reader/NMR_ModelReaderNode.h" +#include "Model/Classes/NMR_ModelImage3D.h" + +namespace NMR { + + class CModelReaderNode_Volumetric2201_Image3D : public CModelReaderNode { + private: + protected: + + CModel * m_pModel; + + ModelResourceID m_modelResourceId; + + nfBool m_bHasName; + std::string m_sName; + + PModelImage3D m_pImage3D; + + virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue); + virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader); + + public: + CModelReaderNode_Volumetric2201_Image3D() = delete; + CModelReaderNode_Volumetric2201_Image3D(_In_ CModel * pModel, _In_ PModelWarnings pWarnings); + + virtual void parseXML(_In_ CXmlReader * pXMLReader); + + }; + + typedef std::shared_ptr PModelReaderNode_Volumetric2201_Image3D; + +} + +#endif // __NMR_MODELREADERNODE_Volumetric2201_IMAGE3D diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageSheet.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageSheet.h new file mode 100644 index 000000000..218ab8daa --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageSheet.h @@ -0,0 +1,61 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +NMR_ModelReaderNode_Volumetric2201_ImageSheet.h covers the official 3MF volumetric extension. + +--*/ + +#ifndef __NMR_MODELREADERNODE_VOLUMETRIC2201_IMAGESHEET +#define __NMR_MODELREADERNODE_VOLUMETRIC2201_IMAGESHEET + +#include "Model/Reader/NMR_ModelReaderNode.h" +#include "Model/Classes/NMR_ModelComponent.h" +#include "Model/Classes/NMR_ModelComponentsObject.h" +#include "Model/Classes/NMR_ModelObject.h" + +namespace NMR { + + class CModelReaderNode_Volumetric2201_ImageSheet : public CModelReaderNode { + private: + std::string m_sPath; + + protected: + virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue); + public: + CModelReaderNode_Volumetric2201_ImageSheet() = delete; + CModelReaderNode_Volumetric2201_ImageSheet(_In_ PModelWarnings pWarnings); + + virtual void parseXML(_In_ CXmlReader * pXMLReader); + + std::string getPath(); + }; + + typedef std::shared_ptr PModelReaderNode_Volumetric2201_ImageSheet; + +} + +#endif // __NMR_MODELREADERNODE_VOLUMETRIC2201_IMAGESHEET diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageStack.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageStack.h new file mode 100644 index 000000000..8ccee51f0 --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageStack.h @@ -0,0 +1,67 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +NMR_ModelReaderNode_Volumetric2201_Image3D.h covers the official 3MF volumetric extension. + +--*/ + +#ifndef __NMR_MODELREADERNODE_VOLUMETRIC2201_IMAGESTACK +#define __NMR_MODELREADERNODE_VOLUMETRIC2201_IMAGESTACK + +#include "Model/Reader/NMR_ModelReaderNode.h" +#include "Model/Classes/NMR_ModelImageStack.h" + +namespace NMR { + + class CModelReaderNode_Volumetric2201_ImageStack : public CModelReaderNode { + private: + protected: + + CModel* m_pModel = nullptr; + CModelImageStack* m_pImageStack = nullptr; + + nfUint32 m_nRowCount; + nfUint32 m_nColumnCount; + nfUint32 m_nSheetCount; + nfUint32 m_nSheetIndex; + + virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue); + virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader); + + public: + CModelReaderNode_Volumetric2201_ImageStack() = delete; + CModelReaderNode_Volumetric2201_ImageStack(_In_ CModel* pModel, _In_ CModelImageStack* pImageStack, _In_ PModelWarnings pWarnings); + + virtual void parseXML(_In_ CXmlReader * pXMLReader); + + }; + + typedef std::shared_ptr PModelReaderNode_Volumetric2201_ImageStack; + +} + +#endif // __NMR_MODELREADERNODE_VOLUMETRIC2201_IMAGESTACK diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Property.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Property.h new file mode 100644 index 000000000..c118b0e59 --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Property.h @@ -0,0 +1,78 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +NMR_ModelReaderNode_Volumetric2201_Property.h covers the official 3MF volumetric extension. + +--*/ + +#ifndef __NMR_MODELREADERNODE_VOLUMETRIC2201_PROPERTY +#define __NMR_MODELREADERNODE_VOLUMETRIC2201_PROPERTY + +#include "Model/Reader/NMR_ModelReaderNode.h" +#include "Model/Classes/NMR_ModelVolumeData.h" +#include "Common/Math/NMR_Matrix.h" + +namespace NMR { + + class CModelReaderNode_Volumetric2201_Property : public CModelReaderNode { + private: + nfBool m_bHasFieldID = false; + nfBool m_bHasName = false; + nfBool m_bHasTransform = false; + nfBool m_bHasRequired = false; + nfBool m_bHasChannel = false; + + ModelResourceID m_nFieldID; + std::string m_sName; + NMATRIX3 m_Transform; + nfBool m_bRequired = true; + std::string m_sChannel; + + double m_dMinFeatureSize = 0.0; + nfBool m_bHasMinFeatureSize = false; + + double m_dFallBackValue = 0.0; + nfBool m_bHasFallBackValue = false; + protected: + virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue); + public: + CModelReaderNode_Volumetric2201_Property() = delete; + CModelReaderNode_Volumetric2201_Property(_In_ PModelWarnings pWarnings); + + virtual void parseXML(_In_ CXmlReader * pXMLReader); + + virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader); + + PVolumeDataProperty MakeProperty(_In_ CModel* pModel); + }; + + typedef std::shared_ptr PModelReaderNode_Volumetric2201_Property; + +} + +#endif // __NMR_MODELREADERNODE_VOLUMETRIC2201_PROPERTY + diff --git a/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_VolumeData.h b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_VolumeData.h new file mode 100644 index 000000000..8a03f8b0c --- /dev/null +++ b/Include/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_VolumeData.h @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +NMR_ModelReaderNode_Volumetric2201_VolumeData.h covers the official 3MF volumetric extension. + +--*/ + +#ifndef __NMR_MODELREADERNODE_VOLUMETRIC2201_VOLUMEDATA +#define __NMR_MODELREADERNODE_VOLUMETRIC2201_VOLUMEDATA + +#include "Model/Reader/NMR_ModelReaderNode.h" +#include "Model/Classes/NMR_ModelComponent.h" +#include "Model/Classes/NMR_ModelVolumeData.h" + +namespace NMR { + + class CModelReaderNode_Volumetric2201_VolumeData : public CModelReaderNode { + private: + CModel* m_pModel; + ModelResourceID m_nID = 0; + PModelVolumeData m_pVolumeData; + + protected: + virtual void OnAttribute(const nfChar * pAttributeName, const nfChar * pAttributeValue); + public: + CModelReaderNode_Volumetric2201_VolumeData() = delete; + CModelReaderNode_Volumetric2201_VolumeData(CModel* pModel, PModelWarnings pWarnings); + + virtual void parseXML(CXmlReader * pXMLReader); + + virtual void OnNSChildElement(const nfChar * pChildName, const nfChar * pNameSpace, CXmlReader * pXMLReader); + }; + + typedef std::shared_ptr PModelReaderNode_Volumetric2201_VolumeData; + +} + +#endif // __NMR_MODELREADERNODE_VOLUMETRIC2201_VOLUMEDATA + diff --git a/Include/Model/Reader/v100/NMR_ModelReaderNode100_Mesh.h b/Include/Model/Reader/v100/NMR_ModelReaderNode100_Mesh.h index 573f7f808..2bbb24dfd 100644 --- a/Include/Model/Reader/v100/NMR_ModelReaderNode100_Mesh.h +++ b/Include/Model/Reader/v100/NMR_ModelReaderNode100_Mesh.h @@ -38,14 +38,17 @@ A mesh reader model node is a parser for the mesh node of an XML Model Stream. #include "Model/Reader/NMR_ModelReader_TexCoordMapping.h" #include "Model/Classes/NMR_ModelComponent.h" #include "Model/Classes/NMR_ModelObject.h" +#include "Model/Classes/NMR_ModelVolumeData.h" +#include "Model/Classes/NMR_ModelMeshObject.h" namespace NMR { class CModelReaderNode100_Mesh : public CModelReaderNode { private: - CMesh * m_pMesh; + PModelMeshObject m_pMesh; CModel * m_pModel; + ModelResourceID m_nObjectLevelPropertyID; PPackageResourceID m_pObjectLevelPropertyID; ModelResourceIndex m_nObjectLevelPropertyIndex; @@ -54,12 +57,17 @@ namespace NMR { ModelResourceID m_nClippingMeshID; nfBool m_bHasRepresentationMeshID; ModelResourceID m_nRepresentationMeshID; + + nfBool m_bHasVolumeDataID = false; + ModelResourceID m_nVolumeDataID = 0; protected: - virtual void OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue); - virtual void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader); + void OnNSAttribute(_In_z_ const nfChar *pAttributeName, + _In_z_ const nfChar *pAttributeValue, + _In_z_ const nfChar *pNameSpace) override; + void OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader) override; public: CModelReaderNode100_Mesh() = delete; - CModelReaderNode100_Mesh(_In_ CModel * pModel, _In_ CMesh * pMesh, _In_ PModelWarnings pWarnings, _In_ PProgressMonitor pProgressMonitor, _In_ PPackageResourceID m_pObjectLevelPropertyID, _In_ ModelResourceIndex nDefaultPropertyIndex); + CModelReaderNode100_Mesh(_In_ CModel * pModel, PModelMeshObject pMesh, _In_ PModelWarnings pWarnings, _In_ PProgressMonitor pProgressMonitor, _In_ PPackageResourceID m_pObjectLevelPropertyID, _In_ ModelResourceIndex nDefaultPropertyIndex); virtual void parseXML(_In_ CXmlReader * pXMLReader); void retrieveClippingInfo(_Out_ eModelBeamLatticeClipMode &eClipMode, _Out_ nfBool & bHasClippingMode, _Out_ ModelResourceID & nClippingMeshID); diff --git a/Include/Model/Writer/NMR_ModelWriterNode.h b/Include/Model/Writer/NMR_ModelWriterNode.h index 0a3caee4f..12f25accc 100644 --- a/Include/Model/Writer/NMR_ModelWriterNode.h +++ b/Include/Model/Writer/NMR_ModelWriterNode.h @@ -51,8 +51,10 @@ namespace NMR { void writeConstPrefixedStringAttribute(_In_z_ const nfChar * pPrefix, _In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue); void writeIntAttribute(_In_z_ const nfChar * pAttributeName, _In_ nfInt32 nAttributeValue); + void writePrefixedIntAttribute(_In_z_ const nfChar * pPrefix, _In_z_ const nfChar * pAttributeName, _In_ nfInt32 nAttributeValue); void writeUintAttribute(_In_z_ const nfChar * pAttributeName, _In_ nfUint32 nAttributeValue); void writeFloatAttribute(_In_z_ const nfChar * pAttributeName, _In_ nfFloat fAttributeValue); + void writeDoubleAttribute(_In_z_ const nfChar* pAttributeName, _In_ nfDouble dAttributeValue); void writeStartElement(_In_z_ const nfChar * pElementName); void writeStartElementWithNamespace(_In_z_ const nfChar * pElementName, _In_z_ const nfChar * pNameSpace); diff --git a/Include/Model/Writer/NMR_ModelWriterNode_Implicit.h b/Include/Model/Writer/NMR_ModelWriterNode_Implicit.h new file mode 100644 index 000000000..7edc1eeb2 --- /dev/null +++ b/Include/Model/Writer/NMR_ModelWriterNode_Implicit.h @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + + +--*/ + +#pragma once + +#include "Common/3MF_ProgressMonitor.h" +#include "Common/Platform/NMR_XmlWriter.h" +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Model/Classes/NMR_ModelImplicitNode.h" +#include "Model/Writer/NMR_ModelWriterNode_ModelBase.h" + +namespace NMR +{ + namespace implicit + { + class NodeTypes; + } + + class CModelWriterNode_Implicit : public CModelWriterNode_ModelBase + { + + public: + CModelWriterNode_Implicit() = delete; + CModelWriterNode_Implicit(CModel * pModel, + CXmlWriter * pXMLWriter, + PProgressMonitor pProgressMonitor); + + void writeImplicitFunctions(); + void writeImplicitFunction(CModelImplicitFunction & function); + + void writeToXML() override; + + private: + static const implicit::NodeTypes m_nodeTypes; + + void writeImplicitFunctionElements(CModelImplicitFunction & function); + void writeImplicitNode(CModelImplicitNode & node); + void writeImplicitOutputs(NMR::Ports & ports); + void writeImplicitInputs(NMR::Ports & ports); + + void writeImplicitFunctionInputs(NMR::Ports & ports); + void writeImplicitFunctionOutputs(NMR::Ports & ports); + }; + +} diff --git a/Include/Model/Writer/NMR_ModelWriterNode_LevelSet.h b/Include/Model/Writer/NMR_ModelWriterNode_LevelSet.h new file mode 100644 index 000000000..ed52bcb33 --- /dev/null +++ b/Include/Model/Writer/NMR_ModelWriterNode_LevelSet.h @@ -0,0 +1,70 @@ +/*++ + +Copyright (C) 2024 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Writer node for LevelSet resources + +--*/ + +#pragma once + +#include "Common/3MF_ProgressMonitor.h" +#include "Common/Platform/NMR_XmlWriter.h" +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelResource.h" +#include "Model/Classes/NMR_ModelVolumeData.h" + +#include "Model/Writer/NMR_ModelWriterNode_ModelBase.h" + +namespace NMR +{ + namespace implicit + { + class NodeTypes; + } + + class CModelLevelSetObject; + + class CModelWriterNode_LevelSet : public CModelWriterNode_ModelBase + { + + public: + CModelWriterNode_LevelSet() = delete; + CModelWriterNode_LevelSet(CModel * pModel, + CModelLevelSetObject * pLevelSet, + CXmlWriter * pXMLWriter, + PProgressMonitor pProgressMonitor); + + void writeToXML() override; + + private: + void writeLevelSetResources(); + void writeLevelSetResource(CModelLevelSetObject& levelSet); + + CModelLevelSetObject * m_pLevelSet = nullptr; + }; + +} diff --git a/Include/Model/Writer/NMR_ModelWriterNode_VolumeData.h b/Include/Model/Writer/NMR_ModelWriterNode_VolumeData.h new file mode 100644 index 000000000..9e20e0b93 --- /dev/null +++ b/Include/Model/Writer/NMR_ModelWriterNode_VolumeData.h @@ -0,0 +1,69 @@ +/*++ + +Copyright (C) 2024 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Writer node for VolumeData resources + +--*/ + +#pragma once + +#include "Common/3MF_ProgressMonitor.h" +#include "Common/Platform/NMR_XmlWriter.h" +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelResource.h" +#include "Model/Classes/NMR_ModelVolumeData.h" + +#include "Model/Writer/NMR_ModelWriterNode_ModelBase.h" + +namespace NMR +{ + namespace implicit + { + class NodeTypes; + } + + class CModelWriterNode_VolumeData : public CModelWriterNode_ModelBase + { + + public: + CModelWriterNode_VolumeData() = delete; + CModelWriterNode_VolumeData(CModel * pModel, + CXmlWriter * pXMLWriter, + PProgressMonitor pProgressMonitor); + + + void writeToXML() override; + + void writeVolumeDataResource(CModelVolumeData & volumeData); + private: + void writeVolumeDataResources(); + void writeProperty(CVolumeDataProperty & property); + void writeColor(CVolumeDataColor & color); + + }; + +} diff --git a/Include/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.h b/Include/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.h index 74a5b832d..94715edcd 100644 --- a/Include/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.h +++ b/Include/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.h @@ -68,6 +68,7 @@ namespace NMR { nfBool m_bWriteMaterialExtension; nfBool m_bWriteBeamLatticeExtension; + nfBool m_bWriteVolumetricExtension; // Internal functions for an efficient and buffered output of raw XML data std::array m_VertexLine; @@ -120,7 +121,8 @@ namespace NMR { public: CModelWriterNode100_Mesh() = delete; CModelWriterNode100_Mesh(_In_ CModelMeshObject * pModelMeshObject, _In_ CXmlWriter * pXMLWriter, _In_ PProgressMonitor pProgressMonitor, - _In_ PMeshInformation_PropertyIndexMapping pPropertyIndexMapping, _In_ int nPosAfterDecPoint, _In_ nfBool bWriteMaterialExtension, _In_ nfBool m_bWriteBeamLatticeExtension); + _In_ PMeshInformation_PropertyIndexMapping pPropertyIndexMapping, _In_ int nPosAfterDecPoint, _In_ nfBool bWriteMaterialExtension, _In_ nfBool m_bWriteBeamLatticeExtension, + _In_ nfBool bWriteVolumetricExtension); virtual void writeToXML(); }; diff --git a/Include/Model/Writer/v100/NMR_ModelWriterNode100_Model.h b/Include/Model/Writer/v100/NMR_ModelWriterNode100_Model.h index 6ed375bb2..d4eecb5de 100644 --- a/Include/Model/Writer/v100/NMR_ModelWriterNode100_Model.h +++ b/Include/Model/Writer/v100/NMR_ModelWriterNode100_Model.h @@ -61,22 +61,44 @@ namespace NMR { nfBool m_bWriteObjects; nfBool m_bIsRootModel; nfBool m_bWriteCustomNamespaces; + nfBool m_bWriteVolumetricExtension; + nfBool m_bWriteImplicitExtension; - void writeModelMetaData(); + void writeModelMetaData(); void writeMetaData(_In_ PModelMetaData pMetaData); void writeMetaDataGroup(_In_ PModelMetaDataGroup pMetaDataGroup); void writeResources(); + void writeResource(CModelResource * pResource); + void writeBaseMaterials(); + void writeBaseMaterial( + CModelBaseMaterialResource* pBaseMaterial); void writeTextures2D(); + void writeTexture2D( + CModelTexture2DResource* pTexture2D); void writeColors(); + void writeColor( + CModelColorGroupResource* pColorGroup); void writeTex2Coords(); void writeCompositeMaterials(); void writeMultiProperties(); void writeMultiPropertyAttributes(_In_ CModelMultiPropertyGroupResource* pMultiPropertyGroup); void writeMultiPropertyMultiElements(_In_ CModelMultiPropertyGroupResource* pMultiPropertyGroup); + + void writeImage3Ds(); + void writeImage3D(CModelImage3D & pImage3D); + + void writeFunctionsFromImage3D(); + void writeFunctionFromImage3D(CModelFunctionFromImage3D & functionFromImage3D); + + void writeImplicitFunctions(); + void writeVolumeData(); + + void writeObjects(); + void writeObject(CModelObject & pObject); void writeBuild(); void writeSliceStacks(); diff --git a/Include/Model/Writer/v100/NMR_ResourceDependencySorter.h b/Include/Model/Writer/v100/NMR_ResourceDependencySorter.h new file mode 100644 index 000000000..2f83d54a3 --- /dev/null +++ b/Include/Model/Writer/v100/NMR_ResourceDependencySorter.h @@ -0,0 +1,65 @@ +/*++ + +Copyright (C) 2024 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_ResourcDependencySorter resolves the dependencies between resources by +sorting them topologically. +--*/ + +#pragma once + +#include + +#include "Common/Graph/DirectedGraph.h" +#include "Common/Graph/GraphAlgorithms.h" +#include "Model/Classes/NMR_Model.h" + +namespace NMR +{ + using TopologicalSortResult = std::vector; + + class CResourceDependencySorter + { + private: + common::graph::DirectedGraph buildGraph(); + void buildIndexMaps(); + + [[nodiscard]] PPackageResourceID indexToModelResourceID(size_t index) const; + [[nodiscard]] size_t modelResourceIDToIndex(PPackageResourceID resourceID) const; + + CModel * m_pModel; + + std::unordered_map m_indexToResourceID; + std::unordered_map m_resourceIDToIndex; + + public: + explicit CResourceDependencySorter(CModel * pModel); + TopologicalSortResult sort(); + + }; + +} // namespace NMR \ No newline at end of file diff --git a/SDK/CPackExamples/Cpp/CMakeLists.txt b/SDK/CPackExamples/Cpp/CMakeLists.txt index 64e493284..c9060c3a2 100644 --- a/SDK/CPackExamples/Cpp/CMakeLists.txt +++ b/SDK/CPackExamples/Cpp/CMakeLists.txt @@ -5,11 +5,11 @@ set(CMAKE_CXX_STANDARD 11) # Determine the platform and set lib3mf_DIR accordingly if(WIN32) # Path for Windows - set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-2.3.2-Windows/lib/cmake/lib3mf") + set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-$ENV{LIB3MF_VERSION}-Windows/lib/cmake/lib3mf") find_package(lib3mf REQUIRED COMPONENTS Cpp) elseif(APPLE) # Path for macOS (Darwin) - set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-2.3.2-Darwin/lib/cmake/lib3mf") + set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-$ENV{LIB3MF_VERSION}-Darwin/lib/cmake/lib3mf") find_package(lib3mf REQUIRED COMPONENTS Cpp) else() # Path for Linux (Here we check twice to test for Debian / RPM packages properly) @@ -17,7 +17,7 @@ else() # Check if the package was not found if(NOT lib3mf_FOUND) # lib3mf not found, so set lib3mf_DIR to the fallback directory - set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-2.3.2-Linux/lib/cmake/lib3mf") + set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-$ENV{LIB3MF_VERSION}-Linux/lib/cmake/lib3mf") # Find package (lib3mf) find_package(lib3mf REQUIRED COMPONENTS Cpp) endif() diff --git a/SDK/CPackExamples/CppDynamic/CMakeLists.txt b/SDK/CPackExamples/CppDynamic/CMakeLists.txt index 0e1a52a69..a484b3775 100644 --- a/SDK/CPackExamples/CppDynamic/CMakeLists.txt +++ b/SDK/CPackExamples/CppDynamic/CMakeLists.txt @@ -42,11 +42,11 @@ set(CMAKE_CXX_STANDARD 11) # Determine the platform and set lib3mf_DIR accordingly if(WIN32) # Path for Windows - set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-2.3.2-Windows/lib/cmake/lib3mf") + set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-$ENV{LIB3MF_VERSION}-Windows/lib/cmake/lib3mf") find_package(lib3mf REQUIRED COMPONENTS CppDynamic) elseif(APPLE) # Path for macOS (Darwin) - set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-2.3.2-Darwin/lib/cmake/lib3mf") + set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-$ENV{LIB3MF_VERSION}-Darwin/lib/cmake/lib3mf") find_package(lib3mf REQUIRED COMPONENTS CppDynamic) else() # Path for Linux (Here we check twice to test for Debian / RPM packages properly) @@ -54,7 +54,7 @@ else() # Check if the package was not found if(NOT lib3mf_FOUND) # lib3mf not found, so set lib3mf_DIR to the fallback directory - set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-2.3.2-Linux/lib/cmake/lib3mf") + set(lib3mf_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../lib3mf-$ENV{LIB3MF_VERSION}-Linux/lib/cmake/lib3mf") # Find package (lib3mf) find_package(lib3mf REQUIRED COMPONENTS CppDynamic) endif() diff --git a/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/.NETCoreApp,Version=v2.0.AssemblyAttributes.cs b/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/.NETCoreApp,Version=v2.0.AssemblyAttributes.cs new file mode 100644 index 000000000..2d687849b --- /dev/null +++ b/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/.NETCoreApp,Version=v2.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v2.0", FrameworkDisplayName = ".NET Core 2.0")] diff --git a/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.AssemblyInfo.cs b/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.AssemblyInfo.cs new file mode 100644 index 000000000..3ea8e757a --- /dev/null +++ b/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("Lib3MF_Example")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("Lib3MF_Example")] +[assembly: System.Reflection.AssemblyTitleAttribute("Lib3MF_Example")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.AssemblyInfoInputs.cache b/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.AssemblyInfoInputs.cache new file mode 100644 index 000000000..bacd5e307 --- /dev/null +++ b/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +8a586aaf8f6e1fbc04f0ea6c10eae84a68902461 diff --git a/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.GeneratedMSBuildEditorConfig.editorconfig b/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 000000000..79cc46485 --- /dev/null +++ b/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.GeneratedMSBuildEditorConfig.editorconfig @@ -0,0 +1,3 @@ +is_global = true +build_property.RootNamespace = Lib3MF_Example +build_property.ProjectDir = D:\orj\projects\lib3mf\SDK\Examples\CSharp\ diff --git a/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.csproj.CoreCompileInputs.cache b/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.csproj.CoreCompileInputs.cache new file mode 100644 index 000000000..73ccc96a2 --- /dev/null +++ b/SDK/Examples/CSharp/obj/x64/Release/netcoreapp2.0/Lib3MF_Example.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +e4b7b7d442e93614080676c15eefb6837e777bea diff --git a/SDK/GenerateSDK_github.sh b/SDK/GenerateSDK_github.sh index 7e1db4b47..79d0543fa 100644 --- a/SDK/GenerateSDK_github.sh +++ b/SDK/GenerateSDK_github.sh @@ -30,7 +30,7 @@ mkdir -p $SDKARTIFACT/Lib || failed "Error creating Lib-folder" echo Copy binaries cp $LOCATION/lib3mf.dll/lib3mf.dll $SDKARTIFACT/Bin/ || failed "Error copying binary" cp $LOCATION/lib3mf.so/lib3mf.so.2 $SDKARTIFACT/Bin/lib3mf.so || failed "Error copying binary" -cp $LOCATION/lib3mf.dylib/lib3mf.2.3.2.0.dylib $SDKARTIFACT/Bin/lib3mf.dylib || failed "Error copying binary" +cp $LOCATION/lib3mf.dylib/lib3mf.$LIB3MF_VERSION.0.dylib $SDKARTIFACT/Bin/lib3mf.dylib || failed "Error copying binary" cp $LOCATION/lib3mf.lib/lib3mf.lib $SDKARTIFACT/Lib/ || failed "Error copying binary" echo Generate version.txt diff --git a/Source/API/lib3mf_absnode.cpp b/Source/API/lib3mf_absnode.cpp new file mode 100644 index 000000000..8b842d69c --- /dev/null +++ b/Source/API/lib3mf_absnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CAbsNode + +*/ + +#include "lib3mf_absnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CAbsNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CAbsNode::CAbsNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode(pImplicitNode) +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_additionnode.cpp b/Source/API/lib3mf_additionnode.cpp new file mode 100644 index 000000000..a4fd9f02d --- /dev/null +++ b/Source/API/lib3mf_additionnode.cpp @@ -0,0 +1,48 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CAdditionNode + +*/ + +#include "lib3mf_additionnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CAdditionNode +**************************************************************************************************************************/ + +CAdditionNode::CAdditionNode( + NMR::PModelImplicitNode pImplicitNode) + : CTwoInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_arccosnode.cpp b/Source/API/lib3mf_arccosnode.cpp new file mode 100644 index 000000000..289cca364 --- /dev/null +++ b/Source/API/lib3mf_arccosnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CArcCosNode + +*/ + +#include "lib3mf_arccosnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CArcCosNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CArcCosNode::CArcCosNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_arcsinnode.cpp b/Source/API/lib3mf_arcsinnode.cpp new file mode 100644 index 000000000..4f415168d --- /dev/null +++ b/Source/API/lib3mf_arcsinnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CArcSinNode + +*/ + +#include "lib3mf_arcsinnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CArcSinNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CArcSinNode::CArcSinNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_arctan2node.cpp b/Source/API/lib3mf_arctan2node.cpp new file mode 100644 index 000000000..3401ab6b4 --- /dev/null +++ b/Source/API/lib3mf_arctan2node.cpp @@ -0,0 +1,48 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CArcTan2Node + +*/ + +#include "lib3mf_arctan2node.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. +#include "lib3mf_twoinputnode.hpp" + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CArcTan2Node +**************************************************************************************************************************/ + +Lib3MF::Impl::CArcTan2Node::CArcTan2Node(NMR::PModelImplicitNode pImplicitNode) +: CTwoInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_arctannode.cpp b/Source/API/lib3mf_arctannode.cpp new file mode 100644 index 000000000..2439cdd83 --- /dev/null +++ b/Source/API/lib3mf_arctannode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CArcTanNode + +*/ + +#include "lib3mf_arctannode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CArcTanNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CArcTanNode::CArcTanNode(NMR::PModelImplicitNode pImplicitNode) +: COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_attachment.cpp b/Source/API/lib3mf_attachment.cpp index 9e8dfcfac..63c068612 100644 --- a/Source/API/lib3mf_attachment.cpp +++ b/Source/API/lib3mf_attachment.cpp @@ -161,3 +161,8 @@ void CAttachment::ReadFromBuffer(const Lib3MF_uint64 nBufferBufferSize, const Li m_pModelAttachment->setStream(pImportStream); } + +NMR::PModelAttachment CAttachment::getModelAttachment() +{ + return m_pModelAttachment; +} diff --git a/Source/API/lib3mf_beamlattice.cpp b/Source/API/lib3mf_beamlattice.cpp index 53942b71c..e2c9a8ecf 100644 --- a/Source/API/lib3mf_beamlattice.cpp +++ b/Source/API/lib3mf_beamlattice.cpp @@ -139,7 +139,7 @@ void CBeamLattice::GetBallOptions (eLib3MFBeamLatticeBallMode & eBallMode, Lib3M void CBeamLattice::SetBallOptions (const eLib3MFBeamLatticeBallMode eBallMode, const Lib3MF_double dBallRadius) { - if (eBallMode == eLib3MFBeamLatticeBallMode::None || dBallRadius > 0.0) { + if (eBallMode == eLib3MFBeamLatticeBallMode::BeamLatticeBallModeNone || dBallRadius > 0.0) { m_mesh.setBeamLatticeBallMode((NMR::eModelBeamLatticeBallMode)eBallMode); m_mesh.setDefaultBallRadius(dBallRadius); } @@ -307,7 +307,7 @@ sLib3MFBall CBeamLattice::GetBall (const Lib3MF_uint32 nIndex) return ball; } else if (ballMode == eBeamLatticeBallMode::All) { - Lib3MF_uint32 ballNodeIndex = m_mesh.getOccupiedNode(nIndex)->m_index; + Lib3MF_int32 ballNodeIndex = m_mesh.getOccupiedNode(nIndex)->m_index; Lib3MF_uint32 meshBallCount = m_mesh.getBallCount(); for (Lib3MF_uint32 iBall = 0; iBall < meshBallCount; iBall++) { @@ -377,7 +377,7 @@ void CBeamLattice::SetBall (const Lib3MF_uint32 nIndex, const sLib3MFBall BallIn meshBall->m_radius = BallInfo.m_Radius; } else if (ballMode == eBeamLatticeBallMode::All) { - Lib3MF_uint32 ballNodeIndex = m_mesh.getOccupiedNode(nIndex)->m_index; + Lib3MF_int32 ballNodeIndex = m_mesh.getOccupiedNode(nIndex)->m_index; Lib3MF_uint32 meshBallCount = m_mesh.getBallCount(); for (Lib3MF_uint32 iBall = 0; iBall < meshBallCount; iBall++) { NMR::MESHBALL * meshBall = m_mesh.getBall(iBall); diff --git a/Source/API/lib3mf_ceilnode.cpp b/Source/API/lib3mf_ceilnode.cpp new file mode 100644 index 000000000..263aa0e06 --- /dev/null +++ b/Source/API/lib3mf_ceilnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CCeilNode + +*/ + +#include "lib3mf_ceilnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CCeilNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CCeilNode::CCeilNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_clampnode.cpp b/Source/API/lib3mf_clampnode.cpp new file mode 100644 index 000000000..b0fdfb2fe --- /dev/null +++ b/Source/API/lib3mf_clampnode.cpp @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CClampNode + +*/ + +#include "lib3mf_clampnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CClampNode +**************************************************************************************************************************/ + +IImplicitPort* CClampNode::GetInputMin() +{ + return FindInputOrThrow(NMR::InputNames::min); +} + +IImplicitPort* CClampNode::GetInputMax() +{ + return FindInputOrThrow(NMR::InputNames::max); +} + +Lib3MF::Impl::CClampNode::CClampNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_componentsobject.cpp b/Source/API/lib3mf_componentsobject.cpp index 6c0658b5e..2c6530e05 100644 --- a/Source/API/lib3mf_componentsobject.cpp +++ b/Source/API/lib3mf_componentsobject.cpp @@ -126,3 +126,8 @@ bool CComponentsObject::IsComponentsObject() return true; } +bool CComponentsObject::IsLevelSetObject() +{ + return false; +} + diff --git a/Source/API/lib3mf_composematrixnode.cpp b/Source/API/lib3mf_composematrixnode.cpp new file mode 100644 index 000000000..517b7b7a1 --- /dev/null +++ b/Source/API/lib3mf_composematrixnode.cpp @@ -0,0 +1,133 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CComposeMatrixNode + +*/ + +#include "lib3mf_composematrixnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CComposeMatrixNode +**************************************************************************************************************************/ + +IImplicitPort * CComposeMatrixNode::GetInputM00() +{ + return FindInputOrThrow(NMR::InputNames::m00); +} + +IImplicitPort * CComposeMatrixNode::GetInputM01() +{ + return FindInputOrThrow(NMR::InputNames::m01); +} + +IImplicitPort * CComposeMatrixNode::GetInputM02() +{ + return FindInputOrThrow(NMR::InputNames::m02); +} + +IImplicitPort * CComposeMatrixNode::GetInputM03() +{ + return FindInputOrThrow(NMR::InputNames::m03); +} + +IImplicitPort * CComposeMatrixNode::GetInputM10() +{ + return FindInputOrThrow(NMR::InputNames::m10); +} + +IImplicitPort * CComposeMatrixNode::GetInputM11() +{ + return FindInputOrThrow(NMR::InputNames::m11); +} + +IImplicitPort * CComposeMatrixNode::GetInputM12() +{ + return FindInputOrThrow(NMR::InputNames::m12); +} + +IImplicitPort * CComposeMatrixNode::GetInputM13() +{ + return FindInputOrThrow(NMR::InputNames::m13); +} + +IImplicitPort * CComposeMatrixNode::GetInputM20() +{ + return FindInputOrThrow(NMR::InputNames::m20); +} + +IImplicitPort * CComposeMatrixNode::GetInputM21() +{ + return FindInputOrThrow(NMR::InputNames::m21); +} + +IImplicitPort * CComposeMatrixNode::GetInputM22() +{ + return FindInputOrThrow(NMR::InputNames::m22); +} + +IImplicitPort * CComposeMatrixNode::GetInputM23() +{ + return FindInputOrThrow(NMR::InputNames::m23); +} + +IImplicitPort * CComposeMatrixNode::GetInputM30() +{ + return FindInputOrThrow(NMR::InputNames::m30); +} + +IImplicitPort * CComposeMatrixNode::GetInputM31() +{ + return FindInputOrThrow(NMR::InputNames::m31); +} + +IImplicitPort * CComposeMatrixNode::GetInputM32() +{ + return FindInputOrThrow(NMR::InputNames::m32); +} + +IImplicitPort * CComposeMatrixNode::GetInputM33() +{ + return FindInputOrThrow(NMR::InputNames::m33); +} + +IImplicitPort * CComposeMatrixNode::GetOutputResult() +{ + return FindOutputOrThrow(NMR::OutputNames::result); +} + +Lib3MF::Impl::CComposeMatrixNode::CComposeMatrixNode( + NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_composevectornode.cpp b/Source/API/lib3mf_composevectornode.cpp new file mode 100644 index 000000000..bbef8adfc --- /dev/null +++ b/Source/API/lib3mf_composevectornode.cpp @@ -0,0 +1,68 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CComposeVectorNode + +*/ + +#include "lib3mf_composevectornode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CComposeVectorNode +**************************************************************************************************************************/ + +IImplicitPort * CComposeVectorNode::GetInputX() +{ + return FindInputOrThrow(NMR::InputNames::x); +} + +IImplicitPort * CComposeVectorNode::GetInputY() +{ + return FindInputOrThrow(NMR::InputNames::y); +} + +IImplicitPort * CComposeVectorNode::GetInputZ() +{ + return FindInputOrThrow(NMR::InputNames::z); +} + +IImplicitPort * CComposeVectorNode::GetOutputResult() +{ + return FindOutputOrThrow(NMR::OutputNames::result); +} + +Lib3MF::Impl::CComposeVectorNode::CComposeVectorNode( + NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_constantnode.cpp b/Source/API/lib3mf_constantnode.cpp new file mode 100644 index 000000000..caa3a40a3 --- /dev/null +++ b/Source/API/lib3mf_constantnode.cpp @@ -0,0 +1,64 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CConstantNode + +*/ + +#include "lib3mf_constantnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CConstantNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CConstantNode::CConstantNode( + NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} + +void CConstantNode::SetConstant(const Lib3MF_double dValue) +{ + m_pImplicitNode->setConstant(dValue); +} + +Lib3MF_double CConstantNode::GetConstant() +{ + return m_pImplicitNode->getConstant(); +} + +IImplicitPort * CConstantNode::GetOutputValue() +{ + return FindOutputOrThrow(NMR::OutputNames::value); +} + diff --git a/Source/API/lib3mf_constmatnode.cpp b/Source/API/lib3mf_constmatnode.cpp new file mode 100644 index 000000000..04e9ddab0 --- /dev/null +++ b/Source/API/lib3mf_constmatnode.cpp @@ -0,0 +1,64 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CConstMatNode + +*/ + +#include "lib3mf_constmatnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CConstMatNode +**************************************************************************************************************************/ + +CConstMatNode::CConstMatNode( + NMR::PModelImplicitNode pImplicitNode) +: CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} + +void CConstMatNode::SetMatrix(const Lib3MF::sMatrix4x4 Value) +{ + m_pImplicitNode->setMatrix(Value); +} + +Lib3MF::sMatrix4x4 CConstMatNode::GetMatrix() +{ + return m_pImplicitNode->getMatrix(); +} + +IImplicitPort * CConstMatNode::GetOutputMatrix() +{ + return FindOutputOrThrow(NMR::OutputNames::matrix); +} + diff --git a/Source/API/lib3mf_constvecnode.cpp b/Source/API/lib3mf_constvecnode.cpp new file mode 100644 index 000000000..24d004f92 --- /dev/null +++ b/Source/API/lib3mf_constvecnode.cpp @@ -0,0 +1,64 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CConstVecNode + +*/ + +#include "lib3mf_constvecnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CConstVecNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CConstVecNode::CConstVecNode( + NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} + +void CConstVecNode::SetVector(const Lib3MF::sVector Value) +{ + m_pImplicitNode->setVector(Value); +} + +Lib3MF::sVector CConstVecNode::GetVector() +{ + return m_pImplicitNode->getVector(); +} + +IImplicitPort * CConstVecNode::GetOutputVector() +{ + return FindOutputOrThrow(NMR::OutputNames::vector); +} + diff --git a/Source/API/lib3mf_coshnode.cpp b/Source/API/lib3mf_coshnode.cpp new file mode 100644 index 000000000..39f09a2d0 --- /dev/null +++ b/Source/API/lib3mf_coshnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CCoshNode + +*/ + +#include "lib3mf_coshnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CCoshNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CCoshNode::CCoshNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_cosnode.cpp b/Source/API/lib3mf_cosnode.cpp new file mode 100644 index 000000000..cf867b530 --- /dev/null +++ b/Source/API/lib3mf_cosnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CCosNode + +*/ + +#include "lib3mf_cosnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CCosNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CCosNode::CCosNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_crossnode.cpp b/Source/API/lib3mf_crossnode.cpp new file mode 100644 index 000000000..ec4a65ef2 --- /dev/null +++ b/Source/API/lib3mf_crossnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CCrossNode + +*/ + +#include "lib3mf_crossnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CCrossNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CCrossNode::CCrossNode(NMR::PModelImplicitNode pImplicitNode) + : CTwoInputNode{pImplicitNode} + { + CImplicitNode::m_pImplicitNode = pImplicitNode; + } diff --git a/Source/API/lib3mf_decomposevectornode.cpp b/Source/API/lib3mf_decomposevectornode.cpp new file mode 100644 index 000000000..e4e2d9c2b --- /dev/null +++ b/Source/API/lib3mf_decomposevectornode.cpp @@ -0,0 +1,68 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CDecomposeVectorNode + +*/ + +#include "lib3mf_decomposevectornode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CDecomposeVectorNode +**************************************************************************************************************************/ + +IImplicitPort * CDecomposeVectorNode::GetInputA() +{ + return FindInput("A"); +} + +IImplicitPort * CDecomposeVectorNode::GetOutputX() +{ + return FindOutput("x"); +} + +IImplicitPort * CDecomposeVectorNode::GetOutputY() +{ + return FindOutput("y"); +} + +IImplicitPort * CDecomposeVectorNode::GetOutputZ() +{ + return FindOutput("z"); +} + +Lib3MF::Impl::CDecomposeVectorNode::CDecomposeVectorNode( + NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_divisionnode.cpp b/Source/API/lib3mf_divisionnode.cpp new file mode 100644 index 000000000..6b517d3b3 --- /dev/null +++ b/Source/API/lib3mf_divisionnode.cpp @@ -0,0 +1,48 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CDivisionNode + +*/ + +#include "lib3mf_divisionnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CDivisionNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CDivisionNode::CDivisionNode( + NMR::PModelImplicitNode pImplicitNode) + : CTwoInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_dotnode.cpp b/Source/API/lib3mf_dotnode.cpp new file mode 100644 index 000000000..7ba816cd0 --- /dev/null +++ b/Source/API/lib3mf_dotnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CDotNode + +*/ + +#include "lib3mf_dotnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CDotNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CDotNode::CDotNode(NMR::PModelImplicitNode pImplicitNode) +: CTwoInputNode{pImplicitNode} + { + CImplicitNode::m_pImplicitNode = pImplicitNode; + } diff --git a/Source/API/lib3mf_expnode.cpp b/Source/API/lib3mf_expnode.cpp new file mode 100644 index 000000000..fb266e4b0 --- /dev/null +++ b/Source/API/lib3mf_expnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CExpNode + +*/ + +#include "lib3mf_expnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CExpNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CExpNode::CExpNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_floornode.cpp b/Source/API/lib3mf_floornode.cpp new file mode 100644 index 000000000..8b97baa6e --- /dev/null +++ b/Source/API/lib3mf_floornode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CFloorNode + +*/ + +#include "lib3mf_floornode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CFloorNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CFloorNode::CFloorNode(NMR::PModelImplicitNode pImplicitNode) +: COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_fmodnode.cpp b/Source/API/lib3mf_fmodnode.cpp new file mode 100644 index 000000000..731ad48de --- /dev/null +++ b/Source/API/lib3mf_fmodnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CFmodNode + +*/ + +#include "lib3mf_fmodnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CFmodNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CFmodNode::CFmodNode(NMR::PModelImplicitNode pImplicitNode) + : CTwoInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_fractnode.cpp b/Source/API/lib3mf_fractnode.cpp new file mode 100644 index 000000000..c3e0ff2c2 --- /dev/null +++ b/Source/API/lib3mf_fractnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CFractNode + +*/ + +#include "lib3mf_fractnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CFractNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CFractNode::CFractNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_function.cpp b/Source/API/lib3mf_function.cpp new file mode 100644 index 000000000..182581437 --- /dev/null +++ b/Source/API/lib3mf_function.cpp @@ -0,0 +1,126 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CFunction + +*/ + +#include "lib3mf_function.hpp" +#include "lib3mf_interfaceexception.hpp" +#include "lib3mf_implicitport.hpp" +#include "lib3mf_implicitportiterator.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CFunction +**************************************************************************************************************************/ + +NMR::CModelFunction* Lib3MF::Impl::CFunction::function() +{ + NMR::CModelFunction* pFunction = dynamic_cast(resource().get()); + if (pFunction == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDOBJECT); + + return pFunction; +} + +Lib3MF::Impl::CFunction::CFunction(NMR::PModelResource pResource) + : CResource(pResource) +{ +} + +std::string CFunction::GetDisplayName() +{ + return function()->getDisplayName(); +} + +void CFunction::SetDisplayName(const std::string& sDisplayName) +{ + function()->setDisplayName(sDisplayName); +} + +IImplicitPort* CFunction::AddInput(const std::string& sIdentifier, + const std::string& sDisplayName, + const Lib3MF::eImplicitPortType eType) +{ + + return new CImplicitPort(function()->addInput(sIdentifier, sDisplayName, eType)); +} + +IImplicitPortIterator* CFunction::GetInputs() +{ + return new CImplicitPortIterator(function()->getInputs()); +} + +void CFunction::RemoveInput(IImplicitPort* pInput) +{ + auto inputs = function()->getInputs(); + auto it = std::find_if(inputs->begin(), inputs->end(), [pInput](const NMR::PModelImplicitPort& port) { + return port->getIdentifier() == pInput->GetIdentifier(); + }); + if (it != inputs->end()) + inputs->erase(it); + else + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); +} + +IImplicitPort* CFunction::AddOutput(const std::string& sIdentifier, + const std::string& sDisplayName, + const Lib3MF::eImplicitPortType eType) +{ + return new CImplicitPort(function()->addOutput(sIdentifier, sDisplayName, eType)); +} + +IImplicitPortIterator* CFunction::GetOutputs() +{ + return new CImplicitPortIterator(function()->getOutputs()); +} + +void CFunction::RemoveOutput(IImplicitPort* pOutput) +{ + auto outputs = function()->getOutputs(); + auto it = std::find_if(outputs->begin(), outputs->end(), [pOutput](const NMR::PModelImplicitPort& port) { + return port->getIdentifier() == pOutput->GetIdentifier(); + }); + if (it != outputs->end()) + outputs->erase(it); + else + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); +} + +IImplicitPort* CFunction::FindInput(const std::string& sIdentifier) +{ + return new CImplicitPort(function()->findInput(sIdentifier)); +} + +IImplicitPort* CFunction::FindOutput(const std::string& sIdentifier) +{ + return new CImplicitPort(function()->findOutput(sIdentifier)); +} diff --git a/Source/API/lib3mf_functioncallnode.cpp b/Source/API/lib3mf_functioncallnode.cpp new file mode 100644 index 000000000..639010af4 --- /dev/null +++ b/Source/API/lib3mf_functioncallnode.cpp @@ -0,0 +1,53 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CFunctionCallNode + +*/ + +#include "lib3mf_functioncallnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CFunctionCallNode +**************************************************************************************************************************/ + +CFunctionCallNode::CFunctionCallNode( + NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} + +IImplicitPort * CFunctionCallNode::GetInputFunctionID() +{ + return FindInputOrThrow(NMR::InputNames::functionID); +} diff --git a/Source/API/lib3mf_functionfromimage3d.cpp b/Source/API/lib3mf_functionfromimage3d.cpp new file mode 100644 index 000000000..21cb4ce93 --- /dev/null +++ b/Source/API/lib3mf_functionfromimage3d.cpp @@ -0,0 +1,128 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CFunctionFromImage3D + +*/ + +#include "lib3mf_functionfromimage3d.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. +#include "lib3mf_image3d.hpp" + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CFunctionFromImage3D +**************************************************************************************************************************/ + +IImage3D * CFunctionFromImage3D::GetImage3D() +{ + auto id = functionfromimage3d()->getImage3DUniqueResourceID(); + auto image = model()->findImage3D(id); + + + if(!image) + throw ELib3MFInterfaceException(NMR_ERROR_INVALIDMODELRESOURCE); + + return new CImage3D(image); +} + +NMR::CModelFunctionFromImage3D * Lib3MF::Impl::CFunctionFromImage3D::functionfromimage3d() +{ + auto pFunctionFromImage3D = std::dynamic_pointer_cast(resource()); + + if(!pFunctionFromImage3D) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDOBJECT, "Resource is not a FunctionFromImage3D Object"); + } + + return pFunctionFromImage3D.get(); +} + +Lib3MF::Impl::CFunctionFromImage3D::CFunctionFromImage3D(NMR::PModelResource pResource) + : CResource(pResource) + , CFunction(pResource) +{ +} + +void CFunctionFromImage3D::SetImage3D(IImage3D * pImage3D) +{ + if (pImage3D == nullptr) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + functionfromimage3d()->setImage3DUniqueResourceID(pImage3D->GetUniqueResourceID()); +} + +void CFunctionFromImage3D::SetFilter(const Lib3MF::eTextureFilter eFilter) +{ + functionfromimage3d()->setFilter((NMR::eModelTextureFilter) eFilter); +} + +Lib3MF::eTextureFilter CFunctionFromImage3D::GetFilter() +{ + return (Lib3MF::eTextureFilter) functionfromimage3d()->getFilter(); +} + +void CFunctionFromImage3D::SetTileStyles(const Lib3MF::eTextureTileStyle eTileStyleU, + const Lib3MF::eTextureTileStyle eTileStyleV, + const Lib3MF::eTextureTileStyle eTileStyleW) +{ + functionfromimage3d()->setTileStyleU((NMR::eModelTextureTileStyle) eTileStyleU); + functionfromimage3d()->setTileStyleV((NMR::eModelTextureTileStyle) eTileStyleV); + functionfromimage3d()->setTileStyleW((NMR::eModelTextureTileStyle) eTileStyleW); +} + +void CFunctionFromImage3D::GetTileStyles(Lib3MF::eTextureTileStyle & eTileStyleU, + Lib3MF::eTextureTileStyle & eTileStyleV, + Lib3MF::eTextureTileStyle & eTileStyleW) +{ + eTileStyleU = (Lib3MF::eTextureTileStyle) functionfromimage3d()->getTileStyleU(); + eTileStyleV = (Lib3MF::eTextureTileStyle) functionfromimage3d()->getTileStyleV(); + eTileStyleW = (Lib3MF::eTextureTileStyle) functionfromimage3d()->getTileStyleW(); +} + +Lib3MF_double CFunctionFromImage3D::GetOffset() +{ + return functionfromimage3d()->getOffset(); +} + +void CFunctionFromImage3D::SetOffset(const Lib3MF_double dOffset) +{ + functionfromimage3d()->setOffset(dOffset); +} + +Lib3MF_double CFunctionFromImage3D::GetScale() +{ + return functionfromimage3d()->getScale(); +} + +void CFunctionFromImage3D::SetScale(const Lib3MF_double dScale) +{ + functionfromimage3d()->setScale(dScale); +} diff --git a/Source/API/lib3mf_functioniterator.cpp b/Source/API/lib3mf_functioniterator.cpp new file mode 100644 index 000000000..36408a72c --- /dev/null +++ b/Source/API/lib3mf_functioniterator.cpp @@ -0,0 +1,51 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CFunctionIterator + +*/ + +#include "lib3mf_functioniterator.hpp" +#include "lib3mf_interfaceexception.hpp" +#include "lib3mf_implicitfunction.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CFunctionIterator +**************************************************************************************************************************/ + +IFunction * CFunctionIterator::GetCurrentFunction() +{ + auto currentFunction = dynamic_cast(GetCurrent()); + if (currentFunction == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + return currentFunction; +} + diff --git a/Source/API/lib3mf_functionreference.cpp b/Source/API/lib3mf_functionreference.cpp new file mode 100644 index 000000000..b9e0da67a --- /dev/null +++ b/Source/API/lib3mf_functionreference.cpp @@ -0,0 +1,106 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CFunctionReference + +*/ + +#include "lib3mf_functionreference.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. +#include "lib3mf_utils.hpp" + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CFunctionReference +**************************************************************************************************************************/ + +Lib3MF_uint32 CFunctionReference::GetFunctionResourceID() +{ + return m_pFunctionReference->getFunctionResourceID(); +} + +void CFunctionReference::SetFunctionResourceID( + const Lib3MF_uint32 nUniqueResourceID) +{ + m_pFunctionReference->setFunctionResourceID(nUniqueResourceID); +} + +CFunctionReference::CFunctionReference( + NMR::PFunctionReference pFunctionReference) + : m_pFunctionReference(pFunctionReference) +{ +} + +void CFunctionReference::SetTransform( + const Lib3MF::sTransform Transform) +{ + m_pFunctionReference->setTransform(TransformToMatrix(Transform)); +} + + +Lib3MF::sTransform CFunctionReference::GetTransform() +{ + NMR::NMATRIX3 const matrix = m_pFunctionReference->getTransform(); + return MatrixToTransform(matrix); +} + +//std::string GetChannelName() +std::string CFunctionReference::GetChannelName() +{ + return m_pFunctionReference->getChannelName(); +} + +void CFunctionReference::SetChannelName( + const std::string & sChannelName) +{ + m_pFunctionReference->setChannelName(sChannelName); +} + +void CFunctionReference::SetMinFeatureSize( + const Lib3MF_double dMinFeatureSize) +{ + m_pFunctionReference->setMinFeatureSize(dMinFeatureSize); +} + +Lib3MF_double CFunctionReference::GetMinFeatureSize() +{ + return m_pFunctionReference->getMinFeatureSize(); +} + +void CFunctionReference::SetFallBackValue( + const Lib3MF_double dFallBackValue) +{ + m_pFunctionReference->setFallBackValue(dFallBackValue); +} + +Lib3MF_double CFunctionReference::GetFallBackValue() +{ + return m_pFunctionReference->getFallBackValue(); +} \ No newline at end of file diff --git a/Source/API/lib3mf_image3d.cpp b/Source/API/lib3mf_image3d.cpp new file mode 100644 index 000000000..01a02ce8d --- /dev/null +++ b/Source/API/lib3mf_image3d.cpp @@ -0,0 +1,70 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CImage3D + +*/ + +#include "lib3mf_image3d.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. +#include "Model/Classes/NMR_ModelImageStack.h" + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CImage3D +**************************************************************************************************************************/ + +CImage3D::CImage3D(NMR::PModelResource pResource) + :CResource(pResource) +{} + +NMR::CModelImage3D* CImage3D::image3D() +{ + NMR::CModelImage3D* pImage3D = dynamic_cast (resource().get()); + if (pImage3D == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_RESOURCENOTFOUND); + + return pImage3D; +} + +std::string CImage3D::GetName() +{ + return image3D()->getName(); +} + +void CImage3D::SetName(const std::string & sName) +{ + image3D()->setName(sName); +} + +bool CImage3D::IsImageStack() +{ + return (dynamic_cast(image3D()) != nullptr); +} + diff --git a/Source/API/lib3mf_image3diterator.cpp b/Source/API/lib3mf_image3diterator.cpp new file mode 100644 index 000000000..fc8d7e15c --- /dev/null +++ b/Source/API/lib3mf_image3diterator.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CImage3DIterator + +*/ + +#include "lib3mf_image3diterator.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CImage3DIterator +**************************************************************************************************************************/ + +IImage3D * CImage3DIterator::GetCurrentImage3D() +{ + return dynamic_cast(GetCurrent()); +} + diff --git a/Source/API/lib3mf_imagestack.cpp b/Source/API/lib3mf_imagestack.cpp new file mode 100644 index 000000000..9eeaa2436 --- /dev/null +++ b/Source/API/lib3mf_imagestack.cpp @@ -0,0 +1,117 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CImageStack + +*/ + +#include "lib3mf_imagestack.hpp" +#include "lib3mf_interfaceexception.hpp" +#include "lib3mf_attachment.hpp" + +#include "Common/Platform/NMR_ImportStream_Shared_Memory.h" +#include "Common/Platform/NMR_ImportStream_Unique_Memory.h" +#include "Common/Platform/NMR_ImportStream_Native.h" + +#include "Common/NMR_StringUtils.h" + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CImageStack +**************************************************************************************************************************/ + +CImageStack::CImageStack(NMR::PModelImageStack pModelImageStack) + :CResource(pModelImageStack), CImage3D(pModelImageStack), m_pModelImageStack(pModelImageStack) +{ +} + + +Lib3MF_uint32 CImageStack::GetRowCount() +{ + return m_pModelImageStack->getRowCount(); +} + +void CImageStack::SetRowCount(const Lib3MF_uint32 nRowCount) +{ + m_pModelImageStack->setRowCount(nRowCount); +} + +Lib3MF_uint32 CImageStack::GetColumnCount() +{ + return m_pModelImageStack->getColumnCount(); +} + +void CImageStack::SetColumnCount(const Lib3MF_uint32 nColumnCount) +{ + m_pModelImageStack->setColumnCount(nColumnCount); +} + +Lib3MF_uint32 CImageStack::GetSheetCount() +{ + return m_pModelImageStack->getSheetCount(); +} + +IAttachment * CImageStack::GetSheet(const Lib3MF_uint32 nIndex) +{ + auto pAttachment = m_pModelImageStack->getSheet(nIndex); + return new CAttachment(pAttachment); +} + +void CImageStack::SetSheet(const Lib3MF_uint32 nIndex, IAttachment* pSheet) +{ + if (pSheet == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + + CAttachment* pAttachment = dynamic_cast (pSheet); + if (pAttachment == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); + + m_pModelImageStack->setSheet(nIndex, pAttachment->getModelAttachment()); +} + +IAttachment * CImageStack::CreateEmptySheet(const Lib3MF_uint32 nIndex, const std::string & sPath) +{ + NMR::PImportStream pStream = std::make_shared(); + auto pAttachment = m_pModelImageStack->createSheet(nIndex, sPath, pStream); + return new CAttachment(pAttachment); +} + +IAttachment * CImageStack::CreateSheetFromBuffer(const Lib3MF_uint32 nIndex, const std::string & sPath, const Lib3MF_uint64 nDataBufferSize, const Lib3MF_uint8 * pDataBuffer) +{ + NMR::PImportStream pStream = std::make_shared(pDataBuffer, nDataBufferSize); + auto pAttachment = m_pModelImageStack->createSheet(nIndex, sPath, pStream); + return new CAttachment(pAttachment); +} + +IAttachment * CImageStack::CreateSheetFromFile(const Lib3MF_uint32 nIndex, const std::string & sPath, const std::string & sFileName) +{ + std::wstring sUTF16FileName = NMR::fnUTF8toUTF16(sFileName); + NMR::PImportStream pFileStream = std::make_shared(sUTF16FileName.c_str()); + auto pAttachment = m_pModelImageStack->createSheet(nIndex, sPath, pFileStream->copyToMemory()); + return new CAttachment(pAttachment); +} + diff --git a/Source/API/lib3mf_implicitfunction.cpp b/Source/API/lib3mf_implicitfunction.cpp new file mode 100644 index 000000000..85f735177 --- /dev/null +++ b/Source/API/lib3mf_implicitfunction.cpp @@ -0,0 +1,719 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CImplicitFunction + +*/ + +#include "lib3mf_implicitfunction.hpp" + +#include "lib3mf_absnode.hpp" +#include "lib3mf_additionnode.hpp" +#include "lib3mf_arccosnode.hpp" +#include "lib3mf_arcsinnode.hpp" +#include "lib3mf_arctan2node.hpp" +#include "lib3mf_ceilnode.hpp" +#include "lib3mf_clampnode.hpp" +#include "lib3mf_composematrixnode.hpp" +#include "lib3mf_composevectornode.hpp" +#include "lib3mf_constantnode.hpp" +#include "lib3mf_constmatnode.hpp" +#include "lib3mf_constvecnode.hpp" +#include "lib3mf_coshnode.hpp" +#include "lib3mf_cosnode.hpp" +#include "lib3mf_crossnode.hpp" +#include "lib3mf_decomposevectornode.hpp" +#include "lib3mf_divisionnode.hpp" +#include "lib3mf_dotnode.hpp" +#include "lib3mf_expnode.hpp" +#include "lib3mf_floornode.hpp" +#include "lib3mf_fmodnode.hpp" +#include "lib3mf_fractnode.hpp" +#include "lib3mf_functioncallnode.hpp" +#include "lib3mf_implicitnode.hpp" +#include "lib3mf_implicitport.hpp" +#include "lib3mf_interfaceexception.hpp" +#include "lib3mf_inversenode.hpp" +#include "lib3mf_lengthnode.hpp" +#include "lib3mf_log10node.hpp" +#include "lib3mf_log2node.hpp" +#include "lib3mf_lognode.hpp" +#include "lib3mf_matrixfromcolumnsnode.hpp" +#include "lib3mf_matrixfromrowsnode.hpp" +#include "lib3mf_matvecmultiplicationnode.hpp" +#include "lib3mf_maxnode.hpp" +#include "lib3mf_meshnode.hpp" +#include "lib3mf_minnode.hpp" +#include "lib3mf_multiplicationnode.hpp" +#include "lib3mf_pownode.hpp" +#include "lib3mf_resourceidnode.hpp" +#include "lib3mf_roundnode.hpp" +#include "lib3mf_selectnode.hpp" +#include "lib3mf_signnode.hpp" +#include "lib3mf_sinhnode.hpp" +#include "lib3mf_sinnode.hpp" +#include "lib3mf_sqrtnode.hpp" +#include "lib3mf_subtractionnode.hpp" +#include "lib3mf_tanhnode.hpp" +#include "lib3mf_tannode.hpp" +#include "lib3mf_transposenode.hpp" +#include "lib3mf_unsignedmeshnode.hpp" +#include "lib3mf_vectorfromscalarnode.hpp" + +// Include custom headers here. +#include "lib3mf_implicitportiterator.hpp" +#include "lib3mf_nodeiterator.hpp" + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CImplicitFunction +**************************************************************************************************************************/ + +NMR::CModelImplicitFunction* CImplicitFunction::function() +{ + NMR::CModelImplicitFunction* pFunction = + dynamic_cast(resource().get()); + if(pFunction == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDOBJECT); + + return pFunction; +} + +CImplicitFunction::CImplicitFunction(NMR::PModelResource pResource) + : CResource(pResource), CFunction(pResource) +{ +} + +std::string CImplicitFunction::GetIdentifier() +{ + return function()->getIdentifier(); +} + +void CImplicitFunction::SetIdentifier(const std::string& sIdentifier) +{ + function()->setIdentifier(sIdentifier); +} + +IImplicitNode* CImplicitFunction::AddNode( + const Lib3MF::eImplicitNodeType eNodeType, const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = function()->addNode(eNodeType, eConfiguration, sIdentifier, + sDisplayName, sTag); + return new CImplicitNode(newNode); +} + +ISinNode* CImplicitFunction::AddSinNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Sinus, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CSinNode(newNode); +} + +ICosNode* CImplicitFunction::AddCosNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Cosinus, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CCosNode(newNode); +} + +ITanNode* CImplicitFunction::AddTanNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Tan, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CTanNode(newNode); +} + +IArcSinNode* CImplicitFunction::AddArcSinNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::ArcSin, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CArcSinNode(newNode); +} + +IArcCosNode* CImplicitFunction::AddArcCosNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::ArcCos, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CArcCosNode(newNode); +} + +IArcTan2Node* CImplicitFunction::AddArcTan2Node( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::ArcTan2, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CArcTan2Node(newNode); +} + +ISinhNode* CImplicitFunction::AddSinhNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Sinh, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CSinhNode(newNode); +} + +ICoshNode* CImplicitFunction::AddCoshNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Cosh, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CCoshNode(newNode); +} + +ITanhNode* CImplicitFunction::AddTanhNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Tanh, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CTanhNode(newNode); +} + +IRoundNode* CImplicitFunction::AddRoundNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Round, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CRoundNode(newNode); +} + +ICeilNode* CImplicitFunction::AddCeilNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Ceil, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CCeilNode(newNode); +} + +IFloorNode* CImplicitFunction::AddFloorNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Floor, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CFloorNode(newNode); +} + +ISignNode* CImplicitFunction::AddSignNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Sign, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CSignNode(newNode); +} + +IFractNode* CImplicitFunction::AddFractNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Fract, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CFractNode(newNode); +} + +IAbsNode* CImplicitFunction::AddAbsNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Abs, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CAbsNode(newNode); +} + +IExpNode* CImplicitFunction::AddExpNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Exp, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CExpNode(newNode); +} + +ILogNode* CImplicitFunction::AddLogNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Log, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CLogNode(newNode); +} + +ILog2Node* CImplicitFunction::AddLog2Node( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Log2, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CLog2Node(newNode); +} + +ILog10Node* CImplicitFunction::AddLog10Node( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Log10, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CLog10Node(newNode); +} + +ILengthNode* CImplicitFunction::AddLengthNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Length, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CLengthNode(newNode); +} + +ITransposeNode* CImplicitFunction::AddTransposeNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Transpose, + eConfiguration, sIdentifier, sDisplayName, sTag); + return new CTransposeNode(newNode); +} + +IInverseNode* CImplicitFunction::InverseNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Inverse, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CInverseNode(newNode); +} + +ISqrtNode* CImplicitFunction::AddSqrtNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Sqrt, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CSqrtNode(newNode); +} + +IResourceIdNode* CImplicitFunction::AddResourceIdNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::ConstResourceID, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CResourceIdNode(newNode); +} + +IAdditionNode* CImplicitFunction::AddAdditionNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Addition, eConfiguration, + sIdentifier, sDisplayName, sTag); + + return new CAdditionNode(newNode); +} + +ISubtractionNode* CImplicitFunction::AddSubtractionNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Subtraction, + eConfiguration, sIdentifier, sDisplayName, sTag); + return new CSubtractionNode(newNode); +} + +IMultiplicationNode* CImplicitFunction::AddMultiplicationNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Multiplication, + eConfiguration, sIdentifier, sDisplayName, sTag); + return new CMultiplicationNode(newNode); +} + +IDivisionNode* CImplicitFunction::AddDivisionNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Division, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CDivisionNode(newNode); +} + +IDotNode* CImplicitFunction::AddDotNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Dot, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CDotNode(newNode); +} + +ICrossNode* CImplicitFunction::AddCrossNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Cross, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CCrossNode(newNode); +} + +IMatVecMultiplicationNode* CImplicitFunction::AddMatVecMultiplicationNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::MatVecMultiplication, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CMatVecMultiplicationNode(newNode); +} + +IMinNode* CImplicitFunction::AddMinNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Min, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CMinNode(newNode); +} + +IMaxNode* CImplicitFunction::AddMaxNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Max, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CMaxNode(newNode); +} + +IFmodNode* CImplicitFunction::AddFmodNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Fmod, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CFmodNode(newNode); +} + +IPowNode* CImplicitFunction::AddPowNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Pow, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CPowNode(newNode); +} + +ISelectNode* CImplicitFunction::AddSelectNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Select, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CSelectNode(newNode); +} + +IClampNode* CImplicitFunction::AddClampNode( + const std::string& sIdentifier, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string& sDisplayName, const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Clamp, eConfiguration, + sIdentifier, sDisplayName, sTag); + return new CClampNode(newNode); +} + +IComposeVectorNode* CImplicitFunction::AddComposeVectorNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::ComposeVector, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CComposeVectorNode(newNode); +} + +IVectorFromScalarNode * CImplicitFunction::AddVectorFromScalarNode(const std::string & sIdentifier, + const std::string & sDisplayName, + const std::string & sTag) +{ + auto newNode = function()->addNode(Lib3MF::eImplicitNodeType::VectorFromScalar, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, + sDisplayName, + sTag); + return new CVectorFromScalarNode(newNode); +} + +IDecomposeVectorNode* CImplicitFunction::AddDecomposeVectorNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::DecomposeVector, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CDecomposeVectorNode(newNode); +} + +IComposeMatrixNode* CImplicitFunction::AddComposeMatrixNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::ComposeMatrix, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CComposeMatrixNode(newNode); +} + +IMatrixFromRowsNode * CImplicitFunction::AddMatrixFromRowsNode(const std::string & sIdentifier, + const std::string & sDisplayName, + const std::string & sTag) +{ + auto newNode = function()->addNode(Lib3MF::eImplicitNodeType::MatrixFromRows, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, + sDisplayName, + sTag); + return new CMatrixFromRowsNode(newNode); +} + +IMatrixFromColumnsNode * CImplicitFunction::AddMatrixFromColumnsNode(const std::string & sIdentifier, + const std::string & sDisplayName, + const std::string & sTag) +{ + auto newNode = function()->addNode(Lib3MF::eImplicitNodeType::MatrixFromColumns, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, + sDisplayName, + sTag); + return new CMatrixFromColumnsNode(newNode); +} + +IConstantNode* CImplicitFunction::AddConstantNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Constant, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CConstantNode(newNode); +} + +IConstVecNode* CImplicitFunction::AddConstVecNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::ConstVec, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CConstVecNode(newNode); +} + +IConstMatNode* CImplicitFunction::AddConstMatNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::ConstMat, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CConstMatNode(newNode); +} + +IMeshNode* CImplicitFunction::AddMeshNode(const std::string& sIdentifier, + const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::Mesh, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CMeshNode(newNode); +} + +IUnsignedMeshNode * CImplicitFunction::AddUnsignedMeshNode(const std::string & sIdentifier, + const std::string & sDisplayName, + const std::string & sTag) +{ + auto newNode = function()->addNode(Lib3MF::eImplicitNodeType::UnsignedMesh, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, + sDisplayName, + sTag); + return new CUnsignedMeshNode(newNode); +} + +IFunctionCallNode* CImplicitFunction::AddFunctionCallNode( + const std::string& sIdentifier, const std::string& sDisplayName, + const std::string& sTag) +{ + auto newNode = + function()->addNode(Lib3MF::eImplicitNodeType::FunctionCall, + Lib3MF::eImplicitNodeConfiguration::Default, + sIdentifier, sDisplayName, sTag); + return new CFunctionCallNode(newNode); +} + +INodeIterator* CImplicitFunction::GetNodes() +{ + return new CNodeIterator(function()->getNodes()); +} + +void CImplicitFunction::RemoveNode(IImplicitNode* pNode) +{ + if(pNode == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + function()->removeNode(pNode->GetIdentifier()); +} + +void CImplicitFunction::AddLink(IImplicitPort* pSource, IImplicitPort* pTarget) +{ + if (pSource == nullptr || pTarget == nullptr) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + CImplicitPort* pSourcePort = dynamic_cast(pSource); + CImplicitPort* pTargetPort = dynamic_cast(pTarget); + + if (pSourcePort == nullptr || pTargetPort == nullptr) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + + function()->addLink(pSourcePort->getPort(), pTargetPort->getPort()); +} + +void CImplicitFunction::AddLinkByNames(const std::string& sSource, + const std::string& sTarget) +{ + function()->addLink(sSource, sTarget); +} + +void CImplicitFunction::Clear() +{ + function()->clear(); +} + +void CImplicitFunction::SortNodesTopologically() +{ + function()->sortNodesTopologically(); +} + diff --git a/Source/API/lib3mf_implicitnode.cpp b/Source/API/lib3mf_implicitnode.cpp new file mode 100644 index 000000000..aa96490c5 --- /dev/null +++ b/Source/API/lib3mf_implicitnode.cpp @@ -0,0 +1,158 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CImplicitNode + +*/ + +#include "lib3mf_implicitnode.hpp" +#include "lib3mf_implicitport.hpp" +#include "lib3mf_implicitportiterator.hpp" +#include "lib3mf_interfaceexception.hpp" +#include "lib3mf_meshobject.hpp" +#include + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CImplicitNode +**************************************************************************************************************************/ + +std::string CImplicitNode::GetIdentifier() +{ + if (!m_pImplicitNode) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + return m_pImplicitNode->getIdentifier(); +} + +void CImplicitNode::SetIdentifier(const std::string & sIdentifier) +{ + m_pImplicitNode->setIdentifier(sIdentifier); +} + +std::string CImplicitNode::GetDisplayName() +{ + return m_pImplicitNode->getDisplayName(); +} + +void CImplicitNode::SetDisplayName(const std::string& sDisplayName) +{ + m_pImplicitNode->setDisplayName(sDisplayName); +} + +std::string CImplicitNode::GetTag() +{ + return m_pImplicitNode->getTag(); +} + +void CImplicitNode::SetTag(const std::string& sTag) +{ + m_pImplicitNode->setTag(sTag); +} + +IImplicitPort* Lib3MF::Impl::CImplicitNode::FindInputOrThrow( + const std::string& sIdentifier) +{ + auto pPort = FindInput(sIdentifier); + if (!pPort) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + return pPort; +} + +IImplicitPort* Lib3MF::Impl::CImplicitNode::FindOutputOrThrow( + const std::string& sIdentifier) +{ + auto pPort = FindOutput(sIdentifier); + if (!pPort) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + return pPort; +} + +CImplicitNode::CImplicitNode(NMR::PModelImplicitNode pImplicitNode) + : m_pImplicitNode{pImplicitNode} +{ +} + +Lib3MF::eImplicitNodeType CImplicitNode::GetNodeType() +{ + return m_pImplicitNode->getNodeType(); +} + +IImplicitPort * CImplicitNode::AddInput(const std::string & sIdentifier, + const std::string & sDisplayName) +{ + return new CImplicitPort(m_pImplicitNode->addInput(sIdentifier, sDisplayName)); +} + +IImplicitPort * CImplicitNode::AddOutput(const std::string & sIdentifier, + const std::string & sDisplayName) +{ + return new CImplicitPort(m_pImplicitNode->addOutput(sIdentifier, sDisplayName)); +} + +IImplicitPortIterator * CImplicitNode::GetOutputs() +{ + return new CImplicitPortIterator(m_pImplicitNode->getOutputs()); +} + +IImplicitPortIterator * CImplicitNode::GetInputs() +{ + return new CImplicitPortIterator(m_pImplicitNode->getInputs()); +} + +IImplicitPort * CImplicitNode::FindInput(const std::string & sIdentifier) +{ + auto pPort = m_pImplicitNode->findInput(sIdentifier); + if (!pPort) + { + return nullptr; + } + return new CImplicitPort(pPort); +} + +IImplicitPort * CImplicitNode::FindOutput(const std::string & sIdentifier) +{ + auto pPort = m_pImplicitNode->findOutput(sIdentifier); + if (!pPort) + { + return nullptr; + } + return new CImplicitPort(pPort); +} + +bool Lib3MF::Impl::CImplicitNode::AreTypesValid() +{ + return m_pImplicitNode->arePortsValid(); +} + diff --git a/Source/API/lib3mf_implicitport.cpp b/Source/API/lib3mf_implicitport.cpp new file mode 100644 index 000000000..184aacf26 --- /dev/null +++ b/Source/API/lib3mf_implicitport.cpp @@ -0,0 +1,91 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CImplicitPort + +*/ + +#include "lib3mf_implicitport.hpp" +#include "lib3mf_interfaceexception.hpp" +#include "lib3mf_types.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CImplicitPort +**************************************************************************************************************************/ + +Lib3MF::Impl::CImplicitPort::CImplicitPort(NMR::PModelImplicitPort pImplicitPort) + : m_pImplicitPort(pImplicitPort) +{ +} + +std::string CImplicitPort::GetIdentifier() +{ + return m_pImplicitPort->getIdentifier(); +} + +void CImplicitPort::SetIdentifier(const std::string & sIdentifier) +{ + m_pImplicitPort->setIdentifier(sIdentifier); +} + +std::string CImplicitPort::GetDisplayName() +{ + return m_pImplicitPort->getDisplayName(); +} + +void CImplicitPort::SetDisplayName(const std::string & sDisplayName) +{ + m_pImplicitPort->setDisplayName(sDisplayName); +} + +void CImplicitPort::SetType(const Lib3MF::eImplicitPortType eType) +{ + m_pImplicitPort->setType(eType); +} + +Lib3MF::eImplicitPortType CImplicitPort::GetType() +{ + return m_pImplicitPort->getType(); +} + +std::string CImplicitPort::GetReference() +{ + return m_pImplicitPort->getReference(); +} + +void CImplicitPort::SetReference(const std::string & sReference) +{ + m_pImplicitPort->setReference(sReference); +} + +NMR::PModelImplicitPort Lib3MF::Impl::CImplicitPort::getPort() +{ + return m_pImplicitPort; +} diff --git a/Source/API/lib3mf_implicitportiterator.cpp b/Source/API/lib3mf_implicitportiterator.cpp new file mode 100644 index 000000000..64f9e98b3 --- /dev/null +++ b/Source/API/lib3mf_implicitportiterator.cpp @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CImplicitPortIterator + +*/ + +#include "lib3mf_implicitportiterator.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. +#include "lib3mf_implicitport.hpp" + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CImplicitPortIterator +**************************************************************************************************************************/ + +Lib3MF::Impl::CImplicitPortIterator::CImplicitPortIterator(NMR::PPorts pPorts) : m_pPorts(pPorts) +{ +} + +Lib3MF_uint64 Lib3MF::Impl::CImplicitPortIterator::Count() +{ + return static_cast(m_pPorts->size()); +} + +IImplicitPort * CImplicitPortIterator::GetCurrent() +{ + throwIfInvalidIndex(); + return new CImplicitPort(m_pPorts->at(static_cast(getCurrentIndex()))); +} + diff --git a/Source/API/lib3mf_inversenode.cpp b/Source/API/lib3mf_inversenode.cpp new file mode 100644 index 000000000..6275b7bae --- /dev/null +++ b/Source/API/lib3mf_inversenode.cpp @@ -0,0 +1,46 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CInverseNode + +*/ + +#include "lib3mf_inversenode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CInverseNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CInverseNode::CInverseNode(NMR::PModelImplicitNode pImplicitNode) +: COneInputNode(std::move(pImplicitNode)) +{ +} diff --git a/Source/API/lib3mf_iterator.cpp b/Source/API/lib3mf_iterator.cpp new file mode 100644 index 000000000..8a4e7e7bb --- /dev/null +++ b/Source/API/lib3mf_iterator.cpp @@ -0,0 +1,86 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CIterator + +*/ + +#include "lib3mf_iterator.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CIterator +**************************************************************************************************************************/ + +bool CIterator::MoveNext() +{ + auto const numItems = static_cast(Count()); + m_nCurrentIndex++; + + if (m_nCurrentIndex >= numItems) + { + m_nCurrentIndex = numItems; + return false; + } + else + { + return true; + } +} + +bool CIterator::MovePrevious() +{ + m_nCurrentIndex--; + if (m_nCurrentIndex <= -1) + { + m_nCurrentIndex = -1; + return false; + } + else + { + return true; + } +} + +Lib3MF_uint64 CIterator::Count() +{ + throw ELib3MFInterfaceException(LIB3MF_ERROR_NOTIMPLEMENTED); +} + +Lib3MF_int64 Lib3MF::Impl::CIterator::getCurrentIndex() +{ + return m_nCurrentIndex; +} + +void Lib3MF::Impl::CIterator::throwIfInvalidIndex() +{ + if ((m_nCurrentIndex < 0) || (m_nCurrentIndex >= static_cast(Count()))) + throw ELib3MFInterfaceException(LIB3MF_ERROR_ITERATORINVALIDINDEX); +} diff --git a/Source/API/lib3mf_lengthnode.cpp b/Source/API/lib3mf_lengthnode.cpp new file mode 100644 index 000000000..94819e54e --- /dev/null +++ b/Source/API/lib3mf_lengthnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CLengthNode + +*/ + +#include "lib3mf_lengthnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CLengthNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CLengthNode::CLengthNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_levelset.cpp b/Source/API/lib3mf_levelset.cpp new file mode 100644 index 000000000..f73d39f5c --- /dev/null +++ b/Source/API/lib3mf_levelset.cpp @@ -0,0 +1,278 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CLevelSet + +*/ + +#include "lib3mf_levelset.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. +#include "lib3mf_meshobject.hpp" +#include "lib3mf_utils.hpp" +#include "lib3mf_function.hpp" +#include "lib3mf_volumedata.hpp" +#include "Model/Classes/NMR_ModelLevelSetObject.h" +#include "Model/Classes/NMR_ModelFunction.h" +#include "Model/Classes/NMR_ModelMeshObject.h" + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CLevelSet +**************************************************************************************************************************/ + + +ILevelSet* CLevelSet::fnCreateLevelSetFromModelResource(NMR::PModelResource pResource, bool bFailIfUnkownClass) { + + if (!pResource.get()) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + + NMR::CModelLevelSetObject * LevelSetObject = dynamic_cast (pResource.get()); + if (LevelSetObject) { + return new CLevelSet(pResource); + } + + if (bFailIfUnkownClass) + throw ELib3MFInterfaceException(NMR_ERROR_UNKNOWNMODELRESOURCE); + + return nullptr; +} + + + +IFunction * CLevelSet::GetFunction() +{ + auto levelSet = levelSetObject(); + auto function = levelSet->getFunction(); + if (!function) + { + return nullptr; + } + return new CFunction(function); +} + +NMR::PModelLevelSetObject +Lib3MF::Impl::CLevelSet::levelSetObject() +{ + NMR::PModelLevelSetObject pLevelSet = std::dynamic_pointer_cast(resource()); + if (pLevelSet.get() == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDOBJECT, "Resource is not a LevelSet Object"); + return pLevelSet; +} + +CLevelSet::CLevelSet(NMR::PModelResource pResource) + : CResource(pResource), CObject(pResource) +{ +} + +void CLevelSet::SetFunction(IFunction* pTheFunction) +{ + if(pTheFunction == nullptr) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + + NMR::CModel* pModel = levelSetObject()->getModel(); + if(pModel == nullptr) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDOBJECT, "LevelSet Object has no Model"); + } + + NMR::PModelFunction pFunction = + std::dynamic_pointer_cast( + pModel->findResource(pTheFunction->GetUniqueResourceID())); + + if(!pFunction) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + levelSetObject()->setFunction(pFunction); +} + +Lib3MF::sTransform CLevelSet::GetTransform() +{ + return MatrixToTransform(levelSetObject()->getTransform()); +} + +void CLevelSet::SetTransform(const Lib3MF::sTransform Transform) +{ + levelSetObject()->setTransform(TransformToMatrix(Transform)); +} + +std::string CLevelSet::GetChannelName() +{ + return levelSetObject()->getChannelName(); +} + +void CLevelSet::SetChannelName(const std::string & sChannelName) +{ + levelSetObject()->setChannelName(sChannelName); +} + +void CLevelSet::SetMinFeatureSize(const Lib3MF_double dMinFeatureSize) +{ + levelSetObject()->setMinFeatureSize(dMinFeatureSize); +} + +Lib3MF_double CLevelSet::GetMinFeatureSize() +{ + return levelSetObject()->getMinFeatureSize(); +} + +void CLevelSet::SetFallBackValue(const Lib3MF_double dFallBackValue) +{ + levelSetObject()->setFallBackValue(dFallBackValue); +} + +Lib3MF_double CLevelSet::GetFallBackValue() +{ + return levelSetObject()->getFallBackValue(); +} + +void CLevelSet::SetMeshBBoxOnly(const bool bMeshBBoxOnly) +{ + levelSetObject()->setMeshBBoxOnly(bMeshBBoxOnly); +} + +bool CLevelSet::GetMeshBBoxOnly() +{ + return levelSetObject()->getMeshBBoxOnly(); +} + +void CLevelSet::SetMesh(IMeshObject* pTheMesh) +{ + if(pTheMesh == nullptr) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + + NMR::CModel* pModel = levelSetObject()->getModel(); + if(pModel == nullptr) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDOBJECT, + "LevelSet Object " + + std::to_string(levelSetObject() + ->getPackageResourceID() + ->getModelResourceID()) + + " has no Model"); + } + + NMR::PModelMeshObject pMesh = + std::dynamic_pointer_cast( + pModel->findResource(pTheMesh->GetUniqueResourceID())); + + if(!pMesh) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDPARAM, + "Referenced Mesh Object not found with resource ID: " + + std::to_string(pTheMesh->GetModelResourceID())); + } + levelSetObject()->setMesh(pMesh); +} + +IMeshObject * CLevelSet::GetMesh() +{ + NMR::PModelMeshObject meshObject = levelSetObject()->getMesh(); + + if(!meshObject) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDOBJECT, + "Referenced Mesh Object of the levelset with the id " + + std::to_string(levelSetObject() + ->getPackageResourceID() + ->getModelResourceID()) + + " could not be found"); + } + + return new CMeshObject(meshObject); +} + +void CLevelSet::SetVolumeData(IVolumeData* pTheVolumeData) +{ + NMR::CModel * pModel = levelSetObject()->getModel(); + if (pModel == nullptr) + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDOBJECT, + "LevelSet Object " + + std::to_string(levelSetObject() + ->getPackageResourceID() + ->getModelResourceID()) + + " has no parent Model"); + + NMR::PModelResource pResource = pModel->findResource(pTheVolumeData->GetResourceID()); + if (pResource == nullptr) + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDOBJECT, + "Referenced VolumeData Resource with ID " + + std::to_string(pTheVolumeData->GetModelResourceID()) + + " not found"); + + NMR::PModelVolumeData pVolumeData = std::dynamic_pointer_cast(pResource); + + if(pVolumeData == nullptr) + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDOBJECT, + "Referenced Resource " + + std::to_string(pTheVolumeData->GetModelResourceID()) + + " by levelset " + + std::to_string(levelSetObject() + ->getPackageResourceID() + ->getModelResourceID()) + + " is not of type VolumeData"); + + levelSetObject()->setVolumeData(pVolumeData); +} + +bool CLevelSet::IsMeshObject() +{ + return false; +} + +bool Lib3MF::Impl::CLevelSet::IsComponentsObject() +{ + return false; +} + +bool CLevelSet::IsLevelSetObject() +{ + return true; +} + +IVolumeData * CLevelSet::GetVolumeData() +{ + NMR::PModelVolumeData pVolumeData = levelSetObject()->getVolumeData(); + if (!pVolumeData) + { + return nullptr; + } + return new CVolumeData(pVolumeData); +} \ No newline at end of file diff --git a/Source/API/lib3mf_levelsetiterator.cpp b/Source/API/lib3mf_levelsetiterator.cpp new file mode 100644 index 000000000..0814f7286 --- /dev/null +++ b/Source/API/lib3mf_levelsetiterator.cpp @@ -0,0 +1,48 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CLevelSetIterator + +*/ + +#include "lib3mf_levelsetiterator.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. +#include "lib3mf_levelset.hpp" + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CLevelSetIterator +**************************************************************************************************************************/ + +ILevelSet * CLevelSetIterator::GetCurrentLevelSet() +{ + return CLevelSet::fnCreateLevelSetFromModelResource(GetCurrentResource(), true); +} + diff --git a/Source/API/lib3mf_log10node.cpp b/Source/API/lib3mf_log10node.cpp new file mode 100644 index 000000000..e69e3485a --- /dev/null +++ b/Source/API/lib3mf_log10node.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CLog10Node + +*/ + +#include "lib3mf_log10node.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CLog10Node +**************************************************************************************************************************/ + +Lib3MF::Impl::CLog10Node::CLog10Node(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_log2node.cpp b/Source/API/lib3mf_log2node.cpp new file mode 100644 index 000000000..c37f0a212 --- /dev/null +++ b/Source/API/lib3mf_log2node.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CLog2Node + +*/ + +#include "lib3mf_log2node.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CLog2Node +**************************************************************************************************************************/ + +Lib3MF::Impl::CLog2Node::CLog2Node(NMR::PModelImplicitNode pImplicitNode) +: COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_lognode.cpp b/Source/API/lib3mf_lognode.cpp new file mode 100644 index 000000000..c20b37a2a --- /dev/null +++ b/Source/API/lib3mf_lognode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CLogNode + +*/ + +#include "lib3mf_lognode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CLogNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CLogNode::CLogNode(NMR::PModelImplicitNode pImplicitNode) +: COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_materialmapping.cpp b/Source/API/lib3mf_materialmapping.cpp new file mode 100644 index 000000000..55a7fe55d --- /dev/null +++ b/Source/API/lib3mf_materialmapping.cpp @@ -0,0 +1,42 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CMaterialMapping + +*/ + +#include "lib3mf_materialmapping.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CMaterialMapping +**************************************************************************************************************************/ + diff --git a/Source/API/lib3mf_matrixfromcolumnsnode.cpp b/Source/API/lib3mf_matrixfromcolumnsnode.cpp new file mode 100644 index 000000000..d9d023ef1 --- /dev/null +++ b/Source/API/lib3mf_matrixfromcolumnsnode.cpp @@ -0,0 +1,73 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CMatrixFromColumnsNode + +*/ + +#include "lib3mf_matrixfromcolumnsnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CMatrixFromColumnsNode +**************************************************************************************************************************/ +CMatrixFromColumnsNode:: + CMatrixFromColumnsNode(NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} + +IImplicitPort * CMatrixFromColumnsNode::GetInputA() +{ + return FindInputOrThrow(NMR::InputNames::A); +} + +IImplicitPort * CMatrixFromColumnsNode::GetInputB() +{ + return FindInputOrThrow(NMR::InputNames::B); +} + +IImplicitPort * CMatrixFromColumnsNode::GetInputC() +{ + return FindInputOrThrow(NMR::InputNames::C); +} + +IImplicitPort * CMatrixFromColumnsNode::GetInputD() +{ + return FindInputOrThrow(NMR::InputNames::D); +} + +IImplicitPort * CMatrixFromColumnsNode::GetOutputResult() +{ + return FindOutputOrThrow(NMR::OutputNames::result); +} + diff --git a/Source/API/lib3mf_matrixfromrowsnode.cpp b/Source/API/lib3mf_matrixfromrowsnode.cpp new file mode 100644 index 000000000..7f34568f9 --- /dev/null +++ b/Source/API/lib3mf_matrixfromrowsnode.cpp @@ -0,0 +1,75 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CMatrixFromRowsNode + +*/ + +#include "lib3mf_matrixfromrowsnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CMatrixFromRowsNode +**************************************************************************************************************************/ + +CMatrixFromRowsNode:: + CMatrixFromRowsNode(NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} + + +IImplicitPort * CMatrixFromRowsNode::GetInputA() +{ + return FindInputOrThrow(NMR::InputNames::A); +} + +IImplicitPort * CMatrixFromRowsNode::GetInputB() +{ + return FindInputOrThrow(NMR::InputNames::B); +} + +IImplicitPort * CMatrixFromRowsNode::GetInputC() +{ + return FindInputOrThrow(NMR::InputNames::C); +} + +IImplicitPort * CMatrixFromRowsNode::GetInputD() +{ + return FindInputOrThrow(NMR::InputNames::D); +} + +IImplicitPort * CMatrixFromRowsNode::GetOutputResult() +{ + return FindOutputOrThrow(NMR::OutputNames::result); +} + diff --git a/Source/API/lib3mf_matvecmultiplicationnode.cpp b/Source/API/lib3mf_matvecmultiplicationnode.cpp new file mode 100644 index 000000000..eb113be93 --- /dev/null +++ b/Source/API/lib3mf_matvecmultiplicationnode.cpp @@ -0,0 +1,48 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CMatVecMultiplicationNode + +*/ + +#include "lib3mf_matvecmultiplicationnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CMatVecMultiplicationNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CMatVecMultiplicationNode::CMatVecMultiplicationNode( + NMR::PModelImplicitNode pImplicitNode) + : CTwoInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_maxnode.cpp b/Source/API/lib3mf_maxnode.cpp new file mode 100644 index 000000000..f93b5e00b --- /dev/null +++ b/Source/API/lib3mf_maxnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CMaxNode + +*/ + +#include "lib3mf_maxnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CMaxNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CMaxNode::CMaxNode(NMR::PModelImplicitNode pImplicitNode) + : CTwoInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_meshnode.cpp b/Source/API/lib3mf_meshnode.cpp new file mode 100644 index 000000000..b919756aa --- /dev/null +++ b/Source/API/lib3mf_meshnode.cpp @@ -0,0 +1,64 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CMeshNode + +*/ + +#include "lib3mf_meshnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CMeshNode +**************************************************************************************************************************/ + +CMeshNode::CMeshNode(NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} + +IImplicitPort * CMeshNode::GetInputMesh() +{ + return FindInputOrThrow(NMR::InputNames::mesh); +} + +IImplicitPort * CMeshNode::GetInputPos() +{ + return FindInputOrThrow(NMR::InputNames::pos); +} + + +IImplicitPort * CMeshNode::GetOutputDistance() +{ + return FindOutputOrThrow(NMR::OutputNames::distance); +} + diff --git a/Source/API/lib3mf_meshobject.cpp b/Source/API/lib3mf_meshobject.cpp index 7c7e4f52c..ca2f92a2d 100644 --- a/Source/API/lib3mf_meshobject.cpp +++ b/Source/API/lib3mf_meshobject.cpp @@ -31,9 +31,12 @@ Abstract: This is a stub class definition of CMeshObject #include "lib3mf_interfaceexception.hpp" #include "lib3mf_beamlattice.hpp" +#include "lib3mf_volumedata.hpp" // Include custom headers here. #include "Common/MeshInformation/NMR_MeshInformation_Properties.h" +#include "Model/Classes/NMR_ModelVolumeData.h" +#include "Model/Classes/NMR_ModelResource.h" #include using namespace Lib3MF::Impl; @@ -379,6 +382,11 @@ bool CMeshObject::IsComponentsObject() return false; } +bool CMeshObject::IsLevelSetObject() +{ + return false; +} + bool CMeshObject::IsValid() { return meshObject()->isValid(); @@ -388,3 +396,32 @@ IBeamLattice* CMeshObject::BeamLattice() { return new CBeamLattice(meshObject(), meshObject()->getBeamLatticeAttributes()); } + +IVolumeData * CMeshObject::GetVolumeData() +{ + auto volumeData = meshObject()->getVolumeData(); + if (!volumeData) + { + return nullptr; + } + return new CVolumeData(std::dynamic_pointer_cast(meshObject()->getVolumeData())); +} + +void CMeshObject::SetVolumeData(IVolumeData* pTheVolumeData) +{ + NMR::CModel * pModel = meshObject()->getModel(); + if (pModel == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDOBJECT); + + NMR::PModelResource pResource = pModel->findResource(pTheVolumeData->GetResourceID()); + + if (pResource == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDOBJECT, "Referenced VolumeData Resource with ID " + std::to_string(pTheVolumeData->GetModelResourceID()) + " not found"); + + NMR::PModelVolumeData pVolumeData = std::dynamic_pointer_cast(pResource); + + if (pVolumeData == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDOBJECT, "Referenced Resource is not of type VolumeData"); + + meshObject()->setVolumeData(pVolumeData); +} \ No newline at end of file diff --git a/Source/API/lib3mf_minnode.cpp b/Source/API/lib3mf_minnode.cpp new file mode 100644 index 000000000..1dce2a395 --- /dev/null +++ b/Source/API/lib3mf_minnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CMinNode + +*/ + +#include "lib3mf_minnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CMinNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CMinNode::CMinNode(NMR::PModelImplicitNode pImplicitNode) +: CTwoInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_model.cpp b/Source/API/lib3mf_model.cpp index 69f57312f..8bffb590f 100644 --- a/Source/API/lib3mf_model.cpp +++ b/Source/API/lib3mf_model.cpp @@ -60,7 +60,15 @@ Abstract: This is a stub class definition of CModel #include "lib3mf_multipropertygroupiterator.hpp" #include "lib3mf_packagepart.hpp" #include "lib3mf_keystore.hpp" - +#include "lib3mf_image3d.hpp" +#include "lib3mf_imagestack.hpp" +#include "lib3mf_image3diterator.hpp" +#include "lib3mf_implicitfunction.hpp" +#include "lib3mf_functioniterator.hpp" +#include "lib3mf_functionfromimage3d.hpp" +#include "lib3mf_volumedata.hpp" +#include "lib3mf_levelset.hpp" +#include "lib3mf_levelsetiterator.hpp" // Include custom headers here. #include "Model/Classes/NMR_ModelMeshObject.h" @@ -69,6 +77,11 @@ Abstract: This is a stub class definition of CModel #include "Model/Classes/NMR_ModelColorGroup.h" #include "Model/Classes/NMR_ModelTexture2DGroup.h" #include "Model/Classes/NMR_ModelMultiPropertyGroup.h" +#include "Model/Classes/NMR_ModelImageStack.h" +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Model/Classes/NMR_ModelFunctionFromImage3D.h" +#include "Model/Classes/NMR_ModelVolumeData.h" +#include "Model/Classes/NMR_ModelLevelSetObject.h" #include "Common/NMR_SecureContentTypes.h" #include "lib3mf_utils.hpp" @@ -84,6 +97,22 @@ CModel::CModel() m_model = std::make_shared(); } +void CModel::mergeModel(NMR::CModel& sourceModel, + NMR::CModel& targetModel) +{ + NMR::UniqueResourceIDMapping oldToNewUniqueResourceIDs; + targetModel.mergeModelAttachments(&sourceModel); + targetModel.mergeTextures2D(&sourceModel, oldToNewUniqueResourceIDs); + targetModel.mergeBaseMaterials(&sourceModel, oldToNewUniqueResourceIDs); + targetModel.mergeColorGroups(&sourceModel, oldToNewUniqueResourceIDs); + targetModel.mergeTexture2DGroups(&sourceModel, oldToNewUniqueResourceIDs); + targetModel.mergeCompositeMaterials(&sourceModel, oldToNewUniqueResourceIDs); + targetModel.mergeMultiPropertyGroups(&sourceModel, oldToNewUniqueResourceIDs); + targetModel.mergeImage3Ds(&sourceModel, oldToNewUniqueResourceIDs); + targetModel.mergeFunctions(&sourceModel, oldToNewUniqueResourceIDs); + targetModel.mergeMetaData(&sourceModel); +} + NMR::CModel& CModel::model() { return *m_model; @@ -131,6 +160,31 @@ IResource* CModel::createIResourceFromModelResource(NMR::PModelResource pResourc return new CSliceStack(p); } + if (auto p = std::dynamic_pointer_cast(pResource)) { + return new CImageStack(p); + } + if (auto p = std::dynamic_pointer_cast(pResource)) { + return new CImage3D(p); + } + + if (auto p= std::dynamic_pointer_cast(pResource)) { + return new CImplicitFunction(p); + } + + if(auto p = std::dynamic_pointer_cast( + pResource)) + { + return new CFunctionFromImage3D(p); + } + + if (auto p = std::dynamic_pointer_cast(pResource)) { + return new CVolumeData(p); + } + + if (auto p = std::dynamic_pointer_cast(pResource)) { + return new CLevelSet(p); + } + if (bFailIfUnkownClass) throw ELib3MFInterfaceException(NMR_ERROR_UNKNOWNMODELRESOURCE); @@ -280,6 +334,17 @@ ISliceStack * CModel::GetSliceStackByID(const Lib3MF_uint32 nUniqueResourceID) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDSLICESTACKRESOURCE); } +ILevelSet* CModel::GetLevelSetByID(const Lib3MF_uint32 nUniqueResourceID) +{ + NMR::PModelResource pResource = model().findResource(nUniqueResourceID); + if (dynamic_cast(pResource.get())) { + return new CLevelSet(std::dynamic_pointer_cast(pResource)); + } + else + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDLEVELSET); + +} + ITexture2DGroup * CModel::GetTexture2DGroupByID(const Lib3MF_uint32 nUniqueResourceID) { NMR::PModelResource pResource = model().findResource(nUniqueResourceID); @@ -499,6 +564,9 @@ IModel * CModel::MergeToModel () newModel.mergeTexture2DGroups(&model(), oldToNewUniqueResourceIDs); newModel.mergeCompositeMaterials(&model(), oldToNewUniqueResourceIDs); newModel.mergeMultiPropertyGroups(&model(), oldToNewUniqueResourceIDs); + newModel.mergeImage3Ds(&model(), oldToNewUniqueResourceIDs); + newModel.mergeFunctions(&model(), oldToNewUniqueResourceIDs); + newModel.mergeMetaData(&model()); pMesh->patchMeshInformationResources(oldToNewUniqueResourceIDs); @@ -515,6 +583,15 @@ IModel * CModel::MergeToModel () return pOutModel.release(); } +void CModel::MergeFromModel(IModel* pModelInstance) +{ + CModel* pLib3MFModel = dynamic_cast (pModelInstance); + if (!pLib3MFModel) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + + mergeModel(pLib3MFModel->model(), model()); +} + IMeshObject * CModel::AddMeshObject () { NMR::ModelResourceID NewResourceID = model().generateResourceID(); @@ -744,11 +821,43 @@ Lib3MF::sBox CModel::GetOutbox() return s; } -IKeyStore * Lib3MF::Impl::CModel::GetKeyStore() { +IImageStack * CModel::AddImageStack(const Lib3MF_uint32 nSizeX, const Lib3MF_uint32 nSizeY, const Lib3MF_uint32 nSheetCount) +{ + NMR::PModelImageStack pResource = NMR::CModelImageStack::make(model().generateResourceID(), &model(), nSizeX, nSizeY, nSheetCount); + model().addResource(pResource); + + return new CImageStack(pResource); +} + +IImageStack* CModel::GetImageStackByID(const Lib3MF_uint32 nUniqueResourceID) +{ + NMR::PModelImageStack pImageStackResource = model().findImageStack(nUniqueResourceID); + if (pImageStackResource) { + return new CImageStack(pImageStackResource); + } + else + throw ELib3MFInterfaceException(LIB3MF_ERROR_RESOURCENOTFOUND); +} + +IImage3DIterator * CModel::GetImage3Ds() +{ + auto pResult = std::unique_ptr(new CImage3DIterator()); + Lib3MF_uint32 nImage3DCount = model().getImage3DCount(); + + for (Lib3MF_uint32 nIdx = 0; nIdx < nImage3DCount; nIdx++) { + auto resource = model().getImage3DResource(nIdx); + pResult->addResource(resource); + } + return pResult.release(); +} + +IKeyStore * Lib3MF::Impl::CModel::GetKeyStore() +{ return new CKeyStore(m_model); } -void Lib3MF::Impl::CModel::SetRandomNumberCallback(Lib3MF::RandomNumberCallback pTheCallback, Lib3MF_pvoid pUserData) { +void Lib3MF::Impl::CModel::SetRandomNumberCallback(Lib3MF::RandomNumberCallback pTheCallback, Lib3MF_pvoid pUserData) +{ if (nullptr == pTheCallback) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); NMR::CryptoRandGenDescriptor descriptor; @@ -764,3 +873,76 @@ void Lib3MF::Impl::CModel::SetRandomNumberCallback(Lib3MF::RandomNumberCallback m_model->setCryptoRandCallback(descriptor); } +IFunctionIterator * CModel::GetFunctions() +{ + auto pResult = std::unique_ptr(new CFunctionIterator()); + Lib3MF_uint32 nFunctionCount = model().getFunctionCount(); + + for (Lib3MF_uint32 nIdx = 0; nIdx < nFunctionCount; nIdx++) { + auto resource = model().getFunctionResource(nIdx); + pResult->addResource(resource); + } + return pResult.release(); +} + +IImplicitFunction* CModel::AddImplicitFunction() +{ + NMR::ModelResourceID NewResourceID = model().generateResourceID(); + NMR::PModelImplicitFunction pNewResource = std::make_shared(NewResourceID, &model()); + + model().addResource(pNewResource); + + return new CImplicitFunction(pNewResource); +} + +IFunctionFromImage3D* CModel::AddFunctionFromImage3D(IImage3D* pImage3DInstance) +{ + NMR::ModelResourceID NewResourceID = model().generateResourceID(); + NMR::PModelFunctionFromImage3D pNewResource = std::make_shared(NewResourceID, &model()); + pNewResource->setImage3DUniqueResourceID(pImage3DInstance->GetUniqueResourceID()); + model().addResource(pNewResource); + auto newFunc = new CFunctionFromImage3D(pNewResource); + return newFunc; +} + + +IVolumeData * CModel::AddVolumeData() +{ + NMR::ModelResourceID NewResourceID = model().generateResourceID(); + NMR::PModelVolumeData pNewResource = std::make_shared(NewResourceID, &model()); + + model().addResource(pNewResource); + + return new CVolumeData(pNewResource); +} + +ILevelSet* CModel::AddLevelSet() +{ + NMR::ModelResourceID NewResourceID = model().generateResourceID(); + NMR::PModelLevelSetObject pNewResource = std::make_shared(NewResourceID, &model()); + + model().addResource(pNewResource); + + return new CLevelSet(pNewResource); +} + +ILevelSetIterator * CModel::GetLevelSets() +{ + auto pResult = std::unique_ptr(new CLevelSetIterator()); + Lib3MF_uint32 nObjectsCount = model().getObjectCount(); + + for (Lib3MF_uint32 nIdx = 0; nIdx < nObjectsCount; nIdx++) { + auto resource = model().getObjectResource(nIdx); + if (dynamic_cast(resource.get())) + pResult->addResource(resource); + } + return pResult.release(); +} + +void CModel::RemoveResource(IResource* pResource) +{ + CResource* pLib3MFResource = dynamic_cast (pResource); + if (!pLib3MFResource) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDRESOURCE); + model().removeResource(pLib3MFResource->resource()); +} diff --git a/Source/API/lib3mf_modnode.cpp b/Source/API/lib3mf_modnode.cpp new file mode 100644 index 000000000..bc59edb53 --- /dev/null +++ b/Source/API/lib3mf_modnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2024 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CModNode + +*/ + +#include "lib3mf_modnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CModNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CModNode::CModNode(NMR::PModelImplicitNode pImplicitNode) + : CTwoInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_multiplicationnode.cpp b/Source/API/lib3mf_multiplicationnode.cpp new file mode 100644 index 000000000..3004465df --- /dev/null +++ b/Source/API/lib3mf_multiplicationnode.cpp @@ -0,0 +1,48 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CMultiplicationNode + +*/ + +#include "lib3mf_multiplicationnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CMultiplicationNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CMultiplicationNode::CMultiplicationNode( + NMR::PModelImplicitNode pImplicitNode) + : CTwoInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_nodeiterator.cpp b/Source/API/lib3mf_nodeiterator.cpp new file mode 100644 index 000000000..52b994214 --- /dev/null +++ b/Source/API/lib3mf_nodeiterator.cpp @@ -0,0 +1,281 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CNodeIterator + +*/ + +#include "lib3mf_nodeiterator.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. +#include "lib3mf_absnode.hpp" +#include "lib3mf_additionnode.hpp" +#include "lib3mf_arccosnode.hpp" +#include "lib3mf_arcsinnode.hpp" +#include "lib3mf_arctan2node.hpp" +#include "lib3mf_arctannode.hpp" +#include "lib3mf_ceilnode.hpp" +#include "lib3mf_clampnode.hpp" +#include "lib3mf_composematrixnode.hpp" +#include "lib3mf_composevectornode.hpp" +#include "lib3mf_constantnode.hpp" +#include "lib3mf_constmatnode.hpp" +#include "lib3mf_constvecnode.hpp" +#include "lib3mf_coshnode.hpp" +#include "lib3mf_cosnode.hpp" +#include "lib3mf_crossnode.hpp" +#include "lib3mf_decomposevectornode.hpp" +#include "lib3mf_divisionnode.hpp" +#include "lib3mf_dotnode.hpp" +#include "lib3mf_expnode.hpp" +#include "lib3mf_floornode.hpp" +#include "lib3mf_fmodnode.hpp" +#include "lib3mf_fractnode.hpp" +#include "lib3mf_functioncallnode.hpp" +#include "lib3mf_inversenode.hpp" +#include "lib3mf_lengthnode.hpp" +#include "lib3mf_log10node.hpp" +#include "lib3mf_log2node.hpp" +#include "lib3mf_lognode.hpp" +#include "lib3mf_matrixfromcolumnsnode.hpp" +#include "lib3mf_matrixfromrowsnode.hpp" +#include "lib3mf_matvecmultiplicationnode.hpp" +#include "lib3mf_maxnode.hpp" +#include "lib3mf_meshnode.hpp" +#include "lib3mf_minnode.hpp" +#include "lib3mf_multiplicationnode.hpp" +#include "lib3mf_pownode.hpp" +#include "lib3mf_resourceidnode.hpp" +#include "lib3mf_roundnode.hpp" +#include "lib3mf_selectnode.hpp" +#include "lib3mf_signnode.hpp" +#include "lib3mf_sinhnode.hpp" +#include "lib3mf_sinnode.hpp" +#include "lib3mf_sqrtnode.hpp" +#include "lib3mf_subtractionnode.hpp" +#include "lib3mf_tanhnode.hpp" +#include "lib3mf_tannode.hpp" +#include "lib3mf_transposenode.hpp" +#include "lib3mf_unsignedmeshnode.hpp" +#include "lib3mf_vectorfromscalarnode.hpp" +#include "lib3mf_modnode.hpp" + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CNodeIterator +**************************************************************************************************************************/ + +IImplicitNode * CNodeIterator::GetCurrent() +{ + throwIfInvalidIndex(); + auto pModelNode = m_pNodes->at(static_cast(getCurrentIndex())); + auto pNode = implicitNodeFromModelImplicitNode(pModelNode); + if (!pNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + return pNode; +} + +// enum class eImplicitNodeType : Lib3MF_int32 { +// Addition = 1, /** Adds to values (scalar or vector) */ +// Subtraction = 2, /** Subtracts two values (scalar or vector) */ +// Multiplication = 3, /** Multiplies two values (scalar or vector) */ +// Division = 4, /** Divides two values (scalar or vector) */ +// Constant = 5, /** A constant scalar value */ +// ConstVec = 6, /** A constant vector value */ +// ConstMat = 7, /** A constant matrix value */ +// ComposeVector = 8, /** Creates a vector from three scalar values */ +// DecomposeVector = 9, /** Decomposes a vector into three scalar values */ +// ComposeMatrix = 10, /** Creates a matrix from nine scalar values */ +// ComposeMatrixFromColumnVectors = 11, /** Creates a matrix from three column vector values */ +// ComposeMatrixFromRowVectors = 12, /** Creates a matrix from three row vector values */ +// Dot = 13, /** Calculates the dot product of two vector values */ +// Cross = 14, /** Calculates the cross product of two vector values */ +// MatVecMultiplication = 15, /** Multiplies a matrix with a vector */ +// Transpose = 16, /** Transposes a matrix */ +// Inverse = 17, /** Computes the inverse of a matrix */ +// Sinus = 18, /** Calculates the sinus */ +// Cosinus = 19, /** Calculates the cosinus */ +// Tan = 20, /** Calculates the tangent */ +// ArcSin = 21, /** Calculates the arcsinus */ +// ArcCos = 22, /** Calculates the arccosinus */ +// ArcTan = 23, /** Calculates the arctangent */ +// ArcTan2 = 24, /** Calculates the arctangent */ +// Min = 25, /** Calculates the minimum tow values */ +// Max = 26, /** Calculates the maximum of two values */ +// Abs = 27, /** Calcul the absolute value */ +// Fmod = 28, /** Calculates the modulo of two values */ +// Pow = 29, /** Calculates the power A^B */ +// Sqrt = 30, /** Calculates the square root */ +// Exp = 31, /** Exponential function */ +// Log = 32, /** Natural logarithmus */ +// Log2 = 33, /** Logarithmus to the base 2 */ +// Log10 = 34, /** Logarithmus to the base 10 */ +// Select = 35, /** If A is less B returns C, else D */ +// Clamp = 36, /** Clamps the input value to min and max */ +// Sinh = 37, /** Calculates the hyperbolic sine */ +// Cosh = 38, /** Calculates the hyperbolic cosine */ +// Tanh = 39, /** Calculates the hyperbolic tangent */ +// Round = 40, /** Rounds a scalar value to the nearest integer */ +// Ceil = 41, /** Rounds a scalar value up to the nearest integer */ +// Floor = 42, /** Rounds a scalar value down to the nearest integer */ +// Sign = 43, /** Returns the sign */ +// Fract = 44, /** Returns the fractional part */ +// FunctionCall = 45, /** Calls a function */ +// Mesh = 46, /** Calculates the signed distance to a mesh */ +// Length = 47, /** Calculates the length of a vector */ +// Resource = 48 /** Selects a resource (function, mesh etc.) */ +// }; + +IImplicitNode* Lib3MF::Impl::CNodeIterator::implicitNodeFromModelImplicitNode( + NMR::PModelImplicitNode pNode) +{ + if (!pNode) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + + + switch (pNode->getNodeType()) + { + case eImplicitNodeType::Addition: + return new CAdditionNode(pNode); + case eImplicitNodeType::Subtraction: + return new CSubtractionNode(pNode); + case eImplicitNodeType::Multiplication: + return new CMultiplicationNode(pNode); + case eImplicitNodeType::Division: + return new CDivisionNode(pNode); + case eImplicitNodeType::Constant: + return new CConstantNode(pNode); + case eImplicitNodeType::ConstVec: + return new CConstVecNode(pNode); + case eImplicitNodeType::ConstMat: + return new CConstMatNode(pNode); + case eImplicitNodeType::ComposeVector: + return new CComposeVectorNode(pNode); + case eImplicitNodeType::VectorFromScalar: + return new CVectorFromScalarNode(pNode); + case eImplicitNodeType::DecomposeVector: + return new CDecomposeVectorNode(pNode); + case eImplicitNodeType::ComposeMatrix: + return new CComposeMatrixNode(pNode); + case eImplicitNodeType::MatrixFromColumns: + return new CMatrixFromColumnsNode(pNode); + case eImplicitNodeType::MatrixFromRows: + return new CMatrixFromRowsNode(pNode); + case eImplicitNodeType::Dot: + return new CDotNode(pNode); + case eImplicitNodeType::Cross: + return new CCrossNode(pNode); + case eImplicitNodeType::MatVecMultiplication: + return new CMatVecMultiplicationNode(pNode); + case eImplicitNodeType::Transpose: + return new CTransposeNode(pNode); + case eImplicitNodeType::Inverse: + return new CInverseNode(pNode); + case eImplicitNodeType::Sinus: + return new CSinNode(pNode); + case eImplicitNodeType::Cosinus: + return new CCosNode(pNode); + case eImplicitNodeType::Tan: + return new CTanNode(pNode); + case eImplicitNodeType::ArcSin: + return new CArcSinNode(pNode); + case eImplicitNodeType::ArcCos: + return new CArcCosNode(pNode); + case eImplicitNodeType::ArcTan: + return new CArcTanNode(pNode); + case eImplicitNodeType::ArcTan2: + return new CArcTan2Node(pNode); + case eImplicitNodeType::Min: + return new CMinNode(pNode); + case eImplicitNodeType::Max: + return new CMaxNode(pNode); + case eImplicitNodeType::Abs: + return new CAbsNode(pNode); + case eImplicitNodeType::Fmod: + return new CFmodNode(pNode); + case eImplicitNodeType::Pow: + return new CPowNode(pNode); + case eImplicitNodeType::Sqrt: + return new CSqrtNode(pNode); + case eImplicitNodeType::Exp: + return new CExpNode(pNode); + case eImplicitNodeType::Log: + return new CLogNode(pNode); + case eImplicitNodeType::Log2: + return new CLog2Node(pNode); + case eImplicitNodeType::Log10: + return new CLog10Node(pNode); + case eImplicitNodeType::Select: + return new CSelectNode(pNode); + case eImplicitNodeType::Clamp: + return new CClampNode(pNode); + case eImplicitNodeType::Sinh: + return new CSinhNode(pNode); + case eImplicitNodeType::Cosh: + return new CCoshNode(pNode); + case eImplicitNodeType::Tanh: + return new CTanhNode(pNode); + case eImplicitNodeType::Round: + return new CRoundNode(pNode); + case eImplicitNodeType::Ceil: + return new CCeilNode(pNode); + case eImplicitNodeType::Floor: + return new CFloorNode(pNode); + case eImplicitNodeType::Sign: + return new CSignNode(pNode); + case eImplicitNodeType::Fract: + return new CFractNode(pNode); + case eImplicitNodeType::FunctionCall: + return new CFunctionCallNode(pNode); + case eImplicitNodeType::Mesh: + return new CMeshNode(pNode); + case eImplicitNodeType::UnsignedMesh: + return new CUnsignedMeshNode(pNode); + case eImplicitNodeType::Length: + return new CLengthNode(pNode); + case eImplicitNodeType::ConstResourceID: + return new CResourceIdNode(pNode); + case eImplicitNodeType::Mod: + return new CModNode(pNode); + + default: + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + +} + +Lib3MF::Impl::CNodeIterator::CNodeIterator(NMR::PImplicitNodes pNodes) + : m_pNodes(pNodes) +{ +} + +Lib3MF_uint64 Lib3MF::Impl::CNodeIterator::Count() +{ + return static_cast(m_pNodes->size()); +} diff --git a/Source/API/lib3mf_object.cpp b/Source/API/lib3mf_object.cpp index aa87cecd7..12ef901c5 100644 --- a/Source/API/lib3mf_object.cpp +++ b/Source/API/lib3mf_object.cpp @@ -32,6 +32,7 @@ Abstract: This is a stub class definition of CObject #include "lib3mf_interfaceexception.hpp" #include "lib3mf_meshobject.hpp" +#include "lib3mf_levelset.hpp" #include "lib3mf_componentsobject.hpp" #include "lib3mf_metadatagroup.hpp" #include "lib3mf_slicestack.hpp" @@ -39,6 +40,7 @@ Abstract: This is a stub class definition of CObject // Include custom headers here. #include "Model/Classes/NMR_ModelMeshObject.h" +#include "Model/Classes/NMR_ModelLevelSetObject.h" #include "Model/Classes/NMR_ModelComponentsObject.h" using namespace Lib3MF::Impl; @@ -65,6 +67,11 @@ IObject* CObject::fnCreateObjectFromModelResource(NMR::PModelResource pResource, return new CMeshObject(pResource); } + NMR::CModelLevelSetObject * PILevelSet = dynamic_cast (pResource.get()); + if (PILevelSet) { + return new CLevelSet(pResource); + } + NMR::CModelComponentsObject * pComponentsResource = dynamic_cast (pResource.get()); if (pComponentsResource) { return new CComponentsObject(pResource); @@ -124,6 +131,13 @@ bool CObject::IsComponentsObject () throw ELib3MFInterfaceException(LIB3MF_ERROR_SHOULDNOTBECALLED); } +bool CObject::IsLevelSetObject() +{ + // overwritten by child class + throw ELib3MFInterfaceException(LIB3MF_ERROR_SHOULDNOTBECALLED); +} + + IMeshObject * CObject::AsMeshObject() { if (dynamic_cast(resource().get())) diff --git a/Source/API/lib3mf_oneinputnode.cpp b/Source/API/lib3mf_oneinputnode.cpp new file mode 100644 index 000000000..94bcc4d89 --- /dev/null +++ b/Source/API/lib3mf_oneinputnode.cpp @@ -0,0 +1,57 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of COneInputNode + +*/ + +#include "lib3mf_oneinputnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of COneInputNode +**************************************************************************************************************************/ + +IImplicitPort * COneInputNode::GetInputA() +{ + return FindInputOrThrow(NMR::InputNames::A); +} + +IImplicitPort * COneInputNode::GetOutputResult() +{ + return FindOutputOrThrow(NMR::OutputNames::result); +} + +COneInputNode::COneInputNode( + NMR::PModelImplicitNode pImplicitNode) : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_pownode.cpp b/Source/API/lib3mf_pownode.cpp new file mode 100644 index 000000000..28716b148 --- /dev/null +++ b/Source/API/lib3mf_pownode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CPowNode + +*/ + +#include "lib3mf_pownode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CPowNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CPowNode::CPowNode(NMR::PModelImplicitNode pImplicitNode) + : CTwoInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_resource.cpp b/Source/API/lib3mf_resource.cpp index d06de188c..d05afdda8 100644 --- a/Source/API/lib3mf_resource.cpp +++ b/Source/API/lib3mf_resource.cpp @@ -46,12 +46,24 @@ using namespace Lib3MF::Impl; NMR::PModelResource CResource::resource() { - if (m_pResource.get()==nullptr) + if (m_pResource.get() == nullptr) throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDOBJECT); return m_pResource; } +NMR::CModel* CResource::model() +{ + if (m_pResource.get() == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDOBJECT); + + + if (m_pResource->getModel() == nullptr) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDMODEL); + + return m_pResource->getModel(); +} + CResource::CResource(NMR::PModelResource pResource) { if (pResource.get() == nullptr) diff --git a/Source/API/lib3mf_resourceidnode.cpp b/Source/API/lib3mf_resourceidnode.cpp new file mode 100644 index 000000000..8d7ac3cd4 --- /dev/null +++ b/Source/API/lib3mf_resourceidnode.cpp @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CResourceIdNode + +*/ + +#include "lib3mf_resourceidnode.hpp" +#include "lib3mf_interfaceexception.hpp" +#include "lib3mf_resource.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CResourceIdNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CResourceIdNode::CResourceIdNode( + NMR::PModelImplicitNode pImplicitNode) : CImplicitNode(std::move(pImplicitNode)) +{ +} + +void CResourceIdNode::SetResource(IResource* pResource) +{ + m_pImplicitNode->setModelResourceID(pResource->GetModelResourceID()); +} + +IResource * CResourceIdNode::GetResource() +{ + return new CResource(m_pImplicitNode->getResource()); +} + +IImplicitPort * CResourceIdNode::GetOutputValue() +{ + return FindOutputOrThrow(NMR::OutputNames::value); +} + diff --git a/Source/API/lib3mf_roundnode.cpp b/Source/API/lib3mf_roundnode.cpp new file mode 100644 index 000000000..fcff1e87f --- /dev/null +++ b/Source/API/lib3mf_roundnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CRoundNode + +*/ + +#include "lib3mf_roundnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CRoundNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CRoundNode::CRoundNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_selectnode.cpp b/Source/API/lib3mf_selectnode.cpp new file mode 100644 index 000000000..1c251135f --- /dev/null +++ b/Source/API/lib3mf_selectnode.cpp @@ -0,0 +1,62 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CSelectNode + +*/ + +#include "lib3mf_selectnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CSelectNode +**************************************************************************************************************************/ + +IImplicitPort * CSelectNode::GetInputB() +{ + return FindInputOrThrow(NMR::InputNames::B); +} + +IImplicitPort * CSelectNode::GetInputC() +{ + return FindInputOrThrow(NMR::InputNames::C); +} + +IImplicitPort * CSelectNode::GetInputD() +{ + return FindInputOrThrow(NMR::InputNames::D); +} + +Lib3MF::Impl::CSelectNode::CSelectNode(NMR::PModelImplicitNode pImplicitNode) +: COneInputNode{pImplicitNode} + { + CImplicitNode::m_pImplicitNode = pImplicitNode; + } diff --git a/Source/API/lib3mf_signnode.cpp b/Source/API/lib3mf_signnode.cpp new file mode 100644 index 000000000..5d9a72f9a --- /dev/null +++ b/Source/API/lib3mf_signnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CSignNode + +*/ + +#include "lib3mf_signnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CSignNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CSignNode::CSignNode(NMR::PModelImplicitNode pImplicitNode) +: COneInputNode{pImplicitNode} + { + CImplicitNode::m_pImplicitNode = pImplicitNode; + } diff --git a/Source/API/lib3mf_sinhnode.cpp b/Source/API/lib3mf_sinhnode.cpp new file mode 100644 index 000000000..4c8011dd4 --- /dev/null +++ b/Source/API/lib3mf_sinhnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CSinhNode + +*/ + +#include "lib3mf_sinhnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CSinhNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CSinhNode::CSinhNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_sinnode.cpp b/Source/API/lib3mf_sinnode.cpp new file mode 100644 index 000000000..ac3f2f77e --- /dev/null +++ b/Source/API/lib3mf_sinnode.cpp @@ -0,0 +1,48 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CSinNode + +*/ + +#include "lib3mf_sinnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. +#include "lib3mf_oneinputnode.hpp" + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CSinNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CSinNode::CSinNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} + diff --git a/Source/API/lib3mf_sqrtnode.cpp b/Source/API/lib3mf_sqrtnode.cpp new file mode 100644 index 000000000..d3e70daf2 --- /dev/null +++ b/Source/API/lib3mf_sqrtnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CSqrtNode + +*/ + +#include "lib3mf_sqrtnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CSqrtNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CSqrtNode::CSqrtNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_subtractionnode.cpp b/Source/API/lib3mf_subtractionnode.cpp new file mode 100644 index 000000000..63333a8b5 --- /dev/null +++ b/Source/API/lib3mf_subtractionnode.cpp @@ -0,0 +1,48 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CSubtractionNode + +*/ + +#include "lib3mf_subtractionnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CSubtractionNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CSubtractionNode::CSubtractionNode( + NMR::PModelImplicitNode pImplicitNode) + : CTwoInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_tanhnode.cpp b/Source/API/lib3mf_tanhnode.cpp new file mode 100644 index 000000000..7d78e0e9d --- /dev/null +++ b/Source/API/lib3mf_tanhnode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CTanhNode + +*/ + +#include "lib3mf_tanhnode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CTanhNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CTanhNode::CTanhNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_tannode.cpp b/Source/API/lib3mf_tannode.cpp new file mode 100644 index 000000000..d9b29e819 --- /dev/null +++ b/Source/API/lib3mf_tannode.cpp @@ -0,0 +1,47 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CTanNode + +*/ + +#include "lib3mf_tannode.hpp" + +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CTanNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CTanNode::CTanNode(NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_transposenode.cpp b/Source/API/lib3mf_transposenode.cpp new file mode 100644 index 000000000..ae4705ea5 --- /dev/null +++ b/Source/API/lib3mf_transposenode.cpp @@ -0,0 +1,48 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CTransposeNode + +*/ + +#include "lib3mf_transposenode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CTransposeNode +**************************************************************************************************************************/ + +Lib3MF::Impl::CTransposeNode::CTransposeNode( + NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_twoinputnode.cpp b/Source/API/lib3mf_twoinputnode.cpp new file mode 100644 index 000000000..ae97e136d --- /dev/null +++ b/Source/API/lib3mf_twoinputnode.cpp @@ -0,0 +1,54 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CTwoInputNode + +*/ + +#include "lib3mf_twoinputnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CTwoInputNode +**************************************************************************************************************************/ + +IImplicitPort * CTwoInputNode::GetInputB() +{ + return FindInput("B"); +} + + +Lib3MF::Impl::CTwoInputNode::CTwoInputNode( + NMR::PModelImplicitNode pImplicitNode) + : COneInputNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_unsignedmeshnode.cpp b/Source/API/lib3mf_unsignedmeshnode.cpp new file mode 100644 index 000000000..6d0f9a935 --- /dev/null +++ b/Source/API/lib3mf_unsignedmeshnode.cpp @@ -0,0 +1,63 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CUnsignedMeshNode + +*/ + +#include "lib3mf_unsignedmeshnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CUnsignedMeshNode +**************************************************************************************************************************/ +CUnsignedMeshNode:: + CUnsignedMeshNode(NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} + +IImplicitPort * CUnsignedMeshNode::GetInputMesh() +{ + return FindInputOrThrow(NMR::InputNames::mesh); +} + +IImplicitPort * CUnsignedMeshNode::GetInputPos() +{ + return FindInputOrThrow(NMR::InputNames::pos); +} + +IImplicitPort * CUnsignedMeshNode::GetOutputDistance() +{ + return FindOutputOrThrow(NMR::OutputNames::distance); +} + diff --git a/Source/API/lib3mf_utils.cpp b/Source/API/lib3mf_utils.cpp index c58611bdf..b58e01d05 100644 --- a/Source/API/lib3mf_utils.cpp +++ b/Source/API/lib3mf_utils.cpp @@ -57,7 +57,6 @@ sLib3MFTransform Lib3MF::MatrixToTransform(const NMR::NMATRIX3 matrix) return transform; } - eLib3MFEncryptionAlgorithm Lib3MF::translateEncryptionAlgorithm(const NMR::eKeyStoreEncryptAlgorithm algorithm) { if (NMR::eKeyStoreEncryptAlgorithm::AES256_GCM == algorithm) return eLib3MFEncryptionAlgorithm::AES256_GCM; @@ -80,8 +79,6 @@ NMR::eKeyStoreWrapAlgorithm Lib3MF::translateWrappingAlgorithm(const eLib3MFWrap throw ELib3MFInterfaceException(LIB3MF_ERROR_NOTIMPLEMENTED); } - - eLib3MFCompression Lib3MF::translateCompression(bool compression) { if (compression) return eLib3MFCompression::Deflate; @@ -90,4 +87,4 @@ eLib3MFCompression Lib3MF::translateCompression(bool compression) { bool Lib3MF::translateCompression(const eLib3MFCompression compression) { return eLib3MFCompression::Deflate == compression; -} \ No newline at end of file +} diff --git a/Source/API/lib3mf_vectorfromscalarnode.cpp b/Source/API/lib3mf_vectorfromscalarnode.cpp new file mode 100644 index 000000000..2f313a755 --- /dev/null +++ b/Source/API/lib3mf_vectorfromscalarnode.cpp @@ -0,0 +1,48 @@ +/*++ + +Copyright (C) 2023 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CVectorFromScalarNode + +*/ + +#include "lib3mf_vectorfromscalarnode.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CVectorFromScalarNode +**************************************************************************************************************************/ + +CVectorFromScalarNode:: + CVectorFromScalarNode(NMR::PModelImplicitNode pImplicitNode) + : CImplicitNode{pImplicitNode} +{ + CImplicitNode::m_pImplicitNode = pImplicitNode; +} diff --git a/Source/API/lib3mf_volumedata.cpp b/Source/API/lib3mf_volumedata.cpp new file mode 100644 index 000000000..adac4da5c --- /dev/null +++ b/Source/API/lib3mf_volumedata.cpp @@ -0,0 +1,161 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CVolumeData + +*/ + +#include "lib3mf_volumedata.hpp" +#include "lib3mf_interfaceexception.hpp" + +#include "lib3mf_volumedataproperty.hpp" +#include "lib3mf_volumedatacolor.hpp" +#include "lib3mf_volumedatacomposite.hpp" + +// Include custom headers here. +#include "Model/Classes/NMR_ModelMeshObject.h" +#include "Model/Classes/NMR_ModelResource.h" +#include "Model/Classes/NMR_ModelFunction.h" + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CVolumeData +**************************************************************************************************************************/ + + +CVolumeData::CVolumeData(NMR::PModelResource pResource) + : CResource(pResource) +{ + if (!pResource.get()) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + + m_pVolumeData = std::dynamic_pointer_cast(pResource); + if (!m_pVolumeData) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); +} + + +IVolumeDataComposite * CVolumeData::GetComposite() +{ + auto pComposite = m_pVolumeData->getComposite(); + if (!pComposite) { + return nullptr; + } + return new CVolumeDataComposite(pComposite); +} + +IVolumeDataComposite * CVolumeData::CreateNewComposite() +{ + auto pComposite = m_pVolumeData->createComposite(); + if (!pComposite) { + return nullptr; + } + return new CVolumeDataComposite(pComposite); +} + +void CVolumeData::RemoveComposite() +{ + m_pVolumeData->removeComposite(); +} + +IVolumeDataColor * CVolumeData::GetColor() +{ + auto pColor = m_pVolumeData->getColor(); + if (!pColor) { + return nullptr; + } + return new CVolumeDataColor(pColor); +} + +void CVolumeData::RemoveColor() +{ + m_pVolumeData->removeColor(); +} + +Lib3MF_uint32 CVolumeData::GetPropertyCount() +{ + return m_pVolumeData->getPropertyCount(); +} + +IVolumeDataProperty * CVolumeData::GetProperty(const Lib3MF_uint32 nIndex) +{ + NMR::PVolumeDataProperty pProperty = m_pVolumeData->getProperty(nIndex); + if (!pProperty) { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + return new CVolumeDataProperty(pProperty); +} + +void CVolumeData::RemoveProperty(const Lib3MF_uint32 nIndex) +{ + auto pProperty = m_pVolumeData->getProperty(nIndex); + if (!pProperty) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + m_pVolumeData->removeProperty(pProperty->getName()); +} + + +IVolumeDataColor* Lib3MF::Impl::CVolumeData::CreateNewColor( + IFunction* pTheFunction) +{ + NMR::CModel* pModel = m_pVolumeData->getModel(); + + NMR::PModelResource pResource = pModel->findResource(pTheFunction->GetUniqueResourceID()); + NMR::PModelFunction pFunction = std::dynamic_pointer_cast(pResource); + + if (!pFunction) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + + NMR::PVolumeDataColor pColor = m_pVolumeData->createColor(pFunction); + if(!pColor) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + return new CVolumeDataColor(pColor); +} + +IVolumeDataProperty * Lib3MF::Impl::CVolumeData::AddPropertyFromFunction(const std::string & sName, IFunction * pTheFunction) +{ + NMR::CModel* pModel = m_pVolumeData->getModel(); + + NMR::PModelResource pResource = pModel->findResource(pTheFunction->GetUniqueResourceID()); + NMR::PModelFunction pFunction = std::dynamic_pointer_cast(pResource); + + if (!pFunction) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + + NMR::PVolumeDataProperty pProperty = m_pVolumeData->addProperty(sName, pFunction); + if(!pProperty) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + } + return new CVolumeDataProperty(pProperty); +} diff --git a/Source/API/lib3mf_volumedatacolor.cpp b/Source/API/lib3mf_volumedatacolor.cpp new file mode 100644 index 000000000..f6c6c2ac1 --- /dev/null +++ b/Source/API/lib3mf_volumedatacolor.cpp @@ -0,0 +1,48 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CVolumeDataColor + +*/ + +#include "lib3mf_volumedatacolor.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CVolumeDataColor +**************************************************************************************************************************/ + +CVolumeDataColor::CVolumeDataColor(NMR::PVolumeDataColor pColor) + : CFunctionReference(pColor) +{ + +} + diff --git a/Source/API/lib3mf_volumedatacomposite.cpp b/Source/API/lib3mf_volumedatacomposite.cpp new file mode 100644 index 000000000..0a73086f7 --- /dev/null +++ b/Source/API/lib3mf_volumedatacomposite.cpp @@ -0,0 +1,84 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CVolumeDataComposite + +*/ + +#include "lib3mf_volumedatacomposite.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CVolumeDataComposite +**************************************************************************************************************************/ + +CVolumeDataComposite::CVolumeDataComposite(NMR::PVolumeDataComposite pComposite): + m_pVolumeDataComposite(pComposite) +{ + +} + +NMR::PVolumeDataComposite CVolumeDataComposite::volumeDataComposite() +{ + if (!m_pVolumeDataComposite) + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM); + return m_pVolumeDataComposite; +} + +IBaseMaterialGroup * CVolumeDataComposite::GetBaseMaterialGroup() +{ + throw ELib3MFInterfaceException(LIB3MF_ERROR_NOTIMPLEMENTED); +} + +void CVolumeDataComposite::SetBaseMaterialGroup(IBaseMaterialGroup* pBaseMaterialGroupInstance) +{ + throw ELib3MFInterfaceException(LIB3MF_ERROR_NOTIMPLEMENTED); +} + +Lib3MF_uint32 CVolumeDataComposite::GetMaterialMappingCount() +{ + throw ELib3MFInterfaceException(LIB3MF_ERROR_NOTIMPLEMENTED); +} + +IMaterialMapping * CVolumeDataComposite::GetMaterialMapping(const Lib3MF_uint32 nIndex) +{ + throw ELib3MFInterfaceException(LIB3MF_ERROR_NOTIMPLEMENTED); +} + +IMaterialMapping * CVolumeDataComposite::AddMaterialMapping(const Lib3MF::sTransform Transform) +{ + throw ELib3MFInterfaceException(LIB3MF_ERROR_NOTIMPLEMENTED); +} + +void CVolumeDataComposite::RemoveMaterialMapping(const Lib3MF_uint32 nIndex) +{ + throw ELib3MFInterfaceException(LIB3MF_ERROR_NOTIMPLEMENTED); +} + diff --git a/Source/API/lib3mf_volumedataproperty.cpp b/Source/API/lib3mf_volumedataproperty.cpp new file mode 100644 index 000000000..68f2fceb0 --- /dev/null +++ b/Source/API/lib3mf_volumedataproperty.cpp @@ -0,0 +1,69 @@ +/*++ + +Copyright (C) 2019 3MF Consortium (Original Author) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: This is a stub class definition of CVolumeDataProperty + +*/ + +#include "lib3mf_volumedataproperty.hpp" +#include "lib3mf_interfaceexception.hpp" + +// Include custom headers here. + + +using namespace Lib3MF::Impl; + +/************************************************************************************************************************* + Class definition of CVolumeDataProperty +**************************************************************************************************************************/ + +CVolumeDataProperty::CVolumeDataProperty(NMR::PVolumeDataProperty pProperty) + : CFunctionReference(pProperty) +{ +} + +NMR::PVolumeDataProperty CVolumeDataProperty::asVolumeDataProperty() +{ + NMR::PVolumeDataProperty pProperty = std::dynamic_pointer_cast(m_pFunctionReference); + if (pProperty) + return pProperty; + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDCAST); +} + +std::string CVolumeDataProperty::GetName() +{ + return asVolumeDataProperty()->getName(); +} + +void CVolumeDataProperty::SetIsRequired(const bool bIsRequired) +{ + asVolumeDataProperty()->setIsRequired(bIsRequired); +} + +bool CVolumeDataProperty::IsRequired() +{ + return asVolumeDataProperty()->isRequired(); +} \ No newline at end of file diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 2d94b2c24..27973c844 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -21,229 +21,16 @@ set(SRCS_PLATFORM Source/Common/Platform/NMR_Platform.cpp Source/Common/Platform/NMR_ImportStream_Native.cpp Source/Common/Platform/NMR_ExportStream_Native.cpp - Source/Common/Platform/NMR_ExportStream_ZIP.cpp + Source/Common/Platform/NMR_ExportStream_ZIP.cpp ) +file(GLOB_RECURSE SOURCES LIST_DIRECTORIES false CONFIGURE_DEPENDS Source/*.cpp) # Recursively get all .cpp files, the false is to not follow symlinks + set(SRCS_COMMON ${SRCS_PLATFORM} ${ZLIB_FILES} ${CPPBASE64_FILES} -Source/API/lib3mf.cpp -Source/API/lib3mf_attachment.cpp -Source/API/lib3mf_base.cpp -Source/API/lib3mf_basematerialgroup.cpp -Source/API/lib3mf_basematerialgroupiterator.cpp -Source/API/lib3mf_beamlattice.cpp -Source/API/lib3mf_beamset.cpp -Source/API/lib3mf_builditem.cpp -Source/API/lib3mf_builditemiterator.cpp -Source/API/lib3mf_colorgroup.cpp -Source/API/lib3mf_colorgroupiterator.cpp -Source/API/lib3mf_component.cpp -Source/API/lib3mf_compositematerials.cpp -Source/API/lib3mf_compositematerialsiterator.cpp -Source/API/lib3mf_componentsobject.cpp -Source/API/lib3mf_componentsobjectiterator.cpp -Source/API/lib3mf_meshobject.cpp -Source/API/lib3mf_meshobjectiterator.cpp -Source/API/lib3mf_metadata.cpp -Source/API/lib3mf_metadatagroup.cpp -Source/API/lib3mf_multipropertygroup.cpp -Source/API/lib3mf_multipropertygroupiterator.cpp -Source/API/lib3mf_contentencryptionparams.cpp -Source/API/lib3mf_accessright.cpp -Source/API/lib3mf_consumer.cpp -Source/API/lib3mf_resourcedata.cpp -Source/API/lib3mf_resourcedatagroup.cpp -Source/API/lib3mf_keystore.cpp -Source/API/lib3mf_model.cpp -Source/API/lib3mf_object.cpp -Source/API/lib3mf_objectiterator.cpp -Source/API/lib3mf_packagepart.cpp -Source/API/lib3mf_reader.cpp -Source/API/lib3mf_resource.cpp -Source/API/lib3mf_resourceiterator.cpp -Source/API/lib3mf_slice.cpp -Source/API/lib3mf_slicestack.cpp -Source/API/lib3mf_slicestackiterator.cpp -Source/API/lib3mf_texture2d.cpp -Source/API/lib3mf_texture2dgroup.cpp -Source/API/lib3mf_texture2dgroupiterator.cpp -Source/API/lib3mf_texture2diterator.cpp -Source/API/lib3mf_writer.cpp -Source/API/lib3mf_utils.cpp -Source/Common/3MF_ProgressMonitor.cpp -Source/Common/Math/NMR_Matrix.cpp -Source/Common/Math/NMR_PairMatchingTree.cpp -Source/Common/Math/NMR_Vector.cpp -Source/Common/Math/NMR_VectorTree.cpp -Source/Common/MeshExport/NMR_MeshExporter.cpp -Source/Common/MeshExport/NMR_MeshExporter_STL.cpp -Source/Common/MeshImport/NMR_MeshImporter.cpp -Source/Common/MeshImport/NMR_MeshImporter_STL.cpp -Source/Common/MeshInformation/NMR_MeshInformation.cpp -Source/Common/MeshInformation/NMR_MeshInformationContainer.cpp -Source/Common/MeshInformation/NMR_MeshInformationFactory.cpp -Source/Common/MeshInformation/NMR_MeshInformationHandler.cpp -Source/Common/MeshInformation/NMR_MeshInformation_Properties.cpp -Source/Common/Mesh/NMR_Mesh.cpp -Source/Common/Mesh/NMR_BeamLattice.cpp -Source/Common/Mesh/NMR_MeshBuilder.cpp -Source/Common/NMR_Exception.cpp -Source/Common/NMR_Exception_Windows.cpp -Source/Common/NMR_ModelWarnings.cpp -Source/Common/NMR_StringUtils.cpp -Source/Common/NMR_SecureContext.cpp -Source/Common/NMR_UUID.cpp -Source/Common/OPC/NMR_OpcPackagePart.cpp -Source/Common/OPC/NMR_OpcPackageRelationship.cpp -Source/Common/OPC/NMR_OpcPackageReader.cpp -Source/Common/OPC/NMR_OpcPackageContentTypesReader.cpp -Source/Common/OPC/NMR_OpcPackageRelationshipReader.cpp -Source/Common/OPC/NMR_OpcPackageWriter.cpp -Source/Common/Platform/NMR_XmlReader_Native.cpp -Source/Common/Platform/NMR_EncryptionHeader.cpp -Source/Common/Platform/NMR_ExportStream.cpp -Source/Common/Platform/NMR_ExportStream_Callback.cpp -Source/Common/Platform/NMR_ExportStream_Compressed.cpp -Source/Common/Platform/NMR_ExportStream_Encrypted.cpp -Source/Common/Platform/NMR_ExportStream_Memory.cpp -Source/Common/Platform/NMR_ExportStream_Dummy.cpp -Source/Common/Platform/NMR_ExportStream_ZIP.cpp -Source/Common/Platform/NMR_ImportStream_Callback.cpp -Source/Common/Platform/NMR_ImportStream_Compressed.cpp -Source/Common/Platform/NMR_ImportStream_Memory.cpp -Source/Common/Platform/NMR_ImportStream_Shared_Memory.cpp -Source/Common/Platform/NMR_ImportStream_Unique_Memory.cpp -Source/Common/Platform/NMR_ImportStream_ZIP.cpp -Source/Common/Platform/NMR_ImportStream_Encrypted.cpp -Source/Common/Platform/NMR_PortableZIPWriter.cpp -Source/Common/Platform/NMR_PortableZIPWriterEntry.cpp -Source/Common/Platform/NMR_Time.cpp -Source/Common/Platform/NMR_XmlReader.cpp -Source/Common/Platform/NMR_XmlWriter.cpp -Source/Common/Platform/NMR_XmlWriter_Native.cpp -Source/Model/Classes/NMR_PackageResourceID.cpp -Source/Model/Classes/NMR_Model.cpp -Source/Model/Classes/NMR_ModelAttachment.cpp -Source/Model/Classes/NMR_ModelBaseMaterial.cpp -Source/Model/Classes/NMR_ModelBaseMaterials.cpp -Source/Model/Classes/NMR_ModelContext.cpp -Source/Model/Classes/NMR_ModelColorGroup.cpp -Source/Model/Classes/NMR_ModelCompositeMaterials.cpp -Source/Model/Classes/NMR_ModelBuildItem.cpp -Source/Model/Classes/NMR_ModelComponent.cpp -Source/Model/Classes/NMR_ModelComponentsObject.cpp -Source/Model/Classes/NMR_ModelMeshBeamLatticeAttributes.cpp -Source/Model/Classes/NMR_ModelMeshObject.cpp -Source/Model/Classes/NMR_ModelMetaData.cpp -Source/Model/Classes/NMR_ModelMetaDataGroup.cpp -Source/Model/Classes/NMR_ModelMultiPropertyGroup.cpp -Source/Model/Classes/NMR_ModelObject.cpp -Source/Model/Classes/NMR_ModelResource.cpp -Source/Model/Classes/NMR_ModelTexture2D.cpp -Source/Model/Classes/NMR_ModelTexture2DGroup.cpp -Source/Model/Classes/NMR_ModelSlice.cpp -Source/Model/Classes/NMR_ModelSliceStack.cpp -Source/Model/Classes/NMR_KeyStore.cpp -Source/Model/Classes/NMR_KeyStoreConsumer.cpp -Source/Model/Classes/NMR_KeyStoreAccessRight.cpp -Source/Model/Classes/NMR_KeyStoreFactory.cpp -Source/Model/Classes/NMR_KeyStoreResourceData.cpp -Source/Model/Classes/NMR_KeyStoreResourceDataGroup.cpp -Source/Model/Classes/NMR_KeyStoreCEKParams.cpp -Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Ball.cpp -Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_BallRef.cpp -Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Balls.cpp -Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Beam.cpp -Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Beams.cpp -Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_BeamLattice.cpp -Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_BeamSet.cpp -Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_BeamSets.cpp -Source/Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_Ref.cpp -Source/Model/Reader/NMR_ModelReader.cpp -Source/Model/Reader/NMR_ModelReaderNode.cpp -Source/Model/Reader/NMR_ModelReaderNode_ModelBase.cpp -Source/Model/Reader/NMR_ModelReaderNode_KeyStoreBase.cpp -Source/Model/Reader/NMR_ModelReader_3MF.cpp -Source/Model/Reader/NMR_ModelReader_3MF_Native.cpp -Source/Model/Reader/NMR_ModelReader_ColorMapping.cpp -Source/Model/Reader/NMR_ModelReader_InstructionElement.cpp -Source/Model/Reader/NMR_ModelReader_STL.cpp -Source/Model/Reader/NMR_ModelReader_TexCoordMapping.cpp -Source/Model/Reader/NMR_KeyStoreOpcPackageReader.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_BaseMaterial.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_BaseMaterials.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Build.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_BuildItem.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Color.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Colors.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Component.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Components.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Composite.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_CompositeMaterials.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Mesh.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_MetaData.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_MetaDataGroup.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Multi.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_MultiProperties.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Object.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Resources.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Tex2Coord.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Tex2DGroup.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Texture2D.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Triangle.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Triangles.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Vertex.cpp -Source/Model/Reader/v100/NMR_ModelReaderNode100_Vertices.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Build.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_BuildItem.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Color.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Component.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Components.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Material.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Mesh.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Object.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Resources.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Texture.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_TextureVertex.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_TextureVertices.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Triangle.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Triangles.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Vertex.cpp -Source/Model/Reader/v093/NMR_ModelReaderNode093_Vertices.cpp -Source/Model/Reader/Slice1507/NMR_ModelReader_Slice1507_Polygon.cpp -Source/Model/Reader/Slice1507/NMR_ModelReader_Slice1507_Segment.cpp -Source/Model/Reader/Slice1507/NMR_ModelReader_Slice1507_Slice.cpp -Source/Model/Reader/Slice1507/NMR_ModelReader_Slice1507_SliceRef.cpp -Source/Model/Reader/Slice1507/NMR_ModelReader_Slice1507_SliceRefModel.cpp -Source/Model/Reader/Slice1507/NMR_ModelReader_Slice1507_SliceRefResources.cpp -Source/Model/Reader/Slice1507/NMR_ModelReader_Slice1507_SliceStack.cpp -Source/Model/Reader/Slice1507/NMR_ModelReader_Slice1507_Vertex.cpp -Source/Model/Reader/Slice1507/NMR_ModelReader_Slice1507_Vertices.cpp -Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStore.cpp -Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreCipherValue.cpp -Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreKEKParams.cpp -Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreCEKParams.cpp -Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreConsumer.cpp -Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreAccessRight.cpp -Source/Model/Reader/NMR_ModelReaderNode_StringValue.cpp -Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreResourceData.cpp -Source/Model/Reader/SecureContent101/NMR_ModelReaderNode_KeyStoreResourceDataGroup.cpp -Source/Model/Writer/NMR_KeyStoreOpcPackageWriter.cpp -Source/Model/Writer/NMR_ModelWriter.cpp -Source/Model/Writer/NMR_ModelWriterNode.cpp -Source/Model/Writer/NMR_ModelWriterNode_ModelBase.cpp -Source/Model/Writer/NMR_ModelWriterNode_KeyStoreBase.cpp -Source/Model/Writer/NMR_ModelWriter_3MF.cpp -Source/Model/Writer/NMR_ModelWriter_3MF_Native.cpp -Source/Model/Writer/NMR_ModelWriter_ColorMapping.cpp -Source/Model/Writer/NMR_ModelWriter_STL.cpp -Source/Model/Writer/NMR_ModelWriter_TexCoordMapping.cpp -Source/Model/Writer/NMR_ModelWriter_TexCoordMappingContainer.cpp -Source/Model/Writer/SecureContent101/NMR_ModelWriterNode_KeyStore.cpp -Source/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.cpp -Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp +${SOURCES} ) # FILELISTVARIABLE must be the name of a variable that holds a list of source-file paths relative to ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/Source/Common/Graph/DirectedGraph.cpp b/Source/Common/Graph/DirectedGraph.cpp new file mode 100644 index 000000000..a37614cf1 --- /dev/null +++ b/Source/Common/Graph/DirectedGraph.cpp @@ -0,0 +1,103 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification,276529 are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#include "Common/Graph/DirectedGraph.h" + +#include + +namespace NMR::common::graph +{ + DirectedGraph::DirectedGraph(size_t const size) + : IDirectedGraph(size), + m_size(size), + m_graphData((m_size + 1) * (m_size + 1), false) + { + } + + void DirectedGraph::addDependency(Identifier id, Identifier idOfDependency) + { + if(id == idOfDependency) + { + return; + } + auto const index = id * m_size + idOfDependency; + m_graphData[index] = true; + } + + void DirectedGraph::removeDependency(Identifier id, + Identifier idOfDependency) + { + auto const index = id * m_size + idOfDependency; + m_graphData[index] = false; + } + + bool DirectedGraph::isDirectlyDependingOn( + Identifier id, Identifier dependencyInQuestion) const + { + auto const index = id * m_size + dependencyInQuestion; + return m_graphData[index]; + } + + size_t DirectedGraph::getSize() const + { + return m_size; + } + + void DirectedGraph::removeVertex(Identifier id) + { + auto const iterElemToRemove = + std::find(std::begin(m_vertices), std::end(m_vertices), id); + if(iterElemToRemove == std::end(m_vertices)) + { + return; + } + m_vertices.erase(iterElemToRemove); + + for(auto vertex : m_vertices) + { + removeDependency(id, vertex); + removeDependency(vertex, id); + } + } + + auto DirectedGraph::getVertices() const -> const DependencySet& + { + return m_vertices; + } + + void DirectedGraph::addVertex(Identifier id) + { + m_vertices.insert(id); + } + + auto DirectedGraph::hasPredecessors(Identifier id) const -> bool + { + return !m_predecessors[id].empty(); + } +} // namespace NMR::common::graph diff --git a/Source/Common/Graph/GraphAlgorithms.cpp b/Source/Common/Graph/GraphAlgorithms.cpp new file mode 100644 index 000000000..23980d9a4 --- /dev/null +++ b/Source/Common/Graph/GraphAlgorithms.cpp @@ -0,0 +1,133 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification,276529 +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#include "Common/Graph/GraphAlgorithms.h" +#include "Common/Graph/IDirectedGraph.h" + +#include +#include +#include +#include + +namespace NMR::common::graph +{ + bool isCyclicUtil(const IDirectedGraph & graph, Identifier node, std::vector & visited, std::vector & recStack) + { + if (!visited[node]) + { + visited[node] = true; + recStack[node] = true; + + for (Identifier dep = 0u; dep < static_cast(graph.getSize()); ++dep) + { + if (graph.isDirectlyDependingOn(node, dep)) + { + if (!visited[dep] && isCyclicUtil(graph, dep, visited, recStack)) + { + return true; + } + else if (recStack[dep]) + { + return true; + } + } + } + } + recStack[node] = false; + return false; + } + + bool isCyclic(const IDirectedGraph & graph) + { + std::vector visited(graph.getSize(), false); + std::vector recStack(graph.getSize(), false); + + for (Identifier id = 0u; id < static_cast(graph.getSize()); ++id) + { + if (isCyclicUtil(graph, id, visited, recStack)) + { + return true; + } + } + return false; + } + + VertexList topologicalSort(const IDirectedGraph & graph) + { + if (isCyclic(graph)) + { + return {}; + } + + // tsort based on DFS + enum class NodeType + { + CHILD, + PARENT + }; + std::stack> nodesToVisit; + std::vector visited(graph.getSize(), false); + VertexList topologicalOrder; + + for (Identifier id = 0u; id < static_cast(graph.getSize()); ++id) + { + if (!visited[id]) + { + nodesToVisit.push({NodeType::CHILD, id}); + + while (!nodesToVisit.empty()) + { + auto [nodeType, nodeId] = nodesToVisit.top(); + nodesToVisit.pop(); + + if (nodeType == NodeType::PARENT) + { + topologicalOrder.push_back(nodeId); + continue; + } + + visited[nodeId] = true; + nodesToVisit.push({NodeType::PARENT, nodeId}); + + for (Identifier dep = 0u; dep < static_cast(graph.getSize()); ++dep) + { + if (!visited[dep]) + { + if (graph.isDirectlyDependingOn(nodeId, dep)) + { + nodesToVisit.push({NodeType::CHILD, dep}); + } + } + } + + } + } + } + return topologicalOrder; + } +} // namespace gladius::nodes::graph diff --git a/Source/Common/Mesh/NMR_BeamLattice.cpp b/Source/Common/Mesh/NMR_BeamLattice.cpp index ae5a4f15e..00a1b59b0 100644 --- a/Source/Common/Mesh/NMR_BeamLattice.cpp +++ b/Source/Common/Mesh/NMR_BeamLattice.cpp @@ -26,7 +26,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Abstract: -NMR_MeshBeamLattice.h implements the class CMeshBeamLattice. +NMR_MeshBeamLattice.cpp implements the class CMeshBeamLattice. --*/ diff --git a/Source/Common/Mesh/NMR_Mesh.cpp b/Source/Common/Mesh/NMR_Mesh.cpp index b02d3dcea..e2fdb20a4 100644 --- a/Source/Common/Mesh/NMR_Mesh.cpp +++ b/Source/Common/Mesh/NMR_Mesh.cpp @@ -547,7 +547,7 @@ namespace NMR { try { addBall(getNode(ballData[iBall].m_nodeindex), ballData[iBall].m_radius); } - catch (CNMRException) {} + catch (CNMRException &) {} } delete [] ballData; diff --git a/Source/Model/Classes/NMR_ModelTextureAttachment.cpp b/Source/Common/Mesh/NMR_VolumeDataBoundary.cpp similarity index 73% rename from Source/Model/Classes/NMR_ModelTextureAttachment.cpp rename to Source/Common/Mesh/NMR_VolumeDataBoundary.cpp index de15961b5..8a268740d 100644 --- a/Source/Model/Classes/NMR_ModelTextureAttachment.cpp +++ b/Source/Common/Mesh/NMR_VolumeDataBoundary.cpp @@ -26,26 +26,28 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Abstract: -NMR_ModelTextureAttachment.cpp implements the Model Texture Attachment Class. +NMR_VolumeDataBoundary.cpp implements the class CVolumeDataBoundary. --*/ -#include "Model/Classes/NMR_ModelTextureAttachment.h" -#include "Model/Classes/NMR_ModelConstants.h" -#include "Common/NMR_Exception.h" +#include "Common/Mesh/NMR_VolumeDataBoundary.h" +#include "Model/Classes/NMR_ModelFunction.h" namespace NMR { - CModelTextureAttachment::CModelTextureAttachment(_In_ CModel * pModel, _In_ const std::wstring sPathURI, _In_ PImportStream pStream) - : CModelAttachment(pModel, sPathURI, PACKAGE_TEXTURE_RELATIONSHIP_TYPE, pStream) + CVolumeDataBoundary::CVolumeDataBoundary(PModelFunction pFunction) + : CFunctionReference(pFunction) { - + } - CModelTextureAttachment::~CModelTextureAttachment() + bool CVolumeDataBoundary::getMeshBBoxOnly() { - + return m_meshBBoxOnly; } + void CVolumeDataBoundary::setMeshBBoxOnly(bool bMeshBBoxOnly) + { + m_meshBBoxOnly = bMeshBBoxOnly; + } } - diff --git a/Source/Common/Mesh/NMR_VolumeDataColor.cpp b/Source/Common/Mesh/NMR_VolumeDataColor.cpp new file mode 100644 index 000000000..47494c38c --- /dev/null +++ b/Source/Common/Mesh/NMR_VolumeDataColor.cpp @@ -0,0 +1,42 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_VolumeDataColor.cpp implements the class CVolumeDataColor. + +--*/ + +#include "Common/Mesh/NMR_VolumeDataColor.h" + +namespace NMR { + + CVolumeDataColor::CVolumeDataColor(PModelFunction pFunction) + : CFunctionReference(pFunction) + { + } + +} diff --git a/Source/Common/Mesh/NMR_VolumeDataComposite.cpp b/Source/Common/Mesh/NMR_VolumeDataComposite.cpp new file mode 100644 index 000000000..014830934 --- /dev/null +++ b/Source/Common/Mesh/NMR_VolumeDataComposite.cpp @@ -0,0 +1,74 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_VolumeComposite.cpp implements the class CVolumeDataComposite. + +--*/ + +#include "Common/Mesh/NMR_VolumeDataComposite.h" + +namespace NMR { + + CVolumeDataComposite::CVolumeDataComposite() + { + + } + + NMR::PModelBaseMaterialResource CVolumeDataComposite::getBaseMaterialGroup() + { + return m_pBaseMaterialGroup; + } + + void CVolumeDataComposite::setBaseMaterialGroup(PModelBaseMaterialResource pBaseMaterialGroup) + { + m_pBaseMaterialGroup = pBaseMaterialGroup; + } + + nfUint32 CVolumeDataComposite::materialMappingCount() const + { + return (nfUint32)m_vctFunctionReferences.size(); + } + + PFunctionReference CVolumeDataComposite::getMaterialMapping(nfUint32 nIndex) + { + if (nIndex >= materialMappingCount()) + throw CNMRException(NMR_ERROR_INVALIDINDEX); + return m_vctFunctionReferences[nIndex]; + } + + PFunctionReference CVolumeDataComposite::addMaterialMapping(PModelFunction pFunction) + { + PFunctionReference pFunctionReference = std::make_shared(pFunction); + m_vctFunctionReferences.push_back(pFunctionReference); + return pFunctionReference; + } + + void CVolumeDataComposite::removeMaterialMapping(nfUint32) + {} + +} diff --git a/Source/Common/Mesh/NMR_VolumeDataProperty.cpp b/Source/Common/Mesh/NMR_VolumeDataProperty.cpp new file mode 100644 index 000000000..c41e1737e --- /dev/null +++ b/Source/Common/Mesh/NMR_VolumeDataProperty.cpp @@ -0,0 +1,70 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_VolumeDataProperty.cpp implements the class CVolumeDataProperty. + +--*/ + +#include "Common/Mesh/NMR_VolumeDataProperty.h" + +#include "Model/Classes/NMR_ModelFunction.h" + +namespace NMR +{ + + CVolumeDataProperty::CVolumeDataProperty(PModelFunction pFunction) + : CFunctionReference(pFunction), m_sName({}), m_bIsRequired(true) + { + } + + CVolumeDataProperty::CVolumeDataProperty(PModelFunction pFunction, + std::string sName) + : CFunctionReference(pFunction), m_sName(sName), m_bIsRequired(true) + { + } + + std::string CVolumeDataProperty::getName() + { + return m_sName; + } + + void CVolumeDataProperty::setName(std::string sPropertyName) + { + m_sName = sPropertyName; + } + + bool CVolumeDataProperty::isRequired() + { + return m_bIsRequired; + } + + void CVolumeDataProperty::setIsRequired(bool bIsRequired) + { + m_bIsRequired = bIsRequired; + } +} // namespace NMR diff --git a/Source/Common/MeshImport/NMR_MeshImporter_STL.cpp b/Source/Common/MeshImport/NMR_MeshImporter_STL.cpp index f99bbdfa0..7de693b82 100644 --- a/Source/Common/MeshImport/NMR_MeshImporter_STL.cpp +++ b/Source/Common/MeshImport/NMR_MeshImporter_STL.cpp @@ -127,7 +127,7 @@ namespace NMR { std::array aSTLHeader; nfUint32 nFaceCount = 0; - nfUint32 nGlobalColor = 0xffffffff; + // nfUint32 nGlobalColor = 0xffffffff; pStream->readIntoBuffer(&aSTLHeader[0], 80, true); pStream->readIntoBuffer((nfByte*)&nFaceCount, sizeof(nFaceCount), true); @@ -138,14 +138,14 @@ namespace NMR { if (nFaceCount > NMR_MESH_MAXFACECOUNT) throw CNMRException(NMR_ERROR_INVALIDFACECOUNT); - std::string sHeaderString(std::begin(aSTLHeader), std::end(aSTLHeader)); - std::size_t nFound = sHeaderString.find("COLOR="); - if (nFound != std::string::npos) { - if (nFound <= 76) { - nGlobalColor = ((nfUint32)aSTLHeader[nFound + 6]) + (((nfUint32)aSTLHeader[nFound + 7]) << 8) + (((nfUint32)aSTLHeader[nFound + 8]) << 16) + - (((nfUint32)aSTLHeader[nFound + 9]) << 24); - } - } + // std::string sHeaderString(std::begin(aSTLHeader), std::end(aSTLHeader)); + // std::size_t nFound = sHeaderString.find("COLOR="); + // if (nFound != std::string::npos) { + // if (nFound <= 76) { + // nGlobalColor = ((nfUint32)aSTLHeader[nFound + 6]) + (((nfUint32)aSTLHeader[nFound + 7]) << 8) + (((nfUint32)aSTLHeader[nFound + 8]) << 16) + + // (((nfUint32)aSTLHeader[nFound + 9]) << 24); + // } + // } nfUint32 nNodeIdx; MESHNODE * pNodes[3]; @@ -193,7 +193,8 @@ namespace NMR { throw CNMRException(NMR_ERROR_INVALIDCOORDINATES); if (bIsValid) { - MESHFACE * pFace = pMesh->addFace(pNodes[0], pNodes[1], pNodes[2]); + pMesh->addFace(pNodes[0], pNodes[1], pNodes[2]); + // MESHFACE * pFace = pMesh->addFace(pNodes[0], pNodes[1], pNodes[2]); //if (pProperties) { // nfUint32 nRed = (nfUint32) ((nfFloat) (Facet.m_attribute & 0x1f) / (255.0f / 31.0f)); // nfUint32 nGreen = (nfUint32)((nfFloat)((Facet.m_attribute >> 5) & 0x1f) / (255.0f / 31.0f)); diff --git a/Source/Common/NMR_Exception.cpp b/Source/Common/NMR_Exception.cpp index 6f5187159..8a45470a1 100644 --- a/Source/Common/NMR_Exception.cpp +++ b/Source/Common/NMR_Exception.cpp @@ -36,15 +36,9 @@ Each exception is identified via a global ErrorCode #include namespace NMR { - - CNMRException::CNMRException(_In_ nfError errorcode) : std::exception() - { - m_errorcode = errorcode; - } - - const char * CNMRException::what() const throw () + std::string errorCodeToMessage(nfError errorcode) { - switch (m_errorcode) { + switch (errorcode) { // Success / user interaction (0x0XXX) case NMR_USERABORTED: return "The called function was aborted by the user"; // General error codes (0x1XXX) @@ -438,6 +432,82 @@ namespace NMR { case NMR_ERROR_KEYSTOREUNSUPPORTEDALGORITHM: return "The algorithm attribute is unsupported"; case NMR_ERROR_KEYSTORETOOMANYELEMENTS: return "Too many elements added to a keystore tree"; + case NMR_ERROR_INVALIDIMAGE3DSIZE: return "Invalid Image3D Size"; + case NMR_ERROR_TOOMANYCHANNELSELECTORS: return "Too many channel selectors"; + case NMR_ERROR_TOOMANYVOLUMETRICCHANNELS: return "Too many volumetric channels"; + case NMR_ERROR_COULDNOTMAPPACKAGEID: return "Could not map package ID"; + case NMR_ERROR_DUPLICATEVOLUMETRICCHANNEL: return "Duplicate volumetric channel"; + case NMR_ERROR_COULDNOTREMOVEVOLUMETRICLAYER: return "Could not remove volumetric layer"; + case NMR_ERROR_COULDNOTREINDEXVOLUMETRICLAYER: return "Could not reindex volumetric layer"; + case NMR_ERROR_COULDNOTREINDEXCHANNELSELECTOR: return "Could not reindex channel selector"; + case NMR_ERROR_DUPLICATEIMAGE3DNAME: return "Duplicate Image3D Name"; + case NMR_ERROR_DUPLICATEIMAGESTACKSIZE: return "Duplicate Image3D Size"; + case NMR_ERROR_DUPLICATEIMAGESTACKSHEETCOUNT: return "Duplicate Image3D Sheet count"; + case NMR_ERROR_MISSINGIMAGESTACKSIZE: return "Missing 3D Image Size"; + case NMR_ERROR_MISSINGIMAGESTACKSHEETCOUNT: return "Missing 3D Image Sheetcount"; + case NMR_ERROR_MISSINGIMAGE3DNAME: return "Missing 3D Image Name"; + case NMR_ERROR_INVALIDIMAGSHEETCOUNT: return "Invalid Image3D Sheet Count"; + case NMR_ERROR_IMAGESHEETNOTFOUND: return "Image 3D Sheet not found"; + case NMR_ERROR_TOOMANYIMAGESHEETS: return "Too many Image3D sheets"; + case NMR_ERROR_MISSINGIMAGE3DSHEETPATH: return "Missing Image3D sheet path"; + case NMR_ERROR_DUPLICATEVOLUMETRICBACKGROUND: return "Duplicate Volumetric Background"; + case NMR_ERROR_INVALIDVOLUMETRICBACKGROUND: return "Invalid Volumetric Background"; + case NMR_ERROR_MISSINGVOLUMETRICDSTCHANNELNAME: return "Missing Volumetric DstChannel Name"; + case NMR_ERROR_MISSINGVOLUMETRICLAYERBLENDMETHOD: return "Missing Volumetric Layer Blend Method"; + case NMR_ERROR_DUPLICATEVOLUMETRICBLENDMETHOD: return "Duplicate Volumetric Blend Method"; + case NMR_ERROR_MISSINGVOLUMETRICLAYERTRANSFORM: return "Missing Volumetric Layer Transform"; + case NMR_ERROR_DUPLICATEVOLUMETRICTRANSFORM: return "Duplicate Volumetric Transform"; + case NMR_ERROR_DUPLICATEVOLUMETRICSRCALPHA: return "Duplicate Volumetric Src Alpha"; + case NMR_ERROR_INVALIDVOLUMETRICSRCALPHA: return "Invalid Volumetric Src Alpha"; + case NMR_ERROR_DUPLICATEVOLUMETRICDSTALPHA: return "Duplicate Volumetric Dst Alpha"; + case NMR_ERROR_INVALIDVOLUMETRICDSTALPHA: return "Invalid Volumetric Dst Alpha"; + case NMR_ERROR_DUPLICATEMASKCHANNELSELECTOR: return "Duplicate Mask Channel Selector"; + case NMR_ERROR_DUPLICATEVOLUMETRICMINVALUE: return "Duplicate Volumetric Min Value"; + case NMR_ERROR_INVALIDVOLUMETRICMINVALUE: return "Invalid Volumetric Min Value"; + case NMR_ERROR_DUPLICATEVOLUMETRICMAXVALUE: return "Duplicate Volumetric Max Value"; + case NMR_ERROR_INVALIDVOLUMETRICMAXVALUE: return "Invalid Volumetric Max Value"; + case NMR_ERROR_MISSINGCHANNELSELECTORID: return "Missing Channel Selector ID"; + case NMR_ERROR_MISSINGCHANNELSELECTORTILESTYLE: return "Missing Channel Selector TileStyle"; + case NMR_ERROR_DUPLICATEVOLUMETRICTILESTYLE: return "Duplicate Volumetric TileStyle"; + case NMR_ERROR_DUPLICATEVOLUMETRICFILTER: return "Duplicate Volumetric Filter"; + case NMR_ERROR_DUPLICATEVOLUMETRICSOURCECHANNEL: return "Duplicate Volumetric Source Channel"; + case NMR_ERROR_DUPLICATEVOLUMETRICDESTINATIONCHANNEL: return "Duplicate Volumetric Destination Channel"; + case NMR_ERROR_DUPLICATEVOLUMEDATABOUNDARY: return "Duplicate VolumeData Levelset"; + case NMR_ERROR_DUPLICATEVOLUMEDATATRANSFORM: return "Duplicate VolumeData Transform"; + case NMR_ERROR_DUPLICATEVOLUMEDATACHANNEL: return "Duplicate VolumeData Channel"; + case NMR_ERROR_DUPLICATEVOLUMEDATAFIELDID: return "Duplicate VolumeData VolumetricStackID"; + case NMR_ERROR_DUPLICATEVOLUMEDATASOLIDTHRESHOLD: return "Duplicate VolumeData Solid Threshold"; + case NMR_ERROR_MISSINGVOLUMEDATACHANNEL: return "Missing VolumeData Channel"; + case NMR_ERROR_MISSINGVOLUMEDATAFIELDID: return "Missing VolumeData VolumetricStackID"; + case NMR_ERROR_INVALIDVOLUMEDATASOLIDTHRESHOLD: return "Invalid VolumeData Solid Threshold"; + case NMR_ERROR_DUPLICATEVOLUMEDATAPROPERTY: return "Duplicate VolumeData Property"; + case NMR_ERROR_MISSINGVOLUMEDATAPROPERTYNAME: return "Missing VolumeData Property"; + case NMR_ERROR_MISSINGVOLUMETRICSRCALPHA: return "Missing Volumetric Source Alpha"; + case NMR_ERROR_MISSINGVOLUMETRICDSTALPHA: return "Missing Volumetric Destination Alpha"; + case NMR_ERROR_MISSING_ATTRIBUTE_SCALARFIELDCOMPOSED: return "Missing attribute in a ScalarFieldComposed element"; + case NMR_ERROR_DUPLICATE_ATTRIBUTE_SCALARFIELDCOMPOSED: return "Duplicate attribute in a ScalarFieldComposed element"; + case NMR_ERROR_MISSING_ATTRIBUTE_VECTOR3DFIELDCOMPOSED: return "Missing attribute in a Vector3DFieldComposed element"; + case NMR_ERROR_DUPLICATE_ATTRIBUTE_VECTOR3DFIELDCOMPOSED: return "Duplicate attribute in a Vector3DFieldComposed element"; + case NMR_ERROR_UNKNOWN_NODETYPE_IMPLICITMODEL: return "Unknown node type in implicit model"; + case NMR_ERROR_IMPLICIT_FUNCTION_INVALID_SOURCE_NODE : return "Invalid source node in implicit function"; + case NMR_ERROR_IMPLICIT_FUNCTION_INVALID_TARGET_NODE : return "Invalid target node in implicit function"; + case NMR_ERROR_IMPLICIT_FUNCTION_INVALID_SOURCE_PORT : return "Invalid source port in implicit function"; + case NMR_ERROR_IMPLICIT_FUNCTION_INVALID_TARGET_PORT : return "Invalid target port in implicit function"; + case NMR_ERROR_IMPLICIT_FUNCTION_INVALID_PORT_TYPE : return "Invalid port type in implicit function"; + case NMR_ERROR_IMPLICIT_PORT_DOES_NOT_EXIST : return "The port does not exist"; + case NMR_ERROR_DUPLICATE_VOLUMEDATA_MESHBBOXONLY : return "Duplicate VolumeData MeshBBoxOnly"; + case NMR_ERROR_DUPLICATE_VOLUMEDATA_MINFEATURESIZE : return "Duplicate VolumeData MinFeatureSize"; + case NMR_ERROR_IMPLICIT_FUNCTION_CYCLIC_GRAPH : return "Cyclic graph in implicit function"; + case NMR_ERROR_DUPLICATE_VOLUMEDATA_FALLBACKVALUE : return "Duplicate VolumeData FallbackValue"; + + case NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_FUNCTION_ID: return "Duplicate attribute functionid in levelset element"; + case NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_CHANNEL: return "Duplicate attribute channel in levelset element"; + case NMR_ERROR_DUPLICATE_BOUNDARY_SHAOE_FALLBACKVALUE: return "Duplicate attribute fallbackvalue in levelset element"; + case NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_TRANSFORM: return "Duplicate attribute transform in levelset element"; + case NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_MIN_FEATURE_SIZE: return "Duplicate attribute minfeaturesize in levelset element"; + case NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_FALLBACK_VALUE: return "Duplicate attribute fallbackvalue in levelset element"; + case NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_VOLUME_ID: return "Duplicate attribute volumeid in levelset element"; + // XML Parser Error Constants(0x9XXX) case NMR_ERROR_XMLPARSER_INVALIDATTRIBVALUE: return "Invalid XML attribute value"; case NMR_ERROR_XMLPARSER_INVALIDPARSERESULT: return "Invalid XML parse result"; @@ -481,6 +551,23 @@ namespace NMR { } } + CNMRException::CNMRException(_In_ nfError errorcode) : m_errorcode(errorcode), std::exception() + { + m_message = errorCodeToMessage(errorcode); + } + + CNMRException::CNMRException(nfError errorcode, + const std::string& message): m_errorcode(errorcode), m_message(message) + { + m_message = errorCodeToMessage(errorcode) + ": " + message; + } + + const char* CNMRException::what() const throw() + { + return m_message.c_str(); + + } + nfError CNMRException::getErrorCode() const { return m_errorcode; diff --git a/Source/Common/NMR_FunctionReference.cpp b/Source/Common/NMR_FunctionReference.cpp new file mode 100644 index 000000000..602d5f5d1 --- /dev/null +++ b/Source/Common/NMR_FunctionReference.cpp @@ -0,0 +1,108 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +This file implements the CFunctionReference class, which represents a reference +to a function resource in a 3D Manufacturing Format (3MF) file. The class +provides methods for setting and getting the unique resource ID of the +referenced function. + +--*/ + +#include "Common/NMR_FunctionReference.h" + +#include "Model/Classes/NMR_ModelFunction.h" + +namespace NMR +{ + CFunctionReference::CFunctionReference(UniqueResourceID functionResourceId) + : m_pFunctionResourceID(functionResourceId) + { + } + + CFunctionReference::CFunctionReference(PModelFunction pFunction) + : m_pFunctionResourceID( + pFunction ? pFunction->getPackageResourceID()->getUniqueID() : 0) + { + } + + void CFunctionReference::setFunctionResourceID(UniqueResourceID functionID) + { + m_pFunctionResourceID = functionID; + } + + UniqueResourceID CFunctionReference::getFunctionResourceID() const + { + return m_pFunctionResourceID; + } + + void NMR::CFunctionReference::setChannelName(std::string outputPortName) + { + m_outputPortName = std::move(outputPortName); + } + + std::string const& NMR::CFunctionReference::getChannelName() const + { + return m_outputPortName; + } + + void CFunctionReference::setTransform(NMR::NMATRIX3 transform) + { + m_transform = transform; + m_bHasTransform = true; + } + + bool CFunctionReference::hasTransform() const + { + return m_bHasTransform; + } + + NMR::NMATRIX3 CFunctionReference::getTransform() const + { + return m_transform; + } + + void CFunctionReference::setMinFeatureSize(double minFeatureSize) + { + m_minFeatureSize = minFeatureSize; + } + + double CFunctionReference::getMinFeatureSize() const + { + return m_minFeatureSize; + } + + void CFunctionReference::setFallBackValue(double fallBackValue) + { + m_fallBackValue = fallBackValue; + } + + double CFunctionReference::getFallBackValue() const + { + return m_fallBackValue; + } +} // namespace NMR diff --git a/Source/Common/NMR_StringUtils.cpp b/Source/Common/NMR_StringUtils.cpp index 81dad377b..d07b7d3c5 100644 --- a/Source/Common/NMR_StringUtils.cpp +++ b/Source/Common/NMR_StringUtils.cpp @@ -38,6 +38,7 @@ correctly and Exception-safe #include #include #include +#include namespace NMR { diff --git a/Source/Common/Platform/NMR_ImportStream_ZIP.cpp b/Source/Common/Platform/NMR_ImportStream_ZIP.cpp index 2ef6ba2ec..589116be5 100644 --- a/Source/Common/Platform/NMR_ImportStream_ZIP.cpp +++ b/Source/Common/Platform/NMR_ImportStream_ZIP.cpp @@ -35,7 +35,7 @@ This is a stream class for importing from a libZIP object. #include "Common/Platform/NMR_ImportStream_Unique_Memory.h" #include "Common/NMR_Exception.h" #include "Common/NMR_Exception_Windows.h" -#include +#include #include namespace NMR { diff --git a/Source/Model/Classes/NMR_ImplicitNodeTypes.cpp b/Source/Model/Classes/NMR_ImplicitNodeTypes.cpp new file mode 100644 index 000000000..6d2599f50 --- /dev/null +++ b/Source/Model/Classes/NMR_ImplicitNodeTypes.cpp @@ -0,0 +1,522 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#include "Model/Classes/NMR_ImplicitNodeTypes.h" + +#include "Common/NMR_Exception.h" +#include "Model/Classes/NMR_ModelImplicitNode.h" +#include "lib3mf_interfaceexception.hpp" + +namespace NMR +{ + namespace implicit + { + + NodeType::NodeType(std::string const& name, + AllowedInputOutputs const& allowedInputOutputs) + : m_name(name), m_allowedInputOutputs(allowedInputOutputs) + { + } + + std::string const& NodeType::getName() const + { + return m_name; + } + + AllowedInputOutputs const& NodeType::getAllowedInputOutputs() const + { + return m_allowedInputOutputs; + } + + using namespace Lib3MF; + NodeTypes::NodeTypes() + { + static AllowedInputOutputs const twoParameterSameDimensions{ + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + In{{"A", eImplicitPortType::Scalar}, + {"B", eImplicitPortType::Scalar}}, + Out{{"result", eImplicitPortType::Scalar}}}, + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::VectorToVector, + In{{"A", eImplicitPortType::Vector}, + {"B", eImplicitPortType::Vector}}, + Out{{"result", eImplicitPortType::Vector}}}, + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::MatrixToMatrix, + In{{"A", eImplicitPortType::Matrix}, + {"B", eImplicitPortType::Matrix}}, + Out{{"result", eImplicitPortType::Matrix}}}}; + + static AllowedInputOutputs const oneParameterFunctionSameDimensions{ + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + In{{"A", eImplicitPortType::Scalar}}, + Out{{"result", eImplicitPortType::Scalar}}}, + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::VectorToVector, + In{{"A", eImplicitPortType::Vector}}, + Out{{"result", eImplicitPortType::Vector}}}, + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::MatrixToMatrix, + In{{"A", eImplicitPortType::Matrix}}, + Out{{"result", eImplicitPortType::Matrix}}}}; + + m_nodeTypes = NodeTypesMap{ + {eImplicitNodeType::Addition, + {"addition", twoParameterSameDimensions}}, + {eImplicitNodeType::Subtraction, + {"subtraction", twoParameterSameDimensions}}, + {eImplicitNodeType::Constant, + {"constant", + {InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, In{}, + Out{{"value", eImplicitPortType::Scalar}}}}}}, + {eImplicitNodeType::Multiplication, + {"multiplication", twoParameterSameDimensions}}, + {eImplicitNodeType::Division, + {"division", twoParameterSameDimensions}}, + {eImplicitNodeType::ConstVec, + { + "constvec", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, In{}, + Out{{"vector", eImplicitPortType::Vector}}}, + }, + }}, + {eImplicitNodeType::ConstMat, + { + "constmat", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, In{}, + Out{{"matrix", eImplicitPortType::Matrix}}}, + }, + }}, + {eImplicitNodeType::ComposeVector, + { + "composevector", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"x", eImplicitPortType::Scalar}, + {"y", eImplicitPortType::Scalar}, + {"z", eImplicitPortType::Scalar}}, + Out{{"result", eImplicitPortType::Vector}}}, + }, + }}, + {eImplicitNodeType::DecomposeVector, + { + "decomposevector", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"A", eImplicitPortType::Vector}}, + Out{{"x", eImplicitPortType::Scalar}, + {"y", eImplicitPortType::Scalar}, + {"z", eImplicitPortType::Scalar}}}, + }, + }}, + {eImplicitNodeType::ComposeMatrix, + {"composematrix", // 4x4 + {InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"m00", eImplicitPortType::Scalar}, + {"m01", eImplicitPortType::Scalar}, + {"m02", eImplicitPortType::Scalar}, + {"m03", eImplicitPortType::Scalar}, + {"m10", eImplicitPortType::Scalar}, + {"m11", eImplicitPortType::Scalar}, + {"m12", eImplicitPortType::Scalar}, + {"m13", eImplicitPortType::Scalar}, + {"m20", eImplicitPortType::Scalar}, + {"m21", eImplicitPortType::Scalar}, + {"m22", eImplicitPortType::Scalar}, + {"m23", eImplicitPortType::Scalar}, + {"m30", eImplicitPortType::Scalar}, + {"m31", eImplicitPortType::Scalar}, + {"m32", eImplicitPortType::Scalar}, + {"m33", eImplicitPortType::Scalar}}, + Out{{"result", eImplicitPortType::Matrix}}}}}}, + {eImplicitNodeType::MatrixFromColumns, + {"matrixfromcolumns", // 4x4 + {InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"A", eImplicitPortType::Vector}, + {"B", eImplicitPortType::Vector}, + {"C", eImplicitPortType::Vector}, + {"D", eImplicitPortType::Vector}}, + Out{{"result", eImplicitPortType::Matrix}}}}}}, + {eImplicitNodeType::MatrixFromRows, + { + "matrixfromrows", // 4x4 + {InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"A", eImplicitPortType::Vector}, + {"B", eImplicitPortType::Vector}, + {"C", eImplicitPortType::Vector}, + {"D", eImplicitPortType::Vector}}, + Out{{"result", eImplicitPortType::Matrix}}}}, + }}, + {eImplicitNodeType::Dot, + {"dot", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"A", eImplicitPortType::Vector}, + {"B", eImplicitPortType::Vector}}, + Out{{"result", eImplicitPortType::Scalar}}}, + }}}, + {eImplicitNodeType::Cross, + {"cross", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"A", eImplicitPortType::Vector}, + {"B", eImplicitPortType::Vector}}, + Out{{"result", eImplicitPortType::Vector}}}, + }}}, + {eImplicitNodeType::MatVecMultiplication, + {"matvecmultiplication", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"A", eImplicitPortType::Matrix}, + {"B", eImplicitPortType::Vector}}, + Out{{"result", eImplicitPortType::Vector}}}, + }}}, + {eImplicitNodeType::Transpose, + {"transpose", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"A", eImplicitPortType::Matrix}}, + Out{{"result", eImplicitPortType::Matrix}}}, + }}}, + {eImplicitNodeType::Inverse, + {"inverse", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"A", eImplicitPortType::Matrix}}, + Out{{"result", eImplicitPortType::Matrix}}}, + }}}, + {eImplicitNodeType::Sinus, + {"sin", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Cosinus, + {"cos", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Tan, + {"tan", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::ArcSin, + {"asin", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::ArcCos, + {"acos", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::ArcTan, + {"atan", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::ArcTan2, + {"atan2", twoParameterSameDimensions}}, + {eImplicitNodeType::Min, {"min", twoParameterSameDimensions}}, + {eImplicitNodeType::Max, {"max", twoParameterSameDimensions}}, + {eImplicitNodeType::Abs, + {"abs", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Fmod, {"fmod", twoParameterSameDimensions}}, + {eImplicitNodeType::Mod, {"mod", twoParameterSameDimensions}}, + {eImplicitNodeType::Pow, {"pow", twoParameterSameDimensions}}, + {eImplicitNodeType::Sqrt, + {"sqrt", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Exp, + {"exp", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Log, + {"log", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Log2, + {"log2", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Log10, + {"log10", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Cosh, + {"cosh", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Sinh, + {"sinh", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Tanh, + {"tanh", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Round, + {"round", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Ceil, + {"ceil", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Floor, + {"floor", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Sign, + {"sign", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Fract, + {"fract", oneParameterFunctionSameDimensions}}, + {eImplicitNodeType::Select, + {"select", // result = A < B ? C : D + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + In{{"A", eImplicitPortType::Scalar}, + {"B", eImplicitPortType::Scalar}, + {"C", eImplicitPortType::Scalar}, + {"D", eImplicitPortType::Scalar}}, + Out{{"result", eImplicitPortType::Scalar}}}, + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::VectorToVector, + In{{"A", eImplicitPortType::Vector}, + {"B", eImplicitPortType::Vector}, + {"C", eImplicitPortType::Vector}, + {"D", eImplicitPortType::Vector}}, + Out{{"result", eImplicitPortType::Vector}}}, + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::MatrixToMatrix, + In{{"A", eImplicitPortType::Matrix}, + {"B", eImplicitPortType::Matrix}, + {"C", eImplicitPortType::Matrix}, + {"D", eImplicitPortType::Matrix}}, + Out{{"result", eImplicitPortType::Matrix}}}, + + }}}, + {eImplicitNodeType::Clamp, // result = min(max(A, min), max) + {"clamp", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + In{{"A", eImplicitPortType::Scalar}, + {"min", eImplicitPortType::Scalar}, + {"max", eImplicitPortType::Scalar}}, + Out{{"result", eImplicitPortType::Scalar}}}, + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::VectorToVector, + In{{"A", eImplicitPortType::Vector}, + {"min", eImplicitPortType::Vector}, + {"max", eImplicitPortType::Vector}}, + Out{{"result", eImplicitPortType::Vector}}}, + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::MatrixToMatrix, + In{{"A", eImplicitPortType::Matrix}, + {"min", eImplicitPortType::Matrix}, + {"max", eImplicitPortType::Matrix}}, + Out{{"result", eImplicitPortType::Matrix}}}, + }}}, + {eImplicitNodeType::Length, + {"length", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"A", eImplicitPortType::Vector}}, + Out{{"result", eImplicitPortType::Scalar}}}, + }}}, + {eImplicitNodeType::VectorFromScalar, + {"vectorfromscalar", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"A", eImplicitPortType::Scalar}}, + Out{{"result", eImplicitPortType::Vector}}}, + }}}, + {eImplicitNodeType::ConstResourceID, + {"constresourceid", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, In{}, + Out{{"value", eImplicitPortType::ResourceID}}}, + }}}, + {eImplicitNodeType::Mesh, + {"mesh", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"pos", eImplicitPortType::Vector}, + {"mesh", eImplicitPortType::ResourceID}}, + Out{{"distance", eImplicitPortType::Scalar}}}, + }}}, + {eImplicitNodeType::UnsignedMesh, + {"mesh", + { + InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"pos", eImplicitPortType::Vector}, + {"mesh", eImplicitPortType::ResourceID}}, + Out{{"distance", eImplicitPortType::Scalar}}}, + }}}, + {eImplicitNodeType::FunctionCall, + {"functioncall", + {InputOutputRule{ + Lib3MF::eImplicitNodeConfiguration::Default, + In{{"functionID", + eImplicitPortType::ResourceID}}, // not predefined + // besides the + // functionID + Out{} // not predefined + }}}}}; + } + + NodeType const& NodeTypes::getNodeType( + Lib3MF::eImplicitNodeType type) const + { + auto it = m_nodeTypes.find(type); + if(it == m_nodeTypes.end()) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDNODECONFIGURATION, + "Unknown node type " + + std::to_string(static_cast(type))); + } + return it->second; + } + NodeTypesMap const& NodeTypes::getTypes() const + { + return m_nodeTypes; + } + + void NodeTypes::addExpectedPortsToNode( + NMR::CModelImplicitNode& node) const + { + auto const& nodeType = getNodeType(node.getNodeType()); + + if(nodeType.getAllowedInputOutputs().empty()) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDNODECONFIGURATION, + "No known configuration for node type " + + std::to_string(static_cast(node.getNodeType()))); + } + applyInputOutputRuleToNode( + node, nodeType.getAllowedInputOutputs().front()); + } + + void NodeTypes::addExpectedPortsToNode( + NMR::CModelImplicitNode& node, + Lib3MF::eImplicitNodeConfiguration const configuration) const + { + if(configuration == Lib3MF::eImplicitNodeConfiguration::Default) + { + addExpectedPortsToNode(node); + return; + } + + auto const& nodeType = getNodeType(node.getNodeType()); + if(nodeType.getAllowedInputOutputs().empty()) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDNODECONFIGURATION, + "No known configuration for node type " + + std::to_string(static_cast(node.getNodeType()))); + } + + if((nodeType.getAllowedInputOutputs().size() == 1u) && + configuration != Lib3MF::eImplicitNodeConfiguration::Default) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDNODECONFIGURATION, + "Node type: " + + std::to_string(static_cast(node.getNodeType())) + + " only supports the default configuration"); + } + + for(auto const& rule : nodeType.getAllowedInputOutputs()) + { + if(rule.configuration == configuration) + { + applyInputOutputRuleToNode(node, rule); + return; + } + } + + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDNODECONFIGURATION, + "Node type: " + + std::to_string(static_cast(node.getNodeType())) + + " does not support configuration: " + + std::to_string(static_cast(configuration))); + } + + void NodeTypes::applyInputOutputRuleToNode( + NMR::CModelImplicitNode& node, InputOutputRule const& rule) const + { + for(auto const& input : rule.inputs) + { + auto inPort = node.addInput(input.first, input.first); + inPort->setType(input.second); + } + for(auto const& output : rule.outputs) + { + auto outPort = node.addOutput(output.first, output.first); + outPort->setType(output.second); + } + } + + bool NodeTypes::arePortsValidForNode( + NMR::CModelImplicitNode const& node) const + { + auto const& nodeType = getNodeType(node.getNodeType()); + for(auto const& rule : nodeType.getAllowedInputOutputs()) + { + if(arePortsValidForRule(node, rule)) + { + return true; + } + } + return false; + } + + bool NodeTypes::arePortsValidForRule( + NMR::CModelImplicitNode const& node, + InputOutputRule const& rule) const + { + for(auto const& input : rule.inputs) + { + auto inPort = node.findInput(input.first); + if(inPort == nullptr) + { + return false; + } + if(inPort->getType() != input.second) + { + return false; + } + } + + for(auto const& output : rule.outputs) + { + auto outPort = node.findOutput(output.first); + if(outPort == nullptr) + { + return false; + } + if(outPort->getType() != output.second) + { + return false; + } + } + + return true; + } + + } // namespace implicit + +} // namespace NMR diff --git a/Source/Model/Classes/NMR_Model.cpp b/Source/Model/Classes/NMR_Model.cpp index a2a957f16..65b5d45f0 100644 --- a/Source/Model/Classes/NMR_Model.cpp +++ b/Source/Model/Classes/NMR_Model.cpp @@ -45,9 +45,13 @@ A model is an in memory representation of the 3MF file. #include "Model/Classes/NMR_ModelCompositeMaterials.h" #include "Model/Classes/NMR_ModelMultiPropertyGroup.h" #include "Model/Classes/NMR_ModelTexture2D.h" +#include "Model/Classes/NMR_ModelImage3D.h" +#include "Model/Classes/NMR_ModelImageStack.h" #include "Model/Classes/NMR_ModelSliceStack.h" #include "Model/Classes/NMR_ModelMetaDataGroup.h" #include "Model/Classes/NMR_KeyStore.h" +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Model/Classes/NMR_ModelFunctionFromImage3D.h" #include "Common/Mesh/NMR_Mesh.h" #include "Common/MeshInformation/NMR_MeshInformation.h" @@ -396,22 +400,34 @@ namespace NMR { } } - ModelResourceID CModel::generateResourceID() - { - // Determine the initial resource ID - ModelResourceID currentResourceID = 1; - auto iIterator = m_ResourceMap.rbegin(); - if (iIterator != m_ResourceMap.rend()) { - currentResourceID = iIterator->first + 1; - } + // Retrieve a unique Resource ID + ModelResourceID CModel::generateResourceID() + { + ModelResourceID highestID = 0; + + if(m_ResourceMap.empty()) + { + return 1; + } + + // find the lowest unoccupied ModelResourceID + std::unordered_set occupiedIDs; + for(const auto &entry : m_ResourceMap) + { + occupiedIDs.insert( + entry.second->getPackageResourceID()->getModelResourceID()); + } - // Ensure the generated ID is unique - if(currentResourceID <= m_MaxResourceId) { - currentResourceID = m_MaxResourceId + 1; + ModelResourceID newResourceID = 1; + + // Loop until we find an unoccupied resource ID + while(occupiedIDs.find(newResourceID) != occupiedIDs.end()) + { + ++newResourceID; } - return currentResourceID; - } + return newResourceID; + } void CModel::updateUniqueResourceID(UniqueResourceID nOldID, UniqueResourceID nNewID) { @@ -541,6 +557,24 @@ namespace NMR { CModelSliceStack *pSliceStack = dynamic_cast(pResource.get()); if (pSliceStack != nullptr) m_SliceStackLookup.push_back(pResource); + + CModelImage3D* pImage3d = dynamic_cast(pResource.get()); + if (pImage3d != nullptr) + m_Image3DLookup.push_back(pResource); + + + CModelImplicitFunction* pImplicitFunction = dynamic_cast(pResource.get()); + if (pImplicitFunction != nullptr) + m_FunctionLookup.push_back(pResource); + + CModelFunctionFromImage3D* pFunctionFromImage3D = dynamic_cast(pResource.get()); + if (pFunctionFromImage3D != nullptr) + m_FunctionLookup.push_back(pResource); + + CModelVolumeData* pVolumeData = dynamic_cast(pResource.get()); + if (pVolumeData != nullptr) + m_VolumeDataLookup.push_back(pResource); + } // Clear all build items and Resources @@ -559,8 +593,12 @@ namespace NMR { m_SliceStackLookup.clear(); m_CompositeMaterialsLookup.clear(); m_MultiPropertyGroupLookup.clear(); + m_Image3DLookup.clear(); m_MetaDataGroup->clear(); + + m_FunctionLookup.clear(); + m_VolumeDataLookup.clear(); } _Ret_maybenull_ PModelBaseMaterialResource CModel::findBaseMaterial(_In_ PPackageResourceID pID) @@ -927,7 +965,225 @@ namespace NMR { oldToNewMapping[pTextureResource->getPackageResourceID()->getUniqueID()] = pNewTextureResource->getPackageResourceID()->getUniqueID(); } } - + + // Convenience functions for 3D Textures + PModelImage3D CModel::findImage3D(_In_ UniqueResourceID nResourceID) + { + PModelResource pResource = findResource(nResourceID); + if (pResource != nullptr) { + PModelImage3D pImage3DResource = std::dynamic_pointer_cast(pResource); + if (pImage3DResource.get() == nullptr) + throw CNMRException(NMR_ERROR_RESOURCETYPEMISMATCH); + return pImage3DResource; + } + return nullptr; + } + + // Convenience functions for 3D Textures + PModelImageStack CModel::findImageStack(_In_ UniqueResourceID nResourceID) + { + PModelResource pResource = findResource(nResourceID); + if (pResource != nullptr) { + PModelImageStack pImageStack = std::dynamic_pointer_cast(pResource); + if (pImageStack.get() == nullptr) + throw CNMRException(NMR_ERROR_RESOURCETYPEMISMATCH); + return pImageStack; + } + return nullptr; + } + + nfUint32 CModel::getImage3DCount() + { + return (nfUint32)m_Image3DLookup.size(); + } + + PModelResource CModel::getImage3DResource(_In_ nfUint32 nIndex) + { + nfUint32 nCount = getImage3DCount(); + if (nIndex >= nCount) + throw CNMRException(NMR_ERROR_INVALIDINDEX); + + return m_Image3DLookup[nIndex]; + + } + + CModelImage3D * CModel::getImage3D(_In_ nfUint32 nIndex) + { + CModelImage3D * pImage3D = dynamic_cast (getImage3DResource(nIndex).get()); + if (pImage3D == nullptr) + throw CNMRException(NMR_ERROR_RESOURCETYPEMISMATCH); + + return pImage3D; + + } + + void CModel::mergeImage3Ds(_In_ CModel * pSourceModel, _In_ UniqueResourceIDMapping& oldToNewMapping) + { + if (pSourceModel == nullptr) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + nfUint32 nCount = pSourceModel->getImage3DCount(); + nfUint32 nIndex; + + for (nIndex = 0; nIndex < nCount; nIndex++) + { + CModelImage3D* pOldImage3D = pSourceModel->getImage3D(nIndex); + if (pOldImage3D == nullptr) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + CModelImageStack* pOldImageStack = dynamic_cast(pOldImage3D); + if (pOldImageStack) + { + nfUint32 nSheetCount = pOldImageStack->getSheetCount();; + nfUint32 nIndex; + PModelImageStack pNewImageStack = CModelImageStack::make(generateResourceID(), this, pOldImageStack->getRowCount(), pOldImageStack->getColumnCount(), nSheetCount); + + for (nIndex = 0; nIndex < nSheetCount; nIndex++) { + PModelAttachment pSheet = pOldImageStack->getSheet(nIndex); + if (pSheet.get() != nullptr) { + PModelAttachment pNewSheet = findModelAttachment(pSheet->getPathURI()); + if (pNewSheet.get() == nullptr) + throw CNMRException(NMR_ERROR_ATTACHMENTNOTFOUND); + + pNewImageStack->setSheet(nIndex, pNewSheet); + } + } + + addResource(pNewImageStack); + + oldToNewMapping[pOldImageStack->getPackageResourceID()->getUniqueID()] = pNewImageStack->getPackageResourceID()->getUniqueID(); + } + else + { + throw CNMRException(NMR_ERROR_NOTIMPLEMENTED); + } + } + } + + void CModel::mergeFunctions(CModel *pSourceModel, + UniqueResourceIDMapping &oldToNewMapping) + { + if (pSourceModel == nullptr) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + nfUint32 previousTargetFunctionCount = getFunctionCount(); + + nfUint32 nCount = pSourceModel->getFunctionCount(); + nfUint32 nIndex; + + for (nIndex = 0; nIndex < nCount; nIndex++) + { + CModelFunctionFromImage3D *pOldFunctionFromImage3D = pSourceModel->getFunctionFromImage3D(nIndex); + CModelImplicitFunction *pOldImplicitFunction = pSourceModel->getImplicitFunction(nIndex); + + if (pOldFunctionFromImage3D) + { + PModelFunctionFromImage3D pNewFunctionFromImage3D = std::make_shared(*pOldFunctionFromImage3D); + auto newPkgId = generatePackageResourceID(currentPath(), generateResourceID()); + pNewFunctionFromImage3D->setModel(nullptr); // Hack: Allows us to set the package resource ID without updating the model + pNewFunctionFromImage3D->setPackageResourceID(newPkgId); + pNewFunctionFromImage3D->setModel(this); + + + // Update the referenced image3D resource ID + auto newIdIter = oldToNewMapping.find(pOldFunctionFromImage3D->getImage3DUniqueResourceID()); + if (newIdIter != oldToNewMapping.cend()) + { + auto const newId = findPackageResourceID(newIdIter->second); + if (!newId) + { + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND); + } + pNewFunctionFromImage3D->setImage3DUniqueResourceID(newId->getUniqueID()); + } + else + { + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND); + } + + addResource(pNewFunctionFromImage3D); + oldToNewMapping[pOldFunctionFromImage3D->getPackageResourceID()->getUniqueID()] = pNewFunctionFromImage3D->getPackageResourceID()->getUniqueID(); + } + else if (pOldImplicitFunction) + { + PModelImplicitFunction pNewImplicitFunction = std::make_shared(*pOldImplicitFunction); + + + auto newPkgId = generatePackageResourceID(currentPath(), generateResourceID()); + pNewImplicitFunction->setModel(nullptr); // Hack: Allows us to set the package resource ID without updating the model + pNewImplicitFunction->setPackageResourceID(newPkgId); + pNewImplicitFunction->setModel(this); + + for (auto &node : *pNewImplicitFunction->getNodes()) + { + node->setParent(pNewImplicitFunction.get()); + } + + addResource(pNewImplicitFunction); + oldToNewMapping[pOldImplicitFunction->getPackageResourceID()->getUniqueID()] = pNewImplicitFunction->getPackageResourceID()->getUniqueID(); + + // std::cout << "Merged implicit function (unique ids) " << pOldImplicitFunction->getPackageResourceID()->getUniqueID() << " to " << pNewImplicitFunction->getPackageResourceID()->getUniqueID() << std::endl; + + // std::cout << "Merged implicit function (model resource ids) " << pOldImplicitFunction->getPackageResourceID()->getModelResourceID() << " to " << pNewImplicitFunction->getPackageResourceID()->getModelResourceID() << std::endl; + } + else + { + throw CNMRException(NMR_ERROR_NOTIMPLEMENTED); + } + } + + nCount = getFunctionCount(); + + // loop over all newly added functions and update the references in ConstResourceID nodes + for (nIndex = previousTargetFunctionCount; nIndex < nCount; nIndex++) + { + CModelImplicitFunction * pImplicitFunction = getImplicitFunction(nIndex); + + for (auto & node : *pImplicitFunction->getNodes()) + { + if (node->getNodeType() == Lib3MF::eImplicitNodeType::ConstResourceID) + { + auto const oldId = pSourceModel->findPackageResourceID(pSourceModel->currentPath(), node->getModelResourceID()); + if (!oldId) + { + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND, "Resource ID " + std::to_string(node->getModelResourceID()) + + " not found in source model, this might happen when the file contains forward references"); + } + + auto const newIdIter = oldToNewMapping.find(oldId->getUniqueID()); + if (newIdIter == oldToNewMapping.cend()) + { + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND, "Resource ID " + std::to_string(oldId->getUniqueID()) + " not found in mapping"); + } + + auto const newId = findPackageResourceID(newIdIter->second); + if (!newId) + { + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND); + } + + node->setModelResourceID(newId->getModelResourceID()); + + + // check if the resource is available + auto res = findResource(currentPath(), newId->getModelResourceID()); + if (!res) + { + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND); + } + + auto resource = node->getResource(); + if (!resource) + { + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND); + + } + } + } + } + + } + nfUint32 CModel::createHandle() { if (m_nHandleCounter >= NMR_MAXHANDLE) @@ -1233,7 +1489,34 @@ namespace NMR { return false; } - return false; + if(sExtension == XML_3MF_NAMESPACE_VOLUMETRICSPEC) + { + for(size_t i = 0; i < m_ObjectLookup.size(); i++) + { + CModelMeshObject *pMeshObject = + dynamic_cast( + m_ObjectLookup[i].get()); + if(pMeshObject == nullptr || + pMeshObject->getMesh() == nullptr) + continue; + + auto volumeData = pMeshObject->getVolumeData(); + if (!volumeData) + continue; + + if (volumeData->hasColor() || volumeData->getPropertyCount() > 0 || volumeData->hasComposite()) + { + return true; + } + } + } + + if (sExtension == XML_3MF_NAMESPACE_IMPLICITSPEC) + { + if (m_FunctionLookup.size() > 0) + return true; + } + return false; } nfUint32 CModel::getSliceStackCount() { @@ -1325,4 +1608,214 @@ namespace NMR { return size; } -} + ModelResourceID CModel::getMaxModelResourceID() + { + auto maxResourceID = std::max_element( + m_Resources.begin(), m_Resources.end(), + [](const PModelResource &a, const PModelResource &b) + { + return a->getPackageResourceID()->getModelResourceID() < + b->getPackageResourceID()->getModelResourceID(); + }); + if(maxResourceID == m_Resources.end()) return 0; + + return (*maxResourceID)->getPackageResourceID()->getModelResourceID(); + } + + PModelFunction CModel::findFunction(_In_ UniqueResourceID nResourceID) + { + for(size_t i = 0; i < m_FunctionLookup.size(); i++) + { + PModelFunction pFunction = + std::dynamic_pointer_cast( + m_FunctionLookup[i]); + if(pFunction->getPackageResourceID()->getUniqueID() == + nResourceID) + return pFunction; + } + return nullptr; + } + + nfUint32 CModel::getFunctionCount() { + return (nfUint32)m_FunctionLookup.size(); + } + + PModelResource CModel::getFunctionResource(_In_ nfUint32 nIndex) { + nfUint32 nCount = getFunctionCount(); + if (nIndex >= nCount) + throw CNMRException(NMR_ERROR_INVALIDINDEX); + + return m_FunctionLookup[nIndex]; + } + + CModelImplicitFunction* CModel::getImplicitFunction(_In_ nfUint32 nIndex) { + PModelResource pResource = getFunctionResource(nIndex); + if (pResource.get() == nullptr) + throw CNMRException(NMR_ERROR_INVALIDINDEX); + + return dynamic_cast(pResource.get()); + } + + CModelFunctionFromImage3D * CModel::getFunctionFromImage3D(nfUint32 nIndex) + { + PModelResource pResource = getFunctionResource(nIndex); + if (pResource.get() == nullptr) + throw CNMRException(NMR_ERROR_INVALIDINDEX); + + return dynamic_cast(pResource.get()); + } + + PModelVolumeData CModel::findVolumeData(UniqueResourceID nResourceID) + { + for(size_t i = 0; i < m_VolumeDataLookup.size(); i++) + { + PModelVolumeData pVolumeData = + std::dynamic_pointer_cast( + m_VolumeDataLookup[i]); + if(pVolumeData->getPackageResourceID()->getUniqueID() == + nResourceID) + return pVolumeData; + } + return nullptr; + } + + nfUint32 NMR::CModel::getVolumeDataCount() + { + return (nfUint32)m_VolumeDataLookup.size(); + } + + PModelResource CModel::getVolumeDataResource(nfUint32 nIndex) + { + nfUint32 nCount = getVolumeDataCount(); + if (nIndex >= nCount) + throw CNMRException(NMR_ERROR_INVALIDINDEX); + + return m_VolumeDataLookup[nIndex]; + } + + CModelVolumeData * CModel::getVolumeData(nfUint32 nIndex) + { + PModelResource pResource = getVolumeDataResource(nIndex); + if (pResource.get() == nullptr) + throw CNMRException(NMR_ERROR_INVALIDINDEX); + + return dynamic_cast(pResource.get()); + } + + + void CModel::removeResource(PModelResource pResource) + { + if (pResource.get() == nullptr) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + // Remove from resource list + auto resourceIterator = std::find(m_Resources.begin(), m_Resources.end(), pResource); + if (resourceIterator == m_Resources.end()) + { + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND); + + } + + m_Resources.erase(resourceIterator); + + // Remove from Resource map + auto resourceMapIterator = m_ResourceMap.find(pResource->getPackageResourceID()->getUniqueID()); + if (resourceMapIterator == m_ResourceMap.end()) + { + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND); + } + + m_ResourceMap.erase(resourceMapIterator); + + m_resourceHandler.removePackageResourceID(pResource->getPackageResourceID()); + + // Remove from specific resource lists + + auto objectIterator = std::find(m_ObjectLookup.begin(), m_ObjectLookup.end(), pResource); + if (objectIterator != m_ObjectLookup.end()) + { + m_ObjectLookup.erase(objectIterator); + return; + } + + auto baseMaterialIterator = std::find(m_BaseMaterialLookup.begin(), m_BaseMaterialLookup.end(), pResource); + if (baseMaterialIterator != m_BaseMaterialLookup.end()) + { + m_BaseMaterialLookup.erase(baseMaterialIterator); + return; + } + + auto textureIterator = std::find(m_TextureLookup.begin(), m_TextureLookup.end(), pResource); + if (textureIterator != m_TextureLookup.end()) + { + m_TextureLookup.erase(textureIterator); + return; + } + + auto sliceStackIterator = std::find(m_SliceStackLookup.begin(), m_SliceStackLookup.end(), pResource); + if (sliceStackIterator != m_SliceStackLookup.end()) + { + m_SliceStackLookup.erase(sliceStackIterator); + return; + } + + auto colorGroupIterator = std::find(m_ColorGroupLookup.begin(), m_ColorGroupLookup.end(), pResource); + if (colorGroupIterator != m_ColorGroupLookup.end()) + { + m_ColorGroupLookup.erase(colorGroupIterator); + return; + } + + auto texture2DGroupIterator = std::find(m_Texture2DGroupLookup.begin(), m_Texture2DGroupLookup.end(), pResource); + if (texture2DGroupIterator != m_Texture2DGroupLookup.end()) + { + m_Texture2DGroupLookup.erase(texture2DGroupIterator); + return; + } + + auto compositeMaterialsIterator = std::find(m_CompositeMaterialsLookup.begin(), m_CompositeMaterialsLookup.end(), pResource); + if (compositeMaterialsIterator != m_CompositeMaterialsLookup.end()) + { + m_CompositeMaterialsLookup.erase(compositeMaterialsIterator); + return; + } + + auto multiPropertyGroupIterator = std::find(m_MultiPropertyGroupLookup.begin(), m_MultiPropertyGroupLookup.end(), pResource); + if (multiPropertyGroupIterator != m_MultiPropertyGroupLookup.end()) + { + m_MultiPropertyGroupLookup.erase(multiPropertyGroupIterator); + return; + } + + auto image3DIterator = std::find(m_Image3DLookup.begin(), m_Image3DLookup.end(), pResource); + if (image3DIterator != m_Image3DLookup.end()) + { + m_Image3DLookup.erase(image3DIterator); + return; + } + + auto functionIterator = std::find(m_FunctionLookup.begin(), m_FunctionLookup.end(), pResource); + if (functionIterator != m_FunctionLookup.end()) + { + m_FunctionLookup.erase(functionIterator); + return; + } + + auto volumeDataIterator = std::find(m_VolumeDataLookup.begin(), m_VolumeDataLookup.end(), pResource); + if (volumeDataIterator != m_VolumeDataLookup.end()) + { + m_VolumeDataLookup.erase(volumeDataIterator); + return; + } + + auto levelSetObjectIterator = std::find(m_levelSetObjectLookup.begin(), m_levelSetObjectLookup.end(), pResource); + if (levelSetObjectIterator != m_levelSetObjectLookup.end()) + { + m_levelSetObjectLookup.erase(levelSetObjectIterator); + return; + } + + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND); + } +} // namespace NMR + diff --git a/Source/Model/Classes/NMR_ModelAttachment.cpp b/Source/Model/Classes/NMR_ModelAttachment.cpp index 68e851d7f..d36f9d90b 100644 --- a/Source/Model/Classes/NMR_ModelAttachment.cpp +++ b/Source/Model/Classes/NMR_ModelAttachment.cpp @@ -82,6 +82,20 @@ namespace NMR { m_sRelationShipType = sRelationShipType; } + PModelAttachment CModelAttachment::cloneIntoNewModel(_In_ CModel * pModel, _In_ nfBool bCloneMemory) + { + PImportStream pNewStream; + if (m_pStream.get() != nullptr) { + if (bCloneMemory) { + pNewStream = m_pStream->copyToMemory(); + } + else { + pNewStream = m_pStream; + } + } + + return pModel->addAttachment (m_sPathURI, m_sRelationShipType, pNewStream); + } } diff --git a/Source/Model/Classes/NMR_ModelComponentsObject.cpp b/Source/Model/Classes/NMR_ModelComponentsObject.cpp index d77b8a369..b2f71f891 100644 --- a/Source/Model/Classes/NMR_ModelComponentsObject.cpp +++ b/Source/Model/Classes/NMR_ModelComponentsObject.cpp @@ -149,8 +149,26 @@ namespace NMR { void CModelComponentsObject::extendOutbox(_Out_ NOUTBOX3& vOutBox, _In_ const NMATRIX3 mAccumulatedMatrix) { - for (auto iIterator = m_Components.begin(); iIterator != m_Components.end(); iIterator++) { - (*iIterator)->getObject()->extendOutbox(vOutBox, fnMATRIX3_multiply(mAccumulatedMatrix, (*iIterator)->getTransform())); + for(auto & component : m_Components) + { + component->getObject()->extendOutbox(vOutBox, fnMATRIX3_multiply(mAccumulatedMatrix, component->getTransform())); } } -} + + ResourceDependencies CModelComponentsObject::getDependencies() + { + ResourceDependencies dependencies; + + for(auto & component : m_Components) + { + auto objectResource = component->getObject(); + + if (objectResource) + { + dependencies.push_back(objectResource->getPackageResourceID()); + } + } + + return dependencies; + } +} // namespace NMR diff --git a/Source/Model/Classes/NMR_ModelFunction.cpp b/Source/Model/Classes/NMR_ModelFunction.cpp new file mode 100644 index 000000000..6268beff6 --- /dev/null +++ b/Source/Model/Classes/NMR_ModelFunction.cpp @@ -0,0 +1,112 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification,276529 +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#include "Model/Classes/NMR_ModelFunction.h" + +#include "Common/NMR_Exception.h" + +namespace NMR +{ + + CModelFunction::CModelFunction(const ModelResourceID sID, CModel * pModel) + : CModelResource(sID, pModel) + { + m_inputs = std::make_shared(); + m_outputs = std::make_shared(); + } + + std::string const & CModelFunction::getDisplayName() const + { + return m_displayname; + } + + void CModelFunction::setDisplayName(std::string const & displayname) + { + m_displayname = displayname; + } + + PModelImplicitPort CModelFunction::addInput(const std::string & sPortIdentifier, + const std::string & sDisplayName, + const Lib3MF::eImplicitPortType ePortType) + { + auto newPort = + std::make_shared(sPortIdentifier, sDisplayName, ePortType); + m_inputs->push_back(newPort); + return newPort; + } + + PModelImplicitPort CModelFunction::addOutput(const std::string & sPortIdentifier, + const std::string & sDisplayName, + const Lib3MF::eImplicitPortType ePortType) + { + auto newPort = + std::make_shared(sPortIdentifier, sDisplayName, ePortType); + m_outputs->push_back(newPort); + return newPort; + } + + PPorts const& CModelFunction::getInputs() const + { + return m_inputs; + } + + PPorts const& CModelFunction::getOutputs() const + { + return m_outputs; + } + + PModelImplicitPort CModelFunction::findInput(const std::string & sIdentifier) const + { + for (auto & port : *m_inputs) + { + if (port->getIdentifier() == sIdentifier) + { + return port; + } + } + return {}; + } + + PModelImplicitPort CModelFunction::findOutput(const std::string & sIdentifier) const + { + for (auto & port : *m_outputs) + { + if (port->getIdentifier() == sIdentifier) + { + return port; + } + } + return {}; + } + + void CModelFunction::clear() + { + m_inputs->clear(); + m_outputs->clear(); + } +} diff --git a/Source/Model/Classes/NMR_ModelFunctionFromImage3D.cpp b/Source/Model/Classes/NMR_ModelFunctionFromImage3D.cpp new file mode 100644 index 000000000..d33ff3063 --- /dev/null +++ b/Source/Model/Classes/NMR_ModelFunctionFromImage3D.cpp @@ -0,0 +1,134 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification,276529 +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#include "Model/Classes/NMR_ModelFunctionFromImage3D.h" + +namespace NMR +{ + NMR::CModelFunctionFromImage3D::CModelFunctionFromImage3D(const ModelResourceID sID, + CModel * pModel) + : CModelFunction(sID, pModel) + { + } + + void CModelFunctionFromImage3D::setImage3DUniqueResourceID(const UniqueResourceID sID) + { + m_image3DUniqueResourceID = sID; + } + + UniqueResourceID CModelFunctionFromImage3D::getImage3DUniqueResourceID() + { + return m_image3DUniqueResourceID; + } + + void CModelFunctionFromImage3D::setImage3DModelResourceID( + const ModelResourceID modelResoureId) + { + auto * model = getModel(); + PModelResource pResource = model->findResource(model->currentPath(), modelResoureId); + if (pResource == nullptr) + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND); + m_image3DUniqueResourceID = pResource->getPackageResourceID()->getUniqueID(); + } + + ModelResourceID CModelFunctionFromImage3D::getImage3DModelResourceID() + { + auto * model = getModel(); + PModelResource pResource = model->findResource(m_image3DUniqueResourceID); + if (pResource == nullptr) + throw CNMRException(NMR_ERROR_RESOURCENOTFOUND); + auto const modelResId = pResource->getPackageResourceID()->getModelResourceID(); + if (modelResId != 2) // for debugging only + { + return modelResId; + } + + return modelResId; + } + + void CModelFunctionFromImage3D::setTileStyleU( + const eModelTextureTileStyle tileStyleU) + { + m_tileStyleU = tileStyleU; + } + + eModelTextureTileStyle CModelFunctionFromImage3D::getTileStyleU() + { + return m_tileStyleU; + } + + void CModelFunctionFromImage3D::setTileStyleV(const eModelTextureTileStyle tileStyleV) + { + m_tileStyleV = tileStyleV; + } + + eModelTextureTileStyle CModelFunctionFromImage3D::getTileStyleV() + { + return m_tileStyleV; + } + + void CModelFunctionFromImage3D::setTileStyleW(const eModelTextureTileStyle tileStyleW) + { + m_tileStyleW = tileStyleW; + } + + eModelTextureTileStyle CModelFunctionFromImage3D::getTileStyleW() + { + return m_tileStyleW; + } + + void CModelFunctionFromImage3D::setFilter(const eModelTextureFilter filter) + { + m_filter = filter; + } + + eModelTextureFilter CModelFunctionFromImage3D::getFilter() + { + return m_filter; + } + + void CModelFunctionFromImage3D::setOffset(double offset) + { + m_offset = offset; + } + + double CModelFunctionFromImage3D::getOffset() + { + return m_offset; + } + + void CModelFunctionFromImage3D::setScale(double scale) + { + m_scale = scale; + } + + double CModelFunctionFromImage3D::getScale() + { + return m_scale; + } +} // namespace NMR \ No newline at end of file diff --git a/Source/Model/Classes/NMR_ModelImage3D.cpp b/Source/Model/Classes/NMR_ModelImage3D.cpp new file mode 100644 index 000000000..e243c8eb6 --- /dev/null +++ b/Source/Model/Classes/NMR_ModelImage3D.cpp @@ -0,0 +1,59 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_ModelImage3D.cpp implements a 3D image for the volumetric extension + +--*/ + +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelImage3D.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_StringUtils.h" +#include +#include + +namespace NMR { + + + CModelImage3D::CModelImage3D(_In_ const ModelResourceID sID, _In_ CModel* pModel) + : CModelResource(sID, pModel) + { + + } + + std::string CModelImage3D::getName() const + { + return m_sName; + } + + void CModelImage3D::setName(_In_ std::string sName) + { + m_sName = sName; + } +} diff --git a/Source/Model/Classes/NMR_ModelImageStack.cpp b/Source/Model/Classes/NMR_ModelImageStack.cpp new file mode 100644 index 000000000..491f6a903 --- /dev/null +++ b/Source/Model/Classes/NMR_ModelImageStack.cpp @@ -0,0 +1,130 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_ModelImageStack.cpp implements an image stack for the volumetric extension + +--*/ + +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelImageStack.h" +#include "Model/Classes/NMR_ModelAttachment.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_StringUtils.h" +#include +#include + +namespace NMR { + + CModelImageStack::CModelImageStack(_In_ const ModelResourceID sID, _In_ CModel* pModel, _In_ nfUint32 nRowCount, _In_ nfUint32 nColumCount, nfUint32 nSheetCount) + : CModelImage3D(sID, pModel), m_nRowCount(nRowCount), m_nColumnCount(nColumCount), m_nSheetCount(nSheetCount) + { + m_Sheets.resize(m_nSheetCount); + } + + PModelImageStack CModelImageStack::make(_In_ const ModelResourceID sID, _In_ CModel* pModel, _In_ nfUint32 nRowCount, _In_ nfUint32 nColumCount, nfUint32 nSheetCount) + { + if (!pModel) + throw CNMRException(NMR_ERROR_INVALIDPOINTER); + if (nRowCount > MAX_IMAGESTACK_SIZE) + throw CNMRException(NMR_ERROR_INVALIDIMAGE3DSIZE); + if (nColumCount > MAX_IMAGESTACK_SIZE) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + if (nSheetCount > MAX_IMAGESTACK_SIZE) + throw CNMRException(MAX_IMAGESTACK_SIZE); + + return std::make_shared(CModelImageStack(sID, pModel, nRowCount, nColumCount, nSheetCount)); + } + + nfUint32 CModelImageStack::getRowCount() const + { + return m_nRowCount; + } + + nfUint32 CModelImageStack::getColumnCount() const + { + return m_nColumnCount; + } + + nfUint32 CModelImageStack::getSheetCount() const + { + return m_nSheetCount; + } + + void CModelImageStack::setRowCount(nfUint32 nRowCount) + { + if ((nRowCount == 0) || (nRowCount > MAX_IMAGESTACK_SIZE)) + throw CNMRException(NMR_ERROR_INVALIDIMAGE3DSIZE); + m_nRowCount = nRowCount; + } + + void CModelImageStack::setColumnCount(nfUint32 nColumnCount) + { + if ((nColumnCount == 0) || (nColumnCount > MAX_IMAGESTACK_SIZE)) + throw CNMRException(NMR_ERROR_INVALIDIMAGE3DSIZE); + m_nColumnCount = nColumnCount; + } + + void CModelImageStack::setSheetCount(nfUint32 nSheetCount) + { + if ((nSheetCount == 0) || (nSheetCount > MAX_IMAGESTACK_SIZE)) + throw CNMRException(NMR_ERROR_INVALIDIMAGE3DSIZE); + m_nSheetCount = nSheetCount; + m_Sheets.resize(m_nSheetCount); + } + + void CModelImageStack::setSheet(nfUint32 nSheetIndex, PModelAttachment pAttachment) + { + if (!pAttachment.get()) + throw CNMRException(NMR_ERROR_INVALIDTEXTURE); + if (pAttachment->getRelationShipType() != PACKAGE_TEXTURE_RELATIONSHIP_TYPE) + throw CNMRException(NMR_ERROR_INVALIDRELATIONSHIPTYPEFORTEXTURE); + if (nSheetIndex >= m_nSheetCount) + throw CNMRException(NMR_ERROR_INVALIDINDEX); + + if (pAttachment->getModel() != getModel()) + throw CNMRException(NMR_ERROR_ATTACHMENTMODELMISMATCH); + + m_Sheets[nSheetIndex] = pAttachment; + } + + PModelAttachment CModelImageStack::getSheet(nfUint32 nSheetIndex) + { + if (nSheetIndex >= m_nSheetCount) + throw CNMRException(NMR_ERROR_INVALIDINDEX); + return m_Sheets[nSheetIndex]; + } + + PModelAttachment CModelImageStack::createSheet(nfUint32 nSheetIndex, const std::string& sPath, PImportStream pCopiedStream) + { + PModelAttachment pAttachment = getModel()->addAttachment(sPath, PACKAGE_TEXTURE_RELATIONSHIP_TYPE, pCopiedStream); + setSheet(nSheetIndex, pAttachment); + return pAttachment; + } + +} diff --git a/Source/Model/Classes/NMR_ModelImplicitFunction.cpp b/Source/Model/Classes/NMR_ModelImplicitFunction.cpp new file mode 100644 index 000000000..448ccb208 --- /dev/null +++ b/Source/Model/Classes/NMR_ModelImplicitFunction.cpp @@ -0,0 +1,475 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification,276529 +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#include "Model/Classes/NMR_ModelImplicitFunction.h" + +#include "Common/NMR_Exception.h" +#include "lib3mf_interfaceexception.hpp" +#include "lib3mf_types.hpp" +#include "Model/Classes/NMR_ImplicitNodeTypes.h" +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Model/Classes/NMR_ModelImplicitPort.h" +#include "Common/Graph/GraphAlgorithms.h" +#include "Common/Graph/DirectedGraph.h" + +#include +#include + +namespace NMR +{ + const implicit::NodeTypes CModelImplicitFunction::m_nodeTypes; + + CModelImplicitNode * + CModelImplicitFunction::findNode(const ImplicitIdentifier & sIdentifier) const + { + for (auto & node : *m_nodes) + { + if (node->getIdentifier() == sIdentifier) + { + return node.get(); + } + } + return nullptr; + } + + CModelImplicitFunction::CModelImplicitFunction(const ModelResourceID sID, + CModel* pModel) + : CModelFunction(sID, pModel) + { + m_nodes = std::make_shared(); + } + + std::string const & CModelImplicitFunction::getIdentifier() const + { + return m_identifier; + } + + void CModelImplicitFunction::setIdentifier(std::string const & identifier) + { + m_identifier = identifier; + } + + PModelImplicitNode CModelImplicitFunction::addNode(const Lib3MF::eImplicitNodeType eNodeType, + const Lib3MF::eImplicitNodeConfiguration eConfiguration, + const std::string & sIdentifier, + const std::string & sDisplayName, + const std::string & sTag) + { + auto node = std::make_shared(eNodeType, sIdentifier, sDisplayName, sTag, this); + + m_nodeTypes.addExpectedPortsToNode(*node, eConfiguration); + m_nodes->push_back(node); + return node; + } + + PModelImplicitNode CModelImplicitFunction::addNode(const Lib3MF::eImplicitNodeType eNodeType, const Lib3MF::eImplicitNodeConfiguration eConfiguration) + { + return addNode(eNodeType, eConfiguration, "", "", ""); + } + + PImplicitNodes NMR::CModelImplicitFunction::getNodes() const + { + return m_nodes; + } + + void NMR::CModelImplicitFunction::addLink( + const ImplicitIdentifier& sSourceNodeIdentifier, + const ImplicitIdentifier& sTargetNodeIdentifier) + + { + auto const sourceNodeName = extractNodeName(sSourceNodeIdentifier); + + PModelImplicitPort sourcePort; + if(sourceNodeName == "inputs") + { + auto const sourcePortName = extractPortName(sSourceNodeIdentifier); + sourcePort = findInput(sourcePortName); + } + else + { + auto const sourceNode = findNode(sourceNodeName); + if(sourceNode == nullptr) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDPARAM, + "Source node " + sourceNodeName + " does not exist."); + } + auto const sourcePortName = extractPortName(sSourceNodeIdentifier); + if(sourcePortName.empty()) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDPARAM, + "Source port " + sourcePortName + " of node " + + sourceNodeName + " does not exist."); + } + sourcePort = sourceNode->findOutput(sourcePortName); + } + if(!sourcePort) + { + throw CNMRException( + NMR_ERROR_IMPLICIT_FUNCTION_INVALID_SOURCE_PORT); + } + + auto const targetNodeName = extractNodeName(sTargetNodeIdentifier); + auto const targetPortName = extractPortName(sTargetNodeIdentifier); + NMR::PModelImplicitPort targetPort; + if(targetNodeName == "outputs") + { + targetPort = findOutput(targetPortName); + } + else + { + auto const targetNode = findNode(targetNodeName); + if(targetNode == nullptr) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDPARAM, + "Target node " + targetNodeName + " does not exist."); + } + + if(targetPortName.empty()) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDPARAM, + "Target port " + targetPortName + " of node " + + targetNodeName + " does not exist."); + } + + targetPort = targetNode->findInput(targetPortName); + } + + if(!targetPort) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDPARAM, + "Target port " + targetPortName + " of node " + + targetNodeName + " does not exist."); + } + + if(sourcePort->getType() != targetPort->getType()) + { + std::string sourceNodeIdentifier = "function inputs"; + std::string targetNodeIdentifier = "function outputs"; + + if(sourcePort->getParent()) + { + sourceNodeIdentifier = sourcePort->getParent()->getIdentifier(); + } + + if(targetPort->getParent()) + { + targetNodeIdentifier = targetPort->getParent()->getIdentifier(); + } + + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INCOMPATIBLEPORTTYPES, + "Output " + sourcePort->getIdentifier() + " of node " + + sourceNodeIdentifier + " has type " + + std::to_string(static_cast(sourcePort->getType())) + + " while target input " + targetPort->getIdentifier() + + " of node " + targetNodeIdentifier + " has type " + + std::to_string(static_cast(targetPort->getType())) + + "."); + + } + + targetPort->setReferencedPort(sourcePort); + } + + void CModelImplicitFunction::addLink(PModelImplicitPort pSourcePort, + PModelImplicitPort pTargetPort) + { + if (!pSourcePort) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Source port is nullptr."); + } + + if (!pTargetPort) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Target port is nullptr."); + } + + if(pSourcePort->getType() != pTargetPort->getType()) + { + std::string sourceNodeIdentifier = "function inputs"; + std::string targetNodeIdentifier = "function outputs"; + + if(pSourcePort->getParent()) + { + sourceNodeIdentifier = pSourcePort->getParent()->getIdentifier(); + } + + if(pTargetPort->getParent()) + { + targetNodeIdentifier = pTargetPort->getParent()->getIdentifier(); + } + + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INCOMPATIBLEPORTTYPES, + "Output " + pSourcePort->getIdentifier() + " of node " + + sourceNodeIdentifier + " has type " + + std::to_string(static_cast(pSourcePort->getType())) + + " while target input " + pTargetPort->getIdentifier() + + " of node " + targetNodeIdentifier + " has type " + + std::to_string(static_cast(pTargetPort->getType())) + + "."); + } + + pTargetPort->setReferencedPort(pSourcePort); + } + + implicit::NodeTypes const& CModelImplicitFunction::getNodeTypes() const + { + return m_nodeTypes; + } + + void CModelImplicitFunction::removeNode( + ImplicitIdentifier const& sIdentifier) + { + auto node = findNode(sIdentifier); + if(node == nullptr) + { + throw CNMRException(NMR_ERROR_INVALIDPOINTER); + } + m_nodes->erase(std::remove_if(m_nodes->begin(), m_nodes->end(), + [node](PModelImplicitNode const& n) + { return n.get() == node; }), + m_nodes->end()); + } + + void CModelImplicitFunction::clear() + { + CModelFunction::clear(); + m_nodes->clear(); + } + + void CModelImplicitFunction::replaceResourceID(const ModelResourceID sOldID, + const ModelResourceID sNewID) + { + for (auto & node : *m_nodes) + { + if (node->getModelResourceID() == sOldID) + { + node->setModelResourceID(sNewID); + } + } + } + + + std::string extractNodeName(const ImplicitIdentifier& sIdentifier) + { + auto pos = sIdentifier.find_last_of("."); + if (pos == std::string::npos) + { + return ""; + } + return sIdentifier.substr(0, pos); + } + + std::string extractPortName(const ImplicitIdentifier & sIdentifier) + { + auto pos = sIdentifier.find_last_of("."); + if (pos == std::string::npos) + { + return sIdentifier; + } + return sIdentifier.substr(pos + 1); + } + + ImplicitIdentifier makeReferenceIdentifier(const ImplicitIdentifier & sNodeIdentifier, + const ImplicitIdentifier & sPortIdentifier) + { + if (sNodeIdentifier.empty()) + { + return "inputs." + sPortIdentifier; + } + return sNodeIdentifier + "." + sPortIdentifier; + } + + NMR::common::graph::DirectedGraph directedGraphFromNodes(const PImplicitNodes & nodes) + { + if (!nodes) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Nodes must not be nullptr."); + } + + using namespace NMR::common; + graph::DirectedGraph graph(nodes->size()+1); + + std::unordered_map identifierToIndex; + graph::Identifier InputsIndex = 0; + + graph::Identifier index = 1; + for (auto const& node : *nodes) + { + if (!node) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Node must not be nullptr."); + } + + auto const& identifier = node->getIdentifier(); + identifierToIndex[identifier] = index; + ++index; + } + + for (auto const& node : *nodes) + { + auto const& inputs = node->getInputs(); + + if (!inputs) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Inputs must not be nullptr."); + } + + for (auto const& input : *inputs) + { + auto const& sourcePort = input->getReferencedPort(); + if (sourcePort) + { + auto const& sourceNode = sourcePort->getParent(); + if (sourceNode) + { + auto const& sourceNodeIdentifier = sourceNode->getIdentifier(); + auto const& sourcePortIdentifier = sourcePort->getIdentifier(); + graph::Identifier const sourceIndex = identifierToIndex[sourceNodeIdentifier]; + graph::Identifier const targetIndex = identifierToIndex[node->getIdentifier()]; + if (sourceIndex >= graph.getSize()) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Source index " + std::to_string(sourceIndex) + " is out of range."); + } + + if (targetIndex >= graph.getSize()) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Target index " + std::to_string(targetIndex) + " is out of range."); + } + graph.addDependency(sourceIndex, targetIndex); + } + else + { + graph.addDependency(InputsIndex, identifierToIndex[node->getIdentifier()]); + } + } + + } + } + return graph; + } + + void CModelImplicitFunction::sortNodesTopologically() + { + using namespace NMR::common; + auto graph = directedGraphFromNodes(m_nodes); + auto const sortedIndices = NMR::common::graph::topologicalSort(graph); + if (sortedIndices.empty()) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_GRAPHISCYCLIC); + } + + PImplicitNodes sortedNodes = std::make_shared(); + sortedNodes->reserve(sortedIndices.size()); + + for (auto const & index : sortedIndices) + { + if (index == 0) + { + continue; + } + + auto nodeIndex = index - 1; + + if (nodeIndex >= m_nodes->size()) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Invalid node index " + std::to_string(nodeIndex) + ". Node index must be between 0 and " + std::to_string(m_nodes->size()) + "."); + } + + sortedNodes->push_back(m_nodes->at(nodeIndex)); + } + std::swap(m_nodes, sortedNodes); + } + + PModelImplicitPort + NMR::CModelImplicitFunction::findPort(const ImplicitIdentifier & sIdentifier) const + { + auto const nodeName = extractNodeName(sIdentifier); + auto const portName = extractPortName(sIdentifier); + if (nodeName == "inputs") + { + return findInput(portName); + } + auto const node = findNode(nodeName); + if (node == nullptr) + { + return {}; + } + if (portName.empty()) + { + return {}; + } + return node->findOutput(portName); + } + + ResourceDependencies CModelImplicitFunction::getDependencies() + { + ResourceDependencies dependencies; + for (auto const& node : *m_nodes) + { + if (!node) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Node must not be nullptr."); + } + if (node->getNodeType() == Lib3MF::eImplicitNodeType::ConstResourceID) + { + auto * model = getModel(); + if (!model) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Model must not be nullptr."); + } + + auto referendedResource = model->findResource(model->currentPath(), node->getModelResourceID()); + if (!referendedResource) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Referenced resource must not be nullptr."); + } + dependencies.push_back(referendedResource->getPackageResourceID()); + } + } + return dependencies; + } +} + diff --git a/Source/Model/Classes/NMR_ModelImplicitNode.cpp b/Source/Model/Classes/NMR_ModelImplicitNode.cpp new file mode 100644 index 000000000..1735a79e0 --- /dev/null +++ b/Source/Model/Classes/NMR_ModelImplicitNode.cpp @@ -0,0 +1,259 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#include "Model/Classes/NMR_ModelImplicitNode.h" + +#include "Common/NMR_Exception.h" +#include "Model/Classes/NMR_ImplicitNodeTypes.h" +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Model/Classes/NMR_ModelImplicitNode.h" + +#include + +namespace NMR +{ + + CModelImplicitNode::CModelImplicitNode(Lib3MF::eImplicitNodeType type, + ImplicitIdentifier const & identifier, + std::string const & displayname, + std::string const & tag, + CModelImplicitFunction * parent) + : m_type(type) + , m_identifier(identifier) + , m_displayname(displayname) + , m_tag(tag) + , m_parent(parent) + { + m_outputs = std::make_shared(); + m_inputs = std::make_shared(); + } + + CModelImplicitNode::CModelImplicitNode(Lib3MF::eImplicitNodeType type, + CModelImplicitFunction * parent) + : m_type(type) + , m_parent(parent) + { + m_outputs = std::make_shared(); + m_inputs = std::make_shared(); + } + + ImplicitIdentifier const & CModelImplicitNode::getIdentifier() const + { + return m_identifier; + } + + std::string const & CModelImplicitNode::getDisplayName() const + { + return m_displayname; + } + + void CModelImplicitNode::setIdentifier(ImplicitIdentifier const & identifier) + { + m_identifier = identifier; + } + + void CModelImplicitNode::setDisplayName(std::string const & displayname) + { + m_displayname = displayname; + } + + void NMR::CModelImplicitNode::setType(Lib3MF::eImplicitNodeType type) + { + m_type = type; + } + + void CModelImplicitNode::setTag(std::string const & tag) + { + m_tag = tag; + } + + std::string const & CModelImplicitNode::getTag() const + { + return m_tag; + } + + Lib3MF::eImplicitNodeType CModelImplicitNode::getNodeType() const + { + return m_type; + } + + PModelImplicitPort CModelImplicitNode::addInput(const std::string & sIdentifier, + const std::string & sDisplayName) + { + auto newPort = std::make_shared(this, sIdentifier, sDisplayName); + m_inputs->push_back(newPort); + return newPort; + } + + PModelImplicitPort CModelImplicitNode::addOutput(const std::string & sIdentifier, + const std::string & sDisplayName) + { + auto newPort = std::make_shared(this, sIdentifier, sDisplayName); + m_outputs->push_back(newPort); + return newPort; + } + + PPorts NMR::CModelImplicitNode::getInputs() const + { + return m_inputs; + } + + PPorts CModelImplicitNode::getOutputs() const + { + return m_outputs; + } + + PModelImplicitPort NMR::CModelImplicitNode::findInput(const std::string & sIdentifier) const + { + for (auto & port : *m_inputs) + { + if (port->getIdentifier() == sIdentifier) + { + return port; + } + } + return {}; + } + + PModelImplicitPort CModelImplicitNode::findOutput(const std::string & sIdentifier) const + { + for (auto & port : *m_outputs) + { + if (port->getIdentifier() == sIdentifier) + { + return port; + } + } + return {}; + } + + void NMR::CModelImplicitNode::setConstant(double value) + { + if (m_type != Lib3MF::eImplicitNodeType::Constant) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + m_constant = value; + } + double CModelImplicitNode::getConstant() const + { + if (m_type != Lib3MF::eImplicitNodeType::Constant) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + return m_constant; + } + + void NMR::CModelImplicitNode::setVector(const Lib3MF::sVector & value) + { + if (m_type != Lib3MF::eImplicitNodeType::ConstVec) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + m_vector = std::unique_ptr(new Lib3MF::sVector(value)); + } + + Lib3MF::sVector CModelImplicitNode::getVector() const + { + if (m_type != Lib3MF::eImplicitNodeType::ConstVec) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + if (!m_vector) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + return *m_vector; + } + + void CModelImplicitNode::setMatrix(const Lib3MF::sMatrix4x4 & value) + { + if (m_type != Lib3MF::eImplicitNodeType::ConstMat) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + m_matrix = std::unique_ptr(new Lib3MF::sMatrix4x4(value)); + } + + Lib3MF::sMatrix4x4 CModelImplicitNode::getMatrix() const + { + if (m_type != Lib3MF::eImplicitNodeType::ConstMat) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + if (!m_matrix) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + return *m_matrix; + } + + void CModelImplicitNode::setModelResourceID(ModelResourceID resourceID) + { + if (m_type != Lib3MF::eImplicitNodeType::ConstResourceID) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + m_modelResourceID = resourceID; + } + + ModelResourceID CModelImplicitNode::getModelResourceID() const + { + if (m_type != Lib3MF::eImplicitNodeType::ConstResourceID) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + return m_modelResourceID; + } + + PModelResource NMR::CModelImplicitNode::getResource() const + { + if (m_parent == nullptr) + { + return nullptr; + } + + auto model = m_parent->getModel(); + + if (model == nullptr) + { + return nullptr; + } + + return model->findResource(model->currentPath(), m_modelResourceID); + } + + bool CModelImplicitNode::arePortsValid() const + { + return m_parent->getNodeTypes().arePortsValidForNode(*this); + } + + void CModelImplicitNode::setGraphID(GraphID id) + { + m_graphId = id; + } + + GraphID CModelImplicitNode::getGraphID() const + { + return m_graphId; + } + + CModelImplicitFunction * CModelImplicitNode::getParent() const + { + return m_parent; + } + + void CModelImplicitNode::setParent(CModelImplicitFunction* parent) + { + m_parent = parent; + } +} // namespace NMR diff --git a/Source/Model/Classes/NMR_ModelImplicitPort.cpp b/Source/Model/Classes/NMR_ModelImplicitPort.cpp new file mode 100644 index 000000000..b97ce3054 --- /dev/null +++ b/Source/Model/Classes/NMR_ModelImplicitPort.cpp @@ -0,0 +1,161 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--*/ + +#include "Model/Classes/NMR_ModelImplicitPort.h" +#include "Model/Classes/NMR_ModelImplicitNode.h" +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Common/NMR_Exception.h" +#include "lib3mf_interfaceexception.hpp" + +namespace NMR +{ + CModelImplicitPort::CModelImplicitPort(CModelImplicitNode * parent, + ImplicitIdentifier const & identifier, + std::string const & displayname) + : m_parent(parent) + , m_identifier(identifier) + , m_displayname(displayname) + { + } + + CModelImplicitPort::CModelImplicitPort(ImplicitIdentifier const & identifier, + std::string const & displayname, + Lib3MF::eImplicitPortType type) + : m_identifier(identifier) + , m_displayname(displayname) + , m_type(type) + { + } + + ImplicitIdentifier const & CModelImplicitPort::getIdentifier() const + { + return m_identifier; + } + + std::string const & CModelImplicitPort::getDisplayName() const + { + return m_displayname; + } + + void CModelImplicitPort::setIdentifier(std::string const & identifier) + { + m_identifier = identifier; + } + + void CModelImplicitPort::setDisplayName(std::string const & displayname) + { + m_displayname = displayname; + } + + Lib3MF::eImplicitPortType CModelImplicitPort::getType() const + { + return m_type; + } + + void CModelImplicitPort::setType(Lib3MF::eImplicitPortType type) + { + m_type = type; + } + + ImplicitIdentifier CModelImplicitPort::getReference() const + { + if (!m_referencedPort) + { + updateReference(); + } + if (!m_referencedPort) + { + return m_reference; + } + + auto sourceParentNode = m_referencedPort->getParent(); + + if (!sourceParentNode) // Function input ports don't have a node as parent + { + return "inputs." + m_referencedPort->getIdentifier(); + } + + return makeReferenceIdentifier(sourceParentNode->getIdentifier(), m_referencedPort->getIdentifier()); + } + + void CModelImplicitPort::setReference(ImplicitIdentifier const & reference) + { + m_referencedPort.reset(); + m_reference = reference; + updateReference(); + } + + CModelImplicitNode * CModelImplicitPort::getParent() const + { + return m_parent; + } + + std::shared_ptr CModelImplicitPort::getReferencedPort() const + { + if (!m_referencedPort) + { + updateReference(); + } + if (!m_referencedPort) + { + std::string nodeName; + if (m_parent) + { + nodeName = m_parent->getIdentifier(); + } + else + { + nodeName = "inputs"; + } + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, "Referenced port of port " + nodeName + "." + m_identifier + " is not set."); + } + return m_referencedPort; + } + + void CModelImplicitPort::setReferencedPort( + std::shared_ptr const & referencedPort) + { + m_referencedPort = referencedPort; + } + + void CModelImplicitPort::updateReference() const + { + if (!m_parent) + { + return; + } + + auto * function = m_parent->getParent(); + if (!function) + { + return; + } + + m_referencedPort = function->findPort(m_reference); + } +} //namespace NMR diff --git a/Source/Model/Classes/NMR_ModelLevelSetObject.cpp b/Source/Model/Classes/NMR_ModelLevelSetObject.cpp new file mode 100644 index 000000000..59eb36387 --- /dev/null +++ b/Source/Model/Classes/NMR_ModelLevelSetObject.cpp @@ -0,0 +1,200 @@ +/*++ + +Copyright (C) 2024 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_ModelLevelSetObject.cpp implements the Model LevelSet Object +Class. A model levelset object is an in memory representation of the 3MF +levelset object. + +--*/ + +#include "Model/Classes/NMR_ModelLevelSetObject.h" + +#include "Common/Math/NMR_PairMatchingTree.h" +#include "Common/Mesh/NMR_Mesh.h" +#include "Model/Classes/NMR_ModelMeshObject.h" +#include "Model/Classes/NMR_ModelObject.h" +#include "Model/Classes/NMR_ModelVolumeData.h" + +namespace NMR +{ + + CModelLevelSetObject::CModelLevelSetObject( + const ModelResourceID sID, CModel* pModel) + : CModelObject(sID, pModel) + { + } + + CModelLevelSetObject::~CModelLevelSetObject() {} + + void CModelLevelSetObject::mergeToMesh(CMesh* pMesh, + const NMATRIX3 mMatrix) + { + throw CNMRException(NMR_ERROR_NOTIMPLEMENTED); + } + + PModelMeshObject CModelLevelSetObject::getMesh() + { + return m_pMesh; + } + + void CModelLevelSetObject::setMesh(PModelMeshObject pMesh) + { + if(!pMesh) throw CNMRException(NMR_ERROR_INVALIDPARAM); + + m_pMesh = pMesh; + } + + nfBool CModelLevelSetObject::isValid() + { + return true; + } + + nfBool CModelLevelSetObject::hasSlices(nfBool bRecursive) + { + return (this->getSliceStack().get() != nullptr); + } + + nfBool CModelLevelSetObject::isValidForSlices( + const NMATRIX3& totalParentMatrix) + { + if(!this->getSliceStack().get()) + { + return true; + } + else + { + return fnMATRIX3_isplanar(totalParentMatrix); + } + } + + void CModelLevelSetObject::extendOutbox( + NOUTBOX3& vOutBox, const NMATRIX3 mAccumulatedMatrix) + { + throw CNMRException(NMR_ERROR_NOTIMPLEMENTED); + } + + PModelFunction CModelLevelSetObject::getFunction() + { + return m_pFunction; + } + + void CModelLevelSetObject::setFunction(PModelFunction pFunction) + { + if(!pFunction) throw CNMRException(NMR_ERROR_INVALIDPARAM); + + m_pFunction = pFunction; + } + + PModelVolumeData CModelLevelSetObject::getVolumeData() + { + return m_pVolumeData; + } + + void CModelLevelSetObject::setVolumeData( + _In_ PModelVolumeData pVolumeData) + { + if(!pVolumeData) throw CNMRException(NMR_ERROR_INVALIDPARAM); + + m_pVolumeData = pVolumeData; + } + + void CModelLevelSetObject::setChannelName(std::string outputPortName) + { + m_outputPortName = std::move(outputPortName); + } + + std::string const& CModelLevelSetObject::getChannelName() const + { + return m_outputPortName; + } + + void CModelLevelSetObject::setTransform(NMR::NMATRIX3 transform) + { + m_transform = transform; + m_bHasTransform = true; + } + + NMR::NMATRIX3 CModelLevelSetObject::getTransform() const + { + return m_transform; + } + + bool CModelLevelSetObject::hasTransform() const + { + return m_bHasTransform; + } + + void CModelLevelSetObject::setMinFeatureSize(double minFeatureSize) + { + m_minFeatureSize = minFeatureSize; + } + + double CModelLevelSetObject::getMinFeatureSize() const + { + return m_minFeatureSize; + } + + void CModelLevelSetObject::setFallBackValue(double fallBackValue) + { + m_fallBackValue = fallBackValue; + } + + double CModelLevelSetObject::getFallBackValue() const + { + return m_fallBackValue; + } + + void CModelLevelSetObject::setMeshBBoxOnly(bool bMeshBBoxOnly) + { + m_meshBBoxOnly = bMeshBBoxOnly; + } + + bool CModelLevelSetObject::getMeshBBoxOnly() const + { + return m_meshBBoxOnly; + } + + ResourceDependencies CModelLevelSetObject::getDependencies() + { + ResourceDependencies dependencies; + if (m_pFunction) + { + dependencies.push_back(m_pFunction->getPackageResourceID()); + } + + if (m_pVolumeData) + { + // concatenate dependencies + auto volumeDataDependencies = m_pVolumeData->getDependencies(); + dependencies.insert(dependencies.end(), volumeDataDependencies.begin(), volumeDataDependencies.end()); + } + + return dependencies; + } +} // namespace NMR + diff --git a/Source/Model/Classes/NMR_ModelMeshObject.cpp b/Source/Model/Classes/NMR_ModelMeshObject.cpp index 4829ea7ae..8100bd280 100644 --- a/Source/Model/Classes/NMR_ModelMeshObject.cpp +++ b/Source/Model/Classes/NMR_ModelMeshObject.cpp @@ -221,10 +221,35 @@ namespace NMR { m_pBeamLatticeAttributes = pBeamLatticeAttributes; } + PModelVolumeData CModelMeshObject::getVolumeData() + { + return m_pVolumeData; + } + + void CModelMeshObject::setVolumeData(_In_ PModelVolumeData pVolumeData) + { + if (!pVolumeData) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + m_pVolumeData = pVolumeData; + } + void CModelMeshObject::extendOutbox(_Out_ NOUTBOX3& vOutBox, _In_ const NMATRIX3 mAccumulatedMatrix) { m_pMesh->extendOutbox(vOutBox, mAccumulatedMatrix); } + + ResourceDependencies CModelMeshObject::getDependencies() + { + ResourceDependencies dependencies; + if(m_pVolumeData) + { + dependencies.push_back( + m_pVolumeData->getPackageResourceID()); + } + + return dependencies; + } } diff --git a/Source/Model/Classes/NMR_ModelMetaDataGroup.cpp b/Source/Model/Classes/NMR_ModelMetaDataGroup.cpp index a2608cab6..e3265d347 100644 --- a/Source/Model/Classes/NMR_ModelMetaDataGroup.cpp +++ b/Source/Model/Classes/NMR_ModelMetaDataGroup.cpp @@ -47,7 +47,6 @@ namespace NMR { m_MetaDataMap.clear(); } - PModelMetaData CModelMetaDataGroup::addMetaData(_In_ std::string sNameSpace, _In_ std::string sName, _In_ std::string sValue, _In_ std::string sType, _In_ nfBool bPreserve) { if (hasMetaData(composeNamespaceAndNameIntoKey(sNameSpace, sName))) { @@ -114,7 +113,11 @@ namespace NMR { std::string sName; std::string sValue; PModelMetaData metaData = pSourceMetaDataGroup->getMetaData(nIndex); - addMetaData(metaData->getNameSpace(), metaData->getName(), metaData->getValue(), metaData->getType(), metaData->getPreserve()); + + // only add metadata, if the key does not exist yet + if (!hasMetaData(metaData->getKey())) { + addMetaData(metaData->getNameSpace(), metaData->getName(), metaData->getValue(), metaData->getType(), metaData->getPreserve()); + } } } } diff --git a/Source/Model/Classes/NMR_ModelMultiPropertyGroup.cpp b/Source/Model/Classes/NMR_ModelMultiPropertyGroup.cpp index 6c6a31209..9170a6bf8 100644 --- a/Source/Model/Classes/NMR_ModelMultiPropertyGroup.cpp +++ b/Source/Model/Classes/NMR_ModelMultiPropertyGroup.cpp @@ -221,6 +221,7 @@ namespace NMR { switch (eBlendMethod) { case MODELBLENDMETHOD_MIX: return XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHOD_MIX; case MODELBLENDMETHOD_MULTIPLY: return XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHOD_MULTIPLY; + case MODELBLENDMETHOD_MASK: return XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHOD_MASK; default: return XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHOD_MIX; } @@ -229,9 +230,13 @@ namespace NMR { { if (sBlendMethod == XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHOD_MIX) { return MODELBLENDMETHOD_MIX; - } else if (sBlendMethod == XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHOD_MULTIPLY) { + } + else if (sBlendMethod == XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHOD_MULTIPLY) { return MODELBLENDMETHOD_MULTIPLY; } + else if (sBlendMethod == XML_3MF_ATTRIBUTE_MULTIPROPERTIES_BLENDMETHOD_MASK) { + return MODELBLENDMETHOD_MASK; + } else { throw CNMRException(NMR_ERROR_INVALID_BLENDMETHOD_ATTRIBUTE); } diff --git a/Source/Model/Classes/NMR_ModelObject.cpp b/Source/Model/Classes/NMR_ModelObject.cpp index ccfd31e63..b1aa7da30 100644 --- a/Source/Model/Classes/NMR_ModelObject.cpp +++ b/Source/Model/Classes/NMR_ModelObject.cpp @@ -208,6 +208,4 @@ namespace NMR { if (nLevel >= m_nComponentDepthLevel) m_nComponentDepthLevel = nLevel; } - - } diff --git a/Source/Model/Classes/NMR_ModelResource.cpp b/Source/Model/Classes/NMR_ModelResource.cpp index c9a31d929..8776154a9 100644 --- a/Source/Model/Classes/NMR_ModelResource.cpp +++ b/Source/Model/Classes/NMR_ModelResource.cpp @@ -34,7 +34,7 @@ resource object. #include "Model/Classes/NMR_Model.h" #include "Model/Classes/NMR_ModelResource.h" -#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception.h" namespace NMR { @@ -64,8 +64,12 @@ namespace NMR { void CModelResource::setPackageResourceID(PPackageResourceID pID) { - m_pModel->updateUniqueResourceID(m_pPackageResourceID->getUniqueID(), pID->getUniqueID()); + if (m_pModel) + { + m_pModel->updateUniqueResourceID(m_pPackageResourceID->getUniqueID(), pID->getUniqueID()); + } m_pPackageResourceID = pID; + } _Ret_notnull_ CModel * CModelResource::getModel() @@ -73,6 +77,15 @@ namespace NMR { return m_pModel; } + void CModelResource::setModel(CModel* pModel) + { + m_pModel = pModel; + } + + ResourceDependencies CModelResource::getDependencies() + { + return {}; + } void CModelResource::clearResourceIndexMap() { diff --git a/Source/Model/Classes/NMR_ModelVolumeData.cpp b/Source/Model/Classes/NMR_ModelVolumeData.cpp new file mode 100644 index 000000000..b9689dc9d --- /dev/null +++ b/Source/Model/Classes/NMR_ModelVolumeData.cpp @@ -0,0 +1,229 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_ModelVolumeData.cpp implements the class CModelVolumeData. + +--*/ + +#include "Model/Classes/NMR_ModelVolumeData.h" + +#include "Model/Classes/NMR_ModelFunction.h" +#include "lib3mf_interfaceexception.hpp" + +namespace NMR +{ + CModelVolumeData::CModelVolumeData(ModelResourceID sResourceID, CModel * pModel) : CModelResource(sResourceID, pModel) + { + clear(); + } + + void CModelVolumeData::clear() + { + m_pComposite.reset(); + m_pColor.reset(); + m_mapProperties.clear(); + } + + nfBool CModelVolumeData::hasProperty(std::string sName) + { + std::map::iterator iIterator = m_mapProperties.find(sName); + return iIterator != m_mapProperties.end(); + } + + nfUint32 CModelVolumeData::getPropertyCount() const + { + return (nfUint32)m_mapProperties.size(); + } + + PVolumeDataProperty CModelVolumeData::getProperty(nfUint32 nIndex) + { + auto iIterator = m_mapProperties.begin(); + if (nIndex >= m_mapProperties.size()) + throw CNMRException(NMR_ERROR_INVALIDINDEX); + + while (nIndex > 0) { + nIndex--; + iIterator++; + } + return iIterator->second; + } + + PVolumeDataProperty CModelVolumeData::findProperty(std::string sName) + { + std::map::iterator iIterator = m_mapProperties.find(sName); + if (iIterator != m_mapProperties.end()) { + return iIterator->second; + } + return nullptr; + } + + void CModelVolumeData::addProperty(PVolumeDataProperty pProperty) + { + if (!pProperty) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + if (hasProperty(pProperty->getName())) { + throw CNMRException(NMR_ERROR_DUPLICATEVOLUMEDATAPROPERTY); + } + m_mapProperties.insert(std::make_pair(pProperty->getName(), pProperty)); + } + + PVolumeDataProperty CModelVolumeData::addProperty( + std::string sName, PModelFunction pfunction) + { + if(!pfunction) throw CNMRException(NMR_ERROR_INVALIDPARAM); + + if(hasProperty(sName)) + { + throw CNMRException( + NMR_ERROR_DUPLICATEVOLUMEDATAPROPERTY); + } + + PVolumeDataProperty pVolumeDataProperty = + std::make_shared(pfunction, sName); + m_mapProperties.insert(std::make_pair(pVolumeDataProperty->getName(), pVolumeDataProperty)); + return pVolumeDataProperty; + } + + void CModelVolumeData::removeProperty(std::string sName) + { + m_mapProperties.erase(sName); + } + + bool CModelVolumeData::hasColor() const + { + return m_pColor.get() != nullptr; + } + + void CModelVolumeData::setColor(PVolumeDataColor pColor) + { + if (!pColor) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + m_pColor = pColor; + } + + PVolumeDataColor CModelVolumeData::createColor(PModelFunction pfunction) + { + if(!pfunction) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + m_pColor = std::make_shared(pfunction); + return m_pColor; + } + + PVolumeDataColor CModelVolumeData::getColor() + { + return m_pColor; + } + + void CModelVolumeData::removeColor() + { + m_pColor.reset(); + } + + bool CModelVolumeData::hasComposite() const + { + return m_pComposite.get() != nullptr; + } + + + PVolumeDataComposite CModelVolumeData::getComposite() + { + return m_pComposite; + } + PVolumeDataComposite CModelVolumeData::createComposite(/* basematerialgroupd*/) + { + m_pComposite = std::make_shared(); + return m_pComposite; + } + + void CModelVolumeData::setComposite(PVolumeDataComposite pComposite) + { + if (!pComposite) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + m_pComposite = pComposite; + } + + void CModelVolumeData::removeComposite() + { + m_pComposite.reset(); + } + + ResourceDependencies CModelVolumeData::getDependencies() + { + ResourceDependencies dependencies; + + if (m_pColor) + { + dependencies.push_back(packageResourceIDFromResourceID(m_pColor->getFunctionResourceID())); + } + + for (auto iIterator = m_mapProperties.begin(); iIterator != m_mapProperties.end(); iIterator++) + { + PVolumeDataProperty pProperty = iIterator->second; + if (pProperty) + { + dependencies.push_back(packageResourceIDFromResourceID(pProperty->getFunctionResourceID())); + } + } + + if (m_pComposite) + { + for (nfUint32 i = 0u; i < m_pComposite->materialMappingCount(); i++) + { + dependencies.push_back(packageResourceIDFromResourceID(m_pComposite->getMaterialMapping(i)->getFunctionResourceID())); + } + + } + + return dependencies; + } + + PPackageResourceID + CModelVolumeData::packageResourceIDFromResourceID( + UniqueResourceID uniqueResourceID) + { + auto* model = getModel(); + if(!model) + { + throw ELib3MFInterfaceException(LIB3MF_ERROR_INVALIDPARAM, + "Model must not be nullptr."); + } + + auto referendedResource = model->findResource(uniqueResourceID); + if(!referendedResource) + { + throw ELib3MFInterfaceException( + LIB3MF_ERROR_INVALIDPARAM, + "Referenced resource must not be nullptr."); + } + + return referendedResource->getPackageResourceID(); + } +} // namespace NMR diff --git a/Source/Model/Classes/NMR_PackageResourceID.cpp b/Source/Model/Classes/NMR_PackageResourceID.cpp index 1d5dc9ad8..b8ecf168e 100644 --- a/Source/Model/Classes/NMR_PackageResourceID.cpp +++ b/Source/Model/Classes/NMR_PackageResourceID.cpp @@ -119,6 +119,13 @@ namespace NMR { PPackageModelPath CResourceHandler::findPackageModelPath(std::string sPath) { + if (!sPath.empty()) + { + if (sPath[0] != '/') + { + return nullptr; + } + } auto it = m_PathToModelPath.find(sPath); if (it != m_PathToModelPath.end()) { diff --git a/Source/Model/Reader/NMR_ModelReaderNode_ModelBase.cpp b/Source/Model/Reader/NMR_ModelReaderNode_ModelBase.cpp index 710ac8867..3fa8cf31e 100644 --- a/Source/Model/Reader/NMR_ModelReaderNode_ModelBase.cpp +++ b/Source/Model/Reader/NMR_ModelReaderNode_ModelBase.cpp @@ -85,7 +85,10 @@ namespace NMR { strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_PRODUCTIONSPEC) != 0 && strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_SLICESPEC) != 0 && strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_BEAMLATTICESPEC) != 0 && - strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_SECURECONTENTSPEC) != 0 ) + strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_SECURECONTENTSPEC) != 0 && + strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_VOLUMETRICSPEC) != 0 && + strcmp(sExtensionURI.c_str(), XML_3MF_NAMESPACE_IMPLICITSPEC) != 0 + ) { m_pWarnings->addWarning(NMR_ERROR_REQUIREDEXTENSIONNOTSUPPORTED, mrwInvalidMandatoryValue); } diff --git a/Source/Model/Reader/Volumetric2201/NMR_Implicit_PortType_Convert.cpp b/Source/Model/Reader/Volumetric2201/NMR_Implicit_PortType_Convert.cpp new file mode 100644 index 000000000..bdb3ed1fd --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_Implicit_PortType_Convert.cpp @@ -0,0 +1,126 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Helper methods for reading implicit ports + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_Implicit_PortType_Convert.h" +#include "Common/NMR_Exception.h" +#include + +namespace NMR +{ + namespace implicit + { + const char * portTypeToRefName(Lib3MF::eImplicitPortType type) + { + switch (type) + { + case Lib3MF::eImplicitPortType::Scalar: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_SCALAR_REF; + case Lib3MF::eImplicitPortType::Vector: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_VECTOR_REF; + case Lib3MF::eImplicitPortType::Matrix: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_MATRIX_REF; + case Lib3MF::eImplicitPortType::ResourceID: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_RESOURCE_REF; + default: + return "Invalid"; + } + } + + const char * portTypeToName(Lib3MF::eImplicitPortType type) + { + switch (type) + { + case Lib3MF::eImplicitPortType::Scalar: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_SCALAR; + case Lib3MF::eImplicitPortType::Vector: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_VECTOR; + case Lib3MF::eImplicitPortType::Matrix: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_MATRIX; + case Lib3MF::eImplicitPortType::ResourceID: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_RESOURCE_ID; + default: + return "Invalid"; + } + } + + bool portTypeFromRefName(std::string const & name, Lib3MF::eImplicitPortType & resultType) + { + if (name == XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_SCALAR_REF) + { + resultType = Lib3MF::eImplicitPortType::Scalar; + return true; + } + if (name == XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_VECTOR_REF) + { + resultType = Lib3MF::eImplicitPortType::Vector; + return true; + } + if (name == XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_MATRIX_REF) + { + resultType = Lib3MF::eImplicitPortType::Matrix; + return true; + } + if (name == XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_RESOURCE_REF) + { + resultType = Lib3MF::eImplicitPortType::ResourceID; + return true; + } + + return false; + } + + bool portTypeFromName(std::string const & name, Lib3MF::eImplicitPortType & resultType) + { + if (name == XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_SCALAR) + { + resultType = Lib3MF::eImplicitPortType::Scalar; + return true; + } + if (name == XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_VECTOR) + { + resultType = Lib3MF::eImplicitPortType::Vector; + return true; + } + if (name == XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_MATRIX) + { + resultType = Lib3MF::eImplicitPortType::Matrix; + return true; + } + if (name == XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_RESOURCE_ID) + { + resultType = Lib3MF::eImplicitPortType::ResourceID; + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_FunctionFromImage3D.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_FunctionFromImage3D.cpp new file mode 100644 index 000000000..b0f55f8e6 --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_FunctionFromImage3D.cpp @@ -0,0 +1,175 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for FunctionFormImage3D + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_FunctionFromImage3D.h" + +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelFunctionFromImage3D.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" + +namespace NMR +{ + NMR::CModelReaderNode_FunctionFromImage3D::CModelReaderNode_FunctionFromImage3D( + CModel * pModel, + + PModelWarnings pWarnings) + : CModelReaderNode(pWarnings) + , m_pModel(pModel) + { + __NMRASSERT(pModel); + } + + void CModelReaderNode_FunctionFromImage3D::parseXML(CXmlReader * pXMLReader) + { + __NMRASSERT(pXMLReader); + + // Parse name + parseName(pXMLReader); + + // Parse Attributes + parseAttributes(pXMLReader); + + // Create FunctionFromImage3D + m_pFunctionFromImage3D = + std::make_shared(m_nID, m_pModel); + m_pFunctionFromImage3D->setDisplayName(m_displayName); + m_pFunctionFromImage3D->setImage3DModelResourceID(m_imageModelResourceID); + m_pFunctionFromImage3D->setTileStyleU(m_tileStyleU); + m_pFunctionFromImage3D->setTileStyleV(m_tileStyleV); + m_pFunctionFromImage3D->setTileStyleW(m_tileStyleW); + m_pFunctionFromImage3D->setFilter(m_filter); + m_pFunctionFromImage3D->setOffset(m_offset); + m_pFunctionFromImage3D->setScale(m_scale); + + + // Parse Content + parseContent(pXMLReader); + + m_pModel->addResource(m_pFunctionFromImage3D); + } + + eModelTextureTileStyle fnStringToModelTextureTileStyle(const std::string & sValue) + { + if (sValue == XML_3MF_ATTRIBUTE_TEXTURE2D_TILESTYLE_WRAP) + { + return eModelTextureTileStyle::MODELTEXTURETILESTYLE_WRAP; + } + else if (sValue == XML_3MF_ATTRIBUTE_TEXTURE2D_TILESTYLE_MIRROR) + { + return eModelTextureTileStyle::MODELTEXTURETILESTYLE_MIRROR; + } + else if (sValue == XML_3MF_ATTRIBUTE_TEXTURE2D_TILESTYLE_CLAMP) + { + return eModelTextureTileStyle::MODELTEXTURETILESTYLE_CLAMP; + } + else if (sValue == XML_3MF_ATTRIBUTE_TEXTURE2D_TILESTYLE_NONE) + { + return eModelTextureTileStyle::MODELTEXTURETILESTYLE_NONE; + } + else + { + throw CNMRException(NMR_ERROR_INVALIDTILESTYLE); + } + } + + eModelTextureFilter fnStringToModelTextureFilter(const std::string & sValue) + { + if (sValue == XML_3MF_ATTRIBUTE_TEXTURE2D_FILTER_AUTO) + { + return eModelTextureFilter::MODELTEXTUREFILTER_AUTO; + } + else if (sValue == XML_3MF_ATTRIBUTE_TEXTURE2D_FILTER_LINEAR) + { + return eModelTextureFilter::MODELTEXTUREFILTER_LINEAR; + } + else if (sValue == XML_3MF_ATTRIBUTE_TEXTURE2D_FILTER_NEAREST) + { + return eModelTextureFilter::MODELTEXTUREFILTER_NEAREST; + } + else + { + throw CNMRException(NMR_ERROR_INVALIDFILTER); + } + } + + void CModelReaderNode_FunctionFromImage3D::OnAttribute(const nfChar * pAttributeName, + const nfChar * pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_ID) == 0) + { + m_nID = fnStringToUint32(pAttributeValue); + } + else if ((strcmp(pAttributeName, XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_IMAGE3DID_DEPRECATED) == 0) + || (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_IMAGE3DID) == 0)) + { + m_imageModelResourceID = fnStringToUint32(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_DISPLAY_NAME) == 0) + { + m_displayName = std::string{pAttributeValue}; + } + else if ((strcmp(pAttributeName, XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_OFFSET_DEPRECATED) == 0) + || (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_OFFSET) == 0)) + { + m_offset = fnStringToDouble(pAttributeValue); + } + else if ((strcmp(pAttributeName, XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_SCALE_DEPRECATED) == 0) + || (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_SCALE) == 0)) + { + m_scale = fnStringToDouble(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_TILESTYLEU) == 0) + { + m_tileStyleU = fnStringToModelTextureTileStyle(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_TILESTYLEV) == 0) + { + m_tileStyleV = fnStringToModelTextureTileStyle(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_TILESTYLEW) == 0) + { + m_tileStyleW = fnStringToModelTextureTileStyle(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_FILTER) == 0) + { + m_filter = fnStringToModelTextureFilter(pAttributeValue); + } + else + { + m_pWarnings->addException(CNMRException(NMR_ERROR_NAMESPACE_INVALID_ATTRIBUTE), + mrwInvalidOptionalValue); + } + } +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function.cpp new file mode 100644 index 000000000..e66102853 --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function.cpp @@ -0,0 +1,136 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for implicit function ressources + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Inputs.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Outputs.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.h" + +#include "Model/Classes/NMR_ImplicitNodeTypes.h" +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelImplicitFunction.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" + +namespace NMR +{ + + const implicit::NodeTypes CModelReaderNode_ImplicitFunction::m_nodeTypes; + + NMR::CModelReaderNode_ImplicitFunction::CModelReaderNode_ImplicitFunction( + CModel * pModel, + + PModelWarnings pWarnings) + : CModelReaderNode(pWarnings) + , m_pModel(pModel) + { + __NMRASSERT(pModel); + } + + void CModelReaderNode_ImplicitFunction::parseXML(CXmlReader * pXMLReader) + { + __NMRASSERT(pXMLReader); + + // Parse name + parseName(pXMLReader); + + // Parse Attributes + parseAttributes(pXMLReader); + + // Create Implicit Function + m_pImplicitFunction = std::make_shared(m_nID, m_pModel); + m_pImplicitFunction->setDisplayName(m_displayName); + + // Parse Content + parseContent(pXMLReader); + + m_pModel->addResource(m_pImplicitFunction); + } + + void CModelReaderNode_ImplicitFunction::OnAttribute(const nfChar * pAttributeName, + const nfChar * pAttributeValue) + { + + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_ID) == 0) + { + m_nID = fnStringToUint32(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_DISPLAY_NAME) == 0) + { + m_displayName = pAttributeValue; + } + } + void CModelReaderNode_ImplicitFunction::OnNSChildElement(const nfChar * pChildName, + const nfChar * pNameSpace, + CXmlReader * pXMLReader) + { + __NMRASSERT(pChildName); + __NMRASSERT(pXMLReader); + __NMRASSERT(pNameSpace); + + // inputs + if (strcmp(pChildName, XML_3MF_ELEMENT_IMPLICIT_FUNCTION_INPUT) == 0) + { + auto node = std::make_shared( + m_pImplicitFunction.get(), m_pWarnings); + node->parseXML(pXMLReader); + return; + } + + // output + if (strcmp(pChildName, XML_3MF_ELEMENT_IMPLICIT_FUNCTION_OUTPUT) == 0) + { + auto node = std::make_shared( + m_pImplicitFunction.get(), m_pWarnings); + node->parseXML(pXMLReader); + return; + } + + auto const & nodeTypes = m_nodeTypes.getTypes(); + + for (auto const & nodeType : nodeTypes) // maeh, no structured bindings in C++11 + { + // first is the node type, second is the node type info + if (strcmp(pChildName, nodeType.second.getName().c_str()) == 0) + { + auto implicitNode = m_pImplicitFunction->addNode(nodeType.first, Lib3MF::eImplicitNodeConfiguration::Default); + auto node = + NMR::CModelReaderNode_Implicit_Node(m_pModel, implicitNode.get(), m_pWarnings); + node.parseXML(pXMLReader); + + return; + } + } + } +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Input.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Input.cpp new file mode 100644 index 000000000..fc2c6a96e --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Input.cpp @@ -0,0 +1,95 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for a single input of a function for implicit modelling + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Input.h" + +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelConstants.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" + +namespace NMR +{ + CModelReaderNode_Implicit_Function_Input::CModelReaderNode_Implicit_Function_Input( + CModelImplicitFunction * pParentFunction, + PModelWarnings pWarnings, + Lib3MF::eImplicitPortType portType) + : CModelReaderNode(pWarnings) + , m_portType(portType) + { + + __NMRASSERT(pParentFunction); + m_pParentFunction = pParentFunction; + } + + void CModelReaderNode_Implicit_Function_Input::parseXML(CXmlReader * pXMLReader) + { + __NMRASSERT(pXMLReader); + + // Parse name + parseName(pXMLReader); + + // Parse Attributes + parseAttributes(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + + // Create Implicit Port + createInput(); + } + + void CModelReaderNode_Implicit_Function_Input::OnAttribute(const nfChar * pAttributeName, + const nfChar * pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_PORT_ID) == 0) + { + m_identifier = pAttributeValue; + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_PORT_DISPLAY_NAME) == 0) + { + m_displayName = pAttributeValue; + } + } + + void CModelReaderNode_Implicit_Function_Input::createInput() + { + auto input = m_pParentFunction->findInput(m_identifier); + if (!input) + { + input = m_pParentFunction->addInput(m_identifier, m_displayName, m_portType); + } + input->setDisplayName(m_displayName); + } + +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Inputs.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Inputs.cpp new file mode 100644 index 000000000..72c8125a4 --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Inputs.cpp @@ -0,0 +1,77 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for ports of a function for implicit modelling + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Inputs.h" +#include "Model/Reader/Volumetric2201/NMR_Implicit_PortType_Convert.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Input.h" + +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelConstants.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" + +namespace NMR +{ + CModelReaderNode_Implicit_Function_Inputs::CModelReaderNode_Implicit_Function_Inputs( + CModelImplicitFunction * pParentFunction, + PModelWarnings pWarnings) + : CModelReaderNode(pWarnings) + { + __NMRASSERT(pParentFunction); + m_pImplicitFunction = pParentFunction; + } + + void CModelReaderNode_Implicit_Function_Inputs::parseXML(_In_ CXmlReader * pXMLReader) + { + __NMRASSERT(pXMLReader); + + // Parse name + parseName(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + } + + void CModelReaderNode_Implicit_Function_Inputs::OnNSChildElement(const nfChar * pChildName, + const nfChar * pNameSpace, + CXmlReader * pXMLReader) + { + Lib3MF::eImplicitPortType portType; + if (implicit::portTypeFromName(pChildName, portType)) + { + auto pXMLNode = std::make_shared( + m_pImplicitFunction, m_pWarnings, portType); + pXMLNode->parseXML(pXMLReader); + } + } +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Output.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Output.cpp new file mode 100644 index 000000000..34c42388b --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Output.cpp @@ -0,0 +1,102 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for an output element + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Output.h" + +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelConstants.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" + +#include + +namespace NMR +{ + CModelReaderNode_Implicit_Function_Output::CModelReaderNode_Implicit_Function_Output( + CModelImplicitFunction * pParentFunction, + PModelWarnings pWarnings, + Lib3MF::eImplicitPortType portType) + : CModelReaderNode(pWarnings) + , m_portType(portType) + { + + __NMRASSERT(pParentFunction); + m_pParentFunction = pParentFunction; + } + + void CModelReaderNode_Implicit_Function_Output::parseXML(CXmlReader * pXMLReader) + { + __NMRASSERT(pXMLReader); + + // Parse name + parseName(pXMLReader); + + // Parse Attributes + parseAttributes(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + + // Create Port + createOutput(); + } + + void CModelReaderNode_Implicit_Function_Output::OnAttribute(const nfChar * pAttributeName, + const nfChar * pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_PORT_ID) == 0) + { + m_identifier = pAttributeValue; + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_PORT_DISPLAY_NAME) == 0) + { + m_displayName = pAttributeValue; + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_PORT_REFERENCE) == 0) + { + m_reference = pAttributeValue; + } + } + + void CModelReaderNode_Implicit_Function_Output::createOutput() + { + auto output = m_pParentFunction->findOutput(m_identifier); + if (!output) + { + output = m_pParentFunction->addOutput(m_identifier, m_displayName, m_portType); + } + output->setDisplayName(m_displayName); + output->setReference(m_reference); + } + +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Outputs.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Outputs.cpp new file mode 100644 index 000000000..b148e1632 --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Outputs.cpp @@ -0,0 +1,78 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for inputs (arguments) of a function for implicit modelling + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Outputs.h" +#include "Model/Reader/Volumetric2201/NMR_Implicit_PortType_Convert.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function_Output.h" + +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelConstants.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" + +namespace NMR +{ + CModelReaderNode_Implicit_Function_Outputs::CModelReaderNode_Implicit_Function_Outputs( + CModelImplicitFunction * pParentFunction, + PModelWarnings pWarnings) + : CModelReaderNode(pWarnings) + { + __NMRASSERT(pParentFunction); + m_pImplicitFunction = pParentFunction; + } + + void CModelReaderNode_Implicit_Function_Outputs::parseXML(_In_ CXmlReader * pXMLReader) + { + __NMRASSERT(pXMLReader); + + // Parse name + parseName(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + } + + void CModelReaderNode_Implicit_Function_Outputs::OnNSChildElement(const nfChar * pChildName, + const nfChar * pNameSpace, + CXmlReader * pXMLReader) + { + Lib3MF::eImplicitPortType portType; + if (implicit::portTypeFromRefName(pChildName, portType)) + { + auto XMLNode = + CModelReaderNode_Implicit_Function_Output(m_pImplicitFunction, m_pWarnings, portType); + + XMLNode.parseXML(pXMLReader); + } + } +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.cpp new file mode 100644 index 000000000..36d072f29 --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.cpp @@ -0,0 +1,173 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for nodes of graph representing a function for implicit modelling + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Inputs.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Outputs.h" + +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelConstants.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" + +#include + +namespace NMR +{ + CModelReaderNode_Implicit_Node::CModelReaderNode_Implicit_Node( + _In_ CModel * pModel, + _In_ CModelImplicitNode * pImplicitNode, + _In_ PModelWarnings pWarnings) + : CModelReaderNode(pWarnings) + { + __NMRASSERT(pModel); + __NMRASSERT(pImplicitNode); + + m_pModel = pModel; + m_pImplicitNode = pImplicitNode; + } + + void CModelReaderNode_Implicit_Node::parseXML(_In_ CXmlReader * pXMLReader) + { + __NMRASSERT(pXMLReader); + + // Parse name + parseName(pXMLReader); + + // Parse Attributes + parseAttributes(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + } + + Lib3MF::sMatrix4x4 matFromString(std::string const & str) + { + Lib3MF::sMatrix4x4 mat; + std::stringstream ss(str); + for (int i = 0; i < 4; i++) + { + for (int j = 0; j < 4; j++) + { + if (!(ss >> mat.m_Field[i][j])) + { + throw CNMRException(NMR_ERROR_NOTENOUGHVALUESINMATRIXSTRING); + } + } + } + + // Check if there is any extra content in the input string + std::string extra; + if (ss >> extra && !extra.empty()) + { + throw CNMRException(NMR_ERROR_TOOMANYVALUESINMATRIXSTRING); + } + + return mat; + } + + void CModelReaderNode_Implicit_Node::OnAttribute(_In_z_ const nfChar * pAttributeName, + _In_z_ const nfChar * pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_ID) == 0) + { + m_pImplicitNode->setIdentifier(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_DISPLAY_NAME) == 0) + { + m_pImplicitNode->setDisplayName(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_TAG) == 0) + { + m_pImplicitNode->setTag(pAttributeValue); + } + else if (m_pImplicitNode->getNodeType() == Lib3MF::eImplicitNodeType::Constant && + strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_VALUE) == 0) + { + m_pImplicitNode->setConstant(strtod(pAttributeValue, nullptr)); + } + else if (m_pImplicitNode->getNodeType() == Lib3MF::eImplicitNodeType::ConstVec) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_X) == 0) + { + m_vector.m_Coordinates[0] = strtod(pAttributeValue, nullptr); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_Y) == 0) + { + m_vector.m_Coordinates[1] = strtod(pAttributeValue, nullptr); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_Z) == 0) + { + m_vector.m_Coordinates[2] = strtod(pAttributeValue, nullptr); + } + m_pImplicitNode->setVector(m_vector); + } + else if (m_pImplicitNode->getNodeType() == Lib3MF::eImplicitNodeType::ConstMat) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_MATRIX) == 0) + { + m_pImplicitNode->setMatrix(matFromString(pAttributeValue)); + } + } + else if (m_pImplicitNode->getNodeType() == Lib3MF::eImplicitNodeType::ConstResourceID) + { + if ((strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_RESOURCE_ID_VALUE_DEPRECATED) == 0) + || (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_NODE_VALUE) == 0)) + { + m_pImplicitNode->setModelResourceID(std::stoi(pAttributeValue)); + } + } + } + + void NMR::CModelReaderNode_Implicit_Node::OnNSChildElement(_In_z_ const nfChar * pChildName, + _In_z_ const nfChar * pNameSpace, + _In_ CXmlReader * pXMLReader) + { + __NMRASSERT(pChildName); + __NMRASSERT(pXMLReader); + __NMRASSERT(pNameSpace); + + if (strcmp(pChildName, XML_3MF_ELEMENT_IMPLICIT_NODE_INPUT) == 0) + { + auto pXMLNode = + std::make_shared(m_pImplicitNode, m_pWarnings); + pXMLNode->parseXML(pXMLReader); + } + else if (strcmp(pChildName, XML_3MF_ELEMENT_IMPLICIT_NODE_OUTPUT) == 0) + { + auto pXMLNode = std::make_shared( + m_pImplicitNode, m_pWarnings); + pXMLNode->parseXML(pXMLReader); + } + } +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Inputs.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Inputs.cpp new file mode 100644 index 000000000..60302c43c --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Inputs.cpp @@ -0,0 +1,77 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for ports of a node of a graph representing a function for implicit modelling + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Inputs.h" +#include "Model/Reader/Volumetric2201/NMR_Implicit_PortType_Convert.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Port.h" + +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelConstants.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" + +namespace NMR +{ + CModelReaderNode_Implicit_Node_Inputs::CModelReaderNode_Implicit_Node_Inputs( + _In_ CModelImplicitNode * pParentNode, + _In_ PModelWarnings pWarnings) + : CModelReaderNode(pWarnings) + { + __NMRASSERT(pParentNode); + m_pImplicitNode = pParentNode; + } + + void CModelReaderNode_Implicit_Node_Inputs::parseXML(_In_ CXmlReader * pXMLReader) + { + __NMRASSERT(pXMLReader); + + // Parse name + parseName(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + } + + void CModelReaderNode_Implicit_Node_Inputs::OnNSChildElement(const nfChar * pChildName, + const nfChar * pNameSpace, + CXmlReader * pXMLReader) + { + Lib3MF::eImplicitPortType portType; + if (implicit::portTypeFromRefName(pChildName, portType)) + { + auto pXMLNode = CModelReaderNode_Implicit_Port( + m_pImplicitNode, m_pWarnings, portType, ImplicitPortInOut::Input); + pXMLNode.parseXML(pXMLReader); + } + } +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Outputs.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Outputs.cpp new file mode 100644 index 000000000..2c4fec20d --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Outputs.cpp @@ -0,0 +1,78 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for output ports of a node + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Node_Outputs.h" +#include "Model/Reader/Volumetric2201/NMR_Implicit_PortType_Convert.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Port.h" + +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelConstants.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" + +namespace NMR +{ + CModelReaderNode_Implicit_Node_Outputs::CModelReaderNode_Implicit_Node_Outputs( + _In_ CModelImplicitNode * pParentNode, + _In_ PModelWarnings pWarnings) + : CModelReaderNode(pWarnings) + { + __NMRASSERT(pParentNode); + m_pImplicitNode = pParentNode; + } + + void CModelReaderNode_Implicit_Node_Outputs::parseXML(_In_ CXmlReader * pXMLReader) + { + __NMRASSERT(pXMLReader); + + // Parse name + parseName(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + } + + void CModelReaderNode_Implicit_Node_Outputs::OnNSChildElement(const nfChar * pChildName, + const nfChar * pNameSpace, + CXmlReader * pXMLReader) + { + + Lib3MF::eImplicitPortType portType; + if (implicit::portTypeFromName(pChildName, portType)) + { + auto pXMLNode = CModelReaderNode_Implicit_Port( + m_pImplicitNode, m_pWarnings, portType, ImplicitPortInOut::Output); + pXMLNode.parseXML(pXMLReader); + } + } +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Port.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Port.cpp new file mode 100644 index 000000000..cfeba579b --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Port.cpp @@ -0,0 +1,119 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for a single port of a node of a graph representing a function for implicit modelling + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Port.h" + +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelConstants.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" + +namespace NMR +{ + CModelReaderNode_Implicit_Port::CModelReaderNode_Implicit_Port(CModelImplicitNode * pParentNode, + PModelWarnings pWarnings, + Lib3MF::eImplicitPortType portType, + ImplicitPortInOut inOut) + : CModelReaderNode(pWarnings) + , m_portType(portType), + m_inOut(inOut) + { + __NMRASSERT(pParentNode); + m_pParentNode = pParentNode; + } + + void CModelReaderNode_Implicit_Port::parseXML(CXmlReader * pXMLReader) + { + __NMRASSERT(pXMLReader); + + // Parse name + parseName(pXMLReader); + + // Parse Attributes + parseAttributes(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + + // Create Implicit Port + switch (m_inOut) + { + case ImplicitPortInOut::Input: + createInput(); + break; + case ImplicitPortInOut::Output: + createOutput(); + break; + } + } + + void CModelReaderNode_Implicit_Port::OnAttribute(const nfChar * pAttributeName, + const nfChar * pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_PORT_ID) == 0) + { + m_identifier = pAttributeValue; + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_PORT_DISPLAY_NAME) == 0) + { + m_displayName = pAttributeValue; + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMPLICIT_PORT_REFERENCE) == 0) + { + m_reference = pAttributeValue; + } + } + + void CModelReaderNode_Implicit_Port::createInput() + { + auto input = m_pParentNode->findInput(m_identifier); + if (!input) + { + input = m_pParentNode->addInput(m_identifier, m_displayName); + } + input->setType(m_portType); + input->setDisplayName(m_displayName); + input->setReference(m_reference); + } + + void NMR::CModelReaderNode_Implicit_Port::createOutput() + { + auto output = m_pParentNode->findOutput(m_identifier); + if (!output) + { + output = m_pParentNode->addOutput(m_identifier, m_displayName); + } + output->setType(m_portType); + output->setDisplayName(m_displayName); + } +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_LevelSet.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_LevelSet.cpp new file mode 100644 index 000000000..ee34fe482 --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_LevelSet.cpp @@ -0,0 +1,246 @@ +/*++ + +Copyright (C) 2024 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Reader for boundary shape objects + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_LevelSet.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" +#include "Model/Classes/NMR_ModelLevelSetObject.h" +#include "Model/Classes/NMR_ModelMeshObject.h" +#include "Model/Classes/NMR_ModelResource.h" +#include "Model/Classes/NMR_ModelConstants.h" + +namespace NMR +{ + + NMR::CModelReaderNode_LevelSet::CModelReaderNode_LevelSet( + CModel * pModel, PModelLevelSetObject levelSet, + PModelWarnings pWarnings, PProgressMonitor pProgressMonitor) + : CModelReaderNode(pWarnings, pProgressMonitor), m_parentModel(pModel), m_pLevelSet(std::move(levelSet)) + { + + } + + void CModelReaderNode_LevelSet::parseXML(CXmlReader* pXMLReader) + { + __NMRASSERT(pXMLReader); + // Parse name + parseName(pXMLReader); + + // Parse Attributes + parseAttributes(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + + PPackageResourceID functionPackageId = m_parentModel->findPackageResourceID( + m_parentModel->currentPath(), m_nFunctionID); + if(!functionPackageId.get()) + { + throw CNMRException(NMR_ERROR_UNKNOWNMODELRESOURCE); + } + + auto pFunction = m_parentModel->findFunction(functionPackageId->getUniqueID()); + if(!pFunction) + { + throw CNMRException(NMR_ERROR_INVALIDMODELRESOURCE); + } + + m_pLevelSet->setFunction(pFunction); + + PPackageResourceID meshPackageId = m_parentModel->findPackageResourceID( + m_parentModel->currentPath(), m_nMeshID); + + if(!meshPackageId.get()) + { + throw CNMRException(NMR_ERROR_UNKNOWNMODELRESOURCE); + } + + PModelResource pMeshResource = m_parentModel->findResource(meshPackageId); + + if(!pMeshResource) + { + throw CNMRException(NMR_ERROR_INVALIDMODELRESOURCE); + } + + PModelMeshObject pMeshObject = std::dynamic_pointer_cast(pMeshResource); + + if(!pMeshObject) + { + throw CNMRException(NMR_ERROR_INVALIDMODELRESOURCE); + } + + m_pLevelSet->setMesh(pMeshObject); + + if(m_bHasTransform) + { + m_pLevelSet->setTransform(m_Transform); + } + + if(m_bHasChannel) + { + m_pLevelSet->setChannelName(m_sChannel); + } + + if(m_bHasMeshBBoxOnly) + { + m_pLevelSet->setMeshBBoxOnly(m_meshBBoxOnly); + } + + if(m_bHasMinFeatureSize) + { + m_pLevelSet->setMinFeatureSize(m_dMinFeatureSize); + } + + if(m_bHasFallBackValue) + { + m_pLevelSet->setFallBackValue(m_dFallBackValue); + } + + if(m_bHasVolumeDataID) + { + PPackageResourceID volumePackageId = + m_parentModel->findPackageResourceID(m_parentModel->currentPath(), + m_nVolumeDataID); + + if(!volumePackageId.get()) + { + throw CNMRException(NMR_ERROR_UNKNOWNMODELRESOURCE); + } + + auto pVolumeData = m_parentModel->findVolumeData( + volumePackageId->getUniqueID()); + + m_pLevelSet->setVolumeData(pVolumeData); + } + } + + void CModelReaderNode_LevelSet::OnAttribute( + const nfChar* pAttributeName, const nfChar* pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_ID) == 0) + { + m_resID = fnStringToUint32(pAttributeValue); + } + + if(strcmp(pAttributeName, + XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_FUNCTION_ID) == 0) + { + if(m_bHasFunctionID) + { + throw CNMRException( + NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_FUNCTION_ID); + } + m_bHasFunctionID = true; + m_nFunctionID = fnStringToUint32(pAttributeValue); + } + else if(strcmp(pAttributeName, + XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_CHANNEL) == 0) + { + if(m_bHasChannel) + { + throw CNMRException(NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_CHANNEL); + } + m_bHasChannel = true; + m_sChannel = pAttributeValue; + } + else if(strcmp(pAttributeName, + XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_TRANSFORM) == 0) + { + if(m_bHasTransform) + { + throw CNMRException( + NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_TRANSFORM); + } + m_bHasTransform = true; + m_Transform = fnMATRIX3_fromString(pAttributeValue); + } + else if(strcmp(pAttributeName, + XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_MIN_FEATURE_SIZE) == 0) + { + if(m_bHasMinFeatureSize) + { + throw CNMRException( + NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_MIN_FEATURE_SIZE); + } + m_bHasMinFeatureSize = true; + m_dMinFeatureSize = fnStringToDouble(pAttributeValue); + } + else if(strcmp(pAttributeName, + XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_MESH_BBOX_ONLY) == 0) + { + m_bHasMeshBBoxOnly = true; + m_meshBBoxOnly = !(std::string(pAttributeValue) == "false"); + } + else if(strcmp(pAttributeName, + XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_FALLBACK_VALUE) == 0) + { + if(m_bHasFallBackValue) + { + throw CNMRException( + NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_FALLBACK_VALUE); + } + m_bHasFallBackValue = true; + m_dFallBackValue = fnStringToDouble(pAttributeValue); + } + else if(strcmp(pAttributeName, + XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_MESH_ID) == 0) + { + if(m_bHasMeshID) + { + throw CNMRException( + NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_MESH_ID); + } + m_bHasMeshID = true; + m_nMeshID = fnStringToUint32(pAttributeValue); + } + else if(strcmp(pAttributeName, + XML_3MF_ATTRIBUTE_MESH_VOLUMEDATA) == 0) + { + if(m_bHasVolumeDataID) + { + throw CNMRException( + NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_VOLUME_ID); + } + m_bHasVolumeDataID = true; + m_nVolumeDataID = fnStringToUint32(pAttributeValue); + } + } + void CModelReaderNode_LevelSet::OnNSChildElement( + const nfChar* pChildName, const nfChar* pNameSpace, + CXmlReader* pXMLReader) + { + __NMRASSERT(pChildName); + __NMRASSERT(pXMLReader); + __NMRASSERT(pNameSpace); + } +} // namespace NMR diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Color.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Color.cpp new file mode 100644 index 000000000..e4c4eaa95 --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Color.cpp @@ -0,0 +1,156 @@ +/*++ + +Copyright (C) 2020 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +CModelReaderNode_Volumetric2201_Color.cpp covers the official 3MF volumetric extension. + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Color.h" + +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelMeshObject.h" +#include "Model/Classes/NMR_ModelResource.h" +#include "Model/Classes/NMR_Model.h" + +#include "Common/NMR_StringUtils.h" +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" + +namespace NMR { + + + CModelReaderNode_Volumetric2201_Color::CModelReaderNode_Volumetric2201_Color(_In_ PModelWarnings pWarnings) + : CModelReaderNode(pWarnings) + { + } + + void CModelReaderNode_Volumetric2201_Color::parseXML(_In_ CXmlReader * pXMLReader) + { + // Parse name + parseName(pXMLReader); + + // Parse attribute + parseAttributes(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + } + + PVolumeDataColor CModelReaderNode_Volumetric2201_Color::MakeColor(_In_ CModel* pModel) + { + if (!pModel) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + if (!m_bHasFieldID) { + throw CNMRException(NMR_ERROR_MISSINGVOLUMEDATAFIELDID); + } + + PPackageResourceID pID = pModel->findPackageResourceID(pModel->currentPath(), m_nFieldID); + if (!pID.get()) { + throw CNMRException(NMR_ERROR_UNKNOWNMODELRESOURCE); + } + + auto pColorFunction = pModel->findFunction(pID->getUniqueID()); + if (!pColorFunction.get()) { + throw CNMRException(NMR_ERROR_INVALIDMODELRESOURCE); + } + + PVolumeDataColor pColor = std::make_shared(pColorFunction); + + if (m_bHasTransform) + { + pColor->setTransform(m_Transform); + } + + if (m_bHasChannel) + { + pColor->setChannelName(m_sChannel); + } + + if (m_bHasMinFeatureSize) + { + pColor->setMinFeatureSize(m_dMinFeatureSize); + } + + if (m_bHasFallBackValue) + { + pColor->setFallBackValue(m_dFallBackValue); + } + return pColor; + } + + void CModelReaderNode_Volumetric2201_Color::OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_TRANSFORM) == 0) { + if (m_bHasTransform) + throw CNMRException(NMR_ERROR_DUPLICATEVOLUMEDATATRANSFORM); + m_bHasTransform = true; + + m_Transform = fnMATRIX3_fromString(pAttributeValue); + } + + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_FUNCTIONID) == 0) { + if (m_bHasFieldID) + throw CNMRException(NMR_ERROR_DUPLICATEVOLUMEDATAFIELDID); + m_bHasFieldID = true; + + m_nFieldID = fnStringToUint32(pAttributeValue); + } + + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_CHANNEL) == 0) { + if (m_bHasChannel) + throw CNMRException(NMR_ERROR_DUPLICATEVOLUMEDATACHANNEL); + + m_bHasChannel = true; + m_sChannel = pAttributeValue; + } + + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_MINFEATURESIZE) == 0) { + if (m_bHasMinFeatureSize) + throw CNMRException(NMR_ERROR_DUPLICATE_VOLUMEDATA_MINFEATURESIZE); + + m_bHasMinFeatureSize = true; + m_dMinFeatureSize = fnStringToDouble(pAttributeValue); + } + + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_FALLBACKVALUE) == 0) { + if (m_bHasFallBackValue) + throw CNMRException(NMR_ERROR_DUPLICATE_VOLUMEDATA_FALLBACKVALUE); + + m_bHasFallBackValue = true; + m_dFallBackValue = fnStringToDouble(pAttributeValue); + } + } + + void CModelReaderNode_Volumetric2201_Color::OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader) + { + __NMRASSERT(pChildName); + __NMRASSERT(pXMLReader); + __NMRASSERT(pNameSpace); + + } +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Image3D.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Image3D.cpp new file mode 100644 index 000000000..08eaffe1d --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Image3D.cpp @@ -0,0 +1,117 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +NMR_ModelReaderNode_Volumetric2201_Image3D.cpp covers the official 3MF volumetric extension. + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Image3D.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageStack.h" + +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelImage3D.h" +#include "Model/Classes/NMR_ModelResource.h" +#include "Model/Classes/NMR_Model.h" + +#include "Common/NMR_StringUtils.h" +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" + +namespace NMR { + + + CModelReaderNode_Volumetric2201_Image3D::CModelReaderNode_Volumetric2201_Image3D(_In_ CModel * pModel, _In_ PModelWarnings pWarnings) + : CModelReaderNode(pWarnings), + m_pModel (pModel), + m_modelResourceId (0), + m_bHasName (false) + { + if (pModel == nullptr) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + } + + void CModelReaderNode_Volumetric2201_Image3D::parseXML(_In_ CXmlReader * pXMLReader) + { + // Parse name + parseName(pXMLReader); + + // Parse attribute + parseAttributes(pXMLReader); + + //if (!m_bHasName) + // m_pWarnings->addException(CNMRException(NMR_ERROR_MISSINGIMAGE3DNAME), mrwMissingMandatoryValue); + + if (m_modelResourceId == 0) + throw CNMRException(NMR_ERROR_MISSINGMODELRESOURCEID); + + // Parse Content + parseContent(pXMLReader); + + m_pModel->addResource(m_pImage3D); + } + + + void CModelReaderNode_Volumetric2201_Image3D::OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMAGE3D_ID) == 0) { + if (m_modelResourceId != 0) + throw CNMRException(NMR_ERROR_DUPLICATERESOURCEID); + + // Convert to integer and make a input and range check! + m_modelResourceId = fnStringToUint32(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMAGE3D_NAME) == 0) { + if (m_bHasName) + throw CNMRException(NMR_ERROR_DUPLICATEIMAGE3DNAME); + + m_bHasName = true; + m_sName = pAttributeName; + } + } + + void CModelReaderNode_Volumetric2201_Image3D::OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader) + { + __NMRASSERT(pChildName); + __NMRASSERT(pXMLReader); + __NMRASSERT(pNameSpace); + + if (strcmp(pNameSpace, XML_3MF_NAMESPACE_VOLUMETRICSPEC) == 0) { + if (strcmp(pChildName, XML_3MF_ELEMENT_IMAGESTACK) == 0) + { + PModelImageStack pImageStack = CModelImageStack::make(m_modelResourceId, m_pModel, 0, 0, 0); + + PModelReaderNode_Volumetric2201_ImageStack pXMLNode = std::make_shared(m_pModel, pImageStack.get(), m_pWarnings); + pXMLNode->parseXML(pXMLReader); + + m_pImage3D = pImageStack; + } + else + m_pWarnings->addException(CNMRException(NMR_ERROR_NAMESPACE_INVALID_ELEMENT), mrwInvalidOptionalValue); + } + } + +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageSheet.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageSheet.cpp new file mode 100644 index 000000000..438770797 --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageSheet.cpp @@ -0,0 +1,77 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +NMR_ModelReaderNode_Volumetric2201_ImageSheet.cpp covers the official 3MF volumetric extension. + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageSheet.h" + +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelMeshObject.h" +#include "Model/Classes/NMR_ModelResource.h" +#include "Model/Classes/NMR_Model.h" + +#include "Common/NMR_StringUtils.h" +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" + +namespace NMR { + + + CModelReaderNode_Volumetric2201_ImageSheet::CModelReaderNode_Volumetric2201_ImageSheet(_In_ PModelWarnings pWarnings) + : CModelReaderNode(pWarnings) + + { + } + + void CModelReaderNode_Volumetric2201_ImageSheet::parseXML(_In_ CXmlReader * pXMLReader) + { + // Parse name + parseName(pXMLReader); + + // Parse attribute + parseAttributes(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + } + + + void CModelReaderNode_Volumetric2201_ImageSheet::OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMAGESHEET_PATH) == 0) { + m_sPath = pAttributeValue; + } + } + + std::string CModelReaderNode_Volumetric2201_ImageSheet::getPath() + { + return m_sPath; + } + +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageStack.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageStack.cpp new file mode 100644 index 000000000..b2e453d5f --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageStack.cpp @@ -0,0 +1,150 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +NMR_ModelReaderNode_Volumetric2201_ImageStack.cpp covers the official 3MF volumetric extension. + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageStack.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_ImageSheet.h" + +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_Model.h" + +#include "Common/NMR_StringUtils.h" +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" + +namespace NMR { + + + CModelReaderNode_Volumetric2201_ImageStack::CModelReaderNode_Volumetric2201_ImageStack(_In_ CModel* pModel, _In_ CModelImageStack* pImageStack, _In_ PModelWarnings pWarnings) + : CModelReaderNode(pWarnings), + m_pModel(pModel), + m_pImageStack(pImageStack), + m_nRowCount(0), + m_nColumnCount(0), + m_nSheetCount(0), + m_nSheetIndex(0) + { + if (pModel == nullptr) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + if (m_pImageStack == nullptr) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + } + + void CModelReaderNode_Volumetric2201_ImageStack::parseXML(_In_ CXmlReader* pXMLReader) + { + // Parse name + parseName(pXMLReader); + + // Parse attribute + parseAttributes(pXMLReader); + + if (m_nRowCount == 0) + throw CNMRException(NMR_ERROR_MISSINGIMAGESTACKSIZE); + if (m_nColumnCount == 0) + throw CNMRException(NMR_ERROR_MISSINGIMAGESTACKSIZE); + if (m_nSheetCount == 0) + throw CNMRException(NMR_ERROR_MISSINGIMAGESTACKSHEETCOUNT); + + m_pImageStack->setRowCount(m_nRowCount); + m_pImageStack->setColumnCount(m_nColumnCount); + m_pImageStack->setSheetCount(m_nSheetCount); + + m_nSheetIndex = 0; + + // Parse Content + parseContent(pXMLReader); + + if (m_nSheetCount != m_nSheetIndex) + m_pWarnings->addException(CNMRException(NMR_ERROR_INVALIDIMAGSHEETCOUNT), mrwMissingMandatoryValue); + } + + + void CModelReaderNode_Volumetric2201_ImageStack::OnAttribute(_In_z_ const nfChar* pAttributeName, _In_z_ const nfChar* pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMAGESTACK_ROWCOUNT) == 0) { + if (m_nRowCount != 0) + throw CNMRException(NMR_ERROR_DUPLICATEIMAGESTACKSIZE); + + // Convert to integer and make a input and range check! + m_nRowCount = fnStringToUint32(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMAGESTACK_COLUMNCOUNT) == 0) { + if (m_nColumnCount != 0) + throw CNMRException(NMR_ERROR_DUPLICATEIMAGESTACKSIZE); + + // Convert to integer and make a input and range check! + m_nColumnCount = fnStringToUint32(pAttributeValue); + } + else if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_IMAGESTACK_SHEETCOUNT) == 0) { + if (m_nSheetCount != 0) + throw CNMRException(NMR_ERROR_DUPLICATEIMAGESTACKSHEETCOUNT); + + // Convert to integer and make a input and range check! + m_nSheetCount = fnStringToUint32(pAttributeValue); + } + } + + void CModelReaderNode_Volumetric2201_ImageStack::OnNSChildElement(_In_z_ const nfChar* pChildName, _In_z_ const nfChar* pNameSpace, _In_ CXmlReader* pXMLReader) + { + __NMRASSERT(pChildName); + __NMRASSERT(pXMLReader); + __NMRASSERT(pNameSpace); + + if (strcmp(pNameSpace, XML_3MF_NAMESPACE_VOLUMETRICSPEC) == 0) { + if (strcmp(pChildName, XML_3MF_ELEMENT_IMAGESHEET) == 0) + { + PModelReaderNode_Volumetric2201_ImageSheet pXMLNode = std::make_shared(m_pWarnings); + pXMLNode->parseXML(pXMLReader); + + std::string sPath = pXMLNode->getPath(); + if (sPath != "") { + + PModelAttachment pAttachment = m_pModel->findModelAttachment(sPath); + if (pAttachment.get() == nullptr) + m_pWarnings->addException(CNMRException(NMR_ERROR_IMAGESHEETNOTFOUND), mrwFatal); + + if (m_nSheetIndex >= m_nSheetCount) + m_pWarnings->addException(CNMRException(NMR_ERROR_TOOMANYIMAGESHEETS), mrwFatal); + + __NMRASSERT(m_pImageStack.get() != nullptr); + m_pImageStack->setSheet(m_nSheetIndex, pAttachment); + m_nSheetIndex++; + } + else + m_pWarnings->addException(CNMRException(NMR_ERROR_MISSINGIMAGE3DSHEETPATH), mrwMissingMandatoryValue); + + } + else + m_pWarnings->addException(CNMRException(NMR_ERROR_NAMESPACE_INVALID_ELEMENT), mrwInvalidOptionalValue); + } + } + + +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Property.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Property.cpp new file mode 100644 index 000000000..3548eedfd --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Property.cpp @@ -0,0 +1,185 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +CModelReaderNode_Volumetric2201_Property.cpp covers the official 3MF volumetric extension. + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Property.h" + +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelMeshObject.h" +#include "Model/Classes/NMR_ModelResource.h" +#include "Model/Classes/NMR_Model.h" + +#include "Common/NMR_StringUtils.h" +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" + +namespace NMR { + + CModelReaderNode_Volumetric2201_Property::CModelReaderNode_Volumetric2201_Property(_In_ PModelWarnings pWarnings) + : CModelReaderNode(pWarnings) + { + + } + + void CModelReaderNode_Volumetric2201_Property::parseXML(_In_ CXmlReader * pXMLReader) + { + // Parse name + parseName(pXMLReader); + + // Parse attribute + parseAttributes(pXMLReader); + + // Parse Content + parseContent(pXMLReader); + } + + PVolumeDataProperty CModelReaderNode_Volumetric2201_Property::MakeProperty(_In_ CModel* pModel) + { + if (!pModel) + throw CNMRException(NMR_ERROR_INVALIDPARAM); + + if (!m_bHasFieldID) { + throw CNMRException(NMR_ERROR_MISSINGVOLUMEDATAFIELDID); + } + + if (!m_bHasName) { + throw CNMRException(NMR_ERROR_MISSINGVOLUMEDATAPROPERTYNAME); + } + + PPackageResourceID pID = pModel->findPackageResourceID(pModel->currentPath(), m_nFieldID); + if (!pID.get()) { + throw CNMRException(NMR_ERROR_UNKNOWNMODELRESOURCE); + } + + auto pFunction = pModel->findFunction(pID->getUniqueID()); + + NMR::PVolumeDataProperty pProperty; + if (pFunction) + { + pProperty = std::make_shared(pFunction, m_sName); + } + + if (!pProperty) { + throw CNMRException(NMR_ERROR_UNKNOWNMODELRESOURCE); + } + pProperty->setIsRequired(m_bRequired); + + if (m_bHasTransform) + { + pProperty->setTransform(m_Transform); + } + + if (m_bHasChannel) + { + pProperty->setChannelName(m_sChannel); + } + + if (m_bHasMinFeatureSize) + { + pProperty->setMinFeatureSize(m_dMinFeatureSize); + } + + if (m_bHasFallBackValue) + { + pProperty->setFallBackValue(m_dFallBackValue); + } + + return pProperty; + } + + void CModelReaderNode_Volumetric2201_Property::OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_TRANSFORM) == 0) { + if (m_bHasTransform) + throw CNMRException(NMR_ERROR_DUPLICATEVOLUMEDATATRANSFORM); + + m_Transform = fnMATRIX3_fromString(pAttributeValue); + + m_bHasTransform = true; + } + + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_PROPERTY) == 0) { + if (m_bHasName) + throw CNMRException(NMR_ERROR_DUPLICATEVOLUMEDATAPROPERTY); + + m_bHasName = true; + + m_sName = pAttributeValue; + } + + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_FUNCTIONID) == 0) { + if (m_bHasFieldID) + throw CNMRException(NMR_ERROR_DUPLICATEVOLUMEDATAFIELDID); + + m_bHasFieldID = true; + + m_nFieldID = fnStringToUint32(pAttributeValue); + } + + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_PROPERTY_REQUIRED) == 0) { + + m_bHasRequired = true; + + m_bRequired = !(std::string(pAttributeValue) == "false"); + } + + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_CHANNEL) == 0) { + if (m_bHasChannel) + throw CNMRException(NMR_ERROR_DUPLICATEVOLUMEDATACHANNEL); + + m_bHasChannel = true; + m_sChannel = pAttributeValue; + } + + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_MINFEATURESIZE) == 0) { + if (m_bHasMinFeatureSize) + throw CNMRException(NMR_ERROR_DUPLICATE_VOLUMEDATA_MINFEATURESIZE); + + m_bHasMinFeatureSize = true; + m_dMinFeatureSize = strtod(pAttributeValue, nullptr); + } + + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_FALLBACKVALUE) == 0) { + if (m_bHasFallBackValue) + throw CNMRException(NMR_ERROR_DUPLICATE_VOLUMEDATA_FALLBACKVALUE); + + m_bHasFallBackValue = true; + m_dFallBackValue = fnStringToDouble(pAttributeValue); + } + } + + void CModelReaderNode_Volumetric2201_Property::OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader) + { + __NMRASSERT(pChildName); + __NMRASSERT(pXMLReader); + __NMRASSERT(pNameSpace); + + } +} diff --git a/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_VolumeData.cpp b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_VolumeData.cpp new file mode 100644 index 000000000..9b40c58e7 --- /dev/null +++ b/Source/Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_VolumeData.cpp @@ -0,0 +1,138 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +NMR_ModelReaderNode_Volumetric2201_VolumeData.cpp covers the official 3MF +volumetric extension. + +--*/ + +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_VolumeData.h" + +#include "Common/NMR_Exception.h" +#include "Common/NMR_Exception_Windows.h" +#include "Common/NMR_StringUtils.h" +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelMeshObject.h" +#include "Model/Classes/NMR_ModelResource.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Color.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Property.h" + +namespace NMR +{ + + CModelReaderNode_Volumetric2201_VolumeData:: + CModelReaderNode_Volumetric2201_VolumeData(CModel* pModel, + PModelWarnings pWarnings) + : CModelReaderNode(pWarnings), + m_pModel(pModel) + + { + if(pModel == nullptr) + { + throw CNMRException(NMR_ERROR_INVALIDPARAM); + } + } + + void CModelReaderNode_Volumetric2201_VolumeData::parseXML( + CXmlReader* pXMLReader) + { + // Parse name + parseName(pXMLReader); + + // Parse attribute + parseAttributes(pXMLReader); + + // parseContent needs m_pVolumeData to be initialized, and m_nID to be set by parseAttributes + m_pVolumeData = std::make_shared(m_nID, m_pModel); + // Parse Content + parseContent(pXMLReader); + + m_pModel->addResource(m_pVolumeData); + } + + void CModelReaderNode_Volumetric2201_VolumeData::OnAttribute( + const nfChar* pAttributeName, const nfChar* pAttributeValue) + { + if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_VOLUMEDATA_ID) == 0) { + if (m_nID != 0) + { + throw CNMRException(NMR_ERROR_DUPLICATERESOURCEID); + } + + // Convert to integer and make a input and range check! + m_nID = fnStringToUint32(pAttributeValue); + } + } + + void CModelReaderNode_Volumetric2201_VolumeData::OnNSChildElement( + const nfChar* pChildName, const nfChar* pNameSpace, + CXmlReader* pXMLReader) + { + __NMRASSERT(pChildName); + __NMRASSERT(pXMLReader); + __NMRASSERT(pNameSpace); + + if(strcmp(pNameSpace, XML_3MF_NAMESPACE_VOLUMETRICSPEC) == 0) + { + if(strcmp(pChildName, XML_3MF_ELEMENT_VOLUMETRIC_PROPERTY) == 0) + { + PModelReaderNode_Volumetric2201_Property pXMLNode = + std::make_shared( + m_pWarnings); + pXMLNode->parseXML(pXMLReader); + + PVolumeDataProperty pProperty = + pXMLNode->MakeProperty(m_pModel); + + if(m_pVolumeData->hasProperty(pProperty->getName()) == false) + { + m_pVolumeData->addProperty(pProperty); + } + else + { + throw CNMRException(NMR_ERROR_DUPLICATEVOLUMEDATAPROPERTY); + } + } + else if(strcmp(pChildName, XML_3MF_ELEMENT_VOLUMETRIC_COLOR) == 0) + { + PModelReaderNode_Volumetric2201_Color pXMLNode = + std::make_shared( + m_pWarnings); + pXMLNode->parseXML(pXMLReader); + + PVolumeDataColor pColor = pXMLNode->MakeColor(m_pModel); + m_pVolumeData->setColor(pColor); + } + else + m_pWarnings->addException( + CNMRException(NMR_ERROR_NAMESPACE_INVALID_ELEMENT), + mrwInvalidOptionalValue); + } + } + +} // namespace NMR diff --git a/Source/Model/Reader/v093/NMR_ModelReaderNode093_TextureVertex.cpp b/Source/Model/Reader/v093/NMR_ModelReaderNode093_TextureVertex.cpp index 96c4e32d0..a2184ca65 100644 --- a/Source/Model/Reader/v093/NMR_ModelReaderNode093_TextureVertex.cpp +++ b/Source/Model/Reader/v093/NMR_ModelReaderNode093_TextureVertex.cpp @@ -96,7 +96,11 @@ namespace NMR { if (strcmp(pAttributeName, XML_3MF_ATTRIBUTE_TEXTURE_V) == 0) { m_fV = fnStringToFloat(pAttributeValue); - if (std::isnan (m_fV)) +#ifdef __MINGW32__ + if (isNotANumber(m_fV)) +#else + if (std::isnan(m_fV)) +#endif throw CNMRException(NMR_ERROR_INVALIDMODELTEXTURECOORDINATES); if (fabs(m_fV) > XML_3MF_MAXIMUMCOORDINATEVALUE) throw CNMRException(NMR_ERROR_INVALIDMODELTEXTURECOORDINATES); diff --git a/Source/Model/Reader/v100/NMR_ModelReaderNode100_Mesh.cpp b/Source/Model/Reader/v100/NMR_ModelReaderNode100_Mesh.cpp index 16d2fcc23..35bad5fd0 100644 --- a/Source/Model/Reader/v100/NMR_ModelReaderNode100_Mesh.cpp +++ b/Source/Model/Reader/v100/NMR_ModelReaderNode100_Mesh.cpp @@ -35,17 +35,21 @@ A mesh reader model node is a parser for the mesh node of an XML Model Stream. #include "Model/Reader/v100/NMR_ModelReaderNode100_Vertices.h" #include "Model/Reader/v100/NMR_ModelReaderNode100_Triangles.h" #include "Model/Reader/BeamLattice1702/NMR_ModelReaderNode_BeamLattice1702_BeamLattice.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_VolumeData.h" #include "Model/Classes/NMR_ModelConstants.h" +#include "Model/Classes/NMR_ModelVolumeData.h" #include "Common/NMR_StringUtils.h" #include "Common/NMR_Exception.h" #include "Common/NMR_Exception_Windows.h" namespace NMR { - CModelReaderNode100_Mesh::CModelReaderNode100_Mesh(_In_ CModel * pModel, _In_ CMesh * pMesh, _In_ PModelWarnings pWarnings, + CModelReaderNode100_Mesh::CModelReaderNode100_Mesh(_In_ CModel * pModel, PModelMeshObject pMesh, _In_ PModelWarnings pWarnings, _In_ PProgressMonitor pProgressMonitor, _In_ PPackageResourceID pObjectLevelPropertyID, _In_ ModelResourceIndex nDefaultPropertyIndex) - : CModelReaderNode(pWarnings, pProgressMonitor) + : CModelReaderNode(pWarnings, pProgressMonitor), + m_pModel(pModel), + m_pMesh(pMesh) { __NMRASSERT(pMesh); __NMRASSERT(pModel); @@ -53,14 +57,14 @@ namespace NMR { m_pObjectLevelPropertyID = pObjectLevelPropertyID; m_nObjectLevelPropertyIndex = nDefaultPropertyIndex; - m_pMesh = pMesh; - m_pModel = pModel; - m_bHasClippingMeshID = false; m_nClippingMeshID = 0; m_eClipMode = eModelBeamLatticeClipMode::MODELBEAMLATTICECLIPMODE_NONE; m_bHasRepresentationMeshID = false; m_nRepresentationMeshID = 0; + + m_bHasVolumeDataID = false; + m_nVolumeDataID = 0; } void CModelReaderNode100_Mesh::parseXML(_In_ CXmlReader * pXMLReader) @@ -73,6 +77,23 @@ namespace NMR { // Parse Content parseContent(pXMLReader); + + if(m_bHasVolumeDataID) + { + PPackageResourceID volumePackageId = + m_pModel->findPackageResourceID(m_pModel->currentPath(), + m_nVolumeDataID); + + if(!volumePackageId.get()) + { + throw CNMRException(NMR_ERROR_UNKNOWNMODELRESOURCE); + } + + auto pVolumeData = m_pModel->findVolumeData( + volumePackageId->getUniqueID()); + + m_pMesh->setVolumeData(pVolumeData); + } } void CModelReaderNode100_Mesh::retrieveClippingInfo(_Out_ eModelBeamLatticeClipMode &eClipMode, _Out_ nfBool & bHasClippingMode, _Out_ ModelResourceID & nClippingMeshID) @@ -88,36 +109,59 @@ namespace NMR { nRepresentationMeshID = m_nRepresentationMeshID; } - void CModelReaderNode100_Mesh::OnAttribute(_In_z_ const nfChar * pAttributeName, _In_z_ const nfChar * pAttributeValue) + void CModelReaderNode100_Mesh::OnNSAttribute( + _In_z_ const nfChar *pAttributeName, + _In_z_ const nfChar *pAttributeValue, + _In_z_ const nfChar *pNameSpace) { __NMRASSERT(pAttributeName); __NMRASSERT(pAttributeValue); + __NMRASSERT(pNameSpace); + + if(strcmp(pNameSpace, XML_3MF_NAMESPACE_VOLUMETRICSPEC) == 0) + { + if(strcmp(pAttributeName, XML_3MF_ATTRIBUTE_MESH_VOLUMEDATA) == + 0) + { + if(m_bHasVolumeDataID) + { + throw CNMRException( + NMR_ERROR_DUPLICATE_BOUNDARY_SHAPE_VOLUME_ID); + } + m_bHasVolumeDataID = true; + m_nVolumeDataID = fnStringToUint32(pAttributeValue); + } + } } - void CModelReaderNode100_Mesh::OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader) + void CModelReaderNode100_Mesh::OnNSChildElement(_In_z_ const nfChar * pChildName, _In_z_ const nfChar * pNameSpace, _In_ CXmlReader * pXMLReader) { __NMRASSERT(pChildName); __NMRASSERT(pXMLReader); __NMRASSERT(pNameSpace); + + NMR::CMesh *mesh = m_pMesh->getMesh(); + if (strcmp(pNameSpace, XML_3MF_NAMESPACE_CORESPEC100) == 0) { + if (strcmp(pChildName, XML_3MF_ELEMENT_VERTICES) == 0) { - if (m_pMesh->getNodeCount() % PROGRESS_READUPDATE == PROGRESS_READUPDATE - 1) { + if (mesh->getNodeCount() % PROGRESS_READUPDATE == PROGRESS_READUPDATE - 1) { m_pProgressMonitor->SetProgressIdentifier(ProgressIdentifier::PROGRESS_READMESH); m_pProgressMonitor->ReportProgressAndQueryCancelled(true); } - PModelReaderNode pXMLNode = std::make_shared(m_pMesh, m_pWarnings); + PModelReaderNode pXMLNode = std::make_shared(mesh, m_pWarnings); pXMLNode->parseXML(pXMLReader); } else if (strcmp(pChildName, XML_3MF_ELEMENT_TRIANGLES) == 0) { - if (m_pMesh->getFaceCount() % PROGRESS_READUPDATE == PROGRESS_READUPDATE - 1) { + if (mesh->getFaceCount() % PROGRESS_READUPDATE == PROGRESS_READUPDATE - 1) { m_pProgressMonitor->SetProgressIdentifier(ProgressIdentifier::PROGRESS_READMESH); m_pProgressMonitor->ReportProgressAndQueryCancelled(true); } - PModelReaderNode100_Triangles pXMLNode = std::make_shared(m_pModel, m_pMesh, m_pWarnings, + PModelReaderNode100_Triangles pXMLNode = std::make_shared(m_pModel, mesh, m_pWarnings, m_pObjectLevelPropertyID, m_nObjectLevelPropertyIndex); pXMLNode->parseXML(pXMLReader); if (m_pObjectLevelPropertyID && m_pObjectLevelPropertyID->getPackageModelPath() == 0) { @@ -139,7 +183,7 @@ namespace NMR { if (strcmp(pNameSpace, XML_3MF_NAMESPACE_BEAMLATTICESPEC) == 0) { if (strcmp(pChildName, XML_3MF_ELEMENT_BEAMLATTICE) == 0) { - PModelReaderNode_BeamLattice1702_BeamLattice pXMLNode = std::make_shared(m_pModel, m_pMesh, m_pWarnings); + PModelReaderNode_BeamLattice1702_BeamLattice pXMLNode = std::make_shared(m_pModel, mesh, m_pWarnings); pXMLNode->parseXML(pXMLReader); pXMLNode->retrieveClippingInfo(m_eClipMode, m_bHasClippingMeshID, m_nClippingMeshID); diff --git a/Source/Model/Reader/v100/NMR_ModelReaderNode100_MultiProperties.cpp b/Source/Model/Reader/v100/NMR_ModelReaderNode100_MultiProperties.cpp index 1b2fc75e5..4d65ec3be 100644 --- a/Source/Model/Reader/v100/NMR_ModelReaderNode100_MultiProperties.cpp +++ b/Source/Model/Reader/v100/NMR_ModelReaderNode100_MultiProperties.cpp @@ -143,7 +143,7 @@ namespace NMR { eModelBlendMethod method = MODELBLENDMETHOD_MIX; try { method = CModelMultiPropertyGroupResource::stringToBlendMethod(blendMethodString); - } catch (CNMRException e) { + } catch (CNMRException& e) { m_pWarnings->addException(e, mrwInvalidMandatoryValue); } m_pBlendMethods->push_back(method); diff --git a/Source/Model/Reader/v100/NMR_ModelReaderNode100_Object.cpp b/Source/Model/Reader/v100/NMR_ModelReaderNode100_Object.cpp index 504e42dc2..ef1d0d84f 100644 --- a/Source/Model/Reader/v100/NMR_ModelReaderNode100_Object.cpp +++ b/Source/Model/Reader/v100/NMR_ModelReaderNode100_Object.cpp @@ -36,6 +36,7 @@ Stream. #include "Model/Reader/v100/NMR_ModelReaderNode100_Mesh.h" #include "Model/Reader/v100/NMR_ModelReaderNode100_MetaDataGroup.h" #include "Model/Reader/v100/NMR_ModelReaderNode100_Components.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_LevelSet.h" #include "Model/Classes/NMR_ModelConstants.h" #include "Model/Classes/NMR_ModelMeshObject.h" @@ -236,7 +237,8 @@ namespace NMR { // Create Empty Mesh PMesh pMesh = std::make_shared(); // Create Mesh Object - m_pObject = std::make_shared(m_nID, m_pModel, pMesh); + PModelMeshObject meshObject = std::make_shared(m_nID, m_pModel, pMesh); + m_pObject = meshObject; // Set Object Type (might fail, if string is invalid) if (m_bHasType) { if (!m_pObject->setObjectTypeString(m_sType, false)) @@ -244,7 +246,7 @@ namespace NMR { } // Read Mesh - PModelReaderNode100_Mesh pXMLNode = std::make_shared(m_pModel, pMesh.get(), + PModelReaderNode100_Mesh pXMLNode = std::make_shared(m_pModel, meshObject, m_pWarnings, m_pProgressMonitor, m_pObjectLevelPropertyID, m_nObjectLevelPropertyIndex); pXMLNode->parseXML(pXMLReader); @@ -316,7 +318,28 @@ namespace NMR { } - } + if(strcmp(pNameSpace, XML_3MF_NAMESPACE_VOLUMETRICSPEC) == 0) //Seems really wiered that object types defined by extensions have to be handled here + { + if(strcmp(pChildName, XML_3MF_ELEMENT_BOUNDARY_SHAPE) == 0) + { + auto levelSet = std::make_shared(m_nID, m_pModel); + + PModelReaderNode pXMLNode = + std::make_shared( + m_pModel, levelSet, m_pWarnings, m_pProgressMonitor); + pXMLNode->parseXML(pXMLReader); + m_pObject = levelSet; + m_pModel->addResource(m_pObject); + + } + else + { + m_pWarnings->addException( + CNMRException(NMR_ERROR_NAMESPACE_INVALID_ELEMENT), + mrwInvalidOptionalValue); + } + } + } // Create the object-level property from m_nObjectLevelPropertyID, if defined void CModelReaderNode100_Object::createDefaultProperties() @@ -422,5 +445,4 @@ namespace NMR { } } } - } diff --git a/Source/Model/Reader/v100/NMR_ModelReaderNode100_Resources.cpp b/Source/Model/Reader/v100/NMR_ModelReaderNode100_Resources.cpp index fa23352de..5df4ddd9b 100644 --- a/Source/Model/Reader/v100/NMR_ModelReaderNode100_Resources.cpp +++ b/Source/Model/Reader/v100/NMR_ModelReaderNode100_Resources.cpp @@ -40,6 +40,11 @@ XML Model Stream. #include "Model/Reader/v100/NMR_ModelReaderNode100_CompositeMaterials.h" #include "Model/Reader/v100/NMR_ModelReaderNode100_MultiProperties.h" #include "Model/Reader/Slice1507/NMR_ModelReader_Slice1507_SliceStack.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_Image3D.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Implicit_Function.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_FunctionFromImage3D.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_LevelSet.h" +#include "Model/Reader/Volumetric2201/NMR_ModelReaderNode_Volumetric2201_VolumeData.h" #include "Model/Classes/NMR_ModelConstants.h" #include "Common/NMR_StringUtils.h" @@ -141,6 +146,36 @@ namespace NMR { m_pWarnings->addException(CNMRException(NMR_ERROR_NAMESPACE_INVALID_ELEMENT), mrwInvalidOptionalValue); } + if (strcmp(pNameSpace, XML_3MF_NAMESPACE_VOLUMETRICSPEC) == 0) { + if (strcmp(pChildName, XML_3MF_ELEMENT_IMAGE3D) == 0) { + PModelReaderNode pXMLNode = std::make_shared( + m_pModel, m_pWarnings); + pXMLNode->parseXML(pXMLReader); + } + else if (strcmp(pChildName, XML_3MF_ELEMENT_FUNCTION_FROM_IMAGE3D) == 0) + { + PModelReaderNode pXMLNode = std::make_shared( + m_pModel, m_pWarnings); + pXMLNode->parseXML(pXMLReader); + } if (strcmp(pChildName, XML_3MF_ELEMENT_VOLUMEDATA) == 0) + { + PModelReaderNode pXMLNode = std::make_shared( + m_pModel, m_pWarnings); + pXMLNode->parseXML(pXMLReader); + } + else + m_pWarnings->addException(CNMRException(NMR_ERROR_NAMESPACE_INVALID_ELEMENT), mrwInvalidOptionalValue); + } + + if (strcmp(pNameSpace, XML_3MF_NAMESPACE_IMPLICITSPEC) == 0) { + if ((strcmp(pChildName, XML_3MF_ELEMENT_IMPLICIT_FUNCTION_DEPRECATED) == 0) || (strcmp(pChildName, XML_3MF_ELEMENT_IMPLICIT_FUNCTION) == 0)) + { + PModelReaderNode_ImplicitFunction pXMLNode = std::make_shared(m_pModel, m_pWarnings); + pXMLNode->parseXML(pXMLReader); + } + else + m_pWarnings->addException(CNMRException(NMR_ERROR_NAMESPACE_INVALID_ELEMENT), mrwInvalidOptionalValue); + } } diff --git a/Source/Model/Writer/NMR_KeyStoreOpcPackageWriter.cpp b/Source/Model/Writer/NMR_KeyStoreOpcPackageWriter.cpp index a76059a62..49632d714 100644 --- a/Source/Model/Writer/NMR_KeyStoreOpcPackageWriter.cpp +++ b/Source/Model/Writer/NMR_KeyStoreOpcPackageWriter.cpp @@ -79,7 +79,7 @@ namespace NMR { } PModel const & model = m_pContext.model(); - if (!model->hasCryptoRandCallbak()) + if (!model->hasCryptoRandCallbak() && (keyStore->getResourceDataCount()>0)) m_pContext.warnings()->addWarning(NMR_ERROR_RNGCALLBACKNOTCRYPTOSTRONG, eModelWarningLevel::mrwInvalidOptionalValue); for (nfUint64 i = 0; i < keyStore->getResourceDataCount(); ++i) { PKeyStoreResourceData rd = keyStore->getResourceData(i); @@ -139,7 +139,7 @@ namespace NMR { ctx.m_sKekDecryptData.m_pAccessRight = ar; std::vector closedKey; //give consumer a chance to (re)encrypt this key - nfUint64 wrapped = ctx.m_fnWrap(key, closedKey, ctx.m_sKekDecryptData); + ctx.m_fnWrap(key, closedKey, ctx.m_sKekDecryptData); ar->setCipherValue(closedKey); } catch (CNMRException const & e) { if (ar->isNew()) { diff --git a/Source/Model/Writer/NMR_ModelWriterNode.cpp b/Source/Model/Writer/NMR_ModelWriterNode.cpp index 03ec812a4..82beb3093 100644 --- a/Source/Model/Writer/NMR_ModelWriterNode.cpp +++ b/Source/Model/Writer/NMR_ModelWriterNode.cpp @@ -83,8 +83,18 @@ namespace NMR { writeConstStringAttribute(pAttributeName, sStream.str().c_str()); } - void CModelWriterNode::writeUintAttribute(_In_z_ const nfChar * pAttributeName, _In_ nfUint32 nAttributeValue) + void CModelWriterNode::writePrefixedIntAttribute( + const nfChar* pPrefix, const nfChar* pAttributeName, + nfInt32 nAttributeValue) { + std::stringstream sStream; + sStream << nAttributeValue; + writeConstPrefixedStringAttribute(pPrefix, pAttributeName, sStream.str().c_str()); + } + + void CModelWriterNode::writeUintAttribute( + _In_z_ const nfChar* pAttributeName, _In_ nfUint32 nAttributeValue) + { std::stringstream sStream; sStream << nAttributeValue; writeConstStringAttribute(pAttributeName, sStream.str().c_str()); @@ -97,6 +107,13 @@ namespace NMR { writeConstStringAttribute(pAttributeName, sStream.str().c_str()); } + void CModelWriterNode::writeDoubleAttribute(_In_z_ const nfChar* pAttributeName, _In_ nfDouble dAttributeValue) + { + std::stringstream sStream; + sStream << dAttributeValue; + writeConstStringAttribute(pAttributeName, sStream.str().c_str()); + } + void CModelWriterNode::writeStartElement(_In_z_ const nfChar * pElementName) { m_pXMLWriter->WriteStartElement(nullptr, pElementName, nullptr); diff --git a/Source/Model/Writer/NMR_ModelWriterNode_Implicit.cpp b/Source/Model/Writer/NMR_ModelWriterNode_Implicit.cpp new file mode 100644 index 000000000..b718bd400 --- /dev/null +++ b/Source/Model/Writer/NMR_ModelWriterNode_Implicit.cpp @@ -0,0 +1,288 @@ +/*++ + +Copyright (C) 2023 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Writer node for implicit functions + +--*/ +#include "Model/Writer/NMR_ModelWriterNode_Implicit.h" +#include "Model/Classes/NMR_ImplicitNodeTypes.h" +#include "Common/NMR_Exception.h" +#include "lib3mf_types.hpp" + +#include + +namespace NMR +{ + const implicit::NodeTypes CModelWriterNode_Implicit::m_nodeTypes; + + CModelWriterNode_Implicit::CModelWriterNode_Implicit(CModel * pModel, + CXmlWriter * pXMLWriter, + PProgressMonitor pProgressMonitor) + : CModelWriterNode_ModelBase(pModel, pXMLWriter, pProgressMonitor) + { + } + + void CModelWriterNode_Implicit::writeImplicitFunctions() + { + nfUint32 const nCount = m_pModel->getFunctionCount(); + + for (nfUint32 nIndex = 0; nIndex < nCount; nIndex++) + { + m_pProgressMonitor->IncrementProgress(1); + CModelImplicitFunction * pFunction = m_pModel->getImplicitFunction(nIndex); + if (!pFunction) + { + continue; + } + + writeImplicitFunction(*pFunction); + } + } + + void CModelWriterNode_Implicit::writeImplicitFunction( + CModelImplicitFunction& function) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_IMPLICIT_FUNCTION, + XML_3MF_NAMESPACEPREFIX_IMPLICIT); + { + writeIntAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_ID, + function.getPackageResourceID()->getModelResourceID()); + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_DISPLAY_NAME, + function.getDisplayName()); + + writeImplicitFunctionElements(function); + } + writeFullEndElement(); + } + + void CModelWriterNode_Implicit::writeToXML() + { + throw CNMRException(NMR_ERROR_NOTIMPLEMENTED); + } + + void CModelWriterNode_Implicit::writeImplicitFunctionElements(CModelImplicitFunction & function) + { + writeImplicitFunctionInputs(*function.getInputs()); + + for (auto node : *function.getNodes()) + { + writeImplicitNode(*node); + } + + writeImplicitFunctionOutputs(*function.getOutputs()); + } + + std::string mat4x4ToString(Lib3MF::sMatrix4x4 const & mat) + { + std::stringstream outStream; + outStream << mat.m_Field[0][0] << " " << mat.m_Field[0][1] << " " << mat.m_Field[0][2] << " " + << mat.m_Field[0][3] << " " << mat.m_Field[1][0] << " " << mat.m_Field[1][1] << " " + << mat.m_Field[1][2] << " " << mat.m_Field[1][3] << " " << mat.m_Field[2][0] << " " + << mat.m_Field[2][1] << " " << mat.m_Field[2][2] << " " << mat.m_Field[2][3] << " " + << mat.m_Field[3][0] << " " << mat.m_Field[3][1] << " " << mat.m_Field[3][2] << " " + << mat.m_Field[3][3]; + return outStream.str(); + } + + + + void CModelWriterNode_Implicit::writeImplicitNode(CModelImplicitNode & node) + { + + auto name = m_nodeTypes.getNodeType(node.getNodeType()).getName(); + writeStartElementWithPrefix(name.c_str(), + XML_3MF_NAMESPACEPREFIX_IMPLICIT); + { + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_ID, node.getIdentifier()); + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_DISPLAY_NAME, + node.getDisplayName()); + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_TAG, + node.getTag()); + + if (node.getNodeType() == Lib3MF::eImplicitNodeType::Constant) + { + + writeDoubleAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_VALUE, node.getConstant()); + } + else if (node.getNodeType() == Lib3MF::eImplicitNodeType::ConstVec) + { + auto vec = node.getVector(); + writeDoubleAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_X, vec.m_Coordinates[0]); + writeDoubleAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_Y, vec.m_Coordinates[1]); + writeDoubleAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_Z, vec.m_Coordinates[2]); + } + else if (node.getNodeType() == Lib3MF::eImplicitNodeType::ConstMat) + { + auto const mat = node.getMatrix(); + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_MATRIX, mat4x4ToString(mat)); + } + else if(node.getNodeType() == Lib3MF::eImplicitNodeType::ConstResourceID) + { + auto resource = node.getResource(); + if (resource != nullptr) + { + writeIntAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_NODE_VALUE, resource->getPackageResourceID()->getModelResourceID()); + } + + } + + bool const isNodeWithoutInputs = node.getNodeType() == Lib3MF::eImplicitNodeType::Constant || + node.getNodeType() == Lib3MF::eImplicitNodeType::ConstVec || + node.getNodeType() == Lib3MF::eImplicitNodeType::ConstMat || + node.getNodeType() == Lib3MF::eImplicitNodeType::ConstResourceID; + + if (!isNodeWithoutInputs) // Certain node types are not allowed to have inputs, but may have been set by the producer + { + auto inputs = node.getInputs(); + if (!inputs->empty()) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_IMPLICIT_NODE_INPUT, + XML_3MF_NAMESPACEPREFIX_IMPLICIT); + { + writeImplicitInputs(*inputs); + } + writeFullEndElement(); + } + } + + writeStartElementWithPrefix(XML_3MF_ELEMENT_IMPLICIT_NODE_OUTPUT, + XML_3MF_NAMESPACEPREFIX_IMPLICIT); + { + auto outputs = node.getOutputs(); + writeImplicitOutputs(*outputs); + } + writeFullEndElement(); + } + writeFullEndElement(); + } + + const char * portTypeToRefName(Lib3MF::eImplicitPortType type) + { + switch (type) + { + case Lib3MF::eImplicitPortType::Scalar: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_SCALAR_REF; + case Lib3MF::eImplicitPortType::Vector: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_VECTOR_REF; + case Lib3MF::eImplicitPortType::Matrix: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_MATRIX_REF; + case Lib3MF::eImplicitPortType::ResourceID: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_RESOURCE_REF; + default: + return "Invalid"; + } + } + + void NMR::CModelWriterNode_Implicit::writeImplicitInputs(NMR::Ports & ports) + { + for (auto & port : ports) + { + writeStartElementWithPrefix(portTypeToRefName(port->getType()), + XML_3MF_NAMESPACEPREFIX_IMPLICIT); + { + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_PORT_ID, port->getIdentifier()); + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_PORT_DISPLAY_NAME, + port->getDisplayName()); + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_PORT_REFERENCE, + port->getReference()); + } + writeFullEndElement(); + } + } + + const char * portTypeToName(Lib3MF::eImplicitPortType type) + { + switch (type) + { + case Lib3MF::eImplicitPortType::Scalar: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_SCALAR; + case Lib3MF::eImplicitPortType::Vector: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_VECTOR; + case Lib3MF::eImplicitPortType::Matrix: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_MATRIX; + case Lib3MF::eImplicitPortType::ResourceID: + return XML_3MF_ELEMENT_IMPLICIT_PORT_TYPE_RESOURCE_ID; + default: + return "Invalid"; + } + } + + void CModelWriterNode_Implicit::writeImplicitFunctionInputs(NMR::Ports & ports) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_IMPLICIT_FUNCTION_INPUT, + XML_3MF_NAMESPACEPREFIX_IMPLICIT); + + for (auto & port : ports) + { + writeStartElementWithPrefix(portTypeToName(port->getType()), + XML_3MF_NAMESPACEPREFIX_IMPLICIT); + { + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_PORT_ID, port->getIdentifier()); + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_PORT_DISPLAY_NAME, + port->getDisplayName()); + } + writeFullEndElement(); + } + writeFullEndElement(); + } + + void CModelWriterNode_Implicit::writeImplicitFunctionOutputs(NMR::Ports & ports) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_IMPLICIT_FUNCTION_OUTPUT, + XML_3MF_NAMESPACEPREFIX_IMPLICIT); + + for (auto & port : ports) + { + writeStartElementWithPrefix(portTypeToRefName(port->getType()), + XML_3MF_NAMESPACEPREFIX_IMPLICIT); + { + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_PORT_ID, port->getIdentifier()); + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_PORT_DISPLAY_NAME, + port->getDisplayName()); + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_PORT_REFERENCE, + port->getReference()); + } + writeFullEndElement(); + } + writeFullEndElement(); + } + + void NMR::CModelWriterNode_Implicit::writeImplicitOutputs(NMR::Ports & ports) + { + for (auto & port : ports) + { + writeStartElementWithPrefix(portTypeToName(port->getType()), + XML_3MF_NAMESPACEPREFIX_IMPLICIT); + { + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_PORT_ID, port->getIdentifier()); + writeStringAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_PORT_DISPLAY_NAME, + port->getDisplayName()); + } + writeFullEndElement(); + } + } +} diff --git a/Source/Model/Writer/NMR_ModelWriterNode_LevelSet.cpp b/Source/Model/Writer/NMR_ModelWriterNode_LevelSet.cpp new file mode 100644 index 000000000..af5e573e5 --- /dev/null +++ b/Source/Model/Writer/NMR_ModelWriterNode_LevelSet.cpp @@ -0,0 +1,152 @@ +/*++ + +Copyright (C) 2024 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Writer node for LevelSet resources + +--*/ +#include "Model/Writer/NMR_ModelWriterNode_LevelSet.h" + +#include + +#include "Common/NMR_Exception.h" +#include "Model/Classes/NMR_ImplicitNodeTypes.h" +#include "Model/Classes/NMR_ModelLevelSetObject.h" +#include "Model/Classes/NMR_ModelMeshObject.h" +#include "lib3mf_types.hpp" + +namespace NMR +{ + CModelWriterNode_LevelSet::CModelWriterNode_LevelSet( + CModel* pModel, + CModelLevelSetObject * pLevelSet, + CXmlWriter* pXMLWriter, + PProgressMonitor pProgressMonitor) + : CModelWriterNode_ModelBase(pModel, pXMLWriter, pProgressMonitor), m_pLevelSet(pLevelSet) + { + } + + void CModelWriterNode_LevelSet::writeLevelSetResources() + { + nfUint32 const nCount = m_pModel->getObjectCount(); + + for(nfUint32 nIndex = 0; nIndex < nCount; nIndex++) + { + m_pProgressMonitor->IncrementProgress(1); + CModelLevelSetObject* pLevelSet = + dynamic_cast( + m_pModel->getObject(nIndex)); + if(!pLevelSet) + { + continue; + } + writeLevelSetResource(*pLevelSet); + } + } + + void CModelWriterNode_LevelSet::writeLevelSetResource( + CModelLevelSetObject& levelSet) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_BOUNDARY_SHAPE, XML_3MF_NAMESPACEPREFIX_VOLUMETRIC); + + auto function = levelSet.getFunction(); + if(!function) + { + throw CNMRException(NMR_ERROR_INVALIDMODELRESOURCE); + } + + PPackageResourceID functionPackageID = function->getPackageResourceID(); + + + + if(!functionPackageID) throw CNMRException(NMR_ERROR_INVALIDMODELRESOURCE); + writeIntAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_FUNCTIONID, + functionPackageID->getModelResourceID()); + + + PModelMeshObject mesh = levelSet.getMesh(); + if(!mesh) + { + throw CNMRException(NMR_ERROR_INVALIDMODELRESOURCE); + } + + PPackageResourceID meshPackageID = mesh->getPackageResourceID(); + if(!meshPackageID) + { + throw CNMRException(NMR_ERROR_INVALIDMODELRESOURCE); + } + writeIntAttribute(XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_MESH_ID, + meshPackageID->getModelResourceID()); + + if(!fnMATRIX3_isIdentity(levelSet.getTransform())) + { + writeStringAttribute(XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_TRANSFORM, + fnMATRIX3_toString(levelSet.getTransform())); + } + + if(!levelSet.getChannelName().empty()) + { + writeStringAttribute(XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_CHANNEL, + levelSet.getChannelName()); + } + else + { + writeStringAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_CHANNEL, + XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_CHANNEL_DEFAULT); + } + + writeStringAttribute(XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_MESH_BBOX_ONLY, + levelSet.getMeshBBoxOnly() ? "true" : "false"); + if(levelSet.getMinFeatureSize() != 0.0) + { + writeFloatAttribute(XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_MIN_FEATURE_SIZE, + float(levelSet.getMinFeatureSize())); + } + + if(levelSet.getFallBackValue() != 0.0) + { + writeFloatAttribute(XML_3MF_ATTRIBUTE_BOUNDARY_SHAPE_FALLBACK_VALUE, + float(levelSet.getFallBackValue())); + } + + auto pVolumeData = levelSet.getVolumeData(); + if (pVolumeData) { + PPackageResourceID pID = pVolumeData->getPackageResourceID(); + if (pID->getPath() != m_pModel->currentPath()) + throw CNMRException(NMR_ERROR_MODELRESOURCE_IN_DIFFERENT_MODEL); + writeIntAttribute(XML_3MF_ATTRIBUTE_LEVELSET_VOLUMEDATA, pID->getModelResourceID()); + } + writeFullEndElement(); + } + void CModelWriterNode_LevelSet::writeToXML() + { + if (m_pLevelSet) + { + writeLevelSetResource(*m_pLevelSet); + } + } + +} // namespace NMR diff --git a/Source/Model/Writer/NMR_ModelWriterNode_VolumeData.cpp b/Source/Model/Writer/NMR_ModelWriterNode_VolumeData.cpp new file mode 100644 index 000000000..84f6fd446 --- /dev/null +++ b/Source/Model/Writer/NMR_ModelWriterNode_VolumeData.cpp @@ -0,0 +1,181 @@ +/*++ + +Copyright (C) 2024 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: +Writer node for VolumeData resources + +--*/ +#include "Model/Writer/NMR_ModelWriterNode_VolumeData.h" +#include + +#include "Common/NMR_Exception.h" +#include "Model/Classes/NMR_ImplicitNodeTypes.h" +#include "lib3mf_types.hpp" + +namespace NMR +{ + CModelWriterNode_VolumeData::CModelWriterNode_VolumeData( + CModel* pModel, CXmlWriter* pXMLWriter, + PProgressMonitor pProgressMonitor) + : CModelWriterNode_ModelBase(pModel, pXMLWriter, pProgressMonitor) + { + } + + void CModelWriterNode_VolumeData::writeVolumeDataResources() + { + nfUint32 const nCount = m_pModel->getVolumeDataCount(); + + for(nfUint32 nIndex = 0; nIndex < nCount; nIndex++) + { + m_pProgressMonitor->IncrementProgress(1); + CModelVolumeData * pVolumeData = m_pModel->getVolumeData(nIndex); + if(!pVolumeData) + { + continue; + } + writeVolumeDataResource(*pVolumeData); + } + } + + void CModelWriterNode_VolumeData::writeToXML() + { + writeVolumeDataResources(); + } + + void CModelWriterNode_VolumeData::writeVolumeDataResource( + CModelVolumeData& volumeData) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_VOLUMEDATA, + XML_3MF_NAMESPACEPREFIX_VOLUMETRIC); + + writeIntAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_ID, volumeData.getPackageResourceID()->getModelResourceID()); + + if(volumeData.getPropertyCount()) + { + nfUint32 count = volumeData.getPropertyCount(); + + for(nfUint32 i = 0; i < count; i++) + { + PVolumeDataProperty pProperty = volumeData.getProperty(i); + if(pProperty) + { + writeProperty(*pProperty); + } + } + } + + if(volumeData.hasColor()) + { + PVolumeDataColor pColor = volumeData.getColor(); + if(pColor) + { + writeColor(*pColor); + } + } + + writeFullEndElement(); + } + + void CModelWriterNode_VolumeData::writeProperty( + CVolumeDataProperty& property) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_VOLUMETRIC_PROPERTY, + XML_3MF_NAMESPACEPREFIX_VOLUMETRIC); + writeStringAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_PROPERTY, + property.getName()); + if(!fnMATRIX3_isIdentity(property.getTransform())) + { + writeStringAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_TRANSFORM, + fnMATRIX3_toString(property.getTransform())); + } + PPackageResourceID pID = + m_pModel->findPackageResourceID(property.getFunctionResourceID()); + if(!pID) throw CNMRException(NMR_ERROR_INVALIDMODELRESOURCE); + writeIntAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_FUNCTIONID, + pID->getModelResourceID()); + if(!property.isRequired()) + writeStringAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_PROPERTY_REQUIRED, + "false"); + + if(!property.getChannelName().empty()) + { + writeStringAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_CHANNEL, + property.getChannelName()); + } + + if(property.getMinFeatureSize() != 0.0) + { + writeFloatAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_MINFEATURESIZE, + float(property.getMinFeatureSize())); + } + + if(property.getFallBackValue() != 0.0) + { + writeFloatAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_FALLBACKVALUE, + float(property.getFallBackValue())); + } + + writeEndElement(); + } + + void CModelWriterNode_VolumeData::writeColor(CVolumeDataColor& color) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_VOLUMETRIC_COLOR, + XML_3MF_NAMESPACEPREFIX_VOLUMETRIC); + + PPackageResourceID pID = + m_pModel->findPackageResourceID(color.getFunctionResourceID()); + if(!pID) throw CNMRException(NMR_ERROR_INVALIDMODELRESOURCE); + writeIntAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_FUNCTIONID, + pID->getModelResourceID()); + + if(!fnMATRIX3_isIdentity(color.getTransform())) + { + writeStringAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_TRANSFORM, + fnMATRIX3_toString(color.getTransform())); + } + + if(!color.getChannelName().empty()) + { + writeStringAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_CHANNEL, + color.getChannelName()); + } + + if(color.getMinFeatureSize() != 0.0) + { + writeFloatAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_MINFEATURESIZE, + float(color.getMinFeatureSize())); + } + + if(color.getFallBackValue() != 0.0) + { + writeFloatAttribute(XML_3MF_ATTRIBUTE_VOLUMEDATA_FALLBACKVALUE, + float(color.getFallBackValue())); + } + + writeEndElement(); + } +} // namespace NMR diff --git a/Source/Model/Writer/NMR_ModelWriter_3MF_OPC.cpp b/Source/Model/Writer/NMR_ModelWriter_3MF_OPC.cpp deleted file mode 100644 index 50f4d5bb2..000000000 --- a/Source/Model/Writer/NMR_ModelWriter_3MF_OPC.cpp +++ /dev/null @@ -1,226 +0,0 @@ -/*++ - -Copyright (C) 2019 3MF Consortium - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Abstract: - -NMR_ModelWriter_3MF_OPC.cpp implements the 3MF Model Writer Class -for Win32. This model writer exports the in memory represenation into a 3MF file, -using the Windows OPC Library Functions. - ---*/ - -#include "Model/Writer/NMR_ModelWriter_3MF_OPC.h" -#include "Model/Classes/NMR_ModelConstants.h" -#include "Common/Platform/NMR_ExportStream_COM.h" -#include "Common/NMR_Exception.h" -#include "Common/NMR_Exception_Windows.h" -#include "Common/Platform/NMR_XmlWriter.h" -#include "Common/Platform/NMR_XmlWriter_Native.h" -#include - -namespace NMR { - - CModelWriter_3MF_OPC::CModelWriter_3MF_OPC(_In_ PModel pModel) : CModelWriter_3MF(pModel) - { - m_nRelationIDCounter = 0; - } - - // These are OPC dependent functions - void CModelWriter_3MF_OPC::createPackage(_In_ CModel * pModel) - { - __NMRASSERT(pModel != nullptr); - - HRESULT hResult; - - m_nRelationIDCounter = 0; - - m_pPackagePartSet = nullptr; - m_pPackageRelationshipSet = nullptr; - m_pPackage = nullptr; - m_pFactory = nullptr; - - // Create OPC Factory - hResult = CoCreateInstance(__uuidof(OpcFactory), NULL, CLSCTX_INPROC_SERVER, __uuidof(IOpcFactory), (LPVOID*)&m_pFactory); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_OPCFACTORYCREATEFAILED, hResult); - - // Create OPC Package - hResult = m_pFactory->CreatePackage(&m_pPackage); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_OPCPACKAGECREATEFAILED, hResult); - - // Read OPC Package Part Set - hResult = m_pPackage->GetPartSet(&m_pPackagePartSet); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_OPCPARTSETREADFAILED, hResult); - - // Read OPC Relationship Set - hResult = m_pPackage->GetRelationshipSet(&m_pPackageRelationshipSet); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_OPCRELATIONSHIPSETREADFAILED, hResult); - - CComPtr pModelPart = createOPCModelPart(PACKAGE_3D_MODEL_URI, PACKAGE_3D_MODEL_CONTENT_TYPE, pModel); - addRelationshipToPackage(m_pPackageRelationshipSet, PACKAGE_START_PART_RELATIONSHIP_TYPE, pModelPart); - } - - void CModelWriter_3MF_OPC::releasePackage() - { - m_pPackagePartSet = nullptr; - m_pPackageRelationshipSet = nullptr; - m_pPackage = nullptr; - m_pFactory = nullptr; - } - - void CModelWriter_3MF_OPC::writePackageToStream(_In_ PExportStream pStream) - { - __NMRASSERT(m_pPackage != nullptr); - __NMRASSERT(m_pFactory != nullptr); - if (pStream.get() == nullptr) - throw CNMRException(NMR_ERROR_INVALIDPARAM); - - // Cast to COM Streams - CExportStream_COM * pCOMExportStream = dynamic_cast (pStream.get()); - if (pCOMExportStream == nullptr) - throw CNMRException(NMR_ERROR_INVALIDSTREAMTYPE); - CComPtr pCOMStream = pCOMExportStream->getCOMStream(); - - HRESULT hResult = m_pFactory->WritePackageToStream(m_pPackage, OPC_WRITE_DEFAULT, pCOMStream); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_COULDNOTWRITEOPCPACKAGETOSTREAM, hResult); - } - - CComPtr CModelWriter_3MF_OPC::createOPCPart(_In_ LPCWSTR pwszUriString, _In_ LPCWSTR pwszContentType) - { - __NMRASSERT(pwszUriString != nullptr); - __NMRASSERT(pwszContentType != nullptr); - __NMRASSERT(m_pFactory != nullptr); - __NMRASSERT(m_pPackagePartSet != nullptr); - HRESULT hResult; - - CComPtr pPartUri; - hResult = m_pFactory->CreatePartUri(pwszUriString, &pPartUri); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_COULDNOTCREATEOPCPARTURI, hResult); - - CComPtr pPart; - hResult = m_pPackagePartSet->CreatePart(pPartUri, pwszContentType, OPC_COMPRESSION_MAXIMUM, &pPart); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_COULDNOTCREATEOPCPART, hResult); - - CComPtr pContentStream; - hResult = pPart->GetContentStream(&pContentStream); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_OPCCOULDNOTGETCONTENTSTREAM, hResult); - - ULARGE_INTEGER nSize; - nSize.HighPart = 0; - nSize.LowPart = 0; - hResult = pContentStream->SetSize(nSize); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_OPCCOULDNOTRESIZESTREAM, hResult); - - LARGE_INTEGER nPosition; - nPosition.HighPart = 0; - nPosition.LowPart = 0; - hResult = pContentStream->Seek(nPosition, STREAM_SEEK_SET, nullptr); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_OPCCOULDNOTSEEKSTREAM, hResult); - - return pPart; - } - - CComPtr CModelWriter_3MF_OPC::createOPCPartFromStream(_In_ LPCWSTR pwszUriString, _In_ LPCWSTR pwszContentType, _In_ IStream * pStream) - { - __NMRASSERT(pwszUriString != nullptr); - __NMRASSERT(pwszContentType != nullptr); - __NMRASSERT(pStream != nullptr); - HRESULT hResult; - - CComPtr pPart = createOPCPart(pwszUriString, pwszContentType); - CComPtr pContentStream; - hResult = pPart->GetContentStream(&pContentStream); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_OPCCOULDNOTGETCONTENTSTREAM, hResult); - - ULARGE_INTEGER nMaxSize; - nMaxSize.HighPart = 0xffffffff; - nMaxSize.LowPart = 0xffffffff; - hResult = pStream->CopyTo(pContentStream, nMaxSize, nullptr, nullptr); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_OPCCOULDNOTCOPYSTREAM, hResult); - - return pPart; - } - - CComPtr CModelWriter_3MF_OPC::createOPCModelPart(_In_ LPCWSTR pwszUriString, _In_ LPCWSTR pwszContentType, _In_ CModel * pModel) - { - __NMRASSERT(pwszUriString != nullptr); - __NMRASSERT(pwszContentType != nullptr); - __NMRASSERT(pModel != nullptr); - HRESULT hResult; - - CComPtr pPart = createOPCPart(pwszUriString, pwszContentType); - CComPtr pContentStream; - hResult = pPart->GetContentStream(&pContentStream); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_OPCCOULDNOTGETCONTENTSTREAM, hResult); - - PExportStream pExportStream = std::make_shared(pContentStream); - PXmlWriter_Native pXMLWriter = std::make_shared(pExportStream); - writeModelStream(pXMLWriter.get(), pModel); - - return pPart; - } - - CComPtr CModelWriter_3MF_OPC::addRelationshipToPackage(_In_ IOpcRelationshipSet * pRelationshipSet, _In_ LPCWSTR pwszRelationshipType, _In_ IOpcPart * pOPCPart) - { - __NMRASSERT(pRelationshipSet != nullptr); - __NMRASSERT(pwszRelationshipType != nullptr); - __NMRASSERT(pOPCPart != nullptr); - HRESULT hResult; - - // Create Unique ID String - std::wstringstream sStream; - sStream << L"rel" << m_nRelationIDCounter; - m_nRelationIDCounter++; - std::wstring sID = sStream.str(); - - // Create Uri - CComPtr pPartUri; - hResult = pOPCPart->GetName(&pPartUri); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_COULDNOTRETRIEVEOPCPARTNAME, hResult); - - // Create Relationship - CComPtr pRelationship; - hResult = pRelationshipSet->CreateRelationship(sID.c_str(), pwszRelationshipType, pPartUri, OPC_URI_TARGET_MODE_INTERNAL, &pRelationship); - if (hResult != S_OK) - throw CNMRException_Windows(NMR_ERROR_COULDNOTCREATEOPCRELATIONSHIP, hResult); - - return pRelationship; - } - -} diff --git a/Source/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.cpp b/Source/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.cpp index 1889288d9..0cdeb444a 100644 --- a/Source/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.cpp +++ b/Source/Model/Writer/v100/NMR_ModelWriterNode100_Mesh.cpp @@ -51,7 +51,7 @@ This is the class for exporting the 3mf mesh node. namespace NMR { CModelWriterNode100_Mesh::CModelWriterNode100_Mesh(_In_ CModelMeshObject * pModelMeshObject, _In_ CXmlWriter * pXMLWriter, _In_ PProgressMonitor pProgressMonitor, - _In_ PMeshInformation_PropertyIndexMapping pPropertyIndexMapping, _In_ int nPosAfterDecPoint, _In_ nfBool bWriteMaterialExtension, _In_ nfBool bWriteBeamLatticeExtension) + _In_ PMeshInformation_PropertyIndexMapping pPropertyIndexMapping, _In_ int nPosAfterDecPoint, _In_ nfBool bWriteMaterialExtension, _In_ nfBool bWriteBeamLatticeExtension, _In_ nfBool bWriteVolumetricExtension) :CModelWriterNode_ModelBase(pModelMeshObject->getModel(), pXMLWriter, pProgressMonitor), m_nPosAfterDecPoint(nPosAfterDecPoint), m_nPutDoubleFactor((nfInt64)(pow(10, CModelWriterNode100_Mesh::m_nPosAfterDecPoint))) { __NMRASSERT(pModelMeshObject != nullptr); @@ -60,6 +60,7 @@ namespace NMR { m_bWriteMaterialExtension = bWriteMaterialExtension; m_bWriteBeamLatticeExtension = bWriteBeamLatticeExtension; + m_bWriteVolumetricExtension = bWriteVolumetricExtension; m_pModelMeshObject = pModelMeshObject; m_pPropertyIndexMapping = pPropertyIndexMapping; @@ -130,6 +131,19 @@ namespace NMR { writeStartElement(XML_3MF_ELEMENT_MESH); m_pProgressMonitor->SetProgressIdentifier(ProgressIdentifier::PROGRESS_WRITENODES); + + // Write id of referenced volume data, if any + if (m_bWriteVolumetricExtension) { + auto pVolumeData = m_pModelMeshObject->getVolumeData(); + if (pVolumeData) { + PPackageResourceID pID = pVolumeData->getPackageResourceID(); + if (pID->getPath() != m_pModel->currentPath()) + throw CNMRException(NMR_ERROR_MODELRESOURCE_IN_DIFFERENT_MODEL); + writePrefixedIntAttribute(XML_3MF_NAMESPACEPREFIX_VOLUMETRIC, XML_3MF_ATTRIBUTE_MESH_VOLUMEDATA, pID->getModelResourceID()); + } + } + + // Write Vertices writeStartElement(XML_3MF_ELEMENT_VERTICES); for (nNodeIndex = 0; nNodeIndex < nNodeCount; nNodeIndex++) { diff --git a/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp b/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp index fdf97fa43..35b9965de 100644 --- a/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp +++ b/Source/Model/Writer/v100/NMR_ModelWriterNode100_Model.cpp @@ -33,6 +33,7 @@ This is the class for exporting the 3mf model stream root node. #include "Model/Writer/v100/NMR_ModelWriterNode100_Mesh.h" #include "Model/Writer/v100/NMR_ModelWriterNode100_Model.h" +#include "Model/Writer/v100/NMR_ResourceDependencySorter.h" #include "Model/Classes/NMR_ModelAttachment.h" #include "Model/Classes/NMR_ModelBuildItem.h" @@ -41,6 +42,9 @@ This is the class for exporting the 3mf model stream root node. #include "Model/Classes/NMR_ModelColorGroup.h" #include "Model/Classes/NMR_ModelTexture2D.h" #include "Model/Classes/NMR_ModelTexture2DGroup.h" +#include "Model/Classes/NMR_ModelImage3D.h" +#include "Model/Classes/NMR_ModelImageStack.h" +#include "Model/Classes/NMR_ModelFunctionFromImage3D.h" #include "Model/Classes/NMR_ModelCompositeMaterials.h" #include "Model/Classes/NMR_ModelMultiPropertyGroup.h" #include "Model/Classes/NMR_ModelMeshObject.h" @@ -50,10 +54,18 @@ This is the class for exporting the 3mf model stream root node. #include "Common/NMR_Exception_Windows.h" #include "Common/NMR_StringUtils.h" #include "Common/MeshInformation/NMR_MeshInformation_Properties.h" +#include "Common/Graph/DirectedGraph.h" +#include "Common/Graph/GraphAlgorithms.h" #include "Model/Classes/NMR_ModelConstants_Slices.h" +#include "Model/Classes/NMR_ModelImplicitFunction.h" +#include "Model/Classes/NMR_ModelLevelSetObject.h" +#include "Model/Classes/NMR_ModelVolumeData.h" +#include "Model/Writer/NMR_ModelWriterNode_Implicit.h" +#include "Model/Writer/NMR_ModelWriterNode_LevelSet.h" +#include "Model/Writer/NMR_ModelWriterNode_VolumeData.h" -#include "Common/3MF_ProgressMonitor.h" +#include "Common/3MF_ProgressMonitor.h" namespace NMR { @@ -70,6 +82,8 @@ namespace NMR { m_bWriteSecureContentExtension = true; m_bWriteBaseMaterials = true; m_bWriteObjects = true; + m_bWriteVolumetricExtension = true; + m_bWriteImplicitExtension = true; m_bWriteCustomNamespaces = true; @@ -161,6 +175,24 @@ namespace NMR { } } + if (m_bWriteVolumetricExtension) { + writeConstPrefixedStringAttribute(XML_3MF_ATTRIBUTE_XMLNS, XML_3MF_NAMESPACEPREFIX_VOLUMETRIC, XML_3MF_NAMESPACE_VOLUMETRICSPEC); + if (m_pModel->RequireExtension(XML_3MF_NAMESPACE_VOLUMETRICSPEC)) { + if (sRequiredExtensions.size() > 0) + sRequiredExtensions = sRequiredExtensions + " "; + sRequiredExtensions = sRequiredExtensions + XML_3MF_NAMESPACEPREFIX_VOLUMETRIC; + } + } + + if (m_bWriteImplicitExtension) { + writeConstPrefixedStringAttribute(XML_3MF_ATTRIBUTE_XMLNS, XML_3MF_NAMESPACEPREFIX_IMPLICIT, XML_3MF_NAMESPACE_IMPLICITSPEC); + if (m_pModel->RequireExtension(XML_3MF_NAMESPACE_IMPLICITSPEC)) { + if (sRequiredExtensions.size() > 0) + sRequiredExtensions = sRequiredExtensions + " "; + sRequiredExtensions = sRequiredExtensions + XML_3MF_NAMESPACEPREFIX_IMPLICIT; + } + } + if (m_bWriteCustomNamespaces) { nfUint32 nNSCount = m_pXMLWriter->GetNamespaceCount(); for (nfUint32 iNSCount = 0; iNSCount < nNSCount; iNSCount++) { @@ -190,35 +222,54 @@ namespace NMR { CModelTexture2DResource * pTexture2D = m_pModel->getTexture2D(nTextureIndex); - writeStartElementWithPrefix(XML_3MF_ELEMENT_TEXTURE2D, XML_3MF_NAMESPACEPREFIX_MATERIAL); + writeTexture2D(pTexture2D); + } - assertResourceIsInCurrentPath(pTexture2D->getPackageResourceID()); - writeIntAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_ID, pTexture2D->getPackageResourceID()->getModelResourceID()); - writeStringAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_PATH, pTexture2D->getAttachment()->getPathURI()); - writeStringAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_CONTENTTYPE, pTexture2D->getContentTypeString()); - - if (pTexture2D->getTileStyleU() != MODELTEXTURETILESTYLE_WRAP) - writeStringAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_TILESTYLEU, CModelTexture2DResource::tileStyleToString(pTexture2D->getTileStyleU())); - if (pTexture2D->getTileStyleV() != MODELTEXTURETILESTYLE_WRAP) - writeStringAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_TILESTYLEV, CModelTexture2DResource::tileStyleToString(pTexture2D->getTileStyleV())); - if (pTexture2D->getFilter() != MODELTEXTUREFILTER_AUTO) - writeStringAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_FILTER, CModelTexture2DResource::filterToString(pTexture2D->getFilter())); - - if (pTexture2D->hasBox2D()) { - nfFloat fU, fV, fWidth, fHeight; - pTexture2D->getBox2D(fU, fV, fWidth, fHeight); - writeStringAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_BOX, - std::to_string(fU) + " " + std::to_string(fV) + " " + std::to_string(fWidth) + " " + std::to_string(fHeight)); - } - - writeEndElement(); + } + void CModelWriterNode100_Model::writeTexture2D( + CModelTexture2DResource *pTexture2D) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_TEXTURE2D, + XML_3MF_NAMESPACEPREFIX_MATERIAL); + + assertResourceIsInCurrentPath(pTexture2D->getPackageResourceID()); + writeIntAttribute( + XML_3MF_ATTRIBUTE_TEXTURE2D_ID, + pTexture2D->getPackageResourceID()->getModelResourceID()); + writeStringAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_PATH, + pTexture2D->getAttachment()->getPathURI()); + writeStringAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_CONTENTTYPE, + pTexture2D->getContentTypeString()); + + if(pTexture2D->getTileStyleU() != MODELTEXTURETILESTYLE_WRAP) + writeStringAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_TILESTYLEU, + CModelTexture2DResource::tileStyleToString( + pTexture2D->getTileStyleU())); + if(pTexture2D->getTileStyleV() != MODELTEXTURETILESTYLE_WRAP) + writeStringAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_TILESTYLEV, + CModelTexture2DResource::tileStyleToString( + pTexture2D->getTileStyleV())); + if(pTexture2D->getFilter() != MODELTEXTUREFILTER_AUTO) + writeStringAttribute(XML_3MF_ATTRIBUTE_TEXTURE2D_FILTER, + CModelTexture2DResource::filterToString( + pTexture2D->getFilter())); + + if(pTexture2D->hasBox2D()) + { + nfFloat fU, fV, fWidth, fHeight; + pTexture2D->getBox2D(fU, fV, fWidth, fHeight); + writeStringAttribute( + XML_3MF_ATTRIBUTE_TEXTURE2D_BOX, + std::to_string(fU) + " " + std::to_string(fV) + " " + + std::to_string(fWidth) + " " + std::to_string(fHeight)); } + writeEndElement(); } - void CModelWriterNode100_Model::writeModelMetaData() - { + void CModelWriterNode100_Model::writeModelMetaData() + { if (m_bIsRootModel) { nfUint32 nMetaDataCount = m_pModel->getMetaDataCount(); @@ -240,42 +291,56 @@ namespace NMR { m_pProgressMonitor->IncrementProgress(1); CModelBaseMaterialResource * pBaseMaterial = m_pModel->getBaseMaterial(nMaterialIndex); + writeBaseMaterial(pBaseMaterial); + } - pBaseMaterial->buildResourceIndexMap(); + } - assertResourceIsInCurrentPath(pBaseMaterial->getPackageResourceID()); - ModelResourceID nResourceID = pBaseMaterial->getPackageResourceID()->getModelResourceID(); + void CModelWriterNode100_Model::writeBaseMaterial( + CModelBaseMaterialResource *pBaseMaterial) + { + pBaseMaterial->buildResourceIndexMap(); - writeStartElement(XML_3MF_ELEMENT_BASEMATERIALS); - // Write Object ID (mandatory) - writeIntAttribute(XML_3MF_ATTRIBUTE_BASEMATERIALS_ID, nResourceID); + assertResourceIsInCurrentPath( + pBaseMaterial->getPackageResourceID()); + ModelResourceID nResourceID = + pBaseMaterial->getPackageResourceID()->getModelResourceID(); - nfUint32 nElementCount = pBaseMaterial->getCount(); + writeStartElement(XML_3MF_ELEMENT_BASEMATERIALS); + // Write Object ID (mandatory) + writeIntAttribute(XML_3MF_ATTRIBUTE_BASEMATERIALS_ID, nResourceID); - UniqueResourceID nUniqueResourceID = pBaseMaterial->getPackageResourceID()->getUniqueID(); + nfUint32 nElementCount = pBaseMaterial->getCount(); - for (nfUint32 j = 0; j < nElementCount; j++) { - ModelPropertyID nPropertyID; - if (!pBaseMaterial->mapResourceIndexToPropertyID(j, nPropertyID)) { - throw CNMRException(NMR_ERROR_INVALIDPROPERTYRESOURCEID); - } - PModelBaseMaterial pElement = pBaseMaterial->getBaseMaterial(nPropertyID); - - m_pPropertyIndexMapping->registerPropertyID(nUniqueResourceID, pElement->getPropertyID(), j); + UniqueResourceID nUniqueResourceID = + pBaseMaterial->getPackageResourceID()->getUniqueID(); - writeStartElement(XML_3MF_ELEMENT_BASE); - writeStringAttribute(XML_3MF_ATTRIBUTE_BASEMATERIAL_NAME, pElement->getName()); - writeStringAttribute(XML_3MF_ATTRIBUTE_BASEMATERIAL_DISPLAYCOLOR, pElement->getDisplayColorString()); - writeEndElement(); + for(nfUint32 j = 0; j < nElementCount; j++) + { + ModelPropertyID nPropertyID; + if(!pBaseMaterial->mapResourceIndexToPropertyID(j, nPropertyID)) + { + throw CNMRException(NMR_ERROR_INVALIDPROPERTYRESOURCEID); } - - writeFullEndElement(); + PModelBaseMaterial pElement = + pBaseMaterial->getBaseMaterial(nPropertyID); + + m_pPropertyIndexMapping->registerPropertyID( + nUniqueResourceID, pElement->getPropertyID(), j); + + writeStartElement(XML_3MF_ELEMENT_BASE); + writeStringAttribute(XML_3MF_ATTRIBUTE_BASEMATERIAL_NAME, + pElement->getName()); + writeStringAttribute( + XML_3MF_ATTRIBUTE_BASEMATERIAL_DISPLAYCOLOR, + pElement->getDisplayColorString()); + writeEndElement(); } + writeFullEndElement(); } - - void CModelWriterNode100_Model::writeSliceStacks() { + void CModelWriterNode100_Model::writeSliceStacks() { nfUint32 nSliceStackCount = m_pModel->getSliceStackCount(); for (nfUint32 nSliceStackIndex = 0; nSliceStackIndex < nSliceStackCount; nSliceStackIndex++) { @@ -376,116 +441,191 @@ namespace NMR { { std::list objectList = m_pModel->getSortedObjectList(); - for (auto iIterator = objectList.begin(); iIterator != objectList.end(); iIterator++) { - CModelObject * pObject = *iIterator; - - PPackageModelPath pPath = pObject->getPackageResourceID()->getPackageModelPath(); - if (m_pModel->currentModelPath()->getPath() != pPath->getPath()) + for(auto iIterator = objectList.begin(); + iIterator != objectList.end(); iIterator++) + { + CModelObject *pObject = *iIterator; + if (!pObject) { - continue; + throw CNMRException(NMR_ERROR_INVALIDMODEL); } + writeObject(*pObject); + } + } - m_pProgressMonitor->SetProgressIdentifier(ProgressIdentifier::PROGRESS_WRITEOBJECTS); - m_pProgressMonitor->IncrementProgress(1); - m_pProgressMonitor->ReportProgressAndQueryCancelled(true); - - writeStartElement(XML_3MF_ELEMENT_OBJECT); - // Write Object ID (mandatory) - writeIntAttribute(XML_3MF_ATTRIBUTE_OBJECT_ID, pObject->getPackageResourceID()->getModelResourceID()); - - // Write Object Name (optional) - std::string sObjectName = pObject->getName(); - if (sObjectName.length() > 0) - writeStringAttribute(XML_3MF_ATTRIBUTE_OBJECT_NAME, sObjectName); - - // Write Object Partnumber (optional) - std::string sObjectPartNumber = pObject->getPartNumber(); - if (sObjectPartNumber.length() > 0) - writeStringAttribute(XML_3MF_ATTRIBUTE_OBJECT_PARTNUMBER, sObjectPartNumber); + void CModelWriterNode100_Model::writeObject(CModelObject &object) + { + PPackageModelPath pPath = + object.getPackageResourceID()->getPackageModelPath(); + if(m_pModel->currentModelPath()->getPath() != pPath->getPath()) + { + return; + } - // Write Object Type (optional) - writeStringAttribute(XML_3MF_ATTRIBUTE_OBJECT_TYPE, pObject->getObjectTypeString()); + m_pProgressMonitor->SetProgressIdentifier( + ProgressIdentifier::PROGRESS_WRITEOBJECTS); + m_pProgressMonitor->IncrementProgress(1); + m_pProgressMonitor->ReportProgressAndQueryCancelled(true); + + writeStartElement(XML_3MF_ELEMENT_OBJECT); + // Write Object ID (mandatory) + writeIntAttribute( + XML_3MF_ATTRIBUTE_OBJECT_ID, + object.getPackageResourceID()->getModelResourceID()); + + // Write Object Name (optional) + std::string sObjectName = object.getName(); + if(sObjectName.length() > 0) + writeStringAttribute(XML_3MF_ATTRIBUTE_OBJECT_NAME, + sObjectName); + + // Write Object Partnumber (optional) + std::string sObjectPartNumber = object.getPartNumber(); + if(sObjectPartNumber.length() > 0) + writeStringAttribute(XML_3MF_ATTRIBUTE_OBJECT_PARTNUMBER, + sObjectPartNumber); + + // Write Object Type (optional) + writeStringAttribute(XML_3MF_ATTRIBUTE_OBJECT_TYPE, + object.getObjectTypeString()); + + // Write Object Thumbnail (optional) + PModelAttachment pThumbnail = object.getThumbnailAttachment(); + if(pThumbnail) + { + PModelAttachment pModelAttachment = + m_pModel->findModelAttachment(pThumbnail->getPathURI()); + if(!pModelAttachment) + throw CNMRException(NMR_ERROR_NOTEXTURESTREAM); + if(!((pModelAttachment->getRelationShipType() == + PACKAGE_TEXTURE_RELATIONSHIP_TYPE) || + (pModelAttachment->getRelationShipType() == + PACKAGE_THUMBNAIL_RELATIONSHIP_TYPE))) + throw CNMRException(NMR_ERROR_NOTEXTURESTREAM); + + writeStringAttribute(XML_3MF_ATTRIBUTE_OBJECT_THUMBNAIL, + pThumbnail->getPathURI()); + } - // Write Object Thumbnail (optional) - PModelAttachment pThumbnail = pObject->getThumbnailAttachment(); - if (pThumbnail) { - PModelAttachment pModelAttachment = m_pModel->findModelAttachment(pThumbnail->getPathURI()); - if (!pModelAttachment) - throw CNMRException(NMR_ERROR_NOTEXTURESTREAM); - if (!((pModelAttachment->getRelationShipType() == PACKAGE_TEXTURE_RELATIONSHIP_TYPE) || (pModelAttachment->getRelationShipType() == PACKAGE_THUMBNAIL_RELATIONSHIP_TYPE))) - throw CNMRException(NMR_ERROR_NOTEXTURESTREAM); + if(m_bWriteProductionExtension) + { + if(!object.uuid().get()) + throw CNMRException(NMR_ERROR_MISSINGUUID); + writePrefixedStringAttribute(XML_3MF_NAMESPACEPREFIX_PRODUCTION, + XML_3MF_PRODUCTION_UUID, + object.uuid()->toString()); + } - writeStringAttribute(XML_3MF_ATTRIBUTE_OBJECT_THUMBNAIL, pThumbnail->getPathURI()); + // Slice extension content + if(m_bWriteSliceExtension) + { + if(object.getSliceStack().get()) + { + assertResourceIsInCurrentPath( + object.getSliceStack()->getPackageResourceID()); + writePrefixedStringAttribute( + XML_3MF_NAMESPACEPREFIX_SLICE, + XML_3MF_ATTRIBUTE_OBJECT_SLICESTACKID, + fnUint32ToString(object.getSliceStack() + ->getPackageResourceID() + ->getModelResourceID())); } - - if (m_bWriteProductionExtension) { - if (!pObject->uuid().get()) - throw CNMRException(NMR_ERROR_MISSINGUUID); - writePrefixedStringAttribute(XML_3MF_NAMESPACEPREFIX_PRODUCTION, XML_3MF_PRODUCTION_UUID, pObject->uuid()->toString()); + if(object.slicesMeshResolution() != + MODELSLICESMESHRESOLUTION_FULL) + { + writePrefixedStringAttribute( + XML_3MF_NAMESPACEPREFIX_SLICE, + XML_3MF_ATTRIBUTE_OBJECT_MESHRESOLUTION, + XML_3MF_VALUE_OBJECT_MESHRESOLUTION_LOW); } + } - // Slice extension content - if (m_bWriteSliceExtension) { - if (pObject->getSliceStack().get()) { - assertResourceIsInCurrentPath(pObject->getSliceStack()->getPackageResourceID()); - writePrefixedStringAttribute(XML_3MF_NAMESPACEPREFIX_SLICE, XML_3MF_ATTRIBUTE_OBJECT_SLICESTACKID, - fnUint32ToString(pObject->getSliceStack()->getPackageResourceID()->getModelResourceID())); - } - if (pObject->slicesMeshResolution() != MODELSLICESMESHRESOLUTION_FULL) { - writePrefixedStringAttribute(XML_3MF_NAMESPACEPREFIX_SLICE, XML_3MF_ATTRIBUTE_OBJECT_MESHRESOLUTION, - XML_3MF_VALUE_OBJECT_MESHRESOLUTION_LOW); - } - } + // Check if object is a mesh Object + CModelMeshObject *pMeshObject = + dynamic_cast(&object); + if(pMeshObject) + { + // Prepare Object Level Property ID and Index + UniqueResourceID nObjectLevelPropertyID = 0; + ModelResourceIndex nObjectLevelPropertyIndex = 0; + CMesh *pMesh = pMeshObject->getMesh(); - // Check if object is a mesh Object - CModelMeshObject * pMeshObject = dynamic_cast (pObject); - if (pMeshObject) { - // Prepare Object Level Property ID and Index - UniqueResourceID nObjectLevelPropertyID = 0; - ModelResourceIndex nObjectLevelPropertyIndex = 0; - CMesh* pMesh = pMeshObject->getMesh(); - - if (pMesh) { - CMeshInformationHandler * pMeshInformationHandler = pMesh->getMeshInformationHandler(); - if (pMeshInformationHandler) { - // Get generic property handler - CMeshInformation *pInformation = pMeshInformationHandler->getInformationByType(0, emiProperties); - if (pInformation) { - auto pProperties = dynamic_cast (pInformation); - NMR::MESHINFORMATION_PROPERTIES * pDefaultData = (NMR::MESHINFORMATION_PROPERTIES*)pProperties->getDefaultData(); - if (pDefaultData && pDefaultData->m_nUniqueResourceID != 0) { - nObjectLevelPropertyID = pDefaultData->m_nUniqueResourceID; - nObjectLevelPropertyIndex = m_pPropertyIndexMapping->mapPropertyIDToIndex(nObjectLevelPropertyID, pDefaultData->m_nPropertyIDs[0]); - } + if(pMesh) + { + CMeshInformationHandler *pMeshInformationHandler = + pMesh->getMeshInformationHandler(); + if(pMeshInformationHandler) + { + // Get generic property handler + CMeshInformation *pInformation = + pMeshInformationHandler->getInformationByType( + 0, emiProperties); + if(pInformation) + { + auto pProperties = + dynamic_cast( + pInformation); + NMR::MESHINFORMATION_PROPERTIES *pDefaultData = + (NMR::MESHINFORMATION_PROPERTIES *) + pProperties->getDefaultData(); + if(pDefaultData && + pDefaultData->m_nUniqueResourceID != 0) + { + nObjectLevelPropertyID = + pDefaultData->m_nUniqueResourceID; + nObjectLevelPropertyIndex = + m_pPropertyIndexMapping + ->mapPropertyIDToIndex( + nObjectLevelPropertyID, + pDefaultData->m_nPropertyIDs[0]); } } } - // Write Object Level Attributes (only for meshes) - if (nObjectLevelPropertyID != 0) { - ModelResourceID nPropertyModelResourceID = m_pModel->findPackageResourceID(nObjectLevelPropertyID)->getModelResourceID(); - writeIntAttribute(XML_3MF_ATTRIBUTE_OBJECT_PID, nPropertyModelResourceID); - writeIntAttribute(XML_3MF_ATTRIBUTE_OBJECT_PINDEX, nObjectLevelPropertyIndex); - } } + // Write Object Level Attributes (only for meshes) + if(nObjectLevelPropertyID != 0) + { + ModelResourceID nPropertyModelResourceID = + m_pModel->findPackageResourceID(nObjectLevelPropertyID) + ->getModelResourceID(); + writeIntAttribute(XML_3MF_ATTRIBUTE_OBJECT_PID, + nPropertyModelResourceID); + writeIntAttribute(XML_3MF_ATTRIBUTE_OBJECT_PINDEX, + nObjectLevelPropertyIndex); + } + } - writeMetaDataGroup(pObject->metaDataGroup()); + writeMetaDataGroup(object.metaDataGroup()); - if (pMeshObject) { - CModelWriterNode100_Mesh ModelWriter_Mesh(pMeshObject, m_pXMLWriter, m_pProgressMonitor, - m_pPropertyIndexMapping, m_nDecimalPrecision, m_bWriteMaterialExtension, m_bWriteBeamLatticeExtension); + if(pMeshObject) + { + CModelWriterNode100_Mesh ModelWriter_Mesh( + pMeshObject, m_pXMLWriter, m_pProgressMonitor, + m_pPropertyIndexMapping, m_nDecimalPrecision, + m_bWriteMaterialExtension, m_bWriteBeamLatticeExtension, + m_bWriteVolumetricExtension); - ModelWriter_Mesh.writeToXML(); - } + ModelWriter_Mesh.writeToXML(); + } - // Check if object is a component Object - CModelComponentsObject * pComponentObject = dynamic_cast (pObject); - if (pComponentObject) { - writeComponentsObject(pComponentObject); - } + // Check if object is a component Object + CModelComponentsObject *pComponentObject = + dynamic_cast(&object); + if(pComponentObject) + { + writeComponentsObject(pComponentObject); + } - writeFullEndElement(); + CModelLevelSetObject *pLevelSet = + dynamic_cast(&object); + if(pLevelSet) + { + CModelWriterNode_LevelSet ModelWriter_LevelSet( + m_pModel, pLevelSet, m_pXMLWriter, m_pProgressMonitor); + ModelWriter_LevelSet.writeToXML(); } + writeFullEndElement(); } void CModelWriterNode100_Model::writeMetaData(_In_ PModelMetaData pMetaData) @@ -542,36 +682,43 @@ namespace NMR { CModelColorGroupResource * pColorGroup = m_pModel->getColorGroup(nIndex); - pColorGroup->buildResourceIndexMap(); + writeColor(pColorGroup); + } + } - assertResourceIsInCurrentPath(pColorGroup->getPackageResourceID()); - ModelResourceID nResourceID = pColorGroup->getPackageResourceID()->getModelResourceID(); + void CModelWriterNode100_Model::writeColor( + CModelColorGroupResource *pColorGroup) + { + pColorGroup->buildResourceIndexMap(); - writeStartElementWithPrefix(XML_3MF_ELEMENT_COLORGROUP, XML_3MF_NAMESPACEPREFIX_MATERIAL); - // Write Object ID (mandatory) - writeIntAttribute(XML_3MF_ATTRIBUTE_COLORS_ID, nResourceID); + assertResourceIsInCurrentPath(pColorGroup->getPackageResourceID()); + ModelResourceID nResourceID = pColorGroup->getPackageResourceID()->getModelResourceID(); - nfUint32 nElementCount = pColorGroup->getCount(); + writeStartElementWithPrefix(XML_3MF_ELEMENT_COLORGROUP, XML_3MF_NAMESPACEPREFIX_MATERIAL); + // Write Object ID (mandatory) + writeIntAttribute(XML_3MF_ATTRIBUTE_COLORS_ID, nResourceID); - UniqueResourceID nUniqueResourceID = pColorGroup->getPackageResourceID()->getUniqueID(); - for (nfUint32 j = 0; j < nElementCount; j++) { - ModelPropertyID nPropertyID; - if (!pColorGroup->mapResourceIndexToPropertyID(j, nPropertyID)) { - throw CNMRException(NMR_ERROR_INVALIDPROPERTYRESOURCEID); - } - nfColor pElement = pColorGroup->getColor(nPropertyID); - - m_pPropertyIndexMapping->registerPropertyID(nUniqueResourceID, nPropertyID, j); + nfUint32 nElementCount = pColorGroup->getCount(); - writeStartElementWithPrefix(XML_3MF_ELEMENT_COLOR, XML_3MF_NAMESPACEPREFIX_MATERIAL); - writeStringAttribute(XML_3MF_ATTRIBUTE_COLORS_COLOR, fnColorToString(pElement)); - writeEndElement(); + UniqueResourceID nUniqueResourceID = pColorGroup->getPackageResourceID()->getUniqueID(); + for (nfUint32 j = 0; j < nElementCount; j++) { + ModelPropertyID nPropertyID; + if (!pColorGroup->mapResourceIndexToPropertyID(j, nPropertyID)) { + throw CNMRException(NMR_ERROR_INVALIDPROPERTYRESOURCEID); } + nfColor pElement = pColorGroup->getColor(nPropertyID); - writeFullEndElement(); + m_pPropertyIndexMapping->registerPropertyID(nUniqueResourceID, nPropertyID, j); + + writeStartElementWithPrefix(XML_3MF_ELEMENT_COLOR, XML_3MF_NAMESPACEPREFIX_MATERIAL); + writeStringAttribute(XML_3MF_ATTRIBUTE_COLORS_COLOR, fnColorToString(pElement)); + writeEndElement(); } + + writeFullEndElement(); } + void CModelWriterNode100_Model::writeTex2Coords() { nfUint32 nGroupCount = m_pModel->getTexture2DGroupCount(); @@ -735,34 +882,157 @@ namespace NMR { } } - void CModelWriterNode100_Model::writeMultiProperties() + void CModelWriterNode100_Model::writeImage3Ds() { - nfUint32 nCount = m_pModel->getMultiPropertyGroupCount(); + nfUint32 nCount = m_pModel->getImage3DCount(); for (nfUint32 nIndex = 0; nIndex < nCount; nIndex++) { + CModelImage3D * pImage3DResource = m_pModel->getImage3D(nIndex); + + if (!pImage3DResource) + { + throw CNMRException(NMR_ERROR_INVALID_RESOURCE_INDEX, "Invalid Image3D resource index."); + } + writeImage3D(*pImage3DResource); + } + + } + + void CModelWriterNode100_Model::writeImage3D(CModelImage3D &pImage3D) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_IMAGE3D, XML_3MF_NAMESPACEPREFIX_VOLUMETRIC); + writeIntAttribute(XML_3MF_ATTRIBUTE_IMAGE3D_ID, pImage3D.getPackageResourceID()->getModelResourceID()); + if (!pImage3D.getName().empty()) + writeStringAttribute(XML_3MF_ATTRIBUTE_IMAGE3D_NAME, pImage3D.getName()); + + if (CModelImageStack* pImageStack = dynamic_cast(&pImage3D)) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_IMAGESTACK, XML_3MF_NAMESPACEPREFIX_VOLUMETRIC); + + nfUint32 nSheetCount = pImageStack->getSheetCount(); + writeIntAttribute(XML_3MF_ATTRIBUTE_IMAGESTACK_ROWCOUNT, pImageStack->getRowCount()); + writeIntAttribute(XML_3MF_ATTRIBUTE_IMAGESTACK_COLUMNCOUNT, pImageStack->getColumnCount()); + writeIntAttribute(XML_3MF_ATTRIBUTE_IMAGESTACK_SHEETCOUNT, nSheetCount); + + for (nfUint32 nSheetIndex = 0; nSheetIndex < nSheetCount; nSheetIndex++) { + auto pSheet = pImageStack->getSheet(nSheetIndex); + writeStartElementWithPrefix(XML_3MF_ELEMENT_IMAGESHEET, XML_3MF_NAMESPACEPREFIX_VOLUMETRIC); + if (pSheet.get() != nullptr) { + writeStringAttribute(XML_3MF_ATTRIBUTE_IMAGESHEET_PATH, pSheet->getPathURI()); + } + writeEndElement(); + } + + writeFullEndElement(); + } + else + { + throw CNMRException(-1); // TODO NMR_ERROR_UNKNOWN_IMAGE3D_TYPE + } + + writeFullEndElement(); + } + + + void CModelWriterNode100_Model::writeFunctionsFromImage3D() + { + nfUint32 nCount = m_pModel->getFunctionCount(); + + for (nfUint32 nIndex = 0u; nIndex < nCount; nIndex++) + { + auto funcFromImg3D = m_pModel->getFunctionFromImage3D(nIndex); + if (!funcFromImg3D) + { + continue; + } + + writeFunctionFromImage3D(*funcFromImg3D); + } + } + + void CModelWriterNode100_Model::writeFunctionFromImage3D( + CModelFunctionFromImage3D & functionFromImage3D) + { + writeStartElementWithPrefix(XML_3MF_ELEMENT_FUNCTION_FROM_IMAGE3D, + XML_3MF_NAMESPACEPREFIX_VOLUMETRIC); + writeIntAttribute(XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_ID, + functionFromImage3D.getPackageResourceID() + ->getModelResourceID()); + writeStringAttribute( + XML_3MF_ATTRIBUTE_IMPLICIT_FUNCTION_DISPLAY_NAME, + functionFromImage3D.getDisplayName()); + writeIntAttribute( + XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_IMAGE3DID, + functionFromImage3D.getImage3DModelResourceID()); + writeDoubleAttribute( + XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_OFFSET, + functionFromImage3D.getOffset()); + writeDoubleAttribute(XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_SCALE, + functionFromImage3D.getScale()); + writeStringAttribute( + XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_TILESTYLEU, + CModelTexture2DResource::tileStyleToString( + functionFromImage3D.getTileStyleU())); + writeStringAttribute( + XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_TILESTYLEV, + CModelTexture2DResource::tileStyleToString( + functionFromImage3D.getTileStyleV())); + writeStringAttribute( + XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_TILESTYLEW, + CModelTexture2DResource::tileStyleToString( + functionFromImage3D.getTileStyleW())); + writeStringAttribute( + XML_3MF_ATTRIBUTE_FUNTCTION_FROM_IMAGE3D_FILTER, + CModelTexture2DResource::filterToString( + functionFromImage3D.getFilter())); + writeFullEndElement(); + } + + void CModelWriterNode100_Model::writeImplicitFunctions() + { + CModelWriterNode_Implicit implicitWriter(m_pModel, m_pXMLWriter, m_pProgressMonitor); + implicitWriter.writeImplicitFunctions(); + } + + void CModelWriterNode100_Model::writeVolumeData() + { + CModelWriterNode_VolumeData volumeWriter(m_pModel, m_pXMLWriter, + m_pProgressMonitor); + volumeWriter.writeToXML(); + } + + void CModelWriterNode100_Model::writeMultiProperties() + { + nfUint32 nCount = m_pModel->getMultiPropertyGroupCount(); + + for (nfUint32 nIndex = 0; nIndex < nCount; nIndex++) + { m_pProgressMonitor->IncrementProgress(1); - CModelMultiPropertyGroupResource * pMultiPropertyGroup = m_pModel->getMultiPropertyGroup(nIndex); + CModelMultiPropertyGroupResource * pMultiPropertyGroup = + m_pModel->getMultiPropertyGroup(nIndex); pMultiPropertyGroup->buildResourceIndexMap(); - writeStartElementWithPrefix(XML_3MF_ELEMENT_MULTIPROPERTIES, XML_3MF_NAMESPACEPREFIX_MATERIAL); + writeStartElementWithPrefix(XML_3MF_ELEMENT_MULTIPROPERTIES, + XML_3MF_NAMESPACEPREFIX_MATERIAL); writeMultiPropertyAttributes(pMultiPropertyGroup); - + writeMultiPropertyMultiElements(pMultiPropertyGroup); writeFullEndElement(); } } - void CModelWriterNode100_Model::writeResources() + void CModelWriterNode100_Model::writeResources() { writeStartElement(XML_3MF_ELEMENT_RESOURCES); if (m_bIsRootModel) { - if (m_bWriteBaseMaterials) + // First we write all Resources, that have no dependencies to other resources + if (m_bWriteBaseMaterials) writeBaseMaterials(); if (m_bWriteMaterialExtension) { @@ -775,9 +1045,29 @@ namespace NMR { if (m_bWriteSliceExtension) { writeSliceStacks(); } - if (m_bWriteObjects) - writeObjects(); - } + + // Create topological order of resources + CResourceDependencySorter sorter(m_pModel); + auto sortedResources = sorter.sort(); + + for(auto &resId : sortedResources) + { + if(resId->getPath() != m_pModel->currentPath()) + { + continue; + } + auto pResource = + m_pModel->findResource(resId->getUniqueID()); + + if(!pResource) + { + throw CNMRException( + NMR_ERROR_INVALID_RESOURCE_INDEX, + "Invalid Resource"); + } + writeResource(pResource.get()); + } + } else { if (m_bWriteSliceExtension) { writeSliceStacks(); @@ -790,6 +1080,51 @@ namespace NMR { writeFullEndElement(); } + void CModelWriterNode100_Model::writeResource(CModelResource *pResource) + { + if (!pResource) + { + throw CNMRException(NMR_ERROR_INVALIDPARAM, "Invalid Resource"); + } + CModelWriterNode_Implicit implicitWriter(m_pModel, m_pXMLWriter, m_pProgressMonitor); + CModelWriterNode_VolumeData volumeWriter(m_pModel, m_pXMLWriter, m_pProgressMonitor); + + CModelImage3D * pImage3DResource = dynamic_cast(pResource); + if (pImage3DResource) + { + writeImage3D(*pImage3DResource); + return; + } + + CModelFunctionFromImage3D * pFunctionFromImage3DResource = dynamic_cast(pResource); + if (pFunctionFromImage3DResource) + { + writeFunctionFromImage3D(*pFunctionFromImage3DResource); + return; + } + + CModelImplicitFunction * pImplicitFunctionResource = dynamic_cast(pResource); + if (pImplicitFunctionResource) + { + implicitWriter.writeImplicitFunction(*pImplicitFunctionResource); + return; + } + + CModelVolumeData * pVolumeDataResource = dynamic_cast(pResource); + if (pVolumeDataResource) + { + volumeWriter.writeVolumeDataResource(*pVolumeDataResource); + return; + } + + CModelObject * pObject = dynamic_cast(pResource); + if (pObject) + { + writeObject(*pObject); + return; + } + } + void CModelWriterNode100_Model::writeBuild() { writeStartElement(XML_3MF_ELEMENT_BUILD); diff --git a/Source/Model/Writer/v100/NMR_ResourceDependencySorter.cpp b/Source/Model/Writer/v100/NMR_ResourceDependencySorter.cpp new file mode 100644 index 000000000..b7e39678e --- /dev/null +++ b/Source/Model/Writer/v100/NMR_ResourceDependencySorter.cpp @@ -0,0 +1,125 @@ +/*++ + +Copyright (C) 2024 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +NMR_ResourcDependencySorter resolves the dependencies between resources by +sorting them topologically. +--*/ + +#include "Model/Writer/v100/NMR_ResourceDependencySorter.h" + +#include "Common/Graph/DirectedGraph.h" +#include "Common/Graph/GraphAlgorithms.h" +#include "Model/Classes/NMR_Model.h" +#include "Model/Classes/NMR_ModelResource.h" + +namespace NMR +{ + + CResourceDependencySorter::CResourceDependencySorter(CModel* pModel) + : m_pModel(pModel) + { + buildIndexMaps(); + } + + TopologicalSortResult CResourceDependencySorter::sort() + { + // gather list of resources that are standalone + TopologicalSortResult sortedResources; + + for(nfUint32 i = 0; i < m_pModel->getResourceCount(); i++) + { + auto pResource = m_pModel->getResource(i); + if(pResource->getDependencies().empty()) + { + sortedResources.push_back( + pResource->getPackageResourceID()); + } + } + + auto graph = buildGraph(); + if (common::graph::isCyclic(graph)) + { + throw CNMRException(NMR_ERROR_INVALIDPARAM, "Cyclic dependency between resources detected"); + } + auto sortedIndices = common::graph::topologicalSort( + buildGraph()); // only contains resources that have or are a + // dependency + + for (auto index : sortedIndices) + { + + auto modelResourceID = indexToModelResourceID(index); + if (std::find(sortedResources.begin(), sortedResources.end(), modelResourceID) == sortedResources.end()) { + sortedResources.push_back(modelResourceID); + } + } + return sortedResources; + } + + common::graph::DirectedGraph CResourceDependencySorter::buildGraph() + { + common::graph::DirectedGraph graph(m_pModel->getResourceCount()); + + for(nfUint32 i = 0; i < m_pModel->getResourceCount(); i++) + { + auto pResource = m_pModel->getResource(i); + auto dependencies = pResource->getDependencies(); + for(auto dependency : dependencies) + { + auto dependencyIndex = modelResourceIDToIndex(dependency); + graph.addDependency(i, dependencyIndex); + } + } + + return graph; + } + + void CResourceDependencySorter::buildIndexMaps() + { + for(nfUint32 i = 0; i < m_pModel->getResourceCount(); i++) + { + auto pResource = m_pModel->getResource(i); + m_indexToResourceID[i] = + pResource->getPackageResourceID(); + m_resourceIDToIndex[pResource->getPackageResourceID()] = i; + } + } + + PPackageResourceID CResourceDependencySorter::indexToModelResourceID( + size_t index) const + { + return m_indexToResourceID.at(index); + } + + size_t CResourceDependencySorter::modelResourceIDToIndex( + PPackageResourceID resourceID) const + { + return m_resourceIDToIndex.at(resourceID); + } + +} // namespace NMR \ No newline at end of file diff --git a/Tests/CPP_Bindings/CMakeLists.txt b/Tests/CPP_Bindings/CMakeLists.txt index 89aa33ae8..63daeeff4 100644 --- a/Tests/CPP_Bindings/CMakeLists.txt +++ b/Tests/CPP_Bindings/CMakeLists.txt @@ -35,8 +35,11 @@ set(SRCS_UNITTEST ./Source/Writer.cpp ./Source/TextureProperty.cpp ./Source/TextureResources.cpp + ./Source/UnitTest_Utilities.cpp ./Source/v093.cpp + ./Source/Volumetric.cpp ./Source/Wrapper.cpp + ./Source/Writer.cpp ) set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_BINARY_DIR}) diff --git a/Tests/CPP_Bindings/Include/UnitTest_Utilities.h b/Tests/CPP_Bindings/Include/UnitTest_Utilities.h index f85707144..bbd09a01c 100644 --- a/Tests/CPP_Bindings/Include/UnitTest_Utilities.h +++ b/Tests/CPP_Bindings/Include/UnitTest_Utilities.h @@ -74,46 +74,70 @@ class Lib3MFTest : public ::testing::Test { } static Lib3MF::PWrapper wrapper; }; - -inline std::vector ReadFileIntoBuffer(std::string sFileName) +namespace Lib3MF { - // Read the file fully into a memory buffer - std::ifstream file(sFileName, std::ios::binary | std::ios::ate); - std::streamsize size = file.tellg(); - file.seekg(0, std::ios::beg); - // Memory buffer - std::vector buffer(static_cast(size)); - file.read((char*)buffer.data(), size); - return buffer; -} + namespace helper + { + bool directoryExists(std::string& path); -inline void WriteBufferToFile(std::vector const & buffer, std::string sFileName) -{ - std::ofstream file(sFileName, std::ios::binary); - for (Lib3MF_uint8 cByte: buffer) { - file.put(cByte); - } - file.close(); -} + void comparePorts( + Lib3MF::PImplicitPortIterator const& portIterator1, + Lib3MF::PImplicitPortIterator const& portIterator2, + bool ignoreReference = false); -inline sLib3MFTransform getIdentityTransform() -{ - sLib3MFTransform t; - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 3; j++) - t.m_Fields[i][j] = 0 + 1.0f * (i==j); - } - return t; -} + void compareImplicitFunctions( + PImplicitFunction const& function1, + PImplicitFunction const& function2); -inline void CompareColors(Lib3MF::sColor c1, Lib3MF::sColor c2) -{ - EXPECT_EQ(c1.m_Alpha, c2.m_Alpha); - EXPECT_EQ(c1.m_Red, c2.m_Red); - EXPECT_EQ(c1.m_Green, c2.m_Green); - EXPECT_EQ(c1.m_Blue, c2.m_Blue); -} + void compareFunctionsFromImage3D(Lib3MF::PModel model1, + PFunctionFromImage3D const& function1, + Lib3MF::PModel model2, + PFunctionFromImage3D const& function2); + + void compareFunctions(Lib3MF::PModel model1, + PFunction const& function1, + Lib3MF::PModel model2, + PFunction const& function2); + + void CompareColors(Lib3MF::sColor c1, Lib3MF::sColor c2); + + void CompareTransforms(Lib3MF::sTransform t1, + Lib3MF::sTransform t2); + + void CompareFunctionReferences(Lib3MF::PModel modelA, + Lib3MF::PFunctionReference A, + Lib3MF::PModel modelB, + Lib3MF::PFunctionReference B); + + void CompareImage3Ds(Lib3MF::PModel modelA, Lib3MF::PImage3D i1, + Lib3MF::PModel modelB, + Lib3MF::PImage3D i2); + void CompareImageStacks(Lib3MF::PImageStack i1, + Lib3MF::PImageStack i2); + + void CompareVolumeData(Lib3MF::PModel modelA, + Lib3MF::PVolumeData A, + Lib3MF::PModel modelB, + Lib3MF::PVolumeData B); + + + /** + * @brief Calcutes the transform from the mesh coordinates to the normalized UVW space + * @param mesh Mesh to calculate the transform for + * @return Transform from mesh coordinates to UVW space + */ + Lib3MF::sTransform ComputeTransformFromMeshCoordinatesToUVW(Lib3MF::PMeshObject mesh); + + Lib3MF::PLevelSet getFirstLevelSet(Lib3MF::PModel model); + + } // namespace helper +} // namespace Lib3MF + +std::vector ReadFileIntoBuffer(std::string sFileName); +void WriteBufferToFile(std::vector const & buffer, std::string sFileName); + +sLib3MFTransform getIdentityTransform(); template struct PositionedVector @@ -125,7 +149,7 @@ struct PositionedVector static void writeCallback(Lib3MF_uint64 nByteData, Lib3MF_uint64 nNumBytes, Lib3MF_pvoid pUserData) { PositionedVector* buffer = reinterpret_cast*> ((void*)(pUserData)); T* pData = (T*)(nByteData); - for (int i = 0; i < nNumBytes; i++) { + for (Lib3MF_uint64 i = 0; i < nNumBytes; i++) { if (buffer->pos == buffer->vec.size()) { buffer->vec.push_back(*pData); } @@ -143,7 +167,7 @@ struct PositionedVector static void readCallback(Lib3MF_uint64 nByteData, Lib3MF_uint64 nNumBytes, Lib3MF_pvoid pUserData) { PositionedVector* buffer = reinterpret_cast*> ((void*)(pUserData)); T* pData = (T*)(nByteData); - for (int i = 0; i < nNumBytes; i++) { + for (Lib3MF_uint64 i = 0u; i < nNumBytes; i++) { if (buffer->pos < buffer->vec.size()) { *pData = buffer->vec[(size_t)buffer->pos]; } @@ -162,38 +186,10 @@ struct PositionedVector }; -inline sLib3MFPosition fnCreateVertex(float x, float y, float z) -{ - sLib3MFPosition result; - result.m_Coordinates[0] = x; - result.m_Coordinates[1] = y; - result.m_Coordinates[2] = z; - return result; -} - -inline sLib3MFTriangle fnCreateTriangle(int v0, int v1, int v2) -{ - sLib3MFTriangle result; - result.m_Indices[0] = v0; - result.m_Indices[1] = v1; - result.m_Indices[2] = v2; - return result; -} - - +sLib3MFPosition fnCreateVertex(float x, float y, float z); +sLib3MFTriangle fnCreateTriangle(int v0, int v1, int v2); void fnCreateBox(std::vector &vctVertices, std::vector &vctTriangles); - -inline void CheckReaderWarnings(Lib3MF::PReader reader, Lib3MF_uint32 nWarnings) -{ - EXPECT_EQ(reader->GetWarningCount(), nWarnings); - for (Lib3MF_uint32 iWarning = 0; iWarning < reader->GetWarningCount(); iWarning++) - { - Lib3MF_uint32 nErrorCode; - std::string sWarning = reader->GetWarning(iWarning, nErrorCode); - EXPECT_TRUE(true) << iWarning << ": " << nErrorCode << ", " << sWarning; - } -} - +void CheckReaderWarnings(Lib3MF::PReader reader, Lib3MF_uint32 nWarnings); #endif //__NMR_UNITTEST_UTILITIES diff --git a/Tests/CPP_Bindings/Source/BeamLattice.cpp b/Tests/CPP_Bindings/Source/BeamLattice.cpp index 2d9e8ede8..7ca63dabd 100644 --- a/Tests/CPP_Bindings/Source/BeamLattice.cpp +++ b/Tests/CPP_Bindings/Source/BeamLattice.cpp @@ -152,7 +152,7 @@ namespace Lib3MF TEST_F(BeamLattice, BallMode) { - beamLattice->SetBallOptions(eBeamLatticeBallMode::None, 1.2); + beamLattice->SetBallOptions(eBeamLatticeBallMode::BeamLatticeBallModeNone, 1.2); sBeam beam; beam.m_Radii[0] = 1.0; @@ -272,7 +272,7 @@ namespace Lib3MF beamLattice->AddBeam(beam); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } @@ -291,7 +291,7 @@ namespace Lib3MF beamLattice->SetBeam(0, beam); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } @@ -299,7 +299,7 @@ namespace Lib3MF try { beamLattice->SetBallOptions(eBeamLatticeBallMode::All, 0.0); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } @@ -316,7 +316,7 @@ namespace Lib3MF beamLattice->SetBall(0, ball); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } @@ -326,7 +326,7 @@ namespace Lib3MF beamLattice->AddBall(ball); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } } @@ -420,7 +420,7 @@ namespace Lib3MF beamLattice->SetBeams(beams); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } @@ -463,7 +463,7 @@ namespace Lib3MF beamLattice->SetBalls(balls); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } } @@ -501,14 +501,14 @@ namespace Lib3MF mesh->SetType(eObjectType::Support); ASSERT_FALSE(true) << "Could set eObjectTypeSupport"; } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } try { mesh->SetType(eObjectType::Other); ASSERT_FALSE(true) << "Could set eObjectTypeOther"; } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } } @@ -530,7 +530,7 @@ namespace Lib3MF beamLattice->AddBeam(beam); ASSERT_FALSE(true) << "Could add beam on eObjectTypeSupport"; } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } } diff --git a/Tests/CPP_Bindings/Source/BeamSets.cpp b/Tests/CPP_Bindings/Source/BeamSets.cpp index dee81a577..05bd4c789 100644 --- a/Tests/CPP_Bindings/Source/BeamSets.cpp +++ b/Tests/CPP_Bindings/Source/BeamSets.cpp @@ -121,7 +121,7 @@ namespace Lib3MF beamSet->SetIdentifier(ident1); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } } @@ -159,7 +159,7 @@ namespace Lib3MF beamSet->SetReferences(references); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } @@ -191,7 +191,7 @@ namespace Lib3MF beamSet->SetBallReferences(ballReferences); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } diff --git a/Tests/CPP_Bindings/Source/BuildItems.cpp b/Tests/CPP_Bindings/Source/BuildItems.cpp index 1b3b9f290..81b8c7ce1 100644 --- a/Tests/CPP_Bindings/Source/BuildItems.cpp +++ b/Tests/CPP_Bindings/Source/BuildItems.cpp @@ -97,7 +97,7 @@ namespace Lib3MF buildItem2->SetUUID(uuidString); ASSERT_TRUE(false) << "Duplicate UUIDs must fail"; } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } } @@ -118,9 +118,7 @@ namespace Lib3MF ASSERT_TRUE(buildItem->HasObjectTransform()); auto newTransformation = buildItem->GetObjectTransform(); - for (int i = 0; i < 4; i++) - for (int j = 0; j < 3; j++) - ASSERT_EQ(transformation.m_Fields[i][j], newTransformation.m_Fields[i][j]); + Lib3MF::helper::CompareTransforms(transformation, newTransformation); } TEST_F(BuildItems, TestItem) diff --git a/Tests/CPP_Bindings/Source/MetaData.cpp b/Tests/CPP_Bindings/Source/MetaData.cpp index 1e132b9e2..b99335ffa 100644 --- a/Tests/CPP_Bindings/Source/MetaData.cpp +++ b/Tests/CPP_Bindings/Source/MetaData.cpp @@ -59,7 +59,7 @@ namespace Lib3MF metaDataGroup->AddMetaData("", "NoStandardName", "TheTitle", "xs:string", true); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } } @@ -117,7 +117,7 @@ namespace Lib3MF metaDataGroup->AddMetaData("", "Title", "TheTitle", "xs:string", true); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } } @@ -129,7 +129,7 @@ namespace Lib3MF md->SetName("INVALIDNAME"); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } } @@ -141,7 +141,7 @@ namespace Lib3MF md->SetNameSpace(""); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } } @@ -152,7 +152,7 @@ namespace Lib3MF auto md = metaDataGroup->AddMetaData("ANameSpace", "", "TheTitle", "xs:string", true); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } @@ -160,7 +160,7 @@ namespace Lib3MF auto md = metaDataGroup->AddMetaData("ANameSpace", "SomeName", "TheTitle", "", true); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } @@ -169,7 +169,7 @@ namespace Lib3MF md->SetName(""); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } @@ -177,7 +177,7 @@ namespace Lib3MF md->SetType(""); ASSERT_FALSE(true); } - catch (ELib3MFException) { + catch (ELib3MFException&) { ASSERT_TRUE(true); } } diff --git a/Tests/CPP_Bindings/Source/Model.cpp b/Tests/CPP_Bindings/Source/Model.cpp index 75768635a..67af619a9 100644 --- a/Tests/CPP_Bindings/Source/Model.cpp +++ b/Tests/CPP_Bindings/Source/Model.cpp @@ -175,4 +175,92 @@ namespace Lib3MF ASSERT_EQ(oldID, newId); } + TEST_F(Model, RemoveResource_MaterialGroup) + { + auto baseMaterial = m_pModel->AddBaseMaterialGroup(); + Lib3MF_uint32 id = baseMaterial->GetResourceID(); + m_pModel->RemoveResource(baseMaterial.get()); + + /// Now the resource should be gone + EXPECT_EQ(m_pModel->GetBaseMaterialGroups()->Count(), 0); + EXPECT_THROW(m_pModel->GetBaseMaterialGroupByID(id), Lib3MF::ELib3MFException); + } + + TEST_F(Model, RemoveResource_MeshObject) + { + auto meshObject = m_pModel->AddMeshObject(); + Lib3MF_uint32 id = meshObject->GetResourceID(); + m_pModel->RemoveResource(meshObject.get()); + + /// Now the resource should be gone + EXPECT_EQ(m_pModel->GetMeshObjects()->Count(), 0); + EXPECT_THROW(m_pModel->GetMeshObjectByID(id), Lib3MF::ELib3MFException); + } + + TEST_F(Model, RemoveResource_ComponentsObject) + { + auto componentsObject = m_pModel->AddComponentsObject(); + Lib3MF_uint32 id = componentsObject->GetResourceID(); + m_pModel->RemoveResource(componentsObject.get()); + + /// Now the resource should be gone + EXPECT_EQ(m_pModel->GetComponentsObjects()->Count(), 0); + EXPECT_THROW(m_pModel->GetComponentsObjectByID(id), Lib3MF::ELib3MFException); + } + + TEST_F(Model, RemoveResource_ColorGroup) + { + auto colorGroup = m_pModel->AddColorGroup(); + Lib3MF_uint32 id = colorGroup->GetResourceID(); + m_pModel->RemoveResource(colorGroup.get()); + + /// Now the resource should be gone + EXPECT_EQ(m_pModel->GetColorGroups()->Count(), 0); + EXPECT_THROW(m_pModel->GetColorGroupByID(id), Lib3MF::ELib3MFException); + } + + TEST_F(Model, RemoveResource_MultiPropertyGroup) + { + auto multiPropertyGroup = m_pModel->AddMultiPropertyGroup(); + Lib3MF_uint32 id = multiPropertyGroup->GetResourceID(); + m_pModel->RemoveResource(multiPropertyGroup.get()); + + /// Now the resource should be gone + EXPECT_EQ(m_pModel->GetMultiPropertyGroups()->Count(), 0); + EXPECT_THROW(m_pModel->GetMultiPropertyGroupByID(id), Lib3MF::ELib3MFException); + + } + + TEST_F(Model, RemoveResource_SliceStack) + { + auto sliceStack = m_pModel->AddSliceStack(0.); + Lib3MF_uint32 id = sliceStack->GetResourceID(); + m_pModel->RemoveResource(sliceStack.get()); + + /// Now the resource should be gone + EXPECT_EQ(m_pModel->GetSliceStacks()->Count(), 0); + EXPECT_THROW(m_pModel->GetSliceStackByID(id), Lib3MF::ELib3MFException); + } + + TEST_F(Model, RemoveResource_LevelSet) + { + auto levelSet = m_pModel->AddLevelSet(); + Lib3MF_uint32 id = levelSet->GetResourceID(); + m_pModel->RemoveResource(levelSet.get()); + + /// Now the resource should be gone + EXPECT_EQ(m_pModel->GetLevelSets()->Count(), 0); + EXPECT_THROW(m_pModel->GetLevelSetByID(id), Lib3MF::ELib3MFException); + } + + TEST_F(Model, RemoveResource_Function) + { + auto function = m_pModel->AddImplicitFunction(); + Lib3MF_uint32 id = function->GetResourceID(); + m_pModel->RemoveResource(function.get()); + + /// Now the resource should be gone + EXPECT_EQ(m_pModel->GetFunctions()->Count(), 0); + EXPECT_THROW(m_pModel->GetResourceByID(id), Lib3MF::ELib3MFException); + } } diff --git a/Tests/CPP_Bindings/Source/Properties.cpp b/Tests/CPP_Bindings/Source/Properties.cpp index 8ff16e45d..8802ddd56 100644 --- a/Tests/CPP_Bindings/Source/Properties.cpp +++ b/Tests/CPP_Bindings/Source/Properties.cpp @@ -115,6 +115,7 @@ namespace Lib3MF TEST_F(Properties, ObjectLevelPropertiesWriteRead) { + using namespace Lib3MF::helper; auto baseMaterialGroup = model->AddBaseMaterialGroup(); auto someMaterial = baseMaterialGroup->AddMaterial("SomeMaterial", wrapper->RGBAToColor(100, 200, 150, 255)); auto anotherMaterial = baseMaterialGroup->AddMaterial("AnotherMaterial", wrapper->RGBAToColor(100, 200, 150, 255)); @@ -163,6 +164,7 @@ namespace Lib3MF // Copy-pasted from the previous test ("ObjectLevelPropertiesWriteRead"), but adds metadata to the mesh TEST_F(Properties, ObjectLevelPropertiesWriteRead_WithMetaData) { + using namespace Lib3MF::helper; auto baseMaterialGroup = model->AddBaseMaterialGroup(); auto someMaterial = baseMaterialGroup->AddMaterial("SomeMaterial", wrapper->RGBAToColor(100, 200, 150, 255)); auto anotherMaterial = baseMaterialGroup->AddMaterial("AnotherMaterial", wrapper->RGBAToColor(100, 200, 150, 255)); @@ -433,6 +435,7 @@ namespace Lib3MF TEST_F(Properties_Color, WriteRead) { + using namespace Lib3MF::helper; auto writer = model->QueryWriter("3mf"); std::vector buffer; writer->WriteToBuffer(buffer); diff --git a/Tests/CPP_Bindings/Source/Reader.cpp b/Tests/CPP_Bindings/Source/Reader.cpp index 867f5927e..f36b23e5a 100644 --- a/Tests/CPP_Bindings/Source/Reader.cpp +++ b/Tests/CPP_Bindings/Source/Reader.cpp @@ -33,6 +33,8 @@ UnitTest_Reader.cpp: Defines Unittests for the Reader classes #include "UnitTest_Utilities.h" #include "lib3mf_implicit.hpp" +#include + namespace Lib3MF { class Reader : public Lib3MFTest { @@ -66,18 +68,9 @@ namespace Lib3MF ASSERT_NO_THROW(model->AddMeshObject()); ASSERT_NO_THROW(model->AddMeshObject()); ASSERT_NO_THROW(model->AddMeshObject()); - std::vector resourceIDs; - std::vector modelResourceIDs; - std::vector expectedModelResourceIDs({2,3,5,6,7}); - std::vector expectedResourceIDs({2,3,4,5,6}); + auto objectIterator = model->GetObjects(); - while (objectIterator->MoveNext()) { - auto object = objectIterator->GetCurrentObject(); - modelResourceIDs.push_back(object->GetModelResourceID()); - resourceIDs.push_back(object->GetResourceID()); - } - ASSERT_EQ(modelResourceIDs, expectedModelResourceIDs); - ASSERT_EQ(resourceIDs, expectedResourceIDs); + EXPECT_EQ(objectIterator->Count(), 5); } TEST_F(Reader, 3MFReadFromFileAndAddComponents) @@ -87,18 +80,9 @@ namespace Lib3MF ASSERT_NO_THROW(model->AddComponentsObject()); ASSERT_NO_THROW(model->AddComponentsObject()); ASSERT_NO_THROW(model->AddComponentsObject()); - std::vector resourceIDs; - std::vector modelResourceIDs; - std::vector expectedModelResourceIDs({2,3,4,5,6,7,8,9}); - std::vector expectedResourceIDs({1,2,3,4,5,6,7,8}); + auto objectIterator = model->GetObjects(); - while (objectIterator->MoveNext()) { - auto object = objectIterator->GetCurrentObject(); - modelResourceIDs.push_back(object->GetModelResourceID()); - resourceIDs.push_back(object->GetResourceID()); - } - ASSERT_EQ(modelResourceIDs, expectedModelResourceIDs); - ASSERT_EQ(resourceIDs, expectedResourceIDs); + EXPECT_EQ(objectIterator->Count(), 8); } TEST_F(Reader, STLReadFromFile) @@ -216,4 +200,4 @@ namespace Lib3MF reader->ReadFromFile(sTestFilesPath + "/Reader/" + "cam_51476_test.3mf"); CheckReaderWarnings(Reader::reader3MF, 0); } -} +} \ No newline at end of file diff --git a/Tests/CPP_Bindings/Source/SliceStack.cpp b/Tests/CPP_Bindings/Source/SliceStack.cpp index b2d265ecc..cc1118949 100644 --- a/Tests/CPP_Bindings/Source/SliceStack.cpp +++ b/Tests/CPP_Bindings/Source/SliceStack.cpp @@ -297,7 +297,7 @@ namespace Lib3MF EXPECT_TRUE(std::fabs(A->GetBottomZ() - B->GetBottomZ()) < 1e-5); EXPECT_TRUE(A->GetOwnPath() == B->GetOwnPath()); ASSERT_EQ(A->GetSliceCount(), B->GetSliceCount()); - for (int i = 0; i < A->GetSliceCount(); i++) { + for (Lib3MF_uint64 i = 0u; i < A->GetSliceCount(); i++) { auto slice = A->GetSlice(i); auto readSlice = B->GetSlice(i); @@ -306,7 +306,7 @@ namespace Lib3MF } ASSERT_EQ(A->GetSliceRefCount(), B->GetSliceRefCount()); - for (int i = 0; i < A->GetSliceRefCount(); i++) { + for (Lib3MF_uint64 i = 0u; i < A->GetSliceRefCount(); i++) { auto sliceRef = A->GetSliceStackReference(i); auto readSliceRef = B->GetSliceStackReference(i); diff --git a/Tests/CPP_Bindings/Source/UnitTest_Utilities.cpp b/Tests/CPP_Bindings/Source/UnitTest_Utilities.cpp index d10906953..0de134d80 100644 --- a/Tests/CPP_Bindings/Source/UnitTest_Utilities.cpp +++ b/Tests/CPP_Bindings/Source/UnitTest_Utilities.cpp @@ -35,7 +35,329 @@ UnitTest_Utilities.cpp: Implementtion of Utilities for UnitTests Lib3MF::PWrapper Lib3MFTest::wrapper; -void fnCreateBox(std::vector &vctVertices, std::vector &vctTriangles) { +namespace Lib3MF +{ + namespace helper + { + bool directoryExists(std::string& path) + { + struct stat info; + if(stat(path.c_str(), &info) != 0) + return false; + else if(info.st_mode & S_IFDIR) + return true; + else + return false; + } + + void comparePorts(Lib3MF::PImplicitPortIterator const& portIterator1, + Lib3MF::PImplicitPortIterator const& portIterator2, + bool ignoreReference) + { + ASSERT_EQ(portIterator1->Count(), portIterator2->Count()); + while(portIterator1->MoveNext()) + { + EXPECT_TRUE(portIterator2->MoveNext()); + + auto port1 = portIterator1->GetCurrent(); + auto port2 = portIterator2->GetCurrent(); + + EXPECT_EQ(port1->GetIdentifier(), port2->GetIdentifier()); + EXPECT_EQ(port1->GetType(), port2->GetType()); + EXPECT_EQ(port1->GetDisplayName(), port2->GetDisplayName()); + if(!ignoreReference) + { + EXPECT_EQ(port1->GetReference(), port2->GetReference()); + } + } + EXPECT_FALSE(portIterator2->MoveNext()); + } + + void compareImplicitFunctions(PImplicitFunction const& function1, + PImplicitFunction const& function2) + { + EXPECT_EQ(function1->GetDisplayName(), function2->GetDisplayName()); + EXPECT_EQ(function1->GetModelResourceID(), + function2->GetModelResourceID()); + + auto nodeIterator1 = function1->GetNodes(); + auto nodeIterator2 = function2->GetNodes(); + ASSERT_EQ(nodeIterator1->Count(), nodeIterator2->Count()); + while(nodeIterator1->MoveNext()) + { + EXPECT_TRUE(nodeIterator2->MoveNext()); + + auto node1 = nodeIterator1->GetCurrent(); + auto node2 = nodeIterator2->GetCurrent(); + + EXPECT_TRUE(node1->AreTypesValid()); + EXPECT_TRUE(node2->AreTypesValid()); + + EXPECT_EQ(node1->GetIdentifier(), node2->GetIdentifier()); + EXPECT_EQ(node1->GetNodeType(), node2->GetNodeType()); + EXPECT_EQ(node1->GetDisplayName(), node2->GetDisplayName()); + + + // if(constantNode1 != nullptr && constantNode2 != nullptr) + if (node1->GetNodeType() == Lib3MF::eImplicitNodeType::Constant) + { + auto constantNode1 = std::dynamic_pointer_cast(node1); + auto constantNode2 = std::dynamic_pointer_cast(node2); + ASSERT_NE(constantNode1, nullptr); + EXPECT_EQ(constantNode1->GetConstant(), constantNode2->GetConstant()); + } + + comparePorts(node1->GetInputs(), node2->GetInputs(), false); + comparePorts(node1->GetOutputs(), node2->GetOutputs(), + true); // ignore reference + } + EXPECT_FALSE(nodeIterator2->MoveNext()); + + auto inputs1 = function1->GetInputs(); + auto inputs2 = function2->GetInputs(); + ASSERT_EQ(inputs1->Count(), inputs2->Count()); + while(inputs1->MoveNext()) + { + EXPECT_TRUE(inputs2->MoveNext()); + EXPECT_EQ(inputs1->GetCurrent()->GetDisplayName(), + inputs2->GetCurrent()->GetDisplayName()); + EXPECT_EQ(inputs1->GetCurrent()->GetIdentifier(), + inputs2->GetCurrent()->GetIdentifier()); + EXPECT_EQ(inputs1->GetCurrent()->GetType(), + inputs2->GetCurrent()->GetType()); + } + EXPECT_FALSE(inputs2->MoveNext()); + + auto outputs1 = function1->GetOutputs(); + auto outputs2 = function2->GetOutputs(); + ASSERT_EQ(outputs1->Count(), outputs2->Count()); + while(outputs1->MoveNext()) + { + EXPECT_TRUE(outputs2->MoveNext()); + EXPECT_EQ(outputs1->GetCurrent()->GetDisplayName(), + outputs2->GetCurrent()->GetDisplayName()); + EXPECT_EQ(outputs1->GetCurrent()->GetIdentifier(), + outputs2->GetCurrent()->GetIdentifier()); + EXPECT_EQ(outputs1->GetCurrent()->GetType(), + outputs2->GetCurrent()->GetType()); + } + EXPECT_FALSE(outputs2->MoveNext()); + } + + void compareFunctionsFromImage3D(Lib3MF::PModel model1, + PFunctionFromImage3D const& function1, + Lib3MF::PModel model2, + PFunctionFromImage3D const& function2) + { + EXPECT_EQ(function1->GetDisplayName(), function2->GetDisplayName()); + EXPECT_EQ(function1->GetModelResourceID(), + function2->GetModelResourceID()); + + EXPECT_EQ(function1->GetFilter(), function2->GetFilter()); + + eTextureTileStyle eTileStyleU1, eTileStyleV1, eTileStyleW1; + eTextureTileStyle eTileStyleU2, eTileStyleV2, eTileStyleW2; + function1->GetTileStyles(eTileStyleU1, eTileStyleV1, eTileStyleW1); + function2->GetTileStyles(eTileStyleU2, eTileStyleV2, eTileStyleW2); + EXPECT_EQ(eTileStyleU1, eTileStyleU2); + EXPECT_EQ(eTileStyleV1, eTileStyleV2); + EXPECT_EQ(eTileStyleW1, eTileStyleW2); + + EXPECT_EQ(function1->GetOffset(), function2->GetOffset()); + EXPECT_EQ(function1->GetScale(), function2->GetScale()); + + CompareImage3Ds(model1, function1->GetImage3D(), model2, function2->GetImage3D()); + } + + void compareFunctions(Lib3MF::PModel model1, PFunction const& function1, + Lib3MF::PModel model2, PFunction const& function2) + { + PImplicitFunction implicitFunction1 = + std::dynamic_pointer_cast(function1); + + PImplicitFunction implicitFunction2 = + std::dynamic_pointer_cast(function2); + + if(implicitFunction1 != nullptr && implicitFunction2 != nullptr) + { + compareImplicitFunctions(implicitFunction1, implicitFunction2); + } + else + { + PFunctionFromImage3D functionFromImage3D1 = + std::dynamic_pointer_cast(function1); + + PFunctionFromImage3D functionFromImage3D2 = + std::dynamic_pointer_cast(function2); + + compareFunctionsFromImage3D(model1, functionFromImage3D1, + model2, functionFromImage3D2); + } + } + + void CompareColors(Lib3MF::sColor c1, Lib3MF::sColor c2) + { + EXPECT_EQ(c1.m_Alpha, c2.m_Alpha); + EXPECT_EQ(c1.m_Red, c2.m_Red); + EXPECT_EQ(c1.m_Green, c2.m_Green); + EXPECT_EQ(c1.m_Blue, c2.m_Blue); + } + + void CompareTransforms(Lib3MF::sTransform t1, Lib3MF::sTransform t2) + { + for(int i = 0; i < 4; i++) + for(int j = 0; j < 3; j++) + ASSERT_EQ(t1.m_Fields[i][j], t2.m_Fields[i][j]); + } + + void CompareFunctionReferences(Lib3MF::PModel modelA, + Lib3MF::PFunctionReference A, + Lib3MF::PModel modelB, + Lib3MF::PFunctionReference B) + { + ASSERT_EQ(A == nullptr, B == nullptr); + if(A != nullptr && B != nullptr) + { + Lib3MF::PResource fieldResourceA = + modelA->GetResourceByID(A->GetFunctionResourceID()); + Lib3MF::PResource fieldResourceB = + modelB->GetResourceByID(B->GetFunctionResourceID()); + + auto functionA = std::dynamic_pointer_cast( + fieldResourceA); + auto functionB = std::dynamic_pointer_cast( + fieldResourceB); + + CompareTransforms(A->GetTransform(), B->GetTransform()); + + ASSERT_EQ(functionA == nullptr, functionB == nullptr); + if(functionA != nullptr && functionB != nullptr) + { + Lib3MF::helper::compareFunctions(modelA, functionA, modelB, functionB); + } + } + } + + void CompareImage3Ds(Lib3MF::PModel modelA, Lib3MF::PImage3D imgA, + Lib3MF::PModel modelB, Lib3MF::PImage3D imbB) + { + ASSERT_EQ(imgA->GetName(), imbB->GetName()); + ASSERT_EQ(imgA->IsImageStack(), imbB->IsImageStack()); + if(imgA->IsImageStack()) + { + Lib3MF::PImageStack stackA = + modelA->GetImageStackByID(imgA->GetUniqueResourceID()); + Lib3MF::PImageStack stackB = + modelB->GetImageStackByID(imbB->GetUniqueResourceID()); + + CompareImageStacks(stackA, stackB); + } + } + + void CompareImageStacks(Lib3MF::PImageStack i1, Lib3MF::PImageStack i2) + { + ASSERT_EQ(i1->GetColumnCount(), i2->GetColumnCount()); + ASSERT_EQ(i1->GetRowCount(), i2->GetRowCount()); + ASSERT_EQ(i1->GetSheetCount(), i2->GetSheetCount()); + for(Lib3MF_uint32 i = 0; i < i1->GetSheetCount(); i++) + { + Lib3MF::PAttachment attachment1 = i1->GetSheet(i); + Lib3MF::PAttachment attachment2 = i2->GetSheet(i); + + ASSERT_EQ(attachment1->GetPath(), attachment2->GetPath()); + ASSERT_EQ(attachment1->GetStreamSize(), + attachment2->GetStreamSize()); + } + } + + void CompareVolumeData(Lib3MF::PModel modelA, Lib3MF::PVolumeData A, + Lib3MF::PModel modelB, Lib3MF::PVolumeData B) + { + ASSERT_EQ(A->GetColor() == nullptr, B->GetColor() == nullptr); + if(A->GetColor()) + { + CompareFunctionReferences(modelA, A->GetColor(), modelB, + B->GetColor()); + } + + ASSERT_EQ(A->GetPropertyCount(), B->GetPropertyCount()); + for(Lib3MF_uint32 i = 0; i < A->GetPropertyCount(); i++) + { + auto propertyA = A->GetProperty(i); + auto propertyB = B->GetProperty(i); + ASSERT_EQ(propertyA->GetName(), propertyB->GetName()); + ASSERT_EQ(propertyA->IsRequired(), propertyB->IsRequired()); + CompareFunctionReferences(modelA, propertyA, modelB, propertyB); + } + // TODO + return; + // ASSERT_EQ(A->GetComposite() == nullptr, B->GetComposite() == + // nullptr); if (A->GetComposite() != nullptr) + //{ + // auto compositeA = A->GetComposite(); + // auto compositeB = B->GetComposite(); + ////CompareBaseMaterialGroups(compositeA->GetBaseMaterialGroup(), + ///compositeB->GetBaseMaterialGroup()); + // ASSERT_EQ(compositeA->GetMaterialMappingCount(), + // compositeB->GetMaterialMappingCount()); for (Lib3MF_uint32 i = 0; + // i < compositeA->GetMaterialMappingCount(); i++) + //{ + // auto materialMappingA = compositeA->GetMaterialMapping(i); + // auto materialMappingB = compositeB->GetMaterialMapping(i); + // CompareScalarFieldReferences(modelA, materialMappingA, modelB, + //materialMappingB); + // } + //} + } + + Lib3MF::sTransform ComputeTransformFromMeshCoordinatesToUVW( + Lib3MF::PMeshObject mesh) + { + // 1. Get the bounding box of the mesh + Lib3MF::sBox box = mesh->GetOutbox(); + + + EXPECT_GT(box.m_MaxCoordinate[0] - box.m_MinCoordinate[0], 0.f); + EXPECT_GT(box.m_MaxCoordinate[1] - box.m_MinCoordinate[1], 0.f); + EXPECT_GT(box.m_MaxCoordinate[2] - box.m_MinCoordinate[2], 0.f); + + // 2. Calculate the transform + Lib3MF::sTransform transform = getIdentityTransform(); + + + // scaling + transform.m_Fields[0][0] = 1.0f / (box.m_MaxCoordinate[0] - + box.m_MinCoordinate[0]); + transform.m_Fields[1][1] = 1.0f / (box.m_MaxCoordinate[1] - + box.m_MinCoordinate[1]); + transform.m_Fields[2][2] = 1.0f / (box.m_MaxCoordinate[2] - + box.m_MinCoordinate[2]); + + // translation + transform.m_Fields[3][0] = -box.m_MinCoordinate[0] * transform.m_Fields[0][0]; + transform.m_Fields[3][1] = -box.m_MinCoordinate[1] * transform.m_Fields[1][1]; + transform.m_Fields[3][2] = -box.m_MinCoordinate[2] * transform.m_Fields[2][2]; + + return transform; + } + + Lib3MF::PLevelSet getFirstLevelSet(Lib3MF::PModel model) + { + auto iterator = model->GetLevelSets(); + if(iterator->MoveNext()) + { + return iterator->GetCurrentLevelSet(); + } + return {}; + } + + + } // namespace helper +} // namespace Lib3MF + +void fnCreateBox(std::vector& vctVertices, + std::vector& vctTriangles) + { float fSizeX = 100.0f; float fSizeY = 100.0f; float fSizeZ = 100.0f; @@ -69,3 +391,64 @@ void fnCreateBox(std::vector &vctVertices, std::vector ReadFileIntoBuffer(std::string sFileName) +{ + // Read the file fully into a memory buffer + std::ifstream file(sFileName, std::ios::binary | std::ios::ate); + std::streamsize size = file.tellg(); + file.seekg(0, std::ios::beg); + // Memory buffer + std::vector buffer(static_cast(size)); + file.read((char*)buffer.data(), size); + return buffer; +} + +void WriteBufferToFile(std::vector const& buffer, std::string sFileName) +{ + std::ofstream file(sFileName, std::ios::binary); + for (Lib3MF_uint8 cByte : buffer) { + file.put(cByte); + } + file.close(); +} + +sLib3MFTransform getIdentityTransform() +{ + sLib3MFTransform t; + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 3; j++) + t.m_Fields[i][j] = 0 + 1.0f * (i == j); + } + return t; +} + + + +sLib3MFPosition fnCreateVertex(float x, float y, float z) +{ + sLib3MFPosition result; + result.m_Coordinates[0] = x; + result.m_Coordinates[1] = y; + result.m_Coordinates[2] = z; + return result; +} + +sLib3MFTriangle fnCreateTriangle(int v0, int v1, int v2) +{ + sLib3MFTriangle result; + result.m_Indices[0] = v0; + result.m_Indices[1] = v1; + result.m_Indices[2] = v2; + return result; +} + +void CheckReaderWarnings(Lib3MF::PReader reader, Lib3MF_uint32 nWarnings) +{ + EXPECT_EQ(reader->GetWarningCount(), nWarnings); + for (Lib3MF_uint32 iWarning = 0; iWarning < reader->GetWarningCount(); iWarning++) + { + Lib3MF_uint32 nErrorCode; + std::string sWarning = reader->GetWarning(iWarning, nErrorCode); + EXPECT_TRUE(true) << iWarning << ": " << nErrorCode << ", " << sWarning; + } +} diff --git a/Tests/CPP_Bindings/Source/Volumetric.cpp b/Tests/CPP_Bindings/Source/Volumetric.cpp new file mode 100644 index 000000000..9c5291ced --- /dev/null +++ b/Tests/CPP_Bindings/Source/Volumetric.cpp @@ -0,0 +1,1897 @@ +/*++ + +Copyright (C) 2019 3MF Consortium + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Abstract: + +Vulometric.cpp: Defines Unittests for the Volumetric extension + +--*/ + +#include "UnitTest_Utilities.h" +#include "lib3mf_implicit.hpp" + +namespace Lib3MF +{ + namespace helper + { + PImplicitFunction createGyroidFunction(CModel& model) + { + PImplicitFunction gyroidFunction = model.AddImplicitFunction(); + + gyroidFunction->SetDisplayName("gyroid"); + + auto functionArgument = gyroidFunction->AddInput( + "pos", "position", Lib3MF::eImplicitPortType::Vector); + + auto decomposePos = gyroidFunction->AddDecomposeVectorNode( + "decomposePos", "decompose pos", "group_a"); + + auto inputPos = gyroidFunction->FindInput("pos"); + auto decomposePosInput = decomposePos->GetInputA(); + gyroidFunction->AddLink(inputPos, decomposePosInput); + + auto composeYZX = gyroidFunction->AddComposeVectorNode( + "composeYZX", "compose yzx", "group_a"); + + auto composeYZXInputX = composeYZX->GetInputX(); + auto decomposePosOutputZ = decomposePos->GetOutputZ(); + gyroidFunction->AddLink(decomposePosOutputZ, composeYZXInputX); + + auto composeYZXInputY = composeYZX->GetInputY(); + auto decomposePosOutputY = decomposePos->GetOutputY(); + gyroidFunction->AddLink(decomposePosOutputY, composeYZXInputY); + + auto composeYZXInputZ = composeYZX->GetInputZ(); + auto decomposePosOutputX = decomposePos->GetOutputX(); + gyroidFunction->AddLink(decomposePosOutputX, composeYZXInputZ); + + // Add the nodes and links for the gyroid + // (dot(sin(pos), cos(composeYZX)) + auto sinNode = gyroidFunction->AddSinNode( + "sin", Lib3MF::eImplicitNodeConfiguration::VectorToVector, + "sinus", "group_a"); + + auto posArg = gyroidFunction->FindInput("pos"); + auto sinInputA = sinNode->GetInputA(); + gyroidFunction->AddLink(posArg, sinInputA); + + auto cosNode = gyroidFunction->AddCosNode( + "cos", Lib3MF::eImplicitNodeConfiguration::VectorToVector, + "cosinus", "group_a"); + + auto cosInputA = cosNode->GetInputA(); + auto composeYZXOutput = composeYZX->GetOutputResult(); + gyroidFunction->AddLink(composeYZXOutput, cosInputA); + + auto dotNode = + gyroidFunction->AddDotNode("dot", "dot product", "group_a"); + + auto sinOutput = sinNode->GetOutputResult(); + auto dotInputA = dotNode->GetInputA(); + gyroidFunction->AddLink(sinOutput, dotInputA); + + auto cosOutput = cosNode->GetOutputResult(); + auto dotInputB = dotNode->GetInputB(); + gyroidFunction->AddLink(cosOutput, dotInputB); + + auto output = gyroidFunction->AddOutput( + "shape", "signed distance to the surface", + Lib3MF::eImplicitPortType::Scalar); + + auto dotOutput = dotNode->GetOutputResult(); + gyroidFunction->AddLink(dotOutput, output); + + return gyroidFunction; + } + + PImplicitNode findNodeByName(PImplicitFunction const& function, + std::string const& name) + { + auto nodes = function->GetNodes(); + while(nodes->MoveNext()) + { + if(nodes->GetCurrent()->GetIdentifier() == name) + { + return nodes->GetCurrent(); + } + } + return PImplicitNode(); + } + + // inputnames have the format "node.input" + std::string extractNodeName(std::string const& inputName) + { + auto pos = inputName.find("."); + if(pos == std::string::npos) + { + return inputName; + } + return inputName.substr(0, pos); + } + + bool isTopologiallySorted(PImplicitFunction const& function) + { + std::vector nodeNames; + + { + auto nodes = function->GetNodes(); + while(nodes->MoveNext()) + { + nodeNames.push_back(nodes->GetCurrent()->GetIdentifier()); + } + } + + auto nodes2 = function->GetNodes(); + while(nodes2->MoveNext()) + { + auto node = nodes2->GetCurrent(); + auto inputs = node->GetInputs(); + while(inputs->MoveNext()) + { + auto input = inputs->GetCurrent(); + auto inputName = input->GetReference(); + auto dependencyNodeName = extractNodeName(inputName); + if(dependencyNodeName == "inputs") + { + continue; + } + auto iter = std::find(nodeNames.begin(), nodeNames.end(), + dependencyNodeName); + if(iter == nodeNames.end()) + { + return false; + } + } + } + return true; + } + + } // namespace helper + + class Volumetric : public ::testing::Test + { + protected: + virtual void SetUp() + { + if(!helper::directoryExists(OutFolder)) + { + ASSERT_TRUE(CreateDir(OutFolder.c_str())) + << L"Could not create folder."; + } + model = wrapper->CreateModel(); + loadPyramid(); + writer3MF = model->QueryWriter("3mf"); + writerSTL = model->QueryWriter("stl"); + } + virtual void TearDown() + { + model.reset(); + writer3MF.reset(); + writerSTL.reset(); + } + + void loadPyramid() + { + model = wrapper->CreateModel(); + auto reader = model->QueryReader("3mf"); + reader->ReadFromFile(InFolder + "Pyramid.3mf"); + } + + PModel model; + PWriter writer3MF; + PWriter writerSTL; + + static std::string InFolder; + static std::string OutFolder; + + static void SetUpTestCase() { wrapper = CWrapper::loadLibrary(); } + static PWrapper wrapper; + + PImageStack SetupSheetsFromFile(); + PMeshObject GetMesh(); + }; + PWrapper Volumetric::wrapper; + std::string Volumetric::InFolder(sTestFilesPath + "/Volumetric/"); + std::string Volumetric::OutFolder(sOutFilesPath + "/Volumetric/"); + + PImageStack Volumetric::SetupSheetsFromFile() + { + PImageStack pImageStack = model->AddImageStack(821, 819, 11); + for(int i = 0; i < 11; i++) + { + std::string sNumber = "_"; + int k = i + 1; + if(k < 10) + { + sNumber = sNumber + "0"; + } + sNumber = sNumber + std::to_string(k); + + pImageStack->CreateSheetFromFile( + i, "/volume/layer" + sNumber + ".png", + InFolder + "img" + sNumber + ".png"); + } + return pImageStack; + } + + PMeshObject Volumetric::GetMesh() + { + auto meshes = model->GetMeshObjects(); + meshes->MoveNext(); + return meshes->GetCurrentMeshObject(); + } + + TEST_F(Volumetric, AddFunction_NumberOfFunctionsIncreases) + { + auto resourceIteratorBefore = model->GetResources(); + EXPECT_EQ(resourceIteratorBefore->Count(), 2); + auto functionIteratorBefore = model->GetFunctions(); + EXPECT_EQ(functionIteratorBefore->Count(), 0); + PImplicitFunction newFunction = model->AddImplicitFunction(); + std::string const displayName = "test"; + newFunction->SetDisplayName(displayName); + + auto resourceIteratorAfter = model->GetResources(); + EXPECT_EQ(resourceIteratorAfter->Count(), 3); + + auto functionIterator = model->GetFunctions(); + ASSERT_EQ(functionIterator->Count(), 1); + + EXPECT_TRUE(functionIterator->MoveNext()); + EXPECT_EQ(functionIterator->GetCurrentFunction()->GetDisplayName(), + displayName); + EXPECT_FALSE(functionIterator->MoveNext()); + } + + TEST_F(Volumetric, AddFunction_AddedFunctionAreWrittenTo3mfFile) + { + PImplicitFunction newFunction = model->AddImplicitFunction(); + std::string const displayName = "test"; + newFunction->SetDisplayName(displayName); + auto const expectedResourceId = newFunction->GetModelResourceID(); + + writer3MF->WriteToFile(Volumetric::OutFolder + "AddFunction.3mf"); + + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(Volumetric::OutFolder + "AddFunction.3mf"); + + auto functionIterator = ioModel->GetFunctions(); + ASSERT_EQ(functionIterator->Count(), 1); + + EXPECT_TRUE(functionIterator->MoveNext()); + EXPECT_EQ(functionIterator->GetCurrentFunction()->GetDisplayName(), + displayName); + EXPECT_EQ(functionIterator->GetCurrentFunction()->GetModelResourceID(), + expectedResourceId); + EXPECT_FALSE(functionIterator->MoveNext()); + } + + // Function with an "addition" node + TEST_F(Volumetric, + AddFunction_AddedFunctionWithAdditionNodeAreWrittenTo3mfFile) + { + PImplicitFunction newFunction = model->AddImplicitFunction(); + std::string const displayName = "test"; + newFunction->SetDisplayName(displayName); + auto const expectedResourceId = newFunction->GetModelResourceID(); + + // Add an addition node + auto node = newFunction->AddAdditionNode( + "addition_1", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + "addition 1", "group_a"); + + // Check if the node is added + { + auto nodeIterator = newFunction->GetNodes(); + ASSERT_EQ(nodeIterator->Count(), 1); + EXPECT_TRUE(nodeIterator->MoveNext()); + EXPECT_EQ(nodeIterator->GetCurrent()->GetIdentifier(), + node->GetIdentifier()); + } + // Write to file + writer3MF->WriteToFile(Volumetric::OutFolder + + "AddFunctionWithAdditionNode.3mf"); + + // Read from file + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(Volumetric::OutFolder + + "AddFunctionWithAdditionNode.3mf"); + + // Check the function + auto functionIterator = ioModel->GetFunctions(); + ASSERT_EQ(functionIterator->Count(), 1); + + // // Check the addtion node + EXPECT_TRUE(functionIterator->MoveNext()); + EXPECT_EQ(functionIterator->GetCurrentFunction()->GetModelResourceID(), + expectedResourceId); + + PImplicitFunction currentImplicitFunction = + std::dynamic_pointer_cast( + functionIterator->GetCurrentFunction()); + ASSERT_NE(currentImplicitFunction, nullptr); + + auto nodeIterator = currentImplicitFunction->GetNodes(); + ASSERT_EQ(nodeIterator->Count(), 1); + EXPECT_TRUE(nodeIterator->MoveNext()); + EXPECT_EQ(nodeIterator->GetCurrent()->GetNodeType(), + Lib3MF::eImplicitNodeType::Addition); + EXPECT_EQ(nodeIterator->GetCurrent()->GetDisplayName(), "addition 1"); + + EXPECT_FALSE(functionIterator->MoveNext()); + } + + // Function with multiple nodes and links between them + TEST_F(Volumetric, AddFunction_MultipleNodesAndLinksAreWrittenTo3mfFile) + { + PImplicitFunction newFunction = model->AddImplicitFunction(); + std::string const displayName = "test"; + newFunction->SetDisplayName(displayName); + auto const expectedResourceId = newFunction->GetModelResourceID(); + + auto functionArgument = newFunction->AddInput( + "pos", "position", Lib3MF::eImplicitPortType::Vector); + + // Add some nodes + + auto addNode = newFunction->AddAdditionNode( + "addition_1", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + "addition 1", "group_a"); + auto subNode = newFunction->AddSubtractionNode( + "substraction_1", + Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + "substraction 1", "group_a"); + auto mulNode = newFunction->AddMultiplicationNode( + "multiplication_1", + Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + "multiplication 1", "group_a"); + + // Add some links + auto outputResult = addNode->GetOutputResult(); + auto inputA = subNode->GetInputA(); + newFunction->AddLink(outputResult, inputA); + + // Alternative way to add links + mulNode->FindInput("A")->SetReference("addition_1.result"); + + auto output = + newFunction->AddOutput("shape", "signed distance to the surface", + Lib3MF::eImplicitPortType::Scalar); + + auto subNodeOutputResult = subNode->GetOutputResult(); + newFunction->AddLink(subNodeOutputResult, output); + + auto theMesh = GetMesh(); + // auto volumeData = theMesh->VolumeData(); + // auto theBoundary = volumeData->CreateNewBoundary(newFunction.get()); + auto theBoundary = model->AddLevelSet(); + theBoundary->SetMesh(theMesh); + theBoundary->SetFunction(newFunction.get()); + + // Write to file + writer3MF->WriteToFile(Volumetric::OutFolder + + "AddFunctionWithMultipleNodesAndLinks.3mf"); + + // Read from file + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(Volumetric::OutFolder + + "AddFunctionWithMultipleNodesAndLinks.3mf"); + + // Check the function + auto functionIterator = ioModel->GetFunctions(); + ASSERT_EQ(functionIterator->Count(), 1); + + // Check the nodes + EXPECT_TRUE(functionIterator->MoveNext()); + EXPECT_EQ(functionIterator->GetCurrentFunction()->GetModelResourceID(), + expectedResourceId); + + // Compare the functions + helper::compareFunctions(model, newFunction, ioModel, + functionIterator->GetCurrentFunction()); + } + + // Function with constant node + TEST_F(Volumetric, ImplicitSphere) + { + PImplicitFunction newFunction = model->AddImplicitFunction(); + newFunction->SetDisplayName("sphere"); + auto const expectedResourceId = newFunction->GetModelResourceID(); + + auto functionArgument = newFunction->AddInput( + "pos", "position", Lib3MF::eImplicitPortType::Vector); + + // Add some nodes + + + auto constNode = newFunction->AddConstantNode( + "radius", "radius of the spehere", "group_a"); + constNode->SetConstant(20.0); + + auto constVecNode = newFunction->AddConstVecNode( + "vector_1", "translation vector", "group_a"); + constVecNode->SetVector({60.23456, 72.34567, 23.45678}); + + auto subNode = newFunction->AddSubtractionNode( + "translate_1", Lib3MF::eImplicitNodeConfiguration::VectorToVector, + "Translation", "group_a"); + + auto posInput = newFunction->FindInput("pos"); + auto subInputA = subNode->GetInputA(); + newFunction->AddLink(posInput, subInputA); + + auto subInputB = subNode->GetInputB(); + auto constVecOutput = constVecNode->GetOutputVector(); + newFunction->AddLink(constVecOutput, subInputB); + + auto distanceToSpehereNode = newFunction->AddLengthNode( + "distance_1", "distance to sphere", "group_a"); + + newFunction->AddLink(subNode->GetOutputResult().get(), + distanceToSpehereNode->GetInputA().get()); + + // Substract radius from distance + auto subNode2 = newFunction->AddSubtractionNode( + "distance_2", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + "distance to sphere", "group_a"); + + auto distanceToSphereOutput = distanceToSpehereNode->GetOutputResult(); + auto subNode2InputA = subNode2->GetInputA(); + newFunction->AddLink(distanceToSphereOutput, subNode2InputA); + + + auto radiusOutput = constNode->GetOutputValue(); + auto subNode2InputB = subNode2->GetInputB(); + newFunction->AddLink(radiusOutput, subNode2InputB); + + auto output = + newFunction->AddOutput("shape", "signed distance to the surface", + Lib3MF::eImplicitPortType::Scalar); + output->SetReference("distance_2.result"); + + auto theMesh = GetMesh(); + auto theBoundary = model->AddLevelSet(); + theBoundary->SetMesh(theMesh); + theBoundary->SetFunction(newFunction.get()); + theBoundary->SetFallBackValue(-1.2345); + + // Write to file + writer3MF->WriteToFile(Volumetric::OutFolder + "ImplicitSphere.3mf"); + + // // Read from file + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(Volumetric::OutFolder + "ImplicitSphere.3mf"); + + // // Check the function + auto functionIterator = ioModel->GetFunctions(); + ASSERT_EQ(functionIterator->Count(), 1); + + // Check the nodes + EXPECT_TRUE(functionIterator->MoveNext()); + EXPECT_EQ(functionIterator->GetCurrentFunction()->GetModelResourceID(), + expectedResourceId); + + // Get the first Mesh of ioModel + auto meshesFromWrittenFile = ioModel->GetMeshObjects(); + meshesFromWrittenFile->MoveNext(); + auto meshFromWrittenFile = + meshesFromWrittenFile->GetCurrentMeshObject(); + + // Check the fallback value + auto boundaryFromWrittenFile = helper::getFirstLevelSet(ioModel); + EXPECT_EQ(boundaryFromWrittenFile->GetFallBackValue(), -1.2345); + + // Compare the functions + helper::compareFunctions(model, newFunction, ioModel, + functionIterator->GetCurrentFunction()); + } + + TEST_F(Volumetric, ImplicitGyroid) + { + PImplicitFunction newFunction = helper::createGyroidFunction(*model); + + auto theMesh = GetMesh(); + auto theBoundary = model->AddLevelSet(); + theBoundary->SetFunction(newFunction.get()); + theBoundary->SetMesh(theMesh); + + // write to file + writer3MF->WriteToFile(Volumetric::OutFolder + "ImplicitGyroid.3mf"); + + // read and compare + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(Volumetric::OutFolder + "ImplicitGyroid.3mf"); + + // Check the function + auto functionIterator = ioModel->GetFunctions(); + ASSERT_EQ(functionIterator->Count(), 1); + + // Check the nodes + EXPECT_TRUE(functionIterator->MoveNext()); + + // Compare the functions + helper::compareFunctions(model, newFunction, ioModel, + functionIterator->GetCurrentFunction()); + } + + /** + * @brief Test case for adding an implicit function that references a mesh. + * + * @details + * This test case creates an implicit function that references a mesh and + writes it to a file. + * It then reads the file and compares the created function with the + original one. + * + + */ + TEST_F(Volumetric, AddImplicitFunction_FunctionReferencingAMesh_SameContent) + { + // Create a function + PImplicitFunction newFunction = model->AddImplicitFunction(); + newFunction->SetDisplayName("shell"); + + auto functionArgument = newFunction->AddInput( + "pos", "position", Lib3MF::eImplicitPortType::Vector); + + auto resourceNode = newFunction->AddResourceIdNode( + "meshResource", "mesh resource", "group_shell"); + + auto mesh = GetMesh(); + + resourceNode->SetResource(mesh.get()); + + // Create a mesh node + auto meshNode = newFunction->AddMeshNode("mesh", "mesh", "group_shell"); + + newFunction->AddLinkByNames("meshResource.value", "mesh.mesh"); + newFunction->AddLinkByNames("inputs.pos", "mesh.pos"); + + auto absNode = newFunction->AddAbsNode( + "abs", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, "abs", + "group_shell"); + + newFunction->AddLinkByNames("mesh.distance", "abs.A"); + + auto constScalarNode = newFunction->AddConstantNode( + "thickness", "thickness", "group_shell"); + constScalarNode->SetConstant(2.); + + auto subtractionNode = newFunction->AddSubtractionNode( + "subtraction", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + "subtraction", "group_shell"); + + newFunction->AddLinkByNames("abs.result", "subtraction.A"); + newFunction->AddLinkByNames("thickness.value", "subtraction.B"); + + auto output = + newFunction->AddOutput("shape", "signed distance to the surface", + Lib3MF::eImplicitPortType::Scalar); + + output->SetReference("subtraction.result"); + + auto theMesh = GetMesh(); + auto theBoundary = model->AddLevelSet(); + theBoundary->SetMesh(theMesh); + theBoundary->SetFunction(std::dynamic_pointer_cast(newFunction)); + + theBoundary->SetMinFeatureSize(0.1); + theBoundary->SetChannelName("shape"); + + // write to file + writer3MF->WriteToFile(Volumetric::OutFolder + "ShellFromMesh.3mf"); + + // read and compare + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(Volumetric::OutFolder + "ShellFromMesh.3mf"); + + // Check the function + auto functionIterator = ioModel->GetFunctions(); + ASSERT_EQ(functionIterator->Count(), 1); + + EXPECT_TRUE(functionIterator->MoveNext()); + + // Compare the functions + helper::compareFunctions(model, newFunction, ioModel, + functionIterator->GetCurrentFunction()); + } + + /** + * @brief Test fixture for the Volumetric class. + * + * This fixture tests the `AddImplicitFunction` method of the `Volumetric` + * class using the Gyroid function and verifies that the resulting content + * is the same as expected. + */ + TEST_F(Volumetric, AddImplicitFunction_GyroidFunction_SameContent) + { + // Create a gyroid function + PImplicitFunction gyroidFunction = helper::createGyroidFunction(*model); + + // Create a new implicit function + PImplicitFunction newFunction = model->AddImplicitFunction(); + newFunction->SetDisplayName("shell"); + + // Add an input to the new function + auto functionArgument = newFunction->AddInput( + "pos", "position", Lib3MF::eImplicitPortType::Vector); + + // Add a resource node to the new function + auto resourceNode = newFunction->AddResourceIdNode( + "meshResource", "mesh resource", "group_shell"); + + // Get the mesh + auto mesh = GetMesh(); + + // Set the resource for the resource node + resourceNode->SetResource(mesh.get()); + + // Create a mesh node + auto meshNode = newFunction->AddMeshNode("mesh", "mesh", "group_shell"); + + auto posInput = newFunction->FindInput("pos"); + auto meshNodeInputPos = meshNode->GetInputPos(); + newFunction->AddLink(posInput, meshNodeInputPos); + + auto resourceNodeOutputValue = resourceNode->GetOutputValue(); + auto meshNodeInputMesh = meshNode->GetInputMesh(); + newFunction->AddLink(resourceNodeOutputValue, meshNodeInputMesh); + + // Add an absolute value node + auto absNode = newFunction->AddAbsNode( + "abs", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, "abs", + "group_shell"); + + auto meshNodeOutputDistance = meshNode->GetOutputDistance(); + auto absNodeInputA = absNode->GetInputA(); + newFunction->AddLink(meshNodeOutputDistance, absNodeInputA); + + // Add a constant scalar node + auto constScalarNode = newFunction->AddConstantNode( + "thickness", "thickness", "group_shell"); + + constScalarNode->SetConstant(2.); + + // Add a subtraction node + auto subtractionNode = newFunction->AddSubtractionNode( + "subtraction", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + "subtraction", "group_shell"); + + auto absNodeOutputResult = absNode->GetOutputResult(); + auto subtractionNodeInputA = subtractionNode->GetInputA(); + newFunction->AddLink(absNodeOutputResult, subtractionNodeInputA); + + auto constScalarNodeOutputValue = constScalarNode->GetOutputValue(); + auto subtractionNodeOutputResult = subtractionNode->GetOutputResult(); + newFunction->AddLink(constScalarNodeOutputValue, + subtractionNodeOutputResult); + + // Add an output to the new function + auto output = + newFunction->AddOutput("shape", "signed distance to the surface", + Lib3MF::eImplicitPortType::Scalar); + + // Add a function call node for the gyroid function + + auto gyroidNode = newFunction->AddFunctionCallNode("gyroid", "gyroid", + "group_gyroid"); + + // Add a resource node for the gyroid function + + auto funcitionIdNode = newFunction->AddResourceIdNode( + "gyroidID", "function resource", "group_gyroid"); + + funcitionIdNode->SetResource(gyroidFunction.get()); + + auto functionInput = gyroidNode->FindInput("functionID"); + ASSERT_TRUE(functionInput); + + newFunction->AddLinkByNames("gyroidID.value", "gyroid.functionID"); + + // Add inputs and outputs for the gyroid function + auto gyroidPosInput = gyroidNode->AddInput("pos", "position"); + gyroidPosInput->SetType(Lib3MF::eImplicitPortType::Vector); + + auto gyroidShapeOutput = + gyroidNode->AddOutput("shape", "signed distance to the surface"); + gyroidShapeOutput->SetType(Lib3MF::eImplicitPortType::Scalar); + + newFunction->AddLink(posInput, gyroidPosInput); + + // Add a max node + auto maxNode = newFunction->AddMaxNode( + "max", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + "max - intersection", "group_shell"); + + auto maxNodeInputA = maxNode->GetInputA(); + newFunction->AddLink(gyroidShapeOutput, maxNodeInputA); + + auto maxNodeInputB = maxNode->GetInputB(); + newFunction->AddLink(subtractionNodeOutputResult, maxNodeInputB); + + // Set the output reference + output->SetReference("max.result"); + + // Add a boundary to the volume data + auto theMesh = GetMesh(); + auto theLevelSet = model->AddLevelSet(); + theLevelSet->SetMesh(theMesh); + theLevelSet->SetFunction(newFunction.get()); + theLevelSet->SetMinFeatureSize(0.1); + theLevelSet->SetChannelName("shape"); + + // Write the model to a file + writer3MF->WriteToFile(Volumetric::OutFolder + + "ShellWithGyroidSubfunction.3mf"); + + // Read the model from the file and compare it to the original model + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(Volumetric::OutFolder + + "ShellWithGyroidSubfunction.3mf"); + + // Check the function + auto functionIterator = ioModel->GetFunctions(); + ASSERT_EQ(functionIterator->Count(), 2); + + EXPECT_TRUE(functionIterator->MoveNext()); + + // Compare the functions + helper::compareFunctions(model, gyroidFunction, ioModel, + functionIterator->GetCurrentFunction()); + EXPECT_TRUE(functionIterator->MoveNext()); + helper::compareFunctions(model, newFunction, ioModel, + functionIterator->GetCurrentFunction()); + } + + /** + * @brief Test case for creating and loading a function from an image3D + * color. + * + * @details This test case creates a model and loads a pyramid. It then + * creates a new image stack and sets up a function from the image3D. An + * implicit function is also created and its inputs and outputs are defined. + * A node is added to call the function from the image3D. The inputs and + * outputs of the called function are added manually. The color is set and a + * transformation is applied. The function is then written to a file. The + * file is read and the function is compared to the original function. + */ + TEST_F(Volumetric, CreateAndLoad_FunctionFromImage3dColor_SameContent) + { + // Create model and load pyramid + model = wrapper->CreateModel(); + auto reader = model->QueryReader("3mf"); + reader->ReadFromFile(InFolder + "Cube.3mf"); + + // Create a new image stack + auto pImage3D = SetupSheetsFromFile(); + + auto funcFromImage3d = model->AddFunctionFromImage3D(pImage3D.get()); + ASSERT_TRUE(funcFromImage3d); + funcFromImage3d->SetDisplayName("function from image3d"); + + funcFromImage3d->SetTileStyles(Lib3MF::eTextureTileStyle::Wrap, + Lib3MF::eTextureTileStyle::Clamp, + Lib3MF::eTextureTileStyle::Mirror); + + // Create a new implicit function + auto implicitFunction = model->AddImplicitFunction(); + ASSERT_TRUE(implicitFunction); + implicitFunction->SetDisplayName("implicit function"); + + // Add pos as input + auto posInput = implicitFunction->AddInput( + "pos", "position", Lib3MF::eImplicitPortType::Vector); + ASSERT_TRUE(posInput); + + // Add color as output + auto colorOutput = implicitFunction->AddOutput( + "color", "color", Lib3MF::eImplicitPortType::Vector); + ASSERT_TRUE(colorOutput); + + // Call a node to call the function from image3d + auto functionCallNode = implicitFunction->AddFunctionCallNode( + "functionCall", "functionCall", "group_functionCall"); + + auto functionIdNode = implicitFunction->AddResourceIdNode( + "functionID", "function resource", "group_functionCall"); + + functionIdNode->SetResource(funcFromImage3d.get()); + + auto functionInput = functionCallNode->GetInputFunctionID(); + ASSERT_TRUE(functionInput); + + EXPECT_EQ(functionInput->GetType(), + Lib3MF::eImplicitPortType::ResourceID); + + auto functionIdNodeOutputValue = functionIdNode->GetOutputValue(); + auto functionCallNodeInputFunctionID = + functionCallNode->GetInputFunctionID(); + implicitFunction->AddLink(functionIdNodeOutputValue, + functionCallNodeInputFunctionID); + // Currently you have to add the inputs and outputs of the called + // function manually. We should automate this. + + functionCallNode->AddInput("pos", "position") + ->SetType(Lib3MF::eImplicitPortType::Vector); + + functionCallNode->AddOutput("color", "signed distance to the surface") + ->SetType(Lib3MF::eImplicitPortType::Vector); + + implicitFunction->AddLinkByNames("inputs.pos", "functionCall.pos"); + implicitFunction->AddLinkByNames("functionCall.color", "outputs.color"); + + auto theMesh = GetMesh(); + auto volumeData = model->AddVolumeData(); + auto theColor = volumeData->CreateNewColor(implicitFunction.get()); + + theMesh->SetVolumeData(volumeData); + + // Set transformation + auto transformation = + helper::ComputeTransformFromMeshCoordinatesToUVW(theMesh); + theColor->SetTransform(transformation); + theColor->SetChannelName("color"); + theColor->SetMinFeatureSize(0.1); + + // Write to file + writer3MF = model->QueryWriter("3mf"); + writer3MF->WriteToFile(Volumetric::OutFolder + + "FunctionFromImage3D_Color.3mf"); + + // Read and compare + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(Volumetric::OutFolder + + "FunctionFromImage3D_Color.3mf"); + + + // Assert + // get the first mesh of ioModel + auto meshesFromWrittenFile = ioModel->GetMeshObjects(); + meshesFromWrittenFile->MoveNext(); + auto meshFromWrittenFile = + meshesFromWrittenFile->GetCurrentMeshObject(); + + // Check if volumeData is a volume data + auto volumeDataFromFile = meshFromWrittenFile->GetVolumeData(); + ASSERT_TRUE(volumeDataFromFile); + + // Check if volumeDataFromFile is a volume data + auto volumeDataFromFileAsVolumeData = + std::dynamic_pointer_cast(volumeDataFromFile); + ASSERT_TRUE(volumeDataFromFileAsVolumeData); + + + // Check the function + auto functionIterator = ioModel->GetFunctions(); + ASSERT_EQ(functionIterator->Count(), 2); + + EXPECT_TRUE(functionIterator->MoveNext()); + auto functionFromFile = functionIterator->GetCurrentFunction(); + ASSERT_TRUE(functionFromFile); + + PFunctionFromImage3D funcFromFileAsImage3D = + std::dynamic_pointer_cast(functionFromFile); + + // Compare the functions + helper::compareFunctions(model, funcFromImage3d, ioModel, + functionFromFile); + } + + /** + * @brief Test case to create and load a function from an image3d and add a + * levelset to it. + * @details This test case creates a new image stack and adds a function + * from the image3d to the model. It then adds a levelset to the volume data + * and writes the model to a file. The test then reads the file, compares + * the function and levelset with the original and asserts that they are the + * same. + */ + TEST_F(Volumetric, CreateAndLoad_FunctionFromImage3dAddBoundary_SameContent) + { + model = wrapper->CreateModel(); + auto reader = model->QueryReader("3mf"); + reader->ReadFromFile(InFolder + "Cube.3mf"); + + // Create a new image stack + auto pImage3D = SetupSheetsFromFile(); + + auto funcFromImage3d = model->AddFunctionFromImage3D(pImage3D.get()); + ASSERT_TRUE(funcFromImage3d); + funcFromImage3d->SetDisplayName("function from image3d"); + + auto const funcImg3dId = funcFromImage3d->GetUniqueResourceID(); + funcFromImage3d->SetTileStyles(Lib3MF::eTextureTileStyle::Wrap, + Lib3MF::eTextureTileStyle::Clamp, + Lib3MF::eTextureTileStyle::Mirror); + + // add volume data + auto theMesh = GetMesh(); + auto volumeData = model->AddVolumeData(); + + + // Add boundary + auto boundary = model->AddLevelSet(); + boundary->SetMesh(theMesh); + boundary->SetFunction(funcFromImage3d.get()); + + boundary->SetTransform( + helper::ComputeTransformFromMeshCoordinatesToUVW(theMesh)); + boundary->SetChannelName("red"); + boundary->SetMeshBBoxOnly(true); + + // Write to file + writer3MF = model->QueryWriter("3mf"); + writer3MF->WriteToFile(Volumetric::OutFolder + "levlelset.3mf"); + + // Read and compare + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(Volumetric::OutFolder + "levlelset.3mf"); + + // Check the function + auto functionIterator = ioModel->GetFunctions(); + ASSERT_EQ(functionIterator->Count(), 1); + + EXPECT_TRUE(functionIterator->MoveNext()); + auto functionFromFile = functionIterator->GetCurrentFunction(); + ASSERT_TRUE(functionFromFile); + + PFunctionFromImage3D funcFromFileAsImage3D = + std::dynamic_pointer_cast(functionFromFile); + + // Compare the functions + helper::compareFunctions(model, funcFromImage3d, ioModel, + functionFromFile); + + // Check the boundary + auto boundaryFromFile = helper::getFirstLevelSet(ioModel); + ASSERT_TRUE(boundaryFromFile); + EXPECT_EQ(boundaryFromFile->GetFunction()->GetModelResourceID(), funcImg3dId); + helper::CompareTransforms(boundary->GetTransform(), + boundaryFromFile->GetTransform()); + EXPECT_EQ(boundary->GetChannelName(), + boundaryFromFile->GetChannelName()); + EXPECT_EQ(boundary->GetMeshBBoxOnly(), + boundaryFromFile->GetMeshBBoxOnly()); + } + + /** + * @brief Test case for creating and loading a function from an image3d and + * adding a property with the same content. + * + * @details This test case creates a new model, reads a 3mf file into it, + * creates a new image stack, and adds a function from the image3d to the + * model. It then adds volume data to the mesh, adds a property from the + * function to the volume data, and writes the model to a file. The test + * then reads the file and compares the function and property to the + * original ones. + * + * @note This test requires the Cube.3mf file to be present in the InFolder + * directory and for the OutFolder directory to exist. + */ + TEST_F(Volumetric, CreateAndLoad_FunctionFromImage3dAddProperty_SameContent) + { + model = wrapper->CreateModel(); + auto reader = model->QueryReader("3mf"); + reader->ReadFromFile(InFolder + "Cube.3mf"); + + // Create a new image stack + auto pImage3D = SetupSheetsFromFile(); + + auto funcFromImage3d = model->AddFunctionFromImage3D(pImage3D.get()); + ASSERT_TRUE(funcFromImage3d); + funcFromImage3d->SetDisplayName("function from image3d"); + + auto const funcImg3dId = funcFromImage3d->GetUniqueResourceID(); + funcFromImage3d->SetTileStyles(Lib3MF::eTextureTileStyle::Wrap, + Lib3MF::eTextureTileStyle::Clamp, + Lib3MF::eTextureTileStyle::Mirror); + + // add volume data + auto theMesh = GetMesh(); + auto volumeData = model->AddVolumeData(); + theMesh->SetVolumeData(volumeData); + + // Add property + auto property = + volumeData->AddPropertyFromFunction("Temp", funcFromImage3d.get()); + property->SetTransform( + helper::ComputeTransformFromMeshCoordinatesToUVW(theMesh)); + std::string const ChannelName = "g"; + property->SetChannelName(ChannelName); + + // Write to file + writer3MF = model->QueryWriter("3mf"); + writer3MF->WriteToFile(Volumetric::OutFolder + "Property.3mf"); + + // Read and compare + PModel ioModel = wrapper->CreateModel(); + PReader ioReader = ioModel->QueryReader("3mf"); + ioReader->ReadFromFile(Volumetric::OutFolder + "Property.3mf"); + + // Check the function + auto functionIterator = ioModel->GetFunctions(); + ASSERT_EQ(functionIterator->Count(), 1); + + EXPECT_TRUE(functionIterator->MoveNext()); + auto functionFromFile = functionIterator->GetCurrentFunction(); + ASSERT_TRUE(functionFromFile); + + PFunctionFromImage3D funcFromFileAsImage3D = + std::dynamic_pointer_cast(functionFromFile); + + // Compare the functions + helper::compareFunctions(model, funcFromImage3d, ioModel, + functionFromFile); + + // Check the property + ASSERT_EQ(volumeData->GetPropertyCount(), 1); + auto propertyFromFile = volumeData->GetProperty(0); + ASSERT_TRUE(propertyFromFile); + EXPECT_EQ(propertyFromFile->GetFunctionResourceID(), funcImg3dId); + helper::CompareTransforms(property->GetTransform(), + propertyFromFile->GetTransform()); + EXPECT_EQ(property->GetChannelName(), ChannelName); + EXPECT_EQ(property->GetName(), propertyFromFile->GetName()); + } + + /** + * @brief Test case to verify that the MergeFromModel function merges a + * function from a source model into an empty target model. + * + * @details This test case creates an empty target model and a source model + * with a gyroid function. It then merges the source model into the target + * model and verifies that the gyroid function is present in the target + * model. + */ + TEST_F(Volumetric, MergeModel_FunctionIntoEmptyModel_ResourceIdsAreTheSame) + { + auto const targetModel = wrapper->CreateModel(); + auto const sourceModel = wrapper->CreateModel(); + + auto const gyroidFunction = helper::createGyroidFunction(*sourceModel); + + EXPECT_EQ(targetModel->GetFunctions()->Count(), 0u); + EXPECT_EQ(sourceModel->GetFunctions()->Count(), 1u); + + targetModel->MergeFromModel(sourceModel.get()); + + auto targetFunctionsIter = targetModel->GetFunctions(); + EXPECT_EQ(targetFunctionsIter->Count(), 1u); + + EXPECT_TRUE(targetFunctionsIter->MoveNext()); + auto const targetFunction = targetFunctionsIter->GetCurrentFunction(); + ASSERT_TRUE(targetFunction); + helper::compareFunctions(sourceModel, gyroidFunction, targetModel, + targetFunction); + } + + TEST_F( + Volumetric, + MergeModel_FunctionIntoModelContainingAFunction_ResourceIdsAreUpdated) + { + auto const targetModel = wrapper->CreateModel(); + auto const sourceModel = wrapper->CreateModel(); + + auto const gyroidFunction = helper::createGyroidFunction(*sourceModel); + + auto const targetGyroidFunction = + helper::createGyroidFunction(*targetModel); + + targetModel->MergeFromModel(sourceModel.get()); + + auto targetFunctionsIter = targetModel->GetFunctions(); + EXPECT_EQ(targetFunctionsIter->Count(), 2u); + + EXPECT_TRUE(targetFunctionsIter->MoveNext()); + auto const targetFunction = targetFunctionsIter->GetCurrentFunction(); + ASSERT_TRUE(targetFunction); + EXPECT_EQ(targetFunction->GetModelResourceID(), 1u); + + EXPECT_TRUE(targetFunctionsIter->MoveNext()); + auto const mergedFunction = targetFunctionsIter->GetCurrentFunction(); + ASSERT_TRUE(mergedFunction); + EXPECT_EQ(mergedFunction->GetModelResourceID(), 2u); + + // Save the target model to a file + writer3MF = targetModel->QueryWriter("3mf"); + writer3MF->WriteToFile(Volumetric::OutFolder + "TwoFunctions.3mf"); + } + + TEST_F(Volumetric, AddLink_InvalidTypes_ThrowsException) + { + auto const function = model->AddImplicitFunction(); + + auto const constVector = function->AddConstVecNode( + "constVector", "constVector", "group_constVector"); + + auto const scalarAdd = function->AddAdditionNode( + "scalarAdd", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, + "scalarAdd", "group_scalarAdd"); + + auto const inputA = scalarAdd->GetInputA(); + auto const vectorOutput = constVector->GetOutputVector(); + EXPECT_THROW(function->AddLink(inputA, vectorOutput), ELib3MFException); + } + + /** + * @brief Test case for sorting nodes topologically. The function creates a + * cyclic graph with three nodes and sets up circular dependencies between + * them. The test expects the function to throw an exception when trying to + * sort the nodes topologically. + * + * Graph structure: + * + * +--------+ + * | | + * v | + * +-------+ | + * | add1 | | + * +-------+ | + * ^ | + * | | + * +-----------+ | + * | constVec1 | | + * +-----------+ | + * | | + * v | + * +-------+ | + * | add2 | | + * +-------+ | + * ^ | + * | | + * +--------+ + * + */ + TEST_F(Volumetric, SortNodesTopologically_CyclicGraph_Throws) + { + auto const function = model->AddImplicitFunction(); + + function->AddInput("pos", "position", + Lib3MF::eImplicitPortType::Vector); + // Add nodes with circular dependencies + auto const constVec1 = + function->AddConstVecNode("constVec1", "constVec1", "group1"); + auto const add1 = function->AddAdditionNode( + "add1", Lib3MF::eImplicitNodeConfiguration::VectorToVector, "add1", + "group1"); + auto const add2 = function->AddAdditionNode( + "add2", Lib3MF::eImplicitNodeConfiguration::VectorToVector, "add2", + "group1"); + + // Set up circular dependencies + auto const vectorOutput = constVec1->GetOutputVector(); + auto const inputAdd1A = add1->GetInputA(); + auto const inputAdd1B = add1->GetInputB(); + + auto const inputAdd2A = add2->GetInputA(); + auto const inputAdd2B = add2->GetInputB(); + + auto const outputAdd1 = add1->GetOutputResult(); + auto const outputAdd2 = add2->GetOutputResult(); + function->AddLink(vectorOutput, inputAdd1A); + function->AddLink(outputAdd2, inputAdd1B); + function->AddLink(outputAdd1, inputAdd1A); + function->AddLink(vectorOutput, inputAdd2A); + function->AddLink(outputAdd1, inputAdd2B); + EXPECT_THROW(function->SortNodesTopologically(), ELib3MFException); + } + + TEST_F( + Volumetric, + Volumetric_SortNodesTopologically_ValidGraph_ResultIsTopologialSorted) + { + auto const function = helper::createGyroidFunction(*model); + + auto const nodes = function->GetNodes(); + auto const nodeCount = nodes->Count(); + ASSERT_EQ(nodeCount, 5u); + + function->SortNodesTopologically(); + + auto const sortedNodes = function->GetNodes(); + + auto const sortedNodeCount = sortedNodes->Count(); + + ASSERT_EQ(sortedNodeCount, nodeCount); + + // Check that the nodes are sorted topologically + EXPECT_TRUE(helper::isTopologiallySorted(function)); + } + + + + TEST_F(Volumetric, + Volumetric_Merge_FunctionsFromSourceModelIntoTargetModel_FunctionCountIncreases) + { + auto const targetModel = wrapper->CreateModel(); + auto const sourceModel = wrapper->CreateModel(); + + auto const gyroidFunction = helper::createGyroidFunction(*sourceModel); + + auto const targetGyroidFunction = + helper::createGyroidFunction(*targetModel); + + targetModel->MergeFromModel(sourceModel.get()); + + auto targetFunctionsIter = targetModel->GetFunctions(); + EXPECT_EQ(targetFunctionsIter->Count(), 2u); + } + + + TEST_F(Volumetric, + Volumetric_Merge_FunctionsFromLoadedModelIntoTargetModel_FunctionCountIncreases) + { + // load the source model + auto const sourceModel = wrapper->CreateModel(); + auto const reader = sourceModel->QueryReader("3mf"); + reader->ReadFromFile(InFolder + "SphereInACage.3mf"); + + auto sourceModelFunctionCount = sourceModel->GetFunctions()->Count(); + + auto const targetModel = wrapper->CreateModel(); + + auto const targetGyroidFunction = + helper::createGyroidFunction(*targetModel); + + targetModel->MergeFromModel(sourceModel.get()); + + auto targetFunctionsIter = targetModel->GetFunctions(); + EXPECT_EQ(targetFunctionsIter->Count(), sourceModelFunctionCount + 1); + } + void verifyFunctionResources(std::shared_ptr model) + { + auto functionIter = model->GetFunctions(); + while (functionIter->MoveNext()) + { + auto function = functionIter->GetCurrentFunction(); + ASSERT_TRUE(function); + auto implicitFunction = std::dynamic_pointer_cast(function); + if (implicitFunction) + { + auto res = model->GetResourceByID(implicitFunction->GetUniqueResourceID()); + ASSERT_TRUE(res); + + auto nodeIterator = implicitFunction->GetNodes(); + while (nodeIterator->MoveNext()) + { + auto node = nodeIterator->GetCurrent(); + ASSERT_TRUE(node); + + + if (node->GetNodeType() == Lib3MF::eImplicitNodeType::ConstResourceID) + { + auto resourceIdNode = std::dynamic_pointer_cast(node); + ASSERT_TRUE(resourceIdNode); + auto resource = resourceIdNode->GetResource(); + ASSERT_TRUE(resource); + } + } + } + } + + } + + TEST_F(Volumetric, + Volumetric_Merge_FunctionsFromLoadedModelIntoLoadedTargetModel_FunctionCountIncreases) + { + // load the source model + auto const sourceModel = wrapper->CreateModel(); + auto reader = sourceModel->QueryReader("3mf"); + reader->SetStrictModeActive(true); + reader->ReadFromFile(InFolder + "RadialRadiator.3mf"); + + auto sourceModelFunctionCount = sourceModel->GetFunctions()->Count(); + + auto const targetModel = wrapper->CreateModel(); + auto targetReader = targetModel->QueryReader("3mf"); + targetReader->SetStrictModeActive(true); + + targetReader->ReadFromFile(InFolder + "template.3mf"); + auto previousTargetFunctionCount = targetModel->GetFunctions()->Count(); + + EXPECT_NO_THROW(targetModel->MergeFromModel(sourceModel.get())); + + auto targetFunctionsIter = targetModel->GetFunctions(); + EXPECT_EQ(targetFunctionsIter->Count(), sourceModelFunctionCount + previousTargetFunctionCount); + + verifyFunctionResources(targetModel); + } + + + TEST_F(Volumetric, + Volumetric_Merge_FunctionsFromLoadedModelIntoLoadedTargetModelWithoutFunctions_VaildResourceReferences) + { + // load the source model + auto const sourceModel = wrapper->CreateModel(); + auto reader = sourceModel->QueryReader("3mf"); + reader->SetStrictModeActive(true); + reader->ReadFromFile(InFolder + "template.3mf"); + + auto sourceModelFunctionCount = sourceModel->GetFunctions()->Count(); + auto const targetModel = wrapper->CreateModel(); + auto targetReader = targetModel->QueryReader("3mf"); + targetReader->SetStrictModeActive(true); + + targetReader->ReadFromFile(InFolder + "Cube.3mf"); + auto previousTargetFunctionCount = targetModel->GetFunctions()->Count(); + + EXPECT_NO_THROW(targetModel->MergeFromModel(sourceModel.get())); + + verifyFunctionResources(targetModel); + } + + TEST_F(Volumetric, Volumetric_AddInputsToFunction_InputsAreAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + auto const input = function->AddInput("pos", "position", Lib3MF::eImplicitPortType::Vector); + auto const input2 = function->AddInput("pos2", "position2", Lib3MF::eImplicitPortType::Vector); + auto const input3 = function->AddInput("pos3", "position3", Lib3MF::eImplicitPortType::Vector); + + auto const inputs = function->GetInputs(); + auto const inputCount = inputs->Count(); + ASSERT_EQ(inputCount, 3u); + + inputs->MoveNext(); + auto const inputPort = inputs->GetCurrent(); + ASSERT_TRUE(inputPort); + EXPECT_EQ(inputPort->GetIdentifier(), "pos"); + EXPECT_EQ(inputPort->GetDisplayName(), "position"); + EXPECT_EQ(inputPort->GetType(), Lib3MF::eImplicitPortType::Vector); + + + inputs->MoveNext(); + auto const inputPort2 = inputs->GetCurrent(); + ASSERT_TRUE(inputPort2); + EXPECT_EQ(inputPort2->GetIdentifier(), "pos2"); + EXPECT_EQ(inputPort2->GetDisplayName(), "position2"); + EXPECT_EQ(inputPort2->GetType(), Lib3MF::eImplicitPortType::Vector); + + inputs->MoveNext(); + auto const inputPort3 = inputs->GetCurrent(); + ASSERT_TRUE(inputPort3); + EXPECT_EQ(inputPort3->GetIdentifier(), "pos3"); + EXPECT_EQ(inputPort3->GetDisplayName(), "position3"); + EXPECT_EQ(inputPort3->GetType(), Lib3MF::eImplicitPortType::Vector); + + } + + TEST_F(Volumetric, Volumetric_RemoveFunctionInputs_InputsAreRemoved) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + auto const input = function->AddInput("pos", "position", Lib3MF::eImplicitPortType::Vector); + auto const input2 = function->AddInput("pos2", "position2", Lib3MF::eImplicitPortType::Vector); + auto const input3 = function->AddInput("pos3", "position3", Lib3MF::eImplicitPortType::Vector); + + auto const inputs = function->GetInputs(); + auto const inputCount = inputs->Count(); + ASSERT_EQ(inputCount, 3u); + + function->RemoveInput(input2); + + auto const inputsAfterRemoval = function->GetInputs(); + auto const inputCountAfterRemoval = inputsAfterRemoval->Count(); + ASSERT_EQ(inputCountAfterRemoval, 2u); + + inputsAfterRemoval->MoveNext(); + auto const inputPort = inputsAfterRemoval->GetCurrent(); + ASSERT_TRUE(inputPort); + EXPECT_EQ(inputPort->GetIdentifier(), "pos"); + EXPECT_EQ(inputPort->GetDisplayName(), "position"); + EXPECT_EQ(inputPort->GetType(), Lib3MF::eImplicitPortType::Vector); + + inputsAfterRemoval->MoveNext(); + auto const inputPort3 = inputsAfterRemoval->GetCurrent(); + ASSERT_TRUE(inputPort3); + EXPECT_EQ(inputPort3->GetIdentifier(), "pos3"); + EXPECT_EQ(inputPort3->GetDisplayName(), "position3"); + EXPECT_EQ(inputPort3->GetType(), Lib3MF::eImplicitPortType::Vector); + } + + TEST_F(Volumetric, Volumetric_AddOutputToFunction_OutputIsAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + auto const output = function->AddOutput("shape", "signed distance to the surface", Lib3MF::eImplicitPortType::Scalar); + + auto const outputs = function->GetOutputs(); + auto const outputCount = outputs->Count(); + ASSERT_EQ(outputCount, 1u); + + outputs->MoveNext(); + auto const outputPort = outputs->GetCurrent(); + ASSERT_TRUE(outputPort); + EXPECT_EQ(outputPort->GetIdentifier(), "shape"); + EXPECT_EQ(outputPort->GetDisplayName(), "signed distance to the surface"); + EXPECT_EQ(outputPort->GetType(), Lib3MF::eImplicitPortType::Scalar); + } + + TEST_F(Volumetric, Volumetric_RemoveFunctionOutput_OutputIsRemoved) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + auto const output = function->AddOutput("shape", "signed distance to the surface", Lib3MF::eImplicitPortType::Scalar); + auto const output2 = function->AddOutput("shape2", "signed distance to the surface2", Lib3MF::eImplicitPortType::Scalar); + auto const output3 = function->AddOutput("shape3", "signed distance to the surface3", Lib3MF::eImplicitPortType::Scalar); + + auto const outputs = function->GetOutputs(); + auto const outputCount = outputs->Count(); + ASSERT_EQ(outputCount, 3u); + + function->RemoveOutput(output2); + + auto const outputsAfterRemoval = function->GetOutputs(); + auto const outputCountAfterRemoval = outputsAfterRemoval->Count(); + ASSERT_EQ(outputCountAfterRemoval, 2u); + + outputsAfterRemoval->MoveNext(); + auto const outputPort = outputsAfterRemoval->GetCurrent(); + ASSERT_TRUE(outputPort); + EXPECT_EQ(outputPort->GetIdentifier(), "shape"); + EXPECT_EQ(outputPort->GetDisplayName(), "signed distance to the surface"); + EXPECT_EQ(outputPort->GetType(), Lib3MF::eImplicitPortType::Scalar); + + outputsAfterRemoval->MoveNext(); + auto const outputPort3 = outputsAfterRemoval->GetCurrent(); + ASSERT_TRUE(outputPort3); + EXPECT_EQ(outputPort3->GetIdentifier(), "shape3"); + EXPECT_EQ(outputPort3->GetDisplayName(), "signed distance to the surface3"); + EXPECT_EQ(outputPort3->GetType(), Lib3MF::eImplicitPortType::Scalar); + } + + TEST_F(Volumetric, Volumetric_AddSinNodeToFunction_NodeIsAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + + // add a scalar x input to the function + + auto const input = function->AddInput("x", "x", Lib3MF::eImplicitPortType::Scalar); + auto const output = function->AddOutput("result", "result", Lib3MF::eImplicitPortType::Scalar); + + auto const sinNode = function->AddSinNode("sin", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, "sinus", "group_a"); + + auto const sinInput = sinNode->GetInputA(); + auto const sinOutput = sinNode->GetOutputResult(); + + function->AddLink(input, sinInput); + + auto const nodes = function->GetNodes(); + auto const nodeCount = nodes->Count(); + ASSERT_EQ(nodeCount, 1u); + + nodes->MoveNext(); + auto const node = nodes->GetCurrent(); + ASSERT_TRUE(node); + EXPECT_EQ(node->GetNodeType(), Lib3MF::eImplicitNodeType::Sinus); + EXPECT_EQ(node->GetIdentifier(), "sin"); + EXPECT_EQ(node->GetDisplayName(), "sinus"); + EXPECT_EQ(node->GetTag(), "group_a"); + } + + TEST_F(Volumetric, Volumetric_AddCosNodeToFunction_NodeIsAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + + // add a scalar x input to the function + + auto const input = function->AddInput("x", "x", Lib3MF::eImplicitPortType::Scalar); + auto const output = function->AddOutput("result", "result", Lib3MF::eImplicitPortType::Scalar); + + auto const cosNode = function->AddCosNode("cos", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, "cosinus", "group_a"); + + auto const cosInput = cosNode->GetInputA(); + auto const cosOutput = cosNode->GetOutputResult(); + + function->AddLink(input, cosInput); + + auto const nodes = function->GetNodes(); + auto const nodeCount = nodes->Count(); + ASSERT_EQ(nodeCount, 1u); + + nodes->MoveNext(); + auto const node = nodes->GetCurrent(); + ASSERT_TRUE(node); + EXPECT_EQ(node->GetNodeType(), Lib3MF::eImplicitNodeType::Cosinus); + EXPECT_EQ(node->GetIdentifier(), "cos"); + EXPECT_EQ(node->GetDisplayName(), "cosinus"); + EXPECT_EQ(node->GetTag(), "group_a"); + } + + TEST_F(Volumetric, Volumetric_AddTanNodeToFunction_NodeIsAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + + // add a scalar x input to the function + + auto const input = function->AddInput("x", "x", Lib3MF::eImplicitPortType::Scalar); + auto const output = function->AddOutput("result", "result", Lib3MF::eImplicitPortType::Scalar); + + auto const tanNode = function->AddTanNode("tan", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, "tangens", "group_a"); + + auto const tanInput = tanNode->GetInputA(); + auto const tanOutput = tanNode->GetOutputResult(); + + function->AddLink(input, tanInput); + + auto const nodes = function->GetNodes(); + auto const nodeCount = nodes->Count(); + ASSERT_EQ(nodeCount, 1u); + + nodes->MoveNext(); + auto const node = nodes->GetCurrent(); + ASSERT_TRUE(node); + EXPECT_EQ(node->GetNodeType(), Lib3MF::eImplicitNodeType::Tan); + EXPECT_EQ(node->GetIdentifier(), "tan"); + EXPECT_EQ(node->GetDisplayName(), "tangens"); + EXPECT_EQ(node->GetTag(), "group_a"); + } + + TEST_F(Volumetric, Volumetric_AddSinhNodeToFunction_NodeIsAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + + // add a scalar x input to the function + + auto const input = function->AddInput("x", "x", Lib3MF::eImplicitPortType::Scalar); + auto const output = function->AddOutput("result", "result", Lib3MF::eImplicitPortType::Scalar); + + auto const sinhNode = function->AddSinhNode("sinh", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, "sinus hyperbolicus", "group_a"); + + auto const sinhInput = sinhNode->GetInputA(); + auto const sinhOutput = sinhNode->GetOutputResult(); + + function->AddLink(input, sinhInput); + + auto const nodes = function->GetNodes(); + auto const nodeCount = nodes->Count(); + ASSERT_EQ(nodeCount, 1u); + + nodes->MoveNext(); + auto const node = nodes->GetCurrent(); + ASSERT_TRUE(node); + EXPECT_EQ(node->GetNodeType(), Lib3MF::eImplicitNodeType::Sinh); + EXPECT_EQ(node->GetIdentifier(), "sinh"); + EXPECT_EQ(node->GetDisplayName(), "sinus hyperbolicus"); + EXPECT_EQ(node->GetTag(), "group_a"); + } + + TEST_F(Volumetric, Volumetric_AddCoshNodeToFunction_NodeIsAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + + // add a scalar x input to the function + + auto const input = function->AddInput("x", "x", Lib3MF::eImplicitPortType::Scalar); + auto const output = function->AddOutput("result", "result", Lib3MF::eImplicitPortType::Scalar); + + auto const coshNode = function->AddCoshNode("cosh", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, "cosinus hyperbolicus", "group_a"); + + auto const coshInput = coshNode->GetInputA(); + auto const coshOutput = coshNode->GetOutputResult(); + + function->AddLink(input, coshInput); + + auto const nodes = function->GetNodes(); + auto const nodeCount = nodes->Count(); + ASSERT_EQ(nodeCount, 1u); + + nodes->MoveNext(); + auto const node = nodes->GetCurrent(); + ASSERT_TRUE(node); + EXPECT_EQ(node->GetNodeType(), Lib3MF::eImplicitNodeType::Cosh); + EXPECT_EQ(node->GetIdentifier(), "cosh"); + EXPECT_EQ(node->GetDisplayName(), "cosinus hyperbolicus"); + EXPECT_EQ(node->GetTag(), "group_a"); + } + + TEST_F(Volumetric, Volumetric_AddTanhNodeToFunction_NodeIsAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + + // add a scalar x input to the function + + auto const input = function->AddInput("x", "x", Lib3MF::eImplicitPortType::Scalar); + auto const output = function->AddOutput("result", "result", Lib3MF::eImplicitPortType::Scalar); + + auto const tanhNode = function->AddTanhNode("tanh", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, "tangens hyperbolicus", "group_a"); + + auto const tanhInput = tanhNode->GetInputA(); + auto const tanhOutput = tanhNode->GetOutputResult(); + + function->AddLink(input, tanhInput); + + auto const nodes = function->GetNodes(); + auto const nodeCount = nodes->Count(); + ASSERT_EQ(nodeCount, 1u); + + nodes->MoveNext(); + auto const node = nodes->GetCurrent(); + ASSERT_TRUE(node); + EXPECT_EQ(node->GetNodeType(), Lib3MF::eImplicitNodeType::Tanh); + EXPECT_EQ(node->GetIdentifier(), "tanh"); + EXPECT_EQ(node->GetDisplayName(), "tangens hyperbolicus"); + EXPECT_EQ(node->GetTag(), "group_a"); + } + + TEST_F(Volumetric, Volumetric_AddExpNodeToFunction_NodeIsAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + + // add a scalar x input to the function + + auto const input = function->AddInput("x", "x", Lib3MF::eImplicitPortType::Scalar); + auto const output = function->AddOutput("result", "result", Lib3MF::eImplicitPortType::Scalar); + + auto const expNode = function->AddExpNode("exp", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, "exponential", "group_a"); + + auto const expInput = expNode->GetInputA(); + auto const expOutput = expNode->GetOutputResult(); + + function->AddLink(input, expInput); + + auto const nodes = function->GetNodes(); + auto const nodeCount = nodes->Count(); + ASSERT_EQ(nodeCount, 1u); + + nodes->MoveNext(); + auto const node = nodes->GetCurrent(); + ASSERT_TRUE(node); + EXPECT_EQ(node->GetNodeType(), Lib3MF::eImplicitNodeType::Exp); + EXPECT_EQ(node->GetIdentifier(), "exp"); + EXPECT_EQ(node->GetDisplayName(), "exponential"); + EXPECT_EQ(node->GetTag(), "group_a"); + } + + TEST_F(Volumetric, Volumetric_AddLogNodeToFunction_NodeIsAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + + // add a scalar x input to the function + + auto const input = function->AddInput("x", "x", Lib3MF::eImplicitPortType::Scalar); + auto const output = function->AddOutput("result", "result", Lib3MF::eImplicitPortType::Scalar); + + auto const logNode = function->AddLogNode("log", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, "logarithm", "group_a"); + + auto const logInput = logNode->GetInputA(); + auto const logOutput = logNode->GetOutputResult(); + + function->AddLink(input, logInput); + + auto const nodes = function->GetNodes(); + auto const nodeCount = nodes->Count(); + ASSERT_EQ(nodeCount, 1u); + + nodes->MoveNext(); + auto const node = nodes->GetCurrent(); + ASSERT_TRUE(node); + EXPECT_EQ(node->GetNodeType(), Lib3MF::eImplicitNodeType::Log); + EXPECT_EQ(node->GetIdentifier(), "log"); + EXPECT_EQ(node->GetDisplayName(), "logarithm"); + EXPECT_EQ(node->GetTag(), "group_a"); + } + + TEST_F(Volumetric, Volumetric_AddAbsNodeToFunction_NodeIsAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + + // add a scalar x input to the function + + auto const input = function->AddInput("x", "x", Lib3MF::eImplicitPortType::Scalar); + auto const output = function->AddOutput("result", "result", Lib3MF::eImplicitPortType::Scalar); + + auto const absNode = function->AddAbsNode("abs", Lib3MF::eImplicitNodeConfiguration::ScalarToScalar, "absolute value", "group_a"); + + auto const absInput = absNode->GetInputA(); + auto const absOutput = absNode->GetOutputResult(); + + function->AddLink(input, absInput); + + auto const nodes = function->GetNodes(); + auto const nodeCount = nodes->Count(); + ASSERT_EQ(nodeCount, 1u); + + nodes->MoveNext(); + auto const node = nodes->GetCurrent(); + ASSERT_TRUE(node); + EXPECT_EQ(node->GetNodeType(), Lib3MF::eImplicitNodeType::Abs); + EXPECT_EQ(node->GetIdentifier(), "abs"); + EXPECT_EQ(node->GetDisplayName(), "absolute value"); + EXPECT_EQ(node->GetTag(), "group_a"); + } + + TEST_F(Volumetric, Volumetric_AddComposeMatrixNode_NodeIsAdded) + { + //create a new model + auto const model = wrapper->CreateModel(); + + auto const function = model->AddImplicitFunction(); + + // add a vector input to the function + + auto const input = function->AddInput("v", "vector", Lib3MF::eImplicitPortType::Vector); + auto const output = function->AddOutput("result", "result", Lib3MF::eImplicitPortType::Matrix); + + auto const composeMatrixNode = function->AddComposeMatrixNode("composeMatrix", "compose matrix", "group_a"); + + auto const m00Node = function->AddConstantNode("m00", "m00", "group_a"); + m00Node->SetConstant(1.0f); + auto const m01Node = function->AddConstantNode("m01", "m01", "group_a"); + m01Node->SetConstant(0.0f); + auto const m02Node = function->AddConstantNode("m02", "m02", "group_a"); + m02Node->SetConstant(0.0f); + auto const m03Node = function->AddConstantNode("m03", "m03", "group_a"); + m03Node->SetConstant(0.0f); + + auto const m10Node = function->AddConstantNode("m10", "m10", "group_a"); + m10Node->SetConstant(0.0f); + auto const m11Node = function->AddConstantNode("m11", "m11", "group_a"); + m11Node->SetConstant(1.0f); + auto const m12Node = function->AddConstantNode("m12", "m12", "group_a"); + m12Node->SetConstant(0.0f); + auto const m13Node = function->AddConstantNode("m13", "m13", "group_a"); + m13Node->SetConstant(0.0f); + + auto const m20Node = function->AddConstantNode("m20", "m20", "group_a"); + m20Node->SetConstant(0.0f); + auto const m21Node = function->AddConstantNode("m21", "m21", "group_a"); + m21Node->SetConstant(0.0f); + auto const m22Node = function->AddConstantNode("m22", "m22", "group_a"); + m22Node->SetConstant(1.0f); + auto const m23Node = function->AddConstantNode("m23", "m23", "group_a"); + m23Node->SetConstant(0.0f); + + auto const m30Node = function->AddConstantNode("m30", "m30", "group_a"); + m30Node->SetConstant(0.0f); + auto const m31Node = function->AddConstantNode("m31", "m31", "group_a"); + m31Node->SetConstant(0.0f); + auto const m32Node = function->AddConstantNode("m32", "m32", "group_a"); + m32Node->SetConstant(0.0f); + auto const m33Node = function->AddConstantNode("m33", "m33", "group_a"); + m33Node->SetConstant(1.0f); + + auto const m00NodeOutput = m00Node->GetOutputValue(); + auto const m01NodeOutput = m01Node->GetOutputValue(); + auto const m02NodeOutput = m02Node->GetOutputValue(); + auto const m03NodeOutput = m03Node->GetOutputValue(); + auto const m10NodeOutput = m10Node->GetOutputValue(); + auto const m11NodeOutput = m11Node->GetOutputValue(); + auto const m12NodeOutput = m12Node->GetOutputValue(); + auto const m13NodeOutput = m13Node->GetOutputValue(); + auto const m20NodeOutput = m20Node->GetOutputValue(); + auto const m21NodeOutput = m21Node->GetOutputValue(); + auto const m22NodeOutput = m22Node->GetOutputValue(); + auto const m23NodeOutput = m23Node->GetOutputValue(); + auto const m30NodeOutput = m30Node->GetOutputValue(); + auto const m31NodeOutput = m31Node->GetOutputValue(); + auto const m32NodeOutput = m32Node->GetOutputValue(); + auto const m33NodeOutput = m33Node->GetOutputValue(); + + auto const composeMatrixInputM00 = composeMatrixNode->GetInputM00(); + auto const composeMatrixInputM01 = composeMatrixNode->GetInputM01(); + auto const composeMatrixInputM02 = composeMatrixNode->GetInputM02(); + auto const composeMatrixInputM03 = composeMatrixNode->GetInputM03(); + + auto const composeMatrixInputM10 = composeMatrixNode->GetInputM10(); + auto const composeMatrixInputM11 = composeMatrixNode->GetInputM11(); + auto const composeMatrixInputM12 = composeMatrixNode->GetInputM12(); + auto const composeMatrixInputM13 = composeMatrixNode->GetInputM13(); + + auto const composeMatrixInputM20 = composeMatrixNode->GetInputM20(); + auto const composeMatrixInputM21 = composeMatrixNode->GetInputM21(); + auto const composeMatrixInputM22 = composeMatrixNode->GetInputM22(); + auto const composeMatrixInputM23 = composeMatrixNode->GetInputM23(); + + auto const composeMatrixInputM30 = composeMatrixNode->GetInputM30(); + auto const composeMatrixInputM31 = composeMatrixNode->GetInputM31(); + auto const composeMatrixInputM32 = composeMatrixNode->GetInputM32(); + auto const composeMatrixInputM33 = composeMatrixNode->GetInputM33(); + + function->AddLink(m00NodeOutput, composeMatrixInputM00); + function->AddLink(m01NodeOutput, composeMatrixInputM01); + function->AddLink(m02NodeOutput, composeMatrixInputM02); + function->AddLink(m03NodeOutput, composeMatrixInputM03); + + function->AddLink(m10NodeOutput, composeMatrixInputM10); + function->AddLink(m11NodeOutput, composeMatrixInputM11); + function->AddLink(m12NodeOutput, composeMatrixInputM12); + function->AddLink(m13NodeOutput, composeMatrixInputM13); + + function->AddLink(m20NodeOutput, composeMatrixInputM20); + function->AddLink(m21NodeOutput, composeMatrixInputM21); + function->AddLink(m22NodeOutput, composeMatrixInputM22); + function->AddLink(m23NodeOutput, composeMatrixInputM23); + + function->AddLink(m30NodeOutput, composeMatrixInputM30); + function->AddLink(m31NodeOutput, composeMatrixInputM31); + function->AddLink(m32NodeOutput, composeMatrixInputM32); + function->AddLink(m33NodeOutput, composeMatrixInputM33); + + auto const composeMatrixOutput = composeMatrixNode->GetOutputResult(); + + function->AddLink(composeMatrixOutput, output); + + auto const nodes = function->GetNodes(); + auto const nodeCount = nodes->Count(); + ASSERT_EQ(nodeCount, 17u); + + nodes->MoveNext(); + auto const node = nodes->GetCurrent(); + ASSERT_TRUE(node); + EXPECT_EQ(node->GetNodeType(), Lib3MF::eImplicitNodeType::ComposeMatrix); + EXPECT_EQ(node->GetIdentifier(), "composeMatrix"); + EXPECT_EQ(node->GetDisplayName(), "compose matrix"); + EXPECT_EQ(node->GetTag(), "group_a"); + } + + + +} // namespace Lib3MF diff --git a/Tests/CPP_Bindings/Source/Volumetric.test.cpp b/Tests/CPP_Bindings/Source/Volumetric.test.cpp new file mode 100644 index 000000000..e69de29bb diff --git a/Tests/CPP_Bindings/Source/v093.cpp b/Tests/CPP_Bindings/Source/v093.cpp index eedf1f0f6..3e79c1a89 100644 --- a/Tests/CPP_Bindings/Source/v093.cpp +++ b/Tests/CPP_Bindings/Source/v093.cpp @@ -86,6 +86,7 @@ namespace Lib3MF TEST_F(ReaderV093, 3MFReadFromFile_Material) { + using namespace Lib3MF::helper; reader->ReadFromFile(sTestFilesPath + "/v093/" + "Material_093.3mf"); CheckReaderWarnings(reader, 1); diff --git a/Tests/TestFiles/Models/WithSomeResources.3mf b/Tests/TestFiles/Models/WithSomeResources.3mf index 7e215b032..857dda080 100644 Binary files a/Tests/TestFiles/Models/WithSomeResources.3mf and b/Tests/TestFiles/Models/WithSomeResources.3mf differ diff --git a/Tests/TestFiles/Reader/PyramidVolume.3mf b/Tests/TestFiles/Reader/PyramidVolume.3mf new file mode 100644 index 000000000..34c52ab93 Binary files /dev/null and b/Tests/TestFiles/Reader/PyramidVolume.3mf differ diff --git a/Tests/TestFiles/Volumetric/ColorMapRGB2D/img_01.png b/Tests/TestFiles/Volumetric/ColorMapRGB2D/img_01.png new file mode 100644 index 000000000..bd8d7c78a Binary files /dev/null and b/Tests/TestFiles/Volumetric/ColorMapRGB2D/img_01.png differ diff --git a/Tests/TestFiles/Volumetric/Cube.3mf b/Tests/TestFiles/Volumetric/Cube.3mf new file mode 100644 index 000000000..9db45e65b Binary files /dev/null and b/Tests/TestFiles/Volumetric/Cube.3mf differ diff --git a/Tests/TestFiles/Volumetric/Pyramid.3mf b/Tests/TestFiles/Volumetric/Pyramid.3mf new file mode 100644 index 000000000..65efdb4c3 Binary files /dev/null and b/Tests/TestFiles/Volumetric/Pyramid.3mf differ diff --git a/Tests/TestFiles/Volumetric/RadialRadiator.3mf b/Tests/TestFiles/Volumetric/RadialRadiator.3mf new file mode 100644 index 000000000..4572a8d00 Binary files /dev/null and b/Tests/TestFiles/Volumetric/RadialRadiator.3mf differ diff --git a/Tests/TestFiles/Volumetric/SphereInACage.3mf b/Tests/TestFiles/Volumetric/SphereInACage.3mf new file mode 100644 index 000000000..6cb9a078f Binary files /dev/null and b/Tests/TestFiles/Volumetric/SphereInACage.3mf differ diff --git a/Tests/TestFiles/Volumetric/img_01.png b/Tests/TestFiles/Volumetric/img_01.png new file mode 100644 index 000000000..de7ff5cdd Binary files /dev/null and b/Tests/TestFiles/Volumetric/img_01.png differ diff --git a/Tests/TestFiles/Volumetric/img_02.png b/Tests/TestFiles/Volumetric/img_02.png new file mode 100644 index 000000000..17e00125d Binary files /dev/null and b/Tests/TestFiles/Volumetric/img_02.png differ diff --git a/Tests/TestFiles/Volumetric/img_03.png b/Tests/TestFiles/Volumetric/img_03.png new file mode 100644 index 000000000..e07ba3845 Binary files /dev/null and b/Tests/TestFiles/Volumetric/img_03.png differ diff --git a/Tests/TestFiles/Volumetric/img_04.png b/Tests/TestFiles/Volumetric/img_04.png new file mode 100644 index 000000000..1fc59df14 Binary files /dev/null and b/Tests/TestFiles/Volumetric/img_04.png differ diff --git a/Tests/TestFiles/Volumetric/img_05.png b/Tests/TestFiles/Volumetric/img_05.png new file mode 100644 index 000000000..cf842e7c3 Binary files /dev/null and b/Tests/TestFiles/Volumetric/img_05.png differ diff --git a/Tests/TestFiles/Volumetric/img_06.png b/Tests/TestFiles/Volumetric/img_06.png new file mode 100644 index 000000000..7de23b336 Binary files /dev/null and b/Tests/TestFiles/Volumetric/img_06.png differ diff --git a/Tests/TestFiles/Volumetric/img_07.png b/Tests/TestFiles/Volumetric/img_07.png new file mode 100644 index 000000000..c22b5c263 Binary files /dev/null and b/Tests/TestFiles/Volumetric/img_07.png differ diff --git a/Tests/TestFiles/Volumetric/img_08.png b/Tests/TestFiles/Volumetric/img_08.png new file mode 100644 index 000000000..7fd01f601 Binary files /dev/null and b/Tests/TestFiles/Volumetric/img_08.png differ diff --git a/Tests/TestFiles/Volumetric/img_09.png b/Tests/TestFiles/Volumetric/img_09.png new file mode 100644 index 000000000..5ecd87a1f Binary files /dev/null and b/Tests/TestFiles/Volumetric/img_09.png differ diff --git a/Tests/TestFiles/Volumetric/img_10.png b/Tests/TestFiles/Volumetric/img_10.png new file mode 100644 index 000000000..c656ba53c Binary files /dev/null and b/Tests/TestFiles/Volumetric/img_10.png differ diff --git a/Tests/TestFiles/Volumetric/img_11.png b/Tests/TestFiles/Volumetric/img_11.png new file mode 100644 index 000000000..f616711d6 Binary files /dev/null and b/Tests/TestFiles/Volumetric/img_11.png differ diff --git a/Tests/TestFiles/Volumetric/template.3mf b/Tests/TestFiles/Volumetric/template.3mf new file mode 100644 index 000000000..b1858e56b Binary files /dev/null and b/Tests/TestFiles/Volumetric/template.3mf differ diff --git a/cmake/lib3mfConfig.cmake.in b/cmake/lib3mfConfig.cmake.in new file mode 100644 index 000000000..744c348f6 --- /dev/null +++ b/cmake/lib3mfConfig.cmake.in @@ -0,0 +1,3 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/lib3mfTargets.cmake") \ No newline at end of file diff --git a/outProduction.3mf b/outProduction.3mf new file mode 100644 index 000000000..4c433d33c Binary files /dev/null and b/outProduction.3mf differ diff --git a/submodules/AutomaticComponentToolkit b/submodules/AutomaticComponentToolkit index 4237585f4..33422936d 160000 --- a/submodules/AutomaticComponentToolkit +++ b/submodules/AutomaticComponentToolkit @@ -1 +1 @@ -Subproject commit 4237585f405bbebfbaf143ade7033777d1491bda +Subproject commit 33422936d34156d0d683e8ab363a8e10b14491c6 diff --git a/submodules/cpp-base64 b/submodules/cpp-base64 index 07ae5045d..951de609d 160000 --- a/submodules/cpp-base64 +++ b/submodules/cpp-base64 @@ -1 +1 @@ -Subproject commit 07ae5045d67b5bf6ffb46646b8ac2370eff1ae3e +Subproject commit 951de609dbe27ce8864dfe47323c4ade96bee86e diff --git a/submodules/googletest b/submodules/googletest index f8d7d77c0..df1544bce 160000 --- a/submodules/googletest +++ b/submodules/googletest @@ -1 +1 @@ -Subproject commit f8d7d77c06936315286eb55f8de22cd23c188571 +Subproject commit df1544bcee0c7ce35cd5ea0b3eb8cc81855a4140 diff --git a/submodules/libzip b/submodules/libzip index 210b09d9d..3091d0424 160000 --- a/submodules/libzip +++ b/submodules/libzip @@ -1 +1 @@ -Subproject commit 210b09d9d2d0f4c0bbc64f92ad45c1ac53598fec +Subproject commit 3091d0424e04f98e051fce5e94bb3a6461a33b91